f50b44ed257b32d6a86f1403b78e9ac8962985de
[platform/upstream/gcc.git] / gcc / ada / ChangeLog
1 2011-12-22  Ed Schonberg  <schonberg@adacore.com>
2
3         * a-cohase.ads, a-cohase.adb: Update to latest RM version. Add
4         aspect Constant_Reference to set type, and corresponding
5         functions.
6         * a-cihama.ads, a-cihama.adb: Update to latest RM version. Add
7         function Reference to provide a proper element iterator construct
8         over indefinite maps.
9
10 2011-12-22  Ed Schonberg  <schonberg@adacore.com>
11
12         * exp_attr.adb (Expand_N_Attribute, case 'Access): Do not insert
13         implicit conversion on prefix of Unrestricted_Access when prefix
14         is an explicit dereference.
15
16 2011-12-22  Vincent Pucci  <pucci@adacore.com>
17
18         * sem_dim.adb: Addressed all ??? comments. Replacement of warnings by
19         errors using continuation marks.
20         (Error_Dim_Msg_For_?): Renaming of Error_Dim_For_?.
21
22 2011-12-22  Robert Dewar  <dewar@adacore.com>
23
24         * sem_ch3.adb, sem_ch3.ads, sem_prag.adb: Minor code clean up.
25
26 2011-12-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
27
28         * s-oscons-tmplt.c [__alpha__ && __osf__] (_XOPEN_SOURCE): Define.
29
30 2011-12-21  Javier Miranda  <miranda@adacore.com>
31
32         * sem_ch3.ads, sem_ch3.adb (Check_CPP_Type): New subprogram.
33         (Process_Full_View): Invoke Check_CPP_Type if processing the
34         full-view of a CPP type.
35         * sem_prag.adb (Process_Import_Or_Interface): Add missing support
36         for importing a CPP type that has an incomplete declaration. Move
37         to new routine Check_CPP_Type the code that verifies that
38         components of imported CPP types do not have default expressions.
39
40 2011-12-21  Vincent Celier  <celier@adacore.com>
41
42         * prj-nmsc.adb (Report_No_Sources): Remove argument Lang. Report
43         no sources even for languages that are not allowed.
44         (Add_Source): Get the source even when the language is not allowed.
45
46 2011-12-21  Robert Dewar  <dewar@adacore.com>
47
48         * sem_ch6.adb (Process_Formals): Add defensive code.
49
50 2011-12-21  Ed Schonberg  <schonberg@adacore.com>
51
52         * sem_ch7.adb, sem_ch13.adb (Analyze_Package_Specification): Build the
53         invariant procedure of a type declaration that is a completion and has
54         aspect specifications.
55         (Build_Invariant_Procedure): If the procedure is built for a
56         type declaration that is a completion, analyze body expliitly
57         because all private declarations have been already analyzed.
58
59 2011-12-21  Claire Dross  <dross@adacore.com>
60
61         * a-cfdlli.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
62         a-cofove.adb: Minor reformating on formal containers
63
64 2011-12-21  Vincent Celier  <celier@adacore.com>
65
66         * makeutl.adb (Mains.Complete_Mains.Do_Complete): Remove
67         any main that is not in the list of restricted languages.
68         (Insert_Project_Sources.Do_Insert): Only add sources of languages
69         in the list of restricted languages.
70
71 2011-12-21  Ed Schonberg  <schonberg@adacore.com>
72
73         * sem_res.adb (Valid_Conversion): A type conversion is valid when
74         the target type is an anonymous access type and the operand is a
75         rewriting of an allocator. The conversion is typically inserted
76         when the designated type is an interface.
77
78 2011-12-21  Ed Schonberg  <schonberg@adacore.com>
79
80         * exp_ch9.adb (Establish_Task_Master): If the enclosing block
81         has no declarations, create new declarative list for it.
82
83 2011-12-21  Matthew Heaney  <heaney@adacore.com>
84
85         * a-rbtgbk.adb (Generic_Conditional_Insert): Fixed incorrect comment.
86
87 2011-12-21  Yannick Moy  <moy@adacore.com>
88
89         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
90         ignore representation attributes in Alfa mode, since formal
91         verification backend does not depend on actual physical
92         representation, but code may still refer to attribute values.
93
94 2011-12-21  Yannick Moy  <moy@adacore.com>
95
96         * par-ch13.adb (P_Aspect_Specifications): Recognize the cases
97         where a comma between two aspects is missing, or erroneously
98         replaced by a semicolon, issue an error and proceed with next
99         aspect.
100         * par.adb, sinfo.ads: Fix typos.
101
102 2011-12-21  Ed Schonberg  <schonberg@adacore.com>
103
104         * sem_util.adb (Mark_Coextensions): A coextension for an
105         object that is part of the expression in a return statement,
106         or part of the return object in an extended return statement,
107         must be allocated dynamically.
108
109 2011-12-21  Matthew Heaney  <heaney@adacore.com>
110
111         * a-crbtgk.adb (Generic_Conditional_Insert): Fixed incorrect comment.
112
113 2011-12-21  Ed Schonberg  <schonberg@adacore.com>
114
115         * sem_ch5.adb (Analyze_Iterator_Specification): If the name
116         of an element iterator is not an entity name we introduce a
117         local renaming declaration for it. To prevent spurious warnings
118         on parameterless function calls that return a container, when
119         expansion is disabled (either explicitly or because of a previous
120         errors) the name must be marked as not coming from source.
121
122 2011-12-21  Arnaud Charlet  <charlet@adacore.com>
123
124         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Separate
125         handling in CodePeer mode and only ignore Component_Size
126         attribute.
127
128 2011-12-21  Robert Dewar  <dewar@adacore.com>
129
130         * sem_ch6.adb (Process_Formals): Set proper mechanism for
131         formals whose types have conventions Ada_Pass_By_Copy or
132         Ada_Pass_By_Reference.
133
134 2011-12-21  Arnaud Charlet  <charlet@adacore.com>
135
136         * gnat1drv.adb (Gnat1Drv): Always delete old scil files in
137         CodePeer mode.
138
139 2011-12-21  Robert Dewar  <dewar@adacore.com>
140
141         * comperr.adb: Minor reformatting.
142
143 2011-12-21  Ed Schonberg  <schonberg@adacore.com>
144
145         * aspects.ads: New table Base_Aspect, to indicate that an aspect
146         is defined on a base type.
147         * aspects.adb (Find_Aspect): If the aspect is a Base_Aspect,
148         examine the representation items of the base type.
149
150 2011-12-21  Pascal Obry  <obry@adacore.com>
151
152         * gnat_ugn.texi, prj.ads, prj-nmsc.adb, prj-attr.adb, projects.texi,
153         snames.ads-tmpl: Use Encapsulated instead of Fully Standalone library.
154
155 2011-12-21  Pascal Obry  <obry@adacore.com>
156
157         * adaint.c (__gnat_is_executable_file_attr) [_WIN32]: Add parentheses
158         to kill warning.
159
160 2011-12-21  Arnaud Charlet  <charlet@adacore.com>
161
162         * comperr.adb (Delete_SCIL_Files): Also delete .scilx files.
163         Fix implementation for child packages and package specs.
164         (Delete_SCIL_Files.Decode_Name_Buffer): New function.
165
166 2011-12-21  Robert Dewar  <dewar@adacore.com>
167
168         * err_vars.ads, a-cdlili.adb, a-cfdlli.ads, prj.adb, prj-nmsc.adb,
169         a-cbdlli.adb, a-cbdlli.ads, a-cfdlli.adb: Minor reformatting.
170
171 2011-12-21  Vincent Pucci  <pucci@adacore.com>
172
173         * s-diflio.adb, s-diflio.ads, s-diinio.adb, s-diinio.ads,
174         s-llflex.ads: Fix header.
175
176 2011-12-21  Thomas Quinot  <quinot@adacore.com>
177
178         * thread.c, s-oscons-tmplt.c, init.c (pthread_condattr_setclock): For
179         AIX 5.2, define as a dummy weak symbol in init.c.
180         (CLOCK_RT_Ada): Set to CLOCK_MONOTONIC on all versions of AIX.
181
182 2011-12-21  Thomas Quinot  <quinot@adacore.com>
183
184         * snames.ads-tmpl, sem_ch8.adb: Minor reformatting.
185         * sem_prag.adb: Minor comment clarification.
186
187 2011-12-21  Vincent Celier  <celier@adacore.com>
188
189         * prj-nmsc.adb (Report_No_Sources): New argument Lang for the
190         language name as a Name_Id. Do not report no sources if language
191         is not allowed.
192         (Add_Source): Do not add source if language is not allowed.
193         * prj.adb (Add_Restricted_Language): New procedure
194         (Is_Allowed_Language): New function
195         * prj.ads (Add_Restricted_Language): New procedure
196         (Is_Allowed_Language): New function
197
198 2011-12-21  Robert Dewar  <dewar@adacore.com>
199
200         * exp_ch5.adb, sem_dim.adb, sem_dim.ads, sem_ch12.adb, prj-conf.adb:
201         Minor reformatting.
202
203 2011-12-21  Claire Dross  <dross@adacore.com>
204
205         * a-cfdlli.ads (Constant_Indexing, Default_Iterator,
206         Iterator_Element): Added to type List.               
207         (Not_No_Element, List_Iterator_Interfaces, Iterate,
208         Constant_Reference_Type, Constant_Reference): New.
209         * a-cfdlli.adb (type Iterator, Finalize, First, Last, Next,
210         Previous, Iterate, Not_No_Element, Constant_Reference): New.
211
212 2011-12-21  Gary Dismukes  <dismukes@adacore.com>
213
214         * gnat_ugn.texi: Minor reformatting.
215
216 2011-12-21  Ed Schonberg  <schonberg@adacore.com>
217
218         * exp_ch5.adb (Expand_Iterator_Loop): The cursor operation
219         Has_Element is the formal of Iterator_Interfaces, and within
220         the instantion of this package it is a renaming of some local
221         function with an unrelated name. Retrieve the operation from
222         the instance itself, not from the container package.
223
224 2011-12-21  Vincent Pucci  <pucci@adacore.com>
225
226         * exp_ch6.adb (Expand_Call): Expand_Put_Call_With_Dimension_String
227         replaced by Expand_Put_Call_With_Dimension_Symbol
228         * sem_ch12.adb (Analyze_Package_Instantiation): New check for
229         System.Dim_Float_IO and System.Dim_Integer_IO instantiation.
230         * sem_ch3.adb (Analyze_Declarations): Removed
231         Remove_Dimension_In_Declaration call.
232         * sem_dim.adb: Update comments. Redefine the
233         representation of a Rational. Propagate all changes involving
234         data structures and types throughout the pakage. Output the
235         dimension aggregates for each error messages.
236         ("/"): Rational constructor "/" removed for Whole operands.
237         ("/"): New rational operation "/" for Rational operands.
238         ("*"): Operation "*" between Rational and Int removed.
239         ("abs"): New unary operator "abs" for Rational.
240         (Analyze_Aspect_Dimension_System): Reorganized.
241         (Analyze_Dimension_Identifier): Removed.
242         (Copy_Dimensions): Removed.
243         (Create_Rational_From_Expr): New Boolean parameter.
244         (Dimensions_Msg_Of): New routine. Return
245         a string with the dimensions of the parameter.
246         (From_Dimension_To_String_Of_Symbols): Renaming of
247         From_Dimension_To_String_Id.
248         * sem_dim.ads: Update comments.
249         (Is_Dim_IO_Package_Instantiation): New routine.
250         (Remove_Dimension_In_Declaration): Removed.
251         * sem_res.adb (Resolve_Op_Expon): Reorganized calls of
252         Eval_Op_Expon_For_Dimensioned_Type and Eval_Op_Expon.
253         * s-diflio.ads, s-diinio.ads: Update comments.
254
255 2011-12-21  Pascal Obry  <obry@adacore.com>
256
257         * prj-attr.adb, snames.ads-tmpl: Add Library_Standalone,
258         Library_Fully_Standalone_Options and
259         Library_Fully_Standalone_Supported attributes.
260         * prj-nmsc.adb (Check_Library): Update check to take into
261         account fully standalone libraries. Such shared libraries can
262         only depend on static libraries.
263         (Check_Stand_Alone_Library): Add support for fully standalone libraries.
264         (Process_Project_Level_Simple_Attributes): Store value for
265         configuration attribute Library_Fully_Standalone_Supported.
266         * prj.ads, makeutl.adb (Standalone): New enumeration type.
267         (Project_Data): Standalone_Library now of type Standlone.
268         (Project_Configuration): Add Lib_Fully_Standalone_Supported
269         field.
270         (Default_Project_Config): Initialize new Lib_Fully_Standalone_Supported
271         field.
272         * clean.adb (Clean_Project): Adjust to new type for Standalone.
273         * make.adb (Library_Phase): Adjust to new type for Standalone.
274         (Gnatmake): Likewise.
275         * mlib-prj.adb (Build_Library): Adjust to new type for
276         Standalone.
277
278 2011-12-21  Thomas Quinot  <quinot@adacore.com>
279
280         * gnatls.adb (Gnatls): Call Set_Standard_Error at startup, and then
281         Set_Standard_Output just before producing normal (non-diagnostic)
282         output.
283         * gnatcmd.adb (Gnatcmd): Call Set_Standard_Error at initialization
284         (and again after parsing project files).
285
286 2011-12-21  Vincent Celier  <celier@adacore.com>
287
288         * prj-conf.adb (Do_Autoconf): When the object directory does
289         not exist, create auto.cgpr in the directory where temporary
290         files are created.
291
292 2011-12-20  Ed Schonberg  <schonberg@adacore.com>
293
294         * sem_ch12.adb (Insert_Freeze_Node_For_Instance):  Further
295         refinements on the placement of a freeze node for a package
296         instantiation, when the generic appears within a previous
297         instantiation in the same unit.If the current instance is within
298         the one that contains the generic, the freeze node for the
299         current one must appear in the current declarative part. Ditto
300         if the current instance is within another package instance. In
301         these cases the freeze node of the previous instance is is not
302         relevant. New predicate Enclosing_Body simplifies the process.
303         (Freeze_Subprogram_Body): Rename Enclosing_Body to
304         Enclosing_Package_Body, to prevent confusion with subprogram of
305         same name elsewhere.
306         (Install_Body): Recognize enclosing subprogram bodies to determine
307         whether freeze_node belongs in current declarative list.
308
309 2011-12-20  Robert Dewar  <dewar@adacore.com>
310
311         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Allow
312         attribute definition clause for renaming if generated internally
313         and generate duplicate clause to apply to renamed object.
314         (Rep_Item_Too_Late): Only diagnose source level entities
315         * prj-nmsc.adb: Minor reformatting.
316         * gcc-interface/Make-lang.in: Update dependencies.
317
318 2011-12-20  Bob Duff  <duff@adacore.com>
319
320         * opt.ads (List_Inherited_Aspects): Default to False
321         (i.e. -gnatw.L is the default).
322         * usage.adb: Document new default for -gnatw.L.
323         * gnat_ugn.texi: Document -gnatw.l and -gnatw.L switches.
324         * warnsw.adb (Set_Warning_Switch): Do not include
325         List_Inherited_Aspects in -gnatwa.
326
327 2011-12-20  Ed Schonberg  <schonberg@adacore.com>
328
329         * checks.adb (Apply_Type_Conversion_Checks): For a discrete type
330         with predicates, indicate unconditionally that a range check
331         is needed.
332         * exp_ch4.adb (Expand_N_In): When the membership test is rewritten
333         to incorporate a call to a predicate function, analyze expression
334         with checks suppressed, to prevent infinite recursion.
335
336 2011-12-20  Hristian Kirtchev  <kirtchev@adacore.com>
337
338         * exp_ch11.adb (Find_Local_Handler): Guard the
339         search over individual exception choices in case the list of
340         handlers contains other (possibly illegal) constructs.
341
342 2011-12-20  Gary Dismukes  <dismukes@adacore.com>
343
344         * sem_ch8.adb (Find_Type): Test taggedness
345         of the Available_Type when checking for an illegal use of an
346         incomplete type, when the incomplete view is a limited view of
347         a type. Remove redundant Is_Tagged test.
348
349 2011-12-20  Hristian Kirtchev  <kirtchev@adacore.com>
350
351         * exp_util.adb: Add with and use clause for Aspects.
352         (Is_Finalizable_Transient): Objects which denote Ada containers
353         in the context of iterators are not considered transients. Such
354         object must live for as long as the loop is around.
355         (Is_Iterated_Container): New routine.
356
357 2011-12-20  Hristian Kirtchev  <kirtchev@adacore.com>
358
359         * exp_imgv.adb (Expand_Width_Attribute): Add a
360         type conversion from the enumeration subtype to its base subtype.
361
362 2011-12-20  Hristian Kirtchev  <kirtchev@adacore.com>
363
364         * sem_ch4.adb (Operator_Check): Update the call to
365         Is_Dimensioned_Type.
366         * sem_dim.adb: Remove with and use clause for Namet.Sp. Reorganize
367         all type declarations and datastructures involved. Propagate
368         all changes involving data structures and types throughout
369         the pakage. Alphabetize all subprograms. Add ??? comments.
370         (AD_Hash): Removed.
371         (Analyze_Aspect_Dimension): Rewritten. This
372         routine now does all its checks in one pass rather than
373         two. Refactor code. The error message are now in a more GNAT-ish style.
374         (Create_Rational_From_Expr): This is now a function.
375         (Get_Dimensions): Removed.
376         (Get_Dimensions_String_Id): Removed.
377         (Dimensions_Of): New rouitne.
378         (Exists): New routines.
379         (Is_Invalid): New routine.
380         (Permits_Dimensions): Removed.
381         (Present): Removed.
382         (Set_Symbol): New routine.
383         (System_Of): New routine.
384         * sem_dim.ads: Rewrite the top level description of the
385         package. Alphabetize subprograms. Add various comments on
386         subprogram usage. Add ??? comments.
387         (Is_Dimensioned_Type):
388         Renamed to Has_Dimension_System.
389         * sem_res.adb (Resolve_Op_Expon): Update the call to Is_Dimensioned_Type
390
391 2011-12-20  Ed Schonberg  <schonberg@adacore.com>
392
393         * sem_ch13.adb (Check_Indexing_Functions): The return type of an
394         indexing function can be the default element type, and does not
395         need to be a reference type.
396         * sem_ch4.adb (Try_Container_Indexing): Ditto.
397
398 2011-12-20  Robert Dewar  <dewar@adacore.com>
399
400         * a-cdlili.ads, sem_cat.adb, sem_ch10.adb: Minor reformatting.
401
402 2011-12-20  Bob Duff  <duff@adacore.com>
403
404         * s-taprop-mingw.adb (Yield): Do_Yield is no longer Unreferenced.
405
406 2011-12-20  Vincent Pucci  <pucci@adacore.com>
407
408         * impunit.adb: s-dimkio, s-dimmks and s-dmotpr defined as GNAT
409         Defined Additions to System.
410         * Makefile.rtl: s-dimkio, s-dimmks and s-dmotpr added.
411         * s-dimkio.ads, s-dimmks.ads, s-dmotpr.ads: New files.
412
413 2011-12-20  Gary Dismukes  <dismukes@adacore.com>
414
415         * sem_ch4.adb (Traverse_Homonyms): Allow a homonym to match when
416         within an instance, even if the homonym is marked Is_Hidden at
417         this point.
418
419 2011-12-20  Robert Dewar  <dewar@adacore.com>
420
421         * sem_ch3.adb, sem_ch5.adb, s-diinio.adb, s-diinio.ads, sem_dim.adb,
422         sem_dim.ads, sem_res.adb, s-stposu.adb, s-stposu.ads, sem_ch4.adb,
423         s-diflio.adb, s-diflio.ads, exp_disp.adb, s-llflex.ads: Minor
424         reformatting.
425         * aspects.ads: Dimension[_Aspects] are GNAT defined.
426
427 2011-12-20  Robert Dewar  <dewar@adacore.com>
428
429         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Check
430         renaming case.
431
432 2011-12-20  Thomas Quinot  <quinot@adacore.com>
433
434         * sem_cat.adb, sem_ch10.adb (Analyze_With_Clause): For a WITH clause on
435         a child unit that is an illegal instantiation, mark the WITH clause in
436         error.
437         (Install_Siblings, Validate_Categorization_Dependency): Guard
438         against WITH clause marked as in error.
439
440 2011-12-20  Hristian Kirtchev  <kirtchev@adacore.com>
441
442         * sem_res.adb (Resolve_Allocator): Warning on allocation
443         of tasks on a subpool and rewrite the allocator into a raise
444         Program_Error statement.
445         * s-stposu.ads, s-stposu.adb: Code reformatting.
446         (Create_Subpool): Remove formal parameter Storage_Size.
447         (Default_Subpool_For_Pool): Add the default implementation of this
448         routine.
449         (Set_Pool_Of_Subpool): Rename formal parameter Pool to To. Update
450         all the uses of the parameter.
451
452 2011-12-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
453
454         * gcc-interface/Makefile.in (%86 linux%):
455         (LIBGNAT_TARGET_PAIRS_32): Split off from LIBGNAT_TARGET_PAIRS.
456         (LIBGNAT_TARGET_PAIRS_64): New.
457         (LIBGNAT_TARGET_PAIRS): Add either depending on multilib.
458
459 2011-12-18  Eric Botcazou  <ebotcazou@adacore.com>
460
461         * gcc-interface/decl.c (gnat_to_gnu_param): Add comment about double
462         reference and DECL_POINTS_TO_READONLY_P.
463         * gcc-interface/trans.c (Identifier_to_gnu) <by_ref>: Always set the
464         TREE_READONLY flag on the first dereference of a double dereference.
465
466 2011-12-15  Arnaud Charlet  <charlet@adacore.com>
467
468         * a-numaux-vms.ads, s-asthan-vms-ia64.adb, s-auxdec-vms-ia64.adb,
469         s-memory-vms_64.adb, s-memory-vms_64.ads, s-osinte-vms-ia64.adb,
470         s-osinte-vms-ia64.ads, s-tasdeb-vms.adb: New files.
471
472 2011-12-15  Vincent Pucci  <pucci@adacore.com>
473
474         * aspects.adb, aspects.ads Aspect_Dimension and
475         Aspect_Dimension_System added
476         * exp_ch6.adb (Expand_Call): Expand_Put_Call_With_Dimension_String
477         case added
478         * gcc-interface/Make-lang.in: s-llflex, sem_dim added.
479         * impunit.adb :s-diflio and s-diinio defined as GNAT Defined
480         Additions to System.
481         * Makefile.rtl: s-diflio, s-diinio and s-llflex added
482         * par-prag.adb, sem_prag.adb: Pragma_Dimension removed
483         * rtsfind.ads: Expon_LLF added
484         * sem_aggr.adb (Resolve_Aggregate): handles aggregate for
485         Aspect_Dimension case
486         * sem_attr.adb (Resolve_Attribute): analyze dimension for
487         attribute
488         * sem_ch10.adb (Analyze_With_Clause): Avoid the warning messages
489         due to the use of a GNAT library for Dimension packages
490         * sem_ch13.adb (Analyze_Aspect_Specifications):
491         Aspect_Dimension and Aspect_Dimension_System cases added
492         (Check_Aspect_At_Freeze_Point): Aspect_Dimension and
493         Aspect_Dimension_System cases added
494         * sem_ch2.adb (Analyze_Identifier): analyze dimension for
495         identifier
496         * sem_ch3.adb (Analyze_Component_Declaration): analyze dimension
497         for component declaration (Analyze_Object_Declaration): analyze
498         dimension for object declaration (Analyze_Subtype_Declaration):
499         analyze dimension for subtype declaration
500         * sem_ch4.adb (Operator_Check): checks exponent is a rational
501         for dimensioned operand for a N_Op_Expon
502         * sem_ch5.adb (Analyze_Assignment): analyze dimension for
503         assignment (Analyze_Statements): removal of dimensions in all
504         statements
505         * sem_ch6.adb (Analyze_Return_Statement): analyze dimension for
506         return statement
507         * sem_ch8.adb (Analyze_Object_Renaming): analyze dimension for
508         object renaming
509         * sem_dim.adb, sem_dim.ads (Analyze_Aspect_Dimension):
510         analyze the expression for aspect dimension and store the
511         values in a Htable.
512         (Analyze_Aspect_Dimension_System): analyze
513         the expression for aspect dimension system and store the new
514         system in a Table.
515         (Analyze_Dimension): propagates dimension
516         (Expand_Put_Call_With_Dimension_String): add the dimension
517         string as a suffix of the numeric value in the output
518         (Has_Dimension): return True if the node has a dimension
519         (Remove_Dimension_In_Declaration): removal of dimension in the
520         expression of the declaration.
521         (Remove_Dimension_In_Statement): removal of dimension in statement
522         * sem_res.adb (Resolve): analyze dimension if the node
523         has already been analyzed.
524         (Resolve_Arithmetic_Op): analyze
525         dimension for arithmetic op.
526         (Resolve_Call): analyze dimension for function call.
527         (Resolve_Comparison_Op): analyze dimension for comparison op.
528         (Resolve_Equality_Op): analyze dimension for equality op.
529         (Resolve_Indexed_Component): analyze dimension for indexed component.
530         (Resolve_Op_Expon): analyze dimension for op expon.
531         (Resolve_Selected_Component): analyze dimension
532         for selected component.
533         (Resolve_Slice): analyze dimension for slice.
534         (Resolve_Unary_Op): analyze dimension for unary op
535         (Resolve_Type_Conversion): analyze dimension for type conversion
536         (Resolve_Unchecked_Type_Conversion): analyze dimension for
537         unchecked type conversion
538         * snames.ads-tmpl Name_Dimension, Name_Dimension_System,
539         Name_Dim_Float_IO, Name_Dim_Integer_IO,
540         Name_Generic_Elementary_Functions, Name_Sqrt added.
541         Pragma_Dimension removed
542         * s-diflio.adb, s-diflio.ads New GNAT library generic package
543         for dimensioned float type IO
544         * s-diinio.adb, s-diinio.ads New GNAT library generic package
545         for dimensioned integer type IO
546         * s-llflex.ads (Expon_LLF): exponentiation routine for long long
547         floats operand and exponent
548
549 2011-12-15  Robert Dewar  <dewar@adacore.com>
550
551         * sem_aggr.adb: Minor comment addition.
552
553 2011-12-15  Bob Duff  <duff@adacore.com>
554
555         * s-tasren.adb (Task_Count): Do not call Yield; E'Count is not a
556         task dispatching point.
557         * s-taprop-mingw.adb (Yield): Do not yield if Do_Yield is False.
558
559 2011-12-15  Robert Dewar  <dewar@adacore.com>
560
561         * sigtramp-ppcvxw.c, sigtramp.h: Fix header.
562
563 2011-12-15  Javier Miranda  <miranda@adacore.com>
564
565         * exp_attr.adb (Expand_N_Attribute_Reference): For 'alignment
566         applied to a class-wide type under VM targets generate code which
567         invokes the function Get_Alignment to retrieve the value of the
568         alignment from the TSD.
569         * rtsfind.ads (RE_Get_Alignment): New entity.
570
571 2011-12-15  Robert Dewar  <dewar@adacore.com>
572
573         * g-comlin.adb: Fix header.
574
575 2011-12-15  Tristan Gingold  <gingold@adacore.com>
576
577         * gnatls.adb: Fix typo.
578
579 2011-12-15  Ed Falis  <falis@adacore.com>
580
581         * s-tpopsp-vxworks.adb: Update comment.
582
583 2011-12-15  Ed Schonberg  <schonberg@adacore.com>
584
585         * sem_aggr.adb (Resolve_Array_Aggregate, Resolve_Aggr_Expr); If
586         the component type has predicates, generate corresponding check.
587         (Resolve_Record_Aggregate, Resolve_Aggr_Expr): Ditto.
588
589 2011-12-13  Cesar Strauss  <cestrauss@gmail.com>
590             Eric Botcazou  <ebotcazou@adacore.com>
591
592         PR ada/49084
593         * types.h (Byte): Change typedef to 'unsigned char'.
594         * atree.h (struct Flag_Word): Use Byte for 'convention' field.
595
596 2011-12-12  Robert Dewar  <dewar@adacore.com>
597
598         * s-taprop-mingw.adb: Minor reformatting.
599
600 2011-12-12  Nicolas Roche  <roche@adacore.com>
601
602         * gcc-interface/Make-lang.in: Update dependencies.
603         Add gnattools4 target when building tools in canadian mode
604
605 2011-12-12  Javier Miranda  <miranda@adacore.com>
606
607         * exp_disp.adb (Make_VM_TSD): Complete previous patch.
608
609 2011-12-12  Bob Duff  <duff@adacore.com>
610
611         * s-tpobop.adb: Use named notation.
612         * g-bytswa.ads, s-taprop.ads: Minor comment fix.
613
614 2011-12-12  Arnaud Charlet  <charlet@adacore.com>
615
616         * make.adb: Minor comment update.
617
618 2011-12-12  Robert Dewar  <dewar@adacore.com>
619
620         * freeze.adb, s-taprop-mingw.adb, exp_disp.adb, sem_ch13.adb: Minor
621         reformatting.
622
623 2011-12-12  Robert Dewar  <dewar@adacore.com>
624
625         * sem_ch6.adb, gnatls.adb: Minor reformatting.
626
627 2011-12-12  Ed Schonberg  <schonberg@adacore.com>
628
629         * freeze.adb (Freeze_Entity): If a type declared in a generic
630         context has predicates, generate a freeze node for it.
631         * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): If expression
632         has not been analyzed yet, entity has not been frozen, so analyze
633         it now.
634
635 2011-12-12  Javier Miranda  <miranda@adacore.com>
636
637         * exp_disp.adb (Make_VM_TSD): Generate code to store the value of
638         'alignment in the TSD.
639
640 2011-12-12  Bob Duff  <duff@adacore.com>
641
642         * s-taprop-mingw.adb (Yield): Do not delay 1 millisecond in Annex D
643         mode.
644
645 2011-12-12  Hristian Kirtchev  <kirtchev@adacore.com>
646
647         * exp_ch4.adb (Expand_N_Allocator): Update the master of an
648         anonymous access-to-controlled type to utilize the heterogeneous
649         master associated with the current unit.
650
651 2011-12-12  Ed Schonberg  <schonberg@adacore.com>
652
653         * sem_ch6.adb (Analyze_Expression_Function): If the function
654         is not a completion, pre-analyze the expression now to prevent
655         spurious visibility on later entities. The body is inserted at
656         the end of the current declaration list or package to prevent
657         early freezing, but the visibility is established at the point
658         of definition.
659
660 2011-12-12  Bob Duff  <duff@adacore.com>
661
662         * sem.adb, sem.ads: Add debugging routines.
663
664 2011-12-12  Tristan Gingold  <gingold@adacore.com>
665
666         * gnatls.adb: (gnatls): Also add the objects dir in search list.
667
668 2011-12-12  Robert Dewar  <dewar@adacore.com>
669
670         * exp_atag.adb, exp_atag.ads, exp_util.adb, exp_attr.adb,
671         sem_ch13.adb: Minor reformatting.
672
673 2011-12-12  Gary Dismukes  <dismukes@adacore.com>
674
675         * sem_ch7.adb (Uninstall_Declarations): Don't
676         apply check for incomplete types used as a result type for an
677         access-to-function type when compiling for Ada 2012 or later.
678         * sem_ch6.adb (Analyze_Subprogram_Declaration):
679         Specialize error message for interface subprograms that are
680         not declared abstract nor null (functions can't be declared as
681         null). Also, remove "(Ada 2005)" from message.
682
683 2011-12-12  Robert Dewar  <dewar@adacore.com>
684
685         * sem_prag.adb (GNAT_Pragma): Check comes from source.
686
687 2011-12-12  Robert Dewar  <dewar@adacore.com>
688
689         * gnatls.adb: Minor reformatting.
690
691 2011-12-12  Javier Miranda  <miranda@adacore.com>
692
693         * a-tags.ads (Alignment): New TSD field.
694         (Max_Predef_Prims): Value lowered to 15 (or 9 in case of
695         configurable runtime) Update documentation of predefined
696         primitives since Alignment has been removed.
697         * exp_disp.ads Update documentation of slots of dispatching
698         primitives.
699         * exp_disp.adb (Default_Prim_Op_Position): Update slot
700         values since alignment is no longer a predefined primitive.
701         (Is_Predefined_Dispatch_Operation): Remove _alignment.
702         (Is_Predefined_Internal_Operation): Remove _alignment.
703         (Make_DT): Update static test on the value stored in a-tags.ads
704         for Max_Predef_Prims; store the value of 'alignment in the TSD.
705         * exp_atag.ads, exp_atag.adb (Build_Get_Alignment): New subprogram
706         that retrieves the alignment from the TSD
707         * exp_util.adb (Build_Allocated_Deallocate_Proc): For deallocation
708         of class-wide types obtain the value of alignment from the TSD.
709         * exp_attr.adb (Expand_N_Attribute_Reference): For 'alignment
710         applied to a class-wide type invoke Build_Get_Alignment to
711         generate code which retrieves the value of the alignment from
712         the TSD.
713         * rtsfind.ads (RE_Alignment): New Ada.Tags entity
714         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): For tagged
715         types if the value of the alignment is bigger than the Maximum
716         alignment then set the value of the alignment to the Maximum
717         alignment and report a warning.
718         * exp_ch3.adb (Make_Predefined_Primitive_Specs): Do not generate
719         spec of _alignment.
720         (Predefined_Primitive_Bodies): Do not generate body of _alignment.
721
722 2011-12-12  Gary Dismukes  <dismukes@adacore.com>
723
724         * freeze.adb (Freeze_Expression): Allow freezing of static
725         scalar subtypes that are prefixes of an attribute, even if not
726         yet marked static. Such attributes will get marked as static
727         later in Eval_Attribute (as called from Resolve_Attribute).
728         * sem_attr.adb (Eval_Attribute): Remove wrong code that does an
729         early return for attribute prefixes that are unfrozen source-level
730         types. This code was incorrectly bypassing folding of unfrozen
731         static subtype attributes in default expressions (the executable
732         example in the now-deleted comment was in fact illegal).
733
734 2011-12-12  Robert Dewar  <dewar@adacore.com>
735
736         * a-coinve.adb, sem_res.adb, prj-nmsc.adb, a-cobove.adb, a-convec.adb,
737         gnatls.adb, sem_ch13.adb, prj-env.adb, prj-env.ads: Minor reformatting.
738
739 2011-12-12  Tristan Gingold  <gingold@adacore.com>
740
741         * gsocket.h: Adjust previous patch.
742
743 2011-12-12  Thomas Quinot  <quinot@adacore.com>
744
745         * exp_disp.adb: Minor reformatting.
746
747 2011-12-12  Tristan Gingold  <gingold@adacore.com>
748
749         * gnatls.adb (Search_RTS): New procedure.
750         (Scan_Ls_Arg): Move code that search the RTS.
751         (Gnatls): search the RTS later.
752         * prj-env.ads, prj-env.adb (Get_Runtime_Path): New function.
753
754 2011-12-12  Ed Falis  <falis@adacore.com>
755
756         * sysdep.c: Fix treatment of VxWorks task options so that run-times
757         built with __SPE__ get option VX_SPE_TASK while others get VX_FP_TASK.
758
759 2011-12-12  Bob Duff  <duff@adacore.com>
760
761         * sem_type.adb, sem_type.ads, sem_ch4.adb, treepr.adb, treepr.ads:
762         Minor cleanup and fiddling with debug printouts.
763
764 2011-12-12  Vincent Celier  <celier@adacore.com>
765
766         * prj-nmsc.adb (Get_Directories): For a non extending project,
767         always get a declared object and/or exec directory if it already
768         exists, even when there are no sources, but do not create them.
769
770 2011-12-12  Bob Duff  <duff@adacore.com>
771
772         * sem_res.adb (Resolve): Deal with the case where an abstract
773         operator is called with operands of type universal_integer.
774
775 2011-12-12  Thomas Quinot  <quinot@adacore.com>
776
777         * par_sco.adb: Minor fix to dominance marker referencing WHILE
778         decision.
779
780 2011-12-12  Tristan Gingold  <gingold@adacore.com>
781
782         * mlib-tgt-specific-xi.adb: (Get_Target_Prefix): Simplify code.
783
784 2011-12-12  Thomas Quinot  <quinot@adacore.com>
785
786         * par_sco.adb: Adjust dominant marker for branches of CASE
787         statements.
788
789 2011-12-12  Thomas Quinot  <quinot@adacore.com>
790
791         * gsocket.h, s-oscons-tmplt.c: Ensure we do not include any system
792         header file prior to redefining FD_SETSIZE.
793
794 2011-12-12  Ed Schonberg  <schonberg@adacore.com>
795
796         * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): In
797         a generic context the aspect expressions may not have been
798         preanalyzed if there was no previous freeze point, so the
799         expressions must be preanalyzed now, and there is no conformance
800         to check for visibility changes.
801
802 2011-12-12  Matthew Heaney  <heaney@adacore.com>
803
804         * a-convec.adb, a-coinve.adb, a-cobove.adb (Iterator): Use
805         subtype Index_Type'Base for Index component (Finalize): Remove
806         unnecessary access check (First, Last): Cursor return value
807         depends on iterator index value (Iterate): Use start position as
808         iterator index value (Next, Previous): Forward to corresponding
809         cursor-based operation.
810         * a-cborma.adb (Iterate): Properly initialize iterator object (with 0
811         as node index).
812
813 2011-12-12  Robert Dewar  <dewar@adacore.com>
814
815         * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting.
816
817 2011-12-12  Steve Baird  <baird@adacore.com>
818
819         * sem_ch3.adb (Check_Completion): Improve a comment.
820
821 2011-12-12  Tristan Gingold  <gingold@adacore.com>
822
823         * cstand.adb: Minor comment fix.
824
825 2011-12-11  Eric Botcazou  <ebotcazou@adacore.com>
826
827         * gcc-interface/utils2.c (gnat_build_constructor): Test the TREE_STATIC
828         flag of elements to compute that of the constructor.
829
830 2011-12-11  Eric Botcazou  <ebotcazou@adacore.com>
831
832         * gcc-interface/decl.c (gnat_to_gnu_param): Set the restrict qualifier
833         on references built for parameters which aren't specifically by-ref.
834
835 2011-12-11  Eric Botcazou  <ebotcazou@adacore.com>
836
837         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: If there is an
838         alignment set on a renaming, assert that the renamed object is aligned
839         enough as to make it possible to honor it.
840
841 2011-12-11  Eric Botcazou  <ebotcazou@adacore.com>
842
843         * gcc-interface/trans.c (gigi): Initialize the linemap earlier.
844
845 2011-12-06  Dave Korn  <dave.korn.cygwin@gmail.com>
846
847         * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS [windows targets]):
848         Correctly detect cygwin, which no longer has the '32' suffix, and use
849         appropriate implementations of the sockets and memory packages.
850         * sysdep.c (WIN_SETMODE): New define to choose the correct spelling of
851         setmode/_setmode for MinGW and Cygwin, respectively.
852         (__gnat_set_binary_mode [windows targets]): Use the above, and enable
853         the windows version for Cygwin as well as MinGW.
854         (__gnat_set_text_mode [windows targets]): Likewise.
855         (__gnat_ttyname [windows targets]): Provide a Cygwin implementation
856         in addition to the MinGW version.
857         (__gnat_is_windows_xp): Make available to Cygwin as well as MinGW.
858         (__gnat_get_stack_bounds): Likewise.
859
860 2011-12-05  Bob Duff  <duff@adacore.com>
861
862         * sem_ch4.adb: Minor comment fix.
863
864 2011-12-05  Robert Dewar  <dewar@adacore.com>
865
866         * gnat_ugn.texi: Add documentation for -gnatw.e.
867
868 2011-12-05  Bob Duff  <duff@adacore.com>
869
870         * treepr.adb (pn): Print something useful for
871         Elmt_Ids. Add Write_Eol to 'when others' case, so the output
872         will be seen immediately in gdb.
873
874 2011-12-05  Ed Schonberg  <schonberg@adacore.com>
875
876         * lib-writ.adb (Output_Main_Program_Line): A generic subprogram
877         is never a main program.
878
879 2011-12-05  Thomas Quinot  <quinot@adacore.com>
880
881         * par_sco.adb: Various minor adjustments to dominance markers
882         generation.
883
884 2011-12-05  Ed Schonberg  <schonberg@adacore.com>
885
886         * sem_ch6.adb (Analyze_Expression_Function): If the function is
887         a completion, generate a body reference for its defining entity,
888         before rewriting the node as a body.
889         * sem_util.adb (Defining_Entity): Add entry for expression
890         function.
891
892 2011-12-05  Bob Duff  <duff@adacore.com>
893
894         * sem_ch3.adb (Derive_Progenitor_Subprograms): Add Ultimate_Alias
895         to the Comes_From_Source check, to deal properly with the case
896         of indirect inheritance of "=".
897
898 2011-12-05  Thomas Quinot  <quinot@adacore.com>
899
900         PR ada/51307
901         * s-oscons-tmplt.c: On HP-UX, CLOCK_REALTIME is an enum literal,
902         not a macro.
903
904 2011-12-05  Thomas Quinot  <quinot@adacore.com>
905
906         * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Generate dominance
907         information in SCOs.
908
909 2011-12-02  Eric Botcazou  <ebotcazou@adacore.com>
910             Thomas Quinot <quinot@adacore.com>
911
912         * gcc-interface/Makefile.in (INCLUDES): Remove $(srcdir)/config.
913         (INCLUDES_FOR_SUBDIR): Add $(fsrcdir) except for VxWorks.
914         Add thread.c to LIBGNAT_SRCS so that a symlink is created in ada/rts,
915         which allows the file to be installed in adainclude.
916         * gcc-interface/Make-lang.in: Update dependencies.
917
918 2011-12-02  Javier Miranda  <miranda@adacore.com>
919
920         * sem_ch3.adb (Constrain_Access): Undo previous
921         patch for this routine. Required since the RM rule 3.7.1(7/3)
922         applies to all access types.
923
924 2011-12-02  Bob Duff  <duff@adacore.com>
925
926         * sem_ch6.adb: Minor comment fix.
927
928 2011-12-02  Joel Sherrill <joel.sherrill@oarcorp.com>
929
930         * s-tpopsp-rtems.adb: Use ATCB_Key rather than RTEMS_Ada_Self variable
931         for consistency with other ports.
932         * s-osinte-rtems.adb: Add body for dummy implementation of
933         pthread_rwlockattr_setkind_np().
934         * s-osinte-rtems.ads: Add missing clock and rwlock bindings.
935         * terminals.c: Add __rtems__ conditionals to account for differences
936         in termios implementation.
937
938 2011-12-02  Robert Dewar  <dewar@adacore.com>
939
940         * sem_ch3.adb, sem_attr.adb, a-comutr.adb, a-cbmutr.adb,
941         a-cbmutr.ads: Minor reformatting.
942
943 2011-12-02  Hristian Kirtchev  <kirtchev@adacore.com>
944
945         * exp_dbug.adb: Comment reformatting.
946         (Get_External_Name): Use Reset_Buffers to reset the contents of
947         Name_Buffer and Homonym_Numbers.
948         (Qualify_All_Entity_Names): Reset the contents of Name_Buffer and
949         Homonym_Numbers before creating a new qualified name for a particular
950         entity.
951         (Reset_Buffers): New routine.
952
953 2011-12-02  Matthew Heaney  <heaney@adacore.com>
954
955         * a-cbmutr.ads (No_Node): Moved declaration from body to spec
956         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Iterator): Derives
957         from Root_Iterator.
958         (Child_Iterator): Derives from Root_Iterator.
959         (Finalize): Implemented as an override operation for Root_Iterator.
960         (First): Return value depends on Subtree component.
961         (Last): Component was renamed from Parent to Subtree.
962         (Next): Checks parameter value, and uses simplified loop.
963         (Iterate): Forwards to Iterate_Subtree.
964         (Iterate_Children): Component was renamed from Parent to Subtree.
965         (Iterate_Subtree): Checks parameter value
966
967 2011-12-02  Robert Dewar  <dewar@adacore.com>
968
969         * usage.adb: Add lines for -gnatw.n and -gnatw.N
970         (atomic sync info msgs).
971
972 2011-12-02  Steve Baird  <baird@adacore.com>
973
974         * sem_ch3.adb (Check_Completion): An Ada 2012
975         generic formal type doesn't require a completion.
976
977 2011-12-02  Eric Botcazou  <ebotcazou@adacore.com>
978
979         * sem_util.adb (Set_Debug_Info_Needed): Also set the flag on the
980         packed array type if it is to be set on the array type used to
981         represent it.
982
983 2011-12-02  Robert Dewar  <dewar@adacore.com>
984
985         * gnat_rm.texi: Eliminate confusing use of type name.
986
987 2011-12-02  Thomas Quinot  <quinot@adacore.com>
988
989         * sem_ch10.adb (Analyze_Compilation_Unit): For a library subprogram
990         body that acts as spec, do not create a shallow copy of the context
991         clause for the synthetized spec (instead, use the same list as
992         in the body).
993
994 2011-12-02  Bob Duff  <duff@adacore.com>
995
996         * gnat_ugn.texi: Clarify usage of -p binder switch.
997
998 2011-12-02  Javier Miranda  <miranda@adacore.com>
999
1000         * sem_util.ads, sem_util.adb, sem_aux.ads, sem_aux.adb
1001         (Effectively_Has_Constrained_Partial_View): Moved to sem_aux
1002         (In_Generic_Body): Moved to sem_aux.
1003         (Unit_Declaration_Node): Moved to sem_aux.
1004         * einfo.ads (Effectively_Has_Constrained_Partial_View): Complete
1005         documentation.
1006         * exp_attr.adb, live.adb, sem_ch10.adb, checks.adb, sem.adb,
1007         rtsfind.adb, sem_attr.adb, sem_elab.adb, exp_ch4.adb, sem_ch4.adb,
1008         exp_ch13.adb: Add with-clause on Sem_Aux.
1009
1010 2011-12-02  Yannick Moy  <moy@adacore.com>
1011
1012         * sem_util.adb (Unique_Name): Reach through Unique_Entity to
1013         get the name of the entity.
1014         (Unique_Entity): Correct case for subprogram stubs.
1015
1016 2011-12-02  Yannick Moy  <moy@adacore.com>
1017
1018         * sem_ch3.adb (Check_Initialization): Do not emit warning on
1019         initialization of limited type object in Alfa mode.
1020
1021 2011-12-02  Robert Dewar  <dewar@adacore.com>
1022
1023         * sinfo.ads: Minor reformatting.
1024         * gnat_ugn.texi: Fix confusion in use of term "type name".
1025
1026 2011-12-02  Robert Dewar  <dewar@adacore.com>
1027
1028         * sem_ch6.adb: Minor change in error message.
1029
1030 2011-12-02  Robert Dewar  <dewar@adacore.com>
1031
1032         * sem_ch9.adb, prj-part.adb, vms_data.ads, sem_ch8.adb: Minor
1033         reformatting.
1034
1035 2011-12-02  Javier Miranda  <miranda@adacore.com>
1036
1037         * sem_ch3.adb (Constrain_Access): Enable on Ada 2005 mode the
1038         static check of the rule of general access types whose designated
1039         type has discriminants.
1040         * sem_util.ads, sem_util.adb
1041         (Effectively_Has_Constrained_Partial_View): New subprogram.
1042         (In_Generic_Body): New subprogram.
1043         * einfo.ads (Has_Constrained_Partial_View): Adding documentation.
1044         * sem_prag.adb (Inside_Generic_Body): Removed. Replaced by new
1045         subprogram In_Generic_Body.
1046         * exp_attr.adb, checks.adb, sem_attr.adb, exp_ch4.adb,
1047         sem_ch4.adb: In addition, this patch replaces the occurrences of
1048         Has_Constrained_Partial_View by
1049         Effectively_Has_Constrained_Partial_View.
1050
1051 2011-12-02  Matthew Heaney  <heaney@adacore.com>
1052
1053         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Iterator): Rename
1054         Position component.
1055         (Finalize): Remove unnecessary access check.
1056         (First): Forward to First_Child.
1057         (Last): Forward to Last_Child.
1058         (Iterate): Check preconditions for parent node parameter.
1059         (Next): Forward to Next_Sibling.
1060         (Previous): Forward to Previous_Sibling.
1061
1062 2011-12-02  Robert Dewar  <dewar@adacore.com>
1063
1064         * a-coinve.adb, a-coorma.adb, freeze.adb, a-coorse.adb, a-comutr.adb,
1065         a-coormu.adb, a-convec.adb: Minor reformatting.
1066
1067 2011-12-02  Matthew Heaney  <heaney@adacore.com>
1068
1069         * a-coormu.ads, a-ciormu.ads: Declare iterator factory function.
1070         * a-ciormu.adb, a-ciormu.adb (Iterator): Declare concrete
1071         Iterator type.
1072         (Finalize): Decrement busy counter.
1073         (First, Last): Cursor return value depends on iterator node value.
1074         (Iterate): Use start position as iterator node value.
1075         (Next, Previous): Forward to corresponding cursor-based operation.
1076
1077 2011-12-02  Robert Dewar  <dewar@adacore.com>
1078
1079         * a-cborma.adb, a-cbhama.adb, a-cbdlli.adb, a-cbmutr.adb,
1080         a-cbhase.adb, a-cdlili.adb, a-cihama.adb, a-ciorse.adb, a-cidlli.adb,
1081         a-cimutr.adb, a-cihase.adb, a-cohama.adb, a-cborse.adb,
1082         a-ciorma.adb, a-cobove.adb: Minor reformatting.
1083
1084 2011-12-01  Jakub Jelinek  <jakub@redhat.com>
1085
1086         PR bootstrap/51201
1087         * gcc-interface/Make-lang.in: Initialize RTS_DIR with = instead of :=.
1088
1089 2011-11-24  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1090
1091         * s-taprop-tru64.adb (Create_Task): Use Unrestricted_Access.
1092
1093 2011-11-23  Thomas Quinot  <quinot@adacore.com>
1094
1095         * thread.c, s-oscons-tmplt.c: Generate __gnat_pthread_condattr_setup
1096         only on platforms where this is required, as determined by
1097         s-oscons.h.
1098
1099 2011-11-23  Ed Schonberg  <schonberg@adacore.com>
1100
1101         * sem_ch9.adb: No check on entry index if error on index.
1102
1103 2011-11-23  Gary Dismukes  <dismukes@adacore.com>
1104
1105         * sem_ch6.adb (Analyze_Return_Statement): Improve error messages for
1106         return statements nested inside an extended_return_statement.
1107         * gcc-interface/Make-lang.in: Update dependencies.
1108         * gcc-interface/Makefile.in (MISCLIB): Add -lutil for BSD targets.
1109
1110 2011-11-23  Ed Schonberg  <schonberg@adacore.com>
1111
1112         * freeze.adb (Freeze_All_Ent): An incomplete type is not
1113         frozen by a subprogram body that does not come from source.
1114
1115 2011-11-23  Pascal Obry  <obry@adacore.com>
1116
1117         * s-oscons-tmplt.c: Add PTY_Library constant. It contains
1118         the library for pseudo terminal support.
1119         * g-exptty.ads: Add pseudo-terminal library into a Linker_Options
1120         pragma.
1121
1122 2011-11-23  Ed Schonberg  <schonberg@adacore.com>
1123
1124         * sem_ch9.adb: No check on entry family index if generic.
1125
1126 2011-11-23  Thomas Quinot  <quinot@adacore.com>
1127
1128         * sem_ch9.adb, s-taprop.ads, s-taprop-hpux-dce.adb, s-taprop-irix.adb,
1129         s-taprop-posix.adb, s-taprop-rtx.adb, s-taprop-solaris.adb,
1130         s-taprop-tru64.adb, s-taprop-vxworks.adb: Move dependency on
1131         System.OS_Constants from shared spec of
1132         System.Tasking.Primitive_Operations to the specific body variants
1133         that really require this dependency.
1134
1135 2011-11-23  Ed Schonberg  <schonberg@adacore.com>
1136
1137         * sem_ch8.adb (Analyze_Subprogram_Renaming_Declaration):
1138         If the declaration has aspects, analyze them so they can be
1139         properly rejected.
1140
1141 2011-11-23  Hristian Kirtchev  <kirtchev@adacore.com>
1142
1143         * a-comutr.adb, a-coorma.adb, a-coorse.adb, a-convec.adb, a-cihase.adb,
1144         a-cimutr.adb, a-coinve.adb, a-ciorma.adb, a-ciorse.adb, a-cobove.adb,
1145         a-cohama.adb, a-cihama.adb, a-cidlli.adb, a-cdlili.adb, a-cbhama.adb,
1146         a-cbhase.adb, a-cbmutr.adb, a-cborma.adb, a-cborse.adb, a-cbdlli.adb:
1147         Add with and use clause for Ada.Finalization. Type
1148         Iterator and Child_Iterator are now derived from Limited_Controlled.
1149         (Finalize): New routine.
1150         (Iterate): Add a renaming of counter Busy and
1151         increment it. Update the return aggregate.
1152         (Iterate_Children): Add a renaming of
1153         counter Busy and increment it. Update the return aggregate.
1154         (Iterate_Subtree): Add a renaming of counter Busy and increment
1155         it. Update the return aggregate.
1156         * a-cdlili.ads, a-cidlli.ads: Type List_Access is now a general access
1157         type.
1158         * a-cihama.ads: Type Map_Access is now a general access type.
1159         * a-comutr.ads, a-cimutr.ads: Use type Natural for the two locks
1160         associated with the tree.
1161         * a-cohama.ads: Type Map_Access is now a general access type.
1162         * a-coinve.ads, a-convec.ads: Type Vector_Access is now a general
1163         access type.
1164         * exp_ch5.adb (Expand_Iterator_Loop): Do not create a block
1165         to wrap the loop as this is done at an earlier step, during
1166         analysis. The declarations of the iterator and the cursor use
1167         the usual Insert_Action mechanism when added into the tree.
1168         * sem_ch5.adb (Analyze_Loop_Statement): Remove local constant
1169         Loop_Statement and replace all respective uses by N. Add local
1170         constant Loc. Preanalyze the loop iterator to discover whether
1171         it is a container iterator and if it is, wrap the loop in a
1172         block. This ensures that any controlled temporaries produced
1173         by the iteration scheme share the same lifetime of the loop.
1174         (Is_Container_Iterator): New routine.
1175         (Is_Wrapped_In_Block): New routine.
1176         (Pre_Analyze_Range): Move spec and body to the library level.
1177
1178 2011-11-23  Sergey Rybin  <rybin@adacore.com frybin>
1179
1180         * gnat_ugn.texi, vms_data.ads: Add documentation for new gnatpp option
1181         that controls casing of type and subtype names.
1182
1183 2011-11-23  Yannick Moy  <moy@adacore.com>
1184
1185         * sem_ch3.adb: Minor addition of comments.
1186
1187 2011-11-23  Thomas Quinot  <quinot@adacore.com>
1188
1189         * prj-part.adb (Extension_Withs): New global variable,
1190         contains the head of the list of WITH clauses from the EXTENDS
1191         ALL projects for which virtual packages are being created.
1192         (Look_For_Virtual_Projects_For): When recursing through
1193         an EXTENDS ALL, add the WITH clauses of the extending
1194         project to Extension_Withs.  When adding a project to the
1195         Virtual_Hash, record the associated Extension_Withs list.
1196         (Create_Virtual_Extending_Project): Add a copy of the appropriate
1197         Extension_Withs to the virtual project.
1198
1199 2011-11-23  Thomas Quinot  <quinot@adacore.com>
1200
1201         * mlib-tgt-specific-vxworks.adb: Minor reformatting.
1202
1203 2011-11-23  Thomas Quinot  <quinot@adacore.com>
1204
1205         * Make-generated.in (Sdefault.Target_Name): Set to
1206         $(target_noncanonical) instead of $(target) for consistency.
1207
1208 2011-11-23  Matthew Heaney  <heaney@adacore.com>
1209
1210         * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb (Iterator): Declared
1211         Iterator type as limited (First, Last): Cursor return value
1212         depends on iterator node value (Iterate): Use start position as
1213         iterator node value (Next, Previous): Forward to corresponding
1214         cursor-based operation.
1215
1216 2011-11-23  Matthew Heaney  <heaney@adacore.com>
1217
1218         * a-coorse.ads, a-ciorse.ads, a-cborse.ads (Set_Iterator_Interfaces):
1219         Renamed from Ordered_Set_Iterator_Interfaces.
1220         * a-coorse.adb, a-ciorse.adb, a-cborse.adb (Iterator): Declared
1221         Iterator type as limited (First, Last): Cursor return value
1222         depends on iterator node value (Iterate): Use start position as
1223         iterator node value (Next, Previous): Forward to corresponding
1224         cursor-based operation.
1225         * a-cohase.ads, a-cohase.adb: Implemented forward iterator.
1226         * a-cihase.adb, a-cbhase.adb (Iterator): Removed unnecessary
1227         node component (First, Next): Forward call to corresponding
1228         cursor-based operation (Iterate): Representation of iterator no
1229         longer has node component
1230
1231 2011-11-23  Hristian Kirtchev  <kirtchev@adacore.com>
1232
1233         * exp_intr.adb (Expand_Unc_Deallocation): Ensure that the
1234         dereference has a proper type before the side effect removal
1235         mechanism kicks in.
1236         * sem_ch3.adb (Analyze_Subtype_Declaration): Handle a rare case
1237         where the base type of the subtype is a private itype created
1238         to act as the partial view of a constrained record type. This
1239         scenario manifests with equivalent class-wide types for records
1240         with unknown discriminants.
1241
1242 2011-11-23  Jerome Guitton  <guitton@adacore.com>
1243
1244         * s-osprim-vxworks.adb (Clock): Use Clock_RT_Ada.
1245
1246 2011-11-23  Thomas Quinot  <quinot@adacore.com>
1247
1248         * s-oscons-tmplt.c: Fix unbalanced preprocessor directives Minor
1249         reformatting/reorganization.
1250
1251 2011-11-23  Thomas Quinot  <quinot@adacore.com>
1252
1253         * g-htable.ads: Remove old comments.
1254
1255 2011-11-23  Thomas Quinot  <quinot@adacore.com>
1256
1257         * exp_imgv.adb: Minor reformatting.
1258
1259 2011-11-23  Robert Dewar  <dewar@adacore.com>
1260
1261         * sem_ch9.adb (Analyze_Entry_Declaration): Check for entry
1262         family bounds out of range.
1263
1264 2011-11-23  Matthew Heaney  <heaney@adacore.com>
1265
1266         * a-cohama.adb, a-cihama.adb, a-cbhama.adb (Iterator): Declare
1267         type as limited, and remove node component.
1268         (First, Next): Forward call to corresponding cursor-based operation.
1269         (Iterate): Representation of iterator no longer has node component.
1270
1271 2011-11-23  Yannick Moy  <moy@adacore.com>
1272
1273         * exp_util.adb: Revert previous change to remove side-effects in Alfa
1274         mode, which is not the correct thing to do for renamings.
1275
1276 2011-11-23  Thomas Quinot  <quinot@adacore.com>
1277
1278         * s-osinte-hpux.ads, s-taprop-vxworks.adb, s-taprop-tru64.adb,
1279         s-osinte-vxworks.ads, s-osinte-aix.ads, s-osinte-lynxos.ads,
1280         s-osinte-solaris-posix.ads, s-taprop-solaris.adb, a-exetim-posix.adb,
1281         s-osinte-irix.ads, s-osinte-solaris.ads, s-oscons-tmplt.c,
1282         s-taprop-irix.adb, s-osinte-hpux-dce.ads, Makefile.rtl,
1283         s-osinte-tru64.ads, s-osinte-darwin.ads, s-taprop.ads,
1284         s-osinte-freebsd.ads, s-osinte-lynxos-3.ads, s-taprop-hpux-dce.adb,
1285         s-taprop-posix.adb: Remove hard-coded clock ids;
1286         instead, generate them in System.OS_Constants.
1287         (System.OS_Constants.CLOCK_RT_Ada): New constant denoting the
1288         id of the clock providing Ada.Real_Time.Monotonic_Clock.
1289         * thread.c: New file.
1290         (__gnat_pthread_condattr_setup): New function. For platforms where
1291         CLOCK_RT_Ada is not CLOCK_REALTIME, set appropriate condition
1292         variable attribute.
1293
1294 2011-11-23  Yannick Moy  <moy@adacore.com>
1295
1296         * sem_ch3.adb: Restore the use of Expander_Active instead of
1297         Full_Expander_Active, so that the evaluation is forced in Alfa
1298         mode too. Otherwise, we end up with an unexpected insertion in a
1299         place where it is not supposed to happen, on default parameters
1300         of a call.
1301
1302 2011-11-23  Thomas Quinot  <quinot@adacore.com>
1303
1304         * prj-pp.adb, prj-pp.ads: Minor new addition: wrapper procedure "wpr"
1305         for Pretty_Print, for use from within gdb.
1306
1307 2011-11-23  Ed Schonberg  <schonberg@adacore.com>
1308
1309         * exp_ch5.adb (Expand_Iterator_Loop): Wrap the expanded loop
1310         and the cursor declarations in a block, so that the loop variable
1311         is local to the construct.
1312
1313 2011-11-23  Matthew Heaney  <heaney@adacore.com>
1314
1315         * a-coorma.ads, a-ciorma.ads, a-cborma.ads (Iterate): Returns
1316         type Reversible_Iterator'Class.
1317         * a-coorma.adb, a-ciorma.adb, a-cborma.adb (Iterator):
1318         Declare type as limited.
1319         (First, Last): Return value depends on iterator's start node value.
1320         (Next, Previous): Call corresponding Cursor-based operation.
1321         (Iterate): Indicate whether complete or partial iteration
1322
1323 2011-11-23  Robert Dewar  <dewar@adacore.com>
1324
1325         * errout.adb: Minor reformattin (Finalize): Take templates into
1326         account for warning suppression.
1327         * errout.ads (Set_Specific_Warning_Off): Add Used parameter.
1328         * erroutc.adb: Minor reformatting (Finalize): Take generic
1329         templates into account for warning suppress.
1330         * erroutc.ads (Set_Specific_Warning_Off): Add Used parameter.
1331         * sem_prag.adb: Minor reformatting (Analyze_Pragma,
1332         case Warnings): Provide Used parameter in call to
1333         Set_Specific_Warnings_Off (to deal with generic template case).
1334
1335 2011-11-23  Pascal Obry  <obry@adacore.com>
1336
1337         * sem_prag.adb (Process_Convention): Better error message for
1338         stdcall convention on dispatching calls.
1339
1340 2011-11-23  Gary Dismukes  <dismukes@adacore.com>
1341
1342         * sem_ch4.adb, sem_ch13.adb: Minor reformatting.
1343
1344 2011-11-23  Javier Miranda  <miranda@adacore.com>
1345
1346         * exp_ch6.adb (Expand_Simple_Function_Return): Add missing
1347         implicit type conversion when the returned object is allocated
1348         in the secondary stack and the type of the returned object is
1349         an interface. Done to force generation of displacement of the
1350         "this" pointer.
1351
1352 2011-11-23  Pascal Obry  <obry@adacore.com>
1353
1354         * impunit.adb: Add g-exptty and g-tty units.
1355
1356 2011-11-23  Robert Dewar  <dewar@adacore.com>
1357
1358         * exp_imgv.adb: Minor code reorganization (use Make_Temporary).
1359
1360 2011-11-23  Robert Dewar  <dewar@adacore.com>
1361
1362         * exp_util.adb, par-ch6.adb, sem_res.adb, par-util.adb: Minor
1363         reformatting.
1364
1365 2011-11-23  Yannick Moy  <moy@adacore.com>
1366
1367         * sem_ch13.adb (Analyze_Aspect_Specifications): Place error on
1368         line of precondition/ postcondition/invariant.
1369
1370 2011-11-23  Pascal Obry  <obry@adacore.com>
1371
1372         * g-exptty.ads, g-exptty.adb, g-tty.ads, g-tty.adb,
1373         terminals.c: New files.
1374         Makefile.rtl: Add these new files.
1375         * gnat_rm.texi: Add documentation for GNAT.Expect.TTY.
1376         * gcc-interface/Makefile.in: Add g-exptty, g-tty, terminals.o
1377         * gcc-interface/Make-lang.in: Update dependencies.
1378
1379 2011-11-21  Robert Dewar  <dewar@adacore.com>
1380
1381         * exp_imgv.adb (Expand_Width_Attribute): Handle case of Discard_Names.
1382         * sem_attr.adb (Eval_Attribute, case Width): Ditto.
1383
1384 2011-11-21  Thomas Quinot  <quinot@adacore.com>
1385
1386         * sinfo.ads: Minor reformatting.
1387
1388 2011-11-21  Yannick Moy  <moy@adacore.com>
1389
1390         * exp_util.adb: Minor reformatting. Update comments.
1391
1392 2011-11-21  Robert Dewar  <dewar@adacore.com>
1393
1394         * exp_prag.adb, exp_util.adb, sinfo.ads, sem_res.adb, s-stposu.adb,
1395         sem_attr.adb, s-stposu.ads, s-taprop-solaris.adb, s-taprop-irix.adb,
1396         sem_ch6.adb: Minor reformatting.
1397
1398 2011-11-21  Arnaud Charlet  <charlet@adacore.com>
1399
1400         * s-taprop-irix.adb, s-taprop-solaris.adb (Create_Task): Use
1401         Unrestricted_Access to deal with fact that we properly detect the
1402         error if Access is used.
1403         * gcc-interface/Make-lang.in: Update dependencies.
1404
1405 2011-11-21  Yannick Moy  <moy@adacore.com>
1406
1407         * exp_prag.adb (Expand_Pragma_Check): Place error on first character
1408         of expression.
1409         * sem_res.adb (Resolve_Short_Circuit): Place error on first
1410         character of expression.
1411
1412 2011-11-21  Yannick Moy  <moy@adacore.com>
1413
1414         * exp_util.adb (Remove_Side_Effects): Do nothing in Alfa mode.
1415
1416 2011-11-21  Hristian Kirtchev  <kirtchev@adacore.com>
1417
1418         * exp_attr.adb (Expand_N_Attribute_Reference, case
1419         Max_Size_In_Storage_Elements): Account for the size of the
1420         hidden list header which precedes controlled objects allocated
1421         on the heap.
1422         * rtsfind.ads: Add RE_Header_Size_With_Padding to the runtime
1423         tables.
1424         * sinfo.adb (Header_Size_Added): New routine.
1425         (Set_Header_Size_Added): New routine.
1426         * sinfo.ads: Add flag Controlled_Header_Added along with
1427         associated comment.
1428         (Header_Size_Added): New inlined routine.
1429         (Set_Header_Size_Added): New inlined routine.
1430         * s-stposu.adb (Allocate_Any_Controlled): Use
1431         Header_Size_With_Padding to calculate the proper
1432         size of the header.
1433         (Deallocate_Any_Controlled): Use
1434         Header_Size_With_Padding to calculate the proper size
1435         of the header.  (Header_Size_With_Padding): New routine.
1436         (Nearest_Multiple_Rounded_Up): Removed along with its uses.
1437         * s-stposu.ads (Header_Size_With_Padding): New routine.
1438
1439 2011-11-21  Ed Schonberg  <schonberg@adacore.com>
1440
1441         * aspects.adb: Aspect specifications are allowed on renaming
1442         declarations
1443         * par-ch6.adb (P_Subprogram): Parse aspect specifications in a
1444         subprogram renaming declaration
1445
1446 2011-11-21  Tristan Gingold  <gingold@adacore.com>
1447
1448         * env.c: Remove unused declaration.
1449
1450 2011-11-21  Pascal Obry  <obry@adacore.com>
1451
1452         * s-os_lib.ads: Minor style fix.
1453
1454 2011-11-21  Pascal Obry  <obry@adacore.com>
1455
1456         * adaint.c (__gnat_dup2): When fd are stdout, stdin or stderr and
1457         identical, do nothing on Windows XP.
1458
1459 2011-11-21  Yannick Moy  <moy@adacore.com>
1460
1461         * sem_ch3.adb (Constrain_Index, Process_Range_Expr_In_Decl):
1462         Use Full_Expander_Active instead of Expander_Active to control
1463         the forced evaluation of expressions for the sake of generating
1464         checks.
1465
1466 2011-11-21  Thomas Quinot  <quinot@adacore.com>
1467
1468         * init.c: On FreeBSD, stack checking failures may raise SIGBUS.
1469
1470 2011-11-21  Tristan Gingold  <gingold@adacore.com>
1471
1472         * sysdep.c (mode_read_text, mode_write_text, mode_append_text,
1473         mode_read_binary, mode_write_binary, mode_append_binary,
1474         mode_read_text_plus, mode_write_text_plus, mode_append_text_plus,
1475         mode_read_binary_plus, mode_write_binary_plus,
1476         mode_append_binary_plus): Remove unused declarations.
1477
1478 2011-11-21  Yannick Moy  <moy@adacore.com>
1479
1480         * gnat_rm.texi: Minor rewording.
1481
1482 2011-11-21  Hristian Kirtchev  <kirtchev@adacore.com>
1483
1484         * exp_imgv.adb (Expand_Width_Attribute): Emit
1485         an error message rather than a warning when pragma Discard_Names
1486         prevents the computation of 'Width. Do not emit an error through
1487         the use of RE_Null.
1488
1489 2011-11-21  Javier Miranda  <miranda@adacore.com>
1490
1491         * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add
1492         implicit type conversion when the type of the allocator is an
1493         interface. Done to force generation of displacement of the "this"
1494         pointer when required.
1495
1496 2011-11-21  Ed Schonberg  <schonberg@adacore.com>
1497
1498         * sinfo.ads, sinfo.adb: Corresponding_Spec applies to expression
1499         functions, and is set when the expression is a completion of a
1500         previous declaration.
1501         * sem_ch6.adb (Analyze_Expression_Function): To determine properly
1502         whether an expression function completes a previous declaration,
1503         use Find_Corresponding_Spec, as when analyzing a subprogram body.
1504
1505 2011-11-21  Steve Baird  <baird@adacore.com>
1506
1507         * sem_util.adb (Deepest_Type_Access_Level): Improve comment.
1508         (Type_Access_Level): Improve comment.
1509
1510 2011-11-21  Eric Botcazou  <ebotcazou@adacore.com>
1511
1512         * gcc-interface/Makefile.in (INCLUDES_FOR_SUBDIR): Add $(fsrcdir) by
1513         means of -iquote unconditionally.
1514
1515 2011-11-21  Robert Dewar  <dewar@adacore.com>
1516
1517         * sem_ch3.adb, sem_util.adb, sem_res.adb, sem_attr.adb: Minor
1518         reformatting.
1519
1520 2011-11-21  Arnaud Charlet  <charlet@adacore.com>
1521
1522         * s-taprop-posix.adb (Create_Task): Use Unrestricted_Access
1523         to deal with fact that we properly detect the error if Access
1524         is used.
1525
1526 2011-11-21  Steve Baird  <baird@adacore.com>
1527
1528         * sem_util.ads: Update comment describing function
1529         Deepest_Access_Level.
1530         * sem_util.adb (Deepest_Type_Access_Level): Return Int'Last for a
1531         generic formal type.
1532         (Type_Access_Level): Return library level
1533         for a generic formal type.
1534         * sem_attr.adb (Resolve_Attribute): Replace two Type_Access_Level
1535         calls with calls to Deepest_Type_Access_Level.
1536         * sem_ch3.adb (Analyze_Component_Declaration): replace a
1537         Type_Access_Level call with a call to Deepest_Type_Access_Level.
1538         * sem_res.adb (Resolve_Allocator.Check_Allocator_Discrim_Accessibility):
1539         Replace three Type_Access_Level calls with calls to
1540         Deepest_Type_Access_Level.
1541         (Resolve_Allocator): Replace a Type_Access_Level call with a call to
1542         Deepest_Type_Access_Level.
1543         (Valid_Conversion.Valid_Array_Conversion): Replace a
1544         Type_Access_Level call with a call to Deepest_Type_Access_Level.
1545
1546 2011-11-21  Robert Dewar  <dewar@adacore.com>
1547
1548         * sem_ch3.adb, s-taprop-vms.adb, opt.ads: Minor reformatting.
1549
1550 2011-11-21  Robert Dewar  <dewar@adacore.com>
1551
1552         * sinput.ads: Minor comment fix.
1553
1554 2011-11-21  Robert Dewar  <dewar@adacore.com>
1555
1556         * exp_attr.adb (Expand_N_Attribute_Reference, case First_Bit,
1557         Last_Bit, Position): Handle 2005 case.
1558
1559 2011-11-21  Robert Dewar  <dewar@adacore.com>
1560
1561         * s-atocou-builtin.adb (Decrement): Use Unrestricted_Access
1562         to deal with fact that we properly detect the error if Access
1563         is used.
1564         (Increment): Same fix.
1565         * s-taprop-linux.adb (Create_Task): Use Unrestricted_Access
1566         to deal with fact that we properly detect the error if Access
1567         is used.
1568         * sem_util.adb (Is_Volatile_Object): Properly record that A.B is
1569         volatile if the B component is volatile. This affects the check
1570         for passing such a by reference volatile actual to a non-volatile
1571         formal (which should be illegal)
1572
1573 2011-11-21  Robert Dewar  <dewar@adacore.com>
1574
1575         * freeze.adb (Freeze_Enumeration_Type): Make sure to set both
1576         size and alignment for foreign convention enumeration types.
1577         * layout.adb (Set_Elem_Alignment): Redo setting of alignment
1578         when size is set.
1579
1580 2011-11-21  Yannick Moy  <moy@adacore.com>
1581
1582         * checks.adb (Apply_Access_Check, Apply_Arithmetic_Overflow_Check,
1583         Apply_Discriminant_Check, Apply_Divide_Check,
1584         Apply_Selected_Length_Checks, Apply_Selected_Range_Checks,
1585         Build_Discriminant_Checks, Insert_Range_Checks, Selected_Length_Checks,
1586         Selected_Range_Checks): Replace reference to Expander_Active
1587         with reference to Full_Expander_Active, so that expansion of
1588         checks is not performed in Alfa mode
1589
1590 2011-11-21  Tristan Gingold  <gingold@adacore.com>
1591
1592         * s-taprop-vms.adb (Create_Task): Use Unrestricted_Access to deal with
1593         fact that we properly detect the error if Access is used.
1594
1595 2011-11-21  Hristian Kirtchev  <kirtchev@adacore.com>
1596
1597         * par-ch4.adb (P_Quantified_Expression): Add an Ada 2012 check.
1598
1599 2011-11-21  Hristian Kirtchev  <kirtchev@adacore.com>
1600
1601         * exp_imgv.adb: Add with and use clause for Errout.
1602         (Expand_Width_Attribute): Emit a warning when in
1603         configurable run-time mode to provide a better diagnostic message.
1604
1605 2011-11-21  Hristian Kirtchev  <kirtchev@adacore.com>
1606
1607         * s-finmas.adb (Finalize): Add comment concerning double finalization.
1608
1609 2011-11-21  Ed Schonberg  <schonberg@adacore.com>
1610
1611         * sem_ch3.adb (Access_Definition): If the access definition
1612         is itself the return type of an access to function definition
1613         which is ultimately the return type of an access to subprogram
1614         declaration, its scope is the enclosing scope of the ultimate
1615         access to subprogram.
1616
1617 2011-11-21  Steve Baird  <baird@adacore.com>
1618
1619         * sem_res.adb (Valid_Conversion): If a conversion was legal
1620         in the body of a generic, then the corresponding conversion is
1621         legal in the expanded body of an instance of the generic.
1622
1623 2011-11-21  Robert Dewar  <dewar@adacore.com>
1624
1625         * sem_ch3.adb: Minor reformatting.
1626
1627 2011-11-21  Robert Dewar  <dewar@adacore.com>
1628
1629         * s-utf_32.adb (Is_UTF_32_Line_Terminator): Recognize NEL as
1630         line terminator.
1631         * sinput.ads: Add section on Handling of Source Line Terminators.
1632         * types.ads (Line_Terminator): Adjust comments.
1633
1634 2011-11-21  Robert Dewar  <dewar@adacore.com>
1635
1636         * frontend.adb (Frontend): Capture restrictions from config files
1637         * lib-load.adb (Load_Unit): Save/set/restore restriction pragma
1638         information
1639         * lib-xref.adb (Generate_Reference): Fix handling of obsolescent
1640         references. This was noticed during debugging, but it is not
1641         known if it causes real bugs.
1642         * restrict.ads, restrict.adb: New routines to save/set/restore
1643         non-partition-wide restrictions.
1644         * s-rident.ads: Comment changes for new handling of
1645         No_Elaboration_Code
1646         * sem.adb (Sem): Save/Set/Restore non-partition-wide restrictions
1647         * sem_ch10.adb (Analyze_Compilation_Unit): Remove incomplete
1648         attempt to save/restore non-partition-wide restrictions (now
1649         this work is all done in Sem).
1650         * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
1651         Special handling for restriction No_Elaboration_Code.
1652
1653 2011-11-21  Robert Dewar  <dewar@adacore.com>
1654
1655         * gnat_ugn.texi: Document new handling of restrictions pragmas.
1656
1657 2011-11-21  Pascal Obry  <obry@adacore.com>
1658
1659         * s-taprop-linux.adb (Initialize_Lock): Do not allocate a cond
1660         attribute as not needed.
1661
1662 2011-11-21  Robert Dewar  <dewar@adacore.com>
1663
1664         * sem_prag.adb: Minor reformatting.
1665
1666 2011-11-21  Pascal Obry  <obry@adacore.com>
1667
1668         * gnat_rm.texi: Document restriction for stdcall convention on
1669         dispatching calls.
1670
1671 2011-11-21  Pascal Obry  <obry@adacore.com>
1672
1673         * sem_prag.adb (Process_Convention): A dispatching call cannot
1674         have a stdcall calling convention.
1675
1676 2011-11-21  Pascal Obry  <obry@adacore.com>
1677
1678         * s-taprop-linux.adb (Initialize_Lock): Do not allocate a
1679         mutex attribute as not needed.
1680         (Initialize_TCB): Likewise.
1681         (Initialize): Likewise.
1682
1683 2011-11-21  Robert Dewar  <dewar@adacore.com>
1684
1685         * sem_ch6.adb (Is_Public_Subprogram_For): New procedure
1686         (Process_PPCs): Invariants only apply to public subprograms.
1687
1688 2011-11-21  Robert Dewar  <dewar@adacore.com>
1689
1690         * sem_util.adb, sem_util.ads, sem_attr.adb, restrict.adb,
1691         restrict.ads: Fix for No_Implicit_Aliasing in the renames case.
1692
1693 2011-11-21  Robert Dewar  <dewar@adacore.com>
1694
1695         * a-finali.ads: Use pragma Pure_12 for this unit
1696         * aspects.adb: Add aspect Pure_12
1697         * aspects.ads: Add aspect Pure_12
1698         * opt.ads: Add note on Pure_12
1699         * par-prag.adb: Add dummy entry for Pure_12
1700         * sem_prag.adb: Implement Pure_12 pragma
1701         * snames.ads-tmpl: Add Entry for Pure_12
1702
1703 2011-11-21  Sergey Rybin  <rybin@adacore.com frybin>
1704
1705         * vms_data.ads: Add qualifiers for new gnatpp options
1706         '--call_threshold' and '--par_threshold".
1707         * gnat_ugn.texi: Add description for new gnatpp options
1708         '--call_threshold' and '--par_threshold".
1709
1710 2011-11-21  Robert Dewar  <dewar@adacore.com>
1711
1712         * lib.ads: Minor reformatting.
1713
1714 2011-11-21  Robert Dewar  <dewar@adacore.com>
1715
1716         * lib-load.ads: Add comment.
1717
1718 2011-11-21  Gary Dismukes  <dismukes@adacore.com>
1719
1720         * sem_elab.adb: Minor reformatting
1721
1722 2011-11-21  Robert Dewar  <dewar@adacore.com>
1723
1724         * exp_ch6.adb: Minor reformatting.
1725
1726 2011-11-21  Ed Schonberg  <schonberg@adacore.com>
1727
1728         * sem_ch12.adb (Check_Formal_Package_Instance): If a formal
1729         subprogram of the formal package is covered by an others
1730         association with a box initialization, no check is needed
1731         against the actual in the instantiation of the formal package.
1732
1733 2011-11-21  Robert Dewar  <dewar@adacore.com>
1734
1735         * sem_elab.adb (Check_Internal_Call_Continue): Suppress junk
1736         elab warning from within precondition/postcondition etc.
1737
1738 2011-11-21  Ed Schonberg  <schonberg@adacore.com>
1739
1740         * exp_ch6.adb (Expand_Actuals): In Ada 2012, a function call
1741         with out parameters may generate assignments to force constraint
1742         checks. These checks must be properly placed in the code after the
1743         declaration or statement that contains the call.
1744
1745 2011-11-21  Fedor Rybin  <frybin@adacore.com>
1746
1747         * gnat_ugn.texi: Adding info on current gnattest limitations an
1748         support of -X option.
1749
1750 2011-11-21  Robert Dewar  <dewar@adacore.com>
1751
1752         * a-cfdlli.adb, a-cbdlli.adb: Minor reformatting.
1753
1754 2011-11-20  Robert Dewar  <dewar@adacore.com>
1755
1756         * exp_ch6.adb, exp_util.adb: Minor reformatting
1757
1758 2011-11-20  Eric Botcazou  <ebotcazou@adacore.com>
1759
1760         * sinfo.ads (Reference): Document that it is OK to set
1761         Is_Known_Non_Null on a temporary initialized to a N_Reference
1762         node.
1763
1764 2011-11-20  Matthew Heaney  <heaney@adacore.com>
1765
1766         * a-cbdlli.adb, a-cfdlli.adb (Move): Set Last component to 0
1767         for Source list.
1768
1769 2011-11-20  Eric Botcazou  <ebotcazou@adacore.com>
1770
1771         * exp_ch6.adb (Make_Build_In_Place_Call_In_Assignment):
1772         Declare NEW_EXPR local variable and attach the
1773         temporary to it.  Set Is_Known_Non_Null on the temporary.
1774         (Make_Build_In_Place_Call_In_Object_Declaration): Likewise.
1775         * exp_util.adb (Remove_Side_Effects): Set Is_Known_Non_Null on
1776         the temporary created to hold the 'Reference of the expression,
1777         if any.
1778         * checks.adb (Install_Null_Excluding_Check): Bail out for the
1779         Get_Current_Excep.all.all idiom generated by the expander.
1780
1781 2011-11-20  Eric Botcazou  <ebotcazou@adacore.com>
1782
1783         * gcc-interface/trans.c (struct language_function): Add GNAT_RET.
1784         (f_gnat_ret): New macro.
1785         (struct nrv_data): Add GNAT_RET.
1786         (finalize_nrv_unc_r): New helper function.
1787         (finalize_nrv): Add GNAT_RET parameter.  Copy it into DATA.  If the
1788         function returns unconstrained, use finalize_nrv_unc_r as callback.
1789         (return_value_ok_for_nrv_p): Test the alignment of RET_OBJ only if
1790         RET_OBJ is non-null.
1791         (Subprogram_Body_to_gnu): Pass GNAT_RET to finalize_nrv.
1792         (gnat_to_gnu) <N_Return_Statement>: In the return-unconstrained case,
1793         if optimization is enabled, record candidates for the Named Return
1794         Value optimization.
1795
1796 2011-11-20  Eric Botcazou  <ebotcazou@adacore.com>
1797
1798         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Add comment.
1799         (gnat_to_gnu) <N_Return_Statement>: Add 'else' to avoid doing a useless
1800         test.  Tweak default case.
1801         <N_Goto_Statement>: Use better formatting.
1802         * gcc-interface/utils2.c (maybe_wrap_malloc): Use INIT_EXPR instead of
1803         MODIFY_EXPR to initialize the storage.
1804         (build_allocator): Likewise.
1805
1806 2011-11-20  Eric Botcazou  <ebotcazou@adacore.com>
1807
1808         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Adjust
1809         call to components_to_record.
1810         (components_to_record): Add FIRST_FREE_POS parameter.  For the variant
1811         part, reuse enclosing union even if there is a representation clause
1812         on the Unchecked_Union.  If there is a variant part, compute the new
1813         first free position, if any.  Adjust call to self.  Use a single field
1814         directly only if it hasn't got a representation clause or is placed at
1815         offset zero.  Create the variant part at offset 0 if all the fields
1816         down to this level have a rep clause.  Do not chain the variant part
1817         immediately and adjust downstream.
1818         Do not test ALL_REP before moving the fields without rep clause to the
1819         previous level.  Call create_rep_part to create the REP part and force
1820         a minimum size on it if necessary.  Do not chain it immediately.
1821         Create a fake REP part if there are fields without rep clause that need
1822         to be laid out starting from FIRST_FREE_POS.
1823         At the end, chain the REP part and then the variant part.
1824         (create_rep_part): New function.
1825         (get_rep_part): Minor tweak.
1826         * gcc-interface/utils.c (tree_code_for_record_type): Minor tweak.
1827
1828 2011-11-18  Iain Sandoe  <iains@gcc.gnu.org>
1829
1830         PR target/50678
1831         * init.c (__gnat_error_handler) [Darwin]: Move workaround to the
1832         bug filed as radar #10302855 from __gnat_error_handler to...
1833         (__gnat_adjust_context_for_raise) [Darwin]: ...here.  New function.
1834         (HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE) [Darwin]: Define.
1835
1836 2011-11-18  Tristan Gingold  <gingold@adacore.com>
1837             Iain Sandoe  <iains@gcc.gnu.org>
1838
1839         PR target/49992
1840         * mlib-tgt-specific-darwin.adb (Archive_Indexer_Options): Remove.
1841         * gcc-interface/Makefile.in (darwin): Remove ranlib special-casing.
1842
1843 2011-11-12  Iain Sandoe  <iains@gcc.gnu.org>
1844
1845         * gcc-interface/Makefile.in (stamp-gnatlib-$(RTSDIR)): Don't link
1846         s-oscons.ads.
1847         (OSCONS_CPP, OSCONS_EXTRACT): New.
1848         (./bldtools/oscons/xoscons): New target.
1849         ($(RTSDIR)/s-oscons.ads): Likewise.
1850         (gnatlib): Depend on $(RTSDIR)/s-oscons.ads.
1851         * gcc-interface/Make-lang.in (ada/s-oscons.ads) Remove as dependency.
1852         * Make-generated.in: Remove machinery to generate xoscons and
1853         ada/s-oscons.ads.
1854
1855 2011-11-10  Eric Botcazou  <ebotcazou@adacore.com>
1856
1857         * fe.h (Serious_Errors_Detected): New macro.
1858         * gcc-interface/gigi.h (build_atomic_load): Declare.
1859         (build_atomic_store): Likewise.
1860         * gcc-interface/trans.c (atomic_sync_required_p): New predicate.
1861         (call_to_gnu): Add ATOMIC_SYNC parameter.  Use local variable.
1862         Build an atomic load for an In or In Out parameter if needed.
1863         Build an atomic store for the assignment of an Out parameter if needed.
1864         Build an atomic store to the target if ATOMIC_SYNC is true.
1865         (present_in_lhs_or_actual_p): New predicate.
1866         (gnat_to_gnu) <N_Identifier>: Build an atomic load if needed.
1867         <N_Explicit_Dereference>: Likewise.
1868         <N_Indexed_Component>: Likewise.
1869         <N_Selected_Component>: Likewise.
1870         <N_Assignment_Statement>: Adjust call to call_to_gnu.
1871         Build an atomic store to the LHS if needed.
1872         <N_Function_Call>:  Adjust call to call_to_gnu.
1873         * gcc-interface/utils2.c: Include toplev.h.
1874         (resolve_atomic_size): New static function.
1875         (build_atomic_load): New function.
1876         (build_atomic_store): Likewise.
1877         * gcc-interface/Make-lang.in (ada/utils2.o): Add toplev.h.
1878
1879 2011-11-07  Olivier Hainque  <hainque@adacore.com>
1880
1881         * sigtramp-ppcvxw.c: Add general comments.
1882         (CFI_COMMON_REGS): Remove rule for r1, as in other unwinders. Add
1883         rules for r2 to r13, plus CTR and XER.
1884         (CFA_REG): New, register number used to hold the local CFA.
1885         (CFI_DEF_CFA, SIGTRAMP_BODY): Use it.
1886         Make that 15, not 14, with documentation.
1887         (TCR): Undef before definition, preventing conflict with reg number in
1888         VxWorks headers.
1889
1890 2011-11-07  Robert Dewar  <dewar@adacore.com>
1891
1892         * exp_util.ads, exp_alfa.adb, a-cohama.adb, a-cohama.ads, sem_ch4.adb,
1893         aspects.ads, exp_ch8.adb, exp_ch8.ads, atree.ads: Minor reformatting.
1894         * gcc-interface/Make-lang.in: Update dependencies.
1895
1896 2011-11-07  Ed Schonberg  <schonberg@adacore.com>
1897
1898         * exp_ch6.adb: A tagged type is a legal actual for an aliased
1899         formal.
1900
1901 2011-11-07  Pascal Obry  <obry@adacore.com>
1902
1903         * g-socket.adb, g-socket.ads: Minor reformatting.
1904
1905 2011-11-07  Robert Dewar  <dewar@adacore.com>
1906
1907         * sem_res.adb (Resolve_Actuals): Minor error message improvement.
1908
1909 2011-11-07  Robert Dewar  <dewar@adacore.com>
1910
1911         * gnat_ugn.texi: Add discussion of default mode handling of
1912         source representation with no -gnatW option given, in particular
1913         noting that NEL (next line) is not recognized in this context.
1914
1915 2011-11-07  Yannick Moy  <moy@adacore.com>
1916
1917         * sem_util.adb (Note_Possible_Modification): In Alfa mode,
1918         generate a reference for a modification even when the modification
1919         does not come from source.
1920
1921 2011-11-07  Ed Schonberg  <schonberg@adacore.com>
1922
1923         * exp_ch5.adb (Expand_Iterator_Loop): For the "of" iterator form,
1924         use the indexing attributes rather than the Element function,
1925         to obtain variable references.
1926         * sem_ch4.adb (Try_Container_Indexing): Code cleanup. Use
1927         Find_Aspect rather than iterating over representation
1928         items. Improve error message.
1929         * a-cohama.adb, a-cohama.ads Update to latest RM, with two versions
1930         of Reference functions.
1931
1932 2011-11-07  Yannick Moy  <moy@adacore.com>
1933
1934         * sem_util.adb (Unique_Entity): For a parameter on a subprogram
1935         body that has a corresponding parameter on the subprogram
1936         declaration, define the unique entity as being the declaration
1937         one.
1938
1939 2011-11-07  Ed Schonberg  <schonberg@adacore.com>
1940
1941         * sem_ch6.adb (Analyze_Return_Type): In Ada 2012 mode, if the
1942         return type of a function is the class-wide type of an incomplete
1943         type T, T can be a Taft-amendment type and does not have to be
1944         completed in the current private part.
1945
1946 2011-11-07  Ed Schonberg  <schonberg@adacore.com>
1947
1948         * aspects.ads (Inherited_Aspect): Map that indicates type aspects
1949         that are inherited by default, and apply to the class-wide type
1950         as well.
1951         * aspects.adb (Find_Aspect): If the entity is class-wide and the
1952         aspect is inherited, use the aspect of the specific type.
1953
1954 2011-11-07  Hristian Kirtchev  <kirtchev@adacore.com>
1955
1956         * exp_alfa.adb: Remove with and use clause for
1957         Exp_Ch8. Add with and use clause for Exp_Util.
1958         Remove local constant Disable_Processing_Of_Renamings.
1959         (Expand_Alfa_N_Object_Renaming_Declaration): The expansion of
1960         object renamings has been reenabled.
1961         (Expand_Possible_Renaming):
1962         The expansion of identifier and expanded names has been
1963         reenabled. Perform the substitutions only for entities that
1964         denote an object.
1965         * exp_ch8.ads, exp_ch8.adb (Evaluate_Name): Moved to Exp_Util.
1966         * exp_util.adb (Evaluate_Name): Moved from Exp_Ch8.
1967         (Remove_Side_Effects): Alphabetize local variables. Add a guard
1968         to avoid the infinite expansion of an expression in Alfa mode. Add
1969         processing for function calls in Alfa mode.
1970         * exp_util.ads (Evaliate_Name): Moved from Exp_Ch8.
1971
1972 2011-11-07  Ed Schonberg  <schonberg@adacore.com>
1973
1974         * freeze.adb (Freeze_Entity): If the entity is an access to
1975         subprogram whose designated type is itself a subprogram type,
1976         its own return type must be decorated with size information.
1977
1978 2011-11-04  Arnaud Charlet  <charlet@adacore.com>
1979
1980         * gcc-interface/Make-lang.in: Update dependencies.
1981
1982 2011-11-04  Robert Dewar  <dewar@adacore.com>
1983
1984         * sprint.adb (Sprint_Node_Actual, case Qualified_Expression):
1985         Avoid junk semicolon after argument of machine code Asm operand.
1986
1987 2011-11-04  Robert Dewar  <dewar@adacore.com>
1988
1989         * exp_ch11.adb (Generate_Push_Pop): Inhibit push/pop nodes in
1990         CodePeer mode or if restriction No_Exception_Handlers is present.
1991         * exp_ch6.adb (Expand_N_Subprogram_Body): (Inhibit push/pop
1992         nodes in CodePeer mode or if restriction No_Exception_Handlers
1993         is present.
1994
1995 2011-11-04  Robert Dewar  <dewar@adacore.com>
1996
1997         * s-tassta.adb, atree.ads, errout.adb, sinput.adb: Minor reformatting.
1998
1999 2011-11-04  Ed Schonberg  <schonberg@adacore.com>
2000
2001         * sem_ch6.adb (Analyze_Subprogram_Specification): The
2002         specification is legal if it is a function that returns an
2003         abstract type, if it comes from an attribute renaming of a stream
2004         attribute of an abstract type.
2005
2006 2011-11-04  Gary Dismukes  <dismukes@adacore.com>
2007
2008         * exp_util.adb (Is_Possibly_Unaligned_Object): In case of indexed
2009         components, check whether recursively check whether the prefix
2010         denotes an unaligned object.
2011
2012 2011-11-04  Ed Schonberg  <schonberg@adacore.com>
2013
2014         * sem_prag.adb (Analyze_Pragma, case Debug): The argument of
2015         the pragma is legal if it is an expanded name that denotes a
2016         procedure that be can called without parameters.
2017
2018 2011-11-04  Eric Botcazou  <ebotcazou@adacore.com>
2019
2020         * gnat_ugn.texi (Performance Considerations) <Vectorization
2021         of loops>: New sub-section.  <Other Optimization Switches>:
2022         Minor tweak.
2023
2024 2011-11-04  Robert Dewar  <dewar@adacore.com>
2025
2026         * gnat_rm.texi: Minor reformatting.
2027
2028 2011-11-04  Matthew Heaney  <heaney@adacore.com>
2029
2030         * a-convec.adb, a-coinve.adb, a-cobove.adb (Merge): Raise PE
2031         when Target and Source denote same non-empty object
2032         * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb (Merge): Ditto
2033
2034 2011-11-04  Robert Dewar  <dewar@adacore.com>
2035
2036         * exp_attr.adb: Minor reformatting.
2037
2038 2011-11-04  Ed Schonberg  <schonberg@adacore.com>
2039
2040         * exp_ch5.adb (Expand_Assign_Record): Do not generate a
2041         discriminant assignment within an initialization proc if the
2042         record is an unchecked union, as it can only come from the
2043         initialization of an unchecked union component.
2044
2045 2011-11-04  Robert Dewar  <dewar@adacore.com>
2046
2047         * gnat_ugn.texi: Minor reformatting.
2048
2049 2011-11-04  Robert Dewar  <dewar@adacore.com>
2050
2051         * par-labl.adb (Rewrite_As_Loop): Generate info msg rather than
2052         warning message.
2053
2054 2011-11-04  Robert Dewar  <dewar@adacore.com>
2055
2056         * exp_ch4.adb: Minor code reorganization (remove junk obsolete
2057         var Save_Space).
2058
2059 2011-11-04  Hristian Kirtchev  <kirtchev@adacore.com>
2060
2061         * exp_alfa.adb: Add local constant
2062         Disable_Processing_Of_Renamings;
2063         (Expand_Alfa_N_Object_Renaming_Declaration): Disable
2064         the name evaluation of object renamings for now.
2065         (Expand_Potential_Renaming): Do not perform the substitution
2066         for now.
2067         * exp_util.adb (Remove_Side_Effects): Remove processing for
2068         functions with side effects in Alfa mode.
2069
2070 2011-11-04  Gary Dismukes  <dismukes@adacore.com>
2071
2072         * bindgen.adb (Gen_Elab_Calls): In the case
2073         of the AAMP target, set elaboration entities to 1 rather than
2074         incrementing.
2075
2076 2011-11-04  Ed Schonberg  <schonberg@adacore.com>
2077
2078         * sem_ch10.adb (Install_Limited_With_Unit): To establish the
2079         proper entities on the ancestors of a child unit that appear
2080         in a limited_with clause, follow the unit links because the
2081         units are not analyzed and scope information is incomplete.
2082
2083 2011-11-04  Eric Botcazou  <ebotcazou@adacore.com>
2084
2085         * exp_ch4.adb (Expand_N_Selected_Component): Refine code
2086         setting the Atomic_Sync_Required flag to detect one more case.
2087         * exp_util.adb (Activate_Atomic_Synchronization): Refine code
2088         setting the Atomic_Sync_Required flag to exclude more cases,
2089         depending on the parent of the node to be examined.
2090
2091 2011-11-04  Bob Duff  <duff@adacore.com>
2092
2093         * g-excact.adb: Minor: use named notation.
2094
2095 2011-11-04  Ed Schonberg  <schonberg@adacore.com>
2096
2097         * sem_ch5.adb: Improve error messages for illegal iterators.
2098
2099 2011-11-04  Hristian Kirtchev  <kirtchev@adacore.com>
2100
2101         * exp_alfa.adb: Add with and use clauses for Exp_Ch8 and
2102         Sem_Util.
2103         (Expand_Alfa): Alphabetize cases on first choice. Add
2104         processing for object renaming declarations, identifiers and
2105         expanded names.
2106         (Expand_Alfa_N_In): Remove useless return.
2107         (Expand_Alfa_N_Object_Renaming_Declaration): New routine.
2108         (Expand_Potential_Renaming): New routine.
2109         * exp_ch8.adb (Evaluate_Name): Moved to the top level.
2110         (Expand_N_Object_Declaration): Alphabetize local variables. Move
2111         Evaluate_Name out to the top level.
2112         * exp_ch8.ads (Evaluate_Name): Moved from body to package spec.
2113         * exp_util.adb (Remove_Side_Effects): Add processing for
2114         functions with side effects in Alfa mode.
2115
2116 2011-11-04  Hristian Kirtchev  <kirtchev@adacore.com>
2117
2118         * gnat_rm.texi: Add entries for
2119         restrictions No_Relative_Delay, No_Requeue_Statements and
2120         No_Stream_Optimizations.
2121
2122 2011-11-04  Ed Schonberg  <schonberg@adacore.com>
2123
2124         * sem_ch4.adb: Set type of entity in prefixed call, for
2125         completeness in a generic context.
2126
2127 2011-11-04  Yannick Moy  <moy@adacore.com>
2128
2129         * sem_prag.adb: Minor refactoring (renaming of a parameter).
2130
2131 2011-11-04  Robert Dewar  <dewar@adacore.com>
2132
2133         * atree.ads: Minor reformatting.
2134
2135 2011-11-04  Robert Dewar  <dewar@adacore.com>
2136
2137         * checks.adb (Atomic_Synchronization_Disabled): Check -gnatd.d
2138         and -gnatd.e here
2139         * exp_ch2.adb (Expand_Entity_Reference): Use
2140         Activate_Atomic_Synchronization
2141         * exp_ch4.adb (Expand_N_Explicit_Dereference): Use
2142         Activate_Atomic_Synchronization (Expand_N_Indexed_Compoonent):
2143         Activate_Atomic_Synchronization (Expand_N_Selected_Component):
2144         Use Activate_Atomic_Synchronization
2145         * exp_util.ads, exp_util.adb (Activate_Atomic_Synchronization): New
2146         procedure.
2147         * sinfo.ads, sinfo.adb (Atomic_Sync_Required): Can now apply to
2148         N_Selected_Component node
2149
2150 2011-11-04  Robert Dewar  <dewar@adacore.com>
2151
2152         * sem_prag.adb, atree.ads, prj-env.adb, prj-env.ads: Minor reformatting.
2153
2154 2011-11-04  Yannick Moy  <moy@adacore.com>
2155
2156         * atree.adb, atree.ads (Set_Original_Node): New set procedure.
2157         * sem_ch13.adb (Analyze_Aspect_Specifications/Pre_Post_Aspects):
2158         In ASIS mode, no splitting of aspects between conjuncts.
2159         (Analyze_Aspect_Specifications/Aspect_Test_Case): Make pragma
2160         expressions refer to the original aspect expressions through
2161         the Original_Node link. This is used in semantic analysis for
2162         ASIS mode, so that the original expression also gets analyzed.
2163         * sem_prag.adb (Preanalyze_TC_Args,
2164         Check_Precondition_Postcondition,
2165         Analyze_Pragma/Pragma_Test_Case): In ASIS mode, for a pragma
2166         generated from a source aspect, also analyze the original aspect
2167         expression.
2168         (Check_Expr_Is_Static_Expression): New procedure
2169         similar to existing procedure Check_Arg_Is_Static_Expression,
2170         except called on expression inside pragma.
2171
2172 2011-11-04  Tristan Gingold  <gingold@adacore.com>
2173
2174         * prj-env.adb, prj-env.ads (Find_Name_In_Path): New function, from
2175         Find_Project.Try_Path_Name.
2176         (Find_Project): Use Find_Name_In_Path to implement Try_Path_Name.
2177
2178 2011-11-04  Eric Botcazou  <ebotcazou@adacore.com>
2179
2180         * s-atocou.ads (Atomic_Counter): Remove redundant pragma Volatile.
2181
2182 2011-11-04  Pascal Obry  <obry@adacore.com>
2183
2184         * projects.texi: Add short description for qualifiers aggregate
2185         and aggregate library.
2186
2187 2011-11-04  Matthew Heaney  <heaney@adacore.com>
2188
2189         * Makefile.rtl, impunit.adb: Added a-cogeso.ad[sb]
2190         * a-cgaaso.adb: Replaced implementation with instantiation
2191         of Generic_Sort.
2192         * a-cogeso.ad[sb] This is the new Ada 2012 unit
2193         Ada.Containers.Generic_Sort
2194
2195 2011-11-04  Robert Dewar  <dewar@adacore.com>
2196
2197         * exp_ch2.adb (Expand_Entity_Reference): Do not set
2198         Atomic_Sync_Required for the case of a prefix of an attribute.
2199         * exp_ch4.adb (Expand_N_Explicit_Dereference): May require
2200         atomic synchronization
2201         (Expand_N_Indexed_Component): Ditto.
2202         (Expand_B_Selected_Component): Ditto.
2203         * sem_prag.adb (Process_Suppress_Unsuppress):
2204         Disable/Enable_Atomic_Synchronization can now occur for array
2205         types with pragma Atomic_Components.
2206         * sinfo.ads, sinfo.adb (Atomic_Sync_Required): Can now occur on
2207         N_Explicit_Dereference nodes and on N_Indexed_Component nodes.
2208
2209 2011-11-04  Gary Dismukes  <dismukes@adacore.com>
2210
2211         * gnat_ugn.texi: Editorial corrections for gnattest section.
2212
2213 2011-11-04  Robert Dewar  <dewar@adacore.com>
2214
2215         * sem_prag.adb: Minor reformatting.
2216         * gnat_rm.texi: Update documentation for pragma Warnings (Off,
2217         "***") usage.
2218         * exp_ch2.adb (Expand_Entity_Reference): Only set
2219         Atomic_Sync_Required on entities that are variables. Doesn't
2220         make any sense on anything else.
2221
2222 2011-11-04  Robert Dewar  <dewar@adacore.com>
2223
2224         * exp_ch2.adb (Expand_Entity_Reference): Extend handling of
2225         atomic sync to type case.
2226         * sem_prag.adb (Process_Suppress_Unsuppress): Atomic Sync can
2227         apply to types.
2228
2229 2011-11-04  Robert Dewar  <dewar@adacore.com>
2230
2231         * sem_warn.adb (Warn_On_Useless_Assignment): More accurate test
2232         for call vs assign.
2233         * gcc-interface/Make-lang.in: Update dependencies.
2234
2235 2011-11-04  Robert Dewar  <dewar@adacore.com>
2236
2237         * sem_prag.adb: Detect more cases of Long_Float inconsistencies at
2238         compile time.
2239
2240 2011-11-04  Matthew Heaney  <heaney@adacore.com>
2241
2242         * Makefile.rtl, impunit.adb: Added a-sfecin.ads,
2243         * a-sfhcin.ads, a-sflcin.ads, a-sbecin.ad[sb], a-sbhcin.ad[sb],
2244         a-sblcin.ad[sb], a-suecin.ad[sb], a-suhcin.ad[sb], a-sulcin.ad[sb]
2245         * a-sfecin.ads, a-sfhcin.ads, a-sflcin.ads, a-sbecin.ad[sb],
2246         a-sbhcin.ad[sb], a-sblcin.ad[sb], a-suecin.ad[sb], a-suhcin.ad[sb],
2247         a-sulcin.ad[sb]: New files.
2248
2249 2011-11-04  Geert Bosch  <bosch@adacore.com>
2250
2251         * i-forbla-unimplemented.ads, s-gecola.adb, s-gecola.ads,
2252         s-gerebl.adb, s-gerebl.ads, i-forbla.adb, i-forbla.ads,
2253         i-forlap.ads, i-forbla-darwin.adb, s-gecobl.adb, s-gecobl.ads,
2254         s-gerela.adb, s-gerela.ads: Remove partial interface to BLAS/LAPACK.
2255         * gcc-interface/Makefile.in: Remove libgnala and related objects.
2256
2257 2011-11-04  Matthew Heaney  <heaney@adacore.com>
2258
2259         * a-cdlili.ad[sb], a-cidlli.ad[sb], a-coorse.ad[sb], a-ciorse.ad[sb],
2260         a-coorma.ad[sb], a-ciorma.ad[sb], a-coormu.ad[sb], a-ciormu.ad[sb],
2261         a-cohama.ad[sb], a-cihama.ad[sb], a-cohase.ad[sb], a-cihase.ad[sb],
2262         a-convec.ad[sb], a-coinve.ad[sb] (Assign, Copy): New operations
2263         added to package.
2264
2265 2011-11-04  Eric Botcazou  <ebotcazou@adacore.com>
2266
2267         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Do not assert
2268         that the type of the parameters isn't dummy in type_annotate_only mode.
2269
2270 2011-11-04  Robert Dewar  <dewar@adacore.com>
2271
2272         * sem_ch12.adb: Minor reformatting
2273
2274 2011-11-04  Gary Dismukes  <dismukes@adacore.com>
2275
2276         * bindgen.adb (Gen_Elab_Calls): In the case of the AAMP target,
2277         initialize elaboration entities to zero when specs are processed.
2278
2279 2011-10-28  Iain Sandoe  <iains@gcc.gnu.org>
2280             Eric Botcazou  <ebotcazou@adacore.com>
2281
2282         PR target/50678
2283         * init.c (__gnat_error_handler) [Darwin]: Apply a work-around to the
2284         bug filed as radar #10302855 (inconsistent unwind data for sigtramp).
2285
2286 2011-10-28  Eric Botcazou  <ebotcazou@adacore.com>
2287
2288         PR ada/50842
2289         * gcc-interface/Makefile.in (SYMDEPS): Delete.
2290         (LIBICONV): New variable.
2291         (LIBICONV_DEP): Likewise.
2292         (LIBS): Add $(LIBICONV).
2293         (LIBDEPS): Add $(LIBICONV_DEP).
2294         (EXTRA_GNATTOOLS_OBJS): Merge into...
2295         (TOOLS_LIBS): ...this.  Add $(LIBICONV).
2296
2297 2011-10-26  Eric Botcazou  <ebotcazou@adacore.com>
2298
2299         * gcc-interface/decl.c (elaborate_expression_1): Add EXPR_PUBLIC_P local
2300         variable.  Always create the elaboration variable, if any, as constant.
2301
2302 2011-10-26  Eric Botcazou  <ebotcazou@adacore.com>
2303
2304         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Try to
2305         make a packable type for fields of union types as well.
2306         <is_type>: Use RECORD_OR_UNION_TYPE_P predicate.
2307         (gnat_to_gnu_component_type): Try to make a packable type for fields
2308         of union types as well.
2309         (make_packable_type): Use RECORD_OR_UNION_TYPE_P predicate.
2310         (maybe_pad_type): Try to make a packable type for fields of union types
2311         as well.
2312         (gnat_to_gnu_field): Likewise.
2313         (is_variable_size): Use RECORD_OR_UNION_TYPE_P predicate.
2314         (set_rm_size): Likewise.
2315         (rm_size): Likewise.
2316         * gcc-interface/misc.c (gnat_type_max_size): Likewise.
2317         * gcc-interface/trans.c (add_decl_expr): Likewise.
2318         * gcc-interface/utils.c (finish_record_type): Likewise.
2319         * gcc-interface/utils2.c (build_simple_component_ref): Likewise.
2320
2321 2011-10-26  Eric Botcazou  <ebotcazou@adacore.com>
2322
2323         * gcc-interface/decl.c (gnat_to_gnu_field): Always check components
2324         declared as atomic.  Move around conditionally executed code.
2325
2326 2011-10-24  Robert Dewar  <dewar@adacore.com>
2327
2328         * sem.adb (Initialize): Fix bug that blew up if called a second time.
2329
2330 2011-10-24  Robert Dewar  <dewar@adacore.com>
2331
2332         * tb-alvxw.c, tracebak.c, expect.c, initflt.c, tb-alvms.c,
2333         tb-ivms.c, tb-gcc.c: Update headers to GPL 3.
2334
2335 2011-10-24  Robert Dewar  <dewar@adacore.com>
2336
2337         * sem_prag.adb (Analyze_Pragma, case Debug): Give proper pragma
2338         name in error msg.
2339
2340 2011-10-24  Hristian Kirtchev  <kirtchev@adacore.com>
2341
2342         * gnat_rm.texi: Add an entry for restriction No_Finalization.
2343
2344 2011-10-24  Ed Schonberg  <schonberg@adacore.com>
2345
2346         * sem_ch12.adb (Insert_Freeze_Node_For_Instance):  If the
2347         current instance is within the one that contains the generic,
2348         the freeze node for the current one must appear in the current
2349         declarative part. Ditto if the current instance is within another
2350         package instance. In both of these cases the freeze node of the
2351         previous instance is not relevant.
2352
2353 2011-10-24  Gary Dismukes  <dismukes@adacore.com>
2354
2355         * switch-m.adb (Normalize_Compiler_Switches): Add recognition
2356         of AAMP-specific switches -univ and -aamp_target.
2357
2358 2011-10-24  Robert Dewar  <dewar@adacore.com>
2359
2360         * a-tienau.adb (Put): Deal properly with limited line length.
2361
2362 2011-10-24  Robert Dewar  <dewar@adacore.com>
2363
2364         * sem_warn.adb, sem_ch12.adb: Minor reformatting.
2365
2366 2011-10-24  Tristan Gingold  <gingold@adacore.com>
2367
2368         * gcc-interface/Makefile.in: Use GNU ld switches to generate map files
2369         on AIX.
2370
2371 2011-10-24  Ed Schonberg  <schonberg@adacore.com>
2372
2373         * sem_ch12.adb (Earlier): make available globally. If both
2374         nodes have the same sloc, the freeze node that does not come
2375         from source is the later one.
2376         (True_Parent): Make available globally.
2377         (Previous_Instance): Subsidiary of
2378         Insert_Freeze_Node_For_Instance, to check whether the generic
2379         parent of the current instance is declared within a previous
2380         instance in the same unit or declarative  part, in which case the
2381         freeze nodes of both instances must appear in order to prevent
2382         elaboration problems in gigi.
2383         * sem_ch12.adb (Insert_Freeze_Node_For_Instance): A stub is a
2384         freeze point, and the freeze node of a preceding instantiation
2385         must be inserted before it.
2386
2387 2011-10-24  Robert Dewar  <dewar@adacore.com>
2388
2389         * checks.ads, checks.adb: Add handling of Synchronization_Check
2390         * debug.adb: Add doc for -gnatd.d and -gnatd.e (disable/enable
2391         atomic sync).
2392         * exp_ch2.adb (Expand_Entity_Reference): Set Atomic_Sync_Required
2393         flag Minor code reorganization.
2394         * opt.ads (Warn_On_Atomic_Synchronization): New switch.
2395         * par-prag.adb: Add dummy entries for pragma
2396         Disable/Enable_Atomic_Synchronization.
2397         * sem_prag.adb (Process_Suppress_Unsuppress): Handle
2398         case of Atomic_Synchronization specially (not suppressed
2399         by All_Checks, cannot be set from Source).
2400         (Pragma Disable/Enable_Atomic_Synchronization): Add processing.
2401         * sinfo.ads, sinfo.adb: Add Atomic_Sync_Required flag
2402         * snames.ads-tmpl: Add entry for Atomic_Synchronization Add
2403         entry for pragma Disable/Enable_Atomic_Synchronization
2404         * switch-c.adb: The -gnatp switch does not disable
2405         Atomic_Synchronization Add -gnatep switch to disable
2406         Atomic_Synchronization.
2407         * types.ads: Add entry for Synchronization_Check
2408         * usage.adb: Add line for -gnated switch
2409         * warnsw.adb: Settings for Warn_On_Atomic_Synchronization
2410
2411 2011-10-24  Geert Bosch  <bosch@adacore.com>
2412
2413         * s-gearop.adb (Back_Substitute): Avoid overflow if matrix bounds start
2414         at Integer'First.
2415
2416 2011-10-24  Robert Dewar  <dewar@adacore.com>
2417
2418         * sem_ch12.adb, s-gearop.adb: Minor reformatting.
2419
2420 2011-10-24  Robert Dewar  <dewar@adacore.com>
2421
2422         * warnsw.adb: Add some missing warnings to Set_GNAT_Mode_Warnings.
2423         * warnsw.ads: Add comments to Set_GNAT_Mode_Warnings.
2424
2425 2011-10-24  Emmanuel Briot  <briot@adacore.com>
2426
2427         * prj-proc.adb (Process_Expression_Variable_Decl): No special
2428         handling for Project_Path unless it is an attribute.
2429
2430 2011-10-24  Javier Miranda  <miranda@adacore.com>
2431
2432         * sem_ch12.adb (Check_Hidden_Primitives): New subprogram.
2433         (Install_Hidden_Primitives): New subprogram.
2434         (Restore_Hidden_Primitives): New subprogram.
2435         (Analyze_Formal_Package_Declaration,
2436         Analyze_Package_Instantiation, Analyze_Subprogram_Instantiation):
2437         Invoke Check_Hidden_Primitives after every call to
2438         Analyze_Associations, and invoke Restore_Hidden_Primitives to
2439         restore their visibility after processing the instantiation.
2440         (Instantiate_Package_Body): Install visible primitives before
2441         analyzing the instantiation and uninstall them to restore their
2442         visibility when the instantiation has been analyzed.
2443         * sem_util.ads, sem_util.adb (Add_Suffix): New subprogram
2444         (Remove_Suffix): New subprogram
2445         * sem_ch3.adb (Derive_Subprogram): When handling
2446         a derived subprogram for the instantiation of a formal derived
2447         tagged type, inherit the dispatching attributes from the actual
2448         subprogram (not from the parent type).
2449
2450 2011-10-24  Vasiliy Fofanov  <fofanov@adacore.com>
2451
2452         * gnat_ugn.texi: Document explicit use of XDECGNAT library.
2453
2454 2011-10-24  Hristian Kirtchev  <kirtchev@adacore.com>
2455
2456         * exp_ch3.adb (Build_Assignment): Add local constant N_Loc and
2457         update its uses.
2458         (Build_Discriminant_Assignments): Add local variable D_Loc and update
2459         its uses.
2460         (Build_Init_Statements): Add local variables Comp_Loc, Decl_Loc and
2461         Var_Loc and update their uses.
2462         (Build_Record_Init_Proc): Code reformatting.
2463         (Increment_Counter): Add formal parameter Loc.
2464         (Make_Counter): Add formal parameter Loc.
2465
2466 2011-10-24  Eric Botcazou  <ebotcazou@adacore.com>
2467
2468         * sem_disp.adb (Covers_Some_Interface): Fix typo.
2469
2470 2011-10-24  Matthew Heaney  <heaney@adacore.com>
2471
2472         * a-cuprqu.adb, a-cbprqu.adb (Dequeue_Only_High_Priority): Fix sense
2473         of predicate.
2474
2475 2011-10-24  Yannick Moy  <moy@adacore.com>
2476
2477         * sem_ch13.adb (Analyze_Aspect_Specifications/Aspect_Test_Case):
2478         Translate arguments in positional notation into pragma argument
2479         association arguments for the generated pragma.
2480
2481 2011-10-24  Arnaud Charlet  <charlet@adacore.com>
2482
2483         * exp_ch5.adb: Fix minor typo.
2484
2485 2011-10-24  Ed Schonberg  <schonberg@adacore.com>
2486
2487         * sem_ch3.adb (Is_Visible_Component): Refine predicate for
2488         the case of a component reference in an instance body, when the
2489         enclosing type is private.
2490
2491 2011-10-24  Sergey Rybin  <rybin@adacore.com frybin>
2492
2493         * gnat_ugn.texi: For gnatelim, move the note about using the GNAT
2494         driver for getting the project support into gnatelim section.
2495
2496 2011-10-24  Robert Dewar  <dewar@adacore.com>
2497
2498         * gnat_rm.texi: Minor correction to documentation on address clause.
2499
2500 2011-10-24  Hristian Kirtchev  <kirtchev@adacore.com>
2501
2502         * s-finmas.adb (Attach): Synchronize and call the unprotected version.
2503         (Attach_Unprotected): New routine.
2504         (Delete_Finalize_Address): Removed.
2505         (Delete_Finalize_Address_Unprotected): New routine.
2506         (Detach): Synchronize and call the unprotected version.
2507         (Detach_Unprotected): Remove locking.
2508         (Finalize): Add various comment on synchronization. Lock the critical
2509         region and call the unprotected versions of routines.
2510         (Finalize_Address): Removed.
2511         (Finalize_Address_Unprotected): New routine.
2512         (Set_Finalize_Address): Synchronize and call
2513         the unprotected version.
2514         (Set_Finalize_Address_Unprotected): New routine.
2515         (Set_Heterogeneous_Finalize_Address): Removed.
2516         (Set_Heterogeneous_Finalize_Address_Unprotected): New routine.
2517         (Set_Is_Heterogeneous): Add comment on synchronization and
2518         locking.
2519         * s-finmas.ads: Flag Finalization_Started is no longer atomic
2520         because synchronization uses task locking / unlocking.
2521         (Attach): Add comment on usage.
2522         (Attach_Unprotected): New routine.
2523         (Delete_Finalize_Address): Renamed to
2524         Delete_Finalize_Address_Unprotected.
2525         (Detach): Add comment on usage.
2526         (Detach_Unprotected): New routine.
2527         (Finalize_Address): Renamed to Finalize_Address_Unprotected.
2528         (Set_Finalize_Address): Add comment on usage.
2529         (Set_Finalize_Address_Unprotected): New routine.
2530         (Set_Heterogeneous_Finalize_Address): Renamed to
2531         Set_Heterogeneous_Finalize_Address_Unprotected.
2532         * s-stposu.adb (Allocate_Any_Controlled): Add local variable
2533         Allocation_Locked. Add various comments on synchronization. Lock
2534         the critical region and call the unprotected version of
2535         routines.
2536         (Deallocate_Any_Controlled): Add various comments on
2537         synchronization. Lock the critical region and call the unprotected
2538         version of routines.
2539
2540 2011-10-24  Ed Schonberg  <schonberg@adacore.com>
2541
2542         * sem_ch3.adb (Set_Fixed_Range): The bounds of a fixed point type
2543         are universal and must carry the corresponding type.
2544         * sem_eval.adb (Check_Non_Static_Context): If the type of the
2545         expression is universal real, as may be the case for a fixed point
2546         expression with constant operands in the context of a conversion,
2547         there is nothing to check.
2548         * s-finmas.adb: Minor reformatting
2549
2550 2011-10-23  Eric Botcazou  <ebotcazou@adacore.com>
2551
2552         * gcc-interface/decl.c (create_concat_name): Add explicit cast.
2553
2554 2011-10-20  Eric Botcazou  <ebotcazou@adacore.com>
2555
2556         * gcc-interface/Make-lang.in (GNATLIBFLAGS, GNATLIBCFLAGS, THREAD_KIND,
2557         TRACE): Reintroduce.
2558         (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o,
2559         ada/initialize.o, ada/raise.o): Reintroduce explicit compilation rules.
2560
2561 2011-10-20  Eric Botcazou  <ebotcazou@adacore.com>
2562
2563         * gcc-interface/trans.c (lhs_or_actual_p): New predicate.
2564         (unchecked_conversion_nop): Use it.
2565         (gnat_to_gnu): Likewise.
2566
2567 2011-10-20  Eric Botcazou  <ebotcazou@adacore.com>
2568
2569         * back_end.adb (Call_Back_End): Pass the maximum logical line number
2570         instead of the maximum physical line number to gigi.
2571         * gcc-interface/trans.c (Sloc_to_locus): Cope with line zero.
2572
2573 2011-10-16  Tom Tromey  <tromey@redhat.com>
2574             Dodji Seketeli  <dodji@redhat.com>
2575
2576         * gcc-interface/trans.c (gigi, Sloc_to_locus): Adjust to use the new
2577         public ordinary map interface.
2578
2579 2011-10-16  Tristan Gingold  <gingold@adacore.com>
2580
2581         * link.c (_AIX): Add support for GNU ld.
2582
2583 2011-10-16  Fedor Rybin  <frybin@adacore.com>
2584
2585         * gnat_ugn.texi: Fixing gnattest example names in the doc.
2586         Adding explanation to additional tests usage.
2587
2588 2011-10-16  Robert Dewar  <dewar@adacore.com>
2589
2590         * exp_ch6.adb, sem_ch6.adb: Minor reformatting.
2591
2592 2011-10-16  Eric Botcazou  <ebotcazou@adacore.com>
2593
2594         * a-convec.adb: Fix minor inconsistencies.
2595
2596 2011-10-16  Matthew Heaney  <heaney@adacore.com>
2597
2598         * a-cusyqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cbprqu.ads (package
2599         Implementation): Specify pragma Implementation_Defined.
2600
2601 2011-10-15  Nicolas Roche  <roche@adacore.com>
2602
2603         * gcc-interface/lang-specs.h: Ensure -mrtp switch is passed when using
2604         either rtp-smp or ravenscar-cert-rtp runtimes.
2605
2606 2011-10-15  Bob Duff  <duff@adacore.com>
2607
2608         * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call):
2609         Do not create a pool formal on unless RE_Root_Storage_Pool_Ptr
2610         is available.
2611         (Expand_N_Extended_Return_Statement): Do not create a renaming of the
2612         build-in-place pool parameter unless RE_Root_Storage_Pool_Ptr is
2613         available.
2614         (Make_Build_In_Place_Call_In_Allocator): Add the user-defined
2615         pool only if RE_Root_Storage_Pool_Ptr is available.
2616         (Make_Build_In_Place_Call_In_Object_Declaration): Do not add a
2617         pool actual unless RE_Root_Storage_Pool_Ptr is available.
2618         * sem_ch6.adb (Create_Extra_Formals): Add build-in-place pool
2619         formal only if RE_Root_Storage_Pool_Ptr is available.
2620
2621 2011-10-15  Matthew Heaney  <heaney@adacore.com>
2622
2623         * a-cusyqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cbprqu.ads (Queue
2624         type): Specify Priority aspect for protected type.
2625
2626 2011-10-14  Ed Schonberg  <schonberg@adacore.com>
2627
2628         * exp_disp.adb (Check_Premature_Freezing): If an untagged type
2629         is a generic actual, it is a subtype of a type that was frozen
2630         by the instantiation, and even if not marked frozen it does not
2631         affect the construction of the dispatch table.
2632
2633 2011-10-14  Robert Dewar  <dewar@adacore.com>
2634
2635         * make.adb, mlib-utl.adb, sem_util.adb, sem_ch4.adb: Minor code
2636         reformatting.
2637         * s-rident.ads: Add missing Compiler_Unit pragma.
2638
2639 2011-10-14  Gary Dismukes  <dismukes@adacore.com>
2640
2641         * sem_res.adb: Minor reformatting.
2642
2643 2011-10-14  Hristian Kirtchev  <kirtchev@adacore.com>
2644
2645         * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call):
2646         Code and comment reformatting. Use BIP_Task_Master
2647         when creating a _master.
2648         (BIP_Formal_Suffix): Code reformatting. Correct the case for
2649         BIP_Task_Master.
2650         (Make_Build_In_Place_Call_In_Object_Declaration): Use
2651         BIP_Task_Master when creating a reference to the enclosing
2652         function's _master formal.
2653         (Move_Activation_Chain): Use BIP_Task_Master when creating a reference
2654         to the _master.
2655         * exp_ch6.ads: Change BIP_Master to BIP_Task_Master.
2656         (Needs_BIP_Finalization_Master): Alphabetized.
2657         * sem_ch6.adb (Create_Extra_Formals): Update the usage of
2658         BIP_Task_Master.
2659
2660 2011-10-14  Ed Schonberg  <schonberg@adacore.com>
2661
2662         * par-ch6.adb (P_Return_Object_Declaration): In Ada 2012 mode,
2663         reject an aliased keyword on the object declaration of an extended
2664         return statement. In older versions of the language indicate
2665         that this is illegal in the standard.
2666
2667 2011-10-14  Pascal Obry  <obry@adacore.com>
2668
2669         * sem_util.adb, sem_ch4.adb: Minor reformatting.
2670
2671 2011-10-14  Ed Schonberg  <schonberg@adacore.com>
2672
2673         * sem_ch13.adb: Recognize properly procedure calls that are
2674         transformed into code statements.
2675
2676 2011-10-14  Vincent Celier  <celier@adacore.com>
2677
2678         * projects.texi: Minor fix in project example.
2679
2680 2011-10-14  Ed Schonberg  <schonberg@adacore.com>
2681
2682         * sem_util.adb: Return objects are aliased if their type is
2683         immutably limited as per AI05-0053.
2684
2685 2011-10-14  Gary Dismukes  <dismukes@adacore.com>
2686
2687         * exp_ch4.adb (Expand_N_Op_And): Remove Short_Circuit_And_Or
2688         expansion code (moved to sem_res) (Expand_N_Op_Or): Remove
2689         Short_Circuit_And_Or expansion code (moved to sem_res).
2690         * sem_res.adb (Resolve_Logical_Op): Add code to rewrite Boolean
2691         "and" and "or" operators as short-circuit "and then" and "or
2692         else", when pragma Short_Circuit_And_Or is active.
2693
2694 2011-10-13  Robert Dewar  <dewar@adacore.com>
2695
2696         * sem_ch9.adb, sem_util.adb, sem_util.ads, exp_ch6.adb, sem_ch4.adb,
2697         sem_ch6.adb, exp_ch3.adb: Minor reformatting.
2698
2699 2011-10-13  Arnaud Charlet  <charlet@adacore.com>
2700
2701         * Makefile.rtl (GNATRTL_NONTASKING_OBJS): Add a-ngcoar.o.
2702
2703 2011-10-13  Jerome Guitton  <guitton@adacore.com>
2704
2705         * sysdep.c (__gnat_get_task_options): Re-enable VX_SPE_TASK on vThreads
2706
2707 2011-10-13  Eric Botcazou  <ebotcazou@adacore.com>
2708
2709         * a-convec.ads (Cursor): Minor reformatting.
2710         * a-convec.adb (Next): Fix minor inconsistencies.
2711         (Previous): Likewise.
2712
2713 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
2714
2715         * sem_util.ads, sem_util.adb (Available_Full_View_Of_Component):
2716         New predicate to determine whether some operations on an array
2717         type are available when the full view of its component may differ
2718         from the view of the point of the array declaration.
2719         * sem_ch4.adb (Find_Equality_Types): Use
2720         Available_Full_View_Of_Component.
2721         * sem_type.adb (Valid_Boolean_Arg, Valid_Comparison_Arg): Ditto
2722
2723 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
2724
2725         * sem_ch9.adb: Analyze aspects while discriminants of protected
2726         type are visible.
2727
2728 2011-10-13  Geert Bosch  <bosch@adacore.com>
2729
2730         * Makefile.rtl (GNATRTL_TASKING_OBJECTS): Add
2731         a-nlcoar.o, a-nllcar.o, a-nucoar.o and s-gearop.o, as these no
2732         longer depend on an external library.
2733         * gcc-interface/Makefile.in (GNATRTL_LINEARALGEBRA_OBJS): Remove
2734         a-nlcoar.o, a-nllcar.o, a-nucoar.o and s-gearop.o.
2735         Update dependencies.
2736         * gcc-interface/Make-lang.in: Update dependencies. 
2737
2738 2011-10-13  Cyrille Comar  <comar@adacore.com>
2739
2740         * gnat_ugn.texi: Minor editing.
2741
2742 2011-10-13  Vincent Celier  <celier@adacore.com>
2743
2744         * projects.texi: Add documentation on packages and attributes
2745         that are inherited from a project being extended into the
2746         extended project.
2747
2748 2011-10-13  Hristian Kirtchev  <kirtchev@adacore.com>
2749
2750         * exp_ch3.adb (Build_Master): Rewritten.
2751         (Expand_N_Full_Type_Declaration): Reformat the declarative
2752         region. Update the call to Build_Master_Renaming.
2753         (Expand_Previous_Access_Type): Rewritten.
2754         * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call):
2755         Add local constant Result_Subt and update related usage.
2756         (Expand_N_Extended_Return_Statement): Add local constant
2757         Result_Subt and update related usage.
2758         * exp_ch9.adb (Build_Activation_Chain): Rewritten to use the
2759         new context detection mechanism.
2760         (Build_Class_Wide_Master):
2761         Use Insert_Action to add the renaming into the tree.
2762         (Build_Master_Entity): Rewritten to use the new context detection
2763         mechanism.
2764         (Build_Master_Renaming): Add formal parameter Ins_Nod
2765         and related usage. Use Insert_Action to add the renaming into the
2766         tree.
2767         (Find_Enclosing_Context): New subsidiary routine. Rather
2768         than relying on enclosing scopes, this routine looks at the
2769         tree structure to figure out the proper context for a _master
2770         or a _chain. This approach eliminates the issues with transient
2771         scopes which have not been converted into blocks.
2772         * exp_ch9.ads (Build_Master_Entity): Change parameter profile
2773         to better reflect the new usage. Update the related comment.
2774         (Build_Master_Renaming): Add formal parameter Ins_Nod. Update
2775         the comment on usage.
2776         * sem_ch3.adb (Access_Definition): Update the calls to
2777         Build_Master_Entity and Build_Master_Renaming.
2778         * sem_ch6.adb (Create_Extra_Formals): Add local variable
2779         Full_Subt. Code reformatting.
2780         * sem_util.adb (Is_Iterator): Alphabetized.
2781         (Is_LHS): Alphabetized.
2782         (Is_Limited_Class_Wide_Type): New routine.
2783         * sem_util.ads (Is_Limited_Class_Wide_Type): New routine.
2784
2785 2011-10-13  Geert Bosch  <bosch@adacore.com>
2786
2787         * a-ngrear.adb (Solve): Make generic and move to
2788         System.Generic_Array_Operations.
2789         * s-gearop.ads (Matrix_Vector_Solution, Matrix_Matrix_Solution):
2790         New generic solvers to  compute a vector resp. matrix Y such
2791         that A * Y = X, approximately.
2792         * s-gearop.adb (Matrix_Vector_Solution, Matrix_Matrix_Solution):
2793         Implement using Forward_Eliminate and Back_Substitute
2794         * a-ngcoar.adb: Reimplement in pure Ada to remove dependencies
2795         on BLAS and LAPACK.
2796         * a-ngcoar.ads ("abs"): Fix return type to be real.
2797
2798 2011-10-13  Eric Botcazou  <ebotcazou@adacore.com>
2799
2800         PR ada/50589
2801         * s-linux-alpha.ads: Do not "with" Interfaces.C.
2802         * s-linux-sparc.ads: Likewise.
2803
2804 2011-10-13  Geert Bosch  <bosch@adacore.com>
2805
2806         * s-gearop.ads (Forward_Eliminate): Add "abs" formal function
2807         returning a Real.
2808         * s-gearop.adb (Forward_Eliminate): Remove local "abs" function
2809         and use formal.
2810         * a-ngrear.adb (Forward_Eliminate): Adjust instantiation for
2811         new profile.
2812
2813 2011-10-13  Geert Bosch  <bosch@adacore.com>
2814
2815         * a-ngrear.adb, s-gearop.adb, s-gearop.ads (Sqrt): Make generic and
2816         move to System.Generic_Array_Operations.
2817
2818 2011-10-13  Geert Bosch  <bosch@adacore.com>
2819
2820         * a-ngrear.adb ("abs"): Adjust for modified L2_Norm generic
2821         * s-gearop.ads (L2_Norm): Change profile to be suitable for
2822         Complex_Vector
2823         * s-gearop.adb (L2_Norm): Reimplement using direct definition,
2824         not inner product
2825
2826 2011-10-13  Robert Dewar  <dewar@adacore.com>
2827
2828         * exp_ch5.adb, sem_ch3.adb, impunit.adb, impunit.ads, sem_type.adb,
2829         prj-proc.adb, exp_ch9.adb, s-regpat.adb, sem_ch10.adb, sem_prag.adb,
2830         sem_ch12.adb, freeze.adb, sem_attr.adb, sem_attr.ads, gnatlink.adb,
2831         par-ch6.adb, exp_ch6.adb, sem_ch4.adb, sem_ch6.adb, sem_ch8.adb,
2832         par-util.adb, sem_ch13.adb, lib-xref.adb, g-trasym.adb, g-trasym.ads,
2833         exp_aggr.adb, s-taprop-posix.adb: Minor reformatting.
2834
2835 2011-10-13  Geert Bosch  <bosch@adacore.com>
2836
2837         * s-gearop.adb: Minor comment additions.
2838
2839 2011-10-13  Fedor Rybin  <frybin@adacore.com>
2840
2841         * gnat_ugn.texi: Add gnattest section.
2842
2843 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
2844
2845         * freeze.adb: Do not create body of renaming if declaration has
2846         errors.
2847
2848 2011-10-13  Olivier Hainque  <hainque@adacore.com>
2849
2850         * init.c (__gnat_error_handler - vxworks case): Restrict sigtramp calls
2851         further, to the ppc+kernel case only.
2852
2853 2011-10-13  Hristian Kirtchev  <kirtchev@adacore.com>
2854
2855         * exp_ch4.adb (Expand_N_Allocator): Comment reformatting.
2856         * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call):
2857         Do not create a pool formal on .NET/JVM.
2858         (Expand_N_Extended_Return_Statement): Alphabetize local
2859         variables. Do not create a renaming of the build-in-place pool
2860         parameter on .NET/JVM.  (Make_Build_In_Place_Call_In_Allocator):
2861         Add the user-defined pool only on non-VM targets.
2862         (Make_Build_In_Place_Call_In_Object_Declaration): Alphabetize
2863         local variables.  Do not add a pool actual on .NET/JVM.
2864         * sem_ch6.adb: Add with and use clause for Targparm.
2865         (Create_Extra_Formals): Add build-in-place pool formal only on
2866         non-VM targets.
2867         * rtsfind.ads: Alphabetize entries.
2868
2869 2011-10-13  Sergey Rybin  <rybin@adacore.com>
2870
2871         * gnat_ugn.texi: Minor correction.
2872
2873 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
2874
2875         * sem_ch8.adb: Minor error message improvement.
2876
2877 2011-10-13  Robert Dewar  <dewar@adacore.com>
2878
2879         * a-cbprqu.adb, a-ciorma.adb, exp_ch3.adb: Minor reformatting.
2880
2881 2011-10-13  Gary Dismukes  <dismukes@adacore.com>
2882
2883         * exp_ch5.adb (Expand_N_Loop_Statement): For the transformation
2884         of a for loop for an enumeration type with an enumeration rep
2885         clause, which involves moving the original loop parameter into
2886         a nested block, the loop parameter's entity must be removed from
2887         the entity list of the loop scope.
2888
2889 2011-10-13  Bob Duff  <duff@adacore.com>
2890
2891         * exp_ch6.ads (BIP_Storage_Pool): New "extra implicit parameter"
2892         that gets passed in the same cases where BIP_Alloc_Form is passed
2893         (caller-unknown-size results). BIP_Storage_Pool is used when
2894         BIP_Alloc_Form = User_Storage_Pool.  In that case, a pointer
2895         to the user-defined storage pool is passed at the call site,
2896         and this pool is used in callee to allocate the result.
2897         * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call): New
2898         version of Add_Alloc_Form_Actual_To_Build_In_Place_Call. Passes
2899         the additional BIP_Storage_Pool actual.
2900         (Expand_N_Extended_Return_Statement): Allocate the function
2901         result using the user-defined storage pool, if BIP_Alloc_Form =
2902         User_Storage_Pool.
2903         * sem_ch6.adb: Add the "extra formal" for BIP_Storage_Pool.
2904         * exp_ch4.adb: Don't overwrite storage pool set by
2905         Expand_N_Extended_Return_Statement.
2906         * s-stopoo.ads, rtsfind.ads (Root_Storage_Pool_Ptr): New type,
2907         for use in build-in-place function calls within allocators
2908         where the access type has a user-defined storage pool.
2909
2910 2011-10-13  Sergey Rybin  <rybin@adacore.com>
2911
2912         * gnat_ugn.texi, vms_data.ads: Add an option to control enumeration
2913         literal casing.
2914
2915 2011-10-13  Nicolas Roche  <roche@adacore.com>
2916
2917         * gnatlink.adb: Ensure that -mrtp is passed when runtime name ends
2918         with 'rtp'.
2919
2920 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
2921
2922         * sem_prag.adb (Analyze_Pragma, case Unchecked_Union): Take into
2923         account that an unchecked union type can be limited.
2924
2925 2011-10-13  Olivier Hainque  <hainque@adacore.com>
2926
2927         * init.c (__gnat_error_handler) <VxWorks version>: Add comments on
2928         the use of the signal trampoline for PPC in the sjlj case as well.
2929         Add legitimate casts, preventing compile time warnings on the
2930         (sighandler *) profile.
2931
2932 2011-10-13  Yannick Moy  <moy@adacore.com>
2933
2934         * sem_aggr.adb (Resolve_Aggr_Expr): Always perform semantic analysis
2935         in Alfa mode.
2936
2937 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
2938
2939         * sem_ch3.adb (OK_For_Limited_Init_In_05): Conditional and case
2940         expressions are legal limited return values if each one of their
2941         dependent expressions are legal.
2942
2943 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
2944
2945         * sem_ch6.adb (Analyze_Procedure_Call_Statement): In Ada 2012 mode,
2946         if the prefix of the call is a qualified expression, rewrite as
2947         a code statement.
2948         * sem_ch13.adb (Analyze_Code_Statement): In Ada 2012 mode, the
2949         code statement is legal if it is a rewriting of a procedure call.
2950
2951 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
2952
2953         * exp_aggr.adb (Flatten): If a component association has a box,
2954         assume that aggregate is not static.
2955         (Safe_Aggregate): If a component association in a non-limited
2956         aggregate has a box, assume that it cannot be expanded in place.
2957
2958 2011-10-13  Vincent Celier  <celier@adacore.com>
2959
2960         * prj-conf.adb (Get_Or_Create_Configuration_File): Call
2961         Process_Project_Tree_Phase_1 with Packages_To_Check.
2962         (Process_Project_And_Apply_Config): Ditto
2963         * prj-part.ads, prj-part.adb, prj-pars.ads, prj-pars.adb (Parse):
2964         Remove default for argument Packages_To_Check.
2965         * prj-proc.adb (Recursive_Process): New argument
2966         Packages_To_Check.
2967         (Process): Ditto.
2968         (Process_Project_Tree_Phase_1): Ditto.
2969         (Recursive_Project.Process_Aggregated_Projects): Call
2970         Prj.Part.Parse and Process_Project_Tree_Phase_1 with
2971         Packages_To_Check.
2972         * prj-proc.ads (Process): New argument Packages_To_Check
2973         (Process_Project_Tree_Phase_1): Ditto
2974
2975 2011-10-13  Arnaud Charlet  <charlet@adacore.com>
2976
2977         * gcc-interface/Makefile.in: Fix typo.
2978
2979 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
2980
2981         * sem_ch12.adb (Analyze_Formal_{Floating_Type,
2982         Signed_Integer_Type,  Decimal_Fixed_Point_Type, Discrete_Type}):
2983         Use sloc of defining identifier of farmal type declaration,
2984         as sloc of generated internal entity, to prevent misplaced
2985         references in ali.
2986
2987 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
2988
2989         * sem_intr.adb (Check_Intrinsic_Operator): Check that type
2990         is fully defined before checking that it is a numeric type.
2991
2992 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
2993
2994         * sem_aggr.adb (Resolve_Record_Aggregate): If a component
2995         association for component X has a box, then X is covered in the
2996         aggregate even if there is not default value for X in the type
2997         declaration, and X has to be default-initialized.
2998
2999 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
3000
3001         * sem_attr.adb (Check_Enum_Image, Analyze_Attribute case 'Value): Mark
3002         literals as referenced only if reference is in current source unit.
3003
3004 2011-10-13  Matthew Heaney  <heaney@adacore.com>
3005
3006         * a-csquin.ads (Enque, Dequeue): Mark interface operations as entries.
3007
3008 2011-10-13  Olivier Hainque  <hainque@adacore.com>
3009
3010         * sigtramp.h: New file.  Prototype and spec of the signal
3011         trampoline to be called by an established handler to provide
3012         dwarf call frame info before the real signal processing code.
3013         * sigtramp-ppcvxw.c: New file.  Implementation of the signal
3014         trampoline for ppc-vxworks.
3015         * init.c (vxworks section): Use it for ppc.
3016
3017 2011-10-13  Thomas Quinot  <quinot@adacore.com>
3018
3019         * par-ch2.adb, par.adb, par-util.adb, par-ch3.adb
3020         (Check_Future_Identifier): New subprogram,
3021         factors duplicated code from Par.Ch2.P_Identifier and
3022         Par.Ch3.P_Defining_Identifier.
3023
3024 2011-10-13  Thomas Quinot  <quinot@adacore.com>
3025
3026         * s-taprop-posix.adb (Initialize): Always raise Storage_Error
3027         if we fail to initialize CV attributes or CV.
3028
3029 2011-10-13  Thomas Quinot  <quinot@adacore.com>
3030
3031         * s-tasren.adb (Timed_Selective_Wait, case
3032         Accept_Alternative_Selected): Use Defer_Abort_Nestable, since
3033         we know abortion is already deferred.
3034
3035 2011-10-13  Hristian Kirtchev  <kirtchev@adacore.com>
3036
3037         * exp_ch3.adb (Build_Class_Wide_Master): Moved to exp_ch9.
3038         (Build_Master_Renaming (function)): Removed.
3039         (Build_Master_Renaming (procedure)): Moved to exp_ch9.
3040         (Expand_Full_Type_Declaration): Alphabetize
3041         variables. Reformatting of code and comments. Rewrite the
3042         section on processing of anonymous access-to-task types in
3043         record components.
3044         * exp_ch3.ads (Build_Class_Wide_Master): Moved to exp_ch9.
3045         (Build_Master_Renaming): Moved to exp_ch9.
3046         * exp_ch9.adb (Build_Class_Wide_Master): Moved from exp_ch3.
3047         (Build_Master_Entity): Add formal parameter
3048         Use_Current. Reformatting of code and comments.
3049         (Build_Master_Renaming): Moved from exp_ch3.
3050         * exp_ch9.ads (Build_Class_Wide_Master): Moved from
3051         exp_ch3. Update comment on usage.
3052         (Build_Master_Entity):
3053         Add formal parameter Use_Current. Update comment on usage.
3054         (Build_Master_Renaming): Moved from exp_ch3.
3055         * sem_ch3.adb (Access_Definition): Remove redundant code to
3056         create a _master and a renaming.
3057
3058 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
3059
3060         * lib-xref.adb: Do no emit reference to overridden operation,
3061         if it is internally generated.
3062
3063 2011-10-13  Vincent Celier  <celier@adacore.com>
3064
3065         * bindgen.adb: Remove any processing related to g-trasym
3066         * Makefile.rtl: Add g-trasym.o to GNATRTL_NONTASKING_OBJS
3067         * mlib-prj.adb: Remove any processing related to g-trasym.
3068
3069 2011-10-12  Eric Botcazou  <ebotcazou@adacore.com>
3070
3071         * sem_util.adb (Denotes_Same_Prefix): Fix fatal warning.
3072         * gcc-interface/Make-lang.in (WARN_ADAFLAGS): New.
3073         (ALL_ADAFLAGS): Include WARN_ADAFLAGS.
3074         (ADA_FLAGS_TO_PASS): Likewise.
3075         (COMMON_FLAGS_TO_PASS): New.
3076         (ADA_TOOLS_FLAGS_TO_PASS): Use COMMON_FLAGS_TO_PASS.  In the regular
3077         native case, also use FLAGS_TO_PASS and ADA_FLAGS_TO_PASS.
3078         (gnatlib): Use COMMON_FLAGS_TO_PASS.
3079         (ada.install-common): Likewise.
3080         (install-gnatlib): Likewise.
3081         (install-gnatlib-obj): Likewise.
3082         (gnattools): Use ADA_TOOLS_FLAGS_TO_PASS for gnattools1 as well.
3083         (gnat-cross): Delete.
3084         (gnatboot): Likewise.
3085         (gnatboot2): Likewise.
3086         (gnatboot3): Likewise.
3087         (gnatstage1): Likewise.
3088         (gnatstage2): Likewise.
3089         * gcc-interface/Makefile.in (SOME_ADAFLAGS): Likewise.
3090         (MOST_ADAFLAGS): Likewise.
3091         (LOOSE_CFLAGS): Likewise.
3092         (gnat-cross): Likewise.
3093         (GNATLIBFLAGS): Add -W -Wall.
3094         (GNATLIBCFLAGS_FOR_C): Likewise.
3095         * gcc-interface/lang.opt: Remove C-specific warnings.  Add doc lines.
3096         * gcc-interface/misc.c (gnat_handle_option): Remove obsolete cases.
3097
3098 2011-10-12  Eric Botcazou  <ebotcazou@adacore.com>
3099
3100         * gcc-interface/trans.c (Attribute_to_gnu): Use remove_conversions.
3101         (push_range_check_info): Likewise.
3102         (gnat_to_gnu) <N_Code_Statement>: Likewise.
3103         * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: Likewise.
3104         (gnat_invariant_expr): Likewise.
3105         * gcc-interface/utils.c (compute_related_constant): Likewise.
3106         (max_size): Fix handling of SAVE_EXPR.
3107         (remove_conversions): Fix formatting.
3108
3109 2011-10-12  Eric Botcazou  <ebotcazou@adacore.com>
3110
3111         * gcc-interface/ada-tree.h (DECL_LOOP_PARM_P): New flag.
3112         (DECL_INDUCTION_VAR): New macro.
3113         (SET_DECL_INDUCTION_VAR): Likewise.
3114         * gcc-interface/gigi.h (convert_to_index_type): Declare.
3115         (gnat_invariant_expr): Likewise.
3116         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: If this is a loop
3117         parameter, set DECL_LOOP_PARM_P on it.
3118         * gcc-interface/misc.c (gnat_print_decl) <VAR_DECL>: If DECL_LOOP_PARM_P
3119         is set, print DECL_INDUCTION_VAR instead of DECL_RENAMED_OBJECT.
3120         * gcc-interface/trans.c (gnu_loop_label_stack): Delete.
3121         (struct range_check_info_d): New type.
3122         (struct loop_info_d): Likewise.
3123         (gnu_loop_stack): New stack.
3124         (Identifier_to_gnu): Set TREE_READONLY flag on the first dereference
3125         built for a by-double-ref read-only parameter.  If DECL_LOOP_PARM_P
3126         is set, do not test DECL_RENAMED_OBJECT.
3127         (push_range_check_info): New function.
3128         (Loop_Statement_to_gnu): Push a new struct loop_info_d instead of just
3129         the label.  Reference the label and the iteration variable from it.
3130         Build the special induction variable in the unsigned version of the
3131         size type, if it is larger than the base type.  And attach it to the
3132         iteration variable if the latter isn't by-ref.  In the iteration scheme
3133         case, initialize the invariant conditions in front of the loop if
3134         deemed profitable.  Use gnu_loop_stack.
3135         (gnat_to_gnu) <N_Exit_Statement>: Use gnu_loop_stack.
3136         <N_Raise_Constraint_Error>: Always process the reason.  In the range
3137         check and related cases, and if loop unswitching is enabled, compute
3138         invariant conditions and push this information onto the stack.
3139         Do not translate again the condition if it has been already translated.
3140         * gcc-interface/utils.c (record_global_renaming_pointer): Assert that
3141         DECL_LOOP_PARM_P isn't set.
3142         (convert_to_index_type): New function.
3143         * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Use it in order
3144         to convert the index from the base index type to sizetype.
3145         (gnat_invariant_expr): New function.
3146
3147 2011-10-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
3148
3149         * gcc-interface/utils.c (def_builtin_1): Delete old interface with
3150         two parallel arrays to hold standard builtin declarations, and
3151         replace it with a function based interface that can support
3152         creating builtins on the fly in the future.
3153         * gcc-interface/trans.c (Exception_Handler_to_gnu_zcx): Ditto.
3154         (gnat_to_gnu): Ditto.
3155
3156 2011-10-07  Eric Botcazou  <ebotcazou@adacore.com>
3157
3158         PR lto/50492
3159         * gcc-interface/gigi.h (gnat_pushdecl): Adjust comment.
3160         * gcc-interface/utils.c (global_context): New variable.
3161         (gnat_pushdecl): Initialize it and set it as the DECL_CONTEXT of DECLs
3162         that are either public external or at top level.  Use "No" macro.
3163         (end_subprog_body): Call decl_function_context.
3164         (rest_of_subprog_body_compilation): Likewise.
3165
3166 2011-10-07  Eric Botcazou  <ebotcazou@adacore.com>
3167
3168         * gcc-interface/gigi.h (gnat_useless_type_conversion): Declare.
3169         (rest_of_subprog_body_compilation): Likewise.
3170         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: For renaming,
3171         test for useless conversions by means of gnat_useless_type_conversion.
3172         * gcc-interface/trans.c: Include bitmap.h and cgraph.h.
3173         (language_function): Add named_ret_val and other_ret_val.
3174         (f_named_ret_val): New macro.
3175         (f_other_ret_val): Likewise.
3176         (gigi): Call rest_of_subprog_body_compilation.
3177         (struct nrv_data): New structure.
3178         (is_nrv_p): New predicate.
3179         (prune_nrv_r): New helper function.
3180         (prune_nrv_in_block): New function.
3181         (finalize_nrv_r): New helper function.
3182         (finalize_nrv): New function.
3183         (return_value_ok_for_nrv_p): New predicate.
3184         (build_return_expr): If optimization is enabled, record candidates for
3185         the Named Return Value optimization.
3186         (build_function_stub): Call rest_of_subprog_body_compilation.
3187         (Subprogram_Body_to_gnu): If optimization is enabled and there are
3188         candidates, finalize the Named Return Value optimization.
3189         Call rest_of_subprog_body_compilation.
3190         (call_to_gnu): At the end, if a return value is needed, simplify the
3191         result before wrapping it up in a COMPOUND_EXPR.
3192         * gcc-interface/utils.c (end_subprog_body): Split into...
3193         (rest_of_subprog_body_compilation): ...this.  New function.
3194         (gnat_useless_type_conversion): Likewise.
3195
3196 2011-10-06  Thomas Quinot  <quinot@adacore.com>
3197
3198         * einfo.ads, exp_attr.adb, exp_ch3.adb, exp_ch4.adb, exp_ch7.adb,
3199         exp_ch9.adb, exp_ch9.ads, exp_strm.adb, exp_util.adb, freeze.adb,
3200         g-debpoo.ads, opt.ads, par-ch12.adb, par-ch2.adb, par-ch3.adb,
3201         par-ch5.adb, par-ch6.adb, sem_aggr.adb, sem_attr.adb, sem_cat.adb,
3202         sem_ch10.adb, sem_ch12.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
3203         sem_ch6.adb, sem_intr.adb, sem_res.ads, sem_type.adb, sem_util.adb,
3204         s-regpat.adb, s-tpopde-vms.ads: Minor reformatting.
3205         * s-osinte-freebsd.ads: Fix for tasking failures on FreeBSD.
3206
3207 2011-10-06  Ed Schonberg  <schonberg@adacore.com>
3208
3209         * a-cihase.adb, a-ciorma.adb: Avoid accessibility checks in container
3210         references.
3211
3212 2011-10-06  Matthew Heaney  <heaney@adacore.com>
3213
3214         * a-cuprqu.ads, a-cuprqu.adb, a-cbprqu.ads, a-cbprqu.adb
3215         (Dequeue_Only_High_Priority): Protected procedure now implemented.
3216
3217 2011-10-06  Vincent Celier  <celier@adacore.com>
3218
3219         * g-trasym.adb: Replace old implementation with the default
3220         implementation that returns list of addresses as "0x...".
3221         * g-trasym.ads: Update the list of platforms with the full
3222         capability.  Indicate that there is a default implementation
3223         for other platforms.
3224         * g-trasym-unimplemented.ads, g-trasym-unimplemented.adb: Remove.
3225         * gcc-interface/Makefile.in: Remove g-trasym-unimplemented, as there
3226         is now a default implementation for all platforms without the full
3227         capability.
3228
3229 2011-10-06  Robert Dewar  <dewar@adacore.com>
3230
3231         * a-ciorse.adb, a-cihase.adb, a-cihase.ads, a-coorse.adb,
3232         a-cborse.adb, a-comutr.adb, a-ciorma.adb, a-cbmutr.adb,
3233         a-cbmutr.ads, a-cbhase.adb, a-cbhase.ads: Minor reformatting and code
3234         reorganization (use conditional expressions).
3235
3236 2011-10-06  Robert Dewar  <dewar@adacore.com>
3237
3238         * sem_res.adb (Resolve_Arithmetic_Op): Fix bad warning for
3239         floating divide by zero.
3240
3241 2011-10-06  Ed Schonberg  <schonberg@adacore.com>
3242
3243         * sem_ch6.adb: Limited interfaces that are not immutably limited
3244         are OK in return statements.
3245
3246 2011-09-30  Iain Sandoe  <iains@gcc.gnu.org>
3247
3248         * gcc-interface/Makefile.in (Darwin): Partial reversion of previous
3249         change to powerpc section.
3250
3251 2011-09-29  Iain Sandoe  <iains@gcc.gnu.org>
3252
3253         * gcc-interface/Makefile.in (Darwin): Factor LIBGNAT_TARGET_PAIRS
3254         across the port.
3255
3256 2011-09-27  Ed Schonberg  <schonberg@adacore.com>
3257
3258         * a-cbhase.adb, a-cbhase.ads, a-cborse.adb, a-cborse.ads,
3259         a-cihase.adb, a-cihase.ads, a-ciorse.adb, a-ciorse.ads,
3260         a-coorse.adb, a-coorse.ads: Add iterator machinery to bounded sets and
3261         indefinite sets.
3262         * a-coorma.ads: Minor reformmating.
3263         * einfo.ads: Improve the comment describing the
3264         Directly_Designated_Type function.
3265         * a-ciorma.adb, a-ciorma.ads: Add iterator machinery to indefinite
3266         ordered maps.
3267         * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
3268         dependencies.
3269
3270 2011-09-27  Robert Dewar  <dewar@adacore.com>
3271
3272         * a-comutr.ads: Minor reformatting.
3273
3274 2011-09-27  Ed Schonberg  <schonberg@adacore.com>
3275
3276         * a-cimutr.adb, a-cimutr.ads, a-cbmutr.adb, a-cbmutr.ads: Add children
3277         iterators to multiway trees.
3278
3279 2011-09-27  Yannick Moy  <moy@adacore.com>
3280
3281         * debug.adb (d.D): New option for strict Alfa mode.
3282         * opt.ads (Strict_Alfa_Mode): New flag to interpret compiler
3283         permissions as strictly as possible.
3284         * sem_ch3.adb (Signed_Integer_Type_Declaration): In non-strict
3285         Alfa mode, now, interpret ranges of base types like GNAT does; in
3286         strict mode, simply change the range of the implicit base Itype.
3287         * gnat1drv.adb: Update comments. Set Strict_Alfa_Mode.
3288
3289 2011-09-27  Robert Dewar  <dewar@adacore.com>
3290
3291         * exp_ch9.adb: Minor comment fixes.
3292
3293 2011-09-27  Ed Schonberg  <schonberg@adacore.com>
3294
3295         * a-comutr.adb, a-comutr.ads: Add children iterators on multiway
3296         trees.
3297
3298 2011-09-27  Eric Botcazou  <ebotcazou@adacore.com>
3299
3300         * checks.adb (Apply_Scalar_Range_Check): Use Designated_Type
3301         instead of Directly_Designated_Type in the indirect array case.
3302
3303 2011-09-27  Robert Dewar  <dewar@adacore.com>
3304
3305         * exp_util.adb, exp_aggr.adb: Minor reformatting.
3306
3307 2011-09-27  Ed Schonberg  <schonberg@adacore.com>
3308
3309         * sinfo.ads, par-ch3.adb: Minor comment update: aspect specification
3310         on subtype declarations.
3311         * exp_aggr.adb: Minor comment update.
3312
3313 2011-09-27  Eric Botcazou  <ebotcazou@adacore.com>
3314
3315         * exp_util.adb (Safe_Prefixed_Reference): Remove always-false
3316         test in the N_Explicit_Dereference case.  Fold double logical
3317         negation in the special loop case and conditionalize it on
3318         Variable_Ref being true.
3319
3320 2011-09-27  Ed Schonberg  <schonberg@adacore.com>
3321
3322         * sem_ch4.adb (Analyze_Selected_Component): If the prefix is a
3323         single protected object and the selector is a discriminant or an
3324         entry family, this is a non-overloaded candidate interpretation,
3325         and possible primitive operations of the type must not be
3326         examined.
3327
3328 2011-09-27  Arnaud Charlet  <charlet@adacore.com>
3329
3330         * s-taspri-posix-noaltstack.ads (Lock): Mark fields aliased.
3331
3332 2011-09-27  Pascal Obry  <obry@adacore.com>
3333
3334         * s-osinte-hpux.ads, s-osinte-aix.ads, s-osinte-solaris-posix.ads,
3335         s-osinte-irix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads:
3336         Add dummy definitions for pthread_rwlock_t
3337         and pthread_rwlockattr_t on all POSIX platforms.
3338         * s-taprop-irix.adb, s-taprop-posix.adb (Initialize_Lock): Fix lock
3339         reference.
3340         (Finalize_Lock): Likewise.
3341         (Write_Lock): Likewise.
3342         (Unlock): Likewise.
3343
3344 2011-09-27  Tristan Gingold  <gingold@adacore.com>
3345
3346         * s-tassta.adb (Task_Wrapper): Increase Guard_Page_Size value for
3347         windows 64.
3348
3349 2011-09-27  Pascal Obry  <obry@adacore.com>
3350
3351         * s-osinte-hpux.ads, s-taprop-vxworks.adb, s-taspri-vxworks.ads,
3352         s-taprop-tru64.adb, s-osinte-aix.ads, s-taspri-posix-noaltstack.ads,
3353         s-taspri-mingw.ads, s-taprop-vms.adb, s-tpoben.adb, s-tpoben.ads,
3354         s-taprop-mingw.adb, s-taprob.adb, s-taprob.ads,
3355         s-osinte-solaris-posix.ads, s-taprop-solaris.adb, s-taspri-solaris.ads,
3356         s-osinte-irix.ads, s-taprop-irix.adb, s-osinte-darwin.ads,
3357         s-taspri-dummy.ads, s-taspri-posix.ads, s-taprop.ads,
3358         s-taspri-vms.ads, s-osinte-freebsd.ads, s-taprop-hpux-dce.adb,
3359         s-taspri-hpux-dce.ads, s-taspri-tru64.ads, s-taprop-dummy.adb,
3360         s-taprop-posix.adb: Revert previous changes.
3361         (Lock): Now a record containing the two possible lock
3362         (mutex and read/write) defined in OS_Interface.
3363         * s-taprop-linux.adb (Finalize_Protection): Use r/w lock for
3364         'R' locking policy.
3365         (Initialize_Protection): Likewise.
3366         (Lock): Likewise.
3367         (Lock_Read_Only): Likewise.
3368         (Unlock): Likewise.
3369
3370 2011-09-27  Pascal Obry  <obry@adacore.com>
3371
3372         * s-taspri-posix-noaltstack.ads (RW_Lock): This type is now defined as
3373         OS_Interface.pthread_rwlock_t.
3374
3375 2011-09-27  Robert Dewar  <dewar@adacore.com>
3376
3377         * exp_ch9.adb, a-cimutr.adb, a-cimutr.ads, gnat1drv.adb, a-comutr.adb,
3378         a-comutr.ads, exp_dist.adb, a-cbmutr.adb, a-cbmutr.ads,
3379         sem_ch5.adb, sem_util.adb: Minor reformatting.
3380
3381 2011-09-27  Pascal Obry  <obry@adacore.com>
3382
3383         * s-taprop.ads (Initialize_Lock)[RW_Lock]: New spec for r/w lock.
3384         (Finalize_Lock)[RW_Lock]: Likewise.
3385         (Write_Lock)[RW_Lock]: Likewise.
3386         (Unlock)[RW_Lock]: Likewise.
3387         (Read_Lock): Define L as RW_Lock (instead of Lock).
3388         * s-taprop-linux.adb (Initialize_Lock)[RW_Lock]: New
3389         routine for r/w lock.
3390         (Finalize_Lock)[RW_Lock]: Likewise.
3391         (Write_Lock)[RW_Lock]: Likewise.
3392         (Unlock)[RW_Lock]: Likewise.
3393         (Read_Lock): Define L as RW_Lock (instead of Lock).
3394
3395         * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
3396         s-taprop-mingw.adb, s-taprop-solaris.adb, s-taprop-irix.adb,
3397         s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb
3398         (Initialize_Lock)[RW_Lock]: Same implementation as corresponding
3399         routine for standard lock.
3400         (Finalize_Lock)[RW_Lock]: Likewise.
3401         (Write_Lock)[RW_Lock]: Likewise.
3402         (Unlock)[RW_Lock]: Likewise.
3403         (Read_Lock): Define L as RW_Lock (instead of Lock).
3404         * s-taprob.ads, s-tpoben.ads (Protection): Add RWL (RW_Lock)
3405         in the record definition.
3406         * s-taprob.adb, s-taproben.adb (Finalize_Protection): Use r/w
3407         lock for 'R' locking policy.
3408         (Initialize_Protection): Likewise.
3409         (Lock): Likewise.
3410         (Lock_Read_Only): Likewise.
3411         (Unlock): Likewise.
3412         * s-taspri-posix.ads (RW_Lock): New type defined as
3413         OS_Interface.pthread_rwlock_t.
3414
3415         * s-taspri-vxworks.ads, s-taspri-posix-noaltstack.ads,
3416         s-taspri-mingw.ads, s-taspri-solaris.ads, s-taspri-dummy.ads,
3417         s-taspri-posix.ads, s-taspri-vms.ads, s-taspri-hpux-dce.ads,
3418         s-taspri-tru64.ads (RW_Lock): New type defined as alias to Lock.
3419
3420 2011-09-27  Pascal Obry  <obry@adacore.com>
3421
3422         * exp_ch9.adb, s-taspri-posix.ads: Minor reformatting.
3423
3424 2011-09-27  Pascal Obry  <obry@adacore.com>
3425
3426         * s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads,
3427         s-osinte-hpux.ads, s-osinte-irix.ads,
3428         s-osinte-solaris-posix.ads (pthread_rwlock_t): New definition alias of
3429         pthread_mutex_t.
3430         (pthread_rwlockattr_t): New definition alias of pthread_mutexattr_t.
3431         * s-osinte-linux.ads (pthread_rwlock_t, pthread_rwlockattr_t,
3432         pthread_rwlockattr_init, pthread_rwlockattr_destroy,
3433         pthread_rwlockattr_setkind_np, pthread_rwlock_init,
3434         pthread_rwlock_destroy, pthread_rwlock_rdlock,
3435         pthread_rwlock_wrlock, pthread_rwlock_unlock): New.
3436
3437 2011-09-27  Pascal Obry  <obry@adacore.com>
3438
3439         * rtsfind.ads: Add RE_Lock_Read_Only into rtsfind circuitry.
3440         (RE_Id): Add RE_Lock_Read_Only.
3441         (RE_Unit_Table): Likewise.
3442         * sem_prag.adb (Process_Convention): Change Pragma_Locking_Policy
3443         to lift restriction on first character. Handle now the
3444         Name_Concurrent_Readers_Locking where policy character is set to
3445         'R'.
3446         * snames.ads-tmpl (Name_Concurrent_Readers_Locking): New
3447         constant.
3448         * exp_ch9.adb (Build_Protected_Subprogram_Body): Generate a
3449         read only lock for function in protected object.
3450         * s-taprob.ads (Lock_Read_Only): Remove obsolete comment as
3451         this routine is now used.
3452
3453 2011-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3454
3455         * s-atocou-x86.adb (Decrement): Use %;.
3456         (Increment): Likewise.
3457
3458 2011-09-26  Eric Botcazou  <ebotcazou@adacore.com>
3459
3460         * gcc-interface/utils2.c (build_allocator): Set TREE_THIS_NOTRAP on the
3461         dereference of the pointer to the storage area.  Remove useless type
3462         conversions and factor out common code.
3463
3464 2011-09-26  Eric Botcazou  <ebotcazou@adacore.com>
3465
3466         * gcc-interface/utils.c (maybe_unconstrained_array): Declare TYPE local
3467         variable and use it throughout.
3468         <UNCONSTRAINED_ARRAY_TYPE>: Add 'break' at the end.
3469         <RECORD_TYPE>: Do not unconditionally convert to the unpadded type as a
3470         first step.  Also convert to the unpadded type as a last step.
3471
3472 2011-09-26  Eric Botcazou  <ebotcazou@adacore.com>
3473
3474         * gcc-interface/gigi.h (create_subprog_decl): Replace TREE_CHAIN with
3475         DECL_CHAIN in comment.
3476         * gcc-interface/trans.c (gigi): Likewise.
3477         (Attribute_to_gnu): Likewise.
3478         (build_function_stub): Likewise.
3479         (gnat_to_gnu): Likewise.
3480         * gcc-interface/utils.c (create_subprog_decl): Likewise.
3481         (convert_vms_descriptor64): Likewise.
3482         (convert_vms_descriptor32): Likewise.
3483
3484 2011-09-26  Eric Botcazou  <ebotcazou@adacore.com>
3485
3486         * gcc-interface/trans.c (assoc_to_constructor): Minor tweaks.
3487         * gcc-interface/utils2.c (build_simple_component_ref): Fix formatting
3488         issues.  Use COMPLETE_TYPE_P in assertion.  Also set TREE_READONLY if
3489         the type of the record is TYPE_READONLY.
3490
3491 2011-09-26  Eric Botcazou  <ebotcazou@adacore.com>
3492             Robert Dewar  <dewar@adacore.com>
3493
3494         * sem_ch6.adb (Set_Formal_Mode): Set Can_Never_Be_Null on an IN or IN
3495         OUT formal parameter which is of an null-exclusion access subtype.
3496
3497 2011-09-26  Eric Botcazou  <ebotcazou@adacore.com>
3498
3499         * gcc-interface/ada-tree.h (DECL_CAN_NEVER_BE_NULL_P): New macro.
3500         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Set the flag.
3501         (gnat_to_gnu_param): Likewise.
3502         * gcc-interface/utils.c (convert) <UNCONSTRAINED_ARRAY_REF>: Invoke
3503         maybe_unconstrained_array instead of doing the work manually.
3504         (maybe_unconstrained_array): Propagate the TREE_THIS_NOTRAP flag.
3505         * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: If operand
3506         is a DECL with the flag, set TREE_THIS_NOTRAP on the reference.
3507         (gnat_stabilize_reference_1): Propagate the TREE_THIS_NOTRAP flag.
3508         (gnat_stabilize_reference): Likewise.
3509
3510 2011-09-26  Eric Botcazou  <ebotcazou@adacore.com>
3511
3512         * gcc-interface/ada-tree.h (TYPE_NULL_BOUNDS): New macro.
3513         (SET_TYPE_NULL_BOUNDS): Likewise.
3514         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Set again
3515         TREE_THIS_NOTRAP on the INDIRECT_REF node built for the template.
3516         * gcc-interface/trans.c (Identifier_to_gnu): Return initializers of fat
3517         pointer types.
3518         * gcc-interface/utils.c (create_var_decl_1): If the object is external,
3519         check that the initializer is a valid constant expression for use in
3520         initializing a static variable.  Add missing guard.
3521         (update_pointer_to): Adjust TYPE_NULL_BOUNDS if set.
3522         (convert_to_fat_pointer): In the null fat pointer case, build a valid
3523         pointer for the bounds.
3524         * gcc-interface/utils2.c (compare_fat_pointers): New function.
3525         (build_binary_op) <EQ_EXPR>: Call it to compare fat pointers.
3526
3527 2011-09-25  Eric Botcazou  <ebotcazou@adacore.com>
3528
3529         * gcc-interface/ada-tree.h (TREE_THIS_NOTRAP): Redefine.
3530         * gcc-interface/trans.c (Identifier_to_gnu): Factor out common code in
3531         the by-ref case.  Do not set TREE_READONLY on a renamed object.  Set
3532         TREE_THIS_NOTRAP on UNCONSTRAINED_ARRAY_REF nodes.
3533         (Attribute_to_gnu) <Attr_Length>: Expand the use of the parameter cache
3534         to the indirect case.
3535         * gcc-interface/utils.c (convert) <UNCONSTRAINED_ARRAY_REF>: Preserve
3536         the TREE_THIS_NOTRAP flag.
3537
3538 2011-09-25  Eric Botcazou  <ebotcazou@adacore.com>
3539
3540         * gcc-interface/trans.c (Loop_Statement_to_gnu): In the case of an
3541         iteration scheme, always generate the do-while form if optimization
3542         is enabled.  Use more straightforward test at the end.
3543
3544 2011-09-25  Eric Botcazou  <ebotcazou@adacore.com>
3545
3546         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Subtype>: Use
3547         XNEW instead of xmalloc.  Do not build useless pointer type.
3548         <E_Anonymous_Access_Subprogram_Type>: Use XNEW instead of xmalloc.
3549         * gcc-interface/trans.c (gnat_to_gnu) <N_Raise_Constraint_Error>: Tidy.
3550         * gcc-interface/utils2.c (build_unary_op): Remove local variable.
3551
3552 2011-09-25  Eric Botcazou  <ebotcazou@adacore.com>
3553
3554         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not promote
3555         the alignment if this doesn't prevent BLKmode access to the object.
3556
3557 2011-09-24  Iain Sandoe  <iains@gcc.gnu.org>
3558
3559         * gcc-interface/Makefile.in (darwin): Do not issue the
3560         '-flat_namespace' linker flag during Ada build.
3561         * mlib-tgt-specific-darwin.adb: Remove '-flat_namespace' flag from the
3562         default shared library options.
3563
3564 2011-09-19  Alexandre Oliva  <aoliva@redhat.com>
3565
3566         * gcc-interface/decl.c (annotate_value): Look up expression for
3567         insertion in the cache at the end.
3568
3569 2011-09-19  Arnaud Charlet  <charlet@adacore.com>
3570
3571         * gcc-interface/Make-lang.in: Update dependencies.
3572
3573 2011-09-19  Steve Baird  <baird@adacore.com>
3574
3575         * snames.ads-tmpl: Move declaration of Name_Annotate into range of
3576         configuration pragma names so that Is_Configuration_Pragma_Name
3577         will return True for Name_Annotate.  Make corresponding change in
3578         Pragma_Id enumeration type.  This is needed to allow an Annotate
3579         pragma to occur in a configuration pragma file (typically,
3580         a gnat.adc file).
3581         * gnat_ugn.texi: Add Annotate to the list of configuration pragmas.
3582         * gnat_rm.texi: Note that pragma Annotate may be used as a
3583         configuration pragma.
3584
3585 2011-09-19  Ed Schonberg  <schonberg@adacore.com>
3586
3587         * a-cbmutr.adb, a-cbmutr.ads, a-cimutr.adb, a-cimutr.ads,
3588         a-comutr.adb, a-comutr.ads: Add iterator machinery for multiway trees.
3589
3590 2011-09-19  Yannick Moy  <moy@adacore.com>
3591
3592         * exp_alfa.adb, exp_alfa.ads (Expand_Alfa_N_In): New function
3593         for expansion of set membership.
3594         (Expand_Alfa): Call expansion for N_In and N_Not_In nodes.
3595         * exp_ch4.adb, exp_ch4.ads (Expand_Set_Membership): Make procedure
3596         visible for use in Alfa expansion.
3597         * sem_ch5.adb (Analyze_Iterator_Specification): Introduce loop
3598         variable in Alfa mode.
3599
3600 2011-09-19  Thomas Quinot  <quinot@adacore.com>
3601
3602         * s-osinte-darwin.ads: Change SIGADAABRT on Darwin to SIGABRT.
3603
3604 2011-09-19  Thomas Quinot  <quinot@adacore.com>
3605
3606         * exp_ch9.adb: Minor reformatting.
3607
3608 2011-09-19  Hristian Kirtchev  <kirtchev@adacore.com>
3609
3610         * freeze.adb (Build_Renamed_Body): Generic subprograms
3611         instantiations cannot be poperly inlined by the compiler, do
3612         not set the Body_To_Inline attribute in such cases.
3613         * sem_ch12.adb (Analyze_Subprogram_Instantiation): Inherit all
3614         inlining-related flags from the generic subprogram declaration.
3615
3616 2011-09-19  Thomas Quinot  <quinot@adacore.com>
3617
3618         * exp_dist.adb, rtsfind.ads, sem_util.adb, sem_util.ads
3619         (Build_Stub_Type): Remove, instead copy components from
3620         System.Partition_Interface.RACW_Stub_Type.
3621         (RPC_Receiver_Decl): Remainder of code from old Build_Stub_Type routine.
3622         (Copy_Component_List): New subprogram.
3623
3624 2011-09-19  Yannick Moy  <moy@adacore.com>
3625
3626         * lib-xref.adb (Generate_Reference): Ignore references to
3627         constants in Standard.
3628
3629 2011-09-19  Robert Dewar  <dewar@adacore.com>
3630
3631         * err_vars.ads, errout.ads: Minor reformatting.
3632
3633 2011-09-19  Robert Dewar  <dewar@adacore.com>
3634
3635         * aspects.ads (Impl_Defined_Aspects): New array
3636         * lib-writ.adb (No_Dependences): New name for No_Dependence
3637         * restrict.adb (No_Dependences): New name for No_Dependence
3638         (Check_Restriction_No_Specification_Of_Aspect): New
3639         procedure.
3640         (Set_Restriction_No_Specification_Of_Aspect): New procedure
3641         (Restricted_Profile_Result): New variable
3642         (No_Specification_Of_Aspects): New variable
3643         (No_Specification_Of_Aspect_Warning): New variable
3644         * restrict.ads (No_Dependences): New name for No_Dependence
3645         (Check_Restriction_No_Specification_Of_Aspect): New procedure
3646         (Set_Restriction_No_Specification_Of_Aspect): New procedure
3647         * s-rident.ads: Add restriction
3648         No_Implementation_Aspect_Specifications, this is also added to
3649         the No_Implementation_Extensions profile.
3650         * sem_ch13.adb (Analyze_Aspect_Specifications): Check
3651         No_Implementation_Defined_Aspects
3652         (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect
3653         * sem_prag.adb (Analyze_Aspect_Specifications): Check
3654         No_Implementation_Aspects
3655         (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect
3656         * snames.ads-tmpl (Name_No_Specification_Of_Aspect): New name
3657
3658 2011-09-19  Yannick Moy  <moy@adacore.com>
3659
3660         * lib-xref.adb (Generate_Reference): Take into account multiple
3661         renamings for Alfa refs.
3662
3663 2011-09-19  Thomas Quinot  <quinot@adacore.com>
3664
3665         * g-socthi-mingw.adb: Minor reformatting.
3666
3667 2011-09-19  Yannick Moy  <moy@adacore.com>
3668
3669         * gnat1drv.adb (Adjust_Global_Switches): Set tagged type
3670         expansion to False in mode Alfa
3671
3672 2011-09-19  Pascal Obry  <obry@adacore.com>
3673
3674         * mingw32.h: Remove obsolete code needed for old versions
3675         of MingW.
3676
3677 2011-09-19  Robert Dewar  <dewar@adacore.com>
3678
3679         * errout.ads: Minor reformatting.
3680
3681 2011-09-19  Ed Schonberg  <schonberg@adacore.com>
3682
3683         * sem_ch6.adb (Analyze_Expression_Function): When the expression
3684         function is transformed into a declaration and a body, insert
3685         body at the end of the declarative part, to prevent premature
3686         freeze actions, and preserve original specification in the
3687         subprogram declaration.
3688
3689 2011-09-19  Vincent Celier  <celier@adacore.com>
3690
3691         * projects.texi: Minor editing.
3692
3693 2011-09-19  Robert Dewar  <dewar@adacore.com>
3694
3695         * sem_aggr.adb, lib-writ.ads, s-restri.ads, sem_ch6.adb,
3696         exp_aggr.adb: Minor reformatting.
3697
3698 2011-09-19  Yannick Moy  <moy@adacore.com>
3699
3700         * lib-xref.adb (Generate_Reference): Change entity referenced
3701         to underlying object if any, or else reference to the HEAP.
3702
3703 2011-09-15  Arnaud Charlet  <charlet@adacore.com>
3704
3705         * gcc-interface/Make-lang.in: Update dependencies.
3706
3707 2011-09-15  Robert Dewar  <dewar@adacore.com>
3708
3709         * tree_io.ads: Minor reformatting.
3710         * a-intnam.ads: Fix bad header.
3711
3712 2011-09-15  Thomas Quinot  <quinot@adacore.com>
3713
3714         * a-exexpr-gcc.adb: Minor reformatting.
3715
3716 2011-09-15  Yannick Moy  <moy@adacore.com>
3717
3718         * sem_ch6.adb: Propagate information that an expression function comes
3719         from source (otherwise references to this entity are not stored).
3720
3721 2011-09-15  Robert Dewar  <dewar@adacore.com>
3722
3723         * a-cdlili.adb, a-coinve.adb, a-stzunb-shared.ads, a-suezst.adb,
3724         a-suenco.adb, a-stwiun-shared.ads, a-cobove.adb, a-convec.adb,
3725         a-btgbso.adb, a-cbdlli.adb, a-suewst.adb: Minor reformatting.
3726
3727 2011-09-15  Ed Schonberg  <schonberg@adacore.com>
3728
3729         * sem_ch6.adb (Analyze_Expression_Function): Code cleanup:
3730         if the expression function is not a completion, create a
3731         new specification for the generated declaration, and keep the
3732         original specification in the generated body. Shorter code also
3733         ensures that proper warnings are generated for unused formals
3734         in all cases.
3735
3736 2011-09-15  Sergey Rybin  <rybin@adacore.com>
3737
3738         * tree_io.ads: Update ASIS_Version_Number because of the changes
3739         in the tree structures for expression functions.
3740
3741 2011-09-15  Arnaud Charlet  <charlet@adacore.com>
3742
3743         * s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads,
3744         s-osinte-hpux.ads, s-osinte-lynxos.ads, s-osinte-solaris-posix.ads,
3745         s-taprop-posix.adb (CLOCK_MONOTONIC): New constant.
3746         (CLOCK_REALTIME): Fix wrong value on some OSes.
3747         * s-taprop-posix.adb (Monotonic_Clock): Use CLOCK_MONOTONIC.
3748
3749 2011-09-11  Eric Botcazou  <ebotcazou@adacore.com>
3750
3751         * gcc-interface/utils.c (maybe_unconstrained_array): In the reference
3752         to unconstrained array case, deal with each branch of a COND_EXPR.
3753         * gcc-interface/utils2.c (build_allocator): Deal with each branch of
3754         a COND_EXPR in the initializer, if present.
3755
3756 2011-09-11  Eric Botcazou  <ebotcazou@adacore.com>
3757
3758         * gcc-interface/decl.c (maybe_pad_type): Do not try to change the form
3759         of an addressable type.
3760         * gcc-interface/trans.c (gnat_gimplify_expr) <VIEW_CONVERT_EXPR>: New.
3761         Deal with those cases for which creating a temporary is mandatory.
3762
3763 2011-09-11  Eric Botcazou  <ebotcazou@adacore.com>
3764
3765         * gcc-interface/trans.c (call_to_gnu): Use local variable.  Make sure
3766         this is a real formal parameter before testing whether it is by ref.
3767
3768 2011-09-11  Eric Botcazou  <ebotcazou@adacore.com>
3769
3770         * gcc-interface/gigi.h (build_call_0_expr): Delete.
3771         (build_call_1_expr): Likewise.
3772         (build_call_2_expr): Likewise.
3773         (build_call_n_expr): New prototype.
3774         * gcc-interface/decl.c (gnat_to_gnu_entity): Use build_call_n_expr.
3775         * gcc-interface/trans.c (establish_gnat_vms_condition_handler): Ditto.
3776         (Handled_Sequence_Of_Statements_to_gnu): Likewise.
3777         (Exception_Handler_to_gnu_zcx): Likewise.
3778         (gnat_to_gnu): Likewise.
3779         (build_binary_op_trapv): Likewise.
3780         * gcc-interface/utils2.c (build_call_0_expr): Delete.
3781         (build_call_1_expr): Likewise.
3782         (build_call_2_expr): Likewise.
3783         (build_call_n_expr): New function.
3784         (build_call_raise): Use build_call_n_expr.
3785         (build_call_raise_range): Likewise.
3786         (build_call_raise_column): Likewise.
3787         (build_call_alloc_dealloc_proc): Likewise.
3788         (maybe_wrap_malloc): Likewise.
3789         (maybe_wrap_free): Likewise.
3790
3791 2011-09-11  Eric Botcazou  <ebotcazou@adacore.com>
3792
3793         * gcc-interface/trans.c (build_return_expr): Use void_type_node for
3794         MODIFY_EXPR.
3795         * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Assert that
3796         the result type is null if ENABLE_CHECKING.  Set operation_type at the
3797         end unconditionally if not set in the previous cases.
3798         Use build2 and void_type_node for MODIFY_EXPR.
3799         (build_allocator): Use NULL_TREE for MODIFY_EXPR.
3800
3801 2011-09-08  Eric Botcazou  <ebotcazou@adacore.com>
3802
3803         * gcc-interface/utils.c (unchecked_convert): Use a field of the right
3804         precision when converting to or from an integral type whose precision
3805         is not equal to its size.
3806
3807 2011-09-08  Iain Sandoe  <iains@gcc.gnu.org>
3808
3809         * traceback.c (Darwin) USE_GCC_UNWINDER for Darwin versions >= 8.
3810
3811 2011-09-07  Iain Sandoe  <iains@gcc.gnu.org>
3812
3813         * gcc-interface/Makefile.in (darwin): Provide powerpc64 system
3814         implementation.
3815         * system-darwin-ppc64.ads: New file.
3816
3817 2011-09-06  Iain Sandoe  <iains@gcc.gnu.org>
3818
3819         * gcc-interface/Makefile.in (gnatlib-shared-darwin): Remove
3820         reference to "-lm".
3821
3822 2011-09-06  Iain Sandoe  <iains@gcc.gnu.org>
3823
3824         * gcc-interface/Makefile.in (darwin, SO_OPTS): Provide architecture
3825         size switches to the link phase for shared libs.
3826
3827 2011-09-06  Iain Sandoe  <iains@gcc.gnu.org>
3828
3829         * gcc-interface/Makefile.in (x86_64 darwin arch): Adjust
3830         LIBGNAT_TARGET_PAIRS for x86 and x86_64 variants.
3831
3832 2011-09-06  Arnaud Charlet  <charlet@adacore.com>
3833
3834         * gcc-interface/Makefile.in, gcc-interface/Make-lang.in
3835         (gnattools, regnattools, cross-gnattools, canadian-gnattools,
3836         gnatlib, gnatlib-sjlj, gnatlib-zcx, gnatlib-shared, gnatlib_and_tools):
3837         New targets.
3838         (TOOLS_FLAGS_TO_PASS): New.
3839         (../stamp-tools): Reintroduce, to avoid merge conflicts.
3840
3841 2011-09-06  Robert Dewar  <dewar@adacore.com>
3842
3843         * sem_ch10.adb, impunit.ads, impunit.adb (Not_Impl_Defined_Unit): New
3844         name for Is_RM_Defined_Unit. Also several fixes to this unit.
3845
3846 2011-09-06  Robert Dewar  <dewar@adacore.com>
3847
3848         * impunit.ads, impunit.adb (Is_RM_Defined_Unit): New function.
3849         * s-rident.ads: New restriction No_Implementation_Units
3850         (this restriction is also part of the profile
3851         No_Implementation_Extensions)
3852         * sem_ch10.adb (Analyze_With_Clause): Add check for
3853         No_Implementation_Units restriction.
3854
3855 2011-09-06  Jerome Guitton  <guitton@adacore.com>
3856
3857         * sysdep.c (__gnat_get_task_options): Disable VX_SPE_TASK
3858         on vThreads.
3859
3860 2011-09-06  Thomas Quinot  <quinot@adacore.com>
3861
3862         * s-solita.adb: Minor reformatting.
3863
3864 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
3865
3866         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The body that
3867         is a rewriting of an expression function does not freeze previous
3868         entities.
3869
3870 2011-09-06  Robert Dewar  <dewar@adacore.com>
3871
3872         * impunit.adb (Is_Known_Unit): Fix bad handling of Ada 2012 case
3873
3874 2011-09-06  Tristan Gingold  <gingold@adacore.com>
3875
3876         * gcc-interface/Makefile.in: Handle e500v2-wrs-vxworksae like
3877         powerpc-wrs-vxworksae.
3878
3879 2011-09-06  Thomas Quinot  <quinot@adacore.com>
3880
3881         * s-os_lib.ads (Spawn): Minor documentation clarification,
3882         Success is True for a zero exit status.
3883
3884 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
3885
3886         * sem_ch5.adb: Add message for common iterator error.
3887
3888 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
3889
3890         * exp_ch3.adb (Build_Initialization_Call): If the target is a
3891         selected component discriminated by a current instance, replace
3892         the constraint with a reference to the target object, regardless
3893         of whether the context is an init_proc.
3894
3895 2011-09-06  Robert Dewar  <dewar@adacore.com>
3896
3897         * exp_attr.adb: Descriptor_Size is never static.
3898
3899 2011-09-06  Robert Dewar  <dewar@adacore.com>
3900
3901         * gnat_ugn.texi: Add documentation for LSLOC metric in gnatmetric
3902
3903 2011-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
3904
3905         * gnat_rm.texi: Clarify that attribute Descriptor_Size is
3906         non-static.
3907
3908 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
3909
3910         * sem_res.adb (Resolve): An expression that is the body of an
3911         expression function does not freeze.
3912
3913 2011-09-06  Matthew Heaney  <heaney@adacore.com>
3914
3915         * a-csquin.ads, a-cusyqu.adb, a-cbprqu.adb, a-cbsyqu.adb,
3916         a-cuprqu.adb: Changed copyright notice to indicate current
3917         year only.
3918
3919 2011-09-06  Vincent Celier  <celier@adacore.com>
3920
3921         * prj.adb: Minor spelling error fix in comment
3922         * sem_res.adb: Minor reformatting
3923
3924 2011-09-06  Pascal Obry  <obry@adacore.com>
3925
3926         * sysdep.c (winflush_nt): Removed as not needed anymore.
3927         (winflush_95): Likewise.
3928         (winflush_init): Likewise.
3929         (winflush_function): Likewise.
3930         (getc_immediate_common): Remove call to winflush_function.
3931
3932 2011-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
3933
3934         * exp_attr.adb (Expand_N_Attribute_Reference): Rewrite the
3935         processing for Descriptor_Size.
3936         * gnat_rm.texi: Rephrase the wording for attribute Descriptor_Size
3937         to account for its broader usage.
3938         * sem_attr.adb (Analyze_Attribute): Change the error detection
3939         circuitry for Descriptor_Size as the attribute is now applicable
3940         to all types.
3941
3942 2011-09-06  Robert Dewar  <dewar@adacore.com>
3943
3944         * sem_attr.adb, prj-nmsc.adb, exp_aggr.adb: Minor reformatting.
3945
3946 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
3947
3948         * lib-xref.adb (OK_To_Set_Referenced): A reference to a formal
3949         in a parameter association must not set the Referenced flag on
3950         the formal.
3951         * prj-nmsc.adb (Check_File_Naming_Schemes): Remove useless formal
3952
3953 2011-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
3954
3955         * gnat_rm.texi: Add a section on attribute Descriptor_Size
3956
3957 2011-09-06  Arnaud Charlet  <charlet@adacore.com>
3958
3959         * gcc-interface/Makefile.in (common-tools, gnatmake-re,
3960         gnatlink-re): Speed up by using -j0.
3961
3962 2011-09-06  Yannick Moy  <moy@adacore.com>
3963
3964         * sem_ch13.adb (Analyze_Aspect_Specifications): Call
3965         Set_Corresponding_Aspect when creating pragma from aspect.
3966         (Add_Predicates): Use new field Corresponding_Aspect.
3967         * sem_prag.adb (Analyze_Pragma): Make Pname hold source aspect
3968         name when present, for the purpose of issuing error messages;
3969         remove local procedure Error_Pragma_Arg_Alternate_Name.
3970         * sinfo.adb, sinfo.ads (Corresponding_Aspect): New field in
3971         N_Pragma node.
3972         (From_Dynamic_Predicate, From_Static_Predicate): Remove fields from
3973         N_Pragma node.
3974
3975 2011-09-06  Robert Dewar  <dewar@adacore.com>
3976
3977         * checks.adb, s-except.ads, g-socket.adb: Minor reformatting.
3978
3979 2011-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
3980
3981         * exp_ch6.adb (Build_Heap_Allocator): Add new
3982         local variable Desig_Typ. Code and comment reformatting. Add
3983         machinery to ensure that the allocation uses a fat pointer when
3984         the type of the return object is a constrained array and the
3985         function return type is an unconstrained array.
3986
3987 2011-09-06  Vincent Celier  <celier@adacore.com>
3988
3989         * make.adb, prj-part.adb, prj-nmsc.adb: Remove unused formal
3990         parameters in subprograms.
3991
3992 2011-09-06  Arnaud Charlet  <charlet@adacore.com>
3993
3994         * s-taprop-mingw.adb (Finalize_TCB): Fix typo.
3995
3996 2011-09-06  Thomas Quinot  <quinot@adacore.com>
3997
3998         * s-taprop-vxworks.adb, s-tpoaal.adb, s-tpopsp-vxworks.adb
3999         (System.Tasking.Primitive_Operations.Specific.Delete): Remove
4000         subprogram.
4001         (System.Tasking.Primitive_Operations.Specific.Set): If argument
4002         is null, destroy task specific data, to make API consistent with
4003         other platforms, and thus compatible with the shared version
4004         of s-tpoaal.adb.
4005         (System.Tasking.Primitive_Operations.ATCB_Allocation.Free_ATCB):
4006         Document the above assumption.
4007
4008 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
4009
4010         * exp_ch6.adb (Expand_Inlined_Call): Fix use of uninitialized
4011         variable for type of return value when return type is
4012         unconstrained and context is an assignment.
4013
4014 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
4015
4016         * sem_ch8.adb (Check_Class_Wide_Actual): Do not generate body of
4017         class-wide operation if expansion is not enabled.
4018
4019 2011-09-06  Eric Botcazou  <ebotcazou@adacore.com>
4020
4021         * checks.adb (Apply_Scalar_Range_Check): Deal with access
4022         type prefix.
4023
4024 2011-09-06  Yannick Moy  <moy@adacore.com>
4025
4026         * sem_ch13.adb (Analyze_Aspect_Specifications, case
4027         Aspect_Invariant): Do not issue error at this point on illegal
4028         pragma placement, as this is checked later on when analyzing
4029         the corresponding pragma.
4030         * sem_prag.adb (Error_Pragma_Arg_Alternate_Name): New procedure
4031         similar to Error_Pragma_Arg, except the source name of the
4032         aspect/pragma to use in warnings may be equal to parameter
4033         Alt_Name (Analyze_Pragma, case Pragma_Invariant): refine error
4034         message to distinguish source name of pragma/aspect, and whether
4035         the illegality resides in the type being public, or being private
4036         without a public declaration
4037
4038 2011-09-06  Thomas Quinot  <quinot@adacore.com>
4039
4040         * g-socket.adb (Check_For_Fd_Set): On Windows, no need for bitmap
4041         size check (fd_set is implemented differently on that platform).
4042
4043 2011-09-06  Thomas Quinot  <quinot@adacore.com>
4044
4045         * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
4046         s-tpoaal.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
4047         s-taprop-solaris.adb, s-taprop-irix.adb, s-taprop.ads,
4048         s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb
4049         (ATCB_Allocation): New subpackage of
4050         System.Tasking.Primitive_Operations, shared across all targets
4051         with full tasking runtime.
4052         (ATCB_Allocation.New_ATCB): Moved there (from target specific
4053         s-taprop bodies).
4054         (ATCB_Allocation.Free_ATCB): New subprogram. Deallocate an ATCB,
4055         taking care of establishing a local temporary ATCB if the one
4056         being deallocated is Self, to avoid a reference to the freed
4057         ATCB in Abort_Undefer.
4058
4059 2011-09-06  Thomas Quinot  <quinot@adacore.com>
4060
4061         * s-tassta.adb, s-taskin.ads (Free_Task): If the task is not
4062         terminated, mark it for deallocation upon termination.
4063         (Terminate_Task): Call Free_Task again if the task is marked
4064         for automatic deallocation upon termination.
4065
4066 2011-09-06  Robert Dewar  <dewar@adacore.com>
4067
4068         * a-cbprqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cusyqu.ads,
4069         a-intnam-aix.ads, a-intnam-darwin.ads, a-intnam-dummy.ads,
4070         a-intnam-freebsd.ads, a-intnam-hpux.ads, a-intnam-irix.ads,
4071         a-intnam-linux.ads, a-intnam-lynxos.ads, a-intnam-mingw.ads,
4072         a-intnam-solaris.ads, a-intnam-tru64.ads,
4073         a-intnam-vms.ads, a-intnam-vxworks.ads, a-intnam.ads, interfac.ads,
4074         cstand.adb, s-maccod.ads: Mark all entities as Implementation_Defined
4075         * einfo.ads, einfo.adb (Is_Implementation_Defined): New flag
4076         * par-prag.adb: Add dummy entry for pragma Implementation_Defined
4077         * s-rident.ads: Add new restriction No_Implementation_Identifiers
4078         Add new profile No_Implementation_Extensions
4079         * sem_prag.adb: Implement pragma Implementation_Defined Implement
4080         profile No_Implementation_Extensions
4081         * sem_util.adb: Minor reformatting (Set_Entity_With_Style_Check):
4082         Check violation of restriction No_Implementation_Identifiers
4083         * snames.ads-tmpl: Add entries for pragma Implementation_Defined
4084         Add entry for Name_No_Implementation_Extensions
4085
4086 2011-09-06  Robert Dewar  <dewar@adacore.com>
4087
4088         * impunit.ads: Minor reformatting.
4089
4090 2011-09-06  Robert Dewar  <dewar@adacore.com>
4091
4092         * ali.adb, sem_ch13.adb, lib-xref.adb: Minor reformatting.
4093
4094 2011-09-06  Pascal Obry  <obry@adacore.com>
4095
4096         * s-osinte-linux.ads, s-oscons-tmplt.c: Use oscons to define sigset_t
4097         types.
4098
4099 2011-09-06  Robert Dewar  <dewar@adacore.com>
4100
4101         * g-socket.adb: Minor reformatting
4102
4103 2011-09-06  Javier Miranda  <miranda@adacore.com>
4104
4105         * ali.adb (Scan_ALI): Add missing support to load references of
4106         entities imported from other languages.
4107         * ali.ads (Xref_Record): Adding new fields to store the language and
4108         name of an imported entity.
4109         * lib-xref.adb (Output_Import_Export_Info): Fix typo
4110         in comment.
4111
4112 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
4113
4114         * sem_prag.adb (Analyze_Pragma, case Type_Invariant): A type invariant
4115         is allowed on a full type declaration if it is the completion of
4116         a private declarations.
4117         * sem_ch13.adb (Analyze_Aspect_Specifications): An invariant
4118         aspect is allowed on a full type declaration in the private part
4119         of a package.
4120
4121 2011-09-06  Robert Dewar  <dewar@adacore.com>
4122
4123         * sem_ch8.ads: Minor reformatting
4124
4125 2011-09-06  Thomas Quinot  <quinot@adacore.com>
4126
4127         * s-oscons-tmplt.c, g-socket.adb (GNAT.Sockets.Clear,Set,Is_Set):
4128         Guard against socket values that are not in [0;FD_SETSIZE[
4129
4130 2011-09-06  Robert Dewar  <dewar@adacore.com>
4131
4132         * s-osinte-linux.ads, a-iteint.ads, exp_ch6.adb, s-solita.adb: Minor
4133         reformatting.
4134
4135 2011-09-06  Arnaud Charlet  <charlet@adacore.com>
4136
4137         * s-linux-alpha.ads: Minor reformatting
4138         * s-oscons-tmplt.c: Fix generated comments in s-oscons template.
4139         Use sizeof instead of corresponding C defines in s-oscons template.
4140
4141 2011-09-06  Vadim Godunko  <godunko@adacore.com>
4142
4143         * a-convec.ads, a-iteint.ads: Minor reformatting.
4144
4145 2011-09-06  Vincent Celier  <celier@adacore.com>
4146
4147         * projects.texi: Add menus and @node lines.
4148
4149 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
4150
4151         * exp_ch6.adb (Expand_Inlined_Call): Handle properly the case
4152         where the return type is an unconstrained array and the context
4153         is an assignment. Optimize the case when the target of the
4154         assignment is a selected component.
4155
4156 2011-09-06  Arnaud Charlet  <charlet@adacore.com>
4157
4158         * s-solita.adb: Update comments.
4159
4160 2011-09-06  Pascal Obry  <obry@adacore.com>
4161
4162         * s-linux.ads, s-linux-alpha.ads, s-linux-hppa.ads, s-linux-mipsel.ads,
4163         s-linux-sparc.ads: Remove hard coded and now wrong definitions.
4164         * s-oscons-tmplt.c: Add support for generating pthread related
4165         types size on GNU/Linux as done for Darwin.
4166         * s-osinte-linux.ads: Use s-oscons to define the pthread types.
4167
4168 2011-09-06  Robert Dewar  <dewar@adacore.com>
4169
4170         * exp_ch6.adb: Fix minor typo.
4171
4172 2011-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
4173
4174         * exp_ch7.adb: Remove with and use clauses for Get_Targ.
4175         (Alignment_Of): Moved to the body of Nearest_Multiple_Rounded_Up.
4176         (Double_Size_Of): Alphabetized. Update the comment on usage.
4177         (Make_Finalize_Address_Stmts): Update comments and reformat code.
4178         (Nearest_Multiple_Rounded_Up): New routine.
4179         (Size_Of): Update comment on usage. The generated expression now
4180         accounts for alignment gaps by rounding the size of the type to the
4181         nearest multiple rounded up of the type's alignment.
4182
4183 2011-09-06  Robert Dewar  <dewar@adacore.com>
4184
4185         * exp_ch7.adb, g-comlin.adb: Minor reformatting.
4186
4187 2011-09-06  Steve Baird  <baird@adacore.com>
4188
4189         * exp_ch4.adb (Expand_Allocator_Expression): Look through
4190         derived subprograms in checking for presence of an
4191         Extra_Accessibility_Of_Result formal parameter.
4192         * exp_ch6.adb (Expand_Call): Look through derived subprograms in
4193         checking for presence of an Extra_Accessibility_Of_Result formal
4194         parameter.
4195         (Expand_Call.Add_Actual_Parameter): Fix a bug in the
4196         case where the Parameter_Associatiations attribute is already set,
4197         but set to an empty list.
4198         (Needs_Result_Accessibility_Level):
4199         Unconditionally return False. This is a temporary
4200         change, disabling the Extra_Accessibility_Of_Result
4201         mechanism.
4202         (Expand_Simple_Function_Return): Check for
4203         Extra_Accessibility_Of_Result parameter's presence instead of
4204         testing Ada_Version when generating a runtime accessibility
4205         check which makes use of the parameter.
4206
4207 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
4208
4209         * exp_ch4.adb (Expand_N_Case_Expression): Actions created for the
4210         expression in a given case alternative must be attached to the
4211         statement list of the ccrresponding case statement alternative
4212         They cannot be propagated ahead of the case statement, because
4213         the validity of the expression that generated the action may
4214         hold only for that alternative.
4215
4216 2011-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
4217
4218         * exp_ch7.adb: Remove with and use clauses for Get_Targ.
4219         (Alignment_Of): Remove the code for strict alignment targets.
4220         (Double_Alignment_Of): Removed.
4221         (Double_Size_Of): New routine.
4222         (Make_Finalize_Address_Stmts): Change the
4223         calculation of the dope's size.  Update relevant comments.
4224         (Size_Of): New routine.
4225
4226 2011-09-06  Steve Baird  <baird@adacore.com>
4227
4228         * einfo.ads (Extra_Accessibility): Update associated comment to use
4229         the term "present" correctly ("present" just means that it is not
4230         an error to query the value of the attribute - it does not imply
4231         that the value must be non-null).
4232         (Extra_Constrained): Ditto.
4233         (Is_Visible_Formal): Ditto.
4234         (Extra_Accessibility_Of_Result) Ditto; also add Inline pragma.
4235         (Set_Extra_Accessibility_Of_Result): Add Inline pragma.
4236         * exp_ch4.adb (Expand_Allocator_Expression): Improve a comment.
4237         * exp_ch6.adb (Expand_Call): The callee may require an
4238         Extra_Accessibility_Of_Result actual parameter even if Ada_Version
4239         < Ada_2012. This can occur if the callee is exported from a Gnat
4240         runtimes unit. Also improve a comment.
4241
4242 2011-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
4243
4244         * exp_ch7.adb: Add with and use clauses for Get_Targ.
4245         (Alignment_Of): Rename formal parameter Some_Typ
4246         to Typ, update related comment. Use the allocator alignment on
4247         strict alignment targets such as SPARC.
4248         (Double_Alignment_Of): Rename formal parameter Some_Typ to Typ, update
4249         related comment.
4250
4251 2011-09-06  Gary Dismukes  <dismukes@adacore.com>
4252
4253         * sem_ch9.adb (Check_Interfaces): Test
4254         Is_Limited_Type rather than Is_Limited_Record when checking that
4255         the partial view of a synchronized full view must be limited.
4256
4257 2011-09-06  Emmanuel Briot  <briot@adacore.com>
4258
4259         * g-comlin.adb (Free): Fix memory leak.
4260
4261 2011-09-06  Robert Dewar  <dewar@adacore.com>
4262
4263         * sem_util.adb, exp_ch6.adb: Minor reformatting and code reorganization.
4264
4265 2011-09-06  Steve Baird  <baird@adacore.com>
4266
4267         * einfo.ads (Extra_Accessibility_Of_Result): New function; in the
4268         (Ada2012) cases described in AI05-0234 where the accessibility
4269         level of a function result is "determined by the point of
4270         call", an implicit parameter representing that accessibility
4271         level is passed in. Extra_Accessibilty_Of_Result yields this
4272         additional formal parameter. Extra_Accessibility_Of_Result
4273         is analogous to the existing Extra_Accessibility
4274         function used in the implementation of access parameters.
4275         (Set_Extra_Accessibility_Of_Result): New procedure; sets
4276         Extra_Accessibility_Of_Result attribute.
4277         * einfo.adb (Extra_Accessibility_Of_Result): New function.
4278         (Set_Extra_Accessibility_Of_Result): New procedure.
4279         (Write_Field19_Name): Display Extra_Accessibilty_Of_Result attribute.
4280         * sem_util.adb (Dynamic_Accessibility_Level): Set Etype of
4281         an accessibility level literal to Natural; introduce a nested
4282         function, Make_Level_Literal, to do this.
4283         * exp_ch6.ads (Needs_Result_Accessibility_Level): New function;
4284         determines whether a given function (or access-to-function
4285         type) needs to have an implicitly-declared accessibility-level
4286         parameter added to its profile.
4287         (Add_Extra_Actual_To_Call): Export an existing procedure which was
4288         previously declared in the body of Exp_Ch6.
4289         * exp_ch6.adb (Add_Extra_Actual_To_Call): Export declaration by moving
4290         it to exp_ch6.ads.
4291         (Has_Unconstrained_Access_Discriminants): New Function; a
4292         predicate on subtype entities which returns True if the given
4293         subtype is unconstrained and has one or more access discriminants.
4294         (Expand_Call): When expanding a call to a function which takes an
4295         Extra_Accessibility_Of_Result parameter, pass in the appropriate
4296         actual parameter value. In the case of a function call which is
4297         used to initialize an allocator, this may not be possible because
4298         the Etype of the allocator may not have been set yet. In this
4299         case, we defer passing in the parameter and handle it later in
4300         Expand_Allocator_Expression.
4301         (Expand_Simple_Function_Return): When returning from a function which
4302         returns an unconstrained subtype having at least one access
4303         discriminant, generate the accessibility check needed to ensure that
4304         the function result will not outlive any objects designated by its
4305         discriminants.
4306         (Needs_Result_Accessibility_Level): New function; see exp_ch6.ads
4307         description.
4308         * exp_ch4.adb (Expand_Allocator_Expression): When a function call
4309         is used to initialize an allocator, we may need to pass in "the
4310         accessibility level determined by the point of call" (AI05-0234)
4311         to the function. Expand_Call, where such actual parameters are
4312         usually generated, is too early in this case because the Etype of
4313         the allocator (which is used in determining the level to be passed
4314         in) may not have been set yet when Expand_Call executes. Instead,
4315         we generate code to pass in the appropriate actual parameter
4316         in Expand_Allocator_Expression.
4317         * sem_ch6.adb (Create_Extra_Formals): Create
4318         the new Extra_Accessibility_Of_Result formal if
4319         Needs_Result_Accessibility_Level returns True. This includes the
4320         introduction of a nested procedure, Check_Against_Result_Level.
4321
4322 2011-09-06  Arnaud Charlet  <charlet@adacore.com>
4323
4324         * gcc-interface/Makefile.in (X86_TARGET_PAIRS): Remove duplicate
4325         declaration.
4326
4327 2011-09-05  Hristian Kirtchev  <kirtchev@adacore.com>
4328
4329         * s-finmas.adb (Set_Finalize_Address): Explain the reason
4330         for the synchronization. Move the test for null from
4331         s-stposu.Allocate_Any_Controlled to this routine since the check
4332         needs to be protected too.
4333         (Set_Heterogeneous_Finalize_Address): Explain the reason for the
4334         synchronization code.
4335         * s-finmas.ads (Set_Heterogeneous_Finalize_Address): Add comment
4336         explaining the context in which this routine is used.
4337         * s-stposu.adb (Allocate_Any_Controlled): Move the test for null
4338         to s-finmas.Set_Finalize_Address.
4339
4340 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
4341
4342         * einfo.ads: Document that itypes have no parent field.
4343
4344 2011-09-05  Robert Dewar  <dewar@adacore.com>
4345
4346         * rtsfind.adb (Check_CRT): Check for overloaded entity
4347         * rtsfind.ads: Document that entities to be found by rtsfind
4348         cannot be overloaded
4349         * s-taenca.adb, s-tasren.adb, s-tpobop.adb, s-tpoben.ads, s-tpoben.adb
4350         (Lock_Entries_With_Status): New name for Lock_Entries with two
4351         arguments (changed to meet rtsfind no overloading rule).
4352
4353 2011-09-05  Hristian Kirtchev  <kirtchev@adacore.com>
4354
4355         * s-finmas.adb (Set_Finalize_Address (Address,
4356         Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
4357         (Set_Finalize_Address (in out Finalization_Master,
4358         Finalize_Address_Ptr): Add synchronization code.
4359         * s-finmas.ads (Set_Finalize_Address (Address,
4360         Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
4361         * s-stposu.adb (Allocate_Any_Controlled): Update the call to
4362         Set_Finalize_Address for the heterogeneous case.
4363
4364 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
4365
4366         * sem_ch3.adb: Undo previous change, not suitable after all.
4367
4368 2011-09-05  Robert Dewar  <dewar@adacore.com>
4369
4370         * einfo.ads: Minor comment clarification.
4371
4372 2011-09-05  Hristian Kirtchev  <kirtchev@adacore.com>
4373
4374         * exp_ch6.adb (Move_Activation_Chain): Rewritten. The routine
4375         no longer needs to search through the entities of the return
4376         statement scope to find the _chain.
4377         * sem_ch5.adb: Add with and use clauses for Exp_Ch6 and Sem_Ch6.
4378         (Analyze_Block_Statement): Add local variable
4379         Is_BIP_Return_Statement. Add machinery to install all entities
4380         produced by the expansion of the return object declaration.
4381         (Install_Return_Entities): New routine.
4382         * sem_ch6.ads, sem_ch6.adb (Install_Entity): Moved from body to spec.
4383
4384 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
4385
4386         * sem_ch10.adb (Analyze_Context): Apply simple fixup if context
4387         of subunit is incomplete.
4388         (Analyze_Proper_Body): If parent spec is not available, do not
4389         attempt analysis.
4390
4391 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
4392
4393         * sem_disp.adb (Find_Controlling_Arg): Add checks for
4394         interface type conversions, that are expanded into dereferences.
4395
4396 2011-09-05  Hristian Kirtchev  <kirtchev@adacore.com>
4397
4398         * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
4399         Examine the parameter and return profile of a subprogram and swap
4400         any incomplete types coming from a limited context with their
4401         corresponding non-limited views.
4402         (Exchange_Limited_Views): New routine.
4403
4404 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
4405
4406         * sem_ch3.adb (Prepare_Private_Subtype_Completion): Set parent
4407         of internal entity to the subtype declaration, so that when
4408         entities are subsequently exchanged in a package body, the tree
4409         remains properly formatted for ASIS.
4410
4411 2011-09-05  Johannes Kanig  <kanig@adacore.com>
4412
4413         * g-comlin.adb (Set_Usage): Additional optional argument to set help
4414         message.
4415         (Display_Help): display the user given help message, if available.
4416
4417 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
4418
4419         * sem_ch3.adb (OK_For_Limited_Init_In_05): The expression
4420         is legal if the original node is an identifier that is a
4421         parameterless function call.
4422
4423 2011-09-05  Pascal Obry  <obry@adacore.com>
4424
4425         * prj-nmsc.adb: Minor reformatting.
4426         Add support for standalone aggregate library.
4427         (Check_Stand_Alone_Library): Handle standalone aggregate library.
4428         * projects.texi: Fix documentation for aggregate library projects.
4429
4430 2011-09-05  Robert Dewar  <dewar@adacore.com>
4431
4432         * sem_ch6.adb: Minor reformatting.
4433
4434 2011-09-05  Matthew Gingell  <gingell@adacore.com>
4435
4436         * s-tassta.adb (Task_Wrapper): Ensure that we don't try to write the
4437         stack guard page on PPC Linux. This patch ensures the 64K guard page at
4438         the bottom of the stack is not overwritten.
4439
4440 2011-09-05  Thomas Quinot  <quinot@adacore.com>
4441
4442         * exp_intr.adb, s-tasini.adb: Minor reformatting.
4443
4444 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
4445
4446         * sem_ch3.adb (Access_Definition): If an access type declaration
4447         appears in a child unit, the scope of whatever anonymous type
4448         may be generated is the child unit itself.
4449
4450 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
4451
4452         * sem_ch6.adb (Analyze_Expression_Function): Do not set
4453         Comes_From_Source on rewritten body.
4454         (Analyze_Subprogram_Body_Helper): Check that the original node for
4455         the body comes from source, when determining whether expansion
4456         of a protected operation is needed.
4457
4458 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
4459
4460         * exp_aggr.adb (Replace_Type): If the target of the assignment is
4461         a selected component and the right-hand side is a self-referential
4462         access, the proper prefix of the rewritten attribute is a copy
4463         of the left-hand side, not of its prefix.
4464
4465 2011-09-05  Robert Dewar  <dewar@adacore.com>
4466
4467         * sem_ch5.adb: Minor reformatting.
4468         * sem_ch3.adb: Minor code clean up.
4469
4470 2011-09-05  Jose Ruiz  <ruiz@adacore.com>
4471
4472         * exp_ch9.adb (Make_Initialize_Protection): The fact that
4473         restriction No_Dynamic_Attachment is in effect or not should
4474         not influence the default priority associated to a protected
4475         object. With this change, when the restriction is in effect (as
4476         is the case for the Ravenscar profile) the default priority of
4477         a protected object with an interrupt handler is in the range of
4478         interrupt priorities (Default_Interrupt_Priority) as required
4479         by D.3(10).
4480
4481 2011-09-05  Arnaud Charlet  <charlet@adacore.com>
4482
4483         * a-iteint.ads: Fix header.
4484
4485 2011-09-05  Vincent Celier  <celier@adacore.com>
4486
4487         * prj-conf.adb (Do_Autoconf): Make sure Obj_Dir always ends
4488         with a directory separator to avoid output such as:
4489           "/path/to/objauto.cgpr" has been deleted.
4490
4491 2011-09-05  Robert Dewar  <dewar@adacore.com>
4492
4493         * sem_ch3.adb: Minor reformatting.
4494
4495 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
4496
4497         * sem_ch5.adb: Better error message.
4498
4499 2011-09-05  Hristian Kirtchev  <kirtchev@adacore.com>
4500
4501         * exp_aggr.adb: Add with and use clause for Exp_Ch6.
4502         (Expand_Array_Aggregate): Detect a special case of an aggregate
4503         which contains tasks in the context of an unexpanded return
4504         statement of a build-in-place function.
4505         * exp_ch6.adb: Add with and use clause for Exp_Aggr.
4506         (Expand_N_Extended_Return_Statement): Detect a delayed aggregate
4507         which contains tasks and expand it now that the original simple
4508         return statement has been rewritten.
4509         * exp_ch9.adb (Build_Activation_Chain_Entity): Code
4510         reformatting. Do not create a chain for an extended return
4511         statement if one is already available.
4512         (Has_Activation_Chain): New routine.
4513
4514 2011-09-05  Marc Sango  <sango@adacore.com>
4515
4516         * sem_ch3.adb (Analyze_Object_Declaration): Remove
4517         the wrong test and add the correct test to detect the violation
4518         of illegal use of unconstrained string type in SPARK mode.
4519
4520 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
4521
4522         * sem_ch5.adb (Analyze_Iteration_Specification): Improve error
4523         message on an iterator over an array.
4524
4525 2011-09-05  Robert Dewar  <dewar@adacore.com>
4526
4527         * lib-xref-alfa.adb: Minor reformatting.
4528
4529 2011-09-05  Robert Dewar  <dewar@adacore.com>
4530
4531         * sem_ch3.adb, sem_res.adb, par.adb, par-ch6.adb, g-comlin.adb,
4532         exp_ch6.adb, lib-xref-alfa.adb: Minor reformatting.
4533
4534 2011-09-05  Gary Dismukes  <dismukes@adacore.com>
4535
4536         * exp_ch7.adb, exp_ch6.adb: Minor reformatting.
4537
4538 2011-09-05  Johannes Kanig  <kanig@adacore.com>
4539
4540         * lib-xref-alfa.adb: Update comments.
4541
4542 2011-09-05  Thomas Quinot  <quinot@adacore.com>
4543
4544         * sem_res.adb: Minor reformatting
4545
4546 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
4547
4548         * exp_ch6.adb (Build_In_Place_Formal): If extra formals are not
4549         present, create them now.  Needed in case the return type was
4550         a limited view in the function declaration.
4551         (Make_Build_In_Place_Call_In_Allocator): If return type contains
4552         tasks, build the activation chain for it.  Pass a reference to
4553         the Master_Id in call to Add_Task_Actuals_To_Build_In_Place call.
4554         * exp_ch7.adb (Make_Set_Finalize_Address_Call): Clean up interface
4555         with build_in_place calls.
4556         * sem_ch9.adb (Analyze_Task_Type_Declaration): If partial view was
4557         incomplete, inatialize its Corresponding_Record_Type component.
4558         * sem_ch10.adb (Build_Chain): Initialize Private_Dependents field
4559         of limited views.
4560
4561 2011-09-05  Johannes Kanig  <kanig@adacore.com>
4562
4563         * lib-xref-alfa.adb (Is_Alfa_Reference): Filter constants from effect
4564         information.
4565
4566 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
4567
4568         * par-ch6.adb (P_Subprogram): In Ada2012 mode, if the subprogram
4569         appears within a package specification and the token after "IS"
4570         is not a parenthesis, assume that this is an unparenthesized
4571         expression function, even if the token appears in a line by
4572         itself.
4573         * par.adb: Clarify use of Labl field of scope stack in error
4574         recovery.
4575
4576 2011-09-05  Bob Duff  <duff@adacore.com>
4577
4578         * sem_res.adb (Resolve_Intrinsic_Operator): Use unchecked
4579         conversions instead of normal type conversions in all cases where a
4580         type conversion would be illegal. In particular, use unchecked
4581         conversions when the operand types are private.
4582
4583 2011-09-05  Johannes Kanig  <kanig@adacore.com>
4584
4585         * lib-xref-alfa.adb (Is_Alfa_Reference): Never declare effects on
4586         objects of task type or protected type.
4587
4588 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
4589
4590         * sem_ch6.adb (Analyze_Expression_Function): If the expression
4591         function comes from source, indicate that so does its rewriting,
4592         so it is compatible with any subsequent expansion of the
4593         subprogram body (e.g. when it is a protected operation).
4594         * sem_ch4.adb: minor reformatting
4595
4596 2011-09-05  Hristian Kirtchev  <kirtchev@adacore.com>
4597
4598         * lib.adb (Check_Same_Extended_Unit): Comment rewriting. Use
4599         Get_Source_Unit rather than Get_Code_Unit as instantiation unfolding
4600         may lead to wrong ancestor package in the case of instantiated subunit
4601         bodies. If a subunit is instantiated, follow the chain of instantiations
4602         rather than the stub structure.
4603
4604 2011-09-02  Robert Dewar  <dewar@adacore.com>
4605
4606         * sem_ch4.adb, sem_ch6.adb: Minor reformatting.
4607         * gcc-interface/Make-lang.in: Update dependencies.
4608
4609 2011-09-02  Marc Sango  <sango@adacore.com>
4610
4611         * sem_ch3.adb (Analyze_Object_Declaration): Change
4612         comment and add additional check to differentiate constant of
4613         type string from others unconstrained type.
4614
4615 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
4616
4617         * sinfo.ads, sinfo.adb: New semantic attribute Premature_Use,
4618         present in incomplete type declarations to refine the error
4619         message the full declaration is in the same unit.
4620         * sem_ch4.adb (Analyze_Selected_Component): If the prefix is of
4621         an incomplete type, set the Premature_Use for additional message.
4622         * sem_ch3.adb (Find_Type_Name): If partial view is incomplete
4623         and Premature_Use is set, place additional information at the
4624         point of premature use.
4625
4626 2011-09-02  Bob Duff  <duff@adacore.com>
4627
4628         * sem_ch6.adb: (Check_Post_State): Suppress warning
4629         "postcondition refers only to pre-state" when the expression has not
4630         yet been analyzed, because it causes false alarms. This can happen when
4631         the postcondition contains a quantified expression, because those are
4632         analyzed later. This is a temporary/partial fix.
4633         (Process_Post_Conditions): Minor: change wording of warning.
4634
4635 2011-09-02  Marc Sango  <sango@adacore.com>
4636
4637         * sem_ch3.adb (Analyze_Object_Declaration): Detect the violation of
4638         illegal use of unconstrained string type in SPARK mode.
4639         * sem_res.adb (Analyze_Operator_Symbol): Set the
4640         right place where the string operand of concatenation should be
4641         violate in SPARK mode.
4642
4643 2011-09-02  Robert Dewar  <dewar@adacore.com>
4644
4645         * sem_prag.adb, sem_util.adb, sem_ch6.adb, prj-nmsc.adb,
4646         exp_ch3.adb: Minor reformatting.
4647
4648 2011-09-02  Vincent Celier  <celier@adacore.com>
4649
4650         * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Declare "gcc"
4651         as the compiler driver so Is_Compilable returns True for sources.
4652         * prj-nmsc.adb (Override_Kind): When Kind is Sep, set the source
4653         for the body.
4654
4655 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
4656
4657         * sem_prag.adb (Analyze_PPC_In_Decl_Part): for a class-wide
4658         condition, a reference to a controlling formal must be interpreted
4659         as having the class-wide type (or an access to such) so that the
4660         inherited condition can be properly applied to any overriding
4661         operation (see ARM12 6.6.1 (7)).
4662
4663 2011-09-02  Tristan Gingold  <gingold@adacore.com>
4664
4665         * init.c (__gnat_is_vms_v7): Fix case and add prototype
4666         for LIB$GETSYI.
4667
4668 2011-09-02  Javier Miranda  <miranda@adacore.com>
4669
4670         * exp_ch3.adb (Expand_N_Object_Declaration): Do not copy the
4671         initializing expression of a class-wide interface object declaration
4672         if its type is limited.
4673
4674 2011-09-02  Johannes Kanig  <kanig@adacore.com>
4675
4676         * sem_util.adb (Unique_Name): To obtain a unique name for enumeration
4677         literals, take into account the type name; the type is *not*
4678         the scope for an enumeration literal.
4679
4680 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
4681
4682         * sem_ch6.adb (Check_Overriding_Indicator): add special check
4683         to reject an overriding indicator on a user-defined Adjust
4684         subprogram for a limited controlled type.
4685
4686 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
4687
4688         * sem_res.adb (Resolve_Actuals): add missing call to Resolve
4689         for an actual that is a function call returning an unconstrained
4690         limited controlled type.
4691
4692 2011-09-02  Tristan Gingold  <gingold@adacore.com>
4693
4694         * g-socthi-vms.adb (c_sendmsg, c_recvmsg): Use unpacked msg if on vms 7
4695
4696 2011-09-02  Johannes Kanig  <kanig@adacore.com>
4697
4698         * alfa.ads (Name_Of_Heap_Variable): Change value of the HEAP variable
4699         from "HEAP" to __HEAP Change comment that refers to that variable
4700         * put_alfa.adb: Change comment that refers to that variable
4701
4702 2011-09-02  Robert Dewar  <dewar@adacore.com>
4703
4704         * exp_ch4.adb, exp_ch6.adb, prj-nmsc.adb: Minor reformatting.
4705
4706 2011-09-02  Hristian Kirtchev  <kirtchev@adacore.com>
4707
4708         * exp_util.adb (Extract_Renamed_Object): Renamed to
4709         Find_Renamed_Object. This routine has been reimplemented and now uses
4710         tree traversal to locate a renamed object.
4711         (Is_Aliased): Replace call to Extract_Renamed_Object with
4712         Find_Renamed_Object.
4713
4714 2011-09-02  Tristan Gingold  <gingold@adacore.com>
4715
4716         * init.c: (__gnat_is_vms_v7): New function.
4717
4718 2011-09-02  Olivier Hainque  <hainque@adacore.com>
4719
4720         * tracebak.c (STOP_FRAME, ppc elf/vxworks case): Stop on frames
4721         that have a misaligned backchain, necessarily bogus.
4722
4723 2011-09-02  Hristian Kirtchev  <kirtchev@adacore.com>
4724
4725         * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not create
4726         TSS routine Finalize_Address when compiling in Alfa mode.
4727         (Expand_Freeze_Record_Type): Do not create TSS routine
4728         Finalize_Address when compiling in Alfa mode.
4729         * exp_ch4.adb (Expand_Allocator_Expression): Do not produce a
4730         call to Set_Finalize_Address in Alfa mode because Finalize_Address is
4731         not built.
4732         (Expand_N_Allocator): Do not produce a call to
4733         Set_Finalize_Address in Alfa mode because Finalize_Address is not built.
4734         * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Do not
4735         produce a call to primitive Set_Finalize_Address in Alfa mode because
4736         Finalize_Address is not built.
4737         * exp_ch7.adb (Build_Finalization_Master): Do not create
4738         finalization masters in Afa mode since they are not needed.
4739         (Build_Finalizer): Do not create scope and library-level
4740         finalizers in Alfa mode since they are not needed.
4741         * exp_util.adb (Build_Allocate_Deallocate_Proc): Do not expand
4742         "new" and "free" when applied to controlled objects in Alfa mode since
4743         this is not needed.
4744
4745 2011-09-02  Vincent Celier  <celier@adacore.com>
4746
4747         * prj-nmsc.db: (Check_Stand_Alone_Library): For SALs, allow
4748         only library names with the syntax of Ada identifiers, to avoid errors
4749         when compiling the binder generated files.
4750         * projects.texi: Document restriction on SAL library names
4751
4752 2011-09-02  Thomas Quinot  <quinot@adacore.com>
4753
4754         * a-chtgbo.adb: Minor comment fix.
4755
4756 2011-09-02  Robert Dewar  <dewar@adacore.com>
4757
4758         * lib-xref.adb: Minor reformatting
4759
4760 2011-09-02  Vincent Celier  <celier@adacore.com>
4761
4762         * bindusg.adb, clean.adb, gnatchop.adb, gnatfind.adb, gnatlink.adb,
4763         gnatls.adb, gnatname.adb, gnatxref.adb, gprep.adb, makeusg.adb: Add
4764         --version and --help in usage.
4765         * switch.ads, switch.adb (Display_Usage_Version_And_Help): New procedure
4766
4767 2011-09-02  Bob Duff  <duff@adacore.com>
4768
4769         * lib-xref.adb: (Hash): Avoid use of 'Mod attribute, because old
4770         compilers don't understand it.
4771
4772 2011-09-02  Gary Dismukes  <dismukes@adacore.com>
4773
4774         * exp_attr.adb (Expand_N_Attribute_Reference): Pass the
4775         underlying subtype rather than its base type on the call to
4776         Build_Record_Or_Elementary_Input_Function, so that any
4777         constraints on a discriminated subtype will be available for
4778         doing the check required by AI05-0192.
4779         * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
4780         If the prefix subtype of the 'Input attribute is a constrained
4781         discriminated subtype, then check each constrained discriminant value
4782         against the corresponding value read from the stream.
4783
4784 2011-09-02  Yannick Moy  <moy@adacore.com>
4785
4786         * usage.adb, warnsw.adb, sem_ch6.adb, opt.ads: Disable by default
4787         warnings on suspicious contracts, and enable them with -gnatwa.
4788
4789 2011-09-02  Robert Dewar  <dewar@adacore.com>
4790
4791         * exp_util.adb, exp_ch9.adb, sem_attr.adb, sem_ch6.adb: Minor
4792         reformatting.
4793
4794 2011-09-02  Hristian Kirtchev  <kirtchev@adacore.com>
4795
4796         * exp_ch9.adb (Install_Private_Data_Declarations): Add guards
4797         which ensure that restriction No_Dynamic_Attachment has not been
4798         violated.
4799         (Make_Initialize_Protection): Protected types with attach or
4800         interrupt handlers must not violate restriction No_Dynamic_Attachment.
4801         * exp_util.adb (Corresponding_Runtime_Package): Add a guard
4802         which ensures that restriction No_Dynamic_Attachment has not been
4803         violated.
4804         * sem_attr.adb: (Eval_Attribute): Transform
4805         VAX_Float_Type'First and 'Last into references to
4806         the temporaries which store the corresponding bounds. The
4807         transformation is needed since the back end cannot evaluate
4808         'First and 'Last on VAX.
4809         (Is_VAX_Float): New routine.
4810
4811 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
4812
4813         * sem_ch12.adb (Analyze_Subprogram_Instantiation): If the
4814         generic unit is not intrinsic and has an explicit convention,
4815         the instance inherits it.
4816
4817 2011-09-02  Robert Dewar  <dewar@adacore.com>
4818
4819         * prj-dect.adb, prj-env.adb, prj-nmsc.adb, prj-proc.adb, prj-tree.adb,
4820         prj.adb, prj.ads, sem_ch5.adb: Minor reformatting.
4821
4822 2011-09-02  Thomas Quinot  <quinot@adacore.com>
4823
4824         * sem_attr.adb (Analyze_Attribute, case Unrestriced_Access):
4825         Guard against a prefix that is an N_Has_Entity but has no
4826         associated entity.
4827
4828 2011-09-02  Yannick Moy  <moy@adacore.com>
4829
4830         * lib-xref-alfa.adb (Is_Alfa_Reference): Ignore IN parameters in Alfa
4831         references.
4832
4833 2011-09-02  Yannick Moy  <moy@adacore.com>
4834
4835         * opt.ads (Warn_On_Suspicious_Contract): New warning flag.
4836         * sem_ch3.adb (Analyze_Declarations): Call checker for suspicious
4837         contracts.
4838         * sem_ch6.adb, sem_ch6.ads (Check_Subprogram_Contract): New
4839         procedure looking for suspicious postconditions.
4840         * usage.adb (Usage): New options -gnatw.t and -gnatw.T.
4841         * warnsw.adb (Set_Dot_Warning_Switch): Take into account new
4842         options -gnatw.t and -gnatw.T.
4843
4844 2011-09-02  Pascal Obry  <obry@adacore.com>
4845
4846         * prj.adb: Minor code refactoring. Move check for null project in
4847         Project_Changed.
4848         * projects.texi: Fix minor typos.
4849
4850 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
4851
4852         * sem_ch5.adb (Analyze_Iterator_Specification): If the domain
4853         of iteration is an expression, its value must be captured in a
4854         renaming declaration, so that modification of the elements is
4855         propagated to the original container.
4856
4857 2011-09-02  Pascal Obry  <obry@adacore.com>
4858
4859         * prj-proc.adb, prj.adb, makeutl.adb, makeutl.ads, prj-dect.adb,
4860         prj-nmsc.adb, prj-util.adb, prj-conf.adb, prj-env.adb,
4861         prj-tree.adb: Minor reformatting and style fixes.
4862
4863 2011-09-02  Robert Dewar  <dewar@adacore.com>
4864
4865         * s-rident.ads: Add new restriction No_Implicit_Aliasing
4866         * sem_attr.adb: (Analyze_Access_Attribute): Deal with
4867         No_Implicit_Aliasing
4868         (Analyze_Attribute, case Address): ditto
4869         (Analyze_Attribute, case Unrestricted_Access): ditto
4870         * sem_util.ads, sem_util.adb: (Is_Aliased_View): Handle
4871         No_Implicit_Aliasing restriction.
4872         * gnat_rm.texi: Add documentation for No_Implicit_Aliasing
4873
4874 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
4875
4876         * exp_util.adb: (Possible_Bit_Aligned_Object): If the object
4877         is an unchecked conversion, apply test to its expression.
4878
4879 2011-09-02  Javier Miranda  <miranda@adacore.com>
4880
4881         * sem_ch3.adb (Check_Abstract_Overriding): When
4882         traversing the chain of aliased subprograms avoid reporting a
4883         redundant error on the current entity.
4884
4885 2011-09-02  Sergey Rybin  <rybin@adacore.com>
4886
4887         * gnat_ugn.texi: Minor clean up.
4888
4889 2011-09-02  Bob Duff  <duff@adacore.com>
4890
4891         * s-htable.adb (Set_If_Not_Present): Use renaming
4892         instead of ":=", because the type Key is limited in the generic (even
4893         if not in the instances).
4894
4895 2011-09-02  Robert Dewar  <dewar@adacore.com>
4896
4897         * exp_util.adb, sem_ch10.adb, sem_attr.adb, s-htable.adb,
4898         g-comlin.adb, g-comlin.ads, lib-xref-alfa.adb, lib-xref.adb: Minor
4899         reformatting.
4900
4901 2011-09-02  Hristian Kirtchev  <kirtchev@adacore.com>
4902
4903         * sem_ch3.adb: (Set_Anonymous_Type): Associate the itype of an
4904         inherited component with the enclosing derived type. Code reformatting.
4905
4906 2011-09-02  Gary Dismukes  <dismukes@adacore.com>
4907
4908         * checks.adb: (Determine_Range): Add test of OK1 to prevent the early
4909         return done when overflow checks are enabled, since comparisons against
4910         Lor and Hir should not be done when OK1 is False.
4911
4912 2011-09-02  Gary Dismukes  <dismukes@adacore.com>
4913
4914         * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
4915         Add new formal Master_Exp. When present, add that expression to the
4916         call as an extra actual.
4917         (Make_Build_In_Place_Call_In_Object_Declaration): Add variable
4918         Fmaster_Actual and in the case of a BIP call initializing a return
4919         object of an enclosing BIP function set it to a
4920         new reference to the implicit finalization master
4921         formal of the enclosing function. Fmaster_Actual is
4922         then passed to the new formal Master_Exp on the call to
4923         Add_Finalization_Master_Actual_To_Build_ In_Place_Call. Move
4924         initializations of Enclosing_Func to its declaration.
4925
4926 2011-09-02  Thomas Quinot  <quinot@adacore.com>
4927
4928         * csets.ads: Minor reformatting
4929
4930 2011-09-02  Hristian Kirtchev  <kirtchev@adacore.com>
4931
4932         * exp_aggr.adb: (Get_Constraint_Association): Add code to retrieve
4933         the full view of a private type coming from an instantiation.
4934         * exp_ch4.adb: (Current_Anonymous_Master): Reimplement the search
4935         loop to iterate over the declarations rather than use the
4936         First_Entity / Next_Entity scheme.
4937
4938 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
4939
4940         * sem_attr.adb: (Analyze_Attribute, case 'Range): when expanding
4941         X'range (N) into X'First (N) ..  X'Last (N), do not share the
4942         dimension indicator N, if present. Even though it is a static
4943         constant, its source location may be modified when printing
4944         expanded code under -gnatDL, and node sharing will lead to chaos
4945         in Sprint on large files, by generating a sloc value that does
4946         not correspond to any source file.
4947
4948 2011-09-02  Bob Duff  <duff@adacore.com>
4949
4950         * einfo.adb: (Has_Xref_Entry): Do not call
4951         Implementation_Base_Type. Lib.Xref has been
4952         rewritten to avoid the need for it, and it was costly.
4953         * s-htable.ads,s-htable.adb: (Present,Set_If_Not_Present): New
4954         functions in support of efficient xref.
4955         * lib-xref-alfa.adb: Misc changes related to Key component of
4956         type Xref_Entry.
4957         * lib-xref.adb: (Add_Entry,etc): Speed improvement.
4958         (New_Entry): Call Implementation_Base_Type, because Has_Xref_Entry
4959         no longer does. This is the one place where it is needed.
4960
4961 2011-09-02  Johannes Kanig  <kanig@adacore.com>
4962
4963         * g-comlin.adb (Getopt): New optional argument Concatenate to have
4964         similar interface as the other Getopt function.
4965
4966 2011-09-02  Hristian Kirtchev  <kirtchev@adacore.com>
4967
4968         * exp_ch4.adb: (Expand_Allocator_Expression): Do not generate
4969         a call to Set_Finalize_Address if there is no allocator available.
4970         * exp_util.adb: (Build_Allocate_Deallocate_Proc): Account for
4971         a case of allocator expansion where the allocator is not expanded but
4972         needs a custom allocate routine. Code reformatting.
4973         (Is_Finalizable_Transient): Remove local variables Has_Rens and
4974         Ren_Obj. Code reformatting.
4975         (Is_Renamed): Renamed to Is_Aliased. Add code to detect aliasing
4976         through the use of 'reference.
4977         * sem_ch4.adb: (Analyze_Allocator): Detect allocators generated
4978         as part of build-in-place expansion. They are intentionally marked as
4979         coming from source, but their parents are not.
4980
4981 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
4982
4983         * sem_ch10.adb (Analyze_With_Clause): If the library unit
4984         is the generated subprogram declaration for a child unit body
4985         that acts as spec, use the original body in the with_clause,
4986         to prevent binding errors.
4987
4988 2011-09-02  Vincent Celier  <celier@adacore.com>
4989
4990         * gnat_ugn.texi: Adapt documentation of -gnateInnn to new VMS
4991         qualifier /MULTI_UNIT_INDEX=
4992
4993 2011-09-02  Johannes Kanig  <kanig@adacore.com>
4994
4995         * g-comlin.adb (Getopt): Return when switch is dealt with automatically,
4996         instead of calling the callback function
4997
4998 2011-09-02  Robert Dewar  <dewar@adacore.com>
4999
5000         * prj-proc.adb, prj.ads, sem_util.adb, s-taprop-linux.adb,
5001         prj-nmsc.adb, prj-util.ads, prj-env.adb: Minor reformatting.
5002
5003 2011-09-02  Vincent Celier  <celier@adacore.com>
5004
5005         * prj-nmsc.adb: (Find_Sources): When the list of sources is
5006         explicitly declared in an extending project, do not warn if a source
5007         for an inherited naming exception is not found.
5008
5009 2011-09-02  Gary Dismukes  <dismukes@adacore.com>
5010
5011         * exp_ch6.adb: (Is_Build_In_Place_Function_Call): Return False if
5012         expansion is inactive.
5013
5014 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
5015
5016         * sem_util.adb (Note_Possible_Modification): If the entity
5017         being modified is the renaming generated for an Ada2012 iterator
5018         element, the enclosing container or array is modified as well.
5019
5020 2011-09-02  Jose Ruiz  <ruiz@adacore.com>
5021
5022         * s-taprop-linux.adb (Initialize_Lock, Initialize_TCB,
5023         Initialize): Define and initialize the
5024         mutex attributes and condition variable attributes locally.
5025
5026 2011-09-02  Vincent Celier  <celier@adacore.com>
5027
5028         * prj-nmsc.adb (Check_File): Mark as Locally_Removed a naming
5029         exception replaced in an extending project.
5030         (Check_Object): No error when the other source is locally removed.
5031
5032 2011-09-02  Yannick Moy  <moy@adacore.com>
5033
5034         * exp_ch6.adb (Is_Build_In_Place_Function_Call): in Alfa mode, allow
5035         unresolved calls.
5036
5037 2011-08-31  Arnaud Charlet  <charlet@adacore.com>
5038
5039         * gcc-interface/Makefile.in: Clean up handling of x86 and x86-64
5040         run-time files.
5041         * gcc-interface/Make-lang.in: Update dependencies.
5042
5043 2011-09-01  Robert Dewar  <dewar@adacore.com>
5044
5045         * sem_ch3.adb, s-taprop-linux.adb, gnatls.adb: Minor reformatting.
5046
5047 2011-09-01  Jose Ruiz  <ruiz@adacore.com>
5048
5049         * adaint.h (__gnat_cpu_free): Fix the name of this profile.
5050         * adaint.c (__gnat_cpu_alloc, __gnat_cpu_alloc_size, __gnat_cpu_free,
5051         __gnat_cpu_zero, __gnat_cpu_set): Create version of these subprograms
5052         specific for systems where their glibc version does not define the
5053         routines to handle dynamically allocated CPU sets.
5054
5055 2011-09-01  Vincent Celier  <celier@adacore.com>
5056
5057         * prj-proc.adb, prj.ads, prj-nmsc.adb, prj-util.adb, prj-util.ads,
5058         prj-env.adb: Implement inheritance of naming exceptions in extending
5059         projects.
5060
5061 2011-09-01  Romain Berrendonner  <berrendo@adacore.com>
5062
5063         * gnatls.adb: Display simple message instead of content of
5064         gnatlic.adl.
5065
5066 2011-09-01  Hristian Kirtchev  <kirtchev@adacore.com>
5067
5068         * sem_ch3.adb: (Build_Derived_Record_Type) Remove the kludgy update of
5069         access discriminant and anonymous access component scopes.
5070         (Inherit_Component): Reuse the itype of an access discriminant
5071         or anonymous access component by copying it in order to set the proper
5072         scope. This is done only when the parent and the derived type
5073         are in different scopes.
5074         (Set_Anonymous_Etype): New routine.
5075
5076 2011-09-01  Robert Dewar  <dewar@adacore.com>
5077
5078         * a-convec.adb: Minor reformatting throughout.
5079
5080 2011-09-01  Jose Ruiz  <ruiz@adacore.com>
5081
5082         * adaint.c, adaint.h (__gnat_cpu_alloc, __gnat_cpu_alloc_size,
5083         __gnat_cpu_set_free): Create these wrappers around the CPU_ALLOC,
5084         CPU_ALLOC_SIZE and CPU_FREE linux macros.
5085         (__gnat_cpu_zero, __gnat_cpu_set): Use the CPU_ZERO_S and
5086         CPU_SET_S respectively because we are now using dynamically allocated
5087         CPU sets which are more portable across different glibc versions.
5088         * s-osinte-linux.ads (cpu_set_t_ptr, CPU_ALLOC, CPU_ALLOC_SIZE,
5089         CPU_FREE): Add this type and subprograms to be able to create cpu_set_t
5090         masks dynamically according to the number of processors in the target
5091         platform.
5092         (CPU_ZERO, CPU_SET): They are now mapped to the CPU_ZERO_S and CPU_SET_S
5093         respectively, so we need to pass the size of the masks as
5094         parameters.
5095         * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use dynamically
5096         created cpu_set_t masks
5097         with the number of processors available in the target platform,
5098         instead of static bit arrays. It enhances portability because
5099         it uses the information from the target platform.
5100         * sem_ch8.adb: (Attribute_Renaming): When checking whether we
5101         are using a restricted run-time library, use the flag
5102         Configurable_Run_Time_Mode instead of Restricted_Profile.
5103
5104 2011-09-01  Vincent Celier  <celier@adacore.com>
5105
5106         * ug_words: Add /MULTI_UNIT_INDEX= -> -gnateI
5107         * vms_data.ads: Add new VMS qualifier equivalent for -gnateInnn
5108
5109 2011-09-01  Nicolas Roche  <roche@adacore.com>
5110
5111         * adaint.c (__gnat_tmp_name): Don't use tmpnam function from the system
5112         on VxWorks in kernel mode.
5113
5114 2011-09-01  Jose Ruiz  <ruiz@adacore.com>
5115
5116         * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use the linux
5117         macros for handling CPU sets (CPU_ZERO, CPU_SET) instead of modifying
5118         directly the bit array.
5119         * s-osinte-linux.ads (CPU_ZERO, CPU_SET): Import these wrappers around
5120         the linux macros with the same name.
5121         * adaint.h, adaint.c (__gnat_cpu_zero, __gnat_cpu_set): Create these
5122         wrappers around the CPU_ZERO and CPU_SET linux macros.
5123
5124 2011-09-01  Hristian Kirtchev  <kirtchev@adacore.com>
5125
5126         * exp_ch7.adb (Find_Insertion_List): Removed.
5127         (Process_Transient_Objects): Insert the declarations of the hook
5128         access type and the hook object before the associated transient object.
5129
5130 2011-09-01  Jose Ruiz  <ruiz@adacore.com>
5131
5132         * sem_ch8.adb (Attribute_Renaming): Add missing check to avoid loading
5133         package System.Aux_Dec when using restricted run-time libraries which
5134         do not have this package.
5135
5136 2011-09-01  Tristan Gingold  <gingold@adacore.com>
5137
5138         * s-vaflop-vms-alpha.adb: Remove pragma optimize, useless.
5139
5140 2011-09-01  Bob Duff  <duff@adacore.com>
5141
5142         * sem_attr.adb (Analyze_Access_Attribute): Do not call
5143         Kill_Current_Values for P'Unrestricted_Access, where P is library level
5144
5145 2011-09-01  Thomas Quinot  <quinot@adacore.com>
5146
5147         * exp_ch5.adb: Minor reformatting
5148         * gnat_ugn.texi: Fix minor typos.
5149         * gcc-interface/Make-lang.in: Update dependencies.
5150
5151 2011-09-01  Robert Dewar  <dewar@adacore.com>
5152
5153         * inline.adb, sem_aggr.adb: Minor reformatting.
5154
5155 2011-09-01  Ed Schonberg  <schonberg@adacore.com>
5156
5157         * a-convec.adb: Proper handling of cursors for Ada2012 iterators.
5158
5159 2011-09-01  Robert Dewar  <dewar@adacore.com>
5160
5161         * prj-proc.adb, exp_ch6.adb, prj-env.adb: Minor reformatting.
5162
5163 2011-09-01  Bob Duff  <duff@adacore.com>
5164
5165         * sem_aggr.adb (Resolve_Aggregate): Need to treat "in instance
5166         body" the same as "in inlined body", because visibility shouldn't
5167         apply there.
5168
5169 2011-09-01  Eric Botcazou  <ebotcazou@adacore.com>
5170
5171         * inline.adb (Add_Inlined_Body): Refine previous change.
5172
5173 2011-09-01  Gary Dismukes  <dismukes@adacore.com>
5174
5175         * exp_ch6.ads (Needs_BIP_Alloc_Form): New utility function.
5176         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
5177         Test for case where call
5178         initializes an object of a return statement before testing for
5179         a constrained call, to ensure that all such cases get handled
5180         by simply passing on the caller's parameters. Also, in that
5181         case call Needs_BIP_Alloc_Form to determine whether to pass on
5182         the BIP_Alloc_Form parameter of the enclosing function rather
5183         than testing Is_Constrained. Add similar tests for the return
5184         of a BIP call to later processing to ensure consistent handling.
5185         (Needs_BIP_Alloc_Form): New utility function.
5186         * sem_ch6.adb: (Create_Extra_Formals): Replace test for adding
5187         a BIP_Alloc_Form formal with call to new utility function
5188         Needs_BIP_Alloc_Form.
5189
5190 2011-09-01  Pascal Obry  <obry@adacore.com>
5191
5192         * prj-part.adb: Minor reformatting.
5193
5194 2011-09-01  Vincent Celier  <celier@adacore.com>
5195
5196         * prj-env.adb (Create_Mapping_File.Process): Encode the upper
5197         half character in the unit name.
5198
5199 2011-09-01  Hristian Kirtchev  <kirtchev@adacore.com>
5200
5201         * exp_ch4.adb: Minor code and comment reformatting.
5202
5203 2011-09-01  Thomas Quinot  <quinot@adacore.com>
5204
5205         * exp_ch6.adb (Expand_Inlined_Call): Remove redundant tests
5206         for Is_Limited_Type and Is_Tagged_Type in condition checking
5207         for by-reference type.
5208         * inline.adb (Add_Inlined_Body): Only exclude init_procs. Other
5209         subprograms may have a completion because of a previous
5210         Inline_Always clause, but the enclosing package must be marked
5211         inlined for the subprogram body to become visible to the backend.
5212
5213 2011-09-01  Thomas Quinot  <quinot@adacore.com>
5214
5215         * sem_aux.adb, exp_ch4.adb: Minor reformatting
5216
5217 2011-09-01  Pascal Obry  <obry@adacore.com>
5218
5219         * prj-proc.adb, prj.ads, sinput-p.adb: Minor reformatting.
5220
5221 2011-09-01  Ed Schonberg  <schonberg@adacore.com>
5222
5223         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Generate references to
5224         the formals of a subprogram stub that acts as a spec.
5225
5226 2011-09-01  Ed Schonberg  <schonberg@adacore.com>
5227
5228         * exp_ch6.adb (Expand_Inlined_Call): If an actual is a by_reference
5229         type, declare a renaming for it, not an object declaration.
5230
5231 2011-09-01  Yannick Moy  <moy@adacore.com>
5232
5233         * ali-util.adb, ali-util.ads (Read_Withed_ALIs): Add parameter
5234         Ignore_Errors to ignore failures to read ALI files when True.
5235
5236 2011-09-01  Javier Miranda  <miranda@adacore.com>
5237
5238         * exp_ch3.adb (Expand_N_Object_Declaration): Handle non-default
5239         constructor calls associated with non-tagged record types.
5240
5241 2011-09-01  Robert Dewar  <dewar@adacore.com>
5242
5243         * g-socthi-vms.adb: Minor reformatting.
5244
5245 2011-09-01  Nicolas Roche  <roche@adacore.com>
5246
5247         * sysdep.c: Don't use macro functions for stdio functions on VxWorks
5248         in order to avoid impact of imcompatible changes.
5249         * cstreams.c: Likewise
5250         * cio.c: Likewise
5251         * aux-io.c: Likewise
5252
5253 2011-09-01  Yannick Moy  <moy@adacore.com>
5254
5255         * lib-writ.adb (Write_With_Lines): Always output complete information
5256         on "with" line in Alfa mode, as this is required by formal verification
5257         back-end.
5258
5259 2011-09-01  Tristan Gingold  <gingold@adacore.com>
5260
5261         * g-socthi-vms.adb: Add comments.
5262
5263 2011-09-01  Pascal Obry  <obry@adacore.com>
5264
5265         * prj.ads: Minor reformatting.
5266
5267 2011-09-01  Vincent Celier  <celier@adacore.com>
5268
5269         * prj-env.adb (Create_Config_Pragmas_File.Check): Put all naming
5270         exceptions in the config pragmas file.
5271
5272 2011-09-01  Tristan Gingold  <gingold@adacore.com>
5273
5274         * gnat_ugn.texi: Document GNAT_STACK_SIZE on IVMS.
5275
5276 2011-09-01  Hristian Kirtchev  <kirtchev@adacore.com>
5277
5278         * exp_ch7.adb (Find_Insertion_List): New routine.
5279         (Process_Transient_Objects): Add code to handle the abnormal
5280         finalization of a controlled transient associated with a subprogram
5281         call. Since transients are cleaned up right after the associated
5282         context, an exception raised during a subprogram call may bypass the
5283         finalization code.
5284
5285 2011-09-01  Robert Dewar  <dewar@adacore.com>
5286
5287         * exp_ch6.adb (Expand_Call): Check actual for aliased parameter is
5288         aliased.
5289
5290 2011-09-01  Robert Dewar  <dewar@adacore.com>
5291
5292         * exp_ch4.adb, a-exexda.adb: Minor reformatting.
5293
5294 2011-09-01  Robert Dewar  <dewar@adacore.com>
5295
5296         * s-taskin.ads, s-tassta.adb, sem_ch13.adb: Minor reformatting.
5297
5298 2011-09-01  Thomas Quinot  <quinot@adacore.com>
5299
5300         * Makefile.rtl: Move s-oscons.o from GNATRTL_TASKING_OBJS to
5301         GNATRTL_NONTASKING_OBJS.
5302
5303 2011-09-01  Robert Dewar  <dewar@adacore.com>
5304
5305         * einfo.ads (Is_Aliased): Fix existing documentation and add note on
5306         possibility of this flag being set for formals in Ada 2012 mode.
5307         * par-ch6.adb (P_Formal_Part): Handle aliased for parameters for Ada
5308         2012.
5309         * sem_ch6.adb (Process_Formals): Handle aliased parameters in Ada 2012
5310         mode.
5311         * sinfo.adb (Aliased_Present): Allowed in N_Parameter_Specification for
5312         Ada 2012.
5313         * sinfo.ads (Aliased_Present): Allowed in N_Parameter_Specification for
5314         Ada 2012.
5315
5316 2011-09-01  Hristian Kirtchev  <kirtchev@adacore.com>
5317
5318         * exp_ch4.adb (Find_Insertion_Node): New routine. Determines the proper
5319         insertion node in a tree of nested Expression_With_Actions nodes.
5320         (Process_Transient_Object): In the case where a complex if statement
5321         has been converted into nested Expression_With_Actions nodes, the
5322         "hook" object and the associated access type must be inserted before
5323         the top most Expression_With_Actions.
5324
5325 2011-09-01  Robert Dewar  <dewar@adacore.com>
5326
5327         * a-cbprqu.adb, a-cbprqu.ads, a-cuprqu.adb, a-cuprqu.ads,
5328         a-cbsyqu.adb, a-cbsyqu.ads: Minor reformatting.
5329
5330 2011-09-01  Ed Schonberg  <schonberg@adacore.com>
5331
5332         * sem_attr.adb: Conditionalize aliasing predicates to Ada2012.
5333
5334 2011-09-01  Jose Ruiz  <ruiz@adacore.com>
5335
5336         * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the CPU
5337         aspect.
5338         * aspects.adb (Canonical_Aspect): Add entry for the CPU aspect.
5339         * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the CPU aspect
5340         in a similar way as we do for the Priority or Dispatching_Domain aspect.
5341         * s-mudido-affinity.adb (Dispatching_Domain_Tasks,
5342         Dispatching_Domains_Frozen): Move this local data to package
5343         System.Tasking because with the CPU aspect we need to have access
5344         to this data when creating the task in System.Tasking.Stages.Create_Task
5345         * s-taskin.ads (Dispatching_Domain_Tasks, Dispatching_Domains_Frozen):
5346         Move these variables from the body of
5347         System.Multiprocessors.Dispatching_Domains because with the CPU aspect
5348         we need to have access to this data when creating the task in
5349         System.Tasking.Stages.Create_Task.
5350         * s-taskin.adb (Initialize): Signal the allocation of the environment
5351         task to a CPU, if any, so that we know whether the CPU can be
5352         transferred to a different dispatching domain.
5353         * s-tassta.adb (Create_Task): Check whether the CPU to which this task
5354         is being allocated belongs to the dispatching domain where the task
5355         lives. Signal the allocation of the task to a CPU, if any, so that we
5356         know whether the CPU can be transferred to a different dispatching
5357         domain.
5358
5359 2011-09-01  Ed Schonberg  <schonberg@adacore.com>
5360
5361         * exp_attr.adb, sem_attr.adb, snames.ads-tmpl: Implementation of
5362         attributes Same_Storage and Overlaps_Storage.
5363
5364 2011-09-01  Hristian Kirtchev  <kirtchev@adacore.com>
5365
5366         * exp_strm.adb: Remove with and use clause for Opt.
5367         (Build_Array_Input_Function): Remove the version-dependent generation
5368         of the return statement. The Ada 2005 tree is now the default.
5369
5370 2011-09-01  Yannick Moy  <moy@adacore.com>
5371
5372         * put_alfa.adb: Unconditionnally write files in Alfa section, so that
5373         it is never empty when compiling in Alfa mode.
5374
5375 2011-09-01  Robert Dewar  <dewar@adacore.com>
5376
5377         * sem_aggr.adb, sem_ch3.adb, a-direct.adb, s-taprop-vxworks.adb,
5378         comperr.adb, exp_ch9.adb, exp_pakd.adb, sem_ch12.adb, freeze.adb,
5379         s-taprop-mingw.adb, s-taprop-linux.adb, s-taprop-solaris.adb,
5380         gnat1drv.adb, a-rbtgbo.adb, exp_dist.adb: Minor reformatting
5381
5382 2011-09-01  Matthew Heaney  <heaney@adacore.com>
5383
5384         * Makefile.rtl, impunit.adb: Add a-csquin.ads, a-cusyqu.ad[sb],
5385         a-cuprqu.ad[sb], a-cbsyqu.ad[sb], a-cbprqu.ad[sb]
5386         * a-csquin.ads: New Ada 2012 unit that specifies the queue interface
5387         * a-cusyqu.ads, a-cusyqu.adb: New Ada 2012 unit that specifies the
5388         unbounded queue container.
5389         * a-cbsyqu.ads, a-cbsyqu.adb: New Ada 2012 unit that specifies the
5390         bounded queue container.
5391         * a-cuprqu.ads, a-cuprqu.adb: New Ada 2012 unit that specifies the
5392         unbounded priority queue container.
5393         * a-cbprqu.ads, a-cbprqu.adb: New Ada 2012 unit that specifies the
5394         bounded priority queue container.
5395
5396 2011-08-31  Pascal Obry  <obry@adacore.com>
5397
5398         * a-direct.adb: Do not try to create an UNC path on Windows.
5399         (Create_Path): Skip leading computer name in UNC path if any.
5400
5401 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
5402
5403         * exp_strm.adb (Build_Record_Or_Elementary_Input_Function): Remove the
5404         version-dependent generation of the return statement. The Ada 2005 tree
5405         is now the default.
5406
5407 2011-08-31  Thomas Quinot  <quinot@adacore.com>
5408
5409         * rtsfind.ads, exp_dist.adb (Find_Numeric_Representation): Predefined
5410         types Stream_Element_Offset and Storage_Offset have a different native
5411         type depending on whether the platform is 32 or 64 bits. When
5412         exchanging them, always convert to 64 bits.
5413
5414 2011-08-31  Yannick Moy  <moy@adacore.com>
5415
5416         * debug.adb: Reserve debug option -gnatd.E for passing gnatprove option
5417         --force-alfa to gnat2why.
5418
5419 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
5420
5421         * sem_ch12.adb (Save_References): If the node has aspects, save
5422         references within the corresponding expressions in a separate step,
5423         because the aspects are not directly in the tree for the declaration
5424         to which they belong.
5425
5426 2011-08-31  Arnaud Charlet  <charlet@adacore.com>
5427
5428         * freeze.adb (Freeze_Record_Type): Omit test on variable size component
5429         in CodePeer mode, since representation clauses are partially ignored.
5430         * gcc-interface/Make-lang.in: Update dependencies.
5431
5432 2011-08-31  Jose Ruiz  <ruiz@adacore.com>
5433
5434         * s-taprop-vxworks.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
5435         s-taprop-solaris.adb (Create_Task): Not_A_Specific_CPU can be assigned
5436         to any dispatching domain.
5437
5438 2011-08-31  Thomas Quinot  <quinot@adacore.com>
5439
5440         * exp_ch4.adb: Minor reformatting.
5441
5442 2011-08-31  Bob Duff  <duff@adacore.com>
5443
5444         * sem_ch6.adb (Get_Generic_Parent_Type): Don't query Subtype_Indication
5445         on nodes for which it is not defined.
5446         (Is_Non_Overriding_Operation): Exit the loop when we find a generic
5447         parent type.
5448
5449 2011-08-31  Bob Duff  <duff@adacore.com>
5450
5451         * sem_ch3.adb (Process_Full_View): Disable legality check if
5452         In_Instance, to avoid spurious errors.
5453         * sem_ch12.adb (Validate_Derived_Type_Instance): Disable legality check
5454         if In_Instance, to avoid spurious errors.
5455
5456 2011-08-31  Pascal Obry  <obry@adacore.com>
5457
5458         * a-direct.adb: Use Dir_Seps everywhere to properly handle all
5459         directory speparators.
5460         (Compose): Use Dir_Seps to handle both forms.
5461         (Create_Path): Use Dir_Seps instead of explicit check, no semantic
5462         changes.
5463         (Extension): Use Dir_Seps to handle both forms.
5464
5465 2011-08-31  Pascal Obry  <obry@adacore.com>
5466
5467         * prj-conf.adb: Minor reformatting.
5468
5469 2011-08-31  Jose Ruiz  <ruiz@adacore.com>
5470
5471         * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the
5472         dispatching domain aspect.
5473         * aspects.adb (Canonical_Aspect): Add entry for the dispatching domain
5474         aspect.
5475         * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the
5476         Dispatching_Domain aspect in a similar way as we do for the Priority
5477         aspect.
5478         * exp_ch9.adb (Expand_N_Task_Type_Declaration): Add the
5479         Dispatching_Domain component if a Dispatching_Domain pragma or aspect
5480         is present.
5481         (Make_Task_Create_Call): Add the Dispatching_Domain when creating a task
5482         * par-prag.adb (Prag): Add Pragma_Dispatching_Domain as a known pragma.
5483         * sem_prag.adb (Analyze_Pragma): Check the correctness of a pragma
5484         Dispatching_Domain and add it to the task definition.
5485         (Sig_Flags): Add Pragma_Dispatching_Domain.
5486         * rtsfind.ads, rtsfind.adb (RTU_Id, RE_Id, Get_Unit_Name): Add the
5487         support to find the types Dispatching_Domain and
5488         Dispatching_Domain_Access.
5489         * sinfo.ads, sinfo.adb (Has_Pragma_Dispatching_Domain,
5490         Set_Has_Pragma_Dispatching_Domain): Add these subprograms to set and
5491         query the availability of a pragma Dispatching_Domain.
5492         * snames.ads-tmpl (Name_uDispatching_Domain): Add this name required by
5493         the expander to pass the Dispatching_Domain when creating a task.
5494         (Name_Dispatching_Domain): Add this new name for a pragma.
5495         (Pragma_Id): Add the new Pragma_Dispatching_Domain.
5496         * s-tassta.ads, s-tassta.adb (Create_Task): Set the domain to which the
5497         task has been allocated at creation time.
5498         * s-tarest.adb (Create_Restricted_Task): The dispatching domain using
5499         Ravenscar is always null.
5500         * s-taskin.ads, s-taskin.adb (Initialize_ATCB): Set the domain to which
5501         the task has been allocated at creation time.
5502         * s-tporft.adb (Register_Foreign_Thread): A foreign task will not have
5503         a specific dispatching domain.
5504         * s-taprop-linux.adb, s-taprop-solaris.adb, s-taprop-vxworks.adb,
5505         s-taprop-mingw.adb (Create_Task): Check whether both Dispatching_Domain
5506         and CPU are specified for the task, and the CPU value is not contained
5507         within the range of processors for the domain.
5508
5509 2011-08-31  Vincent Celier  <celier@adacore.com>
5510
5511         * make.adb (Original_Gcc) : New constant String_Access.
5512         (Gnatmake): For VM targets, do not use VM version of the compiler if
5513         --GCC= has been specified.
5514
5515 2011-08-31  Thomas Quinot  <quinot@adacore.com>
5516
5517         * sem_ch5.adb: Minor reformatting.
5518
5519 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
5520
5521         * exp_pakd.adb (Convert_To_PAT_Type): If prefix is a function call, do
5522         not reanalyze it.
5523
5524 2011-08-31  Bob Duff  <duff@adacore.com>
5525
5526         * exp_ch4.adb (Expand_N_Selected_Component): Use the full type, in case
5527         the access type is private; we don't care about privacy in expansion.
5528
5529 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
5530
5531         * sem_aggr.adb (Resolve_Aggregate): In an instance, ignore aggregate
5532         subcomponents tnat may be limited, because they originate in view
5533         conflicts. If the original aggregate is legal and the actuals are
5534         legal, the aggregate itself is legal.
5535
5536 2011-08-31  Matthew Heaney  <heaney@adacore.com>
5537
5538         * a-rbtgbo.adb (Clear_Tree): Assert representation invariant for lock
5539         status.
5540
5541 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
5542
5543         * sem_ch5.adb: Set kind of loop parameter properly, to preserve all
5544         errors in B tests.
5545
5546 2011-08-31  Jose Ruiz  <ruiz@adacore.com>
5547
5548         * sem_ch13.adb (Analyze_Aspect_Specifications): For the Priority and
5549         Interrupt_Priority aspects, force the analysis of the aspect expression
5550         (when building the equivalent pragma). Otherwise, its analysis is done
5551         too late, after the task or protected object has been created.
5552         * sem_ch9.adb (Analyze_Single_Protected_Declaration,
5553         Analyze_Single_Task_Declaration): Remove the code to move the aspects
5554         to the object declaration because they are needed in the type
5555         declaration.
5556
5557 2011-08-31  Robert Dewar  <dewar@adacore.com>
5558
5559         * exp_ch5.adb, exp_ch7.ads, sem_ch5.adb, put_scos.adb, s-rannum.adb,
5560         a-rbtgbo.adb, exp_intr.adb, a-cbdlli.adb, a-cbdlli.ads: Minor
5561         reformatting.
5562
5563 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
5564
5565         * exp_util.adb (Find_Protection_Type): Do not look for fields _object
5566         if the corresponding type is malformed due to restriction violations.
5567
5568 2011-08-31  Robert Dewar  <dewar@adacore.com>
5569
5570         * s-ransee.ads, s-ransee.adb: Minor reformatting.
5571
5572 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
5573
5574         * exp_ch4.adb (Expand_N_Allocator): Correct faulty condition which
5575         would cause the generation of Set_Finalize_Address if the target is a
5576         VM and the designated type is not derived from [Limited_]Controlled.
5577
5578 2011-08-31  Arnaud Charlet  <charlet@adacore.com>
5579
5580         * comperr.adb, comperr.ads, gnat1drv.adb (Delete_SCIL_Files): New
5581         subprogram.
5582         (Compiler_Abort, Gnat1drv): Call Delete_SCIL_Files in codepeer mode in
5583         case of a compilation error.
5584
5585 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
5586
5587         * init.c (__gnat_error_handler): Standardize the stack overflow or
5588         erroneous memory access message.
5589         * seh_init.c (__gnat_SEH_error_handler): Standardize the stack overflow
5590         or erroneous memory access message.
5591
5592 2011-08-31  Robert Dewar  <dewar@adacore.com>
5593
5594         * sem_ch4.adb: Minor reformatting.
5595         * sem_ch6.adb: Minor code reorganization (use Ekind_In).
5596
5597 2011-08-31  Thomas Quinot  <quinot@adacore.com>
5598
5599         * scos.ads: Minor documentation clarification.
5600         * put_scos.adb: Do not generate SCO unit header line for a unit that
5601         has no SCO lines.
5602
5603 2011-08-31  Robert Dewar  <dewar@adacore.com>
5604
5605         * a-rbtgbo.adb, alfa_test.adb: Minor reformatting.
5606
5607 2011-08-31  Tristan Gingold  <gingold@adacore.com>
5608
5609         * exp_ch7.ads, exp_ch7.adb (Finalization_Exception_Data): New type to
5610         hold variables between these following subprograms.
5611         (Build_Exception_Handler, Build_Object_Declarations,
5612         Build_Raise_Statement): Use the above type as parameter.
5613         Make the above adjustments.
5614         * exp_intr.adb (Expand_Unc_Deallocation): Adjust.
5615
5616 2011-08-31  Pascal Obry  <obry@adacore.com>
5617
5618         * projects.texi: Minor reformatting.
5619
5620 2011-08-31  Tristan Gingold  <gingold@adacore.com>
5621
5622         * s-ransee.ads, s-ransee.adb: Add system.random_seed unit.
5623         * s-rannum.adb (Reset): Use Get_Seed from s-ransee.
5624
5625 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
5626
5627         * exp_ch5.adb: Minor code cleanup.
5628         * sem_ch5.adb (Analyze_Iteration_Scheme): Set ekind of loop variable to
5629         prevent cascaded errors.
5630         (Analyze_Loop_Statement): In semantics-only mode, introduce loop
5631         variable of an iterator specification in current scope.
5632         * sem_ch6.adb (Analyze_Return_Statement, Find_what_It_Apples_To): Skip
5633         postconditions on the stack, as they contain no return statements.
5634
5635 2011-08-31  Yannick Moy  <moy@adacore.com>
5636
5637         * exp_alfa.adb (Expand_Alfa_N_Package_Declaration,
5638         Expand_Alfa_N_Subprogram_Body): Remove useless procedures which simply
5639         call Qualify_Entity_Names.
5640         (Expand_Alfa): call Qualify_Entity_Names in more cases
5641         * lib-xref-alfa.adb: Take into account system package.
5642         * sem_prag.adb Take into account restrictions in Alfa mode, contrary to
5643         CodePeer mode in which we are interested in finding bugs even if
5644         compiler cannot compile source.
5645         * sem_util.adb, sem_util.ads (Unique_Entity): Take into account case of
5646         deferred constant.
5647
5648 2011-08-31  Gary Dismukes  <dismukes@adacore.com>
5649
5650         * sem_ch3.adb (Constrain_Concurrent): Retrieve Base_Type of the subtype
5651         denoted by the subtype mark to ensure getting the concurrent type in
5652         the case where the subtype mark denotes a private subtype of a
5653         concurrent type (needed when using -gnatc).
5654         (Process_Subtype): For the processing specific to type kinds, case on
5655         the Base_Type kind of the Subtype_Mark_Id, to handle cases where the
5656         subtype denotes a private subtype whose base type is nonprivate (needed
5657         for subtypes of private fulfilled by task types when compiling with
5658         -gnatc).
5659
5660 2011-08-31  Gary Dismukes  <dismukes@adacore.com>
5661
5662         * sem_disp.adb (Check_Dispatching_Operation): Bypass registration of
5663         late primitives that override interface operations when the full
5664         expander is not active, to avoid blowups in Register_Primitive when
5665         types don't have associated secondary dispatch tables.
5666
5667 2011-08-31  Yannick Moy  <moy@adacore.com>
5668
5669         * alfa_test.adb: Code clean up.
5670
5671 2011-08-31  Marc Sango  <sango@adacore.com>
5672
5673         * restrict.adb (Check_SPARK_Restriction): Change Comes_From_Source (N)
5674         by Comes_From_Source (Original_Node (N)) in order to treat also the
5675         nodes which have been rewritten.
5676         * sem_ch4.adb (Analyze_Explicit_Dereference, Analyze_Slice): Guard the
5677         explicit dereference and slice violation in spark mode on the nodes 
5678         coming only from the source code.
5679
5680 2011-08-31  Robert Dewar  <dewar@adacore.com>
5681
5682         * exp_ch5.adb, exp_alfa.ads, prj.ads, sem_attr.adb,
5683         lib-xref-alfa.adb: Minor reformatting.
5684
5685 2011-08-31  Matthew Heaney  <heaney@adacore.com>
5686
5687         * a-crbltr.ads (Tree_Type): Default-initialize the Nodes component.
5688
5689 2011-08-31  Javier Miranda  <miranda@adacore.com>
5690
5691         * sem_ch4.adb (Try_Object_Operation): Addition of one formal to search
5692         only for class-wide subprograms conflicting with entities of concurrent
5693         tagged types.
5694
5695 2011-08-31  Matthew Heaney  <heaney@adacore.com>
5696
5697         * a-rbtgbo.adb (Generic_Allocate): Initialize pointer components of
5698         node to null value.
5699
5700 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
5701
5702         * sem_ch12.adb (Insert_Freeze_Node_For_Instance): Provide a more
5703         general description of the routine.
5704
5705 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
5706
5707         * a-cbdlli.adb, a-cbdlli.ads: Add iterator machinery to bounded
5708         doubly-linked lists.
5709
5710 2011-08-31  Gary Dismukes  <dismukes@adacore.com>
5711
5712         * exp_ch5.adb (Expand_N_Assignment_Statement): When a discriminant
5713         check is needed for a left-hand side that is a dereference, and the
5714         base type is private without discriminants (whereas the full type does
5715         have discriminants), an extra retrieval of the underlying type may be
5716         needed in the case where the subtype is a record subtype whose base
5717         type is private. Update comments.
5718
5719 2011-08-31  Javier Miranda  <miranda@adacore.com>
5720
5721         * sem_ch4.adb (Try_Object_Operation): When a dispatching primitive is
5722         found check if there is a class-wide subprogram covering the primitive.
5723         
5724 2011-08-31  Yannick Moy  <moy@adacore.com>
5725
5726         * sem_res.adb: Further cases where full expansion test is needed,
5727         rather than expansion test.
5728
5729 2011-08-31  Pascal Obry  <obry@adacore.com>
5730
5731         * prj-attr.adb: Fix Source_File_Switches attribute kind (must be a list)
5732
5733 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
5734
5735         * exp_ch5.adb: Handle iterators over derived container types.
5736
5737 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
5738
5739         * einfo.ads, einfo.adb: Add new flag Has_Anonymous_Master.
5740         (Has_Anonymous_Master): New routine.
5741         (Set_Has_Anonymous_Master): New routine.
5742         (Write_Entity_Flags): Add an entry for Has_Anonymous_Master.
5743         * exp_ch4.adb: Add with and use clause for Sem_Ch8.
5744         (Current_Anonymous_Master): New routine.
5745         (Current_Unit_First_Declaration): Removed.
5746         (Current_Unit_Scope): Removed.
5747         (Expand_N_Allocator): Anonymous access-to-controlled types now chain
5748         their objects on a per-unit heterogeneous finalization master.
5749
5750 2011-08-31  Matthew Heaney  <heaney@adacore.com>
5751
5752         * a-cbhama.adb, a-cbhase.adb (Insert): Check for zero-length buckets
5753         array.
5754
5755 2011-08-31  Jose Ruiz  <ruiz@adacore.com>
5756
5757         * s-taprop-linux.adb (Create_Task): Avoid changing the affinity mask
5758         when not needed.
5759
5760 2011-08-31  Gary Dismukes  <dismukes@adacore.com>
5761
5762         * sem_disp.adb (Propagate_Tag): Return without propagating in the case
5763         where the actual is an unexpanded call to 'Input.
5764
5765 2011-08-31  Yannick Moy  <moy@adacore.com>
5766
5767         * sem_ch4.adb: Code clean up.
5768
5769 2011-08-31  Yannick Moy  <moy@adacore.com>
5770
5771         * exp_alfa.adb, exp_alfa.ads: Minor correction of copyright notice.
5772
5773 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
5774
5775         * exp_ch7.adb (Build_Array_Deep_Procs): Do not generate Deep_Finalize
5776         and TSS primitive Finalize_Address if finalization is suppressed.
5777         (Build_Record_Deep_Procs): Do not generate Deep_Finalize and TSS
5778         primitive Finalize_Address if finalization is suppressed.
5779
5780 2011-08-31  Jose Ruiz  <ruiz@adacore.com>
5781
5782         * s-mudido-affinity.adb, s-taprop-linux.adb, s-taprop-mingw.adb,
5783         s-taprop-solaris.adb, s-taprop-vxworks.adb (Set_Task_Affinity): Make
5784         sure that the underlying task has already been created before trying
5785         to change its affinity.
5786         (Set_CPU): Use the term processor instead of CPU, as we do in
5787         Assign_Task.
5788
5789 2011-08-31  Vincent Celier  <celier@adacore.com>
5790
5791         * prj-attr.adb: New Compiler attribute Source_File_Switches.
5792         * prj-nmsc.adb (Process_Compiler): Process attribute
5793         Source_File_Switches.
5794         * prj.ads (Language_Config): New name list component
5795         Name_Source_File_Switches.
5796         * snames.ads-tmpl (Name_Source_File_Switches): New standard name.
5797
5798 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
5799
5800         * sem_attr.adb (Analyze_Attribute, case 'Old): If prefix may be a
5801         discriminated component of an actual, expand at once to prevent
5802         ouf-of-order references with generated subtypes.
5803
5804 2011-08-31  Yannick Moy  <moy@adacore.com>
5805
5806         * lib-xref-alfa.adb (Add_Alfa_Xrefs): Do not take into account read
5807         reference to operator in Alfa xrefs.
5808
5809 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
5810
5811         * sem_ch12.adb (Freeze_Subprogram_Body): Add code to handle the case
5812         where the parent instance was frozen before the current instance due to
5813         the presence of a source body. Update calls to Insert_After_Last_Decl.
5814         (Insert_After_Last_Decl): Renamed to Insert_Freeze_Node_For_Instance.
5815         Update the comment which illustrates the purpose of the routine.
5816         Package instances are now frozen by source bodies which appear after
5817         the instance. This ensures that entities coming from within the
5818         instance are available for use in the said bodies.
5819         (Install_Body): Add code to handle the case where the parent instance
5820         was frozen before the current instance due to the presence of a source
5821         body. Update calls to Insert_After_Last_Decl.
5822
5823 2011-08-31  Jose Ruiz  <ruiz@adacore.com>
5824
5825         * s-taprop-linux.adb (Set_Task_Affinity): Avoid the use of anonymous
5826         access types.
5827         * affinity.c (__gnat_set_affinity_mask): Declare index variable.
5828
5829 2011-08-31  Yannick Moy  <moy@adacore.com>
5830
5831         * sem_ch8.adb (Analyze_Subprogram_Renaming): Refine expander test in
5832         full-expander test.
5833         * alfa.adb, alfa.ads, alfa_test.adb, ali.adb, debug.adb, errout.adb,
5834         errout.ads, erroutc.adb, expander.adb, exp_ch4.adb, exp_ch7.adb,
5835         freeze.adb, get_alfa.adb, get_alfa.ads, gnat1drv.adb, lib-writ.adb,
5836         lib-writ.ads, lib-xref.adb, lib-xref.ads, lib-xref-alfa.adb, opt.adb,
5837         opt.ads, put_alfa.adb, put_alfa.ads, restrict.adb, sem_ch12.adb,
5838         sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
5839         sem_prag.adb, sem_res.adb, sem_util.adb: Minor reformatting, renaming
5840         ALFA in Alfa (we dropped acronym).
5841         * einfo.adb (Primitive_Operations): Correctly return list of primitive
5842         operations in a case where it returned previously No_Elist.
5843
5844 2011-08-31  Robert Dewar  <dewar@adacore.com>
5845
5846         * s-taprop-vxworks.adb, sem_ch5.adb, s-taprop-tru64.adb, exp_alfa.adb,
5847         s-taprop-vms.adb, bindgen.adb, s-mudido.adb, s-mudido.ads,
5848         sem_res.adb, expander.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
5849         s-taprop-solaris.adb, s-mudido-affinity.adb, vms_conv.adb,
5850         s-taprop-irix.adb, s-taprop.ads, s-taskin.adb, s-taskin.ads,
5851         s-taprop-hpux-dce.adb, a-chtgbo.adb, s-taprop-posix.adb: Minor
5852         reformatting.
5853
5854 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
5855
5856         * sem_ch12 (Check_Private_View): Revert previous change.
5857         * sem_res.adb (Conversion_Check): Do not emit the error message if the
5858         conversion is in a generic instance.
5859
5860 2011-08-31  Matthew Heaney  <heaney@adacore.com>
5861
5862         * a-cbhase.adb (Symmetric_Difference): Dereference correct node array.
5863         * a-chtgbo.adb (Free): Allow 0 as index value.
5864
5865 2011-08-31  Matthew Heaney  <heaney@adacore.com>
5866
5867         * a-cborma.adb (Insert): Add comment to explain why no element
5868         assignment.
5869
5870 2011-08-31  Gary Dismukes  <dismukes@adacore.com>
5871
5872         * sem_util.adb (Find_Body_Discriminal): Test whether the scope of the
5873         spec discriminant is already a concurrent type, in which case just use
5874         it, otherwise fetch the Corresponding_Concurrent_Type as before.
5875
5876 2011-08-30  Eric Botcazou  <ebotcazou@adacore.com>
5877
5878         * system-irix-n64.ads, system-linux-armeb.ads, system-linux-armel.ads,
5879         system-linux-mips.ads, system-linux-mipsel.ads,
5880         system-linux-mips64el.ads, system-linux-ppc64.ads,
5881         system-linux-sparcv9.ads, system-rtems.ads: Remove GCC_ZCX_Support.
5882
5883 2011-08-30  Eric Botcazou  <ebotcazou@adacore.com>
5884
5885         * gcc-interface/ada-tree.h (TYPE_EXTRA_SUBTYPE_P): Add internal check.
5886         * gcc-interface/utils2.c (build_binary_op): Tighten condition.
5887         (build_unary_op): Likewise.
5888
5889 2011-08-30  Eric Botcazou  <ebotcazou@adacore.com>
5890
5891         * raise-gcc.c: Do not include coretypes.h and tm.h.
5892         (setup_to_install): Remove test for compiler macro.
5893         * targext.c: Document use for the library.
5894         * gcc-interface/Makefile.in: Fix comment on the use of IN_GCC.
5895
5896 2011-08-30  Eric Botcazou  <ebotcazou@adacore.com>
5897
5898         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not convert
5899         the expression to the nominal type if the latter is a record type with
5900         a variant part and the type of the former is a record type without one.
5901
5902 2011-08-30  Yannick Moy  <moy@adacore.com>
5903
5904         * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
5905         expansion in Alfa mode.
5906         * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public
5907         * exp_alfa.adb, exp_alfa.ads: New package defining light expansion for
5908         Alfa mode.
5909         * gnat1drv.adb (Adjust_Global_Switches): Update Comment.
5910         * sem_res.adb: Ditto.
5911         * gcc-interface/Make-lang.in: Update dependencies.
5912
5913 2011-08-30  Thomas Quinot  <quinot@adacore.com>
5914
5915         * g-socket.ads: Minor documentation adjustment.
5916
5917 2011-08-30  Robert Dewar  <dewar@adacore.com>
5918
5919         * exp_ch9.adb, s-tassta.adb, s-secsta.adb: Minor reformatting.
5920
5921 2011-08-30  Yannick Moy  <moy@adacore.com>
5922
5923         * exp_ch6_light.adb, exp_ch6_light.ads, exp_attr_light.adb,
5924         exp_attr_light.ads, exp_ch7_light.adb, exp_ch7_light.ads,
5925         exp_light.adb, exp_light.ads, exp_prag.adb, expander.adb,
5926         gnat1drv.adb, exp_ch11.adb, exp_ch6.adb, exp_ch6.ads, exp_aggr.adb:
5927         Revert change which introduced files for "light"
5928         expansion, to be replaced by a single file for Alfa expansion.
5929
5930 2011-08-30  Robert Dewar  <dewar@adacore.com>
5931
5932         * opt.ads, s-soflin.adb, exp_ch9.adb, sem_res.adb: Update comment.
5933         Minor code reorg/reformatting.
5934
5935 2011-08-30  Yannick Moy  <moy@adacore.com>
5936
5937         * opt.adb, opt.ads (Full_Expander_Active): New function defines a
5938         common shorthand for (Expander_Active and not ALFA_Mode) that can be
5939         used for testing full expansion, that is active expansion not in the
5940         reduced mode for Alfa
5941         * exp_ch4.adb, exp_ch9.adb, exp_disp.adb, sem_ch10.adb, sem_ch12.adb,
5942         sem_ch6.adb, sem_ch9.adb, sem_res.adb: Use newly defined "flag" instead
5943         of the verbose (Expander_Active and not ALFA_Mode)
5944
5945 2011-08-30  Tristan Gingold  <gingold@adacore.com>
5946
5947         * s-parame-vms-alpha.ads, s-parame-hpux.ads, s-tassta.adb,
5948         s-tarest.adb, s-parame-vms-ia64.ads, s-soflin.adb, s-secsta.adb,
5949         s-secsta.ads, s-parame.ads, s-parame-vxworks.ads, s-parame-ae653.ads:
5950         Renames Ratio to Percentage, and Sec_Stack_Ratio to Sec_Stack_Percentage
5951
5952 2011-08-30  Gary Dismukes  <dismukes@adacore.com>
5953
5954         * sem_res.adb (Valid_Conversion): Revise test for implicit anonymous
5955         access conversions to check that the conversion is a rewritten node,
5956         rather than just having Comes_From_Source set to False, which wasn't
5957         sufficient.
5958
5959 2011-08-30  Robert Dewar  <dewar@adacore.com>
5960
5961         * exp_ch9.adb, sem_ch9.adb, sem_ch6.adb, exp_disp.adb,
5962         g-socket.ads: Minor reformatting.
5963
5964 2011-08-30  Thomas Quinot  <quinot@adacore.com>
5965
5966         * sem_util.adb: Minor reformatting.
5967
5968 2011-08-30  Tristan Gingold  <gingold@adacore.com>
5969
5970         * raise-gcc.c: Never catch exception if _UA_FORCE_UNWIND flag is set,
5971         to be compliant with the ABI.
5972
5973 2011-08-30  Hristian Kirtchev  <kirtchev@adacore.com>
5974
5975         * sem_ch12.adb (Check_Private_View): Exchange the private and full view
5976         of a designated type when the related access type is an actual in an
5977         instance. This ensures that the full view of designated type is
5978         available when inside the body of the instance.
5979
5980 2011-08-30  Ed Schonberg  <schonberg@adacore.com>
5981
5982         * sem_util.adb (May_Be_Lvalue): To determine whether a reference may be
5983         in a position to be modified, a slice is treated like an indexed
5984         component.
5985
5986 2011-08-30  Thomas Quinot  <quinot@adacore.com>
5987
5988         * s-oscons-tmplt.c, g-socket.ads: Adjust maximum allowed value for
5989         field tv_sec in struct timeval.
5990
5991 2011-08-30  Yannick Moy  <moy@adacore.com>
5992
5993         * exp_ch9.adb, exp_disp.adb, sem_ch9.adb, sem_res.adb: Protect several
5994         blocks of code doing full expansion, previously only guarded by
5995         Expander_Active, by anding the test that ALFA_Mode is not set
5996
5997 2011-08-30  Ed Schonberg  <schonberg@adacore.com>
5998
5999         * sem_ch6.adb (Analyze_Return_Type): If the return type is incomplete,
6000         add the function to the list of private dependents, for subsequent
6001         legality check on Taft amendment types.
6002         * sem_ch12.adb (Analyze_Formal_Incomplete_Type): Initialize
6003         Private_Dependents, as for other incomplete types.
6004         * sem_util.adb (Wrong_Type): Avoid cascaded errors when a
6005         Taft-amendment type is used as the return type of a function.
6006
6007 2011-08-30  Javier Miranda  <miranda@adacore.com>
6008
6009         * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup: replace code
6010         which emits an error by a call to a new routine which report the error.
6011         * exp_ch9.adb (Build_Wrapper_Spec): Build the wrapper even if the
6012         entity does not cover an existing interface.
6013         * errout.ads, errout.adb (Error_Msg_PT): New routine. Used to factorize
6014         code.
6015         * sem_ch6.adb (Check_Conformance): Add specific error for wrappers of
6016         protected procedures or entries whose mode is not conformant.
6017         (Check_Synchronized_Overriding): Code cleanup: replace code which emits
6018         an error by a call to a new routine which report the error.
6019
6020 2011-08-30  Robert Dewar  <dewar@adacore.com>
6021
6022         * gnat_rm.texi: Minor change.
6023         * exp_attr_light.adb: Minor reformatting.
6024
6025 2011-08-30  Ed Schonberg  <schonberg@adacore.com>
6026
6027         * sem_ch3.adb: Patch inheritance of aspects in
6028         Complete_Private_Subtype, to avoid infinite loop.
6029
6030 2011-08-30  Javier Miranda  <miranda@adacore.com>
6031
6032         * sem_ch3.adb (Add_Internal_Interface_Entities): If serious errors have
6033         been reported and a subprogram covering an interface primitive is not
6034         found then skip generating the internal entity. Done to avoid crashing
6035         the frontend.
6036         (Check_Abstract_Overriding): Change text of error of wrong formal of
6037         protected subprogram or entry. Done for consistency to emit exactly the
6038         same error reported by Check_Synchronized_Overriding. In addition, the
6039         error is restricted to protected types (bug found working on AI05-0090)
6040
6041 2011-08-30  Yannick Moy  <moy@adacore.com>
6042
6043         * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
6044         expansion in Alfa mode.
6045         * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public.
6046         * exp_light.adb, exp_light.ads: New package defining light expansion.
6047         * expander.adb (Expand): Call light expansion in Alfa mode
6048         * exp_ch6_light.adb, exp_ch6_light.ads: Light expansion of chapter 6
6049         constructs.
6050         * exp_ch7_light.adb, exp_ch7_light.ads: Light expansion of chapter 7
6051         constructs.
6052         * exp_attr_light.adb, exp_attr_light.ads: Light expansion of attributes
6053         * gnat1drv.adb (Adjust_Global_Switches): Comment
6054
6055 2011-08-30  Yannick Moy  <moy@adacore.com>
6056
6057         * lib-xref-alfa.adb: Minor refactoring.
6058
6059 2011-08-30  Yannick Moy  <moy@adacore.com>
6060
6061         * exp_ch9.adb (Expand_Entry_Barrier): Do not perform expansion in Alfa
6062         mode.
6063         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not perform
6064         expansion in Alfa mode.
6065         * sem_ch9.adb (Analyze_Entry_Body): Do not perform expansion in Alfa
6066         mode.
6067
6068 2011-08-30  Robert Dewar  <dewar@adacore.com>
6069
6070         * debug_a.adb: Update comment.
6071
6072 2011-08-30  Robert Dewar  <dewar@adacore.com>
6073
6074         * exp_ch5.adb, sem_ch3.adb, sem_ch5.adb, einfo.adb, checks.adb,
6075         sem_util.adb, sem_util.ads, sem_res.adb, s-stposu.adb, sem_attr.adb,
6076         exp_ch4.adb, exp_ch6.adb, lib-xref-alfa.adb,
6077         sem_ch8.adb, sem_disp.adb, exp_ch3.adb: Minor reformatting
6078
6079 2011-08-30  Robert Dewar  <dewar@adacore.com>
6080
6081         * gnat_rm.texi: Add section on C.6(16) implementation advice for pragma
6082         volatile.
6083
6084 2011-08-30  Hristian Kirtchev  <kirtchev@adacore.com>
6085
6086         * exp_ch3.adb (Expand_Freeze_Array_Type): Correct the call to
6087         Build_Finalization_Master by supplying an insertion node and enclosing
6088         scope. In its old version, the call did not generate a finalization
6089         master.
6090         (Expand_Freeze_Record_Type): Add local variable Has_AACC. Add code to
6091         recognize anonymous access-to-controlled components. Rewrite the
6092         machinery which creates finalization masters to service anonymous
6093         access-to-controlled components of a record type. In its current state,
6094         only one heterogeneous master is necessary to handle multiple anonymous
6095         components.
6096         (Freeze_Type): Comment reformatting.
6097         * rtsfind.ads: Add RE_Set_Is_Heterogeneous to tables RE_Id and
6098         RE_Unit_Table.
6099         * s-stposu.adb (Allocate_Any_Controlled): Rewrite the machinery which
6100         associates TSS primitive Finalize_Address with either the master itself
6101         or with the internal hash table depending on the mode of operation of
6102         the master.
6103
6104 2011-08-30  Javier Miranda  <miranda@adacore.com>
6105
6106         * exp_ch3.adb (Make_Eq_If): If the etype of the _parent component is an
6107         interface type then do not generate code to compare this component.
6108         Required since they have no components and their equality operator is
6109         abstract.
6110
6111 2011-08-30  Steve Baird  <baird@adacore.com>
6112
6113         * sem_util.ads (Deepest_Type_Access_Level): New function; for the type
6114         of a saooaaat (i.e, a stand-alone object of an anonymous access type),
6115         returns the (static) accessibility level of the object. Otherwise, the
6116         same as Type_Access_Level.
6117         (Dynamic_Accessibility_Level): New function; given an expression which
6118         could occur as the rhs of an assignment to a saooaaat (i.e., an
6119         expression of an access-to-object type), return the new value for the
6120         saooaaat's associated Extra_Accessibility object.
6121         (Effective_Extra_Accessibility): New function; same as
6122         Einfo.Extra_Accessibility except that object renames are looked through.
6123         * sem_util.adb 
6124         (Deepest_Type_Access_Level): New function; see sem_util.ads description.
6125         (Dynamic_Accessibility_Level): New function; see sem_util.ads
6126         description.
6127         (Effective_Extra_Accessibility): New function; see sem_util.ads
6128         description.
6129         * einfo.ads (Is_Local_Anonymous_Access): Update comments.
6130         (Extra_Accessibility): Update comments.
6131         (Init_Object_Size_Align): New procedure; same as Init_Size_Align
6132         except RM_Size field (which is only for types) is unaffected.
6133         * einfo.adb
6134         (Extra_Accessibility): Expand domain to allow objects, not just formals.
6135         (Set_Extra_Accessibility): Expand domain to allow objects, not just
6136         formals.
6137         (Init_Size): Add assertion that we are not trashing the
6138         Extra_Accessibility attribute of an object.
6139         (Init_Size_Align): Add assertion that we are not trashing the
6140         Extra_Accessibility attribute of an object.
6141         (Init_Object_Size_Align): New procedure; see einfo.ads description.
6142         * sem_ch3.adb (Find_Type_Of_Object): Set Is_Local_Anonymous_Access
6143         differently for the type of a (non-library-level) saooaaat depending
6144         whether Ada_Version < Ada_2012. This is the only point where Ada_Version
6145         is queried in this set of changes - everything else (in particular,
6146         setting of the Extra_Accessibility attribute in exp_ch3.adb) is
6147         driven off of the setting of the Is_Local_Anonymous_Access attribute.
6148         The special treatment of library-level saooaaats is an optimization,
6149         not required for correctnesss. This is based on the observation that the
6150         Ada2012 rules (static and dynamic) for saooaaats turn out to be
6151         equivalent to the Ada2005 rules in the case of a library-level saooaaat.
6152         * exp_ch3.adb
6153         (Expand_N_Object_Declaration): If Is_Local_Anonymous_Access is
6154         false for the type of a saooaaat, declare and initialize its
6155         accessibility level object and set the Extra_Accessibility attribute
6156         of the saooaaat to refer to this object.
6157         * checks.adb (Apply_Accessibility_Check): Add Ada 2012 saooaaat support.
6158         * exp_ch4.adb (Expand_N_In): Replace some Extra_Accessibility calls with
6159         calls to Effective_Extra_Accessibility in order to support
6160         renames of saooaaats.
6161         (Expand_N_Type_Conversion): Add new local function,
6162         Has_Extra_Accessibility, and call it when determining whether an
6163         accessibility check is needed.
6164         It returns True iff Present (Effective_Extra_Accessibility (Id)) would
6165         evaluate to True (without raising an exception).
6166         * exp_ch5.adb
6167         (Expand_N_Assignment_Statement): When assigning to an Ada2012
6168         saooaaat, update its associated Extra_Accessibility object (if
6169         it has one). This includes an accessibility check.
6170         * exp_ch6.adb (Add_Call_By_Copy_Code): When parameter copy-back updates
6171         a saooaaat, update its Extra_Accessibility object too (if it
6172         has one).
6173         (Expand_Call): Replace a couple of calls to Type_Access_Level
6174         with calls to Dynamic_Access_Level to handle cases where
6175         passing a literal (any literal) is incorrect.
6176         * sem_attr.adb (Resolve_Attribute): Handle the static accessibility
6177         checks associated with "Saooaat := Some_Object'Access;"; this must
6178         be rejected if Some_Object is declared in a more nested scope
6179         than Saooaat.
6180         * sem_ch5.adb (Analyze_Assignment): Force accessibility checking for an
6181         assignment to a saooaaat even if Is_Local_Anonymous_Access
6182         returns False for its type (indicating a 2012-style saooaaat).
6183         * sem_ch8.adb
6184         (Analyze_Object_Renaming): Replace a call to Init_Size_Align
6185         (which is only appropriate for objects, not types) with a call
6186         of Init_Object_Size_Align in order to avoid trashing the
6187         Extra_Accessibility attribute of a rename (the two attributes
6188         share storage).
6189         * sem_res.adb
6190         (Valid_Conversion) Replace six calls to Type_Access_Level with
6191         calls to Deepest_Type_Access_Level. This is a bit tricky. For an
6192         Ada2012 non-library-level saooaaat, the former returns library level
6193         while the latter returns the (static) accessibility level of the
6194         saooaaat. A type conversion to the anonymous type of a saooaaat
6195         can only occur as part of an assignment to the saooaaat, so we
6196         know that such a conversion must be in a lhs context, so Deepest
6197         yields the result that we need. If such a conversion could occur,
6198         say, as the operand of an equality operator, then this might not
6199         be right. Also add a test so that static accessibilty checks are
6200         performed for converting to a saooaaat's type even if
6201         Is_Local_Anonymous_Access yields False for the type.
6202
6203 2011-08-30  Javier Miranda  <miranda@adacore.com>
6204
6205         * sem_disp.adb (Check_Dispatching_Operation): Complete condition that
6206         controls generation of a warning associated with late declaration of
6207         dispatching functions. Required to avoid generating spurious
6208         warnings.
6209
6210 2011-08-30  Gary Dismukes  <dismukes@adacore.com>
6211
6212         * sem_ch6.adb (Check_Return_Subtype_Indication): Issue error if the
6213         return object has an anonymous access type and the function's type is
6214         a named access type.
6215         * sem_ch8.adb (Analyze_Object_Renaming): Suppress error about renaming
6216         conversions on implicit conversions, since such conversions can occur
6217         for anonymous access cases due to expansion. Issue error for attempt
6218         to rename an anonymous expression as an object of a named access type.
6219         * sem_res.ads (Valid_Conversion): Add defaulted parameter Report_Errs,
6220         to indicate whether this function should report errors on invalid
6221         conversions.
6222         * sem_res.adb (Resolve): For Ada 2012, in the case where the type of
6223         the expression is of an anonymous access type and the expected type is
6224         a named general access type, rewrite the expression as a type
6225         conversion, unless this is an expression of a membership test.
6226         (Valid_Conversion.Error_Msg_N): New procedure that conditions the
6227         calling of Error_Msg_N on new formal Report_Errs.
6228         (Valid_Conversion.Error_Msg_NE): New procedure that conditions the
6229         calling of Error_Msg_NE on new formal Report_Errs.
6230         (Valid_Conversion): Move declaration of this function to the package
6231         spec, to allow calls from membership test processing. For Ada 2012,
6232         enforce legality restrictions on implicit conversions of anonymous
6233         access values to general access types, disallowing such conversions in
6234         cases where the expression has a dynamic accessibility level (access
6235         parameters, stand-alone anonymous access objects, or a component of a
6236         dereference of one of the first two cases).
6237         * sem_type.adb (Covers): For Ada 2012, allow an anonymous access type
6238         in the context of a named general access expected type.
6239         * exp_ch4.adb Add with and use of Exp_Ch2.
6240         (Expand_N_In): Add processing for membership tests applied to
6241         expressions of an anonymous access type. First, Valid_Conversion is
6242         called to check whether the test is statically False, and then the
6243         conversion is expanded to test that the expression's accessibility
6244         level is no deeper than that of the tested type. In the case of
6245         anonymous access-to-tagged types, a tagged membership test is applied
6246         as well.
6247         (Tagged_Membership): Extend to handle access type cases, applying the
6248         test to the designated types.
6249         * exp_ch6.adb (Expand_Call): When creating an extra actual for an
6250         accessibility level, and the actual is a 'Access applied to a current
6251         instance, pass the accessibility level of the type of the current
6252         instance rather than applying Object_Access_Level to the prefix. Add a
6253         ??? comment, since this level isn't quite right either (will eventually
6254         need to pass an implicit level parameter to init procs).
6255
6256 2011-08-30  Bob Duff  <duff@adacore.com>
6257
6258         * s-taskin.ads: Minor comment fix.
6259
6260 2011-08-30  Ed Schonberg  <schonberg@adacore.com>
6261
6262         * sem_res.adb (Check_Parameterless_Call): If the node is a selected
6263         component and the selector is a dispatching operation, check if it is
6264         a prefixed call before rewriting as a parameterless function call.
6265
6266 2011-08-29  Jakub Jelinek  <jakub@redhat.com>
6267
6268         * gcc-interface/Makefile.in (../stamp-gnatlib1-$(RTSDIR)): Copy
6269         tsystem.h into $(RTSDIR) instead of rts.
6270
6271 2011-08-29  Robert Dewar  <dewar@adacore.com>
6272
6273         * sem_ch10.adb, a-coorse.adb, exp_dist.adb, exp_ch3.adb: Minor
6274         reformatting.
6275         * gcc-interface/Make-lang.in: Update dependencies.
6276
6277 2011-08-29  Yannick Moy  <moy@adacore.com>
6278
6279         * alfa.ads (Name_Of_Heap_Variable): New constant name.
6280         * lib-xref-alfa.adb, lib-xref.adb, lib-xref.ads (Drefs): New global
6281         table to hold dereferences.
6282         (Add_ALFA_Xrefs): Take into account dereferences as special
6283         reads/writes to the variable "HEAP".
6284         (Enclosing_Subprogram_Or_Package): Move subprogram here.
6285         (Generate_Dereference): New procedure to store a read/write dereferencew
6286         in the table Drefs.
6287         * put_alfa.adb (Put_ALFA): Use different default than (0,0) used for
6288         the special "HEAP" var.
6289         * sem_ch4.adb (Analyze_Explicit_Dereference): Store read dereference
6290         in ALFA mode.
6291         * sem_util.adb (Note_Possible_Modification): Store write dereference
6292         in ALFA mode.
6293
6294 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
6295
6296         * exp_ch3.adb (Freeze_Type): Generate an accessibility check which
6297         ensures that the level of the subpool access type is not deeper than
6298         that of the pool object.
6299         * sem_util.adb (Object_Access_Level): Expand to handle defining
6300         identifiers.
6301         * sem_res.adb (Resolve_Allocator): Add a guard to avoid examining the
6302         subpool handle name of a rewritten allocator.
6303
6304 2011-08-29  Robert Dewar  <dewar@adacore.com>
6305
6306         * impunit.adb, exp_ch4.adb, s-finmas.adb: Minor reformatting.
6307
6308 2011-08-29  Thomas Quinot  <quinot@adacore.com>
6309
6310         * exp_dist.adb (TC_Rec_Add_Process_Element): For a choice with multiple
6311         values, we generate multiple triples of parameters in the TypeCode.
6312         Bump Choice_Index for each such triple so that a subsequent default
6313         choice is associated with the correct index in the typecode.
6314
6315 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6316
6317         * a-cdlili.adb (Iterate): Initialize properly an iterator over a null
6318         container.
6319         (First, Last): Handle properly an iterator over a null container.
6320
6321 2011-08-29  Bob Duff  <duff@adacore.com>
6322
6323         * sem_ch10.adb (Analyze_With_Clause,Install_Withed_Unit): Abandon
6324         processing if we run across a node with no Scope. This can happen if
6325         we're with-ing an library-level instance, and that instance got errors
6326         that caused "instantiation abandoned".
6327         * sem_util.adb (Unit_Declaration_Node): Make it more robust, by raising
6328         an exception instead of using Assert, so it won't go into an infinite
6329         loop, even when assertions are turned off.
6330
6331 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6332
6333         * a-coorse.adb: Proper handling of empty ordered sets.
6334
6335 2011-08-29  Johannes Kanig  <kanig@adacore.com>
6336
6337         * debug.adb: Add comments.
6338
6339 2011-08-29  Thomas Quinot  <quinot@adacore.com>
6340
6341         * a-except.adb, a-except-2005.adb: Minor comment rewording and
6342         reformatting.
6343
6344 2011-08-29  Yannick Moy  <moy@adacore.com>
6345
6346         * sem_ch3.adb (Array_Type_Declaration): Remove insertion of
6347         declaration for Itypes in Alfa mode.
6348
6349 2011-08-29  Robert Dewar  <dewar@adacore.com>
6350
6351         * a-cdlili.ads, a-coinve.ads, a-coorma.adb, a-coorma.ads, s-tassta.adb,
6352         a-cborma.adb, a-cborma.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
6353         a-cborse.ads, a-cobove.adb, a-cobove.ads, a-cbhase.ads: Minor
6354         reformatting.
6355
6356 2011-08-29  Tristan Gingold  <gingold@adacore.com>
6357
6358         * exp_ch7.adb, exp_ch7.ads (Build_Exception_Handler): Move its spec to
6359         package spec.
6360         * exp_intr.adb (Expand_Unc_Deallocation): Use Build_Exception_Handler.
6361         * a-except.adb, a-except-2005.adb (Rcheck_22): Do not defer aborts
6362         while raising PE.
6363
6364 2011-08-29  Robert Dewar  <dewar@adacore.com>
6365
6366         * a-cbhama.adb, a-cbhama.ads: Minor reformatting.
6367
6368 2011-08-29  Javier Miranda  <miranda@adacore.com>
6369
6370         * sem_ch8.adb (Analyze_Subprogram_Renaming): Complete support for
6371         renamings of formal subprograms when the actual for a formal type is
6372         class-wide.
6373
6374 2011-08-29  Matthew Heaney  <heaney@adacore.com>
6375
6376         * a-cbhama.ads, a-cbhase.ads (Move): Clear Source following assignment
6377         to Target.
6378
6379 2011-08-29  Matthew Heaney  <heaney@adacore.com>
6380
6381         * a-cborma.ads, a-cborse.ads (Cursor): Default-initialize all
6382         components of record type.
6383         * a-cborma.adb, a-cborse.adb (Move): Clear Source following assignmentw
6384         to Target.
6385
6386 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6387
6388         * a-cbhama.adb, a-cbhama.ads, a-cborma.adb, a-cborma.ads, a-cobove.adb,
6389         a-cobove.ads, a-coorma.adb, a-coorma.ads: Add iterator machinery to
6390         container packages.
6391
6392 2011-08-29  Robert Dewar  <dewar@adacore.com>
6393
6394         * sem_ch3.adb, sem_util.adb, gnat1drv.adb, s-parint.ads: Minor
6395         reformatting.
6396
6397 2011-08-29  Matthew Heaney  <heaney@adacore.com>
6398
6399         * a-cbhama.ads, a-cbhase.ads (Cursor): Default-initialize all
6400         components of record type.
6401
6402 2011-08-29  Bob Duff  <duff@adacore.com>
6403
6404         * s-tassta.adb (Task_Wrapper): Handle and ignore exceptions propagated
6405         by the termination handler.
6406
6407 2011-08-29  Yannick Moy  <moy@adacore.com>
6408
6409         * sem_ch3.adb (Array_Type_Declaration): Create declarations for Itypes
6410         created in Alfa mode, instead of inserting artificial declarations of
6411         non-Itypes in the tree.
6412         * sem_util.adb, sem_util.ads (Itype_Has_Declaration): New function to
6413         know if an Itype has a corresponding declaration, as defined in
6414         itypes.ads.
6415
6416 2011-08-29  Yannick Moy  <moy@adacore.com>
6417
6418         * gnat1drv.adb: Minor rewrite.
6419
6420 2011-08-29  Bob Duff  <duff@adacore.com>
6421
6422         * s-tasuti.adb (Make_Passive): Work around race condition in
6423         Make_Independent, which can cause Wait_Count to be zero. So instead of
6424         asserting that Wait_Count > 0, and then decrementing it, decrement it
6425         only if Wait_Count > 0.
6426         * s-taskin.ads (Wait_Count, Alive_Count, Awake_Count): All of these
6427         should be nonnegative, so declare them Natural instead of Integer.
6428
6429 2011-08-29  Robert Dewar  <dewar@adacore.com>
6430
6431         * exp_ch5.adb, sem_ch3.adb, a-cihama.adb, a-cihama.ads, exp_ch7.adb,
6432         sem_ch5.adb, a-ciorse.adb, a-ciorse.ads, sem_ch12.adb, a-cidlli.adb,
6433         a-cidlli.ads, sem_util.adb, sem_res.adb, gnat1drv.adb, a-except.adb,
6434         a-except.ads, a-except-2005.ads, sem_ch4.adb, exp_disp.adb,
6435         exp_aggr.adb, sem_ch13.adb, par-ch3.adb: Minor reformatting.
6436
6437 2011-08-29  Tristan Gingold  <gingold@adacore.com>
6438
6439         * s-auxdec-vms-alpha.adb: Add comments, remove some HT before labels.
6440
6441 2011-08-29  Vadim Godunko  <godunko@adacore.com>
6442
6443         * s-parint.ads: Minor comment clarification.
6444
6445 2011-08-29  Vincent Celier  <celier@adacore.com>
6446
6447         * prj.adb (Initialize): Make sure that new reserved words after Ada 95
6448         may be used as identifiers.
6449
6450 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6451
6452         * a-coinho.ads: Minor reformating.
6453
6454 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6455
6456         * exp_ch5.adb (Expand_Iterator_Loop): Handle properly a loop over a
6457         container of a derived type.
6458
6459 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6460
6461         * a-cidlli.adb, a-cidlli.ads, a-cihama.adb, a-cihama.ads,
6462         a-ciorse.adb, a-ciorse.ads: Add iterator machinery to containers.
6463
6464 2011-08-29  Pascal Obry  <obry@adacore.com>
6465
6466         * exp_disp.adb: Minor comment fix.
6467         (Make_Disp_Asynchronous_Select_Body): Properly initialize out parameters
6468         to avoid warnings when compiling with -Wall.
6469         (Make_Disp_Conditional_Select_Body): Likewise.
6470         (Make_Disp_Timed_Select_Body): Likewise.
6471
6472 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6473
6474         * sem_ch12.adb (Analyze_Formal_Subprogram_Declaration): If default is
6475         an entity name, generate reference for it.
6476
6477 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6478
6479         * exp_ch5.adb (Expand_Iterator_Loop): Uniform handling of "X of S"
6480         iterator form.
6481         * sem_util.adb (Is_Iterator, Is_Reversible_Iterator): Yield True for
6482         the class-wide type.
6483         * sem_ch5.adb: Move some rewriting to the expander, where it belongs.
6484
6485 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6486
6487         * sem_ch8.adb (Check_Constrained_Object): Do not create an actual
6488         subtype for an object whose type is an unconstrained union.
6489
6490 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6491
6492         * par-ch3.adb (P_Array_Type_Definiation, P_Component_Items): "aliased"
6493         is allowed in a component definition, by AI95-406.
6494
6495 2011-08-29  Matthew Heaney  <heaney@adacore.com>
6496
6497         * a-chtgbo.adb (Generic_Iteration): Use correct overloading of Next.
6498
6499 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
6500
6501         * a-except-2005.adb: Alphabetize all routines.
6502         (Triggered_By_Abort): New routine.
6503         * a-except-2005.ads (Triggered_By_Abort): New routine.
6504         * a-except.adb Alphabetize all routines.
6505         (Triggered_By_Abort): New routine.
6506         * a-except.ads (Triggered_By_Abort): New routine.
6507         * exp_ch7.adb: Update all comments involving the detection of aborts in
6508         finalization code.
6509         (Build_Object_Declarations): Do not generate code to detect the
6510         presence of an abort at the start of finalization code, use a runtime
6511         routine istead.
6512         * rtsfind.ads: Add RE_Triggered_By_Abort to tables RE_Id and
6513         RE_Unit_Table.
6514         * sem_res.adb (Resolve_Allocator): Emit a warning when attempting to
6515         allocate a task on a subpool.
6516         * s-stposu.adb: Add library-level flag Finalize_Address_Table_In_Use.
6517         The flag disables all actions related to the maintenance of
6518         Finalize_Address_Table when subpools are not in use.
6519         (Allocate_Any_Controlled): Signal the machinery that subpools are in
6520         use.
6521         (Deallocate_Any_Controlled): Do not call Delete_Finalize_Address which
6522         performs costly task locking when subpools are not in use.
6523
6524 2011-08-29  Yannick Moy  <moy@adacore.com>
6525
6526         * gnat1drv.adb (Adjust_Global_Switches): Restore expansion of tagged
6527         types and dispatching calls in Alfa mode.
6528         * lib-xref-alfa.adb (Collect_ALFA): Rewrite computation of
6529         correspondance between body and spec scopes, to reuse utility functions
6530         (Traverse_Declarations_Or_Statements): Protect access to body for stub
6531         by testing the presence of the library unit for the body
6532         * sem_ch6.adb (Set_Actual_Subtypes): take into account that in Alfa
6533         mode the expansion of accept statements is skipped
6534         * sem_util.adb, sem_util.ads (Unique_Entity): New function returning
6535         the unique entity corresponding to the one returned by
6536         Unique_Defining_Entity applied to the enclosing declaration of the
6537         argument.
6538
6539 2011-08-29  Bob Duff  <duff@adacore.com>
6540
6541         * treepr.ads: Improve debugging facilities. pn(x) no longer crashes in
6542         gdb when x is not a node (it can be a node list, name_id, etc). pp is
6543         an alias for pn. ppp is an alias for pt.
6544
6545 2011-08-29  Javier Miranda  <miranda@adacore.com>
6546
6547         * exp_aggr.adb (Expand_Record_Aggregate): Use the top-level enclosing
6548         aggregate to take a consistent decision on the need to convert into
6549         assignments aggregates that initialize constant objects.
6550
6551 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
6552
6553         * exp_ch4.adb (Expand_Allocator_Expression): Add a call to
6554         Build_Allocate_Deallocate_Proc in order to handle allocation of
6555         non-controlled objects on subpools.
6556         * impunit.adb: Remove s-finmas and s-spsufi since they were never meant
6557         to be end-user visible.
6558         * s-finmas.adb: Add with and use clause for System.HTable.
6559         Add an instantiation of Simple_HTable which provides a mapping between
6560         the address of a controlled object and the corresponding
6561         Finalize_Address used to clean up the object. The table is used when a
6562         master is operating in heterogeneous mode.
6563         (Attach): Explain why the input node is not verified on being already
6564         attached.
6565         (Delete_Finalize_Address): New routine.
6566         (Detach): Add pragma Assert which ensures that a node is already
6567         attached.
6568         (Finalize): Add local variable Cleanup. Rewrite the iteration scheme
6569         since nodes are no longer removed on traversal. Explain why node
6570         detachment is undesirable in this case.
6571         (Get_Finalize_Address): New routine.
6572         (Hash): New routine.
6573         (Is_Empty_List): Removed.
6574         (pm): Renamed to Print_Master. Add output for discriminant
6575         Is_Homogeneous.
6576         Comment reformatting.
6577         (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
6578         * s-finmas.ads: Various comments additions / improvements.
6579         Type Finalization_Master has a discriminant which determines the mode of
6580         operation.
6581         (Delete_Finalize_Address): New routine.
6582         (Get_Finalize_Address): New routine.
6583         (pm): Renamed to Print_Master.
6584         (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
6585         * s-stposu.adb: Add with clause for System.Address_Image; Add with and
6586         use clause for System.IO.
6587         (Allocate_Any_Controlled): Add machinery to set TSS primitive
6588         Finalize_Address depending on the mode of allocation and the mode of
6589         the master.
6590         (Deallocate_Any_Controlled): Remove the relation pair object -
6591         Finalize_Address regardless of the master mode. Add comment explaining
6592         the reason.
6593         (Detach): Ensure that fields Prev and Next are null after detachment.
6594         (Finalize_Pool): Remove local variable Next_Ptr. Rewrite the iteration
6595         scheme to check whether the list of subpools is empty. There is no
6596         longer need to store the next subpool or advance the current pointer.
6597         (Is_Empty_List): New routine.
6598         (Print_Pool): New routine.
6599         (Print_Subpool): New routine.
6600         * s-stposu.ads: Various comments additions / improvements.
6601         Field Master of type Root_Subpool is now a heterogeneous collection.
6602         (Print_Pool): New routine.
6603         (Print_Subpool): New routine.
6604
6605 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6606
6607         * exp_ch5.adb (Expand_N_Iterator_Loop): Implement Ada2012 loop iterator
6608         forms, using aspects of container types.
6609         * sem_ch3.adb (Find_Type_Name): Preserve Has_Delayed_Aspects and
6610         Has_Implicit_Dereference flags, that may be set on the partial view.
6611         * sem_ch4.adb (Process_Overloaded_Indexed_Component): Prefix may be a
6612         container type with an indexing aspect.
6613         (Analyze_Quantified_Expression): Analyze construct with expansion
6614         disabled, because it will be rewritten as a loop during expansion.
6615         (Try_Container_Indexing): The prefix itself may be a container type
6616         with an indexing aspect, as with a vector of vectors.
6617         * sem_ch5.adb (Analyze_Iteration_Scheme): In a generic context, analyze
6618         the original doamin of iteration, for name capture.
6619         (Analyze_Iterator_Specification): If the domain is an expression that
6620         needs finalization, create a separate declaration for it.
6621         For an iterator with "of" retrieve default iterator info from aspect of
6622         container type. For "in" iterator, retrieve type of Iterate function.
6623         * sem_ch13.adb (Check_Iterator_Function): Fix typo.
6624         (Check_Aspect_At_End_Of_Declaration): Make type unfrozen before
6625         analysis, to prevent spurious errors about late attributes.
6626         * sprint.adb: Handle quantified expression with either loop or iterator
6627         specification.
6628         * a-convec.ads, a-convec.adb: Iterate function returns a reversible
6629         iterator.
6630
6631 2011-08-29  Vincent Celier  <celier@adacore.com>
6632
6633         * make.adb (Scan_Make_Arg): Take any option as is in packages Compiler,
6634         Binder or Linker of the main project file.
6635
6636 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6637
6638         * inline.adb (Add_Scopes_To_Clean): Exclude any entity within a generic
6639         unit.
6640
6641 2011-08-29  Yannick Moy  <moy@adacore.com>
6642
6643         * exp_ch9.adb: Partial revert of previous change for Alfa mode
6644
6645 2011-08-29  Yannick Moy  <moy@adacore.com>
6646
6647         * exp_ch11.adb: Minor expansion of comment.
6648
6649 2011-08-29  Yannick Moy  <moy@adacore.com>
6650
6651         * lib-xref-alfa.adb (Add_ALFA_Scope): Treat generic entities.
6652
6653 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6654
6655         * sem_res.adb (Resolve_Arithmetic_Op): If the node has a universal
6656         interpretation, set the type before resolving the operands, because
6657         legality checks on an exponention operand need to know the type of the
6658         context.
6659
6660 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6661
6662         * sem_ch12.adb (Analyze_Package_Instantiation): Do not set delayed
6663         cleanups on a master if the instance is within a generic unit.
6664         Complement to the corresponding fix to inline.adb for K520-030.
6665
6666 2011-08-29  Tristan Gingold  <gingold@adacore.com>
6667
6668         * exp_ch7.adb (Build_Raise_Statement): Raise PE instead of the current
6669         occurrence.
6670         * exp_intr.adb: Minor comment fix.
6671
6672 2011-08-29  Bob Duff  <duff@adacore.com>
6673
6674         * sem_ch13.adb (Analyze_Aspect_Specifications): Fix cases where
6675         Delay_Required was used as an uninitialized variable.
6676
6677 2011-08-29  Robert Dewar  <dewar@adacore.com>
6678
6679         * a-cdlili.adb, a-cdlili.ads, a-coinve.adb, a-coinve.ads,
6680         sem_util.adb, sem_util.ads, a-cohama.adb, a-cohama.ads, a-coorse.adb,
6681         a-coorse.ads, aspects.ads, sem_ch8.adb: Minor reformatting.
6682
6683 2011-08-29  Thomas Quinot  <quinot@adacore.com>
6684
6685         * system-freebsd-x86_64.ads (Backend_Overflow_Checks): Set true True.
6686         Remove unused variables.
6687
6688 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6689
6690         * sem_res.adb: Remove Build_Explicit_Dereference.
6691         * sem_util.adb, sem_util.ads (Build_Explicit_Dereference): Moved here
6692         from sem_res.adb, used in analysis of additional constructs.
6693         (Is_Iterator, Is_Reversible_Iterator): New predicates for Ada2012
6694         expansion of iterators.
6695         (Is_Object_Reference): Recognize variables rewritten as explicit
6696         dereferences in Ada2012.
6697         * snames.ads-tmpl: Add Has_Element, Forward_Iterator,
6698         Reversible_Iterator names, for expansion of Ada2012 iterators.
6699         * aspects.ads, aspects.adb (Find_Aspect): Utility.
6700         * a-cdlili.ads, a-cdlili.adb: Add new iterator machinery to doubly
6701         linked list container.
6702         * a-coinve.ads, a-coinve.adb: Ditto for indefinite vector containers.
6703         * a-coorse.ads, a-coorse.adb: Ditto for ordered sets.
6704
6705 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6706
6707         * a-cohama.adb, a-cohama.ads: Add iterator primitives to hashed map
6708         containers.
6709
6710 2011-08-29  Vincent Celier  <celier@adacore.com>
6711
6712         * make.adb (Gnatmake): Get the maximum number of simultaneous
6713         compilation processes after the Builder switches has been scanned, as
6714         there may include -jnn.
6715
6716 2011-08-29  Matthew Heaney  <heaney@adacore.com>
6717
6718         * a-chtgbo.adb (Generic_Equal): Use correct overloading of Next.
6719
6720 2011-08-29  Tristan Gingold  <gingold@adacore.com>
6721
6722         * gnatcmd.adb (GNATCmd): On OpenVMS, truncate the length of
6723         GNAT_DRIVER_COMMAND_LINE to 255.
6724
6725 2011-08-29  Pascal Obry  <obry@adacore.com>
6726
6727         * freeze.adb, sem_ch8.adb, a-convec.adb, a-convec.ads: Minor
6728         reformatting and style fix (class attribute casing).
6729
6730 2011-08-29  Yannick Moy  <moy@adacore.com>
6731
6732         * exp_ch11.adb: Yet another case where expansion should be common
6733         between CodePeer and Alfa.
6734
6735 2011-08-29  Yannick Moy  <moy@adacore.com>
6736
6737         * exp_ch9.adb: Partial revert of previous change for Alfa mode.
6738
6739 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6740
6741         * sem_ch6.adb (Matches_Limited_With_View): The limited views of an
6742         incomplete type and its completion match.
6743
6744 2011-08-29  Yannick Moy  <moy@adacore.com>
6745
6746         * exp_ch13.adb: Adjust previous change.
6747
6748 2011-08-29  Robert Dewar  <dewar@adacore.com>
6749
6750         * sem_prag.adb, prj.adb, sem_util.adb, sem_res.adb, gnat1drv.adb,
6751         exp_ch4.adb, sem_ch8.adb: Minor code reorganization
6752         Minor reformatting.
6753
6754 2011-08-29  Emmanuel Briot  <briot@adacore.com>
6755
6756         * make.adb, prj.adb, prj.ads (Compute_All_Imported_Projects): Also
6757         initialize aggregated projects.
6758
6759 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6760
6761         * sem_ch8.adb (Find_Renamed_Entity): Within an instance, use scope
6762         depth of candidates to resolve a potentially spurious ambiguity between
6763         two visible subprograms.
6764
6765 2011-08-29  Yannick Moy  <moy@adacore.com>
6766
6767         * sem_prag.adb (Analyze_Pragma): Allow Test_Case pragma without
6768         Requires/Ensures.
6769         * sem_util.adb (Get_Ensures_From_Test_Case_Pragma,
6770         Get_Requires_From_Test_Case_Pragma): Allow Test_Case pragma without
6771         Requires/Ensures.
6772
6773 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
6774
6775         * gnat1drv.adb (Adjust_Global_Switches): Improve previous change.
6776         Add comment.
6777
6778 2011-08-29  Thomas Quinot  <quinot@adacore.com>
6779
6780         * sem_res.adb: Minor reformatting.
6781
6782 2011-08-29  Johannes Kanig  <kanig@adacore.com>
6783
6784         * exp_ch4.adb (Expand_Quantified_Expression): Do not expand in ALFA
6785         mode.
6786         * gnat1drv.adb (Adjust_Global_Switches): Set
6787         Use_Expressions_With_Actions to False in ALFA mode.
6788         * sem_res.adb (Resolve_Quantified_Expression): Simpler treatment in
6789         ALFA mode.
6790
6791 2011-08-29  Yannick Moy  <moy@adacore.com>
6792
6793         * exp_ch13.adb (Expand_N_Freeze_Entity): Do nothing in Alfa mode.
6794         * exp_ch9.adb: Do not expand tasking constructs in Alfa mode.
6795         * gnat1drv.adb (Adjust_Global_Switches): Suppress the expansion of
6796         tagged types and dispatching calls in Alfa mode.
6797
6798 2011-08-29  Javier Miranda  <miranda@adacore.com>
6799
6800         * sem_ch3.adb (Process_Discriminants): Add missing check to ensure that
6801         we do not report an error on an Empty node.
6802
6803 2011-08-29  Geert Bosch  <bosch@adacore.com>
6804
6805         * Makefile.rtl (GNATRTL_NONTASKING_OBJECTS): Add a-nllrar.o,
6806         a-nlrear.o and a-nurear.o.
6807
6808 2011-08-29  Robert Dewar  <dewar@adacore.com>
6809
6810         * freeze.adb: Minor code reorganization.
6811         Minor reformatting.
6812         * sem_util.adb, errout.adb, exp_ch11.adb, a-ngrear.adb, s-gearop.adb,
6813         sem_ch6.adb: Minor reformatting
6814
6815 2011-08-29  Tristan Gingold  <gingold@adacore.com>
6816
6817         * s-except.ads, s-except.adb: Provide dummy body.
6818
6819 2011-08-29  Yannick Moy  <moy@adacore.com>
6820
6821         * sem_warn.adb (Within_Postcondition): Take into account the case of
6822         an Ensures component in a Test_Case.
6823
6824 2011-08-29  Tristan Gingold  <gingold@adacore.com>
6825
6826         * s-excdeb.ads, s-excdeb.adb: New files, created from s-except.
6827         * rtsfind.ads (RTU_Id): Replaces System_Exceptions by
6828         System_Exceptions_Debug
6829         (RE_Unit_Table): Search RE_Local_Raise in System_Exceptions_Debug
6830         * a-except.adb: With and use System.Exceptions_Debug instead of
6831         System.Exceptions.
6832         * a-except-2005.adb: Likewise.
6833         * s-assert.adb: Likewise.
6834         * s-except.adb, s-except.ads: Move debugging hooks to s-excdeb.
6835         * Makefile.rtl: Add s-excdeb.  Adjust compilation rule.
6836         * gcc-interfaces/Makefile.in, gcc-interface/Make-lang.in: Add
6837         s-excdeb. Update dependencies.
6838         (GNATRTL_LINEARALGEBRA_OBJS): Remove a-nlrear.o a-nurear.o a-nllrar.o
6839         as these no longer need external libraries.
6840
6841 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6842
6843         * sem_res.adb (Resolve_Op_Expon): Additional check to reject an
6844         exponentiation operator on universal values in a context that requires
6845         a fixed-point type.
6846
6847 2011-08-29  Tristan Gingold  <gingold@adacore.com>
6848
6849         * raise-gcc.c (personnality_routine): Fix thinko.  Set Ada occurrence
6850         before calling notify_handled_exception.
6851         * a-exextr.adb: Fix comment.
6852
6853 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
6854
6855         * exp_ch4.adb (Expand_Allocator_Expression): Add code to set attribute
6856         Finalize_Address of the access type's finalization master.
6857         (Expand_N_Allocator): Add code to set attribute Finalize_Address of the
6858         access type's finalization master. Add a guard to prevent
6859         Associated_Storage_Pool from being set on .NET/JVM.
6860         * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add code to set
6861         attribute Finalize_Address of the access type's finalization master.
6862         * exp_ch7.adb (Make_Finalize_Address_Call): New routine.
6863         * exp_ch7.ads (Make_Finalize_Address_Call): New routine.
6864         * rtsfind.ads: Add RE_Set_Finalize_Address to tables RE_Id and
6865         RE_Unit_Table.
6866         * s-finmas.adb: Add with clause for System.Address_Image. Add with and
6867         use clause for System.IO
6868         (Detach): Relax the assertion, to be reinstated later.
6869         (Finalize): Rewrite the iteration loop to avoid pointer comparison.
6870         Relax the assertion on Finalize_Address, to be reinstated later.
6871         (Is_Empty_List): New routine.
6872         (pm): New debug routine.
6873         (Set_Finalize_Address): New routine.
6874         * s-finmas.ads (pm): New debug routine.
6875         (Set_Finalize_Address): New routine.
6876         * s-stposu.adb (Allocate_Any_Controlled): Code reformatting.
6877
6878 2011-08-29  Tristan Gingold  <gingold@adacore.com>
6879
6880         * a-exexpr-gcc.adb (GCC_Exception_Access, GNAT_GCC_Exception_Access):
6881         Remove convention C.
6882
6883 2011-08-29  Tristan Gingold  <gingold@adacore.com>
6884
6885         * s-taprop-vms.adb (Get_Exc_Stack_Addr): Remove.
6886         (Initialize_TCB): Remove Exc_Stack_Ptr initialization.
6887         (Finalize_TCB): Remove its finalization.
6888         (Initialize): Remove assignment of GET_Exc_Stack_Addr
6889         * s-soflin.adb (NT_Exc_Stack): Remove
6890         (Get_Exc_Stack_Addr_NT): Likewise.
6891         (Get_Exc_Stack_Addr_Soft): Likewise.
6892         * s-soflin.ads (Get_Exc_Stack_Addr_NT): Remove.
6893         (Get_Exc_Stack_Addr): Likewise.
6894         (Get_Exc_Stack_Addr_Soft): Likewise
6895         * s-taspri-vms.ads (Exc_Stack_T): Remove.
6896         (Exc_Stack_Ptr_T): Likewise.
6897         (Private_Data): Remove Exc_Stack_Ptr component.
6898
6899 2011-08-29  Tristan Gingold  <gingold@adacore.com>
6900
6901         * raise-gcc.c (get_ip_from_context): New function. Factorize code.
6902
6903 2011-08-29  Tristan Gingold  <gingold@adacore.com>
6904
6905         * gnat_ugn.texi: Fix aix and x86-solaris info for run-time.
6906
6907 2011-08-29  Geert Bosch  <bosch@adacore.com>
6908
6909         * s-gearop.ads (Back_Substitute, Diagonal, Forward_Eliminate,
6910         L2_Norm, Swap_Column): New generic subprograms
6911         * s-gearop.adb (Back_Substitute, Diagonal, Forward_Eliminate,
6912         L2_Norm, Swap_Column): Implement new subprograms in order to
6913         eliminate dependency on BLAS and LAPACK libraries in
6914         Ada.Numerics.Generic_Real_Arrays and eventually also the complex
6915         version. Forward_Eliminate/Back_Substitute can be used to put a
6916         matrix in row echelon or reduced row echelon form using partial
6917         pivoting.
6918         * a-ngrear.adb: (Back_Substitute, Diagonal, Forward_Eleminate,
6919         Swap_Column): Instantiate from System.Generic_Array_Operations.
6920         ("*", "abs"): Implement by instantiation from Generic_Array_Operations.
6921         (Sqrt): Local function for simple computation of square root without
6922         adding dependencies on Generic_Elementary_Functions.
6923         (Swap): New subprogram to exchange floating point numbers.
6924         (Inverse): Reimplement using Jordan-Gauss elimination.
6925         (Jacobi): New procedure implementing Jacobi's method for computation
6926         of eigensystems, based on Rutishauser's implementation.
6927         (L2_Norm): Implement directly using the inner product.
6928         (Sort_Eigensystem): Sort eigenvalue/eigenvector pairs in order of
6929         decreasing eigenvalue as required by the Ada RM.
6930         (Swap_Column): New helper procedure for Sort_Eigensystem.
6931         Remove with of System.Generic_Real_BLAS and System.Generic_Real_LAPACK.
6932         Add with of Ada.Containers.Generic_Anonymous_Array_Sort, for
6933         Sort_Eigensystems.
6934
6935 2011-08-29  Thomas Quinot  <quinot@adacore.com>
6936
6937         * put_scos.adb (Put_SCOs): Do not emit a newline for an empty
6938         statements line.
6939
6940 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
6941
6942         * s-finmas.adb (Finalize): Check Finalize_Address of the master rather
6943         than the current node.
6944         * s-finmas.ads: Move field Finalize_Address from type FM_Node to
6945         Finalization_Master. The list headers have two fields instead of three.
6946         This should fix alignment issue but subpool allocations are now
6947         unusable. Alphabetize subprograms.
6948         * s-stposu.adb (Allocate_Any_Controlled): Use the offset rather than
6949         the size of the header when converting the beginning of the object to
6950         a FM_Node. Set the master's Finalize_Address attribute if not already
6951         set.
6952         (Deallocate_Any_Controlled): Use the offset rather than the size of the
6953         header when converting the beginning of the object to a FM_Node.
6954
6955 2011-08-29  Gary Dismukes  <dismukes@adacore.com>
6956
6957         * exp_ch11.adb (Expand_N_Raise_Statement): Don't suppress expansion of
6958         reraise when compiling for CodePeer.
6959
6960 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
6961
6962         * a-iteint.ads, Makefile.rtl: Add missing compilation of a-iteint.ads,
6963         now needed by a-convec.adb. Fix warning.
6964
6965 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
6966
6967         * exp_util.adb (Build_Allocate_Deallocate_Proc): Add a guard for the
6968         processing of TSS routine Finalize_Address when compiling in
6969         CodePeer_Mode.
6970
6971 2011-08-29  Thomas Quinot  <quinot@adacore.com>
6972
6973         * a-strunb.ads, einfo.ads, g-comlin.ads, sem_ch6.adb,
6974         sem_warn.adb: Minor reformatting.
6975
6976 2011-08-29  Emmanuel Briot  <briot@adacore.com>
6977
6978         * prj-conf.adb (Get_Config_Switches): Also collect the list of
6979         languages from aggregated projects.
6980
6981 2011-08-29  Yannick Moy  <moy@adacore.com>
6982
6983         * lib-xref-alfa.adb, lib-xref.ads (Traverse_Declarations_Or_Statements,
6984         Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
6985         Traverse_Package_Declaration, Traverse_Subprogram_Body,
6986         Traverse_Compilation_Unit): Add a parameter Inside_Stubs so that bodies
6987         for stubs are traversed too when parameter is set
6988         (Traverse_All_Compilation_Units): Traverse without going inside stubs
6989         (Traverse_Declarations_Or_Statements): Do the special traversing for
6990         stubs when required.
6991         * sem_util.adb, sem_util.ads (Get_Body_From_Stub): New function to
6992         return subprogram or package body from stub.
6993         (Is_Subprogram_Stub_Without_Prior_Declaration): New function to detect
6994         stubs without prior subprogram decl.
6995
6996 2011-08-29  Vasiliy Fofanov  <fofanov@adacore.com>
6997
6998         * gnat_ugn.texi: Fix typo.
6999
7000 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
7001
7002         * s-stposu.adb (Allocate_Any_Controlled): Reimplement the mechanism
7003         which accounts for size vs alignment issues and calculates the size of
7004         the list header.
7005         (Deallocate_Any_Controlled): Ditto.
7006         (Nearest_Multiple_Rounded_Up): New routine.
7007
7008 2011-08-29  Tristan Gingold  <gingold@adacore.com>
7009
7010         * a-exstat.adb (String_To_EO): Do no set Cleanup_Flag.
7011         * a-exexda.adb (Set_Exception_C_Msg): Ditto.
7012         (Set_Exception_Msg): Ditto.
7013         * a-exexpr-gcc.adb (Setup_Current_Excep): Ditto.  Do not set
7014         Private_Data.
7015         * a-except.adb, a-except-2005.adb (Save_Occurrence_No_Private): Remove.
7016         Use Save_Occurrence instead of Save_Occurrence_No_Private.
7017         (Raise_With_Msg): Remove Cleanup_Flag.
7018         * a-except.ads, a-except-2005.ads (Exception_Occurrence): Remove
7019         Clean_Flag and Private_Data components.
7020
7021 2011-08-29  Yannick Moy  <moy@adacore.com>
7022
7023         * freeze.adb (Freeze_Record_Type): Ignore packing in Alfa mode, like
7024         in CodePeer mode.
7025         * sem_ch3.adb (Signed_Integer_Type_Declaration): Correct the generation
7026         of an explicitly declared type, so that the base types of the original
7027         type and this generated type are the same, and a "type" (not a subtype
7028         like previously).
7029         * errout.adb (Special_Msg_Delete): Do not issue messages "Size too
7030         small" in Alfa mode, like in CodePeer mode.
7031         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore rep
7032         clauses in Alfa mode.
7033
7034 2011-08-29  Javier Miranda  <miranda@adacore.com>
7035
7036         * exp_ch6.ads, exp_ch6.adb (Is_Null_Procedure): Move the spec of this
7037         function to the package spec.
7038         * sem_ch6.adb (Find_Corresponding_Spec, New_Overloaded_Entity): For
7039         internally generated bodies of null procedures locate the internally
7040         generated spec enforcing mode conformance.
7041         (Is_Interface_Conformant): Ensure that the controlling formal of the
7042         primitives match.
7043
7044 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
7045
7046         * sem_prag.adb (Analyze_Pragma, case Inline): In an instance, do not
7047         reject the pragma if it appears to apply to a formal subprogram.
7048
7049 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
7050
7051         * exp_ch4.adb (Expand_Allocator_Expression): Use consistent name for
7052         inner expression, to prevent double evaluation.
7053
7054 2011-08-29  Tristan Gingold  <gingold@adacore.com>
7055
7056         * a-exexpr.adb (Propagate_Exception): Remove all the parameters as
7057         they were unused.
7058         * a-exexpr-gcc.adb (Propagate_Exception): Ditto.
7059         * a-except-2005.adb (Propagate_Exception): Adjust spec.
7060         (Raise_Current_Excep): Adjust call.
7061         (Raise_From_Signal_Handler): Call now simply call Raise_Current_Excep.
7062
7063 2011-08-29  Thomas Quinot  <quinot@adacore.com>
7064
7065         * exp_disp.adb: Minor reformatting.
7066
7067 2011-08-29  Tristan Gingold  <gingold@adacore.com>
7068
7069         * a-exexpr.adb (Setup_Exception): Removed.
7070         * a-exexpr-gcc.adb (Setup_Exception): Removed.
7071         * a-except.adb (Exception_Propagation): Removed.
7072         * a-except-2005.adb (Setup_Exception): Removed.
7073         (Reraise): Remove call to Setup_Exception.
7074         (Reraise_Occurrence): Ditto.
7075         (Reraise_Occurrence_Always): Ditto.
7076         (Reraise_Occurrence_No_Defer): Ditto.
7077         (Transfer_Occurrence): Ditto.
7078         * a-exexda.adb (Set_Exception_C_Msg): Remove call to Setup_Exception.
7079         (Set_Exception_Msg): Ditto.
7080
7081 2011-08-29  Robert Dewar  <dewar@adacore.com>
7082
7083         * a-convec.adb, exp_disp.adb: Minor reformatting.
7084
7085 2011-08-29  Tristan Gingold  <gingold@adacore.com>
7086
7087         * a-exexpr-gcc.adb (GNAT_GCC_Exception_Access): Set to convention C.
7088
7089 2011-08-29  Gary Dismukes  <dismukes@adacore.com>
7090
7091         * exp_ch3.adb (Build_Record_Init_Proc.Build_Init_Procedure): Set
7092         Exception_Handlers to No_List instead of Empty_List in the case where
7093         there are no handlers.
7094
7095 2011-08-29  Tristan Gingold  <gingold@adacore.com>
7096
7097         * gcc-interface/gigi.h (enum standard_datatypes): Add
7098         ADT_reraise_zcx_decl
7099         (reraise_zcx_decl): New macro.
7100         * gcc-interface/trans.c (gnu_incoming_exc_ptr): New variable.
7101         (gigi): Set reraise_zcx_decl.
7102         (Exception_Handler_to_gnu_zcx): Save and restore gnu_incoming_exc_ptr.
7103         (gnat_to_gnu): Handle N_Raise_Statement.
7104
7105 2011-08-29  Robert Dewar  <dewar@adacore.com>
7106
7107         * sem_ch6.adb, exp_ch3.adb, s-stposu.adb, a-undesu.ads,
7108         a-undesu.adb: Minor reformatting.
7109
7110 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
7111
7112         * exp_disp.adb (Check_Premature_Freezing): When building a dispatch
7113         table, accept an unfrozen untagged component if it is an actual for a
7114         formal incomplete type.
7115         * a-convec.ads, a-convec.adb: Instantiate Ada.Iterator_Interfaces to
7116         provide new iterator forms over vectors.
7117         Introduce type Iterator in package body to implement operations of
7118         Reversible_Iterator interface.
7119         * a-iteint.ads: Make package pure so it is usable with new container
7120         packages, that are categorized Remote_Types.
7121
7122 2011-08-29  Robert Dewar  <dewar@adacore.com>
7123
7124         * a-exexpr-gcc.adb, a-synbar.adb, sem_ch13.adb: Minor reformatting.
7125
7126 2011-08-29  Bob Duff  <duff@adacore.com>
7127
7128         * sem_aggr.adb (Resolve_Aggr_Expr): Call this routine even in the case
7129         of <>, because this is the routine that checks for dimensionality
7130         errors (for example, for a two-dimensional array, (others => <>) should
7131         be (others => (others => <>)).
7132
7133 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
7134
7135         * impunit.adb: Add new run-time units.
7136         * freeze.adb, exp_ch7.ads, exp_ch7.adb, exp_util.ads, exp_util.adb,
7137         s-stposu.ads, s-stposu.adb: Code clean up.
7138         Handle protected class-wide or task class-wide types
7139         Handle C/C++/CIL/Java types.
7140         * s-spsufi.adb, s-spsufi.ads: New files.
7141
7142 2011-08-29  Yannick Moy  <moy@adacore.com>
7143
7144         * sem_ch13.adb (Analyze_Aspect_Specifications): Reject test-case on
7145         library-level subprogram.
7146         * sem_prag.adb (Check_Test_Case): Stricter rules for test-case
7147         placement.
7148         (Analyze_Pragma): Change name "Normal" for "Nominal" in test-case
7149         component.
7150         * snames.ads-tmpl: Change name "Normal" for "Nominal" in test-case
7151         component.
7152         * gnat_rm.texi: Update doc for Test_Case pragma.
7153
7154 2011-08-29  Tristan Gingold  <gingold@adacore.com>
7155
7156         * a-exexpr-gcc.adb (Unwind_Exception): Remove default value, made it
7157         convention C.
7158         (GCC_Exception_Access): New type.
7159         (Unwind_DeleteException): New imported procedure
7160         (Foreign_Exception): Import it.
7161         (GNAT_GCC_Exception): Simply have the occurrence inside.
7162         (To_GCC_Exception): New function.
7163         (To_GNAT_GCC_Exception): New function.
7164         (GNAT_GCC_Exception_Cleanup): New procedure..
7165         (Propagate_GCC_Exception): New procedure.
7166         (Reraise_GCC_Exception): New procedure.
7167         (Setup_Current_Excep): New procedure.
7168         (CleanupUnwind_Handler): Change type of UW_Exception parameter.
7169         (Unwind_RaiseException): Ditto.
7170         (Unwind_ForcedUnwind): Ditto.
7171         (Remove): Removed.
7172         (Begin_Handler): Change type of parameter.
7173         (End_Handler): Ditto. Now delete the exception if still present.
7174         (Setup_Key): Removed.
7175         (Is_Setup_And_Not_Propagated): Removed.
7176         (Set_Setup_And_Not_Propagated): Ditto.
7177         (Clear_Setup_And_Not_Propagated): Ditto.
7178         (Save_Occurrence_And_Private): Ditto.
7179         (EID_For): Add 'not null' constraint on parameter.
7180         (Setup_Exception): Does nothing.
7181         (Propagate_Exception): Simplified.
7182         * exp_ch11.adb (Expand_N_Raise_Statement): In back-end exception model,
7183         re-raise is not expanded anymore.
7184         * s-except.ads (Foreign_Exception): New exception - placeholder for
7185         non Ada exceptions.
7186         * raise-gcc.c (__gnat_setup_current_excep): Declare
7187         (CXX_EXCEPTION_CLASS): Define (not yet used)
7188         (GNAT_EXCEPTION_CLASS): Define.
7189         (is_handled_by): Handle foreign exceptions.
7190         (PERSONALITY_FUNCTION): Call __gnat_setup_current_excep.
7191
7192 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
7193
7194         * a-synbar.adb (Synchronous_Barrier): Some additional clarification.
7195
7196 2011-08-29  Thomas Quinot  <quinot@adacore.com>
7197
7198         * a-synbar-posix.adb: Minor reformatting.
7199
7200 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
7201
7202         * a-exetim-posix.adb, a-exetim-mingw.adb, a-exetim-mingw.ads,
7203         a-exetim-default.ads (Interrupt_Clocks_Supported,
7204         Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
7205         definitions to be compliant with AI-0171. The target systems do not
7206         support separate account for the execution time of interrupt handlers.
7207
7208 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
7209
7210         * a-synbar.adb (Wait): Change the order of evaluation of the conditions
7211         in the barrier to put first the easiest to evaluate (and the one which
7212         will be True more often). More efficient.
7213
7214 2011-08-29  Eric Botcazou  <ebotcazou@adacore.com>
7215
7216         * s-atocou-x86.adb: Fix constraint in machine code insertion.
7217
7218 2011-08-29  Bob Duff  <duff@adacore.com>
7219
7220         * aspects.ads, aspects.adb: Add new aspects for various pragmas and
7221         attributes that are now aspects, as specified by AI05-0229-1.
7222         * sem_ch13.adb (Analyze_Aspect_Specifications,
7223         Check_Aspect_At_Freeze_Point): Analyze the new aspects. Turn them into
7224         pragmas or attribute references, as appropriate.
7225
7226 2011-08-29  Robert Dewar  <dewar@adacore.com>
7227
7228         * a-synbar.ads, a-synbar.adb, a-synbar-posix.adb,
7229         a-synbar-posix.ads: Minor reformatting.
7230
7231 2011-08-29  Yannick Moy  <moy@adacore.com>
7232
7233         * snames.ads-tmpl: Add name Force.
7234
7235 2011-08-29  Pascal Obry  <obry@adacore.com>
7236
7237         * prj-nmsc.adb: Minor reformatting.
7238
7239 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
7240
7241         * a-exetim.ads (Interrupt_Clocks_Supported,
7242         Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
7243         definitions to be compliant with AI-0171.
7244
7245 2011-08-29  Robert Dewar  <dewar@adacore.com>
7246
7247         * a-ngelfu.adb: Add comments.
7248
7249 2011-08-29  Geert Bosch  <bosch@adacore.com>
7250
7251         * a-ngelfu.adb (Tan): Do not raise Constraint_Error if the argument is
7252         the closest machine number to Pi / 2.0.
7253
7254 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
7255
7256         * impunit.adb (Non_Imp_File_Names_12): Add a-synbar for new Ada 2012
7257         package Ada.Synchronous_Barriers.
7258         * a-synbar.ads, a-synbar.adb, a-synbar-posix.ads, a-synbar-posix.adb:
7259         Add new specs and bodies for Ada.Synchronous_Barriers. There is a
7260         default implementation using protected objects and another one
7261         a-synbar-posix using POSIX barriers as the underlying support.
7262         * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for Linux (x86,
7263         x86_64, ia64) and MIPS IRIX): Use the a-synbar-posix implementation of
7264         Ada.Synchronous_Barriers which uses POSIX barriers (more efficient).
7265         Clean up dependencies.
7266         * Makefile.rtl (GNATRTL_TASKING_OBJS): Add a-synbar.o
7267
7268 2011-08-29  Robert Dewar  <dewar@adacore.com>
7269
7270         * sem_ch7.adb, make.adb, sem_res.adb, exp_intr.adb,
7271         exp_dist.adb: Minor code reorganization.
7272         Minor reformatting.
7273
7274 2011-08-29  Thomas Quinot  <quinot@adacore.com>
7275
7276         * sem_cat.adb (Validate_RACW_Primitive): The return type of an RACW
7277         primitive operation must support external streaming if it is not a
7278         controlling access result.
7279
7280 2011-08-29  Thomas Quinot  <quinot@adacore.com>
7281
7282         * sinfo.ads, sem_ch7.adb: Minor reformatting.
7283
7284 2011-08-29  Bob Duff  <duff@adacore.com>
7285
7286         * sem_ch4.adb (Analyze_Allocator): Check No_Nested_Finalization
7287         restriction on allocators, as required by AI05-0013-1.
7288         * restrict.ads: Minor comment fix.
7289
7290 2011-08-29  Tristan Gingold  <gingold@adacore.com>
7291
7292         * a-exexpr.adb, a-except-2005.ads (Jmpbuf_Address): Move to a-exexpr.adb
7293         (To_Jmpbuf_Address): Ditto
7294         (builtin_longjmp): Ditto
7295
7296 2011-08-29  Thomas Quinot  <quinot@adacore.com>
7297
7298         * sem_res.adb: Minor reformatting.
7299
7300 2011-08-29  Vincent Celier  <celier@adacore.com>
7301
7302         * make.adb (Gnatmake): Move special processing for VM targets after the
7303         call to Get_Target_Parameters.
7304
7305 2011-08-29  Thomas Quinot  <quinot@adacore.com>
7306
7307         * sem_ch12.adb, par-ch12.adb: Minor reformatting.
7308
7309 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
7310
7311         * sem_res.adb (Resolve_Allocator): Implement Ada2012-B052. Detect cases
7312         where an anonymous access discriminant of a limited designated type
7313         appears in a non-immutably limited discriminated type and issue an
7314         error message. Add local variable Desig_T and replace all occurrences
7315         of Designated_Type.
7316
7317 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
7318
7319         * a-rttiev.adb (Set_Handler): Update comment to indicate that our
7320         implementation is compliant to RM D.15(15/2) after the modification
7321         imposed by AI05-0094-1 (binding interpretation).
7322
7323 2011-08-29  Robert Dewar  <dewar@adacore.com>
7324
7325         * exp_ch9.adb, s-tasren.adb, exp_sel.adb, exp_sel.ads, exp_ch11.adb,
7326         s-interr-hwint.adb, s-tpobop.adb, sem_ch13.adb: Minor reformatting.
7327
7328 2011-08-29  Thomas Quinot  <quinot@adacore.com>
7329
7330         * par-endh.adb (Check_End): For an END where it is mandatory to repeat
7331         the scope name, do not report a missing label as a style violation (it
7332         will be diagnosed as an illegality).
7333         * exp_dist.adb (Add_Params_For_Variant_Components): Fix handling of
7334         variant records: Get_Enum_Lit_From_Pos already returns a usage
7335         occurrence of the literal, no need to use New_Occurrence_Of. Set Etype
7336         on Expr in Integer_Literal case so that it can be used by
7337         Build_To_Any_Call.
7338
7339 2011-08-29  Tristan Gingold  <gingold@adacore.com>
7340
7341         * exp_sel.ads (Build_Abort_BLock_Handler): New function spec.
7342         Adjust comment.
7343         * exp_sel.adb (Build_Abort_Block): Use Build_Abort_Block_Handler.
7344         (Build_Abort_Block_Handler): New function to build an Abort_Signal
7345         exception handler.
7346         * exp_ch9.adb (Expand_N_Asynchronous_Select): Call
7347         Build_Abort_Block_Handler to build the exception handler. Do not
7348         undefer aborts for the Abort_Signal exception handler if back-end
7349         exception mechanism.
7350         * exp_ch11.adb (Expand_Exception_Handlers): Do not undefer aborts if
7351         back_end exceptions for all others and abort_signal.
7352         * s-except.ads (ZCX_By_Default): New constant.
7353         * a-except-2005.adb (Raise_Exception): Do not defer abort if ZCX.
7354         (Raise_Exception_Always): Ditto.
7355         (Raise_From_Signal_Handler): Ditto.
7356         (Raise_With_Location_And_Msg): Ditto.
7357         (Raise_With_Msg): Ditto.
7358         (Reraise): Ditto.
7359         (Reraise_Occurence): Ditto.
7360         (Reraise_Occurrence_Always): Ditto.
7361         * s-tasren.adb (Exceptional_Complete_Rendezvous): Defer aborts if ZCX.
7362         * s-tpobop.adb: (Exceptional_Complete_Body): Undefer abort if ZCX.
7363
7364 2011-08-29  Thomas Quinot  <quinot@adacore.com>
7365
7366         * sem_util.ads (Get_Enum_Lit_From_Pos): Clarify documentation.
7367
7368 2011-08-29  Robert Dewar  <dewar@adacore.com>
7369
7370         * snames.adb-tmpl, sem_ch13.adb: Minor reformatting
7371         Minor code reorganization.
7372
7373 2011-08-29  Bob Duff  <duff@adacore.com>
7374
7375         * usage.adb (-gnatwy): Fix documentation: this switch applies to Ada
7376         2012, not just Ada 2005.
7377
7378 2011-08-29  Vincent Celier  <celier@adacore.com>
7379
7380         * gnat_ugn.texi: Indicate that when the compiler is called by gnatmake
7381         with a project file or with gprbuid, if -gnatep= is specified, the
7382         builder may need to be invoked with -x.
7383
7384 2011-08-29  Tristan Gingold  <gingold@adacore.com>
7385
7386         * a-exexpr-gcc.adb: Minor comment fix.
7387
7388 2011-08-29  Robert Dewar  <dewar@adacore.com>
7389
7390         * sem_ch8.adb: Minor reformatting.
7391
7392 2011-08-29  Bob Duff  <duff@adacore.com>
7393
7394         * par-ch2.adb (P_Identifier): Warn that "some" is reserved in Ada 2012.
7395         * par-ch4.adb (P_Quantified_Expression): Remove unnecessary code for
7396         treating "some" as unreserved in earlier Ada versions. This is now
7397         handled in Snames.Is_Keyword_Name. Parse "for some" using Tok_Some,
7398         rather than Name_Some, since Tok_Some is now recognized as reserved.
7399         * scans.adb (Initialize_Ada_Keywords): Handle Tok_Some like any other
7400         reserved word.
7401         * scans.ads: Minor comment fixes.
7402         * snames.adb-tmpl (Is_Keyword_Name): Handle Ada 2012 reserved words as
7403         for other language versions.
7404         * scn.adb (Scan_Reserved_Identifier): Remove unnecessary code for
7405         treating "some" as unreserved in earlier Ada versions. This is now
7406         handled in Snames.Is_Keyword_Name.
7407         * par-ch3.adb (P_Defining_Identifier): Warn that "some" is reserved in
7408         Ada 2012.
7409         (P_Subtype_Mark_Resync): Remove unnecessary code for treating "some" as
7410         unreserved in earlier Ada versions. This is now handled in
7411         Snames.Is_Keyword_Name.
7412         * snames.ads-tmpl (Ada_2012_Reserved_Words): Handle Ada 2012 reserved
7413         words as for other language versions.
7414         * gnat_ugn.texi (-gnatwy): Fix documentation: this switch applies to
7415         Ada 2012, not just Ada 2005.
7416
7417 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
7418
7419         * sem_ch13.adb: Additional semantic checks for aspects involved in
7420         iterators.
7421
7422 2011-08-29  Matthew Heaney  <heaney@adacore.com>
7423
7424         * a-comutr.ads, a-comutr.adb, a-cimutr.ads, a-cimutr.adb,
7425         a-cbmutr.ads, a-cbmutr.adb (Find_In_Subtree): Remove superfluous
7426         Container parameter.
7427         (Ancestor_Find): ditto.
7428
7429 2011-08-29  Thomas Quinot  <quinot@adacore.com>
7430
7431         * par-endh.adb: Minor reformatting.
7432
7433 2011-08-29  Tristan Gingold  <gingold@adacore.com>
7434
7435         * a-exexpr-gcc.adb (Unwind_Action) Rewrite as an integer with constants.
7436         (GNAT_GCC_Exception): Remove N_Cleanups_To_Trigger component.
7437         (Adjust_N_CLeanups_For): Remove.
7438         (CleanupUnwind_Handler): Call Unhandled_Exception_Terminate when end of
7439         stack is reached.
7440         (Propgate_Exception): Adjust.
7441         * raise-gcc.c: Add a few static/const.
7442         (Adjust_N_Cleanups_For): Remove declaration.
7443         (PERSONALITY_FUNCTION): Remove code dealing with N_Cleanups_To_Trigger.
7444
7445 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
7446
7447         * sem_ch8.adb: Use type of function return when rewriting as object
7448         declaration.
7449
7450 2011-08-29  Gary Dismukes  <dismukes@adacore.com>
7451
7452         * sem_type.adb: Minor reformatting.
7453
7454 2011-08-29  Robert Dewar  <dewar@adacore.com>
7455
7456         * makeutl.adb: Minor reformatting.
7457
7458 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
7459
7460         * sem_ch8.adb (Analyze_Object_Renaming): If the renamed object is a
7461         function call of a limited type, the expansion of the renaming is
7462         complicated by the presence of various temporaries and subtypes that
7463         capture constraints of the renamed object.
7464         Rewrite node as an object declaration, whose expansion is simpler.
7465         Given that the object is limited there is no copy involved and no
7466         performance hit.
7467
7468 2011-08-29  Robert Dewar  <dewar@adacore.com>
7469
7470         * exp_ch5.adb, sinfo.ads, make.adb, s-pooglo.adb, sem_ch12.adb,
7471         freeze.adb, sem_ch6.adb, par-ch12.adb: Minor reformatting.
7472
7473 2011-08-29  Tristan Gingold  <gingold@adacore.com>
7474
7475         * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
7476         system-tru64.ads, system-irix-n32.ads, system-vxworks-arm.ads,
7477         system-linux-hppa.ads, system-linux-s390.ads,
7478         system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
7479         system-vms_64.ads, system-vxworks-sparcv9.ads, system-linux-ppc.ads,
7480         system-aix64.ads, system-lynxos-ppc.ads, system-linux-sh4.ads,
7481         system-solaris-x86.ads, system-linux-x86_64.ads, system-linux-x86.ads,
7482         system-vxworks-ppc.ads, system-hpux.ads, system-darwin-ppc.ads,
7483         system-solaris-sparc.ads, system-lynxos-x86.ads,
7484         system-vxworks-m68k.ads, system-hpux-ia64.ads, system-irix-o32.ads,
7485         system-solaris-x86_64.ads, system-mingw-x86_64.ads,
7486         system-vxworks-mips.ads, system-linux-sparc.ads, system-vms-ia64.ads,
7487         system-freebsd-x86.ads, system-aix.ads, system-darwin-x86_64.ads,
7488         system-vxworks-x86.ads: Remove GCC_ZCX_Support.
7489         * s-taprop-posix.adb, s-taprop-irix.adb, s-taprop-vxworks.adb,
7490         s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-solaris.adb: Ditto.
7491         * opt.ads: Adjust comment.
7492         * targparm.ads, targparm.adb: Remove GCC_ZCX_Support_On_Target.
7493         * gnat1drv.adb: Do not check for GCC_ZCX_Support_On_Target.
7494         * system.ads: Move GCC_ZCX_Support to obsolete entries.
7495
7496 2011-08-29  Emmanuel Briot  <briot@adacore.com>
7497
7498         * makeutl.adb (Do_Complete): Resolve symbolic links when a relative
7499         file name is specified on the gnatmake or gprbuild command line, and
7500         before we search for that file in the project.
7501
7502 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
7503
7504         * sem_type.adb (Within_Instance): New predicate in Collect_Interps,
7505         used to determine whether a possible interpretation for an overloadable
7506         entity is declared within the current instantiation and should be
7507         included in the candidate set.
7508
7509 2011-08-29  Vasiliy Fofanov  <fofanov@adacore.com>
7510
7511         * gnat_rm.texi, gnat_ugn.texi: Clean ups.
7512
7513 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
7514
7515         * sem_res.adb (Resolve_Actuals): Use base type to determine whether an
7516         access subtype is access_to_subprogram, when applying checks for
7517         RM 3.10.2 (27).
7518
7519 2011-08-29  Matthew Heaney  <heaney@adacore.com>
7520
7521         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check
7522         for sibling when common parent.
7523
7524 2011-08-29  Thomas Quinot  <quinot@adacore.com>
7525
7526         * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with
7527         "pragma_".
7528
7529 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
7530
7531         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions
7532         for the return type when in ASIS mode.
7533
7534 2011-08-29  Vincent Celier  <celier@adacore.com>
7535
7536         * make.adb (Gnatmake): Get the default search dirs, then the target
7537         parameters after getting the Builder switches, as the Builder switches
7538         may include --RTS= and that could change the default search dirs.
7539
7540 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
7541
7542         * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of
7543         Make_Final_Call. Move the processing for class-wide types before the
7544         processing for derivations from [Limited_]Controlled.
7545         (Make_Final_Call): Move the processing for class-wide types before the
7546         processing for derivations from [Limited_]Controlled.
7547         * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check.
7548         Add code to account for alignments larger than the list header. Add a
7549         comment illustrating the structure of the allocated object + padding +
7550         header.
7551         (Deallocate_Any_Controlled): Add code to account for alignments larger
7552         than the list header.
7553
7554 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
7555
7556         * sinfo.ads, sinfo.adb: New node kind
7557         N_Formal_Incomplete_Type_Definition, related flags.
7558         par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition):
7559         Parse formal incomplete types.
7560         * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in
7561         sem_ch12.
7562         * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body):
7563         Formal incomplete types do not need completion.
7564         * sem_ch12.adb (Analyze_Formal_Incomplete_Type,
7565         Validate_Incomplete_Type_Instance): New procedures to handle formal
7566         incomplete types.
7567         * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual
7568         that corresponds to a formal incomplete type.
7569         * sprint.adb: Handle formal incomplete type declarations.
7570         * exp_util.adb (Insert_Actions): An incomplete_type_definition is not
7571         an insertion point.
7572
7573 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
7574
7575         * a-fihema.ads, a-fihema.adb: Unit removed.
7576         * a-undesu.ads, a-undesu.adb: New unit implementing
7577         Ada.Unchecked_Deallocate_Subpool.
7578         * einfo.adb: Remove Associated_Collection from the node usage.
7579         Add Finalization_Master to the node usage.
7580         (Associated_Collection): Removed.
7581         (Finalization_Master): New routine.
7582         (Set_Associated_Collection): Removed.
7583         (Set_Finalization_Master): New routine.
7584         (Write_Field23_Name): Remove Associated_Collection from the output. Add
7585         Finalization_Master to the output.
7586         * einfo.ads: Remove attribute Associated_Collection and its uses in
7587         entities.
7588         Add new attribute Finalization_Master along with its uses in entitites.
7589         (Associated_Collection): Removed along with its pragma import.
7590         (Finalization_Master): New routine along with a pragma import.
7591         (Set_Associated_Collection): Removed along with its pragma import.
7592         (Set_Finalization_Master): New routine along with a pragma import.
7593         * exp_ch3.adb (Expand_Freeze_Array_Type): Replace call to
7594         Build_Finalization_Collection with Build_Finalization_Master.
7595         (Expand_Freeze_Record_Type): Move the generation of Finalize_Address
7596         before the bodies of the predefined routines. Add comment explaining
7597         this. Replace call to Build_Finalization_Collection with
7598         Build_Finalization_Master.
7599         (Freeze_Type): Replace call to Build_Finalization_Collection with
7600         Build_Finalization_Master.
7601         (Make_Finalize_Address_Body): Comment reformatting.
7602         (Make_Predefined_Primitive_Specs): Code reformatting.
7603         (Stream_Operation_OK): Update comment mentioning finalization
7604         collections. Replace RE_Finalization_Collection with
7605         RE_Finalization_Master.
7606         * exp_ch4.adb (Complete_Controlled_Allocation): Replace call to
7607         Associated_Collection with Finalization_Master. Replace call to
7608         Build_Finalization_Collection with Build_Finalization_Master.
7609         (Expand_Allocator_Expression): Replace call to Associated_Collection
7610         with Finalization_Master. Replace call to Set_Associated_Collection with
7611         Set_Finalization_Master. Remove the generation of
7612         Set_Finalize_Address_Ptr.
7613         (Expand_N_Allocator): Replace call to Associated_Collection with
7614         Finalization_Master. Remove the generation of Set_Finalize_Address_Ptr.
7615         * exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call): Renamed to
7616         Add_Finalization_Master_Actual_To_Build_In_Place_Call. Update the
7617         comment on usage. Replace call to Needs_BIP_Collection with
7618         Needs_BIP_Finalization_Master Remplace BIP_Collection with
7619         BIP_Finalization_Master. Update all comments which mention finalization
7620         collections. Replace Associated_Collection with
7621         Finalization_Master. Replace Build_Finalization_Collection with
7622         Build_Finalization_Master.
7623         (BIP_Formal_Suffix): Update BIP_Collection's case.
7624         (Build_Heap_Allocator): Update the related comment. Rename local
7625         variable Collect to Fin_Mas_Id and update its occurrences. Update
7626         comments which mention finalization collections. Replace
7627         Set_Associated_Collection with Set_Finalization_Master.
7628         (Expand_Call): Update the code which detects a special piece of library
7629         code for .NET/JVM.
7630         (Make_Build_In_Place_Call_In_Allocator): Replace the call to
7631         Add_Collection_Actual_To_Build_In_Place_Call with
7632         Add_Finalization_Master_Actual_To_Build_In_Place_Call. Remove the code
7633         which generates a call to Make_Set_Finalize_Address_Ptr_Call.
7634         (Make_Build_In_Place_Call_In_Anonymous_Context): Replace call to
7635         Add_Collection_Actual_To_Build_In_Place_Call with
7636         Add_Finalization_Master_Actual_To_Build_In_Place_Call.
7637         (Make_Build_In_Place_Call_In_Assignment): Replace call to
7638         Add_Collection_Actual_To_Build_In_Place_Call with
7639         Add_Finalization_Master_Actual_To_Build_In_Place_Call.
7640         (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
7641         * exp_ch6.ads: Rename BIP_Collection to BIP_Finalization_Master.
7642         (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
7643         * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Update comment on usage.
7644         Rename local variable Collect to Fin_Mas_Id and update its occurrences.
7645         Replace call to Set_Associated_Collection with Set_Finalization_Master.
7646         (Build_Finalization_Collection): Renamed to Build_Finalization_Master.
7647         Replace the call to Associated_Collection with Finalization_Master.
7648         Rename local variable Coll_Id to Fin_Mas_Id and update its occurrences.
7649         Update the way finalization master names are generated. Update the
7650         retrieval of the correct access type which will carry the pool and
7651         master attributes.
7652         (Make_Final_Call): Reimplement the way [Deep_]Finalize is retrieved.
7653         (Make_Finalize_Address_Body): Abstract types do not need
7654         Finalize_Address. Code reformatting.
7655         (Make_Finalize_Address_Stmts): Update comment on usage.
7656         (Make_Set_Finalize_Address_Ptr_Call): Removed.
7657         (Process_Declarations): Update comments.
7658         * exp_ch7.ads (Build_Finalization_Collection): Renamed to
7659         Build_Finalization_Master. Update associated comment.
7660         (Make_Set_Finalize_Address_Ptr_Call): Removed.
7661         * exp_ch13.adb: Update comments which mention finalization collections.
7662         (Expand_N_Free_Statement): Replace the call to Associated_Collection
7663         with Finalization_Master.
7664         * exp_util.adb (Build_Allocate_Deallocate_Proc): Reimplemented to
7665         create calls to routines Allocate_Any_Controlled and
7666         Deallocate_Any_Controlled.
7667         (Find_Finalize_Address): New routine.
7668         (Is_Allocate_Deallocate_Proc): Update the RTE entities used in the
7669         comparison.
7670         (Requires_Cleanup_Actions): Update the comment on freeze node
7671         inspection.
7672         * exp_util.ads: Remove comment on generated code for
7673         Build_Allocate_Deallocate_Proc. The code is now quite complex and it
7674         is better to simply look in the body.
7675         * freeze.adb (Freeze_All): Update the comment of finalization
7676         collections. Replace the call to Associated_Collection with
7677         Finalization_Master. Replace the call to Build_Finalization_Collection
7678         with Build_Finalization_Master.
7679         * impunit.adb: Add a-undesu and s-stposu to the list of units.
7680         * Makefile.rtl: Add files a-undesu, s-finmas and s-stposu. Remove file
7681         a-fihema.
7682         * rtsfind.adb (Get_Unit_Name): Remove the processing for children of
7683         Ada.Finalization. Add processing for children of System.Storage_Pools.
7684         * rtsfind.ads: Remove the naming of second level children of
7685         Ada.Finalization.
7686         Remove Ada_Finalization_Heap_Management from the list of units.
7687         Remove subtype Ada_Finalization_Child.
7688         Remove the following subprogram entities:
7689         
7690            RE_Allocate
7691            RE_Deallocate
7692            RE_Finalization_Collection
7693            RE_Finalization_Collection_Ptr
7694            RE_Set_Finalize_Address_Ptr
7695         
7696         Add the naming of second level children of System.Storage_Pools.
7697         Add System_Finalization_Masters and System_Storage_Pools_Subpools to
7698         the list of units.
7699         Add subtype System_Storage_Pools_Child.
7700         Add the following subprogram entities to System.Finalization_Masters:
7701         
7702            RE_Finalization_Master
7703            RE_Finalization_Master_Ptr
7704         
7705         Add the following subprogram entities to System.Storage_Pools.Subpools:
7706         
7707            RE_Allocate_Any_Controlled
7708            RE_Deallocate_Any_Controlled
7709            RE_Root_Storage_Pool_With_Subpools
7710            RE_Root_Subpool
7711            RE_Subpool_Handle
7712         
7713         Move the following subprogram entities from
7714         Ada.Finalization.Heap_Management to System.Finalization_Masters:
7715         
7716            RE_Add_Offset_To_Address
7717            RE_Attach
7718            RE_Base_Pool
7719            RE_Detach
7720         
7721         * sem_ch3.adb (Access_Type_Declaration): Replace the call to
7722         Set_Associated_Collection with Set_Finalization_Master.
7723         * sem_ch6.adb (Create_Extra_Formals): Update the way extra formal
7724         BIP_Finalization_Master is created.
7725         * s-finmas.adb: New unit System.Finalization_Masters.
7726         * s-finmas.ads: New unit System.Finalization_Masters.
7727         * s-stopoo.ads, s-stopoo.adb: Minor code reformatting.
7728         * s-stposu.ads, s-stposu.adb: New unit implementing
7729         System.Storage_Pools.Subpools.
7730
7731 2011-08-29  Bob Duff  <duff@adacore.com>
7732
7733         * tbuild.adb: Add assertion.
7734
7735 2011-08-29  Thomas Quinot  <quinot@adacore.com>
7736
7737         * s-pooglo.adb: Minor reformatting.
7738
7739 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
7740
7741         * exp_ch5.adb (Expand_N_Assignment_Statement): if the left-hand side is
7742         an indexed component of a packed array whose element type is a record
7743         with a representation clause different from that of the right-hand
7744         side, generate a temporary to minimuze the number of bit-field
7745         operations generated.
7746
7747 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
7748
7749         * exp_util.adb (Insert_Actions): Use clauses can be part of lists of
7750         declarations, and thus are likely insertion points for actions.
7751
7752 2011-08-29  Bob Duff  <duff@adacore.com>
7753
7754         * einfo.ads: Minor comment fix.
7755
7756 2011-08-29  Robert Dewar  <dewar@adacore.com>
7757
7758         * frontend.adb, gnat1drv.adb: Minor reformatting.
7759
7760 2011-08-29  Tristan Gingold  <gingold@adacore.com>
7761
7762         * s-pooglo.adb (Allocate, Deallocate): Take into account the alignment.
7763         * a-fihema.adb (Allocate, Deallocate): Ditto.  Possibly add padding
7764         space in front of the header.
7765
7766 2011-08-29  Johannes Kanig  <kanig@adacore.com>
7767
7768         * frontend.adb (Frontend): Exit after creating Standard package when
7769         -gnatd.H is present.
7770         * gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is
7771         present.
7772
7773 2011-08-29  Robert Dewar  <dewar@adacore.com>
7774
7775         * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb,
7776         makeutl.adb, makeutl.ads, atree.ads, snames.adb-tmpl,
7777         snames.ads-tmpl: Minor reformatting.
7778
7779 2011-08-29  Philippe Gil  <gil@adacore.com>
7780
7781         * prj.adb (Reset_Units_In_Table): New procedure.
7782         Reset units to avoid access to freed memory.
7783
7784 2011-08-29  Thomas Quinot  <quinot@adacore.com>
7785
7786         * get_scos.adb: When reading a P statement SCO without a pragma name
7787         (from an older ALI file), ensure that the Pragma_Name component is set
7788         to Unknown_Pragma (not left uninitialized).
7789
7790 2011-08-29  Vincent Celier  <celier@adacore.com>
7791
7792         * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and
7793         modified to compute correctly the object path of a SAL project that is
7794         extending another library project.
7795         (Write_Path_File): New procedure.
7796         * makeutl.ads (Directories): New table moved from Buildgpr
7797         (Get_Directories): New procedure moved from Buildgpr
7798         (Write_Path_File): New procedure
7799         * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the
7800         paths before binding SALs, instead of Set_Ada_Paths.
7801         * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package
7802         Prj.
7803         * prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env
7804         (Current_Source_Path_File_Of): New function
7805         (Set_Current_Object_Path_File_Of): New procedure
7806         (Current_Source_Object_File_Of): New function
7807         (Set_Current_Object_Path_File_Of): New procedure
7808         * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env
7809         (Current_Source_Path_File_Of): New function
7810         (Set_Current_Object_Path_File_Of): New procedure
7811         (Current_Source_Object_File_Of): New function
7812         (Set_Current_Object_Path_File_Of): New procedure
7813
7814 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
7815
7816         * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a
7817         packed entity, use a bit-field assignment only if there is no change of
7818         representation.
7819
7820 2011-08-29  Thomas Quinot  <quinot@adacore.com>
7821
7822         * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use
7823         Is_RTU instead of using Chars comparisons.
7824
7825 2011-08-29  Thomas Quinot  <quinot@adacore.com>
7826
7827         * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a
7828         temporary object if the actual is constrained, and the discriminants
7829         read from the stream don't match.
7830
7831 2011-08-29  Tristan Gingold  <gingold@adacore.com>
7832
7833         * sem_attr.adb, exp_attr.adb: Add handling of
7834         Attribute_System_Allocator_Alignment
7835         * snames.ads-tmpl: Add Name_System_Allocator_Alignment and
7836         Attribute_System_Allocator_Alignment.
7837         * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment.
7838         * gcc-interface/targtyps.c, gcc-interface/utils2.c,
7839         gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to
7840         get_target_system_allocator_alignment.
7841
7842 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
7843
7844         * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
7845         dependencies.
7846
7847 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
7848
7849         * exp_ch3.adb (In_Runtime): Fix typo.
7850
7851 2011-08-29  Bob Duff  <duff@adacore.com>
7852
7853         * sem_ch4.adb (Analyze_Allocator): Analyze the subpool specification.
7854
7855 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
7856
7857         * exp_ch3.adb (Expand_N_Object_Declaration): If the entity is tagged
7858         and a separate tag assignment is generated, ensure that the tag
7859         assignment is analyzed.
7860
7861 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
7862
7863         * atree.ads, atree.adb (Copy_Separate_List): New function that applies
7864         Copy_Separate_Tree to a list of nodes. Used to create disjoint copies
7865         of statement lists that may contain local declarations.
7866         * exp_ch9.adb (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to
7867         duplicate the triggering statements needed for the expansion of this
7868         construct, when the trigger is a dispatching call to a synchronized
7869         primitive.
7870
7871 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
7872
7873         * gnat_rm.texi: Add doc for 'Elab_Subp_Body.
7874         * bindgen.adb: Add comments.
7875         * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body
7876         in CodePeer mode.
7877
7878 2011-08-29  Robert Dewar  <dewar@adacore.com>
7879
7880         * exp_attr.adb: Minor reformatting.
7881         Minor code reorganization and commenting.
7882         * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
7883         reformatting.
7884
7885 2011-08-29  Thomas Quinot  <quinot@adacore.com>
7886
7887         * get_scos.adb: Ignore chaining indicators not currently supported
7888         by Ada.
7889
7890 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
7891
7892         * system.ads: Minor editing.
7893
7894 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
7895
7896         * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
7897         CodePeer mode.
7898         * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
7899         Attribute_Elab_Subp_Body.
7900         * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
7901         * sem_util.adb: Update comments.
7902
7903 2011-08-29  Thomas Quinot  <quinot@adacore.com>
7904
7905         * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
7906         pragma name for each SCO statement corresponding to a pragma.
7907
7908 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
7909
7910         * opt.ads: Minor editing.
7911
7912 2011-08-29  Yannick Moy  <moy@adacore.com>
7913
7914         * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
7915         that only made sense for CodePeer mode.
7916
7917 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
7918
7919         * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
7920         which is no longer used.
7921         * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
7922         handling of the 64-bit division check.
7923         * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
7924         division available.
7925         * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
7926         longer used.
7927
7928 2011-08-29  Thomas Quinot  <quinot@adacore.com>
7929
7930         * get_scos.adb: Minor reformatting.
7931
7932 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
7933
7934         * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
7935         statement list is wrapped in a block, the block is explicitly analyzed
7936         in order to properly redecorate the entities and create a servicing
7937         finalizer.
7938
7939 2011-08-29  Tristan Gingold  <gingold@adacore.com>
7940
7941         * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
7942         (Set_Zero_Cost_Handling): Remove.
7943
7944 2011-08-29  Thomas Quinot  <quinot@adacore.com>
7945
7946         * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
7947
7948 2011-08-29  Geert Bosch  <bosch@adacore.com>
7949
7950         * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
7951         instruction, as the latter may produce -0.0, which is not a valid VAX
7952         F float number.
7953         (Neg_G): Likewise for VAX F float.
7954
7955 2011-08-29  Robert Dewar  <dewar@adacore.com>
7956
7957         * exp_util.adb: Minor reformatting.
7958
7959 2011-08-29  Yannick Moy  <moy@adacore.com>
7960
7961         * sem_ch3.adb: Minor comment update.
7962
7963 2011-08-29  Thomas Quinot  <quinot@adacore.com>
7964
7965         * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
7966         the operand type.
7967
7968 2011-08-29  Thomas Quinot  <quinot@adacore.com>
7969
7970         * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
7971         current statement sequence on a generic instantiation or a subprogram
7972         declaration.
7973
7974 2011-08-29  Robert Dewar  <dewar@adacore.com>
7975
7976         * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
7977         Minor reformatting.
7978
7979 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
7980
7981         * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
7982         Correct the check which involves the freeze node of a controlled or
7983         access-to-controlled type.
7984
7985 2011-08-29  Geert Bosch  <bosch@adacore.com>
7986
7987         * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
7988         statements.
7989         * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
7990         Asm statements.
7991
7992 2011-08-29  Yannick Moy  <moy@adacore.com>
7993
7994         * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
7995         for every index type and component type that is not a subtype_mark.
7996         (Process_Subtype): Set Etype of subtype.
7997
7998 2011-08-29  Robert Dewar  <dewar@adacore.com>
7999
8000         * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
8001         reorganization.  Minor reformatting.
8002
8003 2011-08-29  Steve Baird  <baird@adacore.com>
8004
8005         * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
8006         for CodePeer and ALFA modes.
8007
8008 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
8009
8010         * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
8011         that comes from an enclosing scope if it is not the renaming of an
8012         actual, to handle properly a spurious ambiguity in an instance.
8013
8014 2011-08-29  Eric Botcazou  <ebotcazou@adacore.com>
8015
8016         * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
8017         (Alignment_Check_For_Size_Change): ...this.  Add SIZE parameter and
8018         use it instead of the Esize of the first parameter.
8019         (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
8020         above change.
8021         <Size>: Likewise.  Call it for composite types on the RM size.
8022
8023 2011-08-29  Yannick Moy  <moy@adacore.com>
8024
8025         * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
8026         * sem_util.adb (Unique_Name): Correct behaviour for names of
8027         compilation units.
8028
8029 2011-08-29  Yannick Moy  <moy@adacore.com>
8030
8031         * sem_prag.adb (Check_Precondition_Postcondition): In formal
8032         verification mode, analyze pragma expression for correctness, for
8033         pre/post on library-level subprogram, as it is not expanded later.
8034
8035 2011-08-29  Yannick Moy  <moy@adacore.com>
8036
8037         * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
8038         in formal verification.
8039
8040 2011-08-29  Thomas Quinot  <quinot@adacore.com>
8041
8042         * sem_util.adb: Minor reformatting.
8043         * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
8044         there's no pragma.
8045         * par_sco.ads, par_sco.adb: Update comments.
8046
8047 2011-08-29  Yannick Moy  <moy@adacore.com>
8048
8049         * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
8050         associated getter/setter.
8051         * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
8052
8053 2011-08-29  Vincent Celier  <celier@adacore.com>
8054
8055         * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
8056         * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
8057         with declarations for Language_Kind and Dependency_Kind for Ada.
8058         * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
8059         (Process_Compiler): Take into account the new attributes Dependency_Kind
8060         and Language_Kind.
8061         (Check_Configuration): Check if language kind is unit based, not if the
8062         language name is Ada.
8063         (Process_Exceptions_Unit_Based): Ditto
8064         (Add_Language): Remove default additions of language and dependency kind
8065         * prj.ads: Minor comment change
8066         * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
8067
8068 2011-08-29  Johannes Kanig  <kanig@adacore.com>
8069
8070         * debug.adb: Update comments.
8071
8072 2011-08-24  Joseph Myers  <joseph@codesourcery.com>
8073
8074         * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
8075         (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
8076         (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
8077         (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
8078         (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
8079
8080 2011-08-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8081
8082         * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
8083         (GNATLIBCFLAGS_FOR_C): Replace
8084         TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
8085         (gnatlib-shared-default, gnatlib-shared-dual-win32)
8086         (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
8087         (gnatlib-sjlj, gnatlib-zcx): Likewise.
8088
8089 2011-08-07  Eric Botcazou  <ebotcazou@adacore.com>
8090
8091         * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
8092
8093         * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
8094
8095         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
8096
8097 2011-08-05  Nicolas Roche  <roche@adacore.com>
8098
8099         * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
8100         libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
8101         canadian cross.
8102         * gcc-interface/Make-lang.in: Add support for canadian cross setting.
8103
8104 2011-08-05  Matthew Heaney  <heaney@adacore.com>
8105
8106         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
8107         subprogram bodies declared out-of-order.
8108
8109 2011-08-05  Yannick Moy  <moy@adacore.com>
8110
8111         * sem_util.adb (Unique_Name): only prefix with "standard" the names of
8112         entities directly in package Standard, otherwise skip the standard
8113         prefix.
8114
8115 2011-08-05  Robert Dewar  <dewar@adacore.com>
8116
8117         * a-cbmutr.adb: Minor reformatting
8118         (Allocate_Node): refactor node allocation algorithm
8119
8120 2011-08-05  Robert Dewar  <dewar@adacore.com>
8121
8122         * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
8123         * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
8124         mode.
8125         (Analyze_Pragma, case Check_Policy): Ditto.
8126         * sem_prag.ads (Check_Disabled): New function
8127         * snames.ads-tmpl: Add Name_Disable.
8128
8129 2011-08-05  Robert Dewar  <dewar@adacore.com>
8130
8131         * gnat_rm.texi: Document implementation-defined policy DISABLE for
8132         pragmas Assertion_Policy, Check_Policy, Debug_Policy.
8133
8134 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
8135
8136         * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
8137         that appears in a generic formal part and applies to a formal
8138         subprogram.
8139
8140 2011-08-05  Robert Dewar  <dewar@adacore.com>
8141
8142         * a-cbmutr.ads: Minor reformatting.
8143
8144 2011-08-05  Matthew Heaney  <heaney@adacore.com>
8145
8146         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
8147         to check count, check sign of value instead.
8148         * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
8149         (Copy_Subtree): allocate copy of source element
8150         (Equal_Subtree): compare elements, not access objects
8151
8152 2011-08-05  Vincent Celier  <celier@adacore.com>
8153
8154         * gnat_ugn.texi: Fix VMS alternative.
8155
8156 2011-08-05  Thomas Quinot  <quinot@adacore.com>
8157
8158         * sem_ch11.adb: Add comment.
8159
8160 2011-08-05  Robert Dewar  <dewar@adacore.com>
8161
8162         * exp_util.adb: Minor comment fix.
8163
8164 2011-08-05  Robert Dewar  <dewar@adacore.com>
8165
8166         * scng.adb (Error_Unterminated_String): Improve flag position when
8167         comma present.
8168
8169 2011-08-05  Matthew Heaney  <heaney@adacore.com>
8170
8171         * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
8172         tree containers).
8173         * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
8174         multiway tree containers.
8175
8176 2011-08-05  Robert Dewar  <dewar@adacore.com>
8177
8178         * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
8179         * stylesw.adb: Implement -gnatyC to control comment spacing
8180         * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
8181         -gnatyc/C).
8182         * usage.adb: Add line for -gnatyC.
8183
8184 2011-08-05  Robert Dewar  <dewar@adacore.com>
8185
8186         * gnat_ugn.texi: Document -gnatyC.
8187         * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
8188         synonym for COMMENTS2).
8189
8190 2011-08-05  Robert Dewar  <dewar@adacore.com>
8191
8192         * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
8193         a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
8194         sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
8195         a-comutr.ads, lib-xref.adb: Minor reformatting.
8196
8197 2011-08-05  Robert Dewar  <dewar@adacore.com>
8198
8199         * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
8200         warning if there is an exception handler present.
8201
8202 2011-08-05  Pascal Obry  <obry@adacore.com>
8203
8204         * a-iteint.ads: Fix copyright year.
8205
8206 2011-08-05  Thomas Quinot  <quinot@adacore.com>
8207
8208         * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
8209         statement SCO for a USE clause or a representation clause.
8210
8211 2011-08-05  Yannick Moy  <moy@adacore.com>
8212
8213         * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
8214         between body and spec for stub.
8215         (Detect_And_Add_ALFA_Scope): take into account subprogram stub
8216         * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
8217         pragma precondition or postcondition, for which the enclosing
8218         subprogram or package in the AST is not the desired one, return empty.
8219
8220 2011-08-05  Thomas Quinot  <quinot@adacore.com>
8221
8222         * g-expect.adb: Minor reformatting.
8223
8224 2011-08-05  Bob Duff  <duff@adacore.com>
8225
8226         * a-fihema.adb: Comment out OS_Lib.
8227
8228 2011-08-05  Matthew Heaney  <heaney@adacore.com>
8229
8230         * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
8231         (unbounded multiway tree containers) and a-iteint.ads.
8232         * a-comutr.ads, a-comutr.adb:
8233         This is the new Ada 2012 unit for unbounded multiway tree containers
8234         * a-cimutr.ads, a-cimutr.adb
8235         This is the new Ada 2012 unit for indefinite multiway tree containers
8236         * a-iteint.ads: New file.
8237
8238 2011-08-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8239
8240         * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
8241
8242 2011-08-05  Bob Duff  <duff@adacore.com>
8243
8244         * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
8245         subpools.
8246         * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
8247
8248 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
8249
8250         * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
8251         general indexing aspects of Ada2012. Called when analyzing indexed
8252         components when other interpretations fail.
8253         * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
8254         in an expression context where overloading is meaningful. This excludes
8255         the occurrence in an aspect specification (efficiency only).
8256         * sem_attr.adb (Analyze_Attribute): indicate that the attributes
8257         related to iterators can be set by an attribute specification, but
8258         cannot be queried.
8259         * sem_ch13.adb (Analyze_Aspect_Specifications): handle
8260         Constant_Indexing and Variable_Indexing.
8261         (Check_Indexing_Functions): New procedure to perform legality checks.
8262         Additional semantic checks at end of declarations.
8263
8264 2011-08-05  Sergey Rybin  <rybin@adacore.com>
8265
8266         * tree_io.ads: Update ASIS_Version_Number because of the change of the
8267         order of calling Tree_Write/Tree_Read routines made for aspects.
8268
8269 2011-08-05  Bob Duff  <duff@adacore.com>
8270
8271         * a-fihema.adb (Finalize): Fix race condition.
8272
8273 2011-08-05  Yannick Moy  <moy@adacore.com>
8274
8275         * sem_ch12.adb (Analyze_Package_Instantiation,
8276         Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
8277         mode.
8278
8279 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
8280
8281         * sem_type.adb (Specific_Type): in an instance, the type-specific
8282         operand of an equality check that involves null may have a private
8283         type. Use full view to determine legality of construct.
8284
8285 2011-08-05  Vincent Celier  <celier@adacore.com>
8286
8287         * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
8288         delete or close the file when the call to gnatmake was successful.
8289
8290 2011-08-05  Yannick Moy  <moy@adacore.com>
8291
8292         * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
8293         Global_Discard_Names.
8294
8295 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
8296
8297         * sinfo.ads: comments on use of entity field for aspect specifications.
8298
8299 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
8300
8301         * sem_ch12.adb (Reset_Entity): If the entity field of the associated
8302         node is not itself an entity but a selected component, it is a
8303         rewritten parameterless call to an en enclosing synchronized operation,
8304         and this expansion will be performed again in the instance, so there is
8305         no global information to preserve.
8306
8307 2011-08-05  Javier Miranda  <miranda@adacore.com>
8308
8309         * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
8310         for renamings of predefined primitives.
8311         (In_Predef_Prims_DT): New subprogram.
8312
8313 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
8314
8315         * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
8316         possible interpretation of name is a reference type, add an
8317         interpretation that is the designated type of the reference
8318         discriminant of that type.
8319         * sem_res.adb (resolve): If the interpretation imposed by context is an
8320         implicit dereference, rewrite the node as the deference of the
8321         reference discriminant.
8322         * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
8323         Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
8324         parent type or base type.
8325         * sem_ch4.adb (Process_Indexed_Component,
8326         Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
8327         Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
8328         Check for implicit dereference.
8329         (List_Operand_Interps): Indicate when an implicit dereference is
8330         ambiguous.
8331         * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
8332
8333 2011-08-05  Thomas Quinot  <quinot@adacore.com>
8334
8335         * scos.ads: Update documentation of SCO table. Pragma statements can now
8336         be marked as disabled (using 'p' instead of 'P' as the statement kind).
8337         * par_sco.ads, par_sco.adb: Implement the above change.
8338         (Process_Decisions_Defer): Generate a P decision for the first parameter
8339         of a dyadic pragma Debug.
8340         * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
8341         necessary.
8342         * put_scos.adb: Code simplification based on above change.
8343
8344 2011-08-05  Robert Dewar  <dewar@adacore.com>
8345
8346         * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
8347         bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
8348         a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
8349         prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
8350
8351 2011-08-05  Bob Duff  <duff@adacore.com>
8352
8353         * a-stunau.ads, g-spipat.adb: Update comments.
8354
8355 2011-08-05  Bob Duff  <duff@adacore.com>
8356
8357         * a-fihema.ads: Minor comment fix.
8358         * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
8359         correct.
8360         (Attach, Detach): Remove some unnecessary code.
8361         (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
8362
8363 2011-08-05  Bob Duff  <duff@adacore.com>
8364
8365         * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
8366         allocation for Objects component. This simplifies the code somewhat. It
8367         is also a little more efficient in the not-so-unusual case where there
8368         are no controlled objects allocated.
8369         Make Finalization_Started flag atomic.
8370         (Finalize): Avoid unnecessary detachment of items from the list.
8371         (pcol): Minor cleanup.
8372
8373 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
8374
8375         * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
8376         package whose name is the same as that of the generic unit, or its
8377         ultimate prefix.
8378
8379 2011-08-05  Bob Duff  <duff@adacore.com>
8380
8381         * a-fihema.adb, a-fihema.ads: Minor comment improvements.
8382         * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
8383         Minor comment fixes.
8384
8385 2011-08-05  Arnaud Charlet  <charlet@adacore.com>
8386
8387         * make.adb (Linking_Phase): No longer need to set source search path
8388         before calling gnatlink in CodePeer mode.
8389         * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
8390         gcc in CodePeer mode, since the binder generated file no longer has a
8391         'with Main'.
8392         * switch.ads, switch.adb (Is_Language_Switch): Removed.
8393         * switch-c.adb: Update comment.
8394
8395 2011-08-05  Thomas Quinot  <quinot@adacore.com>
8396
8397         * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
8398
8399 2011-08-05  Nicolas Roche  <roche@adacore.com>
8400
8401         * gnat_ugn.texi: Fix minor syntax error issue.
8402
8403 2011-08-05  Vincent Celier  <celier@adacore.com>
8404
8405         * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
8406         delete or close the file when the call to gnatmake returns a non
8407         successful return code.
8408
8409 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
8410
8411         * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
8412         check, indicate that the copy of the original node does not come from
8413         source, to prevent an infinite recursion of the expansion.
8414
8415 2011-08-05  Johannes Kanig  <kanig@adacore.com>
8416
8417         * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
8418         VC generation for subprogram bodies.
8419
8420 2011-08-05  Yannick Moy  <moy@adacore.com>
8421
8422         * einfo.ads: Typo.
8423         * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
8424         the base type with the smallest allowed base type.
8425
8426 2011-08-05  Sergey Rybin  <rybin@adacore.com>
8427
8428         * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
8429         aspects.
8430
8431 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
8432
8433         * sem_ch12.ads: minor comment updates.
8434
8435 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
8436
8437         * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
8438         instantiation and a formal package the compiler generates a package
8439         renaming declaration so that the generic name within the declaration
8440         is interpreted as a renaming of the instance. At the end of a formal
8441         package declaration, this renaming must become invisible.
8442
8443 2011-08-05  Hristian Kirtchev  <kirtchev@adacore.com>
8444
8445         * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
8446         comparison and rely on concrete entities instead.
8447
8448 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
8449
8450         * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
8451         and discriminants, to indicate that the type has an access discriminant
8452         that supports implicit dereference.
8453         * snames.ads-tmpl: Add names of aspects and attributes related to
8454         Ada2012 iterators: constant_indexing, default_iterator,
8455         iterator_element, implicit_dereference, variable_indexing.
8456         * aspects.ads, aspects.adb: entries for iterator-related aspects.
8457         * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
8458         iterator-related aspects.
8459         * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
8460
8461 2011-08-05  Sergey Rybin  <rybin@adacore.com>
8462
8463         * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
8464         metrics in gnatmetric to cover new kinds of coupling mentrics.
8465
8466 2011-08-05  Steve Baird  <baird@adacore.com>
8467
8468         * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
8469         of calling the user-defined main subprogram.
8470         (Gen_Main):  Declare Ada_Main_Program and (if CodePeer_Mode
8471         is set) Call_Main_Subprogram ahead of, as opposed to
8472         inside of, Main.
8473         (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
8474         generation of a "with" of the user-defined main subprogram.
8475         Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
8476         (which is now called from Gen_Main instead).
8477
8478 2011-08-05  Emmanuel Briot  <briot@adacore.com>
8479
8480         * projects.texi: Added reference to the Makefile package.
8481
8482 2011-08-05  Thomas Quinot  <quinot@adacore.com>
8483
8484         * exp_ch7.adb: Minor comment rewording.
8485
8486 2011-08-05  Ed Falis  <falis@adacore.com>
8487
8488         * env.c: Fix comment.
8489
8490 2011-08-05  Hristian Kirtchev  <kirtchev@adacore.com>
8491
8492         * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
8493         character comparison and rely on concrete entities instead.
8494
8495 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
8496
8497         * sem_ch3.adb: (Check_Private_Overriding): better error message,
8498         suggested by AI95-0068.
8499
8500 2011-08-05  Hristian Kirtchev  <kirtchev@adacore.com>
8501
8502         * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
8503         the two potential initialization calls. This accounts for any
8504         access-before-elaboration checks which may precede the initialization
8505         calls.
8506         (Next_Suitable_Statement): New routine. Returns the next real statement
8507         after the input node while skipping generated checks.
8508         * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
8509         with comment on usage.
8510         Do not generate Elaborate_All when the trigger is a finalization call
8511         coming from a type init proc.
8512         (Check_Elab_Call): Propagate the initialization procedure context to
8513         subsequent calls to Check_A_Call.
8514         (Check_Internal_Call_Continue): Propagate the initialization procedure
8515         context to subsequent calls to Check_Elab_Call.
8516         (Is_Finalization_Procedure): New routine. Returns True if the input
8517         entity denotes a [Deep_]Finalize routine.
8518         * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
8519         along with comment on usage.
8520
8521 2011-08-05  Vadim Godunko  <godunko@adacore.com>
8522
8523         * s-atocou.ads: Add list of supported platforms.
8524
8525 2011-08-05  Yannick Moy  <moy@adacore.com>
8526
8527         * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
8528
8529         * opt.ads (Disable_ALI_File): new Boolean flag
8530         * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
8531
8532 2011-08-05  Ed Falis  <falis@adacore.com>
8533
8534         * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
8535         environ is properly defined.
8536
8537 2011-08-05  Vincent Celier  <celier@adacore.com>
8538
8539         * make.adb (Compilation_Phase): Exit immediately when all objects have
8540         been found up to date, to avoid multiple exit messages.
8541         * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
8542         same project for languages with no compiler.
8543         * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
8544         -eI.
8545 2011-08-05  Robert Dewar  <dewar@adacore.com>
8546
8547         * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
8548         sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
8549         prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
8550         s-atocou-builtin.adb: Minor reformatting.
8551
8552 2011-08-05  Yannick Moy  <moy@adacore.com>
8553
8554         * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
8555         if the node to wrap is a pragma check, this node and enclosed
8556         expression are not expanded, so do not apply any transformations here.
8557         * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
8558         introducing transient scopes.
8559
8560 2011-08-05  Jose Ruiz  <ruiz@adacore.com>
8561
8562         * adaint.c (__gnat_set_writable, __gnat_set_readable,
8563         __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
8564         __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
8565         routine is available, so we use the default implementation of these
8566         functions.
8567         * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
8568         support for copying attributes on VxWorks 6.
8569
8570 2011-08-05  Yannick Moy  <moy@adacore.com>
8571
8572         * debug.adb: Remove use of -gnatd.D.
8573         * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
8574         * opt.ads: Simplify variables for ALFA mode, to keep one only
8575         * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
8576         to ALFA mode.
8577
8578 2011-08-05  Vincent Celier  <celier@adacore.com>
8579
8580         * prj-conf.adb (Do_Autoconf): Look also for --RTS in
8581         Builder'Default_Switches.
8582
8583 2011-08-05  Vincent Celier  <celier@adacore.com>
8584
8585         * makeusg.adb: Add lines for --create-map-file switches.
8586
8587 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
8588
8589         * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
8590         profile is incomplete and the full view is available, replace it with
8591         the full view.
8592         * sem_ch6.adb (Possible_Freeze): if a type in the profile is
8593         incomplete, freezing the subprogram is delayed until the full view is
8594         frozen.
8595         * sem_type.adb (Disambiguate): an ambiguity between a user-defined
8596         fixed-point multiplication operator and the predefined operator is
8597         resolved in favor of the user-defined one.
8598
8599 2011-08-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8600
8601         * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
8602         CONST_CAST.
8603
8604 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
8605
8606         * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
8607         whether a type lacks user-defined Read or Write operations, or has a
8608         component that lacks them.
8609         * sem_attr.adb (Check_Stream_Attribute): if restriction
8610         No_Default_Stream_Attributes is active, verify that all subcomponent
8611         types of the target have user-defined stream operations, and report
8612         error otherwise.
8613         * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
8614         * exp_strm.adb: Build_Elementary_Input_Call,
8615         Build_Elementary_Write_Call): remove checks for restriction
8616         No_Default_Stream_Attributes, now checked in semantics.
8617
8618 2011-08-04  Vincent Celier  <celier@adacore.com>
8619
8620         * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
8621         switches on the command line, look for all valid --RTS switches in the
8622         Builder switches and for each language use the first runtime name found
8623         to invoke gprconfig.
8624         (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
8625         command line and there is no auto-configuration.
8626         (Runtime_Name_Set_For): New function.
8627
8628 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
8629
8630         * exp_ch7.adb (Build_Object_Declarations): Do not generate the
8631         elaborate initialization expression for variable Abort when processing
8632         a package body or a declaration.
8633         (Create_Finalizer): Propagate the package context when creating the
8634         exception-related variables.
8635         * exp_ch7.ads (Build_Object_Declarations): New formal parameter
8636         For_Package along with usage comment.
8637
8638 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
8639
8640         * gcc-interface/Makefile.in: Clean up targets.
8641         Enable new package for atomic counters and copy-on-write implementation
8642         of unbounded strings on x86 platforms.
8643         * gcc-interface/Make-lang.in: Update dependencies.
8644
8645 2011-08-04  Robert Dewar  <dewar@adacore.com>
8646
8647         * exp_ch7.adb: Minor reformatting.
8648
8649 2011-08-04  Robert Dewar  <dewar@adacore.com>
8650
8651         * exp_strm.adb: Minor reformatting.
8652
8653 2011-08-04  Vadim Godunko  <godunko@adacore.com>
8654
8655         * s-atocou.adb: Replace by dummy version and use on targets where atomic
8656         operations are not supported.
8657         * s-atocou-builtin.adb: Renamed from s-atocou.adb.
8658         * s-atocou-x86.adb: New file.
8659         * Makefile.rtl: Add s-atocou.o file
8660
8661 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
8662
8663         * make.adb (Compile): Move setting of CodePeer_Mode to ...
8664         (Compilation_Phase): ... here.
8665         (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
8666
8667 2011-08-04  Thomas Quinot  <quinot@adacore.com>
8668
8669         * Make-generated.in: Fix minor typo in comment.
8670
8671 2011-08-04  Thomas Quinot  <quinot@adacore.com>
8672
8673         * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
8674         the project path.
8675
8676 2011-08-04  Robert Dewar  <dewar@adacore.com>
8677
8678         * a-coinho.adb: Minor reformatting.
8679
8680 2011-08-04  Robert Dewar  <dewar@adacore.com>
8681
8682         * a-coinho.ads: Minor reformatting.
8683
8684 2011-08-04  Vadim Godunko  <godunko@adacore.com>
8685
8686         * s-atocou.ads, s-atocou.adb: New files.
8687         * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
8688         a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
8689         direct use of GCC's atomic builtins and replace them by use of new
8690         atomic counter package.
8691
8692 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
8693
8694         * exp_strm.adb: better error message for No_Default_Stream_Attributes.
8695
8696 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
8697
8698         * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
8699         with a call to Get_External_Tag.
8700         * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
8701         subprogram usage. Remove the guard against package declarations and
8702         bodies since Build_Cleanup_Statements is no longer invoked in that
8703         context.
8704         (Build_Components): Initialize Tagged_Type_Stmts when the context
8705         contains at least one library-level tagged type.
8706         (Build_Finalizer): New local variables Has_Tagged_Types and
8707         Tagged_Type_Stmts along with associated comments on usage. Update the
8708         logic to include tagged type processing.
8709         (Create_Finalizer): Insert all library-level tagged type unregistration
8710         code before the jump block circuitry.
8711         (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
8712         (Expand_N_Package_Declaration): Remove the call to
8713         Build_Cleanup_Statements.
8714         (Process_Tagged_Type_Declaration): New routine. Generate a call to
8715         unregister the external tag of a tagged type.
8716         (Processing_Actions): Reimplemented to handle tagged types.
8717         (Process_Declarations): Detect the declaration of a library-level
8718         tagged type and carry out the appropriate actions.
8719         (Unregister_Tagged_Types): Removed. The machinery has been directly
8720         merged with Build_Finalizer.
8721
8722 2011-08-04  Robert Dewar  <dewar@adacore.com>
8723
8724         * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
8725         gnatls.adb, exp_ch3.adb: Minor reformatting.
8726
8727 2011-08-04  Marc Sango  <sango@adacore.com>
8728
8729         * sem_attr.adb (Analyze_Attribute): Replace the message
8730         "invisible attribute of}" of the spark restriction violation in
8731         attribute reference by the simple message "invisible attribute of type".
8732         Indeed, the node value Error_Msg_Node_1 used is in conflit with the
8733         two insertion characters: '&' and '}'.
8734
8735 2011-08-04  Vadim Godunko  <godunko@adacore.com>
8736
8737         * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
8738         * a-coinho.ads, a-coinho.adb: New file.
8739         * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
8740
8741 2011-08-04  Nicolas Roche  <roche@adacore.com>
8742
8743         * alfa_test.adb: Not all ali files are containing alfa information even
8744         if compiled with -gnatd.F. So suppress warning about missing ALFA
8745         information.
8746
8747 2011-08-04  Yannick Moy  <moy@adacore.com>
8748
8749         * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
8750         scope.
8751         * put_alfa.adb: Check that scope name is not empty.
8752
8753 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
8754
8755         * exp_ch3.adb (Stream_Operation_Ok): new predicate
8756         Needs_Elementary_Stream_Operation, to determine whether user-defined
8757         Read and Write attributes are available for the elementary components
8758         of the given type. If only the predefined attributes are available,
8759         then when restriction No_Default_Stream_Attributes is active the
8760         predefined stream attributes for the composite type cannot be created.
8761
8762 2011-08-04  Robert Dewar  <dewar@adacore.com>
8763
8764         * bindgen.adb: Fix obsolete comments and names from Ada/C days.
8765         Put routines in alpha order
8766
8767 2011-08-04  Jose Ruiz  <ruiz@adacore.com>
8768
8769         * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
8770         * gcc-interface/Make-lang.in: Update dependencies.
8771
8772 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
8773
8774         * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
8775         * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
8776         gnat1why).
8777
8778 2011-08-04  Robert Dewar  <dewar@adacore.com>
8779
8780         * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
8781         lib-xref-alfa.adb: Minor reformatting.
8782
8783 2011-08-04  Marc Sango  <sango@adacore.com>
8784
8785         * sem_ch12.adb (Analyze_Generic_Package_Declaration,
8786         Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
8787         Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
8788         mode.
8789
8790 2011-08-04  Tristan Gingold  <gingold@adacore.com>
8791
8792         * bindgen.adb (Gen_Adainit_C): Remove.
8793         (Gen_Adafinal_C): Ditto.
8794         (Gen_Elab_Externals_C): Ditto.
8795         (Gen_Elab_Calls_C): Ditto.
8796         (Gen_Elab_Order_C): Ditto.
8797         (Gen_Elab_Defs_C): Ditto.
8798         (Gen_Finalize_Library_C): Ditto.
8799         (Gen_Finalize_Library_Defs_C): Ditto.
8800         (Gen_Main_C): Ditto.
8801         (Gen_Output_File_C): Ditto.
8802         (Gen_Restrictions_C): Ditto.
8803         (Gen_Versions_C): Ditto.
8804         (Write_Info_Ada_C): Ditto.
8805         (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
8806         (Gen_Output_File): Do not force Ada_Bind_File anymore.
8807         Always call Gen_Output_File_Ada.
8808         * gnatlink.adb (Begin_Info): Now a constant.
8809         (End_Info): Ditto.
8810         (Ada_Bind_File): Remove
8811         (Process_Args): Do not handle -A/-C.  Remove not Ada_Bind_File cases.
8812         * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
8813         * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
8814         * opt.ads (Ada_Bind_File): Remove.
8815
8816 2011-08-04  Thomas Quinot  <quinot@adacore.com>
8817
8818         * projects.texi: Document target-specific directory in default project
8819         path for gnatmake.
8820
8821 2011-08-04  Thomas Quinot  <quinot@adacore.com>
8822
8823         * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
8824         path in all cases .
8825
8826 2011-08-04  Yannick Moy  <moy@adacore.com>
8827
8828         * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
8829         opt.ads, lib-xref.ads: Code clean up.
8830
8831 2011-08-04  Yannick Moy  <moy@adacore.com>
8832
8833         * gnat_rm.texi: Update description of Test_Case
8834         * gnat_ugn.texi: Typo.
8835
8836 2011-08-04  Ed Falis  <falis@adacore.com>
8837
8838         * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
8839
8840 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
8841
8842         * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
8843         it is of type Root_Controlled. This action eliminates fields Prev and
8844         Next from type equality.
8845
8846 2011-08-04  Yannick Moy  <moy@adacore.com>
8847
8848         * lib-xref-alfa.adb: Correct typo.
8849
8850 2011-08-04  Matthew Heaney  <heaney@adacore.com>
8851
8852         * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
8853         component.
8854
8855 2011-08-04  Yannick Moy  <moy@adacore.com>
8856
8857         * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
8858         (Analyze_Pragma): allow static string expression for name of Test_Case,
8859         instead of simply string literals.
8860         * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
8861         expressions.
8862
8863 2011-08-04  Vincent Celier  <celier@adacore.com>
8864
8865         * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
8866         case suffixes to find truncated main sources.
8867
8868 2011-08-04  Tristan Gingold  <gingold@adacore.com>
8869
8870         * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
8871         s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
8872         (Compute_Current_Task): Ditto.
8873
8874 2011-08-04  Tristan Gingold  <gingold@adacore.com>
8875
8876         * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
8877
8878 2011-08-04  Yannick Moy  <moy@adacore.com>
8879
8880         * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
8881         library-level constant.
8882         (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
8883         * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
8884         used as selector of parameter association, in ALFA mode.
8885
8886 2011-08-04  Robert Dewar  <dewar@adacore.com>
8887
8888         * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
8889         s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
8890         reformatting.
8891
8892 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
8893
8894         * make.adb (Linking_Phase): Set source search path before calling
8895         gnatlink in CodePeer mode.
8896
8897 2011-08-04  Javier Miranda  <miranda@adacore.com>
8898
8899         * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
8900         Remove code which takes care of building TSDs.
8901         * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
8902         * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
8903         the accessibility check in VM targets.
8904         * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
8905         (Building_Static_DT): Now returns false for VM targets.
8906         (Build_VM_TSDs): Removed.
8907         (Expand_Interface_Conversion): Generate missing runtime check for
8908         conversions to interface types whose target type is unknown at compile
8909         time.
8910         (Make_VM_TSD): Add missing code to disable the generation of calls to
8911         Check_TSD if the tagged type is not defined at library level, or not
8912         has a representation clause specifying its external tag, or -gnatdQ is
8913         active.
8914         * exp_disp.ads (Build_VM_TSDs): Removed.
8915         (Make_VM_TSDs): Spec relocated from exp_disp.adb
8916         * sem_disp.adb (Check_Dispatching_Operation): No code required to
8917         register primitives in the dispatch tables in VM targets.
8918         * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
8919         initialization of class-wide interface objects in VM targets.
8920         (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
8921         of Make_DT).
8922
8923 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
8924
8925         * gnatlink.adb (Gnatlink): Correct missleading error message displayed
8926         when dotnet-ld cannot be found.
8927
8928 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
8929
8930         * bindgen.adb: Simplify significantly generation of binder body file in
8931         CodePeer mode.
8932         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
8933         when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
8934         not expanded).
8935
8936 2011-08-04  Yannick Moy  <moy@adacore.com>
8937
8938         * sem_prag.adb, sem.ads: Code cleanup.
8939
8940 2011-08-04  Tristan Gingold  <gingold@adacore.com>
8941
8942         * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
8943         * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
8944         results if possible.
8945         * s-stusta.adb (Print): Adjust after changes in s-stausa.
8946         * gnat_ugn.texi: Update dynamic stack usage section.
8947
8948 2011-08-04  Steve Baird  <baird@adacore.com>
8949
8950         * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
8951         Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
8952         contains only a call to the user-defined main subprogram.
8953         (Gen_Main_Ada) - If CodePeer_Mode is set, then
8954         call the "wrapper" subprogram instead of directly
8955         calling the user-defined main subprogram.
8956
8957 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
8958
8959         * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
8960         alternatives of a case statement for controlled objects. Rename local
8961         variable A to Dead_Alt.
8962         (Expand_N_If_Statement): Check the then and else statements of an if
8963         statement for controlled objects. Check the then statements of all
8964         elsif parts of an if statement for controlled objects.
8965         (Expand_N_Loop_Statement): Check the statements of a loop for controlled
8966         objects.
8967         * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
8968         detects a loop associated with the expansion of an array object.
8969         Augment the processing of the loop statements to account for a possible
8970         wrap done by Process_Statements_For_Controlled_Objects.
8971         * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
8972         statements and abortable part of an asynchronous select for controlled
8973         objects.
8974         (Expand_N_Conditional_Entry_Call): Check the else statements of a
8975         conditional entry call for controlled objects.
8976         (Expand_N_Selective_Accept): Check the alternatives of a selective
8977         accept for controlled objects.
8978         (Expand_N_Timed_Entry_Call): Check the entry call and delay
8979         alternatives of a timed entry call for controlled objects.
8980         * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
8981         exception handler for controlled objects.
8982         * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
8983         Add formal parameter Nested_Constructs along with its associated
8984         comment.
8985         (Requires_Cleanup_Actions (Node_Id)): Update all calls to
8986         Requires_Cleanup_Actions.
8987         (Process_Statements_For_Controlled_Objects): New routine.
8988         * exp_util.ads (Process_Statements_For_Controlled_Objects): New
8989         routine. Inspect a node which contains a non-handled sequence of
8990         statements for controlled objects. If such an object is found, the
8991         statements are wrapped in a block.
8992
8993 2011-08-04  Bob Duff  <duff@adacore.com>
8994
8995         * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
8996         need to compare with Class_Wide_Type (T2), in order to get at the
8997         original class-wide type node.
8998         * sem_type.ads (Covers): Improve the comment.
8999         * einfo.ads (Class_Wide_Type): Improve the comment.
9000         * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
9001         the type of the Deref.
9002
9003 2011-08-04  Yannick Moy  <moy@adacore.com>
9004
9005         * gnat_rm.texi: Document that Test_Case pragma can only appear on
9006         separate declarations.
9007         * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
9008         check identifier of pragma argument.
9009         (Chain_TC): check that no other test case associated to the same entity
9010         share the same name.
9011         (Check_Test_Case): disallow test case inside subprogram body
9012         (Analyze_Pragma): correct call to check identifier and not argument
9013         * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
9014         function gets name from test case pragma.
9015
9016 2011-08-04  Yannick Moy  <moy@adacore.com>
9017
9018         * gnat_rm.texi: Document new pragma and aspect.
9019         * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
9020         (No_Duplicates_Allowed): new constant array defining whether duplicates
9021         aspects of each kind can appear on the same declaration.
9022         * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
9023         field, which points to a node holding the previous Spec_PPC_List.
9024         * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
9025         through the indirection with Contract.
9026         * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
9027         * par-prag.adb (Prag): do nothing on Test_Case pragma
9028         * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
9029         be called directly.
9030         * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
9031         component Ensures of Test_Case.
9032         * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
9033         (Analyze_Generic_Subprogram_Declaration,
9034         Analyze_Subprogram_Instantiation,
9035         Analyze_Abstract_Subprogram_Declaration,
9036         Analyze_Subprogram_Body_Helper,
9037         Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
9038         insert contract in subprogram node at point of definition
9039         * sem_ch13.adb
9040         (Aspect_Loop): do not raise error on duplicate Test_Case aspect
9041         (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
9042         corresponding pragma
9043         (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
9044         * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
9045         similar to the analysis of pre/post
9046         (Derive_Subprogram): insert contract in subprogram node at point of
9047         derivation.
9048         * sem_prag.adb, sem_prag.ads
9049         (Check_Arg_Is_String_Literal, Check_Identifier):
9050         new checking procedures to be called in treatment of pragmas
9051         (Check_Test_Case): new procedure to check that a Test_Case aspect or
9052         pragma is well-formed. This does not check currently that 'Result is
9053         used only in the Ensures component of a Test_Case.
9054         (Analyze_Pragma): add case for Test_Case
9055         (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
9056         components of a Test_Case.
9057         (Preanalyze_TC_Args): new procedure to preanalyze the boolean
9058         expressions in the 3rd (and 4th if present) arguments of a Test_Case
9059         pragma, treated as spec expressions.
9060         (Sig_Flags): add value -1 for Test_Case.
9061         * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
9062         Get_Requires_From_Test_Case_Pragma): getters for both expression
9063         components of a Test_Case.
9064         * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
9065         indirection between an entry or [generic] subprogram entity and its
9066         pre/post + test-cases.
9067         (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
9068         get/set for fields of an N_Contract node.
9069         * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
9070         Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
9071         names and pragma for Test_Case.
9072         * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
9073
9074 2011-08-04  Vincent Celier  <celier@adacore.com>
9075
9076         * gnat_ugn.texi: Improve documentation of gnatmake switch
9077         --source-info-file=.
9078
9079 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
9080
9081         * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
9082         type). Initialize Atyp to the appropriate type which is later checked
9083         for completion. Rewrite the assertion associated with private type
9084         completion.
9085
9086 2011-08-04  Ed Falis  <falis@adacore.com>
9087
9088         * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
9089         initialize the number of CPUs.
9090
9091 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
9092
9093         * sem_type.adb (Disambiguate): New subsidiary routine
9094         In_Same_Declaration_List, to implement AI05-0020: a user-defined
9095         equality on an anonymous access type whose designated type is private
9096         does not lead to an ambiguity with the universal access equality
9097         operator in the body or child units of the defining package. The same
9098         is true for a multiplication operator on a private type completed with
9099         a fixed-point-type.
9100
9101 2011-08-04  Javier Miranda  <miranda@adacore.com>
9102
9103         * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
9104         (Normalize_Scalars_Config): Removed.
9105         * opt.adb
9106         (Register_Opt_Config_Switches): Remove registering config values of
9107         Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
9108         (Restore_Opt_Config_Switches): Remove code which restores the values of
9109         Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
9110         Init_Or_Norm_Scalars.
9111         (Save_Opt_Config_Switches): Remove code which saves values of
9112         Init_Or_Norm_Scalars and Normalize_Scalars.
9113         (Set_Opt_Config_Switches): Remove code which restores config values of
9114         Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
9115         Init_Or_Norm_Scalars.
9116
9117 2011-08-04  Yannick Moy  <moy@adacore.com>
9118
9119         * frontend.adb (Frontend): remove previous patch to avoid full
9120         qualification in ALFA mode.
9121         * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
9122         * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
9123         unique name for an entity, which could be used to identify the entity
9124         across compilation units.
9125
9126 2011-08-04  Thomas Quinot  <quinot@adacore.com>
9127
9128         * prj-env.adb
9129         (Initialize_Default_Project_Path): Add target specific directory
9130         ($prefix/$target/lib/gnat) in front of project path in all cases
9131         (making gnatmake's behaviour consistent with gprbuild).
9132         * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
9133         Pass target name from Sdefault to project subsystem.
9134         * gnatls.adb: Show new target specific default project directory.
9135
9136 2011-08-04  Johannes Kanig  <kanig@adacore.com>
9137
9138         * cstand.adb: Add Information to Identifier in Standard
9139         (Identifer_For): Set Entity to the corresponding entity
9140
9141 2011-08-04  Sergey Rybin  <rybin@adacore.com>
9142
9143         * gnat_ugn.texi: Update doc on gnatcheck.
9144
9145 2011-08-04  Yannick Moy  <moy@adacore.com>
9146
9147         * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
9148         xrefs in a scope.
9149
9150 2011-08-04  Yannick Moy  <moy@adacore.com>
9151
9152         * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
9153         performing expansion.
9154         * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
9155         Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
9156         it is not called in ALFA mode.
9157
9158 2011-08-04  Emmanuel Briot  <briot@adacore.com>
9159
9160         * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
9161         after all, so removed.
9162
9163 2011-08-04  Sergey Rybin  <rybin@adacore.com>
9164
9165         * vms_data.ads: Add missing VMS qualifiers.
9166
9167 2011-08-04  Emmanuel Briot  <briot@adacore.com>
9168
9169         * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
9170         the list of files on the command line after processing it through
9171         Complete_Mains.
9172
9173 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
9174
9175         * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
9176         processing for .NET/JVM. These targets can now benefit from
9177         Raise_From_Controlled_Operation and they share the same processing with
9178         standard targets.
9179         (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
9180         These targets need transient scopes in order to properly finalize short
9181         lived controlled objects.
9182         (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
9183          NET/JVM. These targets can now benefit from
9184         Raise_From_Controlled_Operation and they share the same processing with
9185         standard targets.
9186
9187 2011-08-04  Geert Bosch  <bosch@adacore.com>
9188
9189         * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
9190
9191 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
9192
9193         * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
9194         Expand_Record_Aggregate, to determine whether aggregate must be
9195         expanded into assignments. This is the case if the ancestor part is
9196         private, regarless of the setting of the flag Has_Private_Ancestor.
9197
9198 2011-08-04  Ed Falis  <falis@adacore.com>
9199
9200         * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
9201
9202 2011-08-04  Bob Duff  <duff@adacore.com>
9203
9204         * sinfo.ads: Fix comment.
9205
9206 2011-08-04  Steve Baird  <baird@adacore.com>
9207
9208         * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
9209         choose a package name in much the same way as is
9210         done for JGNAT when VM_Target /= No_VM, except that
9211         a slightly more distinctive prefix string is used.
9212
9213 2011-08-04  Emmanuel Briot  <briot@adacore.com>
9214
9215         * makeutl.adb (Complete_Mains): no longer accept unit names on the
9216         gnatmake command line.
9217         This behavior was never documented (and was supported only because of
9218         an early bug in the code). This case might lead to ambiguous cases
9219         (between unit names and truncated base names without suffixes).
9220
9221 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
9222
9223         * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
9224         Remove the external tag of a tagged type from the internal hash table.
9225         * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
9226         expanded usage of the routine. Strenghten the check for Is_Master. Add
9227         processing for tagged types.
9228         (Build_Finalizer): Create all the necessary lists used in finalizer
9229         creation when the processed context is a package that may contain
9230         tagged types.
9231         (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
9232         Requires_Cleanup_Actions.
9233         (Expand_N_Package_Body): Package bodies may need clean up code
9234         depending on whether they contain tagged types.
9235         (Expand_N_Package_Declaration): Package declarations may need clean up
9236         code depending on whether they contain tagged types.
9237         (Unregister_Tagged_Types): New routine. Search through a list of
9238         declarations or statements, looking for non-abstract Ada tagged types.
9239         For each such type, generate code to unregister the external tag.
9240         * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
9241         Requires_Cleanup_Actions.
9242         (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
9243         through a list of declarations or statements looking for non-abstract
9244         Ada tagged types or controlled objects.
9245         * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
9246         Requires_Cleanup_Actions.
9247         (Has_Controlled_Objects (List_Id, Boolean)): Removed.
9248         * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
9249         RE_Unit_Table.
9250
9251 2011-08-04  Vincent Celier  <celier@adacore.com>
9252
9253         * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
9254         has Ada sources, not project Project, because if the root project
9255         Project has no sources of its own, all projects will be deemed without
9256         sources.
9257
9258 2011-08-04  Gary Dismukes  <dismukes@adacore.com>
9259
9260         * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
9261         of the No_Param_Proc acc-to-subp type used for initialization of
9262         __gnat_finalize_library_objects so that it's declared at library level
9263         rather than nested inside of the adainit routine.
9264
9265 2011-08-04  Javier Miranda  <miranda@adacore.com>
9266
9267         * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
9268         if the tagged type has a representation clause which specifies its
9269         external tag.
9270
9271 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
9272
9273         * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
9274         Remove previous procedure with that name.
9275         * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
9276         when appropriate.
9277         * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
9278         subtype mark, the ancestor cannot have unknown discriminants.
9279         (Resolve_Record_Aggregate): if the type has invisible components
9280         because of a private ancestor, the aggregate is illegal.
9281
9282 2011-08-04  Vincent Celier  <celier@adacore.com>
9283
9284         * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
9285         account switches -gnat2005, -gnat12 and -gnat2012.
9286
9287 2011-08-04  Bob Duff  <duff@adacore.com>
9288
9289         * s-tasdeb.ads: Minor comment fix.
9290
9291 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
9292
9293         * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
9294         CodePeer mode.
9295         * switch.ads, switch.adb (Is_Language_Switch): New function.
9296
9297 2011-08-04  Vincent Celier  <celier@adacore.com>
9298
9299         * switch-c.adb: Minor comment addition.
9300
9301 2011-08-04  Vincent Celier  <celier@adacore.com>
9302
9303         * vms_conv.adb (Process_Argument): Fail graciously when qualifier
9304         ending with '=' is followed by a space (missing file name).
9305
9306 2011-08-04  Pascal Obry  <obry@adacore.com>
9307
9308         * g-regist.ads: Fix size of HKEY on x86_64-windows.
9309
9310 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
9311
9312         * sem_ch12.adb (Analyze_Associations): New routine
9313         Check_Overloaded_Formal_Subprogram to reject a formal package when
9314         there is a named association or a box initialisation for an overloaded
9315         formal subprogram of the corresponding generic.
9316
9317 2011-08-04  Yannick Moy  <moy@adacore.com>
9318
9319         * alfa.ads (ALFA_Xref_Record): add component for type of entity
9320         * get_alfa.adb, put_alfa.adb: Read and write new component of
9321         cross-reference.
9322         * lib-xref-alfa.adb (Collect_ALFA): generate new component.
9323
9324 2011-08-04  Pascal Obry  <obry@adacore.com>
9325
9326         * urealp.adb: Minor reformatting.
9327
9328 2011-08-04  Tristan Gingold  <gingold@adacore.com>
9329
9330         * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
9331         Handle the case when Cleanup_Protected_Object returns Empty.
9332
9333 2011-08-04  Yannick Moy  <moy@adacore.com>
9334
9335         * frontend.adb (Frontend): only qualify names in non-ALFA mode
9336
9337 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
9338
9339         * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
9340         call, ignore functions.
9341
9342 2011-08-04  Geert Bosch  <bosch@adacore.com>
9343
9344         * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
9345         point.
9346
9347 2011-08-04  Emmanuel Briot  <briot@adacore.com>
9348
9349         * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
9350         as an index for Builder'Switches. This conforms to the documentation.
9351         * make.adb (Insert_Project_Sources): avoid duplicate code
9352
9353 2011-08-04  Emmanuel Briot  <briot@adacore.com>
9354
9355         * makeutl.adb (Complete_Mains): if the user has passed a relative file
9356         name on the command line (for instance "../dummy"), never assume it can
9357         be a unit name.
9358
9359 2011-08-04  Tristan Gingold  <gingold@adacore.com>
9360
9361         * bindgen.adb: Remove code the reference or create the
9362         Break_Start/__gnat_break_start procedure.
9363         * s-stalib.adb (Break_Start): Removed.
9364
9365 2011-08-04  Emmanuel Briot  <briot@adacore.com>
9366
9367         * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
9368         shared with gprbuild.
9369
9370 2011-08-04  Yannick Moy  <moy@adacore.com>
9371
9372         * par-ch4.adb (P_Primary): preferentially issue an error message about
9373         a missing parenthesis arount a conditional or case expression in Ada
9374         2012 mode, if we detect that the alignment is not correct for a
9375         statement.
9376
9377 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
9378
9379         * exp_ch7.adb (Process_Declarations): Do not consider the result of a
9380         tag-to-class-wide conversion as needing finalization actions.
9381         * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
9382         a tag-to-class-wide conversion as needing finalization actions.
9383         (Is_Finalizable_Transient): The result of a tag-to-class-wide
9384         conversion does not need finalization actions.
9385         (Is_Tag_To_CW_Conversion): New routine.
9386         * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
9387         whether an object is the result of a tag-to-class-wide conversion.
9388
9389 2011-08-04  Yannick Moy  <moy@adacore.com>
9390
9391         * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
9392         the left-hand-side and right-hand-side of a conjunct are inserted when
9393         translating a pre- or postcondition
9394         * sem_ch6.adb: Correct typo in comment
9395
9396 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
9397
9398         * gnat_rm.texi: Ravenscar does not prohibit dependence on
9399         Unchecked_Conversion and Unchecked_Deallocation.
9400
9401 2011-08-04  Thomas Quinot  <quinot@adacore.com>
9402
9403         * make.adb: Minor reformatting.
9404
9405 2011-08-04  Emmanuel Briot  <briot@adacore.com>
9406
9407         * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
9408         sources in the project and its imported projects, but not in the whole
9409         tree.
9410
9411 2011-08-04  Emmanuel Briot  <briot@adacore.com>
9412
9413         * make.adb: Remove debug trace.
9414
9415 2011-08-04  Vincent Celier  <celier@adacore.com>
9416
9417         * makeutl.adb (Do_Complete): Get the absolute path name of a relative
9418         path in canonical form, to be able to compare path names on platforms
9419         such as Windows or Darwin.
9420
9421 2011-08-04  Thomas Quinot  <quinot@adacore.com>
9422
9423         * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
9424         For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
9425         * scos.ads: Update documentation accordingly.
9426         * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
9427         pragmas.
9428
9429 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
9430
9431         * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
9432         attribute only if prefix type is scalar.
9433
9434 2011-08-04  Emmanuel Briot  <briot@adacore.com>
9435
9436         * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
9437         in gnatmake for specifying mains on the command line that do not belong
9438         to the main project. These mains must currently all belong to the same
9439         project, though.
9440         (Ultimate_Extension_Of): removed, since duplicated
9441         Ultimate_Extending_Project.
9442
9443 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
9444
9445         * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
9446         instead.
9447         (CodePeer_Mode_String): New.
9448         (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
9449         CodePeer mode.
9450         (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
9451         * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
9452         mode, since no useful elaboration subprogram is needed by CodePeer.
9453         * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
9454         In this mode, compile binder file with -gnatC and do stop after this
9455         step.
9456
9457 2011-08-04  Vincent Celier  <celier@adacore.com>
9458
9459         * exp_ch7.adb: Minor comment fix.
9460
9461 2011-08-04  Robert Dewar  <dewar@adacore.com>
9462
9463         * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
9464         exp_ch4.adb, makeutl.adb: Minor reformatting.
9465
9466 2011-08-04  Emmanuel Briot  <briot@adacore.com>
9467
9468         * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
9469         Create several new subprograms to move code out of Make. This makes the
9470         code more readable, removes code duplication, and is a preparation work
9471         for adding support for aggregate projects.
9472
9473 2011-08-04  Tristan Gingold  <gingold@adacore.com>
9474
9475         * s-po32gl.ads, s-po32gl.adb: New files.
9476         * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
9477         * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
9478         (Build_Finalization_Collection): Use it.
9479         * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
9480         * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
9481         literals.
9482         * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
9483         * gcc-interface/Make-lang.in: Update dependencies.
9484
9485 2011-08-04  Emmanuel Briot  <briot@adacore.com>
9486
9487         * makeutl.adb (Complete_Mains): add support for specs with no suffix on
9488         the command line.
9489
9490 2011-08-04  Emmanuel Briot  <briot@adacore.com>
9491
9492         * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
9493         command line is not a file name, also check whether it could be a unit
9494         name.
9495
9496 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
9497
9498         * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
9499         the header of the finalization routine.
9500         If the unit has no finalizer but is a body whose spec has one, then
9501         generate the decrement of the elaboration entity only.
9502         If the unit has a finalizer and is a spec, then do not generate the
9503         decrement of the elaboration entity.
9504         (Gen_Finalize_Library_C): Likewise.
9505
9506 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
9507
9508         * exp_ch7.adb (Alignment_Of): New subsidiary routine.
9509         (Bounds_Size_Expression): Removed.
9510         (Double_Alignment_Of): New subsidiary routine.
9511         (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
9512         for a hole in the dope vector of unconstrained arrays due to different
9513         index and element alignments.
9514
9515 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
9516
9517         * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
9518         raise program_error because body has not been seen yet.
9519
9520 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
9521
9522         * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
9523         an unresolved name.
9524
9525 2011-08-04  Vincent Celier  <celier@adacore.com>
9526
9527         * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
9528
9529 2011-08-04  Yannick Moy  <moy@adacore.com>
9530
9531         * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
9532         * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
9533
9534 2011-08-04  Thomas Quinot  <quinot@adacore.com>
9535
9536         * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
9537         instantiation in RCI.
9538
9539 2011-08-04  Emmanuel Briot  <briot@adacore.com>
9540
9541         * make.adb: Share more code with gprbuild
9542
9543 2011-08-04  Emmanuel Briot  <briot@adacore.com>
9544
9545         * projects.texi: Added documentation for the IDE'Gnat project file
9546         attribute.
9547
9548 2011-08-04  Nicolas Roche  <roche@adacore.com>
9549
9550         * gnat_rm.texi: Minor editing.
9551
9552 2011-08-04  Javier Miranda  <miranda@adacore.com>
9553
9554         * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
9555         and the library case for VM targets.
9556         (Gen_Adainit_Ada): Likewise.
9557
9558 2011-08-04  Robert Dewar  <dewar@adacore.com>
9559
9560         * g-altive.ads: Minor comment updates.
9561         * prj-nmsc.adb: Minor reformatting.
9562
9563 2011-08-04  Javier Miranda  <miranda@adacore.com>
9564
9565         * opt.ads
9566         (Normalize_Scalars_Config): Value of the configuration switch set by
9567         pragma Normalize_Scalars when it appears in the gnat.adc file.
9568         (Normalize_Scalars): New field for record Config_Switches_Type. Used
9569         to save and restore settings of this pragma.
9570         * opt.adb
9571         (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
9572         Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
9573
9574 2011-08-04  Vincent Celier  <celier@adacore.com>
9575
9576         * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
9577
9578 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
9579
9580         * makeutl.adb: Minor reformatting.
9581
9582 2011-08-04  Olivier Hainque  <hainque@adacore.com>
9583
9584         * g-altive.ads: Update comments to reflect that only the soft
9585         binding is available today.
9586
9587 2011-08-04  Robert Dewar  <dewar@adacore.com>
9588
9589         * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
9590         makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
9591         * gcc-interface/Make-lang.in: Update dependencies.
9592
9593 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
9594
9595         * prj-env.adb: Remove local debug traces.
9596
9597 2011-08-04  Yannick Moy  <moy@adacore.com>
9598
9599         * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
9600         was used instead of Hi_OK, which could cause a read of an uninitialized
9601         value later on. Detected while working on the new warning.
9602         * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
9603         to local variable.
9604         * sem_ch5.adb (Analyze_Assignment): set the last assignment component
9605         in more cases, in order to detect more unreferenced values.
9606         * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
9607         object for expression, if any.
9608
9609 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
9610
9611         * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
9612         the operand types instead of the Esize.
9613
9614 2011-08-04  Steve Baird  <baird@adacore.com>
9615
9616         * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
9617         enable CodePeer_Mode.
9618         * bindusg.adb (Display): Add help message describing -P binder switch.
9619         * gnat_ugn.texi: Document -P binder switch.
9620         * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
9621         user-defined main program directly.
9622         (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
9623         user-defined main program in the context clause of the package body.
9624
9625 2011-08-04  Yannick Moy  <moy@adacore.com>
9626
9627         * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
9628         duplicate of Defining_Entity
9629         (Get_Unique_Entity_For_Decl): rename function into
9630         Unique_Defining_Entity
9631         * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
9632         (Formal_Proof_On): remove synthesized flag
9633         * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
9634         sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
9635         sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
9636         * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
9637         Annotate (Formal_Proof)
9638
9639 2011-08-04  Emmanuel Briot  <briot@adacore.com>
9640
9641         * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
9642         source files with non-standard naming schemes, in imported projects
9643
9644 2011-08-04  Emmanuel Briot  <briot@adacore.com>
9645
9646         * makeutl.adb (Complete_Mains): when a multi-unit source file is
9647         specified on the gprbuild command line, we need to compile all units
9648         within that file, not just the first one we find
9649         Fix error message for mains that are not found.
9650
9651 2011-08-04  Thomas Quinot  <quinot@adacore.com>
9652
9653         * sem_ch6.adb: Update comment.
9654         * sem_ch12.adb: Minor reformatting.
9655
9656 2011-08-04  Bob Duff  <duff@adacore.com>
9657
9658         * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
9659         Acceptor.Terminate_Alternative without locking Acceptor, which causes a
9660         race condition whose symptom is to fail to lock Parent. That, in turn,
9661         causes Parent.Awake_Count to be accessed without locking Parent, which
9662         causes another race condition whose symptom is that Parent.Awake_Count
9663         can be off by 1 (either too high or too low). The solution is to lock
9664         Parent unconditionally, and then lock Acceptor, before reading
9665         Acceptor.Terminate_Alternative.
9666
9667 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
9668
9669         * debug.adb: Update comment.
9670
9671 2011-08-04  Robert Dewar  <dewar@adacore.com>
9672
9673         * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
9674         sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
9675         exp_ch6.adb: Minor reformatting.
9676
9677 2011-08-04  Gary Dismukes  <dismukes@adacore.com>
9678
9679         * gnat_ugn.texi: Add sentence about the case of compile-time-detected
9680         checks for -gnateE.
9681
9682 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
9683
9684         * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
9685
9686 2011-08-04  Thomas Quinot  <quinot@adacore.com>
9687
9688         * sinfo.ads: Minor reformatting.
9689
9690 2011-08-04  Emmanuel Briot  <briot@adacore.com>
9691
9692         * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
9693         even if there is no location.
9694
9695 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
9696
9697         * sem_res.adb, sem_ch4.adb: move check for restriction
9698         No_Task_Hierarchy to resolve_allocator.
9699
9700 2011-08-04  Thomas Quinot  <quinot@adacore.com>
9701
9702         * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
9703         This flag of N_Pragma nodes is not used, remove it as well as all of
9704         the associated circuitry.
9705
9706 2011-08-04  Javier Miranda  <miranda@adacore.com>
9707
9708         * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
9709         runtime check on duplicated externa tags
9710         * debug.adb Document switch -gnatdQ.
9711
9712 2011-08-04  Gary Dismukes  <dismukes@adacore.com>
9713
9714         * a-fihema.ads: Minor typo fix.
9715
9716 2011-08-04  Yannick Moy  <moy@adacore.com>
9717
9718         * sem_ch10.adb: Minor comment update.
9719
9720 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
9721
9722         * einfo.adb: Update the node field usage to reflect the renaming of
9723         Return_Flag to Return_ Flag_Or_Transient_Decl.
9724         (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
9725         (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
9726         (Write_Field15_Name): Change Return_Flag to
9727         Return_Flag_Or_Transient_Decl.
9728         * einfo.ads: Rename node field Return_Flag to
9729         Return_Flag_Or_Transient_Decl. Update the associated comment and all
9730         occurrences in entities.
9731         (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
9732         associated Inline pragma.
9733         (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
9734         associated Inline pragma.
9735         * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
9736         routine.
9737         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
9738         Return_Flag and Set_Return_Flag.
9739         * exp_ch7.adb (Process_Declarations): Add code to recognize hook
9740         objects generated for controlled transients declared inside an
9741         Exception_With_Actions. Update the calls to Return_Flag.
9742         (Process_Object_Declaration): Add code to add a null guard for hook
9743         objects generated for controlled transients declared inside an
9744         Exception_With_Actions. Update related comment.
9745         * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
9746         objects generated for controlled transients declared inside an
9747         Exception_With_Actions. Update the calls to Return_Flag.
9748         * expander.adb (Expand): Add new case for N_Expression_With_Actions.
9749
9750 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
9751
9752         * sem_util.adb:(Wrong_Type): Improve error message on a one-element
9753         positional aggregate.
9754
9755 2011-08-04  Vincent Celier  <celier@adacore.com>
9756
9757         * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
9758         SLOC only for pragmas.
9759
9760 2011-08-04  Emmanuel Briot  <briot@adacore.com>
9761
9762         * projects.texi: Minor typo fix.
9763
9764 2011-08-04  Emmanuel Briot  <briot@adacore.com>
9765
9766         * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
9767         on case-sensitive file systems.
9768
9769 2011-08-04  Thomas Quinot  <quinot@adacore.com>
9770
9771         * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
9772         nested in a disabled pragma.
9773         * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
9774         enclosing pragma, if any, for X decisions.
9775
9776 2011-08-04  Thomas Quinot  <quinot@adacore.com>
9777
9778         * sem_prag.adb: Minor reformatting.
9779
9780 2011-08-04  Vincent Celier  <celier@adacore.com>
9781
9782         * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
9783         allowed in no run time mode.
9784
9785 2011-08-04  Vincent Celier  <celier@adacore.com>
9786
9787         * make.adb (Check): When -gnatc is used, check for the source file
9788         inside the ALI file with a canonical case file name.
9789
9790 2011-08-04  Emmanuel Briot  <briot@adacore.com>
9791
9792         * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
9793         overriding the separator.
9794
9795 2011-08-04  Robert Dewar  <dewar@adacore.com>
9796
9797         * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
9798         prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
9799
9800 2011-08-04  Robert Dewar  <dewar@adacore.com>
9801
9802         * gnat_rm.texi: Minor documentation fix for pragma Annotate.
9803
9804 2011-08-04  Yannick Moy  <moy@adacore.com>
9805
9806         * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
9807         'Result only appears in postcondition of function.
9808
9809 2011-08-04  Thomas Quinot  <quinot@adacore.com>
9810
9811         * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
9812         external tag, include the value of the external tag in the exception
9813         message.
9814
9815 2011-08-04  Yannick Moy  <moy@adacore.com>
9816
9817         * sem_attr.adb (Result): modify error message for misplaced 'Result
9818
9819 2011-08-04  Sergey Rybin  <rybin@adacore.com>
9820
9821         * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
9822         clear that the second argument must be an identifier.
9823
9824 2011-08-04  Thomas Quinot  <quinot@adacore.com>
9825
9826         * exp_ch9.adb (Build_Barrier_Function): When compiling with
9827         -fpreserve-control-flow, insert an IF statement on the barrier
9828         condition to ensure that a conditional branch instruction is generated.
9829
9830 2011-08-04  Emmanuel Briot  <briot@adacore.com>
9831
9832         * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
9833         (Processing_Flags.Ignore_Missing_With): new flag.
9834
9835 2011-08-04  Emmanuel Briot  <briot@adacore.com>
9836
9837         * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
9838         Source_List_File on case-insensitive systems where the file is actually
9839         on a case-sensitive file system (NFS,...).
9840
9841 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
9842
9843         * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
9844         function return contains a controlled [extension] aggregate and the
9845         return statement is not part of a handled sequence of statements, wrap
9846         the return in a block. This ensures that all controlled temporaries
9847         generated during aggregate resolution will be picked up by the
9848         finalization machinery.
9849
9850 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
9851
9852         * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
9853         components, freeze type before resolution, to ensure that default
9854         initializations are present for all components.
9855         * sem_res.adb (Resolve_Actuals): the designated object of an
9856         accces-to-constant type is a legal actual in a call to an
9857         initialization procedure.
9858
9859 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
9860
9861         * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
9862         N_Unchecked_Type_Conversion to the possible containers of a renamed
9863         transient variable.
9864
9865 2011-08-04  Yannick Moy  <moy@adacore.com>
9866
9867         * par-ch13.adb (Aspect_Specifications_Present): recognize
9868         "with Identifier'Class =>" as an aspect, so that a meaningful warning
9869         is issued in Strict mode.
9870         * par.adb: Fix typos in comments.
9871
9872 2011-08-04  Yannick Moy  <moy@adacore.com>
9873
9874         * sem_attr.adb (Result): modify error message to take into account Post
9875         aspect when compiling Ada 2012 (or newer) code.
9876
9877 2011-08-04  Nicolas Roche  <roche@adacore.com>
9878
9879         * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
9880         remove need for GCC exceptions.
9881
9882 2011-08-04  Vincent Celier  <celier@adacore.com>
9883
9884         * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
9885         project, not the source file name.
9886         * prj.adb (Find_Sources.Look_For_Sources): If the source has been
9887         excluded, continue looking. This excluded source will only be returned
9888         if there is no other source with the same base name that is not locally
9889         removed.
9890
9891 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
9892
9893         * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
9894         private and one of the operands is a real literal, use a qualified
9895         expression rather than a conversion which is not meaningful to the
9896         back-end.
9897
9898 2011-08-04  Yannick Moy  <moy@adacore.com>
9899
9900         * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
9901         corresponding aspect X'Class are allowed, proceed with analysis of the
9902         aspect instead of skipping it.
9903
9904 2011-08-04  Tristan Gingold  <gingold@adacore.com>
9905
9906         * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
9907         This will allow to have an Ada implementation for the subprogram.
9908
9909 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
9910
9911         * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
9912         completion and aspects are present, apply them to the entity for the
9913         type which is currently the partial view, but which is the one that
9914         will be frozen.
9915         * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
9916         applies to a partial view, indicate that the full view has predicates
9917         and delayed aspects.
9918         (Replace_Type_Reference): Handle properly predicates that apply to the
9919         full view of a private completion.
9920
9921 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
9922
9923         * layout.adb (Layout_Type): For composite types, do not set Esize.
9924         * freeze.adb (Set_Small_Size): Remove test on alignment and do not
9925         set Esize.
9926         (Size_Known): Look at the RM size of components instead of the Esize.
9927         (Freeze_Record_Type): Look at the RM size instead of the Esize to
9928         issue warning and activate Implicit_Packing.
9929         (Freeze_Entity): Likewise.  Do not issue a warning for alias/atomic
9930         if the Esize is not known.
9931         * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
9932         for elementary types only.
9933         (Analyze_Record_Representation_Clause): Look at the RM size instead
9934         of the Esize to issue errors.
9935         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
9936         is not known.
9937         <E_Record_Type>: Look at the RM size instead of the Esize.  Remove
9938         obsolete block.
9939         Look at the RM size instead of the Esize for types if the latter is
9940         not known.
9941         (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
9942
9943 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
9944
9945         * sem_type.adb: proper handling of equality not involving anonymous
9946         access types.
9947
9948 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
9949
9950         * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
9951         Vis_Decls. When creating a library-level finalizer for a package spec,
9952         both the declaration and body of the finalizer are inserted either in
9953         the visible or private declarations of the package spec.
9954
9955 2011-08-04  Javier Miranda  <miranda@adacore.com>
9956
9957         * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
9958         use of the full-view of a type when invoking Is_Ancestor.
9959         * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
9960         the full-view of private parents is requested, then use also the
9961         full-view of the parent of the first derivation.
9962
9963 2011-08-04  Tristan Gingold  <gingold@adacore.com>
9964
9965         * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
9966         instead of the locally imported procedure.
9967         * s-taprop-mingw.adb (Enter_Task): Ditto.
9968         * s-valrea.adb (Scan_Real): Ditto.
9969         * s-imgrea.adb (Set_Image_Real): Ditto.
9970         * s-flocon.ads: Make the package pure.
9971
9972 2011-08-04  Thomas Quinot  <quinot@adacore.com>
9973
9974         * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
9975         * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
9976         * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
9977         New subprogram, moved here from...
9978         * par.adb, par-ch5.adb (P_Statement_Name): ... here.
9979         * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
9980         rewriting of the last argument into a procedure call statement here...
9981         * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
9982         instead.
9983
9984 2011-08-04  Thomas Quinot  <quinot@adacore.com>
9985
9986         * par_sco.adb: Minor reformatting.
9987
9988 2011-08-04  Robert Dewar  <dewar@adacore.com>
9989
9990         * erroutc.adb: Minor reformatting.
9991
9992 2011-08-04  Thomas Quinot  <quinot@adacore.com>
9993
9994         * par_sco.adb: Comment update.
9995
9996 2011-08-04  Tristan Gingold  <gingold@adacore.com>
9997
9998         * s-flocon.ads: New file.
9999         * g-flocon.ads: Now a renaming of s-flocon.
10000         * Makefile.rtl: Add s-flocon.o
10001
10002 2011-08-04  Javier Miranda  <miranda@adacore.com>
10003
10004         * exp_strm.adb (Build_Array_Input_Function): if the array type is
10005         constrained, do not attempt to build a subtype of it.
10006
10007 2011-08-04  Yannick Moy  <moy@adacore.com>
10008
10009         * errout.ads Change comments: remove 'R'M as an example where quotes
10010         are needed; add ALFA as another case where quotes are not needed
10011         * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
10012         case where quotes are not needed.
10013         * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
10014         sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
10015         Remove all occurrences of 'A'L'F'A
10016
10017 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
10018
10019         * sem_ch13.adb: check legality of invariant pragma.
10020
10021 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
10022
10023         * bindgen.adb: Add comments.
10024
10025 2011-08-04  Yannick Moy  <moy@adacore.com>
10026
10027         * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
10028         synthesized flag.
10029         * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
10030         (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
10031
10032 2011-08-04  Robert Dewar  <dewar@adacore.com>
10033
10034         * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
10035         osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
10036         sem_ch13.adb, s-pooloc.adb: Minor reformatting.
10037
10038 2011-08-04  Thomas Quinot  <quinot@adacore.com>
10039
10040         * s-pooloc.ads, s-pooglo.ads: Minor reformatting
10041
10042 2011-08-04  Thomas Quinot  <quinot@adacore.com>
10043
10044         PR ada/47880
10045         * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
10046         allocated object.
10047
10048 2011-08-04  Robert Dewar  <dewar@adacore.com>
10049
10050         * einfo.ads, exp_ch4.adb: Minor reformatting.
10051
10052 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
10053
10054         * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
10055
10056 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
10057
10058         * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
10059         type in all cases to compute list of primitive operations, because full
10060         view may be an itype that is not attached to the list of declarations.
10061
10062 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
10063
10064         * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
10065         library has already been finalized.
10066         (Gen_Adafinal_C): Likewise.
10067         (Gen_Adainit_Ada): Generate an early return if the library has
10068         already been elaborated.
10069         (Gen_Adainit_C): Likewise.
10070         (Gen_Output_File_Ada): Generate an elaboration flag.
10071         (Gen_Output_File_C): Likewise.
10072
10073 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
10074
10075         * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
10076         Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
10077         built in the first place.
10078         (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
10079         for CodePeer because Finalize_Address was not built to begin with.
10080         * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
10081
10082 2011-08-04  Pascal Obry  <obry@adacore.com>
10083
10084         * adaint.c (__gnat_tmp_name): Use current process id to create temp
10085         filenames, this ensures unicity of filenames across processes.
10086
10087 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
10088
10089         * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
10090         Raise_Controlled to Raise_From_Controlled_Operation. Update the
10091         signature of Raise_From_Controlled_Operation by adding flag From_Abort.
10092         Add False as the actual to From_Abort in the generated call to
10093         Raise_From_Controlled_Operation.
10094
10095 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
10096
10097         * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
10098         so that the ali file name can be retrieved from outside of this package.
10099         * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
10100         doing nothing in the general case, but used to update the object file
10101         timestamp if directly generated by the backend.
10102         * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
10103         to a later time than the ali file one.
10104
10105 2011-08-04  Yannick Moy  <moy@adacore.com>
10106
10107         * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
10108         entities whose body contains an Annotate pragma which forces formal
10109         proof on this body.
10110         * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
10111         sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
10112         Mark_Non_ALFA_Subprogram to pass in a message and node.
10113         * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
10114         (Forma_Proof, On) which sets the flag Formal_Proof_On in the
10115         surrounding subprogram.
10116         * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
10117         Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
10118         as not in ALFA is annotated with Formal_Proof being On, then an error
10119         is issued based on the additional parameters for message and node.
10120         * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
10121         * gcc-interface/Make-lang.in: Update dependencies.
10122
10123 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
10124
10125         * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
10126         Finalize_Address when CodePeer is enabled.
10127
10128 2011-08-04  Pascal Obry  <obry@adacore.com>
10129
10130         * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
10131         the latter returns a pointer to a static buffer which is deallocated
10132         at the end of the routine.
10133
10134 2011-08-04  Yannick Moy  <moy@adacore.com>
10135
10136         * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
10137         after index creation; mark unconstrained base array type generated as
10138         being in/not in ALFA as well
10139         (Make_Index): mark subtype created as in/not in ALFA
10140         * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
10141         over a loop as in/not in ALFA, depending on its type and form of loop
10142         iteration.
10143
10144 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
10145
10146         * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
10147         directly to False on .NET and JVM.
10148
10149 2011-08-04  Yannick Moy  <moy@adacore.com>
10150
10151         * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
10152         constraint that subtype must come from source code to be in ALFA, so
10153         that anonymous subtypes can be in ALFA too.
10154
10155 2011-08-04  Yannick Moy  <moy@adacore.com>
10156
10157         * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
10158         reference for ALFA mode.
10159         * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
10160         procedure public so as to use it from formal verification back-end.
10161
10162 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
10163
10164         * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
10165         invalid checks of the Parameter, making Remove_Switch not working
10166         correctly.
10167
10168 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
10169
10170         * targparm.ads: Update header: no run-time exception is needed on this
10171         file.
10172
10173 2011-08-04  Vincent Celier  <celier@adacore.com>
10174
10175         * a-fihema.adb: Use System.IO instead of GNAT.IO
10176
10177 2011-08-04  Thomas Quinot  <quinot@adacore.com>
10178
10179         * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
10180         are forbidden in Compiler_Unit mode.
10181
10182 2011-08-04  Robert Dewar  <dewar@adacore.com>
10183
10184         * sem_util.adb: Minor reformatting.
10185
10186 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
10187
10188         * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
10189         library-level finalizers.
10190         (Gen_Finalize_Library_C): Update the import string for library-level
10191         finalizers.
10192         (Gen_Finalize_Library_Defs_C): Update the definition name of a
10193         library-level finalizer.
10194         * exp_ch7.adb: Remove with and use clauses for Stringt.
10195         (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
10196         Spec_Decl. Add local variable Body_Id. The names of library-level
10197         finalizers are now manually fully qualified and are no longer external.
10198         A single name is now capable of servicing .NET, JVM and non-VM targets.
10199         Pragma Export is no longer required to provide visibility for the name.
10200         (Create_Finalizer_String): Removed.
10201         (New_Finalizer_Name): New routine which mimics New_..._Name.
10202
10203 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
10204
10205         * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
10206         elaboration counter to Standard_Short_Integer.
10207         * sem_util.adb (Build_Elaboration_Entity): Likewise.
10208         * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
10209         (Gen_Elab_Externals_C): Likewise.
10210
10211 2011-08-04  Ed Falis  <falis@adacore.com>
10212
10213         * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
10214         system-vxworks-ppc.ads, system-vxworks-m68k.ads,
10215         system-vxworks-mips.ads, system-vxworks-x86.ads
10216         (Always_Compatible_Rep): set to False for all VxWorks targets.
10217
10218 2011-08-04  Robert Dewar  <dewar@adacore.com>
10219
10220         * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
10221         makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
10222         exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
10223         exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
10224         exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
10225         sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
10226         sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
10227         Minor reformatting and code reorganization.
10228
10229 2011-08-04  Emmanuel Briot  <briot@adacore.com>
10230
10231         * projects.texi: Added doc for aggregate projects.
10232
10233 2011-08-04  Emmanuel Briot  <briot@adacore.com>
10234
10235         * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
10236         Add support for overriding the Project_Path in aggregate projects.
10237
10238 2011-08-04  Robert Dewar  <dewar@adacore.com>
10239
10240         * a-cofove.ads: Minor reformatting.
10241
10242 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
10243
10244         * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
10245         on the generated code.
10246         (Build_Finalize_Statements): Update the comment on the generated code.
10247         (Build_Initialize_Statements): Update the comment on the generated code.
10248         (Build_Object_Declarations): Add local variable Result. The object
10249         declarations are now built in sequence.
10250         * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
10251         RE_Unit_Table.
10252
10253 2011-08-04  Robert Dewar  <dewar@adacore.com>
10254
10255         * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
10256
10257 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
10258
10259         * einfo.ads (Elaboration_Entity): Document new definition and use.
10260         (Elaboration_Entity_Required): Adjust to above change.
10261         * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
10262         * exp_ch12.adb: And with and use for Snames.
10263         (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
10264         * exp_util.adb (Set_Elaboration_Flag): Likewise.
10265         * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
10266         <Check_Unit_Name>: Deal with N_Expanded_Name.
10267         <Attribute_Elaborated>: Extend to all unit names.
10268         * sem_elab.adb: And with and use for Uintp.
10269         (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
10270         * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
10271         * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
10272         * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
10273         from Gen_Adainit_Ada.
10274         (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
10275         (Gen_Adafinal_Ada): Remove redundant test.  In the non-main program
10276         case, do not call System.Standard_Library.Adafinal; instead call
10277         finalize_library if needed.
10278         (Gen_Adafinal_C): Likewise.
10279         (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
10280         non-main program case.
10281         (Gen_Adainit_C): Generate a couple of external declarations here.
10282         In the main program case, set SSL.Finalize_Library_Objects.
10283         (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
10284         (Gen_Elab_Calls_C): Likewise.
10285         (Gen_Finalize_Library_Ada): Likewise.  Skip SAL interface units.
10286         (Gen_Finalize_Library_C): Likewise.  Generate a full function.
10287         (Gen_Main_C): Put back call to Ada_Final and don't finalize library
10288         objects here.
10289         (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
10290         if -a is specified.  Call Gen_Elab_Externals_Ada.  Move around call to
10291         Gen_Adafinal_Ada.
10292         (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
10293         if -a is specified.  Call Gen_Elab_Externals_C.  Remove useless couple
10294         of external declarations.  Call Gen_Finalize_Library_C.
10295
10296 2011-08-04  Emmanuel Briot  <briot@adacore.com>
10297
10298         * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
10299         Compute_Compilation_Phases): new subprogram.
10300         (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
10301         The number of mains as well as the various compilation phases that
10302         need to be run are now project tree specific, since various
10303         aggregated trees might have different requirements. In particular,
10304         they do not all require bind or link phases.
10305
10306 2011-08-04  Emmanuel Briot  <briot@adacore.com>
10307
10308         * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
10309         (Project_Tree_Appdata): New type.
10310         It is now possible to associate application-specific data to a project
10311         tree. In particular, this is used in the gprbuild builder to avoid a
10312         number of global tables and htables, especially now that there can be
10313         several project trees loaded at once because of aggregate projects.
10314         (Debug_Name): new procedure.
10315         * projects.texi: Clarify syntax of "**" for Source_Dirs
10316
10317 2011-08-03  Emmanuel Briot  <briot@adacore.com>
10318
10319         * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
10320         the "roots" for a main.
10321         (Fill_From_Project): add support for aggregate projects. Main units
10322         in aggregated projects are now automatically added in the list of
10323         files to build (although this fails later on in gprbuild, because
10324         these files are not using the root proejct tree, so this needs
10325         further cleanup)
10326         * gcc-interface/Make-lang.in: Update dependencies.
10327
10328 2011-08-03  Yannick Moy  <moy@adacore.com>
10329
10330         * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
10331         conditional expression in ALFA.
10332         * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
10333         expressions as not in ALFA.
10334
10335 2011-08-03  Robert Dewar  <dewar@adacore.com>
10336
10337         * a-cofove.adb: Minor reformatting.
10338
10339 2011-08-03  Emmanuel Briot  <briot@adacore.com>
10340
10341         * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
10342         (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
10343         gprbuild sources.
10344         These packages are more logically placed in the Queue package, since
10345         they manipulate the queue. It is also likely that they can be adapted
10346         for gnatmake, thus sharing more code.
10347         (Finish_Program, Fail_Program): moved from the gprbuild sources, so
10348         that we could move the above.
10349
10350 2011-08-03  Emmanuel Briot  <briot@adacore.com>
10351
10352         * errutil.adb (Finalize): clean up the list of error messages on exit.
10353         Calling this subprogram multiple times will no longer show duplicate
10354         error messages on stderr.
10355
10356 2011-08-03  Emmanuel Briot  <briot@adacore.com>
10357
10358         * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
10359         Getopt_Switches when we have already define a command line
10360         configuration.
10361
10362 2011-08-03  Yannick Moy  <moy@adacore.com>
10363
10364         * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
10365         in ALFA. Instead, they are considered as assertions to prove.
10366         * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
10367         nodes as not in ALFA. Instead, include conditional expressions in ALFA
10368         if they have no ELSE part, or if they occur in pre- and postconditions,
10369         where the Condition cannot have side-effects in ALFA
10370         (Analyze_Membership_Op): do not mark such nodes as not in ALFA
10371         (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
10372         Instead, include type conversion between scalar types in ALFA.
10373         * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
10374         if-and-only-if its type is in ALFA.
10375
10376 2011-08-03  Thomas Quinot  <quinot@adacore.com>
10377
10378         * scos.adb, get_scos.adb, put_scos.adb
10379         New code letter for decisions: G (entry guard)
10380         * par_sco.adb
10381         (Traverse_Subprogram_Body): Rename to...
10382         (Traverse_Subprogram_Or_Task_Body): New subrpogram.
10383         (Traverse_Protected_Body): New subprogram
10384         (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
10385         protected bodies and entry bodies.
10386
10387 2011-08-03  Yannick Moy  <moy@adacore.com>
10388
10389         * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
10390         entities with get/set subprograms, which is set on procedure entities
10391         generated by the compiler for a postcondition.
10392         * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
10393         * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
10394         entity for a declaration
10395         (Get_Unique_Entity_For_Decl): new function returning an entity which
10396         represents a declaration, so that matching spec and body have the same
10397         entity.
10398
10399 2011-08-03  Robert Dewar  <dewar@adacore.com>
10400
10401         * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
10402         a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
10403
10404 2011-08-03  Yannick Moy  <moy@adacore.com>
10405
10406         * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
10407         library-level because retriction No_Implicit_Dynamic_Code in the
10408         front-end prevents its definition as a local subprogram
10409         (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
10410         for reuse in other contexts
10411         (Traverse_Declarations_Or_Statements,
10412         Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
10413         Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
10414         procedures take a callback parameter to be called on all declarations
10415         * lib-xref.ads
10416         (Traverse_All_Compilation_Units): new generic function to traverse a
10417         compilation unit and call a callback parameter on all declarations
10418
10419 2011-08-03  Javier Miranda  <miranda@adacore.com>
10420
10421         * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
10422         in Java since they are always enclosed in a namespace that
10423         differentiates them, and overloaded entities are supported by the VM.
10424
10425 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
10426
10427         * checks.adb (Determine_Range): If a computed bound of an operation is
10428         outside the range of the base type of the expression, and overflow
10429         checks are enabled, the result is unknown and cannot be used for any
10430         subsequent constant folding.
10431         * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
10432         unknown, so is the result of the comparison.
10433
10434 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
10435
10436         * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
10437         From_Abort. When finalization was triggered by an abort, propagate
10438         Standard'Abort_Signal rather than Program_Error.
10439         * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
10440         From_Abort.
10441         * a-except.adb (Raise_From_Controlled_Operation): Add new formal
10442         From_Abort. When finalization was triggered by an abort, propagate
10443         Standard'Abort_Signal rather than Program_Error.
10444         * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
10445         From_Abort.
10446         * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
10447         Abort_Id. Update the calls to Build_Object_Declarations and
10448         Build_Raise_Statement to include Abort_Id.
10449         (Build_Adjust_Statements): New local variable Abort_Id. Update the
10450         calls to Build_Object_Declarations and Build_Raise_Statement to include
10451         Abort_Id.
10452         (Build_Finalize_Statements): New local variable Abort_Id. Update the
10453         calls to Build_Object_Declarations and Build_Raise_Statement to include
10454         Abort_Id.
10455         (Build_Components): Create an entity for Abort_Id when exceptions are
10456         allowed on the target.
10457         (Build_Finalizer): New local variable Abort_Id.
10458         (Build_Initialize_Statements): New local variable Abort_Id. Update the
10459         calls to Build_Object_Declarations and Build_Raise_Statement to include
10460         Abort_Id.
10461         (Build_Object_Declarations): Add new formal Abort_Id. Create the
10462         declaration of flag Abort_Id to preserve the original abort status
10463         before finalization code is executed.
10464         (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
10465         runtime routine Raise_From_Controlled_Operation.
10466         (Create_Finalizer): Update the call to Build_Raise_Statement to include
10467         Abort_Id. Update the call to Build_Object_Declarations to include
10468         Abort_Id. Update the layout of the finalizer body.
10469         (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
10470         (Process_Transient_Objects): New local variable Abort_Id. Remove the
10471         clunky code to create all flags and objects related to
10472         exception propagation and replace it with a call to
10473         Build_Object_Declarations. Update the call to Build_Raise_Statement to
10474         include Abort_Id.
10475         * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
10476         Add new formal Abort_Id and associated comment on its use.
10477         (Build_Raise_Statement): Add new formal Abort_Id and associated comment
10478         on its use.
10479         * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
10480         Remove the clunky code to create all flags and objects related to
10481         exception propagation and replace it with a call to
10482         Build_Object_Declarations. Update the call to Build_Raise_Statement.
10483
10484 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
10485
10486         * s-tassta.adb: Fix minor typos.
10487
10488 2011-08-03  Robert Dewar  <dewar@adacore.com>
10489
10490         * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
10491         lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
10492
10493 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
10494
10495         * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
10496         to packages. This ensures that the finalizer body will not end up
10497         inside the freeze node.
10498         (Process_Declarations): Add code to detect whether a freeze node has a
10499         nested finalization collection.
10500
10501 2011-08-03  Pascal Obry  <obry@adacore.com>
10502
10503         * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
10504         (Current_Session): Return a not null access to Session_Type.
10505         (Default_Session): Likewise.
10506
10507 2011-08-03  Robert Dewar  <dewar@adacore.com>
10508
10509         * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
10510         exp_ch3.adb, exp_ch3.ads: Minor reformatting.
10511
10512 2011-08-03  Pascal Obry  <obry@adacore.com>
10513
10514         * g-awk.ads: Minor comment fix.
10515
10516 2011-08-03  Sergey Rybin  <rybin@adacore.com>
10517
10518         * tree_io.ads (ASIS_Version_Number): Update because of the changes in
10519         the tree structure related to discriminant constraints.
10520         Original_Discriminant cannot be used any more for computing the
10521         defining name for the reference to a discriminant.
10522
10523 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
10524
10525         * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
10526         function is not visibly tagged, this is not a dispatching call and
10527         therfore is not Tag_Indeterminate, even if the function is marked as
10528         dispatching on result.
10529
10530 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
10531
10532         * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
10533         (Expand_N_Free_Statement): Add a guard to protect against run-times
10534         which do not support controlled types.
10535         * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
10536         against run-times which do not support controlled types.
10537         * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
10538         against run-times which do not support controlled types.
10539         * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
10540         against run-times which do not support controlled types.
10541         * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
10542         protect against run-times which do not support controlled types.
10543
10544 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
10545
10546         * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
10547         (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
10548
10549 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
10550
10551         * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
10552         modified in the source, to prevent spurious warnings when compiling
10553         with -gnatg.
10554
10555 2011-08-03  Thomas Quinot  <quinot@adacore.com>
10556
10557         * a-except-2005.adb: Minor reformatting.
10558
10559 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
10560
10561         * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
10562         is a renaming declaration in the private part of a package, do not emit
10563         a warning that the with_clause could be moved because the renaming may
10564         be used in the body or in a child unit.
10565
10566 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
10567
10568         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
10569         Propagate the Comes_From_Source attribute from the original return
10570         object to the renaming.
10571
10572 2011-08-03  Jose Ruiz  <ruiz@adacore.com>
10573
10574         * exp_ch7.adb (Build_Raise_Statement): Do not call
10575         Raise_From_Controlled_Operation when this routine is not present in
10576         the run-time library.
10577         (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
10578         libraries (Ravenscar), tasks are non-terminating, and protected objects
10579         and tasks can only appear at library level, so we do not want
10580         finalization of protected objects nor tasks.
10581         * exp_intr.adb: Minor clarification in comment.
10582         bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
10583         Gen_Output_File_C): Remove references to finalization of library-level
10584         objects when using restricted run-time libraries.
10585
10586 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
10587
10588         * sem_ch3.adb (Build_Discriminant_Constraints): Set
10589         Original_Discriminant only if the parent type is a generic formal.
10590
10591 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
10592
10593         * exp_ch13.adb: Add with and use clause for Targparm;
10594         (Expand_N_Free_Statement): Prevent the generation of a custom
10595         Deallocate on .NET/JVM targets since this requires pools and address
10596         arithmetic.
10597         * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
10598         .NET/JVM targets, attach the newly allocated object to the access
10599         type's finalization collection. Do not generate a call to
10600         Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
10601         exist in the runtime.
10602         (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
10603         create a custom Allocate for object that do not require initialization.
10604         Attach a newly allocated object to the access type's finalization
10605         collection on .NET/JVM.
10606         * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
10607         assignment of controlled types on .NET/JVM. The two hidden pointers
10608         Prev and Next and stored and later restored after the assignment takes
10609         place.
10610         * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
10611         kludge for .NET/JVM to recognize a particular piece of code coming from
10612         Heap_Management and change the call to Finalize into Deep_Finalize.
10613         * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
10614         finalization collections on .NET/JVM only for types derived from
10615         Controlled. Separate the association of storage pools with a collection
10616         and only allow it on non-.NET/JVM targets.
10617         (Make_Attach_Call): New routine.
10618         (Make_Detach_Call): New routine.
10619         (Process_Object_Declarations): Suppress the generation of
10620         build-in-place return object clean up code on .NET/JVM since it uses
10621         pools.
10622         * exp_ch7.ads (Make_Attach_Call): New routine.
10623         (Make_Detach_Call): New routine.
10624         * exp_intr.adb Add with and use clause for Targparm.
10625         (Expand_Unc_Deallocation): Detach a controlled object from a collection
10626         on .NET/JVM targets.
10627         * rtsfind.ads: Add entries RE_Attach, RE_Detach and
10628         RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
10629         * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
10630         names used in finalization.
10631
10632 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
10633
10634         * a-fihema.adb: Add with and use clauses for System.Soft_Links.
10635         (Attach, Detach): Lock the current task when chaining an object onto a
10636         collection.
10637
10638 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
10639
10640         * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
10641         Rewritten to create the message strings when the exception is not
10642         raised by an abort during finalization.
10643         * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
10644         Raise_From_Controlled_Operation and update its associated comment.
10645         * a-fihema.ads, a-fihema.adb: New GNAT unit.
10646         Ada.Finalization.Heap_Management provides key functionality
10647         associated with controlled objects on the heap, their creation,
10648         finalization and reclamation. Type Finalization_Collection is
10649         effectively a wrapper which sits ontop of a storage pool and performs
10650         all necessary bookkeeping for all the objects it contains. Each
10651         access-to-controlled or access-to-class-wide type receives a collection
10652         as part of its expansion. The compiler generates buffer code and
10653         invokes Allocate / Deallocate to create and destroy allocated
10654         controlled objects.
10655         * a-finali.adb ("="): Removed.
10656         * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
10657         fields Prev and Next.
10658         * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
10659         A library unit with at least one controlled object on the library level
10660         has a special finalizer which is invoked by the binder. To signal this,
10661         ali files carry field PF.
10662         * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
10663         associated comment on field usage.
10664         * a-tags.adb (Get_RC_Offset): Removed.
10665         (Needs_Finalization): New routine.
10666         * a-tags.ads: Update the structure of the GNAT dispatch tables.
10667         Dispatch tables now carry field Needs_Finalization which provides
10668         runtime indication whether a type is controlled or has controlled
10669         components or both. Remove field RC_Offset.
10670         (Get_RC_Offset): Removed along with its associated pragma Export.
10671         Since tagged types with controlled components no longer carry hidden
10672         field _controller, the special mechanism to retrieve its location is no
10673         longer needed.
10674         (Needs_Finalization): New routine.
10675         * atree.ads, atree.adb (Elist24): New routine.
10676         (Set_Elist24): New routine.
10677         * atree.h: Add a define clause for Elist24.
10678         * bindgen.adb New library-level variable Lib_Final_Built.
10679         (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
10680         presence of a VM target, the routine generates calls to the proper
10681         library finalization routine.
10682         (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
10683         targets. Set the correct library finalization routine depending on
10684         whether the library has controlled objects or this is a VM compilation.
10685         (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
10686         to library-level finalizers of compiled units in reverse order of
10687         elaboration. It also produces exception management code and reraises a
10688         potential exception after all units have been finalized.
10689         (Gen_Finalize_Library_C): New routine. This procedure generates calls to
10690         library-level finalizers of compiled units in reverse order of
10691         elaboration.
10692         (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
10693         definitions of all library-level finalizers available to the compilation
10694         (Gen_Main_Ada): Directly call Adafinal which now contails all target
10695         dependent code.
10696         (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
10697         System.Standard_Library.Adafinal directly. If the library needs
10698         finalization actions, create the sequence of finalization calls.
10699         (Gen_Output_File_Ada): Alphabetize local variables and constants.
10700         Generate a with clause for System.Soft_Links when compiling for a VM.
10701         Remove the code which imports System.Standard_Library.Adafinal as
10702         Do_Finalize. Generate the library finalization routine.
10703         (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
10704         If the library needs finalization actions, create all the definitions
10705         of library- level finalizers.
10706         (Has_Finalizer): New routine. Determines whether at least one compiled
10707         unit has a library-level finalizer.
10708         Add type Qualification_Mode.
10709         (Set_Unit_Name): Add a formal which controls the replacement of a dot.
10710         * einfo.adb: New usage of field 15 as Return_Flag.
10711         Remove Finalization_Chain_Entity from the usages of field 19.
10712         Remove Associated_Final_Chain from the usages of field 23.
10713         New usage of field 23 as Associated_Collection.
10714         New usage of field 24 as Finalizer.
10715         New usage of flag 252 as Is_Processed_Transient.
10716         (Associated_Final_Chain): Removed.
10717         (Associated_Collection): New routine.
10718         (Finalization_Chain_Entity): Removed.
10719         (Finalizer): New routine.
10720         (Is_Finalizer): New routine.
10721         (Is_Processed_Transient): New routine.
10722         (Return_Flag): New routine.
10723         (Set_Associated_Final_Chain): Removed.
10724         (Set_Associated_Collection): New routine.
10725         (Set_Finalization_Chain_Entity): Removed.
10726         (Set_Finalizer): New routine.
10727         (Set_Is_Processed_Transient): New routine.
10728         (Set_Return_Flag): New routine.
10729         (Write_Entity_Flags): Include Is_Processed_Transient to the list of
10730         displayed flags.
10731         (Write_Field8_Name): Alphabetize the output.
10732         (Write_Field11_Name): Alphabetize the output.
10733         (Write_Field12_Name): Alphabetize the output.
10734         (Write_Field13_Name): Alphabetize the output.
10735         (Write_Field14_Name): Alphabetize the output.
10736         (Write_Field15_Name): Alphabetize the output.
10737         (Write_Field16_Name): Alphabetize the output.
10738         (Write_Field17_Name): Alphabetize the output.
10739         (Write_Field18_Name): Alphabetize the output.
10740         (Write_Field19_Name): Alphabetize the output. Remove the output of
10741         Finalization_Chain_Entity.
10742         (Write_Field20_Name): Alphabetize the output.
10743         (Write_Field21_Name): Alphabetize the output.
10744         (Write_Field22_Name): Alphabetize the output.
10745         (Write_Field23_Name): Alphabetize the output. Remove the output of
10746         Associated_Final_Chain. Add output for Associated_Collection.
10747         (Write_Field24_Name): Alphabetize the output.
10748         (Write_Field25_Name): Add output for Finalizer.
10749         (Write_Field26_Name): Alphabetize the output.
10750         (Write_Field27_Name): Alphabetize the output.
10751         (Write_Field28_Name): Alphabetize the output.
10752         * einfo.ads: Add new field description for Associated_Collection and
10753         its uses in nodes.
10754         Remove Associated_Final_Chain and its uses in nodes.
10755         Remove Finalization_Chain_Entity and its uses in nodes.
10756         Add new field description for Finalizer and its uses in nodes.
10757         Add new synthesized attribute Is_Finalizer.
10758         Add new flag description for Is_Processed_Transient and its uses in
10759         nodes.
10760         Add new field description for Return_Flag and its uses in nodes.
10761         (Associated_Final_Chain): Removed along with its pragma Inline.
10762         (Associated_Collection): New routine and pragma Inline.
10763         (Finalization_Chain_Entity): Removed along with its pragma Inline.
10764         (Finalizer): New routine and pragma Inline.
10765         (Is_Finalizer): New routine and pragma Inline.
10766         (Is_Processed_Transient): New routine and pragma Inline.
10767         (Return_Flag): New routine and pragma Inline.
10768         (Set_Associated_Final_Chain): Removed along with its pragma Inline.
10769         (Set_Associated_Collection): New routine and pragma Inline.
10770         (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
10771         (Set_Finalizer): New routine and pragma Inline.
10772         (Set_Is_Processed_Transient): New routine and pragma Inline.
10773         (Set_Return_Flag): New routine and pragma Inline.
10774         * exp_aggr.adb: Alphabetize subprograms.
10775         (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
10776         (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
10777         associated comments. Remove local variables External_Final_List and
10778         Attach.
10779         Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
10780         Ancestor. Remove the retrieval of finalization lists. Update the call to
10781         Make_Adjust_Call.
10782         (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
10783         lists. Update the call to Late_Expansion.
10784         (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
10785         (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
10786         (Gen_Assign): Remove the retrieval of the finalization list used to
10787         build the assignment. Update the calls to Make_Init_Call and
10788         Make_Adjust_Call.
10789         (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
10790         Remove the mechanism to determine attachment levels and finalization
10791         list retrieval. Remove the processing for coextensions.
10792         (Init_Controller): Removed. Controllers no longer exist.
10793         (Late_Expansion): Remove formals Flist and Obj along with their
10794         associated comments. Update the calls to Build_Record_Aggr_Code and
10795         Build_Array_Aggr_Code.
10796         * exp_ch13.adb (Expand_N_Free_Statement): New routine.
10797         (Expand_N_Freeze_Entity): Add special processing for finalizers which
10798         appear in entry bodies, protected subprograms and task bodies.
10799         * exp_ch13.ads (Expand_N_Free_Statement): New routine.
10800         * exp_ch3.adb (Add_Final_Chain): Removed.
10801         (Build_Array_Init_Proc): Alphabetize local variables.
10802         (Build_Assignment): Alphabetize local variables. Update the call to
10803         Maked_Adjust_Call.
10804         (Build_Class_Wide_Master): Rename local variables to better reflect
10805         their role.
10806         (Build_Discriminant_Assignments): Code reformatting.
10807         (Build_Init_Call_Thru): Code reformatting.
10808         (Build_Init_Procedure): Code reformatting. Generate a special version
10809         of Deep_Finalize which is capable of finalizing all initialized
10810         components and ignore the rest.
10811         (Build_Init_Statements): Rename local variables to better reflect their
10812         role.
10813         Reimplement the mechanism to include the creation and update of an index
10814         variable called a "counter". It is used as a bookmark for tracing
10815         initialized and non-initialized components.
10816         (Build_Initialization_Call): Remove local variable Controller_Typ.
10817         Alphabetize all local variables. Remove the initialization of the
10818         record controller and update the call to Make_Init_Call.
10819         (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
10820         New local variable Counter.
10821         (Constrain_Array): Alphabetize.
10822         (Expand_Freeze_Array_Type): Create a collection instead of a
10823         finalization list.
10824         (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
10825         Finalize_Address which is used in conjunction with allocated controlled
10826         objects.
10827         (Expand_N_Object_Declaration): Remove the creation of a finalization
10828         list for anonymous access types. Update the calls to Make_Init_Call and
10829         Make_Adjust_Call.
10830         (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
10831         retrieval of finalization lists. Remove the expansion of the record
10832         controller. Create TSS primitive Finalize_Address used in conjunction
10833         with controlled objects on the heap. Create finalization collections
10834         for access-to-controlled record components.
10835         (Expand_Record_Controller): Removed.
10836         (Freeze_Type): Remove the freezing of record controllers. Freezing of
10837         class-wide types now requires additional processing. Create
10838         finalization collections for access-to-controlled types.
10839         (Increment_Counter): New routine.
10840         (Make_Counter): New routine.
10841         (Make_Eq_If): Remove the mention of Name_uController.
10842         (Make_Predefined_Primitive_Specs): There is no longer need to skip
10843         types coming from System.Finalization_Root.
10844         (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
10845         (Predefined_Primitive_Bodies): There is no longer need to skip types
10846         coming from System.Finalization_Root.
10847         (Stream_Operation_OK): Do not generate stream routines for
10848         type Ada.Finalization.Heap_Management.Finalization_Collection.
10849         * exp_ch3.ads: Alphabetize subprograms.
10850         * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
10851         Add with and use clause for Lib.
10852         (Complete_Coextension_Finalization): Removed.
10853         (Complete_Controlled_Allocation): New routine. Create a finalization
10854         collection for anonymous access-to-controlled types. Create a custom
10855         Allocate which interfaces with the back end and the machinery in
10856         Heap_Management.
10857         (Expand_Allocator_Expression): Add necessary calls to
10858         Complete_Controlled_Allocation. Remove the retrieval of finalization
10859         lists. Update the calls to Make_Adjust_Call. Generate a call to
10860         Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
10861         the associated collection.
10862         (Expand_N_Allocator): Remove the processing for dynamic coextensions.
10863         Code clean up. Remove the retrieval of finalization lists and
10864         attachment levels.
10865         Update the call to Make_Init_Call. Generate a call to
10866         Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
10867         the associated collection.
10868         (Get_Allocator_Final_List): Removed. Finalization lists are not
10869         available.
10870         (Suitable_Element): Remove the mention of Name_uController.
10871         * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
10872         (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
10873         the left hand side, carry out the assignment and adjust the left hand
10874         side.
10875         * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
10876         (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
10877         (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
10878         BIP_Collection and BIPcollection.
10879         (Build_Heap_Allocator): New routine used to allocate the return object
10880         of a build-in-place function onto a collection.
10881         (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
10882         (Expand_Call): Do not replace direct calls to Deep routines with their
10883         aliases.
10884         (Expand_N_Extended_Return_Statement): Give all variables shorter names
10885         and update their occurrences. Add a special return flag to monitor the
10886         [ab]normal execution of the function. The flag is set right before the
10887         return statement.
10888         Rewrite the mechanism used to allocate a build-in-place return object
10889         on the heap or on a storage pool.
10890         (Is_Direct_Deep_Call): New routine.
10891         (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
10892         build-in-place function call instead of a final list. Build a call to
10893         Set_Finalize_Address_Ptr to decorate the associated collection.
10894         (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
10895         order to name the build-in-place function call's result for later
10896         finalization. Add a collection to a build-in-place function call
10897         instead of a final list.
10898         (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
10899         build-in-place function call instead of a final list. Remove the code
10900         which moves one final list and transforms it into the actual in a
10901         nested build-in-place call.
10902         (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
10903         build-in-place function call instead of a final list.
10904         (Move_Final_List): Removed.
10905         (Needs_BIP_Collection): New routine.
10906         (Needs_BIP_Final_List): Removed.
10907         * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
10908         enumeration type BIP_Formal_Kind.
10909         Update the related comment.
10910         (Needs_BIP_Collection): New routine.
10911         (Needs_BIP_Final_List): Removed.
10912         * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
10913         and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
10914         majority of subprograms in this unit. Add Name_Finalize_Address to
10915         array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
10916         (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
10917         statements for an array type.
10918         (Build_Adjust_Statements): Create the adjust statements for a record
10919         type.
10920         (Build_Cleanup_Statements): New routine. A procedure which given any
10921         construct containing asynchronous calls, references to _master, or is a
10922         task body, a task allocation or a protected body produces the necessary
10923         runtime calls to clean up these constructs.
10924         (Build_Exception_Handler): New routine.
10925         (Build_Final_List): Removed.
10926         (Build_Finalization_Collection): New routine. A core procedure which
10927         creates a collection to service heap allocated controlled objects
10928         associated with an access-to-controlled type.
10929         (Build_Finalize_Statements): Create the finalization statements for a
10930         record types.
10931         (Build_Finalizer): New routine. A core procedure which given any
10932         construct with declarations and/or statements detects all objects which
10933         need any type of clean up (controlled objects, protected objects) and
10934         generates all necessary code to clean up the said objects in the proper
10935         order.
10936         (Build_Finalizer_Call): New routine.
10937         (Build_Initialize_Statements): Create the initialization statements for
10938         an array type. The generated routine contains code to finalize partially
10939         initialized arrays.
10940         (Build_Object_Declarations): New routine.
10941         (Build_Raise_Statement): New routine.
10942         (Clean_Simple_Protected_Objects): Removed.
10943         (Controller_Component): Removed.
10944         (Enclosing_Function): New routine.
10945         (Expand_Cleanup_Actions): Create a finalizer for a construct which has
10946         either declarations or statements or both.
10947         (Expand_N_Package_Body): Create a finalizer for a non-generic package.
10948         (Expand_N_Package_Declaration): Create a finalizer for a non-generic
10949         package.
10950         (Find_Final_List): Removed.
10951         (Global_Flist_Ref): Removed.
10952         (In_Finalization_Root): Removed.
10953         (Insert_Actions_In_Scope_Around): Determine the range of the transient
10954         scope in terms of tree nodes. Process all transient variables within
10955         that range.
10956         (Make_Adjust_Call): Rewritten. There is no longer an attach call
10957         generated after the adjust.
10958         (Make_Attach_Call): Removed.
10959         (Make_Call): New routine.
10960         (Make_Clean): Removed.
10961         (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
10962         build routines.
10963         (Make_Deep_Proc): Rewritten to generate the new profile signature used
10964         in Deep routines.
10965         (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
10966         build routines.
10967         (Make_Final_Call): Modified to simply create a call to either
10968         Deep_Finalize or Finalize.
10969         (Make_Finalize_Address_Body): New routine.
10970         (Make_Finalize_Address_Stmts): New routine. A function which produces
10971         TSS primitive Finalize_Address used in conjunction with heap allocated
10972         controlled objects.
10973         (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
10974         (Make_Init_Call): Rewritten. There is no longer an attach call
10975         generated after initialization.
10976         (Make_Local_Deep_Finalize): New routine.
10977         (Make_Set_Finalize_Address_Ptr_Call): New routine.
10978         (Make_Transient_Block): Remove the finalization list retrieval and
10979         manipulation.
10980         (Needs_Finalization): Moved to Exp_Util.
10981         (Parent_Field_Type): New routine.
10982         (Preprocess_Components): New routine.
10983         (Process_Transient_Objects): New routine.
10984         (Wrap_HSS_In_Block): New routine.
10985         (Wrap_Transient_Declaration): Remove finalization list management and
10986         controller insertion.
10987         (Wrap_Transient_Expression): Code reformatting.
10988         (Wrap_Transient_Statement): Code reformatting.
10989         * exp_ch7.ads (Build_Final_List): Removed.
10990         (Build_Finalization_Collection): New routine.
10991         (Build_Raise_Statement): New routine.
10992         (Controller_Component): Removed.
10993         (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
10994         (Find_Final_List): Removed.
10995         (In_Finalization_Root): Removed.
10996         (Is_Simple_Protected_Type): Update related comment.
10997         (Make_Adjust_Call): New parameter profile and associated comments.
10998         (Make_Attach_Call): Removed.
10999         (Make_Final_Call): New parameter profile and associated comments.
11000         (Make_Finalize_Address_Body): New routine.
11001         (Make_Init_Call): New parameter profile and associated comments.
11002         (Make_Local_Deep_Finalize): New routine.
11003         (Make_Set_Finalize_Address_Ptr_Call): New routine.
11004         (Needs_Finalization): Moved to Exp_Util.
11005         * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
11006         (Expand_N_Protected_Body): Remove the handling of finalization lists.
11007         (Find_Protection_Type): Moved to Exp_Util.
11008         * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
11009         (Make_DT): Update sequence of dispatch table initialization. Remove the
11010         initialization of field RC_Offset. Add initialization of field Needs_
11011         Finalization.
11012         * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
11013         Reimplement how an object is first finalized, then deallocated.
11014         * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
11015         Code reformatting.
11016         * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
11017         Register TSS_Finalize_Address with type TSS_Names.
11018         * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
11019         procedure provides the interface between an allocation / deallocation
11020         and the support machinery in Ada.Finalization.Heap_Management.
11021         (Find_Init_Call): Code reformatting.
11022         (Find_Init_Call_In_List): Code reformatting.
11023         (Find_Protection_Type): Moved from Exp_Ch9.
11024         (Find_Prim_Op): Reimplement to add preference of recovered primitive.
11025         (Has_Controlled_Coextensions): Removed.
11026         (Has_Controlled_Objects): New routine.
11027         (In_Library_Level_Package_Body): New routine.
11028         (Insert_Action_After): New routine.
11029         (Is_Finalizable_Transient): New routine. This predicate determines
11030         whether an object declaration is one of the many variants of controlled
11031         transients.
11032         (Is_Null_Access_BIP_Func_Call): New routine.
11033         (Is_Non_BIP_Func_Call): New routine.
11034         (Is_Related_To_Func_Return): New routine.
11035         (Needs_Finalization): Moved from Exp_Ch7.
11036         * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
11037         (Find_Protection_Type): Moved from Exp_Ch9.
11038         (Has_Controlled_Coextensions): Removed.
11039         (Has_Controlled_Objects): New routine.
11040         (In_Library_Level_Package_Body): New routine.
11041         (Insert_Action_After): New routine.
11042         (Is_Finalizable_Transient): New routine.
11043         (Is_Null_Access_BIP_Func_Call): New routine.
11044         (Is_Non_BIP_Func_Call): New routine.
11045         (Is_Related_To_Func_Return): New routine.
11046         (Needs_Finalization): Moved from Exp_ch7.
11047         * expander.adb (Expand): Add a case for N_Free_Statement.
11048         * freeze.adb (Freeze_All): Replace the generation of a finalization
11049         list with a collection for access-to-controlled types.
11050         (Freeze_Entity): Code reformatting.
11051         (Freeze_Record_Type): Remove the freezing of a record controller
11052         component.
11053         (Freeze_Subprogram): Code reformatting.
11054         * inline.adb (Cleanup_Scopes): Remove the reset of the scope
11055         finalization list.
11056         * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
11057         has a library-level finalizer.
11058         * lib-writ.ads: Add "PF" to the sequence of unit attributes.
11059         * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
11060         * Makefile.rtl: Remove a-filico and s-finimp from the list of object
11061         files. Add a-fihema to the list of object files.
11062         * par-ch4.adb:
11063         Alphabetize the associations in type Is_Parameterless_Attribute.
11064         * rtsfind.ads: Ada.Finalization_List.Controller and
11065         System.Finalization_Implementation are no longer a GNAT unit.
11066         Update the range of type Ada_Finalization_Child. Remove the following
11067         recoverable entities:
11068
11069            RE_Attach_To_Final_List
11070            RE_Deep_Tag_Attach
11071            RE_Finalize_List
11072            RE_Finalize_One
11073            RE_Finalizable_Ptr_Ptr
11074            RE_Global_Final_List
11075            RE_Limited_Record_Controller
11076            RE_List_Controller
11077            RE_Move_Final_List
11078            RE_Record_Controller
11079            RE_Simple_List_Controller
11080
11081         Add the following recoverable entities:
11082
11083            RE_Add_Offset_To_Address
11084            RE_Allocate
11085            RE_Base_Pool
11086            RE_Deallocate
11087            RE_Exception_Identity
11088            RE_Finalization_Collection
11089            RE_Finalization_Collection_Ptr
11090            RE_Needs_Finalization
11091            RE_Save_Library_Occurrence
11092            RE_Set_Finalize_Address_Ptr
11093            RE_Set_Storage_Pool_Ptr
11094            RE_Storage_Count
11095         * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
11096         Name_uController.
11097         * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
11098         (First_Stored_Discriminant): Remove the mention of Name_uController.
11099         * sem_aux.ads: Comment reformatting.
11100         * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
11101         to redecorate an already existing class-wide type.
11102         (Decorate_Tagged_Type): New parameter profile and associated comment.
11103         Create a "shadow class-wide type" for a shadow entity.
11104         * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
11105         of the final chain along with the associated comment.
11106         * sem_ch3.adb (Access_Type_Declaration): Add new local variable
11107         Full_Desig and set it to the full view of the designated type.
11108         Initialize the finalization collection to empty.
11109         (Build_Derived_Record_Type): Alphabetize local variables. Code
11110         reformatting.
11111         (Collect_Fixed_Components): Remove the mention of Name_uController.
11112         (Create_Constrained_Components): Remove the mention of Name_uController.
11113         (Make_Class_Wide_Type): Add specialized code to redecorate an existing
11114         class-wide type of a shadow entity.
11115         (Process_Full_View): Update the machinery which marks type
11116         Limited_Controlled's entity as limited.
11117         * sem_ch4.adb (Analyze_One_Call): Code reformatting.
11118         * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
11119         list, instead make a collection build-in-place formal.
11120         * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
11121         a designated type in order to establish a match between the renaming
11122         and the renamed entity.
11123         (Find_Selected_Component): Add guard to prevent spurious exceptions
11124         from being raised on .NET/JVM.
11125         * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
11126         to the list of primitive that need special processing. Update arrays
11127         C_Names and D_Names.
11128         (Replace_Types): Handle class-wide types.
11129         * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
11130         different parameter profile, look at the first formal.
11131         * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
11132         use clauses for Exp_Util.
11133         * sem_res.adb: Remove with and use clauses for Elists.
11134         (Propagate_Coextensions): Removed.
11135         (Resolve_Allocator): Do not propagate the list of coextensions from one
11136         allocator to another.
11137         * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
11138         Deaccessed_T to Desig_Typ.
11139         (Enter_Name): Remove the mention of Name_uController.
11140         (Gather_Components): Remove the mention of Name_uController.
11141         (Incomplete_Or_Private_View): New routine.
11142         (Is_Coextension_Root): Removed.
11143         (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
11144         * sem_util.ads (Incomplete_Or_Private_View): New routine.
11145         (Is_Coextension_Root): Removed.
11146         * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
11147         Controlled types are now derived from a null tagged record. Remove
11148         types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
11149         * sinfo.adb (Coextensions): Removed.
11150         (Set_Coextensions): Removed.
11151         * sinfo.ads: Remove Coextensions from the explanation of node fields
11152         and its uses in nodes.
11153         Update the field usage of N_Allocator.
11154         (Coextensions): Removed along with its pragma Inline.
11155         (Set_Coextensions): Removed along with its pragma Inline.
11156         * snames.ads-tmpl: Remove names
11157
11158           Name_uClean
11159           Name_uController
11160           Name_uFinal_List
11161           Name_uLocal_Final_List
11162           Name_Finalization_Root
11163           Name_Next
11164           Name_Prev
11165
11166         Add names
11167
11168           Name_uFinalizer
11169           Name_Finalize_Address
11170         * s-pooglo.adb (Allocate): Add overriding indicator.
11171         (Deallocate): Add overriding indicator.
11172         (Storage_Size): Add overriding indicator.
11173         * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
11174         than Finalize_Global_List.
11175         (Null_Finalize_Global_List): Removed.
11176         (Save_Library_Occurrence): New routine.
11177         * s-soflin.ads: Remove variable Finalize_Global_List along with its
11178         initialization. Add variable Finalize_Library_Objects along with its
11179         pragma Export. Add variables Library_Exception and
11180         Library_Exception_Set along with their pragma Export.
11181         (Null_Finalize_Global_List): Removed.
11182         (Save_Library_Occurrence): New routine.
11183         * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
11184         rather than Finalize_Global_List.
11185         * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
11186         of the constructed node.
11187
11188 2011-08-03  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11189
11190         * link.c: Include "auto-host.h" before system headers.
11191
11192 2011-08-03  Vincent Celier  <celier@adacore.com>
11193
11194         * make.adb (Gnatmake): Add to table Library_Projs only library projects
11195         that are not extended. Do not check if a library project that is
11196         extended should be regenerated. Do not add to table Library_Paths the
11197         libraries that are in extended projects. Link only with libraries that
11198         are in libray projects that are not extended.
11199         * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
11200         for a library project that is extended.
11201
11202 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
11203
11204         * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
11205         conforming subprogram renamings that appear to be completions if they
11206         are not fully conformant.
11207         Such renamings are homographs but not completions.
11208         * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
11209         names in a subprogram renaming that appears in an instance.
11210
11211 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
11212
11213         * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
11214         not immutably limited, build actual subtype from expression to provide
11215         proper bounds to caller.
11216
11217 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
11218
11219         * sem_ch8.adb: Minor comment correction.
11220
11221 2011-08-03  Thomas Quinot  <quinot@adacore.com>
11222
11223         * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
11224         returning a limited array, use an extended return statement.
11225
11226 2011-08-03  Vincent Celier  <celier@adacore.com>
11227
11228         * make.adb (Initialize): If --subdirs= is used, but no project file is
11229         specified, attempt to create the specify subdir if it does not already
11230         exist and use it as the object directory as if -D had been specified.
11231
11232 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
11233
11234         * s-tpopsp-vms.adb: New file.
11235         * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
11236         * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
11237
11238 2011-08-03  Emmanuel Briot  <briot@adacore.com>
11239
11240         * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
11241         package.
11242
11243 2011-08-03  Yannick Moy  <moy@adacore.com>
11244
11245         * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
11246         * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
11247         * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
11248         detect that an array has static bounds.
11249
11250 2011-08-03  Thomas Quinot  <quinot@adacore.com>
11251
11252         * exp_dist.adb: Minor reformatting.
11253
11254 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
11255
11256         * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
11257         (ATCB_Key): Removed, not always used.
11258
11259 2011-08-03  Emmanuel Briot  <briot@adacore.com>
11260
11261         * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
11262         clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
11263         most remaining global variables.
11264
11265 2011-08-03  Robert Dewar  <dewar@adacore.com>
11266
11267         * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
11268         prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
11269         reformatting.
11270
11271 2011-08-03  Javier Miranda  <miranda@adacore.com>
11272
11273         * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
11274         that must be passed by copy in VM targets.
11275
11276 2011-08-03  Emmanuel Briot  <briot@adacore.com>
11277
11278         * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
11279         duplicates a similar htable now in the project tree.
11280
11281 2011-08-03  Claire Dross  <dross@adacore.com>
11282
11283         * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
11284         a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
11285         Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
11286         Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
11287         Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
11288         Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
11289         Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
11290         update.
11291
11292 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
11293
11294         * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
11295         (ATCB_Key): Removed, not always used.
11296         * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
11297         s-taprop-posix.adb.
11298         * s-tpopsp-tls.adb: New file.
11299         * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
11300         x86/x64/ia64/powerpc/sparc Linux.
11301
11302 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
11303
11304         * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
11305         * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
11306
11307 2011-08-03  Thomas Quinot  <quinot@adacore.com>
11308
11309         * rtsfind.ads, exp_dist.adb, exp_dist.ads
11310         (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
11311         Fix type selection for mapping integer types to PolyORB types.
11312
11313 2011-08-03  Bob Duff  <duff@adacore.com>
11314
11315         * sem_ch7.adb: Minor comment clarification.
11316
11317 2011-08-03  Bob Duff  <duff@adacore.com>
11318
11319         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
11320         an error analyzing a choice, skip further processing. Further
11321         processing could cause a crash or cascade errors.
11322
11323 2011-08-03  Emmanuel Briot  <briot@adacore.com>
11324
11325         * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
11326         prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
11327         prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
11328         prj-env.ads (Shared_Project_Tree_Data): new type
11329         An aggregate project and its aggregated trees need to share the common
11330         data structures used for lists of strings, packages,... This makes the
11331         code simpler since otherwise we have to pass the root tree (also used
11332         for the configuration file data) in addition to the current project
11333         tree. This also avoids ambiguities as to which tree should be used.
11334         And finally this saves a bit of memory.
11335         (For_Every_Project_Imported): new parameter Tree.
11336         Since aggregated projects are using a different tree, we need to let
11337         the caller know which tree to use to manipulate the returned project.
11338
11339 2011-08-03  Robert Dewar  <dewar@adacore.com>
11340
11341         * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
11342         prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
11343         lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
11344         prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
11345
11346 2011-08-03  Javier Miranda  <miranda@adacore.com>
11347
11348         * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
11349         Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
11350
11351 2011-08-03  Bob Duff  <duff@adacore.com>
11352
11353         * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
11354         the Base_Type.
11355
11356 2011-08-03  Joel Brobecker  <brobecker@adacore.com brobecker>
11357
11358         * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
11359         g-sehash.ads: Fix typo. Update header.
11360
11361 2011-08-03  Thomas Quinot  <quinot@adacore.com>
11362
11363         * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
11364         expansion.
11365
11366 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
11367
11368         * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
11369         prefixes of private types along with records, since the selector may be
11370         a discriminant.
11371         * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
11372         private types along with records, since the selector may be a
11373         discriminant.
11374
11375 2011-08-03  Emmanuel Briot  <briot@adacore.com>
11376
11377         * prj-pp.adb (Pretty_Print): Remove trailing blank line.
11378
11379 2011-08-03  Javier Miranda  <miranda@adacore.com>
11380
11381         * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
11382         Tagged_Type_Expansion.
11383
11384 2011-08-03  Yannick Moy  <moy@adacore.com>
11385
11386         * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
11387         violation when the argument of concatenation is the name of a
11388         constant.
11389
11390 2011-08-03  Emmanuel Briot  <briot@adacore.com>
11391
11392         * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
11393         prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
11394         (Process_Declarative_Items): new parameter Child_Env.
11395
11396 2011-08-03  Yannick Moy  <moy@adacore.com>
11397
11398         * alfa.ads: Update format of ALFA section in ALI file in order to
11399         add a mapping from bodies to specs when both are present.
11400         (ALFA_Scope_Record): Add components for spec file/scope.
11401         * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
11402         present.
11403         * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
11404         collected, fill in the spec information when relevant.
11405         * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
11406         present.
11407
11408 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
11409
11410         * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
11411         code unit to decide whether to add internally generated subprograms.
11412
11413 2011-08-03  Javier Miranda  <miranda@adacore.com>
11414
11415         * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
11416         * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
11417         be handled by copy in VM targets.
11418
11419 2011-08-03  Emmanuel Briot  <briot@adacore.com>
11420
11421         * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
11422         code with Makeutl.Get_Switches.
11423         * prj-tree.adb: Update comment.
11424
11425 2011-08-03  Thomas Quinot  <quinot@adacore.com>
11426
11427         * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
11428         subprogram with a limited formal that does not support external
11429         streaming.
11430
11431 2011-08-03  Yannick Moy  <moy@adacore.com>
11432
11433         * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
11434         continuation line
11435         * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
11436         not from current unit in two phases, because it is not possible to
11437         change the table while iterating over its content.
11438         * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
11439
11440 2011-08-03  Sergey Rybin  <rybin@adacore.com>
11441
11442         * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
11443         * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
11444
11445 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
11446
11447         * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
11448         and the component type is composite, this is ambiguous for predefined
11449         concatenation, but if the node is not overloaded and the entity is a use
11450         -defined function its profile can be used to resolve that aggregate.
11451
11452 2011-08-03  Robert Dewar  <dewar@adacore.com>
11453
11454         * exp_ch4.adb: Minor code cleanup.
11455
11456 2011-08-03  Thomas Quinot  <quinot@adacore.com>
11457
11458         * exp_dist.adb: Do not generate distribution stubs if serious errors
11459         have been diagnosed.
11460
11461 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
11462
11463         * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
11464         the first formal of a primitive operation, go to the base type to
11465         handle properly an access to a derived type with constrained
11466         discriminants.
11467         * sem_type.adb (Disambiguate): an immediately visible operator hides a
11468         user-defined function that is only use-visible.
11469
11470 2011-08-03  Robert Dewar  <dewar@adacore.com>
11471
11472         * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
11473         make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
11474         fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
11475         prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
11476         sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
11477         prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
11478         prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
11479         alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
11480
11481 2011-08-03  Robert Dewar  <dewar@adacore.com>
11482
11483         * repinfo.adb (List_Mechanism): Add handling of
11484         Convention_Ada_Pass_By_XXX.
11485         * sem_mech.adb (Set_Mechanism): Ditto.
11486         * sem_prag.adb (Process_Convention): Add entries for
11487         Convention_Ada_Pass_By_XXX.
11488         * snames.adb-tmpl, snames.ads-tmpl: Ditto.
11489
11490 2011-08-03  Pascal Obry  <obry@adacore.com>
11491
11492         * makeutl.adb: Minor reformatting.
11493
11494 2011-08-03  Vincent Celier  <celier@adacore.com>
11495
11496         * fname-uf.adb
11497         (Get_File_Name) If the file cannot be found when there are no config
11498         pragmas file and May_Fail is True, return No_File instead of the file
11499         name, to be consistent.
11500
11501 2011-08-03  Pascal Obry  <obry@adacore.com>
11502
11503         * adaint.c (__gnat_is_executable_file_attr): Avoid access
11504         to null pointer.
11505
11506 2011-08-03  Javier Miranda  <miranda@adacore.com>
11507
11508         * sem_ch13.adb
11509         (Same_Representation): In VM targets the representation of arrays with
11510         aliased components differs from arrays with non-aliased components.
11511
11512 2011-08-03  Emmanuel Briot  <briot@adacore.com>
11513
11514         * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
11515         not systematically lower case attribute indexes that contain no "."
11516         Fix definition of several Naming attributes, which take
11517         a unit name as index and therefore should be case insensitive.
11518         Minor refactoring (reduce length of variable names).
11519
11520 2011-08-03  Emmanuel Briot  <briot@adacore.com>
11521
11522         * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
11523
11524 2011-08-03  Emmanuel Briot  <briot@adacore.com>
11525
11526         * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
11527         prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
11528         prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
11529         prj-tree.ads (Prj.Tree.Environment): new type.
11530
11531 2011-08-03  Emmanuel Briot  <briot@adacore.com>
11532
11533         * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
11534         prj-tree.adb, prj-tree.ads (Environment): new type.
11535
11536 2011-08-03  Emmanuel Briot  <briot@adacore.com>
11537
11538         * prj-tree.ads: Remove unused variable.
11539
11540 2011-08-03  Yannick Moy  <moy@adacore.com>
11541
11542         * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
11543         issuing messages related to SPARK restriction violation.
11544
11545 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
11546
11547         * sem_ch6.adb: guard against error nodes in return statements.
11548
11549 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
11550
11551         * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
11552         a warning can only appear on a configuration file, so emit warning
11553         without further checks.
11554
11555 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
11556
11557         * s-interr.ads: add overriding keyword.
11558
11559 2011-08-03  Geert Bosch  <bosch@adacore.com>
11560
11561         * exp_attr.adb: Fix minor typo.
11562
11563 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
11564
11565         * par-ch4.adb: improve error recovery.
11566
11567 2011-08-03  Emmanuel Briot  <briot@adacore.com>
11568
11569         * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
11570         prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
11571         to Errout_Handling.
11572
11573 2011-08-03  Emmanuel Briot  <briot@adacore.com>
11574
11575         * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
11576         "external" as an attribute name in aggregate projects.
11577
11578 2011-08-03  Jose Ruiz  <ruiz@adacore.com>
11579
11580         * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
11581         uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
11582         from 0, so we need to adjust.
11583
11584 2011-08-03  Emmanuel Briot  <briot@adacore.com>
11585
11586         * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
11587         prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
11588
11589 2011-08-03  Yannick Moy  <moy@adacore.com>
11590
11591         * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
11592         restriction on overloaded entity if the entity is not an operator.
11593
11594 2011-08-03  Yannick Moy  <moy@adacore.com>
11595
11596         * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
11597         restrict.ads: Rename remaining Check_Formal_Restriction* into
11598         Check_SPARK_Restriction*.
11599
11600 2011-08-03  Emmanuel Briot  <briot@adacore.com>
11601
11602         * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
11603         prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
11604         qualifier.
11605         (Project_Empty): removed
11606         (Empty_Project): new parameter Qualifier
11607         This is used to have fields specific to aggregate projects, cleaner
11608         New field to store the list of aggregated projects.
11609         (Check_Aggregate_Project): removed
11610         (Process_Aggregated_Projects, Free): new subprograms.
11611
11612 2011-08-03  Olivier Hainque  <hainque@adacore.com>
11613
11614         * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
11615
11616 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
11617
11618         * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
11619         explicit dereference of an unconstrained type, create a constrained
11620         subtype for it, as is done for function calls that return an
11621         unconstrained type.
11622
11623 2011-08-03  Thomas Quinot  <quinot@adacore.com>
11624
11625         * g-pehage.adb (Finalize): Avoid possible double-free.
11626
11627 2011-08-03  Steve Baird  <baird@adacore.com>
11628
11629         * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
11630         Elab_Spec/Body attrs in CodePeer_Mode.
11631
11632 2011-08-03  Javier Miranda  <miranda@adacore.com>
11633
11634         * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
11635         low bound is not known at compile time but they have no others choice.
11636         Done because in this case the bounds can be obtained directly from the
11637         aggregate.
11638
11639 2011-08-03  Ed Falis  <falis@adacore.com>
11640
11641         * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
11642         on VxWorks SMP. Remove unusable constant ANY_CPU.
11643
11644 2011-08-03  Emmanuel Briot  <briot@adacore.com>
11645
11646         * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
11647         clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
11648         prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
11649         Prj.Env.Initialize_Empty): new subprograms
11650         (Get_Env, Find_Project): remove parameter Target_Name.
11651
11652 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
11653
11654         * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
11655         as a condition for the delayed call to Derived_Subprograms done for the
11656         case of the rewriting of a derived type that constrains the
11657         discriminants of its parent type.
11658         Avoids redundant subprogram derivations for private subtype derivations.
11659
11660 2011-08-03  Javier Miranda  <miranda@adacore.com>
11661
11662         * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
11663         Build_Record_Aggr_Code.
11664         (Build_Record_Aggr_Code): Add missing support to initialize hidden
11665         discriminants in extension aggregates.
11666
11667 2011-08-03  Emmanuel Briot  <briot@adacore.com>
11668
11669         * prj-pp.adb (Print): also output project qualifiers, since in
11670         particular "aggregate" is mandatory in an aggregate project.
11671
11672 2011-08-03  Emmanuel Briot  <briot@adacore.com>
11673
11674         * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
11675         (Debug_Output): new function.
11676
11677 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
11678
11679         * gnat_ugn.texi: Document -Wstack-usage.
11680         * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
11681
11682 2011-08-03  Thomas Quinot  <quinot@adacore.com>
11683
11684         * sem_prag.adb Issue an error (not a warning) when a C++ type does not
11685         have keyword LIMITED.
11686
11687 2011-08-03  Yannick Moy  <moy@adacore.com>
11688
11689         * alfa.adb, alfa.ads, alfa_test.adb: New files.
11690         * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
11691         (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
11692         section (does not happen in compiler, only if code directly calls
11693         Scan_ALI).
11694         * get_alfa.adb, get_alfa.ads: New files.
11695         * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
11696         needed.
11697         * lib-xref-alfa.adb: New file.
11698         * lib-xref.adb, lib-xref.ads
11699         (Xref_Entry): redefine information needed in cross-references for ALFA.
11700         Push ALFA treatments in separated local package.
11701         (Enclosing_Subpragram_Or_Package): treat specially subprogram
11702         identifiers. Return entity of package body instead of spec. Return
11703         Empty for a scope with no location.
11704         (Generate_Reference): adapt to new components for ALFA information.
11705         Remove the need for D references on definitions.
11706         (Is_Local_Reference): moved to ALFA local package
11707         (Output_References): extract subfunction as Extract_Source_Name
11708         (Output_Local_References): remove procedure, replaced by filtering of
11709         cross-references in package ALFA and printing in Put_ALFA.
11710         (Write_Entity_Name): remove procedure
11711         * lib.adb, lib.ads (Extract_Source_Name): extract here function to
11712         print exact name of entity as it appears in source file
11713         (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
11714         * put_alfa.adb, put_alfa.ads: New files.
11715         * xref_lib.adb (Search_Xref): protect read of cross-references against
11716         reading other sections of the ALI file, in gnatxref
11717         (Search): protect read of cross-references against reading other
11718         sections of the ALI file, in gnatfind.
11719         * gcc-interface/Make-lang.in: Update dependencies.
11720
11721 2011-08-03  Thomas Quinot  <quinot@adacore.com>
11722
11723         * sem_ch3.adb: Minor reformatting.
11724
11725 2011-08-03  Jose Ruiz  <ruiz@adacore.com>
11726
11727         * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
11728         raising an exception.
11729
11730 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
11731
11732         * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
11733         type, always use 1 as the lower bound or string, even if lower bound of
11734         context is not static, to handle properly null strings in a non-static
11735         context.
11736
11737 2011-08-03  Bob Duff  <duff@adacore.com>
11738
11739         * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
11740         always legal on the right-hand side of an assignment statement; there
11741         is always an applicable index constraint in this case. Therefore, the
11742         check for Pkind = N_Assignment_Statement is now unconditional -- it
11743         doesn't depend on whether Is_Constrained (Typ).
11744
11745 2011-08-03  Robert Dewar  <dewar@adacore.com>
11746
11747         * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
11748
11749 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
11750
11751         * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
11752         for an itype created within a generic unit.
11753
11754 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
11755
11756         * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
11757         suppresses all inlining.
11758
11759 2011-08-03  Robert Dewar  <dewar@adacore.com>
11760
11761         * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
11762         exp_aggr.adb: Minor reformatting.
11763
11764 2011-08-03  Thomas Quinot  <quinot@adacore.com>
11765
11766         * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
11767         tagged assignment when discriminant checks are suppressed. This is
11768         useless and extremely costly in terms of static stack usage.
11769
11770 2011-08-03  Bob Duff  <duff@adacore.com>
11771
11772         * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
11773         of generics, because this leads to the wrong entity in the wrong scope,
11774         causing (e.g.) pragma Export_Procedure to get an error if the entity is
11775         an instance.
11776         (Process_Interface_Name): Follow Alias for instances of generics, to
11777         correct for the above change.
11778
11779 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
11780
11781         * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
11782         is an integer literal it is always safe to replace the reference. In
11783         addition, if the reference appears in the generated code for an object
11784         declaration it is necessary to copy because otherwise the reference
11785         might be to the uninitilized value of the discriminant of the object
11786         itself.
11787
11788 2011-08-03  Pascal Obry  <obry@adacore.com>
11789
11790         * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
11791         ACL used, in this case we want to check for ending .exe, not .exe
11792         anywhere in the path.
11793
11794 2011-08-03  Sergey Rybin  <rybin@adacore.com>
11795
11796         * tree_io.ads (ASIS_Version_Number): Update because of the changes in
11797         the tree structure (semantic decoration of references to record
11798         discriminants).
11799
11800 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
11801
11802         * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
11803         choices of a named array aggregate, bail out when any choices are
11804         marked as Errors_Posted.
11805
11806 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
11807
11808         * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
11809         in which entity is frozen, to handle properly loop variables in
11810         iterators.
11811
11812 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
11813
11814         * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
11815         subtype is not static, compute the upper bound using attributes, to
11816         handle properly index types that are not integer types.
11817
11818 2011-08-03  Bob Duff  <duff@adacore.com>
11819
11820         * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
11821         Update copyright notice.
11822
11823 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
11824
11825         * sem_ch3.adb (Build_Discriminant_Constraints): Only use
11826         Original_Discriminant if within an instance.
11827         * sem_ch4.adb (Analyze_Selected_Component): Ditto.
11828
11829 2011-08-03  Thomas Quinot  <quinot@adacore.com>
11830
11831         * einfo.ads: Minor reformatting.
11832
11833 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
11834
11835         * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
11836         composite type with an unfrozen subcomponent, in the profile of a
11837         primitive operation.
11838
11839 2011-08-03  Robert Dewar  <dewar@adacore.com>
11840
11841         * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
11842
11843 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
11844
11845         * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
11846         unconstrained type with discriminants is initialized with an aggregate,
11847         use the constrained subtype of the aggregate as the type of the object,
11848         because it is immutable, and this allows the back-end to generate no
11849         code for the object declaration.
11850
11851 2011-08-03  Robert Dewar  <dewar@adacore.com>
11852
11853         * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
11854         comparison operand is variable, and turns out to be zero or negative.
11855
11856 2011-08-03  Javier Miranda  <miranda@adacore.com>
11857
11858         * exp_intr.adb
11859         (Expand_Dispatching_Constructor_Call): Disable expansion of
11860         code required for native targets. Done to avoid generating
11861         references to unavailable runtime entities in VM targets.
11862         * exp_ch3.adb
11863         (Expand_N_Object_Declaration): Add missing support to handle
11864         the explicit initialization of class-wide interface objects.
11865         Fix documentation.
11866
11867 2011-08-03  Matthew Heaney  <heaney@adacore.com>
11868
11869         * a-cobove.adb (Merge): Move source onto target, instead of using
11870         Assign.
11871
11872 2011-08-03  Matthew Heaney  <heaney@adacore.com>
11873
11874         * a-cbdlli.adb (Splice): Move source items from first to last.
11875
11876 2011-08-03  Yannick Moy  <moy@adacore.com>
11877
11878         * sem_util.ads: Add comment.
11879
11880 2011-08-03  Javier Miranda  <miranda@adacore.com>
11881
11882         * exp_aggr.adb
11883         (Expand_Record_Aggregate): In VM targets disable the expansion into
11884         assignments of aggregates whose type is not known at compile time.
11885
11886 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
11887
11888         * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
11889         protected entries and task entries, to build the proper renaming
11890         declaration for entry formals, used in debugging.
11891         * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
11892         parameters in the same way.
11893
11894 2011-08-02  Robert Dewar  <dewar@adacore.com>
11895
11896         * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
11897         sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
11898         code reorganization.
11899
11900 2011-08-02  Robert Dewar  <dewar@adacore.com>
11901
11902         * debug.adb: Debug flag d.P to suppress length comparison optimization
11903         * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
11904         comparison of Length by comparing First/Last instead.
11905
11906 2011-08-02  Matthew Heaney  <heaney@adacore.com>
11907
11908         * a-cobove.ads: Code clean up.
11909
11910 2011-08-02  Vincent Celier  <celier@adacore.com>
11911
11912         * adaint.c (file_names_case_sensitive_cache): New static int.
11913         (__gnat_get_file_names_case_sensitive): Cache the return value in
11914         file_names_case_sensitive_cache at the first invocation, to avoid
11915         multiple calls to getenv.
11916
11917 2011-08-02  Bob Duff  <duff@adacore.com>
11918
11919         * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
11920
11921 2011-08-02  Yannick Moy  <moy@adacore.com>
11922
11923         * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
11924         sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
11925         sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
11926         indicate that we are in a precondition or postcondition. This is used in
11927         Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
11928         decide whether to flag the spec or body of the current subprogram as
11929         not in ALFA.
11930
11931 2011-08-02  Fabien Chouteau  <chouteau@adacore.com>
11932
11933         * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
11934         list.
11935         * a-extiin.ads: New file.
11936
11937 2011-08-02  Bob Duff  <duff@adacore.com>
11938
11939         * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
11940         now raises Name_Error instead of Use_Error in certain cases. The other
11941         parts of this AI were already implemented properly.
11942
11943 2011-08-02  Vincent Celier  <celier@adacore.com>
11944
11945         * link.c: Only import "auto-host.h" when building the gnattools.
11946
11947 2011-08-02  Yannick Moy  <moy@adacore.com>
11948
11949         * sem_util.adb: Inter-unit inlining does not work for a subprogram
11950         which calls a local subprogram, so extract subprogram
11951         from Mark_Non_ALFA_Subprogram_Body.
11952
11953 2011-08-02  Javier Miranda  <miranda@adacore.com>
11954
11955         * exp_ch9.adb
11956         (Extract_Dispatching_Call): If the type of the dispatching object is an
11957         access type then return an explicit dereference in the Object out-mode
11958         parameter.
11959
11960 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
11961
11962         * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
11963         compatibility checks for all indexes of an array subtype, not just the
11964         first. Reset Has_Dynamic_Range_Check on the subtype before each
11965         potential check to ensure that Insert_Range_Checks will not elide any
11966         of the dynamic checks.
11967
11968 2011-08-02  Yannick Moy  <moy@adacore.com>
11969
11970         * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
11971         SPARK restriction at parsing time.
11972         * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
11973         directive only if the SPARK restriction is set for this unit.
11974
11975 2011-08-02  Yannick Moy  <moy@adacore.com>
11976
11977         * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
11978         sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
11979         sem_ch11.adb: Protect call to Current_Subprogram which might be costly
11980         when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
11981         Mark_Non_ALFA_Subprogram_Body.
11982         Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
11983         inlined.
11984
11985 2011-08-02  Yannick Moy  <moy@adacore.com>
11986
11987         * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
11988         might be costly.
11989
11990 2011-08-02  Robert Dewar  <dewar@adacore.com>
11991
11992         * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
11993         exp_ch3.adb: Minor reformatting.
11994
11995 2011-08-02  Emmanuel Briot  <briot@adacore.com>
11996
11997         * adaint.c (__gnat_locate_exec_on_path): only returns executable
11998         files, not any regular file.
11999         (__gnat_locate_file_with_predicate): new subprogram.
12000
12001 2011-08-02  Yannick Moy  <moy@adacore.com>
12002
12003         * sinfo.adb, sinfo.ads: Restrict the use of flags
12004         Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
12005         nodes, plus N_Subtype_Declaration for the 2nd one.
12006
12007 2011-08-02  Sergey Rybin  <rybin@adacore.com>
12008
12009         * gnat_rm.texi: Ramification of pragma Eliminate documentation
12010          - fix bugs in the description of Source_Trace;
12011          - get rid of UNIT_NAME;
12012
12013 2011-08-02  Javier Miranda  <miranda@adacore.com>
12014
12015         * exp_ch9.adb
12016         (Build_Dispatching_Requeue): Adding support for VM targets
12017         since we cannot directly reference the Tag entity.
12018         * exp_sel.adb (Build_K): Adding support for VM targets.
12019         (Build_S_Assignment): Adding support for VM targets.
12020         * exp_disp.adb
12021         (Default_Prim_Op_Position): In VM targets do not restrict availability
12022         of predefined interface primitives to compiling in Ada 2005 mode.
12023         (Is_Predefined_Interface_Primitive): In VM targets this service is not
12024         restricted to compiling in Ada 2005 mode.
12025         (Make_VM_TSD): Generate code that declares and initializes the OSD
12026         record. Needed to support dispatching calls through synchronized
12027         interfaces.
12028         * exp_ch3.adb
12029         (Make_Predefined_Primitive_Specs): Enable generation of predefined
12030         primitives associated with synchronized interfaces.
12031         (Make_Predefined_Primitive_Bodies): Enable generation of predefined
12032         primitives associated with synchronized interfaces.
12033
12034 2011-08-02  Yannick Moy  <moy@adacore.com>
12035
12036         * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
12037         statements hidden in SPARK if preceded by the HIDE directive
12038         (Parse_Exception_Handlers): mark each exception handler in a sequence of
12039         exception handlers as hidden in SPARK if preceded by the HIDE directive
12040         * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
12041         if starting with the HIDE directive
12042         * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
12043         starting with the HIDE directive; mark the declarations in a private
12044         part as hidden in SPARK if the private part starts with the HIDE
12045         directive
12046         * restrict.adb, restrict.ads
12047         (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
12048         (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
12049         argument node belongs to a part which is hidden in SPARK
12050         (Check_SPARK_Restriction): do not issue violations on nodes in hidden
12051         parts in SPARK; protect the possibly costly call to
12052         Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
12053         * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
12054         * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
12055         Accumulate_Token_Checksum_GNAT_5_03): add case for new token
12056         Tok_SPARK_Hide.
12057         (Scan): recognize special comment starting with '#' and followed by
12058         SPARK keyword "hide" as a HIDE directive.
12059
12060 2011-08-02  Yannick Moy  <moy@adacore.com>
12061
12062         * types.ads, erroutc.ads: Minor reformatting.
12063
12064 2011-08-02  Vincent Celier  <celier@adacore.com>
12065
12066         * link.c: Add response file support for cross platforms.
12067
12068 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
12069
12070         * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
12071         in an association, set parent field of copy before partial analysis.
12072         * sem_res.adb (Resolve_Slice): create reference to itype only when
12073         expansion is enabled.
12074
12075 2011-08-02  Yannick Moy  <moy@adacore.com>
12076
12077         * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
12078         for new flag denoting which subprogram bodies are in ALFA
12079         * restrict.adb, sem_ch7.adb: Update comment
12080         * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
12081         sem_ch9.adb, sem_res.adb: Add calls to
12082         Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
12083         * sem_ch6.adb (Analyze_Function_Return): add calls to
12084         Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
12085         middle of the body, and extended return.
12086         (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
12087         False when missing return.
12088         (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
12089         to True for subprograms whose spec is in ALFA. Remove later on the flag
12090         on the entity used for a subprogram body when there exists a separate
12091         declaration.
12092         * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
12093         if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
12094         False, otherwise do nothing.
12095
12096 2011-08-02  Robert Dewar  <dewar@adacore.com>
12097
12098         * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
12099
12100 2011-08-02  Yannick Moy  <moy@adacore.com>
12101
12102         * sem_ch4.ads: minor formatting.
12103
12104 2011-08-02  Yannick Moy  <moy@adacore.com>
12105
12106         * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
12107         debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
12108         errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
12109         restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
12110         opt.ads: cleanup of SPARK mode
12111
12112 2011-08-02  Yannick Moy  <moy@adacore.com>
12113
12114         * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
12115         types.
12116         * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
12117         (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
12118         * sem_ch3.adb
12119         (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
12120         (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
12121         (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
12122         (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
12123         types.
12124         (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
12125         non-static range.
12126         * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
12127         functions whose return type is not in ALFA.
12128         (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
12129         specifications.
12130         (Process_Formals): unset Is_In_ALFA flag for subprograms if a
12131         parameter's type is not in ALFA.
12132         * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
12133         types are in ALFA.
12134
12135 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
12136
12137         * sem_ch6 (Analyze_Expression_Function): treat the function as
12138         Inline_Always, and introduce a subprogram declaration for it when it is
12139         not a completion.
12140         * inline.adb (Add_Inlined_Body): recognize bodies that come from
12141         expression functions, so that the back-end can determine whether they
12142         can in fact be inlined.
12143         * sem_util.adb (Is_Expression_Function): predicate to determine whether
12144         a function body comes from an expression function.
12145
12146 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
12147
12148         * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
12149         null exclusions to test Can_Never_Be_Null on the anonymous access types
12150         of the formals rather than testing the formals themselves. Exclude this
12151         check in cases where the Old_Formal is marked as a controlling formal,
12152         to avoid issuing spurious errors for bodies completing dispatching
12153         operations (due to the flag not getting set on controlling access
12154         formals in body specs).
12155         (Find_Corresponding_Spec): When checking full and subtype conformance of
12156         subprogram bodies in instances, pass Designated and E in that order, for
12157         consistency with the expected order of the formals (New_Id followed by
12158         Old_Id).
12159
12160 2011-08-02  Robert Dewar  <dewar@adacore.com>
12161
12162         * sem_ch8.adb: Minor reformatting.
12163
12164 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
12165
12166         * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
12167         Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
12168         primitive operations of class-wide actuals.
12169
12170 2011-08-02  Javier Miranda  <miranda@adacore.com>
12171
12172         * exp_atag.ads, exp_atag.adb
12173         (Build_Common_Dispatching_Select_Statements): Remove argument Loc
12174         since its value is implicitly passed in argument Typ.
12175         * exp_disp.adb (Make_Disp_Conditional_Select_Body,
12176         Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
12177         Build_Common_Dispatching_Select_Statements.
12178
12179 2011-08-02  Robert Dewar  <dewar@adacore.com>
12180
12181         * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
12182         exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
12183         Minor reformatting.
12184
12185 2011-08-02  Robert Dewar  <dewar@adacore.com>
12186
12187         * sem_res.adb: Minor reformatting.
12188         * sem_prag.adb: Minor reformatting.
12189
12190 2011-08-02  Javier Miranda  <miranda@adacore.com>
12191
12192         * exp_atag.adb, exp_atags.ads
12193         (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
12194         by the tagged type Entity. Required to use this routine in the VM
12195         targets since we do not have available the Tag entity in the VM
12196         platforms.
12197         * exp_ch6.adb
12198         (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
12199         Ada.Tags has not been previously loaded.
12200         * exp_ch7.adb
12201         (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
12202         Build_VM_TSDs if package Ada.Tags has not been previously loaded.
12203         * sem_aux.adb
12204         (Enclosing_Dynamic_Scope): Add missing support to handle the full
12205         view of enclosing scopes. Required to handle enclosing scopes that
12206         are synchronized types whose full view is a task type.
12207         * exp_disp.adb
12208         (Build_VM_TSDs): Minor code improvement to avoid generating and
12209         analyzing lists with empty nodes.
12210         (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
12211         (Make_Disp_Conditional_Select_Body): Add support for VM targets.
12212         (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
12213         (Make_Disp_Timed_Select_Body): Add support for VM targets.
12214         (Make_Select_Specific_Data_Table): Add support for VM targets.
12215         (Make_VM_TSD): Generate code to initialize the SSD structure of
12216         the TSD.
12217
12218 2011-08-02  Yannick Moy  <moy@adacore.com>
12219
12220         * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
12221         cross-references section in ALI.
12222         * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
12223         (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
12224         Sub).
12225         (Enclosing_Subprogram_Or_Package): new function to return the enclosing
12226         subprogram or package entity of a node
12227         (Is_Local_Reference_Type): new function returns True for references
12228         selected in local cross-references.
12229         (Lt): function extracted from Lt in Output_References
12230         (Write_Entity_Name): function extracted from Output_References
12231         (Generate_Definition): generate reference with type 'D' for definition
12232         of objects (object declaration and parameter specification), with
12233         appropriate locations and units, for use in local cross-references.
12234         (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
12235         references of type 'I' for initialization in object definition.
12236         (Output_References): move part of function Lt and procedure
12237         Write_Entity_Name outside of the body. Ignore references of types 'D'
12238         and 'I' introduced for local cross-references.
12239         (Output_Local_References): new procedure to output the local
12240         cross-references sections.
12241         (Lref_Entity_Status): new array defining whether an entity is a local
12242         * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
12243         with 'I' type when initialization expression is present.
12244         * get_scos.adb, get_scos.ads: Correct comments and typos
12245
12246 2011-08-02  Javier Miranda  <miranda@adacore.com>
12247
12248         * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
12249         the JVM target.
12250         * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
12251         the JVM target.
12252         * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
12253         TSD support.
12254
12255 2011-08-02  Vincent Celier  <celier@adacore.com>
12256
12257         * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
12258         (No_Space_Img): New function
12259         (Find_Excluded_Sources): When reading from a file, record the file name
12260         and the line number for each excluded source.
12261         (Mark_Excluded_Sources): When reporting an error, if the excluded
12262         sources were read from a file, include file name and line number in
12263         the error message.
12264
12265 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
12266
12267         * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
12268
12269 2011-08-02  Robert Dewar  <dewar@adacore.com>
12270
12271         * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
12272
12273 2011-08-02  Javier Miranda  <miranda@adacore.com>
12274
12275         * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
12276         generation of TSDs to the DOTNET compiler.
12277         * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
12278         generation of TSDs to the DOTNET compiler.
12279
12280 2011-08-02  Javier Miranda  <miranda@adacore.com>
12281
12282         * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
12283         record of all the tagged types declared inside library level package
12284         declarations, library level package bodies or library level subprograms.
12285         * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
12286         associated with a given tagged type.
12287         (Build_VM_TSDs): New subprogram.
12288         * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
12289         compilation units that are subprograms.
12290         * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
12291         compilation units that are package bodies.
12292         (Expand_N_Package_Declaration): Generate TSDs of the main compilation
12293         units that are a package declaration or a package instantiation.
12294         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
12295         reorganization to improve the error generated by the frontend when the
12296         function Ada.Tags.Secondary_Tag is not available.
12297         * rtsfind.ads (RE_Register_TSD): New runtime entity.
12298         * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
12299
12300 2011-08-02  Javier Miranda  <miranda@adacore.com>
12301
12302         * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
12303
12304 2011-08-02  Robert Dewar  <dewar@adacore.com>
12305
12306         * s-imenne.ads: Minor reformatting.
12307
12308 2011-08-02  Robert Dewar  <dewar@adacore.com>
12309
12310         * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
12311         * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
12312         * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
12313
12314 2011-08-02  Robert Dewar  <dewar@adacore.com>
12315
12316         * einfo.ads (Materialize_Entity): Document this is only for renamings
12317         * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
12318         required debug information in the case where we transform the object
12319         declaration into a renaming declaration.
12320         * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
12321         object
12322         * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
12323         Materialize_Entity.
12324
12325 2011-08-02  Robert Dewar  <dewar@adacore.com>
12326
12327         * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
12328         Suppress_Init_Procs.
12329         * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
12330         Suppress_Initialization/Initialization_Suppressed.
12331         * gnat_rm.texi: New documentation for pragma Suppress_Initialization
12332         * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
12333         * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
12334         * sem_prag.adb: New processing for pragma Suppress_Initialization.
12335
12336 2011-08-02  Robert Dewar  <dewar@adacore.com>
12337
12338         * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
12339         Minor reformatting.
12340
12341 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
12342
12343         * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
12344         only have inheritable classwide pre/postconditions.
12345
12346 2011-08-02  Javier Miranda  <miranda@adacore.com>
12347
12348         * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
12349         * rtsfind.ads (RE_Check_TSD): New runtime entity.
12350         * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
12351         checks if the external tag of a type is the same as the external tag
12352         of some other declaration.
12353
12354 2011-08-02  Thomas Quinot  <quinot@adacore.com>
12355
12356         * s-taskin.ads: Minor reformatting.
12357
12358 2011-08-02  Emmanuel Briot  <briot@adacore.com>
12359
12360         * g-comlin.adb (Display_Help): swap the order in which it prints the
12361         short help and the general usage.
12362
12363 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
12364
12365         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
12366         the aspect declarations and attach them to the generic copy for
12367         subsequent analysis.
12368         (Analyze_Subprogram_Instantiation): copy explicitly the aspect
12369         declarations of the generic tree to the new subprogram declarations.
12370         * sem_attr.adb (Check_Precondition_Postcondition): recognize
12371         conditions that apply to a subprogram instance.
12372
12373 2011-08-02  Robert Dewar  <dewar@adacore.com>
12374
12375         * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
12376
12377 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
12378
12379         * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
12380         private type with a tagged full view is not derived in the immediate
12381         scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
12382
12383 2011-08-02  Robert Dewar  <dewar@adacore.com>
12384
12385         * exp_ch4.adb: Minor reformatting.
12386
12387 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
12388
12389         * sem_ch5.adb (Analyze_Loop_Statement):  If the iteration scheme is an
12390         Ada2012 iterator, the loop will be rewritten during expansion into a
12391         while loop with a cursor and an element declaration. Do not analyze the
12392         body in this case, because if the container is for indefinite types the
12393         actual subtype of the elements will only be determined when the cursor
12394         declaration is analyzed.
12395
12396 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
12397
12398         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
12399         size/alignment related attributes in CodePeer_Mode.
12400
12401 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
12402
12403         * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
12404         Prepend_Element, since this can result in the operation getting the
12405         wrong slot in the full type's dispatch table if the full type has
12406         inherited operations. The incomplete type's operation will get added
12407         to the proper position in the full type's primitives
12408         list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
12409         (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
12410         dispatching operations, since there are cases where nonprimitive
12411         subprograms can get added to the list of incomplete dependents (such
12412         as subprograms in nested packages).
12413         * sem_ch6.adb (Process_Formals): First, remove test for being in a
12414         private part when determining whether to add a primitive with a
12415         parameter of a tagged incomplete type to the Private_Dependents list.
12416         Such primitives can also occur in the visible part, and should not have
12417         been excluded from being private dependents.
12418         * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
12419         RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
12420         list of a Taft-amendment incomplete type is a primitive before issuing
12421         an error that the full type must appear in the same unit. There are
12422         cases where nonprimitives can be in the list (such as subprograms in
12423         nested packages).
12424         * sem_disp.adb (Derives_From): Use correct condition for checking that
12425         a formal's type is derived from the type of the corresponding formal in
12426         the parent subprogram (the condition was completely wrong). Add
12427         checking that was missing for controlling result types being derived
12428         from the result type of the parent operation.
12429
12430 2011-08-02  Yannick Moy  <moy@adacore.com>
12431
12432         * errout.adb (First_Node): minor renaming
12433         * restrict.adb (Check_Formal_Restriction): put restriction warning on
12434         first node.
12435
12436 2011-08-02  Yannick Moy  <moy@adacore.com>
12437
12438         * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
12439         before accessing operands.
12440         * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
12441         decide whether an initialization expression respects SPARK rules, as
12442         the plain node is the expanded one. This allows for more valid warnings
12443         to be issued.
12444         * gnat_rm.texi: Minor update.
12445
12446 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
12447
12448         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
12449         previous change.
12450
12451 2011-08-02  Robert Dewar  <dewar@adacore.com>
12452
12453         * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
12454
12455 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
12456
12457         * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
12458         loop statements and the element renaming declaration with a block when
12459         the element type is controlled.
12460
12461 2011-08-02  Yannick Moy  <moy@adacore.com>
12462
12463         * sinfo.ads: Minor formatting.
12464
12465 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
12466
12467         * sem_aggr.adb (Add_Association): if the association has a box and no
12468         expression, use the Sloc of the aggregate itself for the new
12469         association.
12470         * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
12471         the Original_Node.
12472
12473 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
12474
12475         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
12476         When a container is provided via a function call, generate a renaming
12477         of the function result. This avoids the creation of a transient scope
12478         and the premature finalization of the container.
12479         * exp_ch7.adb (Is_Container_Cursor): Removed.
12480         (Wrap_Transient_Declaration): Remove the supression of the finalization
12481         of the list controller when the declaration denotes a container cursor,
12482         it is not needed.
12483
12484 2011-08-02  Yannick Moy  <moy@adacore.com>
12485
12486         * restrict.adb (Check_Formal_Restriction): only issue a warning if the
12487         node is from source, instead of the original node being from source.
12488         * sem_aggr.adb
12489         (Resolve_Array_Aggregate): refine the check for a static expression, to
12490         recognize also static ranges
12491         * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
12492         Array_Type_Declaration): postpone the test for the type being a subtype
12493         mark after the type has been resolved, so that component-selection and
12494         expanded-name are discriminated.
12495         (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
12496         to distinguish the case of an iteration scheme, so that an error is
12497         issed on a non-static range in SPARK except in an iteration scheme.
12498         * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
12499         In_Iter_Schm = True.
12500         * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
12501         user-defined operators so that they are allowed in renaming
12502         * sem_ch8.adb
12503         (Find_Selected_Component): refine the check for prefixing of operators
12504         so that they are allowed in renaming. Move the checks for restrictions
12505         on selector name after analysis discriminated between
12506         component-selection and expanded-name.
12507         * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
12508         concatenation argument of string type if it is static.
12509         * sem_util.adb, sem_util.ads
12510         (Check_Later_Vs_Basic_Declarations): add a new function
12511         Is_Later_Declarative_Item to decice which declarations are allowed as
12512         later items, in the two different modes Ada 83 and SPARK. In the SPARK
12513         mode, add that renamings are considered as later items.
12514         (Enclosing_Package): new function to return the enclosing package
12515         (Enter_Name): correct the rule for homonyms in SPARK
12516         (Is_SPARK_Initialization_Expr): default to returning True on nodes not
12517         from source (result of expansion) to avoid issuing wrong warnings.
12518
12519 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
12520
12521         * errout.adb: On anything but an expression First_Node returns its
12522         argument.
12523
12524 2011-08-02  Pascal Obry  <obry@adacore.com>
12525
12526         * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
12527
12528 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
12529
12530         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
12531         Set the associated loop as the related expression of internally
12532         generated cursors.
12533         * exp_ch7.adb (Is_Container_Cursor): New routine.
12534         (Wrap_Transient_Declaration): Supress the finalization of the list
12535         controller when the declaration denotes a container cursor.
12536
12537 2011-08-02  Yannick Moy  <moy@adacore.com>
12538
12539         * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
12540         command line now.
12541         * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
12542         expression is a simple expression. This check cannot be performed in
12543         the semantics, so just drop it.
12544         (P_Index_Or_Discriminant_Constraint): move check that the index or
12545         discriminant is a subtype mark to Analyze_Subtype_Declaration in the
12546         semantics. Other cases were previously checked in the semantics.
12547         * par-ch4.adb (P_Name): move checks that a selector name is not
12548         character literal or an operator symbol to Find_Selected_Component in
12549         the semantics
12550         * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
12551         declarations are not placed after later declarations in a separate
12552         procedure in Sem_Util (possibly not the best choice?), to be used both
12553         during parsing, for Ada 83 mode, and during semantic analysis, for
12554         SPARK mode.
12555         * par-endh.adb (Check_End): move check that end label is not missing
12556         to Process_End_Label in the semantics
12557         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
12558         the special case for SPARK restriction
12559         * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
12560         * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
12561         parameter Force to issue the error message even on internal node (used
12562         for generated end label). Call Check_Restriction to check when an error
12563         must be issued. In SPARK mode, issue an error message even if the
12564         restriction is not set.
12565         (Check_Restriction): new procedure with an additional out parameter to
12566         inform the caller that a message has been issued
12567         * sem_aggr.adb: Minor modification of message
12568         * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
12569         instead of issuing an error message directly
12570         * sem_ch3.adb (Analyze_Declarations): move here the check that basic
12571         declarations are not placed after later declarations, by calling
12572         Check_Later_Vs_Basic_Declarations
12573         (Analyze_Subtype_Declaration): move here the check that an index or
12574         discriminant constraint must be a subtype mark. Change the check that
12575         a subtype of String must start at one so that it works on subtype marks.
12576         * sem_ch4.adb (Analyze_Call): move here the check that a named
12577         association cannot follow a positional one in a call
12578         * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
12579         instead of issuing an error message directly
12580         * sem_ch8.adb (Find_Selected_Component): move here the check that a
12581         selector name is not a character literal or an operator symbol. Move
12582         here the check that the prefix of an expanded name cannot be a
12583         subprogram or a loop statement.
12584         * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
12585         procedure called from parsing and semantics to check that basic
12586         declarations are not placed after later declarations
12587         (Process_End_Label): move here the check that end label is not missing
12588
12589 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
12590
12591         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
12592         representation clause in codepeer mode, since it confuses CodePeer and
12593         does not bring useful info.
12594
12595 2011-08-02  Ed Falis  <falis@adacore.com>
12596
12597         * init.c: initialize fp hw on MILS.
12598
12599 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
12600
12601         * errout.adb (First_Node): for bodies, return the node itself (small
12602         optimization). For other nodes, do not check source_unit if the node
12603         comes from Standard.
12604
12605 2011-08-02  Robert Dewar  <dewar@adacore.com>
12606
12607         * exp_ch3.adb: Minor comment additions.
12608         * sem_ch13.adb: Minor reformatting.
12609
12610 2011-08-02  Pascal Obry  <obry@adacore.com>
12611
12612         * make.adb, makeutl.adb: Removes some superfluous directory separator.
12613
12614 2011-08-02  Robert Dewar  <dewar@adacore.com>
12615
12616         * sem_attr.adb: Minor reformatting.
12617
12618 2011-08-02  Robert Dewar  <dewar@adacore.com>
12619
12620         * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
12621         (Has_Default_Component_Value): Removed
12622         * einfo.ads Comment updates
12623         (Has_Default_Aspect): Replaces Has_Default_Value
12624         (Has_Default_Component_Value): Removed
12625         * exp_ch13.adb
12626         (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
12627         * exp_ch3.adb
12628         (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
12629         (Get_Simple_Init_Val): Handle Default_Value aspect
12630         (Needs_Simple_Initialization): Handle Default_Value aspect
12631         * exp_ch3.ads: Needs_Simple_Initialization
12632         * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
12633         * par-prag.adb (Pragma_Default[_Component]Value) Removed
12634         * sem_ch13.adb
12635         (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
12636         * sem_prag.adb (Pragma_Default[_Component]Value) Removed
12637         * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
12638
12639 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
12640
12641         * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
12642         package containing iteration primitives.
12643         exp_ch5.adb (Expand_Iterator_Loop): ditto.
12644
12645 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
12646
12647         * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
12648         "of", pre-analyze expression in case it is a function call with
12649         finalization actions that must be placed ahead of the loop.
12650         * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
12651         on an Ada2012 iterator, insert them ahead of the rewritten loop.
12652
12653 2011-08-02  Geert Bosch  <bosch@adacore.com>
12654
12655         * cstand.adb (Create_Float_Types): Only consider C's long double for
12656         Long_Long_Float, in addition to double.
12657
12658 2011-08-02  Robert Dewar  <dewar@adacore.com>
12659
12660         * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
12661         sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
12662         prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
12663         Minor reformatting.
12664
12665 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
12666
12667         * sem_attr.adb: handle properly 'Result when it is a prefix of an
12668         indexed component.
12669
12670 2011-08-02  Javier Miranda  <miranda@adacore.com>
12671
12672         * einfo.ads, einfo.adb
12673         (Original_Access_Type): Move this attribute to Node26 since there was
12674         an undocumented use of Node21 in E_Access_Subprogram_Type entities
12675         which causes conflicts and breaks the generation of the .NET compiler.
12676         (Interface_Name): Add missing documentation on JGNAT only uses of
12677         this attribute.
12678
12679 2011-08-02  Geert Bosch  <bosch@adacore.com>
12680
12681         * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
12682         (Find_Back_End_Float_Type): Likewise
12683         (Create_Back_End_Float_Types): Likewise
12684         (Create_Float_Types): Likewise
12685         (Register_Float_Type): Likewise
12686         * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
12687         Nlist and split out type selection in new local Find_Base_Type function.
12688         * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
12689         Nlist
12690         * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
12691
12692 2011-08-02  Robert Dewar  <dewar@adacore.com>
12693
12694         * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
12695         alpha order).
12696         * opt.ads: Minor comment change.
12697         * sem_ch12.adb: Minor code reorganization.
12698
12699 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
12700
12701         * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
12702         subtype's list of rep items to the list on the full subtype in the case
12703         where the lists are the same.
12704
12705 2011-08-02  Geert Bosch  <bosch@adacore.com>
12706
12707         * switch-c.adb (Free): New deallocation procedure to avoid implicitly
12708         using the one from System.Strings, which also deallocates all strings.
12709
12710 2011-08-02  Geert Bosch  <bosch@adacore.com>
12711
12712         * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
12713         function.
12714         * gcc-interface/Make-lang.in: Update dependencies.
12715
12716 2011-08-02  Olivier Hainque  <hainque@adacore.com>
12717
12718         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
12719         end_locus.
12720
12721 2011-08-02  Javier Miranda  <miranda@adacore.com>
12722
12723         * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
12724         associated with anonymous access to subprograms.
12725
12726 2011-08-02  Geert Bosch  <bosch@adacore.com>
12727
12728         * opt.ads
12729         (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
12730         (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
12731         * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
12732         (Add_Symbol_Definition): Move to switch-c.adb
12733         (Process_Command_Line_Symbol_Definitions): Adjust references to above.
12734         * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
12735         (Add_Symbol_Definition): Move to switch-c.adb.
12736         * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
12737         * sem_warn.adb
12738         (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
12739         Move to warnsw.adb.
12740         * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
12741         Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
12742         Move to warnsw.adb.
12743         * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
12744         (Add_Symbol_Definition): Moved from Prepcomp.
12745         * switch-c.ads: Update copyright notice. Use String_List instead of
12746         Argument_List, removing dependency on System.OS_Lib.
12747
12748 2011-08-02  Yannick Moy  <moy@adacore.com>
12749
12750         * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
12751         mode on initialization expression which does not respect SPARK
12752         restrictions.
12753         * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
12754         if the tree referenced by its argument represents an initialization
12755         expression in SPARK, suitable for initializing an object in an object
12756         declaration.
12757
12758 2011-08-02  Javier Miranda  <miranda@adacore.com>
12759
12760         * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
12761         internally generated access to subprogram with its associated protected
12762         subprogram type.
12763         * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
12764
12765 2011-08-02  Geert Bosch  <bosch@adacore.com>
12766
12767         * cstand.adb (Register_Float_Type): Print information about type to
12768         register, if the Debug_Flag_Dot_B is set.
12769         * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
12770         * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
12771         * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
12772         with a requested precision of more than Max_Digits digits and no more
12773         than Max_Base_Digits digits, if a range specification is present and the
12774         Predefined_Float_Types list has a suitable type to derive from.
12775         * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
12776         case of type completion with pragma Import
12777         * sem_prag.adb
12778         (Process_Import_Predefined_Type): Processing to complete a type
12779         with pragma Import. Currently supports floating point types only.
12780         (Set_Convention_From_Pragma): Do nothing without underlying type.
12781         (Process_Convention): Guard against absence of underlying type,
12782         which may happen when importing incomplete types.
12783         (Process_Import_Or_Interface): Handle case of importing predefined
12784         types. Tweak error message.
12785
12786 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
12787
12788         * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
12789         functions to previous change.  Reorganize code slightly.
12790
12791 2011-08-02  Geert Bosch  <bosch@adacore.com>
12792
12793         * back_end.ads (Register_Type_Proc): New call back procedure type for
12794         allowing the back end to provide information about available types.
12795         (Register_Back_End_Types): New procedure to register back end types.
12796         * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
12797         available types.
12798         * cstand.adb (Back_End_Float_Types): New list for floating point types
12799         supported by the back end.
12800         (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
12801         (Copy_Float_Type): New procedure to make new copies of predefined types.
12802         (Register_Float_Type): New call back procedure to populate the BEFT list
12803         (Find_Back_End_Float_Type): New procedure to find a BEFT by name
12804         (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
12805         (Create_Float_Types): New procedure to create entities for floating
12806         point types predefined in Standard, and put these and any remaining
12807         BEFTs on the Predefined_Float_Types list.
12808         * stand.ads (Predefined_Float_Types): New list for predefined floating
12809         point types that do not have declarations in package Standard.
12810
12811 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
12812
12813         * inline.adb (Get_Code_Unit_Entity): New local function.  Returns the
12814         entity node for the unit containing the parameter.
12815         (Add_Inlined_Body): Use it to find the unit containing the subprogram.
12816         (Add_Inlined_Subprogram): Likewise.
12817         * gcc-interface/Make-lang.in: Update dependencies.
12818
12819 2011-08-02  Thomas Quinot  <quinot@adacore.com>
12820
12821         * s-stusta.adb (Print): Make sure Pos is always initialized to a
12822         suitable value.
12823
12824 2011-08-02  Geert Bosch  <bosch@adacore.com>
12825
12826         * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
12827
12828 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
12829
12830         * sem_type.adb (Covers): Move trivial case to the top and reuse the
12831         computed value of Base_Type.
12832
12833 2011-08-02  Yannick Moy  <moy@adacore.com>
12834
12835         * restrict.adb (Check_Restriction): issue an error for any use of
12836         class-wide, even if the No_Dispatch restriction is not set.
12837         * sem_aggr.adb: Correct typos in comments and messages in formal mode
12838         * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
12839         when completing a private extension, the type named in the private part
12840         is not the same as that named in the visible part.
12841         * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
12842         of an inherited primitive operations of a tagged type or type extension
12843         that returns the tagged type.
12844         * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
12845         function which returns True for an implicit operation inherited by the
12846         derived type declaration for the argument type.
12847         (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
12848         order.
12849
12850 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
12851
12852         * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
12853         Process_Bounds, to perform analysis with expansion of a range or an
12854         expression that is the iteration scheme for a loop.
12855         (Analyze_Iterator_Specification): If domain of iteration is given by a
12856         function call with a controlled result, as is the case if call returns
12857         a predefined container, ensure that finalization actions are properly
12858         generated.
12859         * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
12860
12861 2011-08-02  Javier Miranda  <miranda@adacore.com>
12862
12863         * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
12864         * gcc-interface/Make-lang.in: Update dependencies.
12865
12866 2011-08-02  Javier Miranda  <miranda@adacore.com>
12867
12868         * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
12869         determine if the analysis is performed using N or Original_Node (N).
12870         * exp_util.adb (Side_Effect_Free): Code cleanup since the new
12871         functionality of routine Is_Variable avoids code duplication.
12872         * checks.adb (Determine_Range): Handle temporaries generated by
12873         Remove_Side_Effects.
12874
12875 2011-08-02  Javier Miranda  <miranda@adacore.com>
12876
12877         * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
12878         expansion of the condition. Required since the previous analysis was
12879         done with expansion disabled (see Resolve_Quantified_Expression) and
12880         hence checks were not inserted and record comparisons have not been
12881         expanded.
12882
12883 2011-08-02  Ed Falis  <falis@adacore.com>
12884
12885         * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
12886         Update header.
12887
12888 2011-08-02  Bob Duff  <duff@adacore.com>
12889
12890         * opt.ads: Minor comment fix.
12891
12892 2011-08-02  Bob Duff  <duff@adacore.com>
12893
12894         * sem_ch12.adb (Analyze_Package_Instantiation,
12895         Analyze_Subprogram_Instantiation): Turn off style checking while
12896         analyzing an instance. Whatever style checks that apply to the generic
12897         unit should apply, so it makes no sense to apply them in an instance.
12898         This was causing trouble when compiling an instance of a runtime
12899         unit that violates the -gnatyO switch.
12900         * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
12901         one of the two case statements, causing spurious errors.
12902
12903 2011-08-02  Robert Dewar  <dewar@adacore.com>
12904
12905         * uname.adb: Minor reformatting.
12906         * gnatcmd.adb: Minor reformatting.
12907         * exp_attr.adb: Minor reformatting.
12908
12909 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
12910
12911         * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
12912         No_Dispatching_Calls, do not look for the Assign primitive, because
12913         predefined primitives are not created in this case.
12914
12915 2011-08-02  Bob Duff  <duff@adacore.com>
12916
12917         * stylesw.ads: Minor comment fixes.
12918
12919 2011-08-02  Robert Dewar  <dewar@adacore.com>
12920
12921         * freeze.adb (Add_To_Result): New procedure.
12922
12923 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
12924
12925         * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
12926         time, if the specific run-time routines for handling streams of strings
12927         are not available, use the default mechanism.
12928
12929 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
12930
12931         * s-regpat.ads: Fix typo.
12932
12933 2011-08-02  Vincent Celier  <celier@adacore.com>
12934
12935         * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
12936         not null, call it to create the in memory config project file without
12937         parsing an existing default config project file.
12938
12939 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
12940
12941         * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
12942
12943 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
12944
12945         * sem_elim.adb: an abstract subprogram does not need an eliminate
12946         pragma for its descendant to be eliminable.
12947
12948 2011-08-02  Ed Falis  <falis@adacore.com>
12949
12950         * init.c: revert to handling before previous checkin for VxWorks
12951         * s-intman-vxworks.adb: delete unnecessary declarations related to
12952         using Ada interrupt facilities for handling signals.
12953         Delete Initialize_Interrupts. Use __gnat_install_handler instead.
12954         * s-intman-vxworks.ads: Import __gnat_install_handler as
12955         Initialize_Interrupts.
12956         * s-taprop-vxworks.adb: Delete Signal_Mask.
12957         (Abort_Handler): change construction of mask to unblock exception
12958         signals.
12959
12960 2011-08-02  Jerome Guitton  <guitton@adacore.com>
12961
12962         * a-except-2005.adb (Raise_From_Signal_Handler): Call
12963         Debug_Raise_Exception before propagation starts.
12964
12965 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
12966
12967         * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
12968         to Restriction_Check_Required.
12969         * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
12970         * sem_res.adb (Resolve_Call): Likewise.
12971         * sem_attr.adb (Check_Stream_Attribute): Likewise.
12972
12973 2011-08-02  Bob Duff  <duff@adacore.com>
12974
12975         * stylesw.ads: Update comment.
12976         * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
12977         * errout.ads: Remove obsolete comment.
12978
12979 2011-08-02  Javier Miranda  <miranda@adacore.com>
12980
12981         * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
12982         (Set_Is_Safe_To_Reevaluate): new procedure.
12983         * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
12984         assignment is allowed on safe-to-reevaluate variables.
12985         (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
12986         temporary created to remove side effects in expressions that use
12987         the secondary stack as safe-to-reevaluate.
12988         * exp_util.adb (Side_Effect_Free): Add missing code to handle well
12989         variables that are not true constants.
12990
12991 2011-08-02  Robert Dewar  <dewar@adacore.com>
12992
12993         * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
12994         sem_res.adb, sem_ch6.adb: Minor reformatting.
12995
12996 2011-08-02  Jerome Guitton  <guitton@adacore.com>
12997
12998         * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
12999
13000 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13001
13002         * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
13003         not set Overridden_Operation if subprogram is an initialization
13004         procedure.
13005
13006 2011-08-02  Yannick Moy  <moy@adacore.com>
13007
13008         * par-ch6.adb: Correct obsolete name in comments
13009         * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
13010         which takes two message arguments (existing function takes one), with
13011         second message used for continuation.
13012         * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
13013         block statements that originate from a source block statement, not
13014         generated block statements
13015         * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
13016         symmetry with procedure case
13017         * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
13018         function to issue an error in formal mode if a package specification
13019         contains more than one tagged type or type extension.
13020         * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
13021         parameters matching formals of tagged types are objects (or ancestor
13022         type conversions of objects), not general expressions. Issue an error
13023         on view conversions that are not involving ancestor conversion of an
13024         extended type.
13025         (Resolve_Type_Conversion): in formal mode, issue an error on the
13026         operand of an ancestor type conversion which is not an object
13027         * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
13028         procedure so that it works also for actuals of function calls
13029         (Is_Actual_Tagged_Parameter): new function which determines if its
13030         argument is an actual parameter of a formal of tagged type in a
13031         subprogram call
13032         (Is_SPARK_Object_Reference): new function which determines if the tree
13033         referenced by its argument represents an object in SPARK
13034
13035 2011-08-02  Robert Dewar  <dewar@adacore.com>
13036
13037         * sem_ch3.adb: Minor reformatting
13038         Minor comment addition
13039         Minor error msg text change
13040
13041 2011-08-02  Javier Miranda  <miranda@adacore.com>
13042
13043         * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
13044         function. Used to be more precise when we generate a variable plus one
13045         assignment to remove side effects in the evaluation of the Bound
13046         expressions.
13047         (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
13048         of the bound expression to force its re-analysis and thus expand the
13049         associated transient scope (if required). Code cleanup replacing the
13050         previous code that declared the constant entity by an invocation to
13051         routine Force_Evaluation which centralizes this work in the frontend.
13052
13053 2011-08-02  Robert Dewar  <dewar@adacore.com>
13054
13055         * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
13056         (Base_Type): Now uses improved Is_Base_Type function
13057         * einfo.ads (Base_Type): Inline this function
13058
13059 2011-08-02  Robert Dewar  <dewar@adacore.com>
13060
13061         * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
13062         (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
13063
13064 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
13065
13066         * gcc-interface/Make-lang.in: Update dependencies.
13067         * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
13068         targets.
13069
13070 2011-08-02  Yannick Moy  <moy@adacore.com>
13071
13072         * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
13073         non-simple expression used in delta constraint
13074         (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
13075         index constraint which is not a subtype mark
13076         * par.adb: With and use Restrict
13077         * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
13078         mode on component type which is not a subtype mark and default
13079         expression on component
13080         (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
13081         of string which does not have a lower index bound equal to 1
13082         (Array_Type_Declaration): issue an error in formal mode on index or
13083         component type which is not a subtype mark, and on aliased keyword on
13084         component
13085         (Derived_Type_Declaration): issue an error in formal mode on interface,
13086         limited or abstract type
13087         (Record_Type_Declaration): issue an error in formal mode on interface
13088         (Record_Type_Definition): issue an error in formal mode on tagged types
13089         and type extensions not declared in the specification of a library unit
13090         package; on null non-tagged record; on variant part
13091
13092 2011-08-02  Vincent Celier  <celier@adacore.com>
13093
13094         * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
13095         not declared for qualified library project when Library_Name is not
13096         declared, but Library_Dir is.
13097
13098 2011-08-02  Robert Dewar  <dewar@adacore.com>
13099
13100         * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
13101         pragmas (affects aspects [Component_]Default_Value
13102         (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
13103         component type for the resolution
13104
13105 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
13106
13107         * einfo.adb (Base_Type): Tune implementation for speed.
13108
13109 2011-08-02  Robert Dewar  <dewar@adacore.com>
13110
13111         * freeze.adb: Minor reformatting.
13112
13113 2011-08-02  Thomas Quinot  <quinot@adacore.com>
13114
13115         * scos.ads: Update comments.
13116
13117 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13118
13119         * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
13120         base type, because the parent may be a subtype of a private type whose
13121         convention is established in a private part.
13122
13123 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
13124
13125         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
13126         statement in a block when the expansion of the return expression has
13127         created a finalization chain.
13128         * freeze.adb (Freeze_Expression): Alphabetize all choices associated
13129         with the parent node.
13130         Add N_Extended_Return_Statement to handle the case where a transient
13131         object declaration appears in the Return_Object_Declarations list of
13132         an extended return statement.
13133
13134 2011-08-02  Matthew Gingell  <gingell@adacore.com>
13135
13136         * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
13137         unused parameter 'name'.
13138
13139 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13140
13141         * sem_elim.adb (Set_Eliminated): If the overridden operation is an
13142         inherited operation, check whether its alias, which is the source
13143         operastion that it renames, has been marked eliminated.
13144
13145 2011-08-02  Javier Miranda  <miranda@adacore.com>
13146
13147         * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
13148         in-mode parameter whose type is an access type since it can be used to
13149         modify its designated object. Enforce code that handles as safe an
13150         access type that is not access-to-constant but it is the result of a
13151         previous removal of side-effects.
13152         (Remove_Side_Effects): Minor code reorganization of cases which require
13153         no action. Done to incorporate documentation on new cases uncovered
13154         working in this ticket: no action needed if this routine was invoked
13155         too early and the nodes are not yet decorated.
13156         * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
13157         to routine Remove_Side_Effects by calls to Force_Evaluation since they
13158         were issued with actuals that are implicitly provided by
13159         Force_Evaluation.
13160
13161 2011-08-02  Robert Dewar  <dewar@adacore.com>
13162
13163         * sem_ch3.adb, sem_res.adb: Minor reformatting.
13164
13165 2011-08-02  Yannick Moy  <moy@adacore.com>
13166
13167         * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
13168         to issue an error in formal mode on attribute not supported in this mode
13169         (Analyze_Attribute): issue errors on standard attributes not supported
13170         in formal mode.
13171         * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
13172         comment, and issue error in formal mode on modulus which is not a power
13173         of 2.
13174         (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
13175         range.
13176         * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
13177         subtype mark.
13178         * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
13179         operator on modular type (except 'not').
13180
13181 2011-08-02  Robert Dewar  <dewar@adacore.com>
13182
13183         * gnat_rm.texi: Minor reformatting.
13184
13185 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
13186
13187         * s-osinte-linux.ads: Minor comment update and reformatting.
13188         * i-cexten.ads: Make this unit pure, as for its parent.
13189         Will allow its usage in more contexts if needed.
13190
13191 2011-08-02  Robert Dewar  <dewar@adacore.com>
13192
13193         * s-utf_32.ads: Minor comment fix.
13194
13195 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13196
13197         * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
13198         operation of a tagged synchronized type, handle the case where the
13199         controlling argument is overloaded.
13200
13201 2011-08-02  Yannick Moy  <moy@adacore.com>
13202
13203         * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
13204         Replace pragma SPARK_95 with pragma Restrictions (SPARK)
13205         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
13206         SPARK mode and formal verification mode on processing SPARK restriction
13207         * s-rident.ads (Restriction_Id): add SPARK restriction in those not
13208         requiring consistency checking.
13209
13210 2011-08-02  Robert Dewar  <dewar@adacore.com>
13211
13212         * sem_res.adb: Minor reformatting.
13213
13214 2011-08-02  Robert Dewar  <dewar@adacore.com>
13215
13216         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
13217         a-cforse.ads: Remove unneeded with of Ada.Containers
13218         Remove commented out pragma Inline's
13219         Move specifications of new subprograms to the actual specs
13220
13221 2011-08-02  Yannick Moy  <moy@adacore.com>
13222
13223         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
13224         a-cforse.ads: Update comments.
13225
13226 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13227
13228         * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
13229
13230 2011-08-02  Robert Dewar  <dewar@adacore.com>
13231
13232         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
13233         a-cforse.ads, a-cofove.ads: Minor reformatting.
13234
13235 2011-08-02  Claire Dross  <dross@adacore.com>
13236
13237         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
13238         a-cofove.ads: Add comments.
13239
13240 2011-08-02  Yannick Moy  <moy@adacore.com>
13241
13242         * gnat_rm.texi: Document formal containers.
13243
13244 2011-08-02  Emmanuel Briot  <briot@adacore.com>
13245
13246         * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
13247         are empty sections.
13248
13249 2011-08-02  Robert Dewar  <dewar@adacore.com>
13250
13251         * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
13252         reformatting.
13253
13254 2011-08-02  Robert Dewar  <dewar@adacore.com>
13255
13256         * aspects.adb: New aspects Default_Value and Default_Component_Value
13257         New format of Aspect_Names table checks for omitted entries
13258         * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
13259         handling of boolean aspects for derived types.
13260         New aspects Default_Value and Default_Component_Value
13261         New format of Aspect_Names table checks for omitted entries
13262         * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
13263         (Has_Default_Value): New flag
13264         (Has_Default_Component_Value): New flag
13265         (Has_Default_Value): New flag
13266         * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
13267         table.
13268         * par-prag.adb: New pragmas Default_Value and Default_Component_Value
13269         * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
13270         Default_Value and Default_Component_Value
13271         * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
13272         New aspects Default_Value and Default_Component_Value
13273         * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
13274         * sprint.adb: Print N_Aspect_Specification node when called from gdb
13275
13276 2011-08-02  Vincent Celier  <celier@adacore.com>
13277
13278         * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
13279         inherit library kind.
13280
13281 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13282
13283         * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
13284         Minor reformatting.
13285
13286 2011-08-02  Robert Dewar  <dewar@adacore.com>
13287
13288         * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
13289
13290 2011-08-02  Yannick Moy  <moy@adacore.com>
13291
13292         * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
13293
13294 2011-08-02  Robert Dewar  <dewar@adacore.com>
13295
13296         * impunit.adb: Add comment.
13297
13298 2011-08-02  Yannick Moy  <moy@adacore.com>
13299
13300         * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
13301         qualification of aggregates in formal mode
13302         (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
13303         another aggregate
13304         (Resolve_Aggregate): complete the test that an aggregate is adequately
13305         qualified in formal mode
13306
13307 2011-08-02  Pascal Obry  <obry@adacore.com>
13308
13309         * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
13310         * mlib-prj.adb: Supress warning when compiling binder generated file.
13311         (Build_Library): Supress all warnings when compiling the binder
13312         generated file.
13313
13314 2011-08-02  Yannick Moy  <moy@adacore.com>
13315
13316         * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
13317         from here...
13318         * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
13319         * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
13320         Add with/use clauses to make Check_Formal_Restriction visible
13321
13322 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13323
13324         * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
13325         in-parameters when type of the generic formal is private in the generic
13326         spec and non-private in the body.
13327
13328 2011-08-02  Claire Dross  <dross@adacore.com>
13329
13330         * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
13331         a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
13332         a-cofove.adb, a-cofove.ads: New files implementing formal containers.
13333         * impunit.adb, Makefile.rtl: Take new files into account.
13334
13335 2011-08-02  Robert Dewar  <dewar@adacore.com>
13336
13337         * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
13338         sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
13339
13340 2011-08-02  Yannick Moy  <moy@adacore.com>
13341
13342         * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
13343         formal mode
13344         * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
13345         matching static array bounds, taking into account the special case of
13346         string literals
13347         * sem_ch3.adb: Typo in comment.
13348
13349 2011-08-02  Yannick Moy  <moy@adacore.com>
13350
13351         * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
13352         which issues an error in formal mode if its argument node is originally
13353         from source
13354         * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
13355         has a discriminant specification so that it does not include the case
13356         of derived types
13357         (Derived_Type_Declaration): move here the test that a derived type has a
13358         discriminant specification
13359         * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
13360         first element of a component association before accessing its choices
13361         (presence of component association is not enough)
13362         * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
13363         declaration is a library item before accessing the next element in a
13364         list, as library items are not member of lists
13365         * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
13366         sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
13367         Check_Formal_Restriction whenever possible.
13368
13369 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13370
13371         * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
13372         reference when needed.
13373
13374 2011-08-02  Bob Duff  <duff@adacore.com>
13375
13376         * gnat_ugn.texi: Fix typo.
13377
13378 2011-08-02  Vincent Celier  <celier@adacore.com>
13379
13380         * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
13381         archive file name. Do not use the full path name of archives for Open
13382         VMS.
13383
13384 2011-08-02  Robert Dewar  <dewar@adacore.com>
13385
13386         * sem_ch12.adb, sem_ch11.adb: New calling sequence for
13387         Analyze_Aspect_Specifications
13388         * sem_ch13.adb
13389         (Analyze_Aspect_Specifications): New handling for boolean aspects
13390         * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
13391         * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
13392         sequence for Analyze_Aspect_Specifications
13393         * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
13394         * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
13395
13396 2011-08-02  Robert Dewar  <dewar@adacore.com>
13397
13398         * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
13399         aspects, since these no longer exist.
13400
13401 2011-08-02  Robert Dewar  <dewar@adacore.com>
13402
13403         * par-ch13.adb (Aspect_Specifications_Present): Always return false on
13404         semicolon, do not try to see if there are aspects following it.
13405         * par-ch3.adb (P_Declarative_Items): Better message for unexpected
13406         aspect spec.
13407
13408 2011-08-02  Robert Dewar  <dewar@adacore.com>
13409
13410         * sem_ch8.adb, aspects.ads: Minor reformatting.
13411
13412 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
13413
13414         * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
13415         * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
13416         extracted from...
13417         (Analyze_Aspect_Specifications): ...here.  Call above procedure.
13418
13419 2011-08-02  Yannick Moy  <moy@adacore.com>
13420
13421         * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
13422         mode on subprogram declaration outside of package specification, unless
13423         it is followed by a pragma Import
13424         * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
13425         Access_Type_Declaration): issue error in formal mode on access type
13426         (Analyze_Incomplete_Type_Decl): issue error in formal mode on
13427         incomplete type
13428         (Analyze_Object_Declaration): issue error in formal mode on object
13429         declaration which does not respect SPARK restrictions
13430         (Analyze_Subtype_Declaration): issue error in formal mode on subtype
13431         declaration which does not respect SPARK restrictions
13432         (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
13433         error in formal mode on digits or delta constraint
13434         (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
13435         decimal fixed point type
13436         (Derived_Type_Declaration): issue error in formal mode on derived type
13437         other than type extensions of tagged record types
13438         * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
13439         with check on access definition
13440         * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
13441         mode on protected definition.
13442         (Analyze_Task_Definition): issue error in formal mode on task definition
13443
13444 2011-08-02  Robert Dewar  <dewar@adacore.com>
13445
13446         * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
13447
13448 2011-08-02  Javier Miranda  <miranda@adacore.com>
13449
13450         * sem_ch6.adb (Can_Override_Operator): New function.
13451         (Verify_Overriding_Indicator): Add missing code to check overriding
13452         indicator in operators. Fixes regression.
13453         (Check_Overriding_Indicator): Minor reformating after replacing the
13454         code that evaluates if the subprogram can override an operator by
13455         invocations to the above new function.
13456         * einfo.adb
13457         (Write_Field26_Name): Add missing code to ensure that, following
13458         the documentation in einfo.ads, this field is not shown as attribute
13459         "Static_Initialization" on non-dispatching functions.
13460
13461 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
13462
13463         * sem_res.adb (Resolve_Call): A call to
13464         Ada.Real_Time.Timing_Events.Set_Handler violates restriction
13465         No_Relative_Delay (AI-0211) only when it sets a relative timing event,
13466         i.e., when the second parameter is of type Time_Span.
13467
13468 2011-08-02  Vincent Celier  <celier@adacore.com>
13469
13470         * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
13471         with an archive instead of -L<library dir> -l<library name>.
13472
13473 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13474
13475         * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
13476         mark the base types In_Use in addition to making the operations
13477         use_visible.
13478
13479 2011-08-02  Ed Falis  <falis@adacore.com>
13480
13481         * init.c: add and setup __gnat_signal_mask for the exception signals
13482         * s-inmaop-vxworks.adb: new file.
13483         * s-intman-vxworks.adb: remove unnecessary initializations and
13484         simplify remaining
13485         * s-intman-vxworks.ads: remove unnecessary variable
13486         * s-taprop-vxworks.adb: simplify signal initialization
13487
13488 2011-08-02  Robert Dewar  <dewar@adacore.com>
13489
13490         * sem_ch8.adb: Minor code reorganization, comment updates.
13491
13492 2011-08-02  Robert Dewar  <dewar@adacore.com>
13493
13494         * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
13495         * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
13496         here from Sem_Res.
13497         (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
13498         (Matching_Static_Array_Bounds): Moved here from Sem_Res
13499
13500 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13501
13502         * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
13503         * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
13504         * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
13505         use_type_clauses, to handle more efficiently use_type and use_all_type
13506         constructs.
13507         * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
13508         Ada2012 Use_All_Type clause.
13509         (Use_Class_Wide_Operations): new procedure.
13510
13511 2011-08-02  Robert Dewar  <dewar@adacore.com>
13512
13513         * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
13514         sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
13515         expression to expression function.
13516
13517 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13518
13519         * sem_ch4.adb: transform simple Ada2012 membership into equality only
13520         if types are compatible.
13521
13522 2011-08-02  Yannick Moy  <moy@adacore.com>
13523
13524         * sem_res.adb (Matching_Static_Array_Bounds): new function which
13525         returns True if its argument array types have same dimension and same
13526         static bounds at each index.
13527         (Resolve_Actuals): issue an error in formal mode on actuals passed as
13528         OUT or IN OUT paramaters which are not view conversions in SPARK.
13529         (Resolve_Arithmetic_Op): issue an error in formal mode on
13530         multiplication or division with operands of fixed point types which are
13531         not qualified or explicitly converted.
13532         (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
13533         Boolean or array type (except String) operands.
13534         (Resolve_Equality_Op): issue an error in formal mode on equality
13535         operators for array types other than String with non-matching static
13536         bounds.
13537         (Resolve_Logical_Op): issue an error in formal mode on logical operators
13538         for array types with non-matching static bounds. Factorize the code in
13539         Matching_Static_Array_Bounds.
13540         (Resolve_Qualified_Expression): issue an error in formal mode on
13541         qualified expressions for array types with non-matching static bounds.
13542         (Resolve_Type_Conversion): issue an error in formal mode on type
13543         conversion for array types with non-matching static bounds
13544
13545 2011-08-02  Robert Dewar  <dewar@adacore.com>
13546
13547         * par-ch10.adb: Minor code reorganization (use Nkind_In).
13548
13549 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13550
13551         * par-ch9.adb: save location of entry for proper error message.
13552
13553 2011-08-02  Javier Miranda  <miranda@adacore.com>
13554
13555         * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
13556         (Use_Full_View) which permits this routine to climb through the
13557         ancestors using the full-view of private parents.
13558         * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
13559         Use_Full_View to true in calls to Is_Ancestor.
13560         * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
13561         true in call to Is_Ancestor.
13562         * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
13563         Use_Full_View to true in call to Is_Ancestor.
13564         * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
13565         call to Is_Ancestor.
13566         * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
13567         Use_Full_View to true in calls to Is_Ancestor.
13568         * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
13569         Make_Select_Specific_Data_Table, Register_Primitive,
13570         Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
13571         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
13572         to true in call to Is_Ancestor.
13573         * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
13574         Use_Full_View to true in calls to Is_Ancestor.
13575         * exp_cg.adb
13576         (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
13577         (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
13578
13579 2011-08-02  Robert Dewar  <dewar@adacore.com>
13580
13581         * gnat_rm.texi: Minor reformatting.
13582         * sem_prag.adb: Minor reformatting.
13583
13584 2011-08-02  Tristan Gingold  <gingold@adacore.com>
13585
13586         * vms_data.ads: Add VMS qualifier for -gnateP.
13587
13588 2011-08-02  Robert Dewar  <dewar@adacore.com>
13589
13590         * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
13591         * par-ch7.adb (P_Package): Proper placement of aspects for package
13592         decl/instantiation.
13593         * par-endh.adb (Check_End): Ad Is_Sloc parameter
13594         (End_Statements): Add Is_Sloc parameterr
13595         * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
13596         (Check_End): Ad Is_Sloc parameter
13597         (End_Statements): Add Is_Sloc parameterr
13598
13599 2011-08-02  Vincent Celier  <celier@adacore.com>
13600
13601         * ug_words: Add VMS qualifier equivalent to -gnateP:
13602         /SYMBOL_PREPROCESSING.
13603
13604 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
13605
13606         * gnat-style.texi: For hexadecimal numeric literals the typical
13607         grouping of digits is 4 to represent 2 bytes.
13608         A procedure spec which is split into several lines is indented two
13609         characters.
13610
13611 2011-08-02  Yannick Moy  <moy@adacore.com>
13612
13613         * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
13614         * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
13615         (Resolve_Aggregate): issue errors in formal modes when aggregate is not
13616         properly qualified
13617         (Resolve_Array_Aggregate): issue errors in formal modes on non-static
13618         choice in array aggregate
13619         (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
13620         mark as ancestor
13621         (Resolve_Record_Aggregate): issue errors in formal modes on mixed
13622         positional and named aggregate for record, or others in record
13623         aggregate, or multiple choice in record aggregate
13624         * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
13625         array operands to logical operations AND, OR and XOR do not have the
13626         same static lower and higher bounds
13627         * sem_ch5.adb, sinfo.ads: Correct typos in comments
13628
13629 2011-08-01  Robert Dewar  <dewar@adacore.com>
13630
13631         * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
13632         Replaces Last_Source_Node_In_Sequence.
13633         * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
13634         * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
13635         parens and blank in string (this was inconsistently implemented).
13636         * errout.ads
13637         (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
13638         blank in string (this was inconsistently implemented).
13639         * gnat1drv.adb
13640         (Set_Global_Switches): Set formal mode switches appropriately
13641         * opt.ads, opt.adb: Formal mode is now global switches, more consistent
13642         * par-prag.adb
13643         (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
13644         call Set_Error_Msg_Lang to set "spark" as language name.
13645         * par.adb: Remove unnecessary call to set formal language for errout
13646         * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
13647         appropriately and call Set_Error_Msg_Lang to set "spark" as language
13648         name.
13649         * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
13650         calls to it, moved after resolution so that types are known
13651         * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
13652         result of concatenation is not of type String
13653         (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
13654         concatenation is not properly restricted
13655         * gnat_rm.texi: Add doc on pragma Spark_95.
13656         * gcc-interface/Makefile.in: Remove obsolete target pairs for
13657         Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
13658         * gcc-interface/Make-lang.in: Update dependencies.
13659
13660 2011-08-01  Javier Miranda  <miranda@adacore.com>
13661
13662         * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
13663         condition that detects if the overridden operation must replace an
13664         existing entity.
13665
13666 2011-08-01  Javier Miranda  <miranda@adacore.com>
13667
13668         * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
13669         code declarations inserted by Insert_Actions in each alternative of the
13670         N_Case_Expression node.
13671
13672 2011-08-01  Robert Dewar  <dewar@adacore.com>
13673
13674         * sem_ch6.adb: Minor code reorganization.
13675         * sem_util.adb: Minor reformatting.
13676
13677 2011-08-01  Pascal Obry  <obry@adacore.com>
13678
13679         * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
13680         * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
13681
13682 2011-08-01  Yannick Moy  <moy@adacore.com>
13683
13684         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
13685         literal or operator symbol which is prefixed
13686         * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
13687         mode on access attributes.
13688         * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
13689         that concatenation operands are properly restricted in formal mode
13690         (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
13691         Analyze_Concatenation_Operand. Issue an error in formal mode if the
13692         result of the concatenation has a type different from String.
13693         (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
13694         Analyze_Quantified_Expression, Analyze_Slice,
13695         Analyze_Null): issue an error in formal mode on unsupported constructs
13696         * sem_ch5.adb
13697         (Analyze_Block_Statement): only issue error on source block statement
13698         * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
13699         function which returns the last node in a list of nodes for which
13700         Comes_From_Source returns True, if any
13701         * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
13702         Last_Source_Node_In_Sequence
13703         * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
13704         Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
13705         mode on unsupported constructs
13706         * sem_ch9.adb Do not return after issuing error in formal mode, as the
13707         rest of the actions may be needed later on since the error is marked as
13708         not serious.
13709         * sinfo.ads: Typos in comments.
13710
13711 2011-08-01  Pascal Obry  <obry@adacore.com>
13712
13713         * projects.texi: Minor editing.
13714
13715 2011-08-01  Yannick Moy  <moy@adacore.com>
13716
13717         * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
13718         insertion character ~~
13719         * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
13720         (Set_Error_Msg_Lang): new procedure which fixes the language for use
13721         with insertion character ~~
13722         (Set_Msg_Text): treat insertion character ~~
13723         * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
13724         sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
13725         Formal_Error_Msg_... procedures by equivalent Error_Msg_...
13726         procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
13727         errors related to the formal language restriction not serious
13728         (insertion character |).
13729         * par.adb (Par): set formal language for error messages if needed
13730         * sem_ch6.adb (Check_Missing_Return): take into account possible
13731         generated statements at the end of the function
13732         * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
13733         enumeration value to define a new pragma SPARK_95
13734         * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
13735         SPARK_Version): new type and variables to store the SPARK version
13736         (none by default).
13737         (SPARK_Mode): return True when SPARK_Version is set
13738         * par-prag.adb: Correct indentation
13739         (Prag): take Pragma_SPARK_95 into account
13740         * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
13741         into account.
13742
13743 2011-08-01  Robert Dewar  <dewar@adacore.com>
13744
13745         * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
13746         sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
13747         sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
13748
13749 2011-08-01  Pascal Obry  <obry@adacore.com>
13750
13751         * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
13752         Target_Name to Get_Path call.
13753         (Parse_Single_Project): Likewise.
13754         (Post_Parse_Context_Clause): Likewise.
13755         * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
13756         Call Initialise_Project_Path with the proper Target_Name.
13757         (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
13758         search path.
13759         (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
13760         with the proper Target_Name.
13761         * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
13762         Part.Parse routine.
13763         (Parse_Project_And_Apply_Config): Likewise.
13764         * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
13765         This is fine as this part of the code is supporting only native
13766         compilation.
13767         * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
13768         is fine as this part of the code is supporting only native compilation.
13769
13770 2011-08-01  Yannick Moy  <moy@adacore.com>
13771
13772         * sem_util.adb (Enter_Name): issue error in formal mode on declaration
13773         of homonym, unless the homonym is one of the cases allowed in SPARK
13774         * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
13775         package declaration occurring after a body.
13776
13777 2011-08-01  Robert Dewar  <dewar@adacore.com>
13778
13779         * checks.adb, exp_ch4.adb: Minor reformatting.
13780
13781 2011-08-01  Javier Miranda  <miranda@adacore.com>
13782
13783         * einfo.ads (Access_Disp_Table): Fix documentation.
13784         (Dispatch_Table_Wrappers): Fix documentation.
13785
13786 2011-08-01  Pascal Obry  <obry@adacore.com>
13787
13788         * prj-env.adb, prj-env.ads: Minor reformatting.
13789
13790 2011-08-01  Yannick Moy  <moy@adacore.com>
13791
13792         * sem_util.ads, sem_util.adb, par.adb, par_util.adb
13793         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
13794         procedures out of these packages.
13795         * errout.ads, errout.adb
13796         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
13797         procedures in of this package
13798         (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
13799         * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
13800         on misplaced later vs initial declarations, like in Ada 83
13801         * sem_attr.adb (Processing for Analyze_Attribute): issue error in
13802         formal mode on attribute of private type whose full type declaration
13803         is not visible
13804         * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
13805         package declaration inside a package specification
13806         (Analyze_Full_Type_Declaration): issue error in formal mode on
13807         controlled type or discriminant type
13808         * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
13809         user-defined operator means that it should come from the source
13810         (New_Overloaded_Entity): issue error in formal mode on overloaded
13811         entity.
13812         * sem_ch6.ads, sem_ch13.ads: typos in comments.
13813
13814 2011-08-01  Thomas Quinot  <quinot@adacore.com>
13815
13816         * atree.adb: Minor reformatting.
13817         * checks.adb: Minor reformatting.
13818
13819 2011-08-01  Vincent Celier  <celier@adacore.com>
13820
13821         * s-parame-vms-ia64.ads: Fix typo in comment
13822         Minor reformatting
13823         * s-parame-vms-restrict.ads: Removed, unused.
13824
13825 2011-08-01  Javier Miranda  <miranda@adacore.com>
13826
13827         * exp_ch3.adb
13828         (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
13829         * sem_ch3.adb
13830         (Constrain_Index): Remove side effects in the evaluation of the bounds.
13831         * sem_ch3.ads, sem_ch3.adb
13832         (Is_Constant_Bound): New extended version of the subprogram that was
13833         previously located inside function Exp_Ch3.Is_Variable_Size_Array.
13834         Moved here since it is shared by routines of sem_ch3 and exp_ch3.
13835         * sem_aux.ads (Constant_Value): Fix typo in comment.
13836         * checks.adb (Generate_Index_Checks): New implementation which, for
13837         array objects with constant bounds, generates the runtime check
13838         referencing the bounds of the array type. For other cases this routine
13839         provides its previous behavior obtaining such values from the array
13840         object.
13841         * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
13842         parent type.
13843         * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
13844         we cannot have semantic interpretations of the new node.
13845
13846 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
13847
13848         * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
13849         expressions.
13850
13851 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
13852
13853         * sem_ch8.adb: Minor code editing.
13854         * s-vxwext.adb: Remove trailing space.
13855         * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
13856         consistency with other files.
13857
13858 2011-08-01  Thomas Quinot  <quinot@adacore.com>
13859
13860         * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
13861
13862 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
13863
13864         * par-ch10.adb: reject parameterized expressions as compilation unit.
13865         * sem_ch4.adb: handle properly conditional expression with overloaded
13866         then_clause and no else_clause.
13867
13868 2011-08-01  Tristan Gingold  <gingold@adacore.com>
13869
13870         * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
13871         like done by System.Aux_DEC.
13872         * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
13873
13874 2011-08-01  Yannick Moy  <moy@adacore.com>
13875
13876         * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
13877         missing label at end of declaration (subprogram or package)
13878         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
13879         of positional and named parameter association
13880         * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
13881         Error_Msg_SP which adds a prefix to the error message giving the name
13882         of the formal language analyzed
13883         * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
13884         access result type in subprogram, unconstrained array as result type,.
13885         (Analyze_Subprogram_Declaration): issue an error in formal mode for null
13886         procedure
13887         * sem_ch8.adb: Code clean up.
13888
13889 2011-08-01  Javier Miranda  <miranda@adacore.com>
13890
13891         * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
13892         * einfo.ads (Access_Disp_Table): Fix documentation.
13893         (Dispatch_Table_Wrappers): Fix documentation.
13894         * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
13895         Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
13896         to enforce the documentation of this attribute.
13897         (Set_Is_Interface): Cleanup the assertion.
13898         * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
13899         the Underlying_Type entity before reading attribute Access_Disp_Table.
13900         * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
13901         Locate the Underlying_Type before reading attribute Access_Disp_Table.
13902         * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
13903         the Underlying_Type entity before reading attribute Access_Disp_Table.
13904         * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
13905         Locate the Underlying_Type entity before reading attribute
13906         Access_Disp_Table.
13907
13908 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
13909
13910         * s-poosiz.ads: Additional overriding indicators.
13911
13912 2011-08-01  Yannick Moy  <moy@adacore.com>
13913
13914         * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
13915         formal mode.
13916         (Analyze_Iteration_Scheme): issue error in formal mode when loop
13917         parameter specification does not include a subtype mark.
13918         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
13919         formal mode on abstract subprogram.
13920         (Analyze_Subprogram_Specification): issue error in formal mode on
13921         user-defined operator.
13922         (Process_Formals): issue error in formal mode on access parameter and
13923         default expression.
13924         * sem_ch9.adb (Analyze_Abort_Statement,
13925         Analyze_Accept_Statement, Analyze_Asynchronous_Select,
13926         Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
13927         Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
13928         Analyze_Requeue, Analyze_Selective_Accept,
13929         Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
13930         * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
13931         issue error in formal mode on user-defined raise statement.
13932
13933 2011-08-01  Thomas Quinot  <quinot@adacore.com>
13934
13935         * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
13936         declaration being hidden when overriding an implicit inherited
13937         subprogram.
13938         * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
13939         (-gnats), do not complain about a source file that contains only a
13940         pragma No_Body.
13941
13942 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
13943
13944         * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
13945         variable if already set.
13946
13947 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
13948
13949         * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
13950         g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
13951         s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
13952         g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
13953         g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
13954         g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
13955         g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
13956         g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
13957         g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
13958         g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
13959         g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
13960         s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
13961         g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
13962         s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
13963         g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
13964         g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
13965         g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
13966         g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
13967         g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
13968         g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
13969         s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
13970         s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
13971         a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
13972         s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
13973         s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
13974         g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
13975         g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
13976         g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
13977         g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
13978         g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
13979         g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
13980         s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
13981         s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
13982         g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
13983         g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
13984         s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
13985         s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
13986         g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
13987         g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
13988         g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
13989         s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
13990         g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
13991         g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
13992         g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
13993         s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
13994         g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
13995         g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
13996         g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
13997         s-osinte-mingw.ads: Update to GPLv3 run-time license.
13998         Use GNAT instead of GNARL.
13999
14000 2011-08-01  Bob Duff  <duff@adacore.com>
14001
14002         * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
14003         a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
14004         a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
14005         reformatting.
14006
14007 2011-08-01  Yannick Moy  <moy@adacore.com>
14008
14009         * debug.adb (d.D) reverve flag for the SPARK mode
14010         (d.E) reverve flag for SPARK generation mode
14011         (d.F) reverve flag for Why generation mode
14012         * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
14013         ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode):  New
14014         functions which return True when the corresponding modes are set
14015         (Formal_Language): return "spark" or "alfa" when in formal verification
14016         mode.
14017         * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
14018         Error_Msg to prefix the error message with a tag giving the formal
14019         language
14020         (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
14021         message with a tag giving the formal language
14022         * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
14023         block statement
14024         (Analyze_Case_Statement): issue error in formal mode on case statement
14025         with a single "others" case alternative
14026         (Analyze_Exit_Statement): issue errors in formal mode on exit
14027         statements which do not respect SPARK restrictions
14028         (Analyze_Goto_Statement): issue error in formal mode on goto statement
14029         (Check_Unreachable_Code): always issue an error (not a warning) in
14030         formal mode on unreachable code (concerns both code after an infinite
14031         loop and after an unconditional jump, both not allowed in SPARK)
14032         * sem_ch6.adb (Analyze_Return_Statement): add call to
14033         Set_Return_Present for a procedure containing a return statement
14034         (already done for functions in Analyze_Function_Return)
14035         (Analyze_Function_Return): issue error in formal mode on extended
14036         return or if return is not last statement in function
14037         (Check_Missing_Return): issue error in formal mode if function does
14038         not end with return or if procedure contains a return
14039         * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
14040         function to detect if there is an inner scope of its parameter S which
14041         is a loop.
14042
14043 2011-08-01  Thomas Quinot  <quinot@adacore.com>
14044
14045         * sem_ch6.ads: Minor reformatting.
14046
14047 2011-08-01  Javier Miranda  <miranda@adacore.com>
14048
14049         * sem_util.adb (Abstract_Interface_List): Complete condition when
14050         processing private type declarations to avoid reading unavailable
14051         attribute.
14052         (Is_Synchronized_Tagged_Type): Complete condition when processing
14053         private extension declaration nodes to avoid reading unavailable
14054         attribute.
14055
14056 2011-08-01  Thomas Quinot  <quinot@adacore.com>
14057
14058         * sem_ch3.adb: Minor reformatting.
14059
14060 2011-08-01  Thomas Quinot  <quinot@adacore.com>
14061
14062         * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
14063         i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
14064         s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
14065         s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
14066         for VMS, instead parametrize the common implementation with
14067         System.Parameters declarations.
14068
14069 2011-08-01  Eric Botcazou  <ebotcazou@adacore.com>
14070
14071         * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
14072
14073 2011-08-01  Tristan Gingold  <gingold@adacore.com>
14074
14075         * seh_init.c: Fix SEH handler installation on win64.
14076
14077 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
14078
14079         * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
14080         double analysis of an anonymous access to subprogram, because it can
14081         lead to improper sharing of profiles and a back-end crash.
14082
14083 2011-08-01  Robert Dewar  <dewar@adacore.com>
14084
14085         * make.adb, sem_ch4.adb: Minor reformatting.
14086         * gcc-interface/Make-lang.in: Update dependencies.
14087         * sem_util.adb, exp_ch5.adb: Minor reformatting.
14088
14089 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
14090
14091         * gnat_rm.texi: Fix definition of Long_Integer.
14092
14093 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
14094
14095         * exp_aggr.adb: check limit size of static aggregate unconditionally,
14096         to prevent storage exhaustion.
14097         * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
14098         finalized is a function body, insert the cleanup code before the final
14099         return statement, to prevent spurious warnings.
14100         * s-pooglo.ads: add overriding indicator.
14101
14102 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
14103
14104         * sem_ch4.adb (Operator_Check): improve error message when both a
14105         with_clause and a use_clause are needed to make operator usage legal.
14106         * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
14107         determine whether a compilation unit is visible within an other,
14108         either through a with_clause in the current unit, or a with_clause in
14109         its library unit or one one of its parents.
14110
14111 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
14112
14113         * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
14114         over an arbitrary expression of an array or container type.
14115         * lib-xref.adb: clarify comment.
14116
14117 2011-08-01  Bob Duff  <duff@adacore.com>
14118
14119         * einfo.ads: Minor reformatting.
14120         * debug.adb: Minor comment improvement.
14121
14122 2011-08-01  Javier Miranda  <miranda@adacore.com>
14123
14124         * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
14125         consider hidden subprograms as valid candidates.
14126
14127 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
14128
14129         * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
14130
14131 2011-08-01  Vasiliy Fofanov  <fofanov@adacore.com>
14132
14133         * gnat_ugn.texi: Fix typo.
14134
14135 2011-08-01  Robert Dewar  <dewar@adacore.com>
14136
14137         * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
14138         lib-xref.adb: Minor reformatting
14139
14140 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
14141
14142         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
14143         when to generate a call to Move_Final_List.
14144         (Has_Controlled_Parts): Remove this function.
14145
14146 2011-08-01  Geert Bosch  <bosch@adacore.com>
14147
14148         * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
14149         "," in choice list.
14150
14151 2011-08-01  Thomas Quinot  <quinot@adacore.com>
14152
14153         * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
14154         explicit raise of a predefined exception as Comes_From_Source if the
14155         original N_Raise_Statement comes from source.
14156
14157 2011-08-01  Robert Dewar  <dewar@adacore.com>
14158
14159         * sinfo.ads: Add comment.
14160         * sem_ch6.adb: Minor reformatting.
14161
14162 2011-08-01  Robert Dewar  <dewar@adacore.com>
14163
14164         * freeze.adb (Freeze_Entity): Refine check for bad component size
14165         clause to avoid rejecting confirming clause when atomic/aliased present.
14166
14167 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
14168
14169         * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
14170         better determine whether an entity reference is a write.
14171         * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
14172         subcomponent.
14173         * lib-xref.adb (Output_References): Do no suppress a read reference at
14174         the same location as an immediately preceeding modify-reference, to
14175         handle properly in-out actuals.
14176
14177 2011-08-01  Tristan Gingold  <gingold@adacore.com>
14178
14179         * env.c (__gnat_setenv) [VMS]: Refine previous change.
14180
14181 2011-08-01  Quentin Ochem  <ochem@adacore.com>
14182
14183         * i-cstrin.adb (New_String): Changed implementation, now uses only the
14184         heap to compute the result.
14185
14186 2011-08-01  Robert Dewar  <dewar@adacore.com>
14187
14188         * atree.ads: Minor reformatting.
14189
14190 2011-08-01  Emmanuel Briot  <briot@adacore.com>
14191
14192         * g-expect.adb (Get_Command_Output): Fix memory leak.
14193
14194 2011-08-01  Geert Bosch  <bosch@adacore.com>
14195
14196         * cstand.adb (P_Float_Type): New procedure to print the definition of
14197         predefined fpt types.
14198         (P_Mixed_Name): New procedure to print a name using mixed case
14199         (Print_Standard): Use P_Float_Type for printing floating point types
14200         * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
14201         precision IEEE float.
14202
14203 2011-08-01  Thomas Quinot  <quinot@adacore.com>
14204
14205         * sem_ch3.adb: Minor reformatting.
14206
14207 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
14208
14209         * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
14210         the completion of a generic function, insert the new body rather than
14211         rewriting the original.
14212
14213 2011-08-01  Yannick Moy  <moy@adacore.com>
14214
14215         * sinfo.ads, errout.ads: Typos in comments.
14216
14217 2011-08-01  Robert Dewar  <dewar@adacore.com>
14218
14219         * par-endh.adb: Minor reformatting.
14220
14221 2011-08-01  Robert Dewar  <dewar@adacore.com>
14222
14223         * aspects.ads, aspects.adb: Add aspects for library unit pragmas
14224         (Pre_Post_Aspects): New subtype.
14225         * par-ch12.adb (P_Generic): New syntax for aspects in packages
14226         * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
14227         * par-ch7.adb (P_Package): Remove Decl parameter
14228         (P_Package): Handle new syntax for aspects (before IS)
14229         * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
14230         new aspect syntax
14231         (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
14232         * par.adb (P_Aspect_Specifications): Add Semicolon parameter
14233         (P_Package): Remove Decl parameter
14234         * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
14235         aspects
14236         * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
14237         specs
14238         * sem_util.ads, sem_util.adb (Static_Boolean): New function
14239         * sinfo.ads: Document new syntax for aspects in packages etc.
14240         * sprint.adb: Handle new syntax of aspects before IS in package
14241
14242 2011-08-01  Thomas Quinot  <quinot@adacore.com>
14243
14244         * atree.ads: Minor reformatting.
14245         * sem_prag.adb: Minor reformatting.
14246
14247 2011-08-01  Robert Dewar  <dewar@adacore.com>
14248
14249         * exp_util.adb (Insert_Actions): Fix error in handling Actions for
14250         case expr alternative.
14251
14252 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
14253
14254         * sem_ch12.adb: Fix typo.
14255
14256 2011-08-01  Geert Bosch  <bosch@adacore.com>
14257
14258         * sem_prag.adb (Check_No_Link_Name): New procedure.
14259         (Process_Import_Or_Interface): Use Check_No_Link_Name.
14260         * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
14261         instead of Standard_Long_Long_Float_Size global. Preparation for
14262         eventual removal of per type constants.
14263         * exp_util.ads (Get_Stream_Size): New function returning the stream
14264         size value of subtype E.
14265         * exp_util.adb (Get_Stream_Size): Implement new function.
14266         * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
14267         function.
14268         * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
14269         * einfo.adb:
14270         (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
14271
14272 2011-08-01  Geert Bosch  <bosch@adacore.com>
14273
14274         * cstand.adb: Fix comments.
14275         * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
14276         count of arguments.
14277
14278 2011-08-01  Robert Dewar  <dewar@adacore.com>
14279
14280         * exp_ch4.adb, sem_cat.adb: Minor reformatting.
14281
14282 2011-08-01  Geert Bosch  <bosch@adacore.com>
14283
14284         * atree.ads: Fix comment.
14285
14286 2011-08-01  Robert Dewar  <dewar@adacore.com>
14287
14288         * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
14289         * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
14290         * par.adb: Add with for Namet.Sp.
14291         * par-tchk.adb: Minor reformatting.
14292
14293 2011-08-01  Vincent Celier  <celier@adacore.com>
14294
14295         * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
14296         (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
14297         of the init procedure of a SAL.
14298         * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
14299         New procedure.
14300
14301 2011-08-01  Thomas Quinot  <quinot@adacore.com>
14302
14303         * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
14304         reformatting.
14305
14306 2011-08-01  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14307
14308         * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
14309
14310 2011-08-01  Thomas Quinot  <quinot@adacore.com>
14311
14312         * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
14313         conformant with its spec (return True only for types that have
14314         an overriding Initialize primitive operation that prevents them from
14315         having preelaborable initialization).
14316         * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
14317         initialization for controlled types in Ada 2005 or later mode.
14318
14319 2011-08-01  Robert Dewar  <dewar@adacore.com>
14320
14321         * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
14322         Postcondition.
14323         (Same_Aspect): New function.
14324         * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
14325         Type_Invariant, Precondition, Postcondition.
14326         * snames.ads-tmpl: Add Name_Type_Invariant.
14327
14328 2011-08-01  Robert Dewar  <dewar@adacore.com>
14329
14330         * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
14331         here.
14332         (Freeze_All_Ent): Fix error in handling inherited aspects.
14333         * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
14334         already analyzed, but don't skip entire processing of a declaration,
14335         that's wrong in some cases of declarations being rewritten.
14336         (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
14337         Don't delay for integer, string literals
14338         Treat predicates in usual manner for delay, remove special case code,
14339         not needed.
14340         (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
14341         (Build_Predicate_Function): Update saved expression in aspect
14342         (Build_Invariant_Procedure): Update saved expression in aspect
14343         * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
14344         of replacement of discriminant references if the reference is simple.
14345
14346 2011-08-01  Robert Dewar  <dewar@adacore.com>
14347
14348         * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
14349         * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
14350         Static_Predicate and Dynamic_Predicate.
14351         (Build_Predicate_Function): Add processing for Static_Predicate
14352         and Dynamic_Predicate.
14353         * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
14354         (From_Static_Predicate): New flag
14355         * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
14356
14357 2011-08-01  Robert Dewar  <dewar@adacore.com>
14358
14359         * usage.adb: Documentation cleanup for Ada version modes in usage.
14360         * expander.adb: Minor reformatting.
14361
14362 2011-08-01  Robert Dewar  <dewar@adacore.com>
14363
14364         * atree.ads: Minor comment fix.
14365         * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
14366         a-witeio.ads, sem_prag.adb: Minor reformatting.
14367
14368 2011-08-01  Doug Rupp  <rupp@adacore.com>
14369
14370         * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
14371         pointers. Use descrip.h header file for convenience. Add some
14372         comments.
14373
14374 2011-08-01  Robert Dewar  <dewar@adacore.com>
14375
14376         * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
14377         (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
14378         * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
14379         New procedure.
14380         (Check_Aspect_At_End_Of_Declarations): New procedure
14381         (Analye_Aspect_Specification): Minor changes for above procedures
14382         * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
14383         specification node as well.
14384
14385 2011-08-01  Pascal Obry  <obry@adacore.com>
14386
14387         * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
14388         Windows files. Use GetFilesAttributes() in this case to check for file
14389         existence instead of returning with an error code.
14390
14391 2011-08-01  Vincent Celier  <celier@adacore.com>
14392
14393         * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
14394         High is above Source length.
14395
14396 2011-08-01  Robert Dewar  <dewar@adacore.com>
14397
14398         * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
14399
14400 2011-08-01  Robert Dewar  <dewar@adacore.com>
14401
14402         * aspects.ads (Boolean_Aspects): New subtype.
14403         * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
14404         for derived types in cases where the parent type and derived type have
14405         aspects.
14406         * freeze.adb (Freeze_Entity): Fix problems in handling derived type
14407         with aspects when parent type also has aspects.
14408         (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
14409         boolean expression at this point).
14410         * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
14411         accordance with final decision on the Ada 2012 feature.
14412         * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
14413
14414 2011-08-01  Matthew Heaney  <heaney@adacore.com>
14415
14416         * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
14417
14418 2011-08-01  Pascal Obry  <obry@adacore.com>
14419
14420         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
14421         Fix Replace_Slice when High is above current string size.
14422         (Replace_Slice): Fix DL computation when High is above current
14423         string length.
14424
14425 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
14426
14427         * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
14428
14429 2011-08-01  Matthew Heaney  <heaney@adacore.com>
14430
14431         * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
14432         of node.
14433
14434 2011-08-01  Pascal Obry  <obry@adacore.com>
14435
14436         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
14437         reformatting.
14438
14439 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
14440
14441         * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
14442         access to protected subprograms in generic bodies.
14443         * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
14444         protected type, indicate that the convention of the subprogram is
14445         Convention_Protected, because it may be used in subsequent declarations
14446         within the protected declaration.
14447
14448 2011-08-01  Vincent Celier  <celier@adacore.com>
14449
14450         * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
14451         and "final" procedures when the name of the library is "ada", to avoid
14452         duplicate symbols "adainit" and "adafinal" in executables.
14453
14454 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
14455
14456         * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
14457         quantified expression that appears within a postcondition and uses the
14458         Ada2012 'Result attribute.
14459
14460 2011-07-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
14461
14462         * init.c (__gnat_error_handler): Cast reason to int.
14463         (__gnat_install_handler): Explain sa_sigaction use.
14464
14465 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
14466
14467         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
14468         subprogram has copy-in copy-out parameters, try to promote the mode of
14469         the return type if it is passed in registers.
14470
14471 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
14472
14473         * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
14474         left operand as addressable.
14475
14476 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
14477
14478         * gcc-interface/gigi.h (build_function_stub): Remove.
14479         (build_return_expr): Likewise.
14480         (convert_vms_descriptor): Declare.
14481         * gcc-interface/utils.c (convert_vms_descriptor): Make global.
14482         (build_function_stub): Move to...
14483         * gcc-interface/utils2.c (build_return_expr): Move to...
14484         * gcc-interface/trans.c (build_function_stub): ...here.
14485         (build_return_expr): ...here.
14486         (Subprogram_Body_to_gnu): Add local variable for language_function.
14487         Disconnect the parameter attributes cache, if any, once done with it.
14488         Call end_subprog_body only after setting the end_locus.
14489         Build the stub associated with the function, if any, at the very end.
14490         (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
14491         variables and streamline control flow.
14492
14493 2011-07-23  Arnaud Charlet  <charlet@adacore.com>
14494
14495         PR ada/49819
14496         * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
14497         g-trasym-dwarf.adb.
14498
14499 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
14500
14501         PR bootstrap/49794
14502         * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
14503         Assign to act.sa_sigaction.
14504         * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
14505         current->return_address to char * before arithmetic.
14506
14507 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
14508
14509         * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
14510         Correct argument types.
14511         Extract code from reason.
14512         (__gnat_install_handler): Assign to act.sa_sigaction.
14513
14514 2011-07-21  Eric Botcazou  <ebotcazou@adacore.com>
14515
14516         * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
14517         (GNAT1_OBJS): ...here.
14518
14519 2011-07-15  Eric Botcazou  <ebotcazou@adacore.com>
14520
14521         PR ada/48711
14522         * g-socthi-mingw.adb (Fill): Fix formatting.
14523
14524         * gcc-interface/gigi.h: Move around comment.
14525
14526 2011-07-14  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
14527
14528         PR ada/46350
14529         * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
14530
14531 2011-07-14  Florian Weimer  <fw@deneb.enyo.de>
14532
14533         PR ada/48711
14534         * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
14535
14536 2011-07-13  Eric Botcazou  <ebotcazou@adacore.com>
14537
14538         * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
14539         range comparison if Pmode is SImode.
14540
14541 2011-07-12  Laurent GUERBY  <laurent@guerby.net>
14542             Eric Botcazou  <ebotcazou@adacore.com>
14543
14544         * adadecode.c: Wrap up in extern "C" block.
14545         * adadecode.h: Likewise.
14546         * adaint.c: Likewise.  Remove 'const' keyword.
14547         * adaint.h: Likewise.
14548         * argv.c: Likewise.
14549         * atree.h: Likewise.
14550         * cio.c: Likewise.
14551         * cstreams.c: Likewise.
14552         * env.c: Likewise.
14553         * exit.c: Likewise.
14554         * fe.h: Likewise.
14555         * final.c: Likewise.
14556         * init.c: Likewise.
14557         * initialize.c: Likewise.
14558         * link.c: Likewise.
14559         * namet.h: Likewise.
14560         * nlists.h: Likewise.
14561         * raise.c: Likewise.
14562         * raise.h: Likewise.
14563         * repinfo.h: Likewise.
14564         * seh_init.c: Likewise.
14565         * targext.c: Likewise.
14566         * tracebak.c: Likewise.
14567         * uintp.h: Likewise.
14568         * urealp.h: Likewise.
14569         * xeinfo.adb: Wrap up generated C code in extern "C" block.
14570         * xsinfo.adb: Likewise.
14571         * xsnamest.adb: Likewise.
14572         * gcc-interface/gadaint.h: Wrap up in extern "C" block.
14573         * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
14574         * gcc-interface/misc.c: Likewise.
14575         * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
14576         (GNAT1_C_OBJS): Remove ada/b_gnat1.o.  List ada/seh_init.o and
14577         ada/targext.o here...
14578         (GNAT_ADA_OBJS): ...and not here.
14579         (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
14580         (GNATBIND_OBJS): Reorder.
14581
14582 2011-07-07  Richard Henderson  <rth@redhat.com>
14583
14584         * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
14585         dwarf2out_frame_init.
14586
14587 2011-07-07  Eric Botcazou  <ebotcazou@adacore.com>
14588
14589         * gcc-interface/misc.c (gnat_init): Tweak previous change.
14590
14591 2011-07-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
14592
14593         PR target/39150
14594         * gcc-interface/Makefile.in: Handle x86_64-solaris2.
14595
14596 2011-07-06  Richard Guenther  <rguenther@suse.de>
14597
14598         * gcc-interface/misc.c (gnat_init): Merge calls to
14599         build_common_tree_nodes and build_common_tree_nodes_2.
14600         Re-initialize boolean_false_node.
14601
14602 2011-07-02  Eric Botcazou  <ebotcazou@adacore.com>
14603             Olivier Hainque  <hainque@adacore.com>
14604             Nicolas Setton  <setton@adacore.com>
14605
14606         * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
14607         the type according to the ARTIFICIAL_P parameter.
14608         (create_type_decl): Likewise.
14609         (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
14610
14611 2011-07-01  Eric Botcazou  <ebotcazou@adacore.com>
14612
14613         * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
14614         (gnatbind): Likewise.
14615
14616 2011-06-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
14617
14618         * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
14619
14620 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
14621
14622         * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
14623         local variable throughout.  Remove useless call to Base_Type.
14624         (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
14625         Take it also into account for the volatileness of the field.  Set the
14626         TREE_SIDE_EFFECTS flag as well in this case.  Reorder some warnings.
14627
14628 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
14629
14630         * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
14631         on a dereference built for a by-ref object if it has an address clause.
14632
14633 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
14634
14635         * einfo.ads (Address_Taken): Document use for the second argument of
14636         Asm_Input and Asm_Output attributes.
14637         * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
14638         argument is an entity name, then set Address_Taken on it.
14639         <Attribute_Asm_Output>: Likewise.
14640         * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
14641         Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
14642         (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
14643         memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
14644
14645 2011-06-16  Joern Rennecke  <joern.rennecke@embecosm.com>
14646
14647         PR middle-end/46500
14648         * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
14649
14650 2011-06-14  Joseph Myers  <joseph@codesourcery.com>
14651
14652         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
14653         (ada/utils.o): Update dependencies.
14654         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
14655         ../../../libcpp/libcpp.a.
14656         * gcc-interface/utils.c: Include common/common-target.h.
14657         (process_attributes): Use targetm_common.have_named_sections.
14658
14659 2011-06-07  Richard Guenther  <rguenther@suse.de>
14660
14661         * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
14662         set_sizetype.
14663
14664 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
14665
14666         * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
14667         TREE_THIS_NOTRAP flag.
14668
14669 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
14670
14671         * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
14672         Fix thinko.
14673
14674 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
14675
14676         * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
14677         constants whose full view has discriminants specially.
14678
14679 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
14680
14681         * gcc-interface/utils.c: Include diagnostic.h.
14682         (gnat_write_global_declarations): Output debug information for all
14683         global type declarations before finalizing the compilation unit.
14684         * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
14685
14686 2011-05-25  Jakub Jelinek  <jakub@redhat.com>
14687
14688         * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
14689
14690 2011-05-25  Kai Tietz  <ktietz@redhat.com>
14691
14692         * adaint.c (__gnat_to_canonical_file_list_next): Use array
14693         initialization instead of const/none-const pointer assignment.
14694
14695 2011-05-24  Joseph Myers  <joseph@codesourcery.com>
14696
14697         * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
14698         $(EXTRA_GNAT1_OBJS).
14699         (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
14700         (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
14701         (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
14702         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
14703         libcommon-target.a instead of prefix.o.
14704
14705 2011-05-21  Joseph Myers  <joseph@codesourcery.com>
14706
14707         PR ada/49097
14708         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
14709
14710 2011-05-20  Joseph Myers  <joseph@codesourcery.com>
14711
14712         * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
14713         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
14714         instead of version.o.
14715
14716 2011-05-18  Kai Tietz  <ktietz@redhat.com>
14717
14718         * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
14719         boolean_false_node instead of integer_zero_node.
14720         (convert_with_check): Likewise.
14721         * gcc-interface/decl.c (choices_to_gnu): Likewise.
14722
14723 2011-05-12  Eric Botcazou  <ebotcazou@adacore.com>
14724
14725         * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
14726         type of the parameter is an unconstrained array, convert the actual to
14727         the type of the formal in the In Out and Out cases as well.
14728
14729 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
14730
14731         * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
14732         call build_function_type_array or build_varargs_function_type_array
14733         instead.
14734         (create_subprog_type): Don't call build_function_type; call
14735         build_function_type_vec instead.
14736
14737 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
14738
14739         * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
14740         (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
14741         (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
14742
14743 2011-05-07  Eric Botcazou  <ebotcazou@adacore.com>
14744
14745         * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
14746
14747         * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
14748         * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
14749
14750 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
14751
14752         * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
14753
14754 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
14755
14756         * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
14757         instead of accessing TYPE_ARG_TYPES directly.
14758         * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
14759
14760 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
14761
14762         PR ada/48844
14763         * gcc-interface/gigi.h (get_variant_part): Declare.
14764         * gcc-interface/decl.c (get_variant_part): Make global.
14765         * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
14766         types have the same constant size, are record types and T1 has a
14767         variant part while T2 doesn't.
14768
14769 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
14770
14771         * gcc-interface/utils.c (begin_subprog_body): Do not call
14772         get_pending_sizes.
14773         (end_subprog_body): Likewise.
14774
14775 2011-05-04  Richard Guenther  <rguenther@suse.de>
14776
14777         * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
14778         int_const_binop.
14779         (pos_to_constructor): Likewise.
14780
14781 2011-05-03  Nathan Froyd  <froydnj@codesourcery.com>
14782             Eric Botcazou  <ebotcazou@adacore.com>
14783
14784         * gcc-interface/trans.c (gigi): Call build_function_type_list instead
14785         of build_function_type.  Adjust calls to...
14786         (build_raise_check): ...this.  Do not take a void_tree parameter.
14787         Call build_function_type_list instead of build_function_type.
14788         Fix head comment and swap couple of conditional blocks.
14789
14790 2011-04-30  Eric Botcazou  <ebotcazou@adacore.com>
14791
14792         * gnatvsn.ads (Library_Version): Bump to 4.7.
14793         (Current_Year): Bump to 2011.
14794
14795 2011-04-29  Michael Matz  <matz@suse.de>
14796
14797         * gcc-interface/misc.c (gnat_handle_option): Set
14798         warn_maybe_uninitialized.
14799
14800 2011-04-23  Gerald Pfeifer  <gerald@pfeifer.com>
14801
14802         * gnat_ugn.texi (Complexity Metrics Control): Update link to
14803         the Watson/McCabe paper.
14804
14805 2011-04-23  Jim Meyering  <meyering@redhat.com>
14806
14807         * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
14808
14809 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
14810
14811         * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
14812         onto the new type.
14813
14814 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
14815
14816         * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
14817         parameter.
14818         * gcc-interface/utils.c (create_subprog_decl): Likewise.  Set
14819         DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
14820         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
14821         ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
14822         <all>: Do not set flags on the reused DECL node coming from an alias.
14823         Set DECL_IGNORED_P on the DECL node built for subprograms if they
14824         don't need debug info here...
14825         * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
14826         (gigi): Adjust calls to create_subprog_decl.
14827         (build_raise_check): Likewise.
14828         (establish_gnat_vms_condition_handler): Likewise.
14829         (Compilation_Unit_to_gnu): Likewise.
14830         (gnat_to_gnu): Likewise.
14831
14832 2011-04-21  Eric Botcazou  <ebotcazou@adacore.com>
14833
14834         * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
14835         (NO_REORDER_ADAFLAGS): New variable.
14836         (EXTRA_GNATTOOLS): Always define.
14837         (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
14838         Clean up and adjust list of files compiled with special options.
14839         * gcc-interface/Make-lang.in: Likewise.
14840         (ada/decl.o): Cosmetical change.
14841         (ada/misc.o): Remove dependency on $(PLUGIN_H).
14842
14843 2011-04-20  Jim Meyering  <meyering@redhat.com>
14844
14845         * initialize.c (__gnat_initialize): Remove useless if-before-free.
14846
14847 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
14848
14849         * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
14850         $(CFLAGS) on the link line.
14851
14852 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
14853
14854         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
14855         padded type built for the return type if it is unconstrained.
14856
14857 2011-04-14  Nathan Froyd  <froydnj@codesourcery.com>
14858
14859         * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
14860
14861 2011-04-12  Nathan Froyd  <froydnj@codesourcery.com>
14862
14863         * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
14864         before calling TREE_CHAIN.
14865         * gcc-interface/misc.c (gnat_init_ts): New function.
14866         (LANG_HOOKS_INIT_TS): Define.
14867
14868 2011-04-12  Martin Jambor  <mjambor@suse.cz>
14869
14870         * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
14871         instead of cgraph_node.
14872
14873 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
14874
14875         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
14876         alignment on fields of the RETURN type built for the Copy-In Copy-Out
14877         mechanism.
14878
14879 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
14880
14881         * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
14882         of aggregate types that contain a placeholder.
14883
14884 2011-04-08  Nathan Froyd  <froydnj@codesourcery.com>
14885
14886         * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
14887         TYPE_ARG_TYPES.
14888         (handle_type_generic_attribute): Likewise.
14889
14890 2011-04-04  Eric Botcazou  <ebotcazou@adacore.com>
14891
14892         PR ada/47163
14893         * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
14894
14895 2011-04-04  Kai Tietz  <ktietz@redhat.com>
14896
14897         PR ada/47163
14898         * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
14899         to flag value.
14900
14901 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
14902
14903         * gcc-interface/utils2.c (build_allocator): In the unconstrained array
14904         type case, do not strip a padding type around the array type.
14905
14906 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
14907
14908         * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
14909         types.
14910
14911 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
14912
14913         * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
14914         * gcc-interface/misc.c (gnat_handle_option): Remove special handling
14915         code for -feliminate-unused-debug-types.
14916         (gnat_post_options): Likewise.
14917
14918 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
14919
14920         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
14921         declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
14922         distinct copy.
14923
14924 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
14925
14926         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
14927         DECL_ARTIFICIAL flag on enumeration types.
14928
14929 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
14930
14931         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
14932         fat pointer types artificial unconditionally.
14933         <E_Array_Subtype>: Attach the base array type as a parallel type if it
14934         isn't artificial.
14935
14936 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
14937
14938         * gcc-interface/gigi.h (get_dummy_type): Declare.
14939         (build_dummy_unc_pointer_types): Likewise.
14940         (finish_fat_pointer_type): Likewise.
14941         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
14942         fat pointer type has been built, complete it in place.
14943         <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
14944         and thin pointers.  Remove useless variable.
14945         (finish_fat_pointer_type): Make global and move to...
14946         * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
14947         (get_dummy_type): New function.
14948         (build_dummy_unc_pointer_types): Likewise.
14949         (gnat_pushdecl): Propage the name to the anonymous variants only.
14950         (update_pointer_to): Only adjust the pointer types in the unconstrained
14951         array case.
14952
14953 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
14954
14955         * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
14956         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
14957         if this is a Taft amendment type and the full declaration is available.
14958         * gcc-interface/trans.c (process_type): Likewise.
14959         If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
14960         (process_freeze_entity): Likewise.
14961         * gcc-interface/utils.c (dummy_global): New static variable.
14962         (gnat_write_global_declarations): If there are types declared as used
14963         at the global level, insert them in the global hash table.
14964
14965 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
14966
14967         * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
14968         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
14969         declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
14970         copy.
14971         (record_builtin_type): Add ARTIFICIAL_P parameter.  Set DECL_ARTIFICIAL
14972         flag of the type accordingly.
14973         * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
14974
14975 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
14976
14977         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
14978         finalizing types when updating the pointers to the designated type.
14979         <all>: Finalize the deferred types even if we didn't defer processing
14980         of incomplete types in this invocation.
14981
14982 2011-04-01  Olivier Hainque  <hainque@adacore.com>
14983             Nicolas Setton  <setton@adacore.com>
14984             Eric Botcazou  <ebotcazou@adacore.com>
14985
14986         * gcc-interface/misc.c (gnat_descriptive_type): New function.
14987         (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
14988
14989 2011-03-28  Kai Tietz  <ktietz@redhat.com>
14990
14991         * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
14992         Windows targets.
14993         (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
14994         * system-mingw.ads (System): Change ZCX_By_Default default to True.
14995
14996         * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
14997
14998 2011-03-28  Tristan Gingold  <gingold@adacore.com>
14999
15000         PR ada/44431
15001         * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
15002         Use ada output of gnatbind.
15003         (ada/b_gnatb.adb): Ditto.
15004         (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
15005         (ada.mostlyclean, ada.stage1)
15006         (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
15007         (ada.stagefeedback): Adjust.
15008         * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
15009         Use ada output of gnatbind.
15010         (b_gnatm.adb): Ditto.
15011         (b_gnatl.o, b_gnatm.o): New rules.
15012
15013 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
15014
15015         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
15016         for the padded type built to support a specified size or alignment.
15017
15018 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
15019
15020         * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
15021         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
15022         unconditionally to the end of the unit when the designated type is
15023         limited_with'ed.
15024         <all>: Rename local variable.  Attempt to un-defer types only and do it
15025         for limited_with'ed types as well.
15026         (finalize_from_with_types): Adjust comment.  Rename variable and tidy.
15027         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
15028         consistently and remove redundant call to finalize_from_with_types.
15029
15030 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
15031
15032         * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
15033         subprograms without a previous spec declared in the same unit.
15034         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
15035         subprograms at the end of the unit instead of at the beginning.
15036         * gcc-interface/utils.c (create_subprog_decl): Check that the entity
15037         isn't public for the special handling of non-inline functions nested
15038         inside inline external functions.
15039
15040 2011-03-25  Jeff Law  <law@redhat.com>
15041
15042         * gcc-interface/utils.c (def_fn_type): Add missing va_end.
15043
15044 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
15045
15046         * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
15047         * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
15048         to compute Set_Size_Depends_On_Discriminant.
15049         (Layout_Type): Call it on array types in back-end layout mode.
15050         * sem_util.adb (Requires_Transient_Scope): Return true for array
15051         types only if the size depends on the value of discriminants.
15052         * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
15053         type if the RHS is a call to a function that returns an unconstrained
15054         type with default discriminant.
15055
15056 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
15057
15058         * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
15059         non-conversion to the nominal result type at the end.
15060
15061 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
15062
15063         * gcc-interface/trans.c (create_temporary): New function taken from...
15064         (create_init_temporary): ...here.  Call it.
15065         (call_to_gnu): Create the temporary for the return value early, if any.
15066         Create it for a function with copy-in/copy-out parameters if there is
15067         no target; in other cases of copy-in/copy-out, use another temporary.
15068         Push the new binding level lazily.  Add and rename local variables.
15069
15070 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
15071
15072         * gcc-interface/decl.c (validate_size): Improve comments and tweak
15073         error message.
15074         (set_rm_size): Likewise.
15075
15076 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
15077
15078         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
15079         for the padded type built in order to support a specified alignment.
15080         Fix incorrect formatting.
15081
15082 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
15083
15084         PR bootstrap/48216
15085         * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
15086
15087 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
15088
15089         * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
15090         rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
15091         to the end of the list.  Adjust recursive call.  Rename local variable.
15092         If REORDER is true, reorder components of the record type.
15093         (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
15094         components_to_record and adjust the parameter list.
15095
15096 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
15097
15098         * gcc-interface/decl.c (elaborate_expression_1): When optimization is
15099         disabled, use the variable for bounds of loop iteration scheme.
15100
15101 2011-03-21  Kai Tietz  <ktietz@redhat.com>
15102
15103         PR target/12171
15104         * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
15105
15106 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
15107
15108         * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
15109         out whether the expression is read-only.  Short-circuit placeholder
15110         case and rename a couple of local variables.
15111
15112 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
15113
15114         * gcc-interface/gigi.h (smaller_form_type_p): Declare.
15115         * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
15116         * gcc-interface/utils.c (smaller_form_type_p): ...to here.
15117         (convert): Deal with conversions from a smaller form type specially.
15118
15119 2011-02-14  Eric Botcazou  <ebotcazou@adacore.com>
15120
15121         * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
15122         its argument, except for the special -I- switch.
15123
15124 2011-02-12  Gerald Pfeifer  <gerald@pfeifer.com>
15125
15126         * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
15127         "Ada Issues".
15128
15129 2011-02-08  Eric Botcazou  <ebotcazou@adacore.com>
15130
15131         * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
15132
15133 2011-02-03  Eric Botcazou  <ebotcazou@adacore.com>
15134
15135         * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
15136         GNAT_FORMAL.
15137         * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
15138         * gcc-interface/utils.c (fill_vms_descriptor): ...here.  Take GNU_TYPE
15139         instead of GNAT_FORMAL.  Protect the expression against multiple uses.
15140         Do not generate the check directly, instead instantiate the template
15141         check present in the descriptor.
15142         (make_descriptor_field): Move around.
15143         (build_vms_descriptor32): Build a template check in the POINTER field.
15144         (build_vms_descriptor): Remove useless suffixes.
15145         * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
15146
15147 2011-01-26  Eric Botcazou  <ebotcazou@adacore.com>
15148
15149         PR bootstrap/47467
15150         * targext.c: Include target files if IN_RTS is defined.
15151
15152 2011-01-26  Richard Guenther  <rguenther@suse.de>
15153
15154         PR bootstrap/47467
15155         * targext.c: Include config.h.
15156         * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
15157         dependency.
15158
15159 2011-01-04  Pascal Obry  <obry@adacore.com>
15160             Eric Botcazou  <ebotcazou@adacore.com>
15161
15162         * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
15163
15164 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
15165
15166         * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
15167         end-of-case on the end label and its associated gotos, if any.
15168
15169 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
15170
15171         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
15172         expressions of the parameter cache within the statement group of
15173         the CICO mechanism.
15174
15175 2011-01-04  Olivier Hainque  <hainque@adacore.com>
15176             Eric Botcazou  <ebotcazou@adacore.com>
15177
15178         * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
15179         (set_end_locus_from_node): New function.
15180         (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
15181         make and the function end_locus.
15182         (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
15183         for the elaboration subprogram.
15184         (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
15185         set the end_locus of the expression as well.
15186
15187 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
15188
15189         PR ada/47131
15190         * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
15191         variables that are referenced in exception handlers volatile.
15192
15193
15194 \f
15195 Copyright (C) 2011 Free Software Foundation, Inc.
15196
15197 Copying and distribution of this file, with or without modification,
15198 are permitted in any medium without royalty provided the copyright
15199 notice and this notice are preserved.
15200
15201         * gnat_rm.texi: Ramification of pragma Eliminate documentation
15202          - fix bugs in the description of Source_Trace;
15203          - get rid of UNIT_NAME;
15204
15205 2011-08-02  Javier Miranda  <miranda@adacore.com>
15206
15207         * exp_ch9.adb
15208         (Build_Dispatching_Requeue): Adding support for VM targets
15209         since we cannot directly reference the Tag entity.
15210         * exp_sel.adb (Build_K): Adding support for VM targets.
15211         (Build_S_Assignment): Adding support for VM targets.
15212         * exp_disp.adb
15213         (Default_Prim_Op_Position): In VM targets do not restrict availability
15214         of predefined interface primitives to compiling in Ada 2005 mode.
15215         (Is_Predefined_Interface_Primitive): In VM targets this service is not
15216         restricted to compiling in Ada 2005 mode.
15217         (Make_VM_TSD): Generate code that declares and initializes the OSD
15218         record. Needed to support dispatching calls through synchronized
15219         interfaces.
15220         * exp_ch3.adb
15221         (Make_Predefined_Primitive_Specs): Enable generation of predefined
15222         primitives associated with synchronized interfaces.
15223         (Make_Predefined_Primitive_Bodies): Enable generation of predefined
15224         primitives associated with synchronized interfaces.
15225
15226 2011-08-02  Yannick Moy  <moy@adacore.com>
15227
15228         * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
15229         statements hidden in SPARK if preceded by the HIDE directive
15230         (Parse_Exception_Handlers): mark each exception handler in a sequence of
15231         exception handlers as hidden in SPARK if preceded by the HIDE directive
15232         * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
15233         if starting with the HIDE directive
15234         * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
15235         starting with the HIDE directive; mark the declarations in a private
15236         part as hidden in SPARK if the private part starts with the HIDE
15237         directive
15238         * restrict.adb, restrict.ads
15239         (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
15240         (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
15241         argument node belongs to a part which is hidden in SPARK
15242         (Check_SPARK_Restriction): do not issue violations on nodes in hidden
15243         parts in SPARK; protect the possibly costly call to
15244         Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
15245         * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
15246         * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
15247         Accumulate_Token_Checksum_GNAT_5_03): add case for new token
15248         Tok_SPARK_Hide.
15249         (Scan): recognize special comment starting with '#' and followed by
15250         SPARK keyword "hide" as a HIDE directive.
15251
15252 2011-08-02  Yannick Moy  <moy@adacore.com>
15253
15254         * types.ads, erroutc.ads: Minor reformatting.
15255
15256 2011-08-02  Vincent Celier  <celier@adacore.com>
15257
15258         * link.c: Add response file support for cross platforms.
15259
15260 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
15261
15262         * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
15263         in an association, set parent field of copy before partial analysis.
15264         * sem_res.adb (Resolve_Slice): create reference to itype only when
15265         expansion is enabled.
15266
15267 2011-08-02  Yannick Moy  <moy@adacore.com>
15268
15269         * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
15270         for new flag denoting which subprogram bodies are in ALFA
15271         * restrict.adb, sem_ch7.adb: Update comment
15272         * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
15273         sem_ch9.adb, sem_res.adb: Add calls to
15274         Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
15275         * sem_ch6.adb (Analyze_Function_Return): add calls to
15276         Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
15277         middle of the body, and extended return.
15278         (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
15279         False when missing return.
15280         (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
15281         to True for subprograms whose spec is in ALFA. Remove later on the flag
15282         on the entity used for a subprogram body when there exists a separate
15283         declaration.
15284         * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
15285         if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
15286         False, otherwise do nothing.
15287
15288 2011-08-02  Robert Dewar  <dewar@adacore.com>
15289
15290         * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
15291
15292 2011-08-02  Yannick Moy  <moy@adacore.com>
15293
15294         * sem_ch4.ads: minor formatting.
15295
15296 2011-08-02  Yannick Moy  <moy@adacore.com>
15297
15298         * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
15299         debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
15300         errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
15301         restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
15302         opt.ads: cleanup of SPARK mode
15303
15304 2011-08-02  Yannick Moy  <moy@adacore.com>
15305
15306         * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
15307         types.
15308         * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
15309         (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
15310         * sem_ch3.adb
15311         (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
15312         (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
15313         (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
15314         (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
15315         types.
15316         (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
15317         non-static range.
15318         * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
15319         functions whose return type is not in ALFA.
15320         (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
15321         specifications.
15322         (Process_Formals): unset Is_In_ALFA flag for subprograms if a
15323         parameter's type is not in ALFA.
15324         * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
15325         types are in ALFA.
15326
15327 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
15328
15329         * sem_ch6 (Analyze_Expression_Function): treat the function as
15330         Inline_Always, and introduce a subprogram declaration for it when it is
15331         not a completion.
15332         * inline.adb (Add_Inlined_Body): recognize bodies that come from
15333         expression functions, so that the back-end can determine whether they
15334         can in fact be inlined.
15335         * sem_util.adb (Is_Expression_Function): predicate to determine whether
15336         a function body comes from an expression function.
15337
15338 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
15339
15340         * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
15341         null exclusions to test Can_Never_Be_Null on the anonymous access types
15342         of the formals rather than testing the formals themselves. Exclude this
15343         check in cases where the Old_Formal is marked as a controlling formal,
15344         to avoid issuing spurious errors for bodies completing dispatching
15345         operations (due to the flag not getting set on controlling access
15346         formals in body specs).
15347         (Find_Corresponding_Spec): When checking full and subtype conformance of
15348         subprogram bodies in instances, pass Designated and E in that order, for
15349         consistency with the expected order of the formals (New_Id followed by
15350         Old_Id).
15351
15352 2011-08-02  Robert Dewar  <dewar@adacore.com>
15353
15354         * sem_ch8.adb: Minor reformatting.
15355
15356 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
15357
15358         * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
15359         Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
15360         primitive operations of class-wide actuals.
15361
15362 2011-08-02  Javier Miranda  <miranda@adacore.com>
15363
15364         * exp_atag.ads, exp_atag.adb
15365         (Build_Common_Dispatching_Select_Statements): Remove argument Loc
15366         since its value is implicitly passed in argument Typ.
15367         * exp_disp.adb (Make_Disp_Conditional_Select_Body,
15368         Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
15369         Build_Common_Dispatching_Select_Statements.
15370
15371 2011-08-02  Robert Dewar  <dewar@adacore.com>
15372
15373         * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
15374         exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
15375         Minor reformatting.
15376
15377 2011-08-02  Robert Dewar  <dewar@adacore.com>
15378
15379         * sem_res.adb: Minor reformatting.
15380         * sem_prag.adb: Minor reformatting.
15381
15382 2011-08-02  Javier Miranda  <miranda@adacore.com>
15383
15384         * exp_atag.adb, exp_atags.ads
15385         (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
15386         by the tagged type Entity. Required to use this routine in the VM
15387         targets since we do not have available the Tag entity in the VM
15388         platforms.
15389         * exp_ch6.adb
15390         (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
15391         Ada.Tags has not been previously loaded.
15392         * exp_ch7.adb
15393         (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
15394         Build_VM_TSDs if package Ada.Tags has not been previously loaded.
15395         * sem_aux.adb
15396         (Enclosing_Dynamic_Scope): Add missing support to handle the full
15397         view of enclosing scopes. Required to handle enclosing scopes that
15398         are synchronized types whose full view is a task type.
15399         * exp_disp.adb
15400         (Build_VM_TSDs): Minor code improvement to avoid generating and
15401         analyzing lists with empty nodes.
15402         (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
15403         (Make_Disp_Conditional_Select_Body): Add support for VM targets.
15404         (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
15405         (Make_Disp_Timed_Select_Body): Add support for VM targets.
15406         (Make_Select_Specific_Data_Table): Add support for VM targets.
15407         (Make_VM_TSD): Generate code to initialize the SSD structure of
15408         the TSD.
15409
15410 2011-08-02  Yannick Moy  <moy@adacore.com>
15411
15412         * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
15413         cross-references section in ALI.
15414         * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
15415         (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
15416         Sub).
15417         (Enclosing_Subprogram_Or_Package): new function to return the enclosing
15418         subprogram or package entity of a node
15419         (Is_Local_Reference_Type): new function returns True for references
15420         selected in local cross-references.
15421         (Lt): function extracted from Lt in Output_References
15422         (Write_Entity_Name): function extracted from Output_References
15423         (Generate_Definition): generate reference with type 'D' for definition
15424         of objects (object declaration and parameter specification), with
15425         appropriate locations and units, for use in local cross-references.
15426         (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
15427         references of type 'I' for initialization in object definition.
15428         (Output_References): move part of function Lt and procedure
15429         Write_Entity_Name outside of the body. Ignore references of types 'D'
15430         and 'I' introduced for local cross-references.
15431         (Output_Local_References): new procedure to output the local
15432         cross-references sections.
15433         (Lref_Entity_Status): new array defining whether an entity is a local
15434         * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
15435         with 'I' type when initialization expression is present.
15436         * get_scos.adb, get_scos.ads: Correct comments and typos
15437
15438 2011-08-02  Javier Miranda  <miranda@adacore.com>
15439
15440         * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
15441         the JVM target.
15442         * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
15443         the JVM target.
15444         * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
15445         TSD support.
15446
15447 2011-08-02  Vincent Celier  <celier@adacore.com>
15448
15449         * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
15450         (No_Space_Img): New function
15451         (Find_Excluded_Sources): When reading from a file, record the file name
15452         and the line number for each excluded source.
15453         (Mark_Excluded_Sources): When reporting an error, if the excluded
15454         sources were read from a file, include file name and line number in
15455         the error message.
15456
15457 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
15458
15459         * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
15460
15461 2011-08-02  Robert Dewar  <dewar@adacore.com>
15462
15463         * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
15464
15465 2011-08-02  Javier Miranda  <miranda@adacore.com>
15466
15467         * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
15468         generation of TSDs to the DOTNET compiler.
15469         * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
15470         generation of TSDs to the DOTNET compiler.
15471
15472 2011-08-02  Javier Miranda  <miranda@adacore.com>
15473
15474         * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
15475         record of all the tagged types declared inside library level package
15476         declarations, library level package bodies or library level subprograms.
15477         * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
15478         associated with a given tagged type.
15479         (Build_VM_TSDs): New subprogram.
15480         * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
15481         compilation units that are subprograms.
15482         * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
15483         compilation units that are package bodies.
15484         (Expand_N_Package_Declaration): Generate TSDs of the main compilation
15485         units that are a package declaration or a package instantiation.
15486         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
15487         reorganization to improve the error generated by the frontend when the
15488         function Ada.Tags.Secondary_Tag is not available.
15489         * rtsfind.ads (RE_Register_TSD): New runtime entity.
15490         * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
15491
15492 2011-08-02  Javier Miranda  <miranda@adacore.com>
15493
15494         * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
15495
15496 2011-08-02  Robert Dewar  <dewar@adacore.com>
15497
15498         * s-imenne.ads: Minor reformatting.
15499
15500 2011-08-02  Robert Dewar  <dewar@adacore.com>
15501
15502         * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
15503         * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
15504         * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
15505
15506 2011-08-02  Robert Dewar  <dewar@adacore.com>
15507
15508         * einfo.ads (Materialize_Entity): Document this is only for renamings
15509         * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
15510         required debug information in the case where we transform the object
15511         declaration into a renaming declaration.
15512         * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
15513         object
15514         * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
15515         Materialize_Entity.
15516
15517 2011-08-02  Robert Dewar  <dewar@adacore.com>
15518
15519         * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
15520         Suppress_Init_Procs.
15521         * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
15522         Suppress_Initialization/Initialization_Suppressed.
15523         * gnat_rm.texi: New documentation for pragma Suppress_Initialization
15524         * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
15525         * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
15526         * sem_prag.adb: New processing for pragma Suppress_Initialization.
15527
15528 2011-08-02  Robert Dewar  <dewar@adacore.com>
15529
15530         * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
15531         Minor reformatting.
15532
15533 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
15534
15535         * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
15536         only have inheritable classwide pre/postconditions.
15537
15538 2011-08-02  Javier Miranda  <miranda@adacore.com>
15539
15540         * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
15541         * rtsfind.ads (RE_Check_TSD): New runtime entity.
15542         * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
15543         checks if the external tag of a type is the same as the external tag
15544         of some other declaration.
15545
15546 2011-08-02  Thomas Quinot  <quinot@adacore.com>
15547
15548         * s-taskin.ads: Minor reformatting.
15549
15550 2011-08-02  Emmanuel Briot  <briot@adacore.com>
15551
15552         * g-comlin.adb (Display_Help): swap the order in which it prints the
15553         short help and the general usage.
15554
15555 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
15556
15557         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
15558         the aspect declarations and attach them to the generic copy for
15559         subsequent analysis.
15560         (Analyze_Subprogram_Instantiation): copy explicitly the aspect
15561         declarations of the generic tree to the new subprogram declarations.
15562         * sem_attr.adb (Check_Precondition_Postcondition): recognize
15563         conditions that apply to a subprogram instance.
15564
15565 2011-08-02  Robert Dewar  <dewar@adacore.com>
15566
15567         * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
15568
15569 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
15570
15571         * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
15572         private type with a tagged full view is not derived in the immediate
15573         scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
15574
15575 2011-08-02  Robert Dewar  <dewar@adacore.com>
15576
15577         * exp_ch4.adb: Minor reformatting.
15578
15579 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
15580
15581         * sem_ch5.adb (Analyze_Loop_Statement):  If the iteration scheme is an
15582         Ada2012 iterator, the loop will be rewritten during expansion into a
15583         while loop with a cursor and an element declaration. Do not analyze the
15584         body in this case, because if the container is for indefinite types the
15585         actual subtype of the elements will only be determined when the cursor
15586         declaration is analyzed.
15587
15588 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
15589
15590         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
15591         size/alignment related attributes in CodePeer_Mode.
15592
15593 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
15594
15595         * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
15596         Prepend_Element, since this can result in the operation getting the
15597         wrong slot in the full type's dispatch table if the full type has
15598         inherited operations. The incomplete type's operation will get added
15599         to the proper position in the full type's primitives
15600         list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
15601         (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
15602         dispatching operations, since there are cases where nonprimitive
15603         subprograms can get added to the list of incomplete dependents (such
15604         as subprograms in nested packages).
15605         * sem_ch6.adb (Process_Formals): First, remove test for being in a
15606         private part when determining whether to add a primitive with a
15607         parameter of a tagged incomplete type to the Private_Dependents list.
15608         Such primitives can also occur in the visible part, and should not have
15609         been excluded from being private dependents.
15610         * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
15611         RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
15612         list of a Taft-amendment incomplete type is a primitive before issuing
15613         an error that the full type must appear in the same unit. There are
15614         cases where nonprimitives can be in the list (such as subprograms in
15615         nested packages).
15616         * sem_disp.adb (Derives_From): Use correct condition for checking that
15617         a formal's type is derived from the type of the corresponding formal in
15618         the parent subprogram (the condition was completely wrong). Add
15619         checking that was missing for controlling result types being derived
15620         from the result type of the parent operation.
15621
15622 2011-08-02  Yannick Moy  <moy@adacore.com>
15623
15624         * errout.adb (First_Node): minor renaming
15625         * restrict.adb (Check_Formal_Restriction): put restriction warning on
15626         first node.
15627
15628 2011-08-02  Yannick Moy  <moy@adacore.com>
15629
15630         * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
15631         before accessing operands.
15632         * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
15633         decide whether an initialization expression respects SPARK rules, as
15634         the plain node is the expanded one. This allows for more valid warnings
15635         to be issued.
15636         * gnat_rm.texi: Minor update.
15637
15638 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
15639
15640         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
15641         previous change.
15642
15643 2011-08-02  Robert Dewar  <dewar@adacore.com>
15644
15645         * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
15646
15647 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
15648
15649         * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
15650         loop statements and the element renaming declaration with a block when
15651         the element type is controlled.
15652
15653 2011-08-02  Yannick Moy  <moy@adacore.com>
15654
15655         * sinfo.ads: Minor formatting.
15656
15657 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
15658
15659         * sem_aggr.adb (Add_Association): if the association has a box and no
15660         expression, use the Sloc of the aggregate itself for the new
15661         association.
15662         * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
15663         the Original_Node.
15664
15665 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
15666
15667         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
15668         When a container is provided via a function call, generate a renaming
15669         of the function result. This avoids the creation of a transient scope
15670         and the premature finalization of the container.
15671         * exp_ch7.adb (Is_Container_Cursor): Removed.
15672         (Wrap_Transient_Declaration): Remove the supression of the finalization
15673         of the list controller when the declaration denotes a container cursor,
15674         it is not needed.
15675
15676 2011-08-02  Yannick Moy  <moy@adacore.com>
15677
15678         * restrict.adb (Check_Formal_Restriction): only issue a warning if the
15679         node is from source, instead of the original node being from source.
15680         * sem_aggr.adb
15681         (Resolve_Array_Aggregate): refine the check for a static expression, to
15682         recognize also static ranges
15683         * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
15684         Array_Type_Declaration): postpone the test for the type being a subtype
15685         mark after the type has been resolved, so that component-selection and
15686         expanded-name are discriminated.
15687         (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
15688         to distinguish the case of an iteration scheme, so that an error is
15689         issed on a non-static range in SPARK except in an iteration scheme.
15690         * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
15691         In_Iter_Schm = True.
15692         * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
15693         user-defined operators so that they are allowed in renaming
15694         * sem_ch8.adb
15695         (Find_Selected_Component): refine the check for prefixing of operators
15696         so that they are allowed in renaming. Move the checks for restrictions
15697         on selector name after analysis discriminated between
15698         component-selection and expanded-name.
15699         * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
15700         concatenation argument of string type if it is static.
15701         * sem_util.adb, sem_util.ads
15702         (Check_Later_Vs_Basic_Declarations): add a new function
15703         Is_Later_Declarative_Item to decice which declarations are allowed as
15704         later items, in the two different modes Ada 83 and SPARK. In the SPARK
15705         mode, add that renamings are considered as later items.
15706         (Enclosing_Package): new function to return the enclosing package
15707         (Enter_Name): correct the rule for homonyms in SPARK
15708         (Is_SPARK_Initialization_Expr): default to returning True on nodes not
15709         from source (result of expansion) to avoid issuing wrong warnings.
15710
15711 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
15712
15713         * errout.adb: On anything but an expression First_Node returns its
15714         argument.
15715
15716 2011-08-02  Pascal Obry  <obry@adacore.com>
15717
15718         * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
15719
15720 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
15721
15722         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
15723         Set the associated loop as the related expression of internally
15724         generated cursors.
15725         * exp_ch7.adb (Is_Container_Cursor): New routine.
15726         (Wrap_Transient_Declaration): Supress the finalization of the list
15727         controller when the declaration denotes a container cursor.
15728
15729 2011-08-02  Yannick Moy  <moy@adacore.com>
15730
15731         * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
15732         command line now.
15733         * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
15734         expression is a simple expression. This check cannot be performed in
15735         the semantics, so just drop it.
15736         (P_Index_Or_Discriminant_Constraint): move check that the index or
15737         discriminant is a subtype mark to Analyze_Subtype_Declaration in the
15738         semantics. Other cases were previously checked in the semantics.
15739         * par-ch4.adb (P_Name): move checks that a selector name is not
15740         character literal or an operator symbol to Find_Selected_Component in
15741         the semantics
15742         * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
15743         declarations are not placed after later declarations in a separate
15744         procedure in Sem_Util (possibly not the best choice?), to be used both
15745         during parsing, for Ada 83 mode, and during semantic analysis, for
15746         SPARK mode.
15747         * par-endh.adb (Check_End): move check that end label is not missing
15748         to Process_End_Label in the semantics
15749         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
15750         the special case for SPARK restriction
15751         * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
15752         * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
15753         parameter Force to issue the error message even on internal node (used
15754         for generated end label). Call Check_Restriction to check when an error
15755         must be issued. In SPARK mode, issue an error message even if the
15756         restriction is not set.
15757         (Check_Restriction): new procedure with an additional out parameter to
15758         inform the caller that a message has been issued
15759         * sem_aggr.adb: Minor modification of message
15760         * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
15761         instead of issuing an error message directly
15762         * sem_ch3.adb (Analyze_Declarations): move here the check that basic
15763         declarations are not placed after later declarations, by calling
15764         Check_Later_Vs_Basic_Declarations
15765         (Analyze_Subtype_Declaration): move here the check that an index or
15766         discriminant constraint must be a subtype mark. Change the check that
15767         a subtype of String must start at one so that it works on subtype marks.
15768         * sem_ch4.adb (Analyze_Call): move here the check that a named
15769         association cannot follow a positional one in a call
15770         * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
15771         instead of issuing an error message directly
15772         * sem_ch8.adb (Find_Selected_Component): move here the check that a
15773         selector name is not a character literal or an operator symbol. Move
15774         here the check that the prefix of an expanded name cannot be a
15775         subprogram or a loop statement.
15776         * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
15777         procedure called from parsing and semantics to check that basic
15778         declarations are not placed after later declarations
15779         (Process_End_Label): move here the check that end label is not missing
15780
15781 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
15782
15783         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
15784         representation clause in codepeer mode, since it confuses CodePeer and
15785         does not bring useful info.
15786
15787 2011-08-02  Ed Falis  <falis@adacore.com>
15788
15789         * init.c: initialize fp hw on MILS.
15790
15791 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
15792
15793         * errout.adb (First_Node): for bodies, return the node itself (small
15794         optimization). For other nodes, do not check source_unit if the node
15795         comes from Standard.
15796
15797 2011-08-02  Robert Dewar  <dewar@adacore.com>
15798
15799         * exp_ch3.adb: Minor comment additions.
15800         * sem_ch13.adb: Minor reformatting.
15801
15802 2011-08-02  Pascal Obry  <obry@adacore.com>
15803
15804         * make.adb, makeutl.adb: Removes some superfluous directory separator.
15805
15806 2011-08-02  Robert Dewar  <dewar@adacore.com>
15807
15808         * sem_attr.adb: Minor reformatting.
15809
15810 2011-08-02  Robert Dewar  <dewar@adacore.com>
15811
15812         * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
15813         (Has_Default_Component_Value): Removed
15814         * einfo.ads Comment updates
15815         (Has_Default_Aspect): Replaces Has_Default_Value
15816         (Has_Default_Component_Value): Removed
15817         * exp_ch13.adb
15818         (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
15819         * exp_ch3.adb
15820         (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
15821         (Get_Simple_Init_Val): Handle Default_Value aspect
15822         (Needs_Simple_Initialization): Handle Default_Value aspect
15823         * exp_ch3.ads: Needs_Simple_Initialization
15824         * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
15825         * par-prag.adb (Pragma_Default[_Component]Value) Removed
15826         * sem_ch13.adb
15827         (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
15828         * sem_prag.adb (Pragma_Default[_Component]Value) Removed
15829         * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
15830
15831 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
15832
15833         * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
15834         package containing iteration primitives.
15835         exp_ch5.adb (Expand_Iterator_Loop): ditto.
15836
15837 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
15838
15839         * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
15840         "of", pre-analyze expression in case it is a function call with
15841         finalization actions that must be placed ahead of the loop.
15842         * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
15843         on an Ada2012 iterator, insert them ahead of the rewritten loop.
15844
15845 2011-08-02  Geert Bosch  <bosch@adacore.com>
15846
15847         * cstand.adb (Create_Float_Types): Only consider C's long double for
15848         Long_Long_Float, in addition to double.
15849
15850 2011-08-02  Robert Dewar  <dewar@adacore.com>
15851
15852         * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
15853         sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
15854         prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
15855         Minor reformatting.
15856
15857 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
15858
15859         * sem_attr.adb: handle properly 'Result when it is a prefix of an
15860         indexed component.
15861
15862 2011-08-02  Javier Miranda  <miranda@adacore.com>
15863
15864         * einfo.ads, einfo.adb
15865         (Original_Access_Type): Move this attribute to Node26 since there was
15866         an undocumented use of Node21 in E_Access_Subprogram_Type entities
15867         which causes conflicts and breaks the generation of the .NET compiler.
15868         (Interface_Name): Add missing documentation on JGNAT only uses of
15869         this attribute.
15870
15871 2011-08-02  Geert Bosch  <bosch@adacore.com>
15872
15873         * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
15874         (Find_Back_End_Float_Type): Likewise
15875         (Create_Back_End_Float_Types): Likewise
15876         (Create_Float_Types): Likewise
15877         (Register_Float_Type): Likewise
15878         * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
15879         Nlist and split out type selection in new local Find_Base_Type function.
15880         * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
15881         Nlist
15882         * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
15883
15884 2011-08-02  Robert Dewar  <dewar@adacore.com>
15885
15886         * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
15887         alpha order).
15888         * opt.ads: Minor comment change.
15889         * sem_ch12.adb: Minor code reorganization.
15890
15891 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
15892
15893         * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
15894         subtype's list of rep items to the list on the full subtype in the case
15895         where the lists are the same.
15896
15897 2011-08-02  Geert Bosch  <bosch@adacore.com>
15898
15899         * switch-c.adb (Free): New deallocation procedure to avoid implicitly
15900         using the one from System.Strings, which also deallocates all strings.
15901
15902 2011-08-02  Geert Bosch  <bosch@adacore.com>
15903
15904         * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
15905         function.
15906         * gcc-interface/Make-lang.in: Update dependencies.
15907
15908 2011-08-02  Olivier Hainque  <hainque@adacore.com>
15909
15910         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
15911         end_locus.
15912
15913 2011-08-02  Javier Miranda  <miranda@adacore.com>
15914
15915         * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
15916         associated with anonymous access to subprograms.
15917
15918 2011-08-02  Geert Bosch  <bosch@adacore.com>
15919
15920         * opt.ads
15921         (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
15922         (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
15923         * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
15924         (Add_Symbol_Definition): Move to switch-c.adb
15925         (Process_Command_Line_Symbol_Definitions): Adjust references to above.
15926         * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
15927         (Add_Symbol_Definition): Move to switch-c.adb.
15928         * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
15929         * sem_warn.adb
15930         (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
15931         Move to warnsw.adb.
15932         * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
15933         Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
15934         Move to warnsw.adb.
15935         * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
15936         (Add_Symbol_Definition): Moved from Prepcomp.
15937         * switch-c.ads: Update copyright notice. Use String_List instead of
15938         Argument_List, removing dependency on System.OS_Lib.
15939
15940 2011-08-02  Yannick Moy  <moy@adacore.com>
15941
15942         * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
15943         mode on initialization expression which does not respect SPARK
15944         restrictions.
15945         * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
15946         if the tree referenced by its argument represents an initialization
15947         expression in SPARK, suitable for initializing an object in an object
15948         declaration.
15949
15950 2011-08-02  Javier Miranda  <miranda@adacore.com>
15951
15952         * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
15953         internally generated access to subprogram with its associated protected
15954         subprogram type.
15955         * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
15956
15957 2011-08-02  Geert Bosch  <bosch@adacore.com>
15958
15959         * cstand.adb (Register_Float_Type): Print information about type to
15960         register, if the Debug_Flag_Dot_B is set.
15961         * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
15962         * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
15963         * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
15964         with a requested precision of more than Max_Digits digits and no more
15965         than Max_Base_Digits digits, if a range specification is present and the
15966         Predefined_Float_Types list has a suitable type to derive from.
15967         * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
15968         case of type completion with pragma Import
15969         * sem_prag.adb
15970         (Process_Import_Predefined_Type): Processing to complete a type
15971         with pragma Import. Currently supports floating point types only.
15972         (Set_Convention_From_Pragma): Do nothing without underlying type.
15973         (Process_Convention): Guard against absence of underlying type,
15974         which may happen when importing incomplete types.
15975         (Process_Import_Or_Interface): Handle case of importing predefined
15976         types. Tweak error message.
15977
15978 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
15979
15980         * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
15981         functions to previous change.  Reorganize code slightly.
15982
15983 2011-08-02  Geert Bosch  <bosch@adacore.com>
15984
15985         * back_end.ads (Register_Type_Proc): New call back procedure type for
15986         allowing the back end to provide information about available types.
15987         (Register_Back_End_Types): New procedure to register back end types.
15988         * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
15989         available types.
15990         * cstand.adb (Back_End_Float_Types): New list for floating point types
15991         supported by the back end.
15992         (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
15993         (Copy_Float_Type): New procedure to make new copies of predefined types.
15994         (Register_Float_Type): New call back procedure to populate the BEFT list
15995         (Find_Back_End_Float_Type): New procedure to find a BEFT by name
15996         (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
15997         (Create_Float_Types): New procedure to create entities for floating
15998         point types predefined in Standard, and put these and any remaining
15999         BEFTs on the Predefined_Float_Types list.
16000         * stand.ads (Predefined_Float_Types): New list for predefined floating
16001         point types that do not have declarations in package Standard.
16002
16003 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
16004
16005         * inline.adb (Get_Code_Unit_Entity): New local function.  Returns the
16006         entity node for the unit containing the parameter.
16007         (Add_Inlined_Body): Use it to find the unit containing the subprogram.
16008         (Add_Inlined_Subprogram): Likewise.
16009         * gcc-interface/Make-lang.in: Update dependencies.
16010
16011 2011-08-02  Thomas Quinot  <quinot@adacore.com>
16012
16013         * s-stusta.adb (Print): Make sure Pos is always initialized to a
16014         suitable value.
16015
16016 2011-08-02  Geert Bosch  <bosch@adacore.com>
16017
16018         * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
16019
16020 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
16021
16022         * sem_type.adb (Covers): Move trivial case to the top and reuse the
16023         computed value of Base_Type.
16024
16025 2011-08-02  Yannick Moy  <moy@adacore.com>
16026
16027         * restrict.adb (Check_Restriction): issue an error for any use of
16028         class-wide, even if the No_Dispatch restriction is not set.
16029         * sem_aggr.adb: Correct typos in comments and messages in formal mode
16030         * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
16031         when completing a private extension, the type named in the private part
16032         is not the same as that named in the visible part.
16033         * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
16034         of an inherited primitive operations of a tagged type or type extension
16035         that returns the tagged type.
16036         * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
16037         function which returns True for an implicit operation inherited by the
16038         derived type declaration for the argument type.
16039         (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
16040         order.
16041
16042 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
16043
16044         * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
16045         Process_Bounds, to perform analysis with expansion of a range or an
16046         expression that is the iteration scheme for a loop.
16047         (Analyze_Iterator_Specification): If domain of iteration is given by a
16048         function call with a controlled result, as is the case if call returns
16049         a predefined container, ensure that finalization actions are properly
16050         generated.
16051         * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
16052
16053 2011-08-02  Javier Miranda  <miranda@adacore.com>
16054
16055         * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
16056         * gcc-interface/Make-lang.in: Update dependencies.
16057
16058 2011-08-02  Javier Miranda  <miranda@adacore.com>
16059
16060         * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
16061         determine if the analysis is performed using N or Original_Node (N).
16062         * exp_util.adb (Side_Effect_Free): Code cleanup since the new
16063         functionality of routine Is_Variable avoids code duplication.
16064         * checks.adb (Determine_Range): Handle temporaries generated by
16065         Remove_Side_Effects.
16066
16067 2011-08-02  Javier Miranda  <miranda@adacore.com>
16068
16069         * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
16070         expansion of the condition. Required since the previous analysis was
16071         done with expansion disabled (see Resolve_Quantified_Expression) and
16072         hence checks were not inserted and record comparisons have not been
16073         expanded.
16074
16075 2011-08-02  Ed Falis  <falis@adacore.com>
16076
16077         * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
16078         Update header.
16079
16080 2011-08-02  Bob Duff  <duff@adacore.com>
16081
16082         * opt.ads: Minor comment fix.
16083
16084 2011-08-02  Bob Duff  <duff@adacore.com>
16085
16086         * sem_ch12.adb (Analyze_Package_Instantiation,
16087         Analyze_Subprogram_Instantiation): Turn off style checking while
16088         analyzing an instance. Whatever style checks that apply to the generic
16089         unit should apply, so it makes no sense to apply them in an instance.
16090         This was causing trouble when compiling an instance of a runtime
16091         unit that violates the -gnatyO switch.
16092         * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
16093         one of the two case statements, causing spurious errors.
16094
16095 2011-08-02  Robert Dewar  <dewar@adacore.com>
16096
16097         * uname.adb: Minor reformatting.
16098         * gnatcmd.adb: Minor reformatting.
16099         * exp_attr.adb: Minor reformatting.
16100
16101 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
16102
16103         * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
16104         No_Dispatching_Calls, do not look for the Assign primitive, because
16105         predefined primitives are not created in this case.
16106
16107 2011-08-02  Bob Duff  <duff@adacore.com>
16108
16109         * stylesw.ads: Minor comment fixes.
16110
16111 2011-08-02  Robert Dewar  <dewar@adacore.com>
16112
16113         * freeze.adb (Add_To_Result): New procedure.
16114
16115 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
16116
16117         * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
16118         time, if the specific run-time routines for handling streams of strings
16119         are not available, use the default mechanism.
16120
16121 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
16122
16123         * s-regpat.ads: Fix typo.
16124
16125 2011-08-02  Vincent Celier  <celier@adacore.com>
16126
16127         * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
16128         not null, call it to create the in memory config project file without
16129         parsing an existing default config project file.
16130
16131 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
16132
16133         * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
16134
16135 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
16136
16137         * sem_elim.adb: an abstract subprogram does not need an eliminate
16138         pragma for its descendant to be eliminable.
16139
16140 2011-08-02  Ed Falis  <falis@adacore.com>
16141
16142         * init.c: revert to handling before previous checkin for VxWorks
16143         * s-intman-vxworks.adb: delete unnecessary declarations related to
16144         using Ada interrupt facilities for handling signals.
16145         Delete Initialize_Interrupts. Use __gnat_install_handler instead.
16146         * s-intman-vxworks.ads: Import __gnat_install_handler as
16147         Initialize_Interrupts.
16148         * s-taprop-vxworks.adb: Delete Signal_Mask.
16149         (Abort_Handler): change construction of mask to unblock exception
16150         signals.
16151
16152 2011-08-02  Jerome Guitton  <guitton@adacore.com>
16153
16154         * a-except-2005.adb (Raise_From_Signal_Handler): Call
16155         Debug_Raise_Exception before propagation starts.
16156
16157 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
16158
16159         * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
16160         to Restriction_Check_Required.
16161         * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
16162         * sem_res.adb (Resolve_Call): Likewise.
16163         * sem_attr.adb (Check_Stream_Attribute): Likewise.
16164
16165 2011-08-02  Bob Duff  <duff@adacore.com>
16166
16167         * stylesw.ads: Update comment.
16168         * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
16169         * errout.ads: Remove obsolete comment.
16170
16171 2011-08-02  Javier Miranda  <miranda@adacore.com>
16172
16173         * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
16174         (Set_Is_Safe_To_Reevaluate): new procedure.
16175         * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
16176         assignment is allowed on safe-to-reevaluate variables.
16177         (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
16178         temporary created to remove side effects in expressions that use
16179         the secondary stack as safe-to-reevaluate.
16180         * exp_util.adb (Side_Effect_Free): Add missing code to handle well
16181         variables that are not true constants.
16182
16183 2011-08-02  Robert Dewar  <dewar@adacore.com>
16184
16185         * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
16186         sem_res.adb, sem_ch6.adb: Minor reformatting.
16187
16188 2011-08-02  Jerome Guitton  <guitton@adacore.com>
16189
16190         * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
16191
16192 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
16193
16194         * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
16195         not set Overridden_Operation if subprogram is an initialization
16196         procedure.
16197
16198 2011-08-02  Yannick Moy  <moy@adacore.com>
16199
16200         * par-ch6.adb: Correct obsolete name in comments
16201         * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
16202         which takes two message arguments (existing function takes one), with
16203         second message used for continuation.
16204         * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
16205         block statements that originate from a source block statement, not
16206         generated block statements
16207         * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
16208         symmetry with procedure case
16209         * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
16210         function to issue an error in formal mode if a package specification
16211         contains more than one tagged type or type extension.
16212         * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
16213         parameters matching formals of tagged types are objects (or ancestor
16214         type conversions of objects), not general expressions. Issue an error
16215         on view conversions that are not involving ancestor conversion of an
16216         extended type.
16217         (Resolve_Type_Conversion): in formal mode, issue an error on the
16218         operand of an ancestor type conversion which is not an object
16219         * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
16220         procedure so that it works also for actuals of function calls
16221         (Is_Actual_Tagged_Parameter): new function which determines if its
16222         argument is an actual parameter of a formal of tagged type in a
16223         subprogram call
16224         (Is_SPARK_Object_Reference): new function which determines if the tree
16225         referenced by its argument represents an object in SPARK
16226
16227 2011-08-02  Robert Dewar  <dewar@adacore.com>
16228
16229         * sem_ch3.adb: Minor reformatting
16230         Minor comment addition
16231         Minor error msg text change
16232
16233 2011-08-02  Javier Miranda  <miranda@adacore.com>
16234
16235         * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
16236         function. Used to be more precise when we generate a variable plus one
16237         assignment to remove side effects in the evaluation of the Bound
16238         expressions.
16239         (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
16240         of the bound expression to force its re-analysis and thus expand the
16241         associated transient scope (if required). Code cleanup replacing the
16242         previous code that declared the constant entity by an invocation to
16243         routine Force_Evaluation which centralizes this work in the frontend.
16244
16245 2011-08-02  Robert Dewar  <dewar@adacore.com>
16246
16247         * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
16248         (Base_Type): Now uses improved Is_Base_Type function
16249         * einfo.ads (Base_Type): Inline this function
16250
16251 2011-08-02  Robert Dewar  <dewar@adacore.com>
16252
16253         * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
16254         (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
16255
16256 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
16257
16258         * gcc-interface/Make-lang.in: Update dependencies.
16259         * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
16260         targets.
16261
16262 2011-08-02  Yannick Moy  <moy@adacore.com>
16263
16264         * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
16265         non-simple expression used in delta constraint
16266         (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
16267         index constraint which is not a subtype mark
16268         * par.adb: With and use Restrict
16269         * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
16270         mode on component type which is not a subtype mark and default
16271         expression on component
16272         (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
16273         of string which does not have a lower index bound equal to 1
16274         (Array_Type_Declaration): issue an error in formal mode on index or
16275         component type which is not a subtype mark, and on aliased keyword on
16276         component
16277         (Derived_Type_Declaration): issue an error in formal mode on interface,
16278         limited or abstract type
16279         (Record_Type_Declaration): issue an error in formal mode on interface
16280         (Record_Type_Definition): issue an error in formal mode on tagged types
16281         and type extensions not declared in the specification of a library unit
16282         package; on null non-tagged record; on variant part
16283
16284 2011-08-02  Vincent Celier  <celier@adacore.com>
16285
16286         * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
16287         not declared for qualified library project when Library_Name is not
16288         declared, but Library_Dir is.
16289
16290 2011-08-02  Robert Dewar  <dewar@adacore.com>
16291
16292         * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
16293         pragmas (affects aspects [Component_]Default_Value
16294         (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
16295         component type for the resolution
16296
16297 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
16298
16299         * einfo.adb (Base_Type): Tune implementation for speed.
16300
16301 2011-08-02  Robert Dewar  <dewar@adacore.com>
16302
16303         * freeze.adb: Minor reformatting.
16304
16305 2011-08-02  Thomas Quinot  <quinot@adacore.com>
16306
16307         * scos.ads: Update comments.
16308
16309 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
16310
16311         * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
16312         base type, because the parent may be a subtype of a private type whose
16313         convention is established in a private part.
16314
16315 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
16316
16317         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
16318         statement in a block when the expansion of the return expression has
16319         created a finalization chain.
16320         * freeze.adb (Freeze_Expression): Alphabetize all choices associated
16321         with the parent node.
16322         Add N_Extended_Return_Statement to handle the case where a transient
16323         object declaration appears in the Return_Object_Declarations list of
16324         an extended return statement.
16325
16326 2011-08-02  Matthew Gingell  <gingell@adacore.com>
16327
16328         * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
16329         unused parameter 'name'.
16330
16331 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
16332
16333         * sem_elim.adb (Set_Eliminated): If the overridden operation is an
16334         inherited operation, check whether its alias, which is the source
16335         operastion that it renames, has been marked eliminated.
16336
16337 2011-08-02  Javier Miranda  <miranda@adacore.com>
16338
16339         * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
16340         in-mode parameter whose type is an access type since it can be used to
16341         modify its designated object. Enforce code that handles as safe an
16342         access type that is not access-to-constant but it is the result of a
16343         previous removal of side-effects.
16344         (Remove_Side_Effects): Minor code reorganization of cases which require
16345         no action. Done to incorporate documentation on new cases uncovered
16346         working in this ticket: no action needed if this routine was invoked
16347         too early and the nodes are not yet decorated.
16348         * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
16349         to routine Remove_Side_Effects by calls to Force_Evaluation since they
16350         were issued with actuals that are implicitly provided by
16351         Force_Evaluation.
16352
16353 2011-08-02  Robert Dewar  <dewar@adacore.com>
16354
16355         * sem_ch3.adb, sem_res.adb: Minor reformatting.
16356
16357 2011-08-02  Yannick Moy  <moy@adacore.com>
16358
16359         * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
16360         to issue an error in formal mode on attribute not supported in this mode
16361         (Analyze_Attribute): issue errors on standard attributes not supported
16362         in formal mode.
16363         * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
16364         comment, and issue error in formal mode on modulus which is not a power
16365         of 2.
16366         (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
16367         range.
16368         * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
16369         subtype mark.
16370         * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
16371         operator on modular type (except 'not').
16372
16373 2011-08-02  Robert Dewar  <dewar@adacore.com>
16374
16375         * gnat_rm.texi: Minor reformatting.
16376
16377 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
16378
16379         * s-osinte-linux.ads: Minor comment update and reformatting.
16380         * i-cexten.ads: Make this unit pure, as for its parent.
16381         Will allow its usage in more contexts if needed.
16382
16383 2011-08-02  Robert Dewar  <dewar@adacore.com>
16384
16385         * s-utf_32.ads: Minor comment fix.
16386
16387 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
16388
16389         * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
16390         operation of a tagged synchronized type, handle the case where the
16391         controlling argument is overloaded.
16392
16393 2011-08-02  Yannick Moy  <moy@adacore.com>
16394
16395         * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
16396         Replace pragma SPARK_95 with pragma Restrictions (SPARK)
16397         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
16398         SPARK mode and formal verification mode on processing SPARK restriction
16399         * s-rident.ads (Restriction_Id): add SPARK restriction in those not
16400         requiring consistency checking.
16401
16402 2011-08-02  Robert Dewar  <dewar@adacore.com>
16403
16404         * sem_res.adb: Minor reformatting.
16405
16406 2011-08-02  Robert Dewar  <dewar@adacore.com>
16407
16408         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
16409         a-cforse.ads: Remove unneeded with of Ada.Containers
16410         Remove commented out pragma Inline's
16411         Move specifications of new subprograms to the actual specs
16412
16413 2011-08-02  Yannick Moy  <moy@adacore.com>
16414
16415         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
16416         a-cforse.ads: Update comments.
16417
16418 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
16419
16420         * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
16421
16422 2011-08-02  Robert Dewar  <dewar@adacore.com>
16423
16424         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
16425         a-cforse.ads, a-cofove.ads: Minor reformatting.
16426
16427 2011-08-02  Claire Dross  <dross@adacore.com>
16428
16429         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
16430         a-cofove.ads: Add comments.
16431
16432 2011-08-02  Yannick Moy  <moy@adacore.com>
16433
16434         * gnat_rm.texi: Document formal containers.
16435
16436 2011-08-02  Emmanuel Briot  <briot@adacore.com>
16437
16438         * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
16439         are empty sections.
16440
16441 2011-08-02  Robert Dewar  <dewar@adacore.com>
16442
16443         * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
16444         reformatting.
16445
16446 2011-08-02  Robert Dewar  <dewar@adacore.com>
16447
16448         * aspects.adb: New aspects Default_Value and Default_Component_Value
16449         New format of Aspect_Names table checks for omitted entries
16450         * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
16451         handling of boolean aspects for derived types.
16452         New aspects Default_Value and Default_Component_Value
16453         New format of Aspect_Names table checks for omitted entries
16454         * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
16455         (Has_Default_Value): New flag
16456         (Has_Default_Component_Value): New flag
16457         (Has_Default_Value): New flag
16458         * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
16459         table.
16460         * par-prag.adb: New pragmas Default_Value and Default_Component_Value
16461         * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
16462         Default_Value and Default_Component_Value
16463         * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
16464         New aspects Default_Value and Default_Component_Value
16465         * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
16466         * sprint.adb: Print N_Aspect_Specification node when called from gdb
16467
16468 2011-08-02  Vincent Celier  <celier@adacore.com>
16469
16470         * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
16471         inherit library kind.
16472
16473 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
16474
16475         * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
16476         Minor reformatting.
16477
16478 2011-08-02  Robert Dewar  <dewar@adacore.com>
16479
16480         * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
16481
16482 2011-08-02  Yannick Moy  <moy@adacore.com>
16483
16484         * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
16485
16486 2011-08-02  Robert Dewar  <dewar@adacore.com>
16487
16488         * impunit.adb: Add comment.
16489
16490 2011-08-02  Yannick Moy  <moy@adacore.com>
16491
16492         * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
16493         qualification of aggregates in formal mode
16494         (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
16495         another aggregate
16496         (Resolve_Aggregate): complete the test that an aggregate is adequately
16497         qualified in formal mode
16498
16499 2011-08-02  Pascal Obry  <obry@adacore.com>
16500
16501         * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
16502         * mlib-prj.adb: Supress warning when compiling binder generated file.
16503         (Build_Library): Supress all warnings when compiling the binder
16504         generated file.
16505
16506 2011-08-02  Yannick Moy  <moy@adacore.com>
16507
16508         * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
16509         from here...
16510         * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
16511         * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
16512         Add with/use clauses to make Check_Formal_Restriction visible
16513
16514 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
16515
16516         * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
16517         in-parameters when type of the generic formal is private in the generic
16518         spec and non-private in the body.
16519
16520 2011-08-02  Claire Dross  <dross@adacore.com>
16521
16522         * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
16523         a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
16524         a-cofove.adb, a-cofove.ads: New files implementing formal containers.
16525         * impunit.adb, Makefile.rtl: Take new files into account.
16526
16527 2011-08-02  Robert Dewar  <dewar@adacore.com>
16528
16529         * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
16530         sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
16531
16532 2011-08-02  Yannick Moy  <moy@adacore.com>
16533
16534         * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
16535         formal mode
16536         * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
16537         matching static array bounds, taking into account the special case of
16538         string literals
16539         * sem_ch3.adb: Typo in comment.
16540
16541 2011-08-02  Yannick Moy  <moy@adacore.com>
16542
16543         * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
16544         which issues an error in formal mode if its argument node is originally
16545         from source
16546         * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
16547         has a discriminant specification so that it does not include the case
16548         of derived types
16549         (Derived_Type_Declaration): move here the test that a derived type has a
16550         discriminant specification
16551         * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
16552         first element of a component association before accessing its choices
16553         (presence of component association is not enough)
16554         * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
16555         declaration is a library item before accessing the next element in a
16556         list, as library items are not member of lists
16557         * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
16558         sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
16559         Check_Formal_Restriction whenever possible.
16560
16561 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
16562
16563         * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
16564         reference when needed.
16565
16566 2011-08-02  Bob Duff  <duff@adacore.com>
16567
16568         * gnat_ugn.texi: Fix typo.
16569
16570 2011-08-02  Vincent Celier  <celier@adacore.com>
16571
16572         * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
16573         archive file name. Do not use the full path name of archives for Open
16574         VMS.
16575
16576 2011-08-02  Robert Dewar  <dewar@adacore.com>
16577
16578         * sem_ch12.adb, sem_ch11.adb: New calling sequence for
16579         Analyze_Aspect_Specifications
16580         * sem_ch13.adb
16581         (Analyze_Aspect_Specifications): New handling for boolean aspects
16582         * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
16583         * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
16584         sequence for Analyze_Aspect_Specifications
16585         * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
16586         * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
16587
16588 2011-08-02  Robert Dewar  <dewar@adacore.com>
16589
16590         * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
16591         aspects, since these no longer exist.
16592
16593 2011-08-02  Robert Dewar  <dewar@adacore.com>
16594
16595         * par-ch13.adb (Aspect_Specifications_Present): Always return false on
16596         semicolon, do not try to see if there are aspects following it.
16597         * par-ch3.adb (P_Declarative_Items): Better message for unexpected
16598         aspect spec.
16599
16600 2011-08-02  Robert Dewar  <dewar@adacore.com>
16601
16602         * sem_ch8.adb, aspects.ads: Minor reformatting.
16603
16604 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
16605
16606         * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
16607         * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
16608         extracted from...
16609         (Analyze_Aspect_Specifications): ...here.  Call above procedure.
16610
16611 2011-08-02  Yannick Moy  <moy@adacore.com>
16612
16613         * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
16614         mode on subprogram declaration outside of package specification, unless
16615         it is followed by a pragma Import
16616         * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
16617         Access_Type_Declaration): issue error in formal mode on access type
16618         (Analyze_Incomplete_Type_Decl): issue error in formal mode on
16619         incomplete type
16620         (Analyze_Object_Declaration): issue error in formal mode on object
16621         declaration which does not respect SPARK restrictions
16622         (Analyze_Subtype_Declaration): issue error in formal mode on subtype
16623         declaration which does not respect SPARK restrictions
16624         (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
16625         error in formal mode on digits or delta constraint
16626         (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
16627         decimal fixed point type
16628         (Derived_Type_Declaration): issue error in formal mode on derived type
16629         other than type extensions of tagged record types
16630         * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
16631         with check on access definition
16632         * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
16633         mode on protected definition.
16634         (Analyze_Task_Definition): issue error in formal mode on task definition
16635
16636 2011-08-02  Robert Dewar  <dewar@adacore.com>
16637
16638         * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
16639
16640 2011-08-02  Javier Miranda  <miranda@adacore.com>
16641
16642         * sem_ch6.adb (Can_Override_Operator): New function.
16643         (Verify_Overriding_Indicator): Add missing code to check overriding
16644         indicator in operators. Fixes regression.
16645         (Check_Overriding_Indicator): Minor reformating after replacing the
16646         code that evaluates if the subprogram can override an operator by
16647         invocations to the above new function.
16648         * einfo.adb
16649         (Write_Field26_Name): Add missing code to ensure that, following
16650         the documentation in einfo.ads, this field is not shown as attribute
16651         "Static_Initialization" on non-dispatching functions.
16652
16653 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
16654
16655         * sem_res.adb (Resolve_Call): A call to
16656         Ada.Real_Time.Timing_Events.Set_Handler violates restriction
16657         No_Relative_Delay (AI-0211) only when it sets a relative timing event,
16658         i.e., when the second parameter is of type Time_Span.
16659
16660 2011-08-02  Vincent Celier  <celier@adacore.com>
16661
16662         * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
16663         with an archive instead of -L<library dir> -l<library name>.
16664
16665 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
16666
16667         * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
16668         mark the base types In_Use in addition to making the operations
16669         use_visible.
16670
16671 2011-08-02  Ed Falis  <falis@adacore.com>
16672
16673         * init.c: add and setup __gnat_signal_mask for the exception signals
16674         * s-inmaop-vxworks.adb: new file.
16675         * s-intman-vxworks.adb: remove unnecessary initializations and
16676         simplify remaining
16677         * s-intman-vxworks.ads: remove unnecessary variable
16678         * s-taprop-vxworks.adb: simplify signal initialization
16679
16680 2011-08-02  Robert Dewar  <dewar@adacore.com>
16681
16682         * sem_ch8.adb: Minor code reorganization, comment updates.
16683
16684 2011-08-02  Robert Dewar  <dewar@adacore.com>
16685
16686         * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
16687         * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
16688         here from Sem_Res.
16689         (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
16690         (Matching_Static_Array_Bounds): Moved here from Sem_Res
16691
16692 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
16693
16694         * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
16695         * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
16696         * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
16697         use_type_clauses, to handle more efficiently use_type and use_all_type
16698         constructs.
16699         * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
16700         Ada2012 Use_All_Type clause.
16701         (Use_Class_Wide_Operations): new procedure.
16702
16703 2011-08-02  Robert Dewar  <dewar@adacore.com>
16704
16705         * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
16706         sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
16707         expression to expression function.
16708
16709 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
16710
16711         * sem_ch4.adb: transform simple Ada2012 membership into equality only
16712         if types are compatible.
16713
16714 2011-08-02  Yannick Moy  <moy@adacore.com>
16715
16716         * sem_res.adb (Matching_Static_Array_Bounds): new function which
16717         returns True if its argument array types have same dimension and same
16718         static bounds at each index.
16719         (Resolve_Actuals): issue an error in formal mode on actuals passed as
16720         OUT or IN OUT paramaters which are not view conversions in SPARK.
16721         (Resolve_Arithmetic_Op): issue an error in formal mode on
16722         multiplication or division with operands of fixed point types which are
16723         not qualified or explicitly converted.
16724         (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
16725         Boolean or array type (except String) operands.
16726         (Resolve_Equality_Op): issue an error in formal mode on equality
16727         operators for array types other than String with non-matching static
16728         bounds.
16729         (Resolve_Logical_Op): issue an error in formal mode on logical operators
16730         for array types with non-matching static bounds. Factorize the code in
16731         Matching_Static_Array_Bounds.
16732         (Resolve_Qualified_Expression): issue an error in formal mode on
16733         qualified expressions for array types with non-matching static bounds.
16734         (Resolve_Type_Conversion): issue an error in formal mode on type
16735         conversion for array types with non-matching static bounds
16736
16737 2011-08-02  Robert Dewar  <dewar@adacore.com>
16738
16739         * par-ch10.adb: Minor code reorganization (use Nkind_In).
16740
16741 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
16742
16743         * par-ch9.adb: save location of entry for proper error message.
16744
16745 2011-08-02  Javier Miranda  <miranda@adacore.com>
16746
16747         * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
16748         (Use_Full_View) which permits this routine to climb through the
16749         ancestors using the full-view of private parents.
16750         * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
16751         Use_Full_View to true in calls to Is_Ancestor.
16752         * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
16753         true in call to Is_Ancestor.
16754         * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
16755         Use_Full_View to true in call to Is_Ancestor.
16756         * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
16757         call to Is_Ancestor.
16758         * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
16759         Use_Full_View to true in calls to Is_Ancestor.
16760         * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
16761         Make_Select_Specific_Data_Table, Register_Primitive,
16762         Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
16763         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
16764         to true in call to Is_Ancestor.
16765         * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
16766         Use_Full_View to true in calls to Is_Ancestor.
16767         * exp_cg.adb
16768         (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
16769         (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
16770
16771 2011-08-02  Robert Dewar  <dewar@adacore.com>
16772
16773         * gnat_rm.texi: Minor reformatting.
16774         * sem_prag.adb: Minor reformatting.
16775
16776 2011-08-02  Tristan Gingold  <gingold@adacore.com>
16777
16778         * vms_data.ads: Add VMS qualifier for -gnateP.
16779
16780 2011-08-02  Robert Dewar  <dewar@adacore.com>
16781
16782         * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
16783         * par-ch7.adb (P_Package): Proper placement of aspects for package
16784         decl/instantiation.
16785         * par-endh.adb (Check_End): Ad Is_Sloc parameter
16786         (End_Statements): Add Is_Sloc parameterr
16787         * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
16788         (Check_End): Ad Is_Sloc parameter
16789         (End_Statements): Add Is_Sloc parameterr
16790
16791 2011-08-02  Vincent Celier  <celier@adacore.com>
16792
16793         * ug_words: Add VMS qualifier equivalent to -gnateP:
16794         /SYMBOL_PREPROCESSING.
16795
16796 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
16797
16798         * gnat-style.texi: For hexadecimal numeric literals the typical
16799         grouping of digits is 4 to represent 2 bytes.
16800         A procedure spec which is split into several lines is indented two
16801         characters.
16802
16803 2011-08-02  Yannick Moy  <moy@adacore.com>
16804
16805         * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
16806         * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
16807         (Resolve_Aggregate): issue errors in formal modes when aggregate is not
16808         properly qualified
16809         (Resolve_Array_Aggregate): issue errors in formal modes on non-static
16810         choice in array aggregate
16811         (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
16812         mark as ancestor
16813         (Resolve_Record_Aggregate): issue errors in formal modes on mixed
16814         positional and named aggregate for record, or others in record
16815         aggregate, or multiple choice in record aggregate
16816         * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
16817         array operands to logical operations AND, OR and XOR do not have the
16818         same static lower and higher bounds
16819         * sem_ch5.adb, sinfo.ads: Correct typos in comments
16820
16821 2011-08-01  Robert Dewar  <dewar@adacore.com>
16822
16823         * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
16824         Replaces Last_Source_Node_In_Sequence.
16825         * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
16826         * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
16827         parens and blank in string (this was inconsistently implemented).
16828         * errout.ads
16829         (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
16830         blank in string (this was inconsistently implemented).
16831         * gnat1drv.adb
16832         (Set_Global_Switches): Set formal mode switches appropriately
16833         * opt.ads, opt.adb: Formal mode is now global switches, more consistent
16834         * par-prag.adb
16835         (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
16836         call Set_Error_Msg_Lang to set "spark" as language name.
16837         * par.adb: Remove unnecessary call to set formal language for errout
16838         * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
16839         appropriately and call Set_Error_Msg_Lang to set "spark" as language
16840         name.
16841         * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
16842         calls to it, moved after resolution so that types are known
16843         * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
16844         result of concatenation is not of type String
16845         (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
16846         concatenation is not properly restricted
16847         * gnat_rm.texi: Add doc on pragma Spark_95.
16848         * gcc-interface/Makefile.in: Remove obsolete target pairs for
16849         Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
16850         * gcc-interface/Make-lang.in: Update dependencies.
16851
16852 2011-08-01  Javier Miranda  <miranda@adacore.com>
16853
16854         * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
16855         condition that detects if the overridden operation must replace an
16856         existing entity.
16857
16858 2011-08-01  Javier Miranda  <miranda@adacore.com>
16859
16860         * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
16861         code declarations inserted by Insert_Actions in each alternative of the
16862         N_Case_Expression node.
16863
16864 2011-08-01  Robert Dewar  <dewar@adacore.com>
16865
16866         * sem_ch6.adb: Minor code reorganization.
16867         * sem_util.adb: Minor reformatting.
16868
16869 2011-08-01  Pascal Obry  <obry@adacore.com>
16870
16871         * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
16872         * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
16873
16874 2011-08-01  Yannick Moy  <moy@adacore.com>
16875
16876         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
16877         literal or operator symbol which is prefixed
16878         * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
16879         mode on access attributes.
16880         * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
16881         that concatenation operands are properly restricted in formal mode
16882         (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
16883         Analyze_Concatenation_Operand. Issue an error in formal mode if the
16884         result of the concatenation has a type different from String.
16885         (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
16886         Analyze_Quantified_Expression, Analyze_Slice,
16887         Analyze_Null): issue an error in formal mode on unsupported constructs
16888         * sem_ch5.adb
16889         (Analyze_Block_Statement): only issue error on source block statement
16890         * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
16891         function which returns the last node in a list of nodes for which
16892         Comes_From_Source returns True, if any
16893         * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
16894         Last_Source_Node_In_Sequence
16895         * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
16896         Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
16897         mode on unsupported constructs
16898         * sem_ch9.adb Do not return after issuing error in formal mode, as the
16899         rest of the actions may be needed later on since the error is marked as
16900         not serious.
16901         * sinfo.ads: Typos in comments.
16902
16903 2011-08-01  Pascal Obry  <obry@adacore.com>
16904
16905         * projects.texi: Minor editing.
16906
16907 2011-08-01  Yannick Moy  <moy@adacore.com>
16908
16909         * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
16910         insertion character ~~
16911         * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
16912         (Set_Error_Msg_Lang): new procedure which fixes the language for use
16913         with insertion character ~~
16914         (Set_Msg_Text): treat insertion character ~~
16915         * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
16916         sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
16917         Formal_Error_Msg_... procedures by equivalent Error_Msg_...
16918         procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
16919         errors related to the formal language restriction not serious
16920         (insertion character |).
16921         * par.adb (Par): set formal language for error messages if needed
16922         * sem_ch6.adb (Check_Missing_Return): take into account possible
16923         generated statements at the end of the function
16924         * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
16925         enumeration value to define a new pragma SPARK_95
16926         * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
16927         SPARK_Version): new type and variables to store the SPARK version
16928         (none by default).
16929         (SPARK_Mode): return True when SPARK_Version is set
16930         * par-prag.adb: Correct indentation
16931         (Prag): take Pragma_SPARK_95 into account
16932         * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
16933         into account.
16934
16935 2011-08-01  Robert Dewar  <dewar@adacore.com>
16936
16937         * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
16938         sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
16939         sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
16940
16941 2011-08-01  Pascal Obry  <obry@adacore.com>
16942
16943         * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
16944         Target_Name to Get_Path call.
16945         (Parse_Single_Project): Likewise.
16946         (Post_Parse_Context_Clause): Likewise.
16947         * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
16948         Call Initialise_Project_Path with the proper Target_Name.
16949         (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
16950         search path.
16951         (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
16952         with the proper Target_Name.
16953         * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
16954         Part.Parse routine.
16955         (Parse_Project_And_Apply_Config): Likewise.
16956         * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
16957         This is fine as this part of the code is supporting only native
16958         compilation.
16959         * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
16960         is fine as this part of the code is supporting only native compilation.
16961
16962 2011-08-01  Yannick Moy  <moy@adacore.com>
16963
16964         * sem_util.adb (Enter_Name): issue error in formal mode on declaration
16965         of homonym, unless the homonym is one of the cases allowed in SPARK
16966         * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
16967         package declaration occurring after a body.
16968
16969 2011-08-01  Robert Dewar  <dewar@adacore.com>
16970
16971         * checks.adb, exp_ch4.adb: Minor reformatting.
16972
16973 2011-08-01  Javier Miranda  <miranda@adacore.com>
16974
16975         * einfo.ads (Access_Disp_Table): Fix documentation.
16976         (Dispatch_Table_Wrappers): Fix documentation.
16977
16978 2011-08-01  Pascal Obry  <obry@adacore.com>
16979
16980         * prj-env.adb, prj-env.ads: Minor reformatting.
16981
16982 2011-08-01  Yannick Moy  <moy@adacore.com>
16983
16984         * sem_util.ads, sem_util.adb, par.adb, par_util.adb
16985         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
16986         procedures out of these packages.
16987         * errout.ads, errout.adb
16988         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
16989         procedures in of this package
16990         (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
16991         * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
16992         on misplaced later vs initial declarations, like in Ada 83
16993         * sem_attr.adb (Processing for Analyze_Attribute): issue error in
16994         formal mode on attribute of private type whose full type declaration
16995         is not visible
16996         * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
16997         package declaration inside a package specification
16998         (Analyze_Full_Type_Declaration): issue error in formal mode on
16999         controlled type or discriminant type
17000         * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
17001         user-defined operator means that it should come from the source
17002         (New_Overloaded_Entity): issue error in formal mode on overloaded
17003         entity.
17004         * sem_ch6.ads, sem_ch13.ads: typos in comments.
17005
17006 2011-08-01  Thomas Quinot  <quinot@adacore.com>
17007
17008         * atree.adb: Minor reformatting.
17009         * checks.adb: Minor reformatting.
17010
17011 2011-08-01  Vincent Celier  <celier@adacore.com>
17012
17013         * s-parame-vms-ia64.ads: Fix typo in comment
17014         Minor reformatting
17015         * s-parame-vms-restrict.ads: Removed, unused.
17016
17017 2011-08-01  Javier Miranda  <miranda@adacore.com>
17018
17019         * exp_ch3.adb
17020         (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
17021         * sem_ch3.adb
17022         (Constrain_Index): Remove side effects in the evaluation of the bounds.
17023         * sem_ch3.ads, sem_ch3.adb
17024         (Is_Constant_Bound): New extended version of the subprogram that was
17025         previously located inside function Exp_Ch3.Is_Variable_Size_Array.
17026         Moved here since it is shared by routines of sem_ch3 and exp_ch3.
17027         * sem_aux.ads (Constant_Value): Fix typo in comment.
17028         * checks.adb (Generate_Index_Checks): New implementation which, for
17029         array objects with constant bounds, generates the runtime check
17030         referencing the bounds of the array type. For other cases this routine
17031         provides its previous behavior obtaining such values from the array
17032         object.
17033         * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
17034         parent type.
17035         * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
17036         we cannot have semantic interpretations of the new node.
17037
17038 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
17039
17040         * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
17041         expressions.
17042
17043 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
17044
17045         * sem_ch8.adb: Minor code editing.
17046         * s-vxwext.adb: Remove trailing space.
17047         * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
17048         consistency with other files.
17049
17050 2011-08-01  Thomas Quinot  <quinot@adacore.com>
17051
17052         * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
17053
17054 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
17055
17056         * par-ch10.adb: reject parameterized expressions as compilation unit.
17057         * sem_ch4.adb: handle properly conditional expression with overloaded
17058         then_clause and no else_clause.
17059
17060 2011-08-01  Tristan Gingold  <gingold@adacore.com>
17061
17062         * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
17063         like done by System.Aux_DEC.
17064         * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
17065
17066 2011-08-01  Yannick Moy  <moy@adacore.com>
17067
17068         * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
17069         missing label at end of declaration (subprogram or package)
17070         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
17071         of positional and named parameter association
17072         * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
17073         Error_Msg_SP which adds a prefix to the error message giving the name
17074         of the formal language analyzed
17075         * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
17076         access result type in subprogram, unconstrained array as result type,.
17077         (Analyze_Subprogram_Declaration): issue an error in formal mode for null
17078         procedure
17079         * sem_ch8.adb: Code clean up.
17080
17081 2011-08-01  Javier Miranda  <miranda@adacore.com>
17082
17083         * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
17084         * einfo.ads (Access_Disp_Table): Fix documentation.
17085         (Dispatch_Table_Wrappers): Fix documentation.
17086         * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
17087         Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
17088         to enforce the documentation of this attribute.
17089         (Set_Is_Interface): Cleanup the assertion.
17090         * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
17091         the Underlying_Type entity before reading attribute Access_Disp_Table.
17092         * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
17093         Locate the Underlying_Type before reading attribute Access_Disp_Table.
17094         * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
17095         the Underlying_Type entity before reading attribute Access_Disp_Table.
17096         * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
17097         Locate the Underlying_Type entity before reading attribute
17098         Access_Disp_Table.
17099
17100 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
17101
17102         * s-poosiz.ads: Additional overriding indicators.
17103
17104 2011-08-01  Yannick Moy  <moy@adacore.com>
17105
17106         * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
17107         formal mode.
17108         (Analyze_Iteration_Scheme): issue error in formal mode when loop
17109         parameter specification does not include a subtype mark.
17110         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
17111         formal mode on abstract subprogram.
17112         (Analyze_Subprogram_Specification): issue error in formal mode on
17113         user-defined operator.
17114         (Process_Formals): issue error in formal mode on access parameter and
17115         default expression.
17116         * sem_ch9.adb (Analyze_Abort_Statement,
17117         Analyze_Accept_Statement, Analyze_Asynchronous_Select,
17118         Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
17119         Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
17120         Analyze_Requeue, Analyze_Selective_Accept,
17121         Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
17122         * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
17123         issue error in formal mode on user-defined raise statement.
17124
17125 2011-08-01  Thomas Quinot  <quinot@adacore.com>
17126
17127         * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
17128         declaration being hidden when overriding an implicit inherited
17129         subprogram.
17130         * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
17131         (-gnats), do not complain about a source file that contains only a
17132         pragma No_Body.
17133
17134 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
17135
17136         * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
17137         variable if already set.
17138
17139 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
17140
17141         * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
17142         g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
17143         s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
17144         g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
17145         g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
17146         g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
17147         g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
17148         g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
17149         g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
17150         g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
17151         g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
17152         s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
17153         g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
17154         s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
17155         g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
17156         g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
17157         g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
17158         g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
17159         g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
17160         g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
17161         s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
17162         s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
17163         a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
17164         s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
17165         s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
17166         g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
17167         g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
17168         g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
17169         g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
17170         g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
17171         g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
17172         s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
17173         s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
17174         g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
17175         g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
17176         s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
17177         s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
17178         g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
17179         g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
17180         g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
17181         s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
17182         g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
17183         g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
17184         g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
17185         s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
17186         g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
17187         g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
17188         g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
17189         s-osinte-mingw.ads: Update to GPLv3 run-time license.
17190         Use GNAT instead of GNARL.
17191
17192 2011-08-01  Bob Duff  <duff@adacore.com>
17193
17194         * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
17195         a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
17196         a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
17197         reformatting.
17198
17199 2011-08-01  Yannick Moy  <moy@adacore.com>
17200
17201         * debug.adb (d.D) reverve flag for the SPARK mode
17202         (d.E) reverve flag for SPARK generation mode
17203         (d.F) reverve flag for Why generation mode
17204         * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
17205         ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode):  New
17206         functions which return True when the corresponding modes are set
17207         (Formal_Language): return "spark" or "alfa" when in formal verification
17208         mode.
17209         * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
17210         Error_Msg to prefix the error message with a tag giving the formal
17211         language
17212         (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
17213         message with a tag giving the formal language
17214         * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
17215         block statement
17216         (Analyze_Case_Statement): issue error in formal mode on case statement
17217         with a single "others" case alternative
17218         (Analyze_Exit_Statement): issue errors in formal mode on exit
17219         statements which do not respect SPARK restrictions
17220         (Analyze_Goto_Statement): issue error in formal mode on goto statement
17221         (Check_Unreachable_Code): always issue an error (not a warning) in
17222         formal mode on unreachable code (concerns both code after an infinite
17223         loop and after an unconditional jump, both not allowed in SPARK)
17224         * sem_ch6.adb (Analyze_Return_Statement): add call to
17225         Set_Return_Present for a procedure containing a return statement
17226         (already done for functions in Analyze_Function_Return)
17227         (Analyze_Function_Return): issue error in formal mode on extended
17228         return or if return is not last statement in function
17229         (Check_Missing_Return): issue error in formal mode if function does
17230         not end with return or if procedure contains a return
17231         * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
17232         function to detect if there is an inner scope of its parameter S which
17233         is a loop.
17234
17235 2011-08-01  Thomas Quinot  <quinot@adacore.com>
17236
17237         * sem_ch6.ads: Minor reformatting.
17238
17239 2011-08-01  Javier Miranda  <miranda@adacore.com>
17240
17241         * sem_util.adb (Abstract_Interface_List): Complete condition when
17242         processing private type declarations to avoid reading unavailable
17243         attribute.
17244         (Is_Synchronized_Tagged_Type): Complete condition when processing
17245         private extension declaration nodes to avoid reading unavailable
17246         attribute.
17247
17248 2011-08-01  Thomas Quinot  <quinot@adacore.com>
17249
17250         * sem_ch3.adb: Minor reformatting.
17251
17252 2011-08-01  Thomas Quinot  <quinot@adacore.com>
17253
17254         * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
17255         i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
17256         s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
17257         s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
17258         for VMS, instead parametrize the common implementation with
17259         System.Parameters declarations.
17260
17261 2011-08-01  Eric Botcazou  <ebotcazou@adacore.com>
17262
17263         * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
17264
17265 2011-08-01  Tristan Gingold  <gingold@adacore.com>
17266
17267         * seh_init.c: Fix SEH handler installation on win64.
17268
17269 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
17270
17271         * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
17272         double analysis of an anonymous access to subprogram, because it can
17273         lead to improper sharing of profiles and a back-end crash.
17274
17275 2011-08-01  Robert Dewar  <dewar@adacore.com>
17276
17277         * make.adb, sem_ch4.adb: Minor reformatting.
17278         * gcc-interface/Make-lang.in: Update dependencies.
17279         * sem_util.adb, exp_ch5.adb: Minor reformatting.
17280
17281 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
17282
17283         * gnat_rm.texi: Fix definition of Long_Integer.
17284
17285 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
17286
17287         * exp_aggr.adb: check limit size of static aggregate unconditionally,
17288         to prevent storage exhaustion.
17289         * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
17290         finalized is a function body, insert the cleanup code before the final
17291         return statement, to prevent spurious warnings.
17292         * s-pooglo.ads: add overriding indicator.
17293
17294 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
17295
17296         * sem_ch4.adb (Operator_Check): improve error message when both a
17297         with_clause and a use_clause are needed to make operator usage legal.
17298         * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
17299         determine whether a compilation unit is visible within an other,
17300         either through a with_clause in the current unit, or a with_clause in
17301         its library unit or one one of its parents.
17302
17303 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
17304
17305         * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
17306         over an arbitrary expression of an array or container type.
17307         * lib-xref.adb: clarify comment.
17308
17309 2011-08-01  Bob Duff  <duff@adacore.com>
17310
17311         * einfo.ads: Minor reformatting.
17312         * debug.adb: Minor comment improvement.
17313
17314 2011-08-01  Javier Miranda  <miranda@adacore.com>
17315
17316         * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
17317         consider hidden subprograms as valid candidates.
17318
17319 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
17320
17321         * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
17322
17323 2011-08-01  Vasiliy Fofanov  <fofanov@adacore.com>
17324
17325         * gnat_ugn.texi: Fix typo.
17326
17327 2011-08-01  Robert Dewar  <dewar@adacore.com>
17328
17329         * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
17330         lib-xref.adb: Minor reformatting
17331
17332 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
17333
17334         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
17335         when to generate a call to Move_Final_List.
17336         (Has_Controlled_Parts): Remove this function.
17337
17338 2011-08-01  Geert Bosch  <bosch@adacore.com>
17339
17340         * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
17341         "," in choice list.
17342
17343 2011-08-01  Thomas Quinot  <quinot@adacore.com>
17344
17345         * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
17346         explicit raise of a predefined exception as Comes_From_Source if the
17347         original N_Raise_Statement comes from source.
17348
17349 2011-08-01  Robert Dewar  <dewar@adacore.com>
17350
17351         * sinfo.ads: Add comment.
17352         * sem_ch6.adb: Minor reformatting.
17353
17354 2011-08-01  Robert Dewar  <dewar@adacore.com>
17355
17356         * freeze.adb (Freeze_Entity): Refine check for bad component size
17357         clause to avoid rejecting confirming clause when atomic/aliased present.
17358
17359 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
17360
17361         * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
17362         better determine whether an entity reference is a write.
17363         * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
17364         subcomponent.
17365         * lib-xref.adb (Output_References): Do no suppress a read reference at
17366         the same location as an immediately preceeding modify-reference, to
17367         handle properly in-out actuals.
17368
17369 2011-08-01  Tristan Gingold  <gingold@adacore.com>
17370
17371         * env.c (__gnat_setenv) [VMS]: Refine previous change.
17372
17373 2011-08-01  Quentin Ochem  <ochem@adacore.com>
17374
17375         * i-cstrin.adb (New_String): Changed implementation, now uses only the
17376         heap to compute the result.
17377
17378 2011-08-01  Robert Dewar  <dewar@adacore.com>
17379
17380         * atree.ads: Minor reformatting.
17381
17382 2011-08-01  Emmanuel Briot  <briot@adacore.com>
17383
17384         * g-expect.adb (Get_Command_Output): Fix memory leak.
17385
17386 2011-08-01  Geert Bosch  <bosch@adacore.com>
17387
17388         * cstand.adb (P_Float_Type): New procedure to print the definition of
17389         predefined fpt types.
17390         (P_Mixed_Name): New procedure to print a name using mixed case
17391         (Print_Standard): Use P_Float_Type for printing floating point types
17392         * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
17393         precision IEEE float.
17394
17395 2011-08-01  Thomas Quinot  <quinot@adacore.com>
17396
17397         * sem_ch3.adb: Minor reformatting.
17398
17399 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
17400
17401         * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
17402         the completion of a generic function, insert the new body rather than
17403         rewriting the original.
17404
17405 2011-08-01  Yannick Moy  <moy@adacore.com>
17406
17407         * sinfo.ads, errout.ads: Typos in comments.
17408
17409 2011-08-01  Robert Dewar  <dewar@adacore.com>
17410
17411         * par-endh.adb: Minor reformatting.
17412
17413 2011-08-01  Robert Dewar  <dewar@adacore.com>
17414
17415         * aspects.ads, aspects.adb: Add aspects for library unit pragmas
17416         (Pre_Post_Aspects): New subtype.
17417         * par-ch12.adb (P_Generic): New syntax for aspects in packages
17418         * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
17419         * par-ch7.adb (P_Package): Remove Decl parameter
17420         (P_Package): Handle new syntax for aspects (before IS)
17421         * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
17422         new aspect syntax
17423         (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
17424         * par.adb (P_Aspect_Specifications): Add Semicolon parameter
17425         (P_Package): Remove Decl parameter
17426         * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
17427         aspects
17428         * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
17429         specs
17430         * sem_util.ads, sem_util.adb (Static_Boolean): New function
17431         * sinfo.ads: Document new syntax for aspects in packages etc.
17432         * sprint.adb: Handle new syntax of aspects before IS in package
17433
17434 2011-08-01  Thomas Quinot  <quinot@adacore.com>
17435
17436         * atree.ads: Minor reformatting.
17437         * sem_prag.adb: Minor reformatting.
17438
17439 2011-08-01  Robert Dewar  <dewar@adacore.com>
17440
17441         * exp_util.adb (Insert_Actions): Fix error in handling Actions for
17442         case expr alternative.
17443
17444 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
17445
17446         * sem_ch12.adb: Fix typo.
17447
17448 2011-08-01  Geert Bosch  <bosch@adacore.com>
17449
17450         * sem_prag.adb (Check_No_Link_Name): New procedure.
17451         (Process_Import_Or_Interface): Use Check_No_Link_Name.
17452         * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
17453         instead of Standard_Long_Long_Float_Size global. Preparation for
17454         eventual removal of per type constants.
17455         * exp_util.ads (Get_Stream_Size): New function returning the stream
17456         size value of subtype E.
17457         * exp_util.adb (Get_Stream_Size): Implement new function.
17458         * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
17459         function.
17460         * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
17461         * einfo.adb:
17462         (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
17463
17464 2011-08-01  Geert Bosch  <bosch@adacore.com>
17465
17466         * cstand.adb: Fix comments.
17467         * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
17468         count of arguments.
17469
17470 2011-08-01  Robert Dewar  <dewar@adacore.com>
17471
17472         * exp_ch4.adb, sem_cat.adb: Minor reformatting.
17473
17474 2011-08-01  Geert Bosch  <bosch@adacore.com>
17475
17476         * atree.ads: Fix comment.
17477
17478 2011-08-01  Robert Dewar  <dewar@adacore.com>
17479
17480         * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
17481         * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
17482         * par.adb: Add with for Namet.Sp.
17483         * par-tchk.adb: Minor reformatting.
17484
17485 2011-08-01  Vincent Celier  <celier@adacore.com>
17486
17487         * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
17488         (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
17489         of the init procedure of a SAL.
17490         * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
17491         New procedure.
17492
17493 2011-08-01  Thomas Quinot  <quinot@adacore.com>
17494
17495         * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
17496         reformatting.
17497
17498 2011-08-01  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
17499
17500         * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
17501
17502 2011-08-01  Thomas Quinot  <quinot@adacore.com>
17503
17504         * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
17505         conformant with its spec (return True only for types that have
17506         an overriding Initialize primitive operation that prevents them from
17507         having preelaborable initialization).
17508         * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
17509         initialization for controlled types in Ada 2005 or later mode.
17510
17511 2011-08-01  Robert Dewar  <dewar@adacore.com>
17512
17513         * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
17514         Postcondition.
17515         (Same_Aspect): New function.
17516         * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
17517         Type_Invariant, Precondition, Postcondition.
17518         * snames.ads-tmpl: Add Name_Type_Invariant.
17519
17520 2011-08-01  Robert Dewar  <dewar@adacore.com>
17521
17522         * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
17523         here.
17524         (Freeze_All_Ent): Fix error in handling inherited aspects.
17525         * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
17526         already analyzed, but don't skip entire processing of a declaration,
17527         that's wrong in some cases of declarations being rewritten.
17528         (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
17529         Don't delay for integer, string literals
17530         Treat predicates in usual manner for delay, remove special case code,
17531         not needed.
17532         (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
17533         (Build_Predicate_Function): Update saved expression in aspect
17534         (Build_Invariant_Procedure): Update saved expression in aspect
17535         * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
17536         of replacement of discriminant references if the reference is simple.
17537
17538 2011-08-01  Robert Dewar  <dewar@adacore.com>
17539
17540         * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
17541         * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
17542         Static_Predicate and Dynamic_Predicate.
17543         (Build_Predicate_Function): Add processing for Static_Predicate
17544         and Dynamic_Predicate.
17545         * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
17546         (From_Static_Predicate): New flag
17547         * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
17548
17549 2011-08-01  Robert Dewar  <dewar@adacore.com>
17550
17551         * usage.adb: Documentation cleanup for Ada version modes in usage.
17552         * expander.adb: Minor reformatting.
17553
17554 2011-08-01  Robert Dewar  <dewar@adacore.com>
17555
17556         * atree.ads: Minor comment fix.
17557         * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
17558         a-witeio.ads, sem_prag.adb: Minor reformatting.
17559
17560 2011-08-01  Doug Rupp  <rupp@adacore.com>
17561
17562         * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
17563         pointers. Use descrip.h header file for convenience. Add some
17564         comments.
17565
17566 2011-08-01  Robert Dewar  <dewar@adacore.com>
17567
17568         * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
17569         (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
17570         * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
17571         New procedure.
17572         (Check_Aspect_At_End_Of_Declarations): New procedure
17573         (Analye_Aspect_Specification): Minor changes for above procedures
17574         * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
17575         specification node as well.
17576
17577 2011-08-01  Pascal Obry  <obry@adacore.com>
17578
17579         * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
17580         Windows files. Use GetFilesAttributes() in this case to check for file
17581         existence instead of returning with an error code.
17582
17583 2011-08-01  Vincent Celier  <celier@adacore.com>
17584
17585         * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
17586         High is above Source length.
17587
17588 2011-08-01  Robert Dewar  <dewar@adacore.com>
17589
17590         * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
17591
17592 2011-08-01  Robert Dewar  <dewar@adacore.com>
17593
17594         * aspects.ads (Boolean_Aspects): New subtype.
17595         * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
17596         for derived types in cases where the parent type and derived type have
17597         aspects.
17598         * freeze.adb (Freeze_Entity): Fix problems in handling derived type
17599         with aspects when parent type also has aspects.
17600         (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
17601         boolean expression at this point).
17602         * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
17603         accordance with final decision on the Ada 2012 feature.
17604         * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
17605
17606 2011-08-01  Matthew Heaney  <heaney@adacore.com>
17607
17608         * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
17609
17610 2011-08-01  Pascal Obry  <obry@adacore.com>
17611
17612         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
17613         Fix Replace_Slice when High is above current string size.
17614         (Replace_Slice): Fix DL computation when High is above current
17615         string length.
17616
17617 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
17618
17619         * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
17620
17621 2011-08-01  Matthew Heaney  <heaney@adacore.com>
17622
17623         * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
17624         of node.
17625
17626 2011-08-01  Pascal Obry  <obry@adacore.com>
17627
17628         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
17629         reformatting.
17630
17631 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
17632
17633         * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
17634         access to protected subprograms in generic bodies.
17635         * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
17636         protected type, indicate that the convention of the subprogram is
17637         Convention_Protected, because it may be used in subsequent declarations
17638         within the protected declaration.
17639
17640 2011-08-01  Vincent Celier  <celier@adacore.com>
17641
17642         * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
17643         and "final" procedures when the name of the library is "ada", to avoid
17644         duplicate symbols "adainit" and "adafinal" in executables.
17645
17646 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
17647
17648         * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
17649         quantified expression that appears within a postcondition and uses the
17650         Ada2012 'Result attribute.
17651
17652 2011-07-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17653
17654         * init.c (__gnat_error_handler): Cast reason to int.
17655         (__gnat_install_handler): Explain sa_sigaction use.
17656
17657 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
17658
17659         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
17660         subprogram has copy-in copy-out parameters, try to promote the mode of
17661         the return type if it is passed in registers.
17662
17663 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
17664
17665         * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
17666         left operand as addressable.
17667
17668 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
17669
17670         * gcc-interface/gigi.h (build_function_stub): Remove.
17671         (build_return_expr): Likewise.
17672         (convert_vms_descriptor): Declare.
17673         * gcc-interface/utils.c (convert_vms_descriptor): Make global.
17674         (build_function_stub): Move to...
17675         * gcc-interface/utils2.c (build_return_expr): Move to...
17676         * gcc-interface/trans.c (build_function_stub): ...here.
17677         (build_return_expr): ...here.
17678         (Subprogram_Body_to_gnu): Add local variable for language_function.
17679         Disconnect the parameter attributes cache, if any, once done with it.
17680         Call end_subprog_body only after setting the end_locus.
17681         Build the stub associated with the function, if any, at the very end.
17682         (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
17683         variables and streamline control flow.
17684
17685 2011-07-23  Arnaud Charlet  <charlet@adacore.com>
17686
17687         PR ada/49819
17688         * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
17689         g-trasym-dwarf.adb.
17690
17691 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17692
17693         PR bootstrap/49794
17694         * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
17695         Assign to act.sa_sigaction.
17696         * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
17697         current->return_address to char * before arithmetic.
17698
17699 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17700
17701         * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
17702         Correct argument types.
17703         Extract code from reason.
17704         (__gnat_install_handler): Assign to act.sa_sigaction.
17705
17706 2011-07-21  Eric Botcazou  <ebotcazou@adacore.com>
17707
17708         * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
17709         (GNAT1_OBJS): ...here.
17710
17711 2011-07-15  Eric Botcazou  <ebotcazou@adacore.com>
17712
17713         PR ada/48711
17714         * g-socthi-mingw.adb (Fill): Fix formatting.
17715
17716         * gcc-interface/gigi.h: Move around comment.
17717
17718 2011-07-14  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
17719
17720         PR ada/46350
17721         * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
17722
17723 2011-07-14  Florian Weimer  <fw@deneb.enyo.de>
17724
17725         PR ada/48711
17726         * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
17727
17728 2011-07-13  Eric Botcazou  <ebotcazou@adacore.com>
17729
17730         * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
17731         range comparison if Pmode is SImode.
17732
17733 2011-07-12  Laurent GUERBY  <laurent@guerby.net>
17734             Eric Botcazou  <ebotcazou@adacore.com>
17735
17736         * adadecode.c: Wrap up in extern "C" block.
17737         * adadecode.h: Likewise.
17738         * adaint.c: Likewise.  Remove 'const' keyword.
17739         * adaint.h: Likewise.
17740         * argv.c: Likewise.
17741         * atree.h: Likewise.
17742         * cio.c: Likewise.
17743         * cstreams.c: Likewise.
17744         * env.c: Likewise.
17745         * exit.c: Likewise.
17746         * fe.h: Likewise.
17747         * final.c: Likewise.
17748         * init.c: Likewise.
17749         * initialize.c: Likewise.
17750         * link.c: Likewise.
17751         * namet.h: Likewise.
17752         * nlists.h: Likewise.
17753         * raise.c: Likewise.
17754         * raise.h: Likewise.
17755         * repinfo.h: Likewise.
17756         * seh_init.c: Likewise.
17757         * targext.c: Likewise.
17758         * tracebak.c: Likewise.
17759         * uintp.h: Likewise.
17760         * urealp.h: Likewise.
17761         * xeinfo.adb: Wrap up generated C code in extern "C" block.
17762         * xsinfo.adb: Likewise.
17763         * xsnamest.adb: Likewise.
17764         * gcc-interface/gadaint.h: Wrap up in extern "C" block.
17765         * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
17766         * gcc-interface/misc.c: Likewise.
17767         * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
17768         (GNAT1_C_OBJS): Remove ada/b_gnat1.o.  List ada/seh_init.o and
17769         ada/targext.o here...
17770         (GNAT_ADA_OBJS): ...and not here.
17771         (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
17772         (GNATBIND_OBJS): Reorder.
17773
17774 2011-07-07  Richard Henderson  <rth@redhat.com>
17775
17776         * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
17777         dwarf2out_frame_init.
17778
17779 2011-07-07  Eric Botcazou  <ebotcazou@adacore.com>
17780
17781         * gcc-interface/misc.c (gnat_init): Tweak previous change.
17782
17783 2011-07-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17784
17785         PR target/39150
17786         * gcc-interface/Makefile.in: Handle x86_64-solaris2.
17787
17788 2011-07-06  Richard Guenther  <rguenther@suse.de>
17789
17790         * gcc-interface/misc.c (gnat_init): Merge calls to
17791         build_common_tree_nodes and build_common_tree_nodes_2.
17792         Re-initialize boolean_false_node.
17793
17794 2011-07-02  Eric Botcazou  <ebotcazou@adacore.com>
17795             Olivier Hainque  <hainque@adacore.com>
17796             Nicolas Setton  <setton@adacore.com>
17797
17798         * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
17799         the type according to the ARTIFICIAL_P parameter.
17800         (create_type_decl): Likewise.
17801         (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
17802
17803 2011-07-01  Eric Botcazou  <ebotcazou@adacore.com>
17804
17805         * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
17806         (gnatbind): Likewise.
17807
17808 2011-06-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17809
17810         * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
17811
17812 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
17813
17814         * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
17815         local variable throughout.  Remove useless call to Base_Type.
17816         (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
17817         Take it also into account for the volatileness of the field.  Set the
17818         TREE_SIDE_EFFECTS flag as well in this case.  Reorder some warnings.
17819
17820 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
17821
17822         * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
17823         on a dereference built for a by-ref object if it has an address clause.
17824
17825 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
17826
17827         * einfo.ads (Address_Taken): Document use for the second argument of
17828         Asm_Input and Asm_Output attributes.
17829         * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
17830         argument is an entity name, then set Address_Taken on it.
17831         <Attribute_Asm_Output>: Likewise.
17832         * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
17833         Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
17834         (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
17835         memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
17836
17837 2011-06-16  Joern Rennecke  <joern.rennecke@embecosm.com>
17838
17839         PR middle-end/46500
17840         * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
17841
17842 2011-06-14  Joseph Myers  <joseph@codesourcery.com>
17843
17844         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
17845         (ada/utils.o): Update dependencies.
17846         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
17847         ../../../libcpp/libcpp.a.
17848         * gcc-interface/utils.c: Include common/common-target.h.
17849         (process_attributes): Use targetm_common.have_named_sections.
17850
17851 2011-06-07  Richard Guenther  <rguenther@suse.de>
17852
17853         * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
17854         set_sizetype.
17855
17856 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
17857
17858         * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
17859         TREE_THIS_NOTRAP flag.
17860
17861 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
17862
17863         * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
17864         Fix thinko.
17865
17866 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
17867
17868         * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
17869         constants whose full view has discriminants specially.
17870
17871 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
17872
17873         * gcc-interface/utils.c: Include diagnostic.h.
17874         (gnat_write_global_declarations): Output debug information for all
17875         global type declarations before finalizing the compilation unit.
17876         * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
17877
17878 2011-05-25  Jakub Jelinek  <jakub@redhat.com>
17879
17880         * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
17881
17882 2011-05-25  Kai Tietz  <ktietz@redhat.com>
17883
17884         * adaint.c (__gnat_to_canonical_file_list_next): Use array
17885         initialization instead of const/none-const pointer assignment.
17886
17887 2011-05-24  Joseph Myers  <joseph@codesourcery.com>
17888
17889         * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
17890         $(EXTRA_GNAT1_OBJS).
17891         (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
17892         (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
17893         (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
17894         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
17895         libcommon-target.a instead of prefix.o.
17896
17897 2011-05-21  Joseph Myers  <joseph@codesourcery.com>
17898
17899         PR ada/49097
17900         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
17901
17902 2011-05-20  Joseph Myers  <joseph@codesourcery.com>
17903
17904         * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
17905         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
17906         instead of version.o.
17907
17908 2011-05-18  Kai Tietz  <ktietz@redhat.com>
17909
17910         * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
17911         boolean_false_node instead of integer_zero_node.
17912         (convert_with_check): Likewise.
17913         * gcc-interface/decl.c (choices_to_gnu): Likewise.
17914
17915 2011-05-12  Eric Botcazou  <ebotcazou@adacore.com>
17916
17917         * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
17918         type of the parameter is an unconstrained array, convert the actual to
17919         the type of the formal in the In Out and Out cases as well.
17920
17921 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
17922
17923         * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
17924         call build_function_type_array or build_varargs_function_type_array
17925         instead.
17926         (create_subprog_type): Don't call build_function_type; call
17927         build_function_type_vec instead.
17928
17929 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
17930
17931         * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
17932         (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
17933         (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
17934
17935 2011-05-07  Eric Botcazou  <ebotcazou@adacore.com>
17936
17937         * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
17938
17939         * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
17940         * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
17941
17942 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
17943
17944         * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
17945
17946 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
17947
17948         * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
17949         instead of accessing TYPE_ARG_TYPES directly.
17950         * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
17951
17952 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
17953
17954         PR ada/48844
17955         * gcc-interface/gigi.h (get_variant_part): Declare.
17956         * gcc-interface/decl.c (get_variant_part): Make global.
17957         * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
17958         types have the same constant size, are record types and T1 has a
17959         variant part while T2 doesn't.
17960
17961 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
17962
17963         * gcc-interface/utils.c (begin_subprog_body): Do not call
17964         get_pending_sizes.
17965         (end_subprog_body): Likewise.
17966
17967 2011-05-04  Richard Guenther  <rguenther@suse.de>
17968
17969         * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
17970         int_const_binop.
17971         (pos_to_constructor): Likewise.
17972
17973 2011-05-03  Nathan Froyd  <froydnj@codesourcery.com>
17974             Eric Botcazou  <ebotcazou@adacore.com>
17975
17976         * gcc-interface/trans.c (gigi): Call build_function_type_list instead
17977         of build_function_type.  Adjust calls to...
17978         (build_raise_check): ...this.  Do not take a void_tree parameter.
17979         Call build_function_type_list instead of build_function_type.
17980         Fix head comment and swap couple of conditional blocks.
17981
17982 2011-04-30  Eric Botcazou  <ebotcazou@adacore.com>
17983
17984         * gnatvsn.ads (Library_Version): Bump to 4.7.
17985         (Current_Year): Bump to 2011.
17986
17987 2011-04-29  Michael Matz  <matz@suse.de>
17988
17989         * gcc-interface/misc.c (gnat_handle_option): Set
17990         warn_maybe_uninitialized.
17991
17992 2011-04-23  Gerald Pfeifer  <gerald@pfeifer.com>
17993
17994         * gnat_ugn.texi (Complexity Metrics Control): Update link to
17995         the Watson/McCabe paper.
17996
17997 2011-04-23  Jim Meyering  <meyering@redhat.com>
17998
17999         * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
18000
18001 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
18002
18003         * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
18004         onto the new type.
18005
18006 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
18007
18008         * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
18009         parameter.
18010         * gcc-interface/utils.c (create_subprog_decl): Likewise.  Set
18011         DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
18012         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
18013         ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
18014         <all>: Do not set flags on the reused DECL node coming from an alias.
18015         Set DECL_IGNORED_P on the DECL node built for subprograms if they
18016         don't need debug info here...
18017         * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
18018         (gigi): Adjust calls to create_subprog_decl.
18019         (build_raise_check): Likewise.
18020         (establish_gnat_vms_condition_handler): Likewise.
18021         (Compilation_Unit_to_gnu): Likewise.
18022         (gnat_to_gnu): Likewise.
18023
18024 2011-04-21  Eric Botcazou  <ebotcazou@adacore.com>
18025
18026         * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
18027         (NO_REORDER_ADAFLAGS): New variable.
18028         (EXTRA_GNATTOOLS): Always define.
18029         (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
18030         Clean up and adjust list of files compiled with special options.
18031         * gcc-interface/Make-lang.in: Likewise.
18032         (ada/decl.o): Cosmetical change.
18033         (ada/misc.o): Remove dependency on $(PLUGIN_H).
18034
18035 2011-04-20  Jim Meyering  <meyering@redhat.com>
18036
18037         * initialize.c (__gnat_initialize): Remove useless if-before-free.
18038
18039 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
18040
18041         * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
18042         $(CFLAGS) on the link line.
18043
18044 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
18045
18046         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
18047         padded type built for the return type if it is unconstrained.
18048
18049 2011-04-14  Nathan Froyd  <froydnj@codesourcery.com>
18050
18051         * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
18052
18053 2011-04-12  Nathan Froyd  <froydnj@codesourcery.com>
18054
18055         * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
18056         before calling TREE_CHAIN.
18057         * gcc-interface/misc.c (gnat_init_ts): New function.
18058         (LANG_HOOKS_INIT_TS): Define.
18059
18060 2011-04-12  Martin Jambor  <mjambor@suse.cz>
18061
18062         * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
18063         instead of cgraph_node.
18064
18065 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
18066
18067         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
18068         alignment on fields of the RETURN type built for the Copy-In Copy-Out
18069         mechanism.
18070
18071 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
18072
18073         * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
18074         of aggregate types that contain a placeholder.
18075
18076 2011-04-08  Nathan Froyd  <froydnj@codesourcery.com>
18077
18078         * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
18079         TYPE_ARG_TYPES.
18080         (handle_type_generic_attribute): Likewise.
18081
18082 2011-04-04  Eric Botcazou  <ebotcazou@adacore.com>
18083
18084         PR ada/47163
18085         * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
18086
18087 2011-04-04  Kai Tietz  <ktietz@redhat.com>
18088
18089         PR ada/47163
18090         * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
18091         to flag value.
18092
18093 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
18094
18095         * gcc-interface/utils2.c (build_allocator): In the unconstrained array
18096         type case, do not strip a padding type around the array type.
18097
18098 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
18099
18100         * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
18101         types.
18102
18103 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
18104
18105         * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
18106         * gcc-interface/misc.c (gnat_handle_option): Remove special handling
18107         code for -feliminate-unused-debug-types.
18108         (gnat_post_options): Likewise.
18109
18110 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
18111
18112         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
18113         declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
18114         distinct copy.
18115
18116 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
18117
18118         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
18119         DECL_ARTIFICIAL flag on enumeration types.
18120
18121 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
18122
18123         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
18124         fat pointer types artificial unconditionally.
18125         <E_Array_Subtype>: Attach the base array type as a parallel type if it
18126         isn't artificial.
18127
18128 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
18129
18130         * gcc-interface/gigi.h (get_dummy_type): Declare.
18131         (build_dummy_unc_pointer_types): Likewise.
18132         (finish_fat_pointer_type): Likewise.
18133         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
18134         fat pointer type has been built, complete it in place.
18135         <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
18136         and thin pointers.  Remove useless variable.
18137         (finish_fat_pointer_type): Make global and move to...
18138         * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
18139         (get_dummy_type): New function.
18140         (build_dummy_unc_pointer_types): Likewise.
18141         (gnat_pushdecl): Propage the name to the anonymous variants only.
18142         (update_pointer_to): Only adjust the pointer types in the unconstrained
18143         array case.
18144
18145 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
18146
18147         * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
18148         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
18149         if this is a Taft amendment type and the full declaration is available.
18150         * gcc-interface/trans.c (process_type): Likewise.
18151         If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
18152         (process_freeze_entity): Likewise.
18153         * gcc-interface/utils.c (dummy_global): New static variable.
18154         (gnat_write_global_declarations): If there are types declared as used
18155         at the global level, insert them in the global hash table.
18156
18157 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
18158
18159         * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
18160         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
18161         declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
18162         copy.
18163         (record_builtin_type): Add ARTIFICIAL_P parameter.  Set DECL_ARTIFICIAL
18164         flag of the type accordingly.
18165         * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
18166
18167 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
18168
18169         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
18170         finalizing types when updating the pointers to the designated type.
18171         <all>: Finalize the deferred types even if we didn't defer processing
18172         of incomplete types in this invocation.
18173
18174 2011-04-01  Olivier Hainque  <hainque@adacore.com>
18175             Nicolas Setton  <setton@adacore.com>
18176             Eric Botcazou  <ebotcazou@adacore.com>
18177
18178         * gcc-interface/misc.c (gnat_descriptive_type): New function.
18179         (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
18180
18181 2011-03-28  Kai Tietz  <ktietz@redhat.com>
18182
18183         * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
18184         Windows targets.
18185         (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
18186         * system-mingw.ads (System): Change ZCX_By_Default default to True.
18187
18188         * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
18189
18190 2011-03-28  Tristan Gingold  <gingold@adacore.com>
18191
18192         PR ada/44431
18193         * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
18194         Use ada output of gnatbind.
18195         (ada/b_gnatb.adb): Ditto.
18196         (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
18197         (ada.mostlyclean, ada.stage1)
18198         (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
18199         (ada.stagefeedback): Adjust.
18200         * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
18201         Use ada output of gnatbind.
18202         (b_gnatm.adb): Ditto.
18203         (b_gnatl.o, b_gnatm.o): New rules.
18204
18205 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
18206
18207         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
18208         for the padded type built to support a specified size or alignment.
18209
18210 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
18211
18212         * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
18213         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
18214         unconditionally to the end of the unit when the designated type is
18215         limited_with'ed.
18216         <all>: Rename local variable.  Attempt to un-defer types only and do it
18217         for limited_with'ed types as well.
18218         (finalize_from_with_types): Adjust comment.  Rename variable and tidy.
18219         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
18220         consistently and remove redundant call to finalize_from_with_types.
18221
18222 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
18223
18224         * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
18225         subprograms without a previous spec declared in the same unit.
18226         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
18227         subprograms at the end of the unit instead of at the beginning.
18228         * gcc-interface/utils.c (create_subprog_decl): Check that the entity
18229         isn't public for the special handling of non-inline functions nested
18230         inside inline external functions.
18231
18232 2011-03-25  Jeff Law  <law@redhat.com>
18233
18234         * gcc-interface/utils.c (def_fn_type): Add missing va_end.
18235
18236 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
18237
18238         * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
18239         * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
18240         to compute Set_Size_Depends_On_Discriminant.
18241         (Layout_Type): Call it on array types in back-end layout mode.
18242         * sem_util.adb (Requires_Transient_Scope): Return true for array
18243         types only if the size depends on the value of discriminants.
18244         * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
18245         type if the RHS is a call to a function that returns an unconstrained
18246         type with default discriminant.
18247
18248 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
18249
18250         * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
18251         non-conversion to the nominal result type at the end.
18252
18253 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
18254
18255         * gcc-interface/trans.c (create_temporary): New function taken from...
18256         (create_init_temporary): ...here.  Call it.
18257         (call_to_gnu): Create the temporary for the return value early, if any.
18258         Create it for a function with copy-in/copy-out parameters if there is
18259         no target; in other cases of copy-in/copy-out, use another temporary.
18260         Push the new binding level lazily.  Add and rename local variables.
18261
18262 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
18263
18264         * gcc-interface/decl.c (validate_size): Improve comments and tweak
18265         error message.
18266         (set_rm_size): Likewise.
18267
18268 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
18269
18270         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
18271         for the padded type built in order to support a specified alignment.
18272         Fix incorrect formatting.
18273
18274 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
18275
18276         PR bootstrap/48216
18277         * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
18278
18279 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
18280
18281         * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
18282         rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
18283         to the end of the list.  Adjust recursive call.  Rename local variable.
18284         If REORDER is true, reorder components of the record type.
18285         (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
18286         components_to_record and adjust the parameter list.
18287
18288 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
18289
18290         * gcc-interface/decl.c (elaborate_expression_1): When optimization is
18291         disabled, use the variable for bounds of loop iteration scheme.
18292
18293 2011-03-21  Kai Tietz  <ktietz@redhat.com>
18294
18295         PR target/12171
18296         * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
18297
18298 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
18299
18300         * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
18301         out whether the expression is read-only.  Short-circuit placeholder
18302         case and rename a couple of local variables.
18303
18304 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
18305
18306         * gcc-interface/gigi.h (smaller_form_type_p): Declare.
18307         * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
18308         * gcc-interface/utils.c (smaller_form_type_p): ...to here.
18309         (convert): Deal with conversions from a smaller form type specially.
18310
18311 2011-02-14  Eric Botcazou  <ebotcazou@adacore.com>
18312
18313         * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
18314         its argument, except for the special -I- switch.
18315
18316 2011-02-12  Gerald Pfeifer  <gerald@pfeifer.com>
18317
18318         * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
18319         "Ada Issues".
18320
18321 2011-02-08  Eric Botcazou  <ebotcazou@adacore.com>
18322
18323         * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
18324
18325 2011-02-03  Eric Botcazou  <ebotcazou@adacore.com>
18326
18327         * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
18328         GNAT_FORMAL.
18329         * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
18330         * gcc-interface/utils.c (fill_vms_descriptor): ...here.  Take GNU_TYPE
18331         instead of GNAT_FORMAL.  Protect the expression against multiple uses.
18332         Do not generate the check directly, instead instantiate the template
18333         check present in the descriptor.
18334         (make_descriptor_field): Move around.
18335         (build_vms_descriptor32): Build a template check in the POINTER field.
18336         (build_vms_descriptor): Remove useless suffixes.
18337         * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
18338
18339 2011-01-26  Eric Botcazou  <ebotcazou@adacore.com>
18340
18341         PR bootstrap/47467
18342         * targext.c: Include target files if IN_RTS is defined.
18343
18344 2011-01-26  Richard Guenther  <rguenther@suse.de>
18345
18346         PR bootstrap/47467
18347         * targext.c: Include config.h.
18348         * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
18349         dependency.
18350
18351 2011-01-04  Pascal Obry  <obry@adacore.com>
18352             Eric Botcazou  <ebotcazou@adacore.com>
18353
18354         * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
18355
18356 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
18357
18358         * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
18359         end-of-case on the end label and its associated gotos, if any.
18360
18361 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
18362
18363         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
18364         expressions of the parameter cache within the statement group of
18365         the CICO mechanism.
18366
18367 2011-01-04  Olivier Hainque  <hainque@adacore.com>
18368             Eric Botcazou  <ebotcazou@adacore.com>
18369
18370         * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
18371         (set_end_locus_from_node): New function.
18372         (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
18373         make and the function end_locus.
18374         (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
18375         for the elaboration subprogram.
18376         (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
18377         set the end_locus of the expression as well.
18378
18379 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
18380
18381         PR ada/47131
18382         * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
18383         variables that are referenced in exception handlers volatile.
18384
18385
18386 \f
18387 Copyright (C) 2011 Free Software Foundation, Inc.
18388
18389 Copying and distribution of this file, with or without modification,
18390 are permitted in any medium without royalty provided the copyright
18391 notice and this notice are preserved.