OSDN Git Service

* gcc-interface/gigi.h (enumerate_modes): Fix formatting.
[pf3gnuchains/gcc-fork.git] / gcc / ada / ChangeLog
1 2011-08-07  Eric Botcazou  <ebotcazou@adacore.com>
2
3         * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
4
5         * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
6
7         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
8
9 2011-08-05  Nicolas Roche  <roche@adacore.com>
10
11         * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
12         libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
13         canadian cross.
14         * gcc-interface/Make-lang.in: Add support for canadian cross setting.
15
16 2011-08-05  Matthew Heaney  <heaney@adacore.com>
17
18         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
19         subprogram bodies declared out-of-order.
20
21 2011-08-05  Yannick Moy  <moy@adacore.com>
22
23         * sem_util.adb (Unique_Name): only prefix with "standard" the names of
24         entities directly in package Standard, otherwise skip the standard
25         prefix.
26
27 2011-08-05  Robert Dewar  <dewar@adacore.com>
28
29         * a-cbmutr.adb: Minor reformatting
30         (Allocate_Node): refactor node allocation algorithm
31
32 2011-08-05  Robert Dewar  <dewar@adacore.com>
33
34         * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
35         * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
36         mode.
37         (Analyze_Pragma, case Check_Policy): Ditto.
38         * sem_prag.ads (Check_Disabled): New function
39         * snames.ads-tmpl: Add Name_Disable.
40
41 2011-08-05  Robert Dewar  <dewar@adacore.com>
42
43         * gnat_rm.texi: Document implementation-defined policy DISABLE for
44         pragmas Assertion_Policy, Check_Policy, Debug_Policy.
45
46 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
47
48         * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
49         that appears in a generic formal part and applies to a formal
50         subprogram.
51
52 2011-08-05  Robert Dewar  <dewar@adacore.com>
53
54         * a-cbmutr.ads: Minor reformatting.
55
56 2011-08-05  Matthew Heaney  <heaney@adacore.com>
57
58         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
59         to check count, check sign of value instead.
60         * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
61         (Copy_Subtree): allocate copy of source element
62         (Equal_Subtree): compare elements, not access objects
63
64 2011-08-05  Vincent Celier  <celier@adacore.com>
65
66         * gnat_ugn.texi: Fix VMS alternative.
67
68 2011-08-05  Thomas Quinot  <quinot@adacore.com>
69
70         * sem_ch11.adb: Add comment.
71
72 2011-08-05  Robert Dewar  <dewar@adacore.com>
73
74         * exp_util.adb: Minor comment fix.
75
76 2011-08-05  Robert Dewar  <dewar@adacore.com>
77
78         * scng.adb (Error_Unterminated_String): Improve flag position when
79         comma present.
80
81 2011-08-05  Matthew Heaney  <heaney@adacore.com>
82
83         * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
84         tree containers).
85         * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
86         multiway tree containers.
87
88 2011-08-05  Robert Dewar  <dewar@adacore.com>
89
90         * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
91         * stylesw.adb: Implement -gnatyC to control comment spacing
92         * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
93         -gnatyc/C).
94         * usage.adb: Add line for -gnatyC.
95
96 2011-08-05  Robert Dewar  <dewar@adacore.com>
97
98         * gnat_ugn.texi: Document -gnatyC.
99         * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
100         synonym for COMMENTS2).
101
102 2011-08-05  Robert Dewar  <dewar@adacore.com>
103
104         * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
105         a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
106         sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
107         a-comutr.ads, lib-xref.adb: Minor reformatting.
108
109 2011-08-05  Robert Dewar  <dewar@adacore.com>
110
111         * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
112         warning if there is an exception handler present.
113
114 2011-08-05  Pascal Obry  <obry@adacore.com>
115
116         * a-iteint.ads: Fix copyright year.
117
118 2011-08-05  Thomas Quinot  <quinot@adacore.com>
119
120         * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
121         statement SCO for a USE clause or a representation clause.
122
123 2011-08-05  Yannick Moy  <moy@adacore.com>
124
125         * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
126         between body and spec for stub.
127         (Detect_And_Add_ALFA_Scope): take into account subprogram stub
128         * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
129         pragma precondition or postcondition, for which the enclosing
130         subprogram or package in the AST is not the desired one, return empty.
131
132 2011-08-05  Thomas Quinot  <quinot@adacore.com>
133
134         * g-expect.adb: Minor reformatting.
135
136 2011-08-05  Bob Duff  <duff@adacore.com>
137
138         * a-fihema.adb: Comment out OS_Lib.
139
140 2011-08-05  Matthew Heaney  <heaney@adacore.com>
141
142         * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
143         (unbounded multiway tree containers) and a-iteint.ads.
144         * a-comutr.ads, a-comutr.adb:
145         This is the new Ada 2012 unit for unbounded multiway tree containers
146         * a-cimutr.ads, a-cimutr.adb
147         This is the new Ada 2012 unit for indefinite multiway tree containers
148         * a-iteint.ads: New file.
149
150 2011-08-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
151
152         * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
153
154 2011-08-05  Bob Duff  <duff@adacore.com>
155
156         * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
157         subpools.
158         * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
159
160 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
161
162         * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
163         general indexing aspects of Ada2012. Called when analyzing indexed
164         components when other interpretations fail.
165         * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
166         in an expression context where overloading is meaningful. This excludes
167         the occurrence in an aspect specification (efficiency only).
168         * sem_attr.adb (Analyze_Attribute): indicate that the attributes
169         related to iterators can be set by an attribute specification, but
170         cannot be queried.
171         * sem_ch13.adb (Analyze_Aspect_Specifications): handle
172         Constant_Indexing and Variable_Indexing.
173         (Check_Indexing_Functions): New procedure to perform legality checks.
174         Additional semantic checks at end of declarations.
175
176 2011-08-05  Sergey Rybin  <rybin@adacore.com>
177
178         * tree_io.ads: Update ASIS_Version_Number because of the change of the
179         order of calling Tree_Write/Tree_Read routines made for aspects.
180
181 2011-08-05  Bob Duff  <duff@adacore.com>
182
183         * a-fihema.adb (Finalize): Fix race condition.
184
185 2011-08-05  Yannick Moy  <moy@adacore.com>
186
187         * sem_ch12.adb (Analyze_Package_Instantiation,
188         Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
189         mode.
190
191 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
192
193         * sem_type.adb (Specific_Type): in an instance, the type-specific
194         operand of an equality check that involves null may have a private
195         type. Use full view to determine legality of construct.
196
197 2011-08-05  Vincent Celier  <celier@adacore.com>
198
199         * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
200         delete or close the file when the call to gnatmake was successful.
201
202 2011-08-05  Yannick Moy  <moy@adacore.com>
203
204         * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
205         Global_Discard_Names.
206
207 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
208
209         * sinfo.ads: comments on use of entity field for aspect specifications.
210
211 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
212
213         * sem_ch12.adb (Reset_Entity): If the entity field of the associated
214         node is not itself an entity but a selected component, it is a
215         rewritten parameterless call to an en enclosing synchronized operation,
216         and this expansion will be performed again in the instance, so there is
217         no global information to preserve.
218
219 2011-08-05  Javier Miranda  <miranda@adacore.com>
220
221         * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
222         for renamings of predefined primitives.
223         (In_Predef_Prims_DT): New subprogram.
224
225 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
226
227         * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
228         possible interpretation of name is a reference type, add an
229         interpretation that is the designated type of the reference
230         discriminant of that type.
231         * sem_res.adb (resolve): If the interpretation imposed by context is an
232         implicit dereference, rewrite the node as the deference of the
233         reference discriminant.
234         * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
235         Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
236         parent type or base type.
237         * sem_ch4.adb (Process_Indexed_Component,
238         Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
239         Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
240         Check for implicit dereference.
241         (List_Operand_Interps): Indicate when an implicit dereference is
242         ambiguous.
243         * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
244
245 2011-08-05  Thomas Quinot  <quinot@adacore.com>
246
247         * scos.ads: Update documentation of SCO table. Pragma statements can now
248         be marked as disabled (using 'p' instead of 'P' as the statement kind).
249         * par_sco.ads, par_sco.adb: Implement the above change.
250         (Process_Decisions_Defer): Generate a P decision for the first parameter
251         of a dyadic pragma Debug.
252         * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
253         necessary.
254         * put_scos.adb: Code simplification based on above change.
255
256 2011-08-05  Robert Dewar  <dewar@adacore.com>
257
258         * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
259         bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
260         a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
261         prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
262
263 2011-08-05  Bob Duff  <duff@adacore.com>
264
265         * a-stunau.ads, g-spipat.adb: Update comments.
266
267 2011-08-05  Bob Duff  <duff@adacore.com>
268
269         * a-fihema.ads: Minor comment fix.
270         * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
271         correct.
272         (Attach, Detach): Remove some unnecessary code.
273         (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
274
275 2011-08-05  Bob Duff  <duff@adacore.com>
276
277         * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
278         allocation for Objects component. This simplifies the code somewhat. It
279         is also a little more efficient in the not-so-unusual case where there
280         are no controlled objects allocated.
281         Make Finalization_Started flag atomic.
282         (Finalize): Avoid unnecessary detachment of items from the list.
283         (pcol): Minor cleanup.
284
285 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
286
287         * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
288         package whose name is the same as that of the generic unit, or its
289         ultimate prefix.
290
291 2011-08-05  Bob Duff  <duff@adacore.com>
292
293         * a-fihema.adb, a-fihema.ads: Minor comment improvements.
294         * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
295         Minor comment fixes.
296
297 2011-08-05  Arnaud Charlet  <charlet@adacore.com>
298
299         * make.adb (Linking_Phase): No longer need to set source search path
300         before calling gnatlink in CodePeer mode.
301         * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
302         gcc in CodePeer mode, since the binder generated file no longer has a
303         'with Main'.
304         * switch.ads, switch.adb (Is_Language_Switch): Removed.
305         * switch-c.adb: Update comment.
306
307 2011-08-05  Thomas Quinot  <quinot@adacore.com>
308
309         * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
310
311 2011-08-05  Nicolas Roche  <roche@adacore.com>
312
313         * gnat_ugn.texi: Fix minor syntax error issue.
314
315 2011-08-05  Vincent Celier  <celier@adacore.com>
316
317         * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
318         delete or close the file when the call to gnatmake returns a non
319         successful return code.
320
321 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
322
323         * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
324         check, indicate that the copy of the original node does not come from
325         source, to prevent an infinite recursion of the expansion.
326
327 2011-08-05  Johannes Kanig  <kanig@adacore.com>
328
329         * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
330         VC generation for subprogram bodies.
331
332 2011-08-05  Yannick Moy  <moy@adacore.com>
333
334         * einfo.ads: Typo.
335         * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
336         the base type with the smallest allowed base type.
337
338 2011-08-05  Sergey Rybin  <rybin@adacore.com>
339
340         * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
341         aspects.
342
343 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
344
345         * sem_ch12.ads: minor comment updates.
346
347 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
348
349         * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
350         instantiation and a formal package the compiler generates a package
351         renaming declaration so that the generic name within the declaration
352         is interpreted as a renaming of the instance. At the end of a formal
353         package declaration, this renaming must become invisible.
354
355 2011-08-05  Hristian Kirtchev  <kirtchev@adacore.com>
356
357         * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
358         comparison and rely on concrete entities instead.
359
360 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
361
362         * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
363         and discriminants, to indicate that the type has an access discriminant
364         that supports implicit dereference.
365         * snames.ads-tmpl: Add names of aspects and attributes related to
366         Ada2012 iterators: constant_indexing, default_iterator,
367         iterator_element, implicit_dereference, variable_indexing.
368         * aspects.ads, aspects.adb: entries for iterator-related aspects.
369         * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
370         iterator-related aspects.
371         * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
372
373 2011-08-05  Sergey Rybin  <rybin@adacore.com>
374
375         * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
376         metrics in gnatmetric to cover new kinds of coupling mentrics.
377
378 2011-08-05  Steve Baird  <baird@adacore.com>
379
380         * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
381         of calling the user-defined main subprogram.
382         (Gen_Main):  Declare Ada_Main_Program and (if CodePeer_Mode
383         is set) Call_Main_Subprogram ahead of, as opposed to
384         inside of, Main.
385         (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
386         generation of a "with" of the user-defined main subprogram.
387         Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
388         (which is now called from Gen_Main instead).
389
390 2011-08-05  Emmanuel Briot  <briot@adacore.com>
391
392         * projects.texi: Added reference to the Makefile package.
393
394 2011-08-05  Thomas Quinot  <quinot@adacore.com>
395
396         * exp_ch7.adb: Minor comment rewording.
397
398 2011-08-05  Ed Falis  <falis@adacore.com>
399
400         * env.c: Fix comment.
401
402 2011-08-05  Hristian Kirtchev  <kirtchev@adacore.com>
403
404         * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
405         character comparison and rely on concrete entities instead.
406
407 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
408
409         * sem_ch3.adb: (Check_Private_Overriding): better error message,
410         suggested by AI95-0068.
411
412 2011-08-05  Hristian Kirtchev  <kirtchev@adacore.com>
413
414         * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
415         the two potential initialization calls. This accounts for any
416         access-before-elaboration checks which may precede the initialization
417         calls.
418         (Next_Suitable_Statement): New routine. Returns the next real statement
419         after the input node while skipping generated checks.
420         * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
421         with comment on usage.
422         Do not generate Elaborate_All when the trigger is a finalization call
423         coming from a type init proc.
424         (Check_Elab_Call): Propagate the initialization procedure context to
425         subsequent calls to Check_A_Call.
426         (Check_Internal_Call_Continue): Propagate the initialization procedure
427         context to subsequent calls to Check_Elab_Call.
428         (Is_Finalization_Procedure): New routine. Returns True if the input
429         entity denotes a [Deep_]Finalize routine.
430         * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
431         along with comment on usage.
432
433 2011-08-05  Vadim Godunko  <godunko@adacore.com>
434
435         * s-atocou.ads: Add list of supported platforms.
436
437 2011-08-05  Yannick Moy  <moy@adacore.com>
438
439         * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
440
441         * opt.ads (Disable_ALI_File): new Boolean flag
442         * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
443
444 2011-08-05  Ed Falis  <falis@adacore.com>
445
446         * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
447         environ is properly defined.
448
449 2011-08-05  Vincent Celier  <celier@adacore.com>
450
451         * make.adb (Compilation_Phase): Exit immediately when all objects have
452         been found up to date, to avoid multiple exit messages.
453         * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
454         same project for languages with no compiler.
455         * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
456         -eI.
457 2011-08-05  Robert Dewar  <dewar@adacore.com>
458
459         * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
460         sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
461         prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
462         s-atocou-builtin.adb: Minor reformatting.
463
464 2011-08-05  Yannick Moy  <moy@adacore.com>
465
466         * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
467         if the node to wrap is a pragma check, this node and enclosed
468         expression are not expanded, so do not apply any transformations here.
469         * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
470         introducing transient scopes.
471
472 2011-08-05  Jose Ruiz  <ruiz@adacore.com>
473
474         * adaint.c (__gnat_set_writable, __gnat_set_readable,
475         __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
476         __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
477         routine is available, so we use the default implementation of these
478         functions.
479         * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
480         support for copying attributes on VxWorks 6.
481
482 2011-08-05  Yannick Moy  <moy@adacore.com>
483
484         * debug.adb: Remove use of -gnatd.D.
485         * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
486         * opt.ads: Simplify variables for ALFA mode, to keep one only
487         * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
488         to ALFA mode.
489
490 2011-08-05  Vincent Celier  <celier@adacore.com>
491
492         * prj-conf.adb (Do_Autoconf): Look also for --RTS in
493         Builder'Default_Switches.
494
495 2011-08-05  Vincent Celier  <celier@adacore.com>
496
497         * makeusg.adb: Add lines for --create-map-file switches.
498
499 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
500
501         * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
502         profile is incomplete and the full view is available, replace it with
503         the full view.
504         * sem_ch6.adb (Possible_Freeze): if a type in the profile is
505         incomplete, freezing the subprogram is delayed until the full view is
506         frozen.
507         * sem_type.adb (Disambiguate): an ambiguity between a user-defined
508         fixed-point multiplication operator and the predefined operator is
509         resolved in favor of the user-defined one.
510
511 2011-08-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
512
513         * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
514         CONST_CAST.
515
516 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
517
518         * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
519         whether a type lacks user-defined Read or Write operations, or has a
520         component that lacks them.
521         * sem_attr.adb (Check_Stream_Attribute): if restriction
522         No_Default_Stream_Attributes is active, verify that all subcomponent
523         types of the target have user-defined stream operations, and report
524         error otherwise.
525         * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
526         * exp_strm.adb: Build_Elementary_Input_Call,
527         Build_Elementary_Write_Call): remove checks for restriction
528         No_Default_Stream_Attributes, now checked in semantics.
529
530 2011-08-04  Vincent Celier  <celier@adacore.com>
531
532         * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
533         switches on the command line, look for all valid --RTS switches in the
534         Builder switches and for each language use the first runtime name found
535         to invoke gprconfig.
536         (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
537         command line and there is no auto-configuration.
538         (Runtime_Name_Set_For): New function.
539
540 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
541
542         * exp_ch7.adb (Build_Object_Declarations): Do not generate the
543         elaborate initialization expression for variable Abort when processing
544         a package body or a declaration.
545         (Create_Finalizer): Propagate the package context when creating the
546         exception-related variables.
547         * exp_ch7.ads (Build_Object_Declarations): New formal parameter
548         For_Package along with usage comment.
549
550 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
551
552         * gcc-interface/Makefile.in: Clean up targets.
553         Enable new package for atomic counters and copy-on-write implementation
554         of unbounded strings on x86 platforms.
555         * gcc-interface/Make-lang.in: Update dependencies.
556
557 2011-08-04  Robert Dewar  <dewar@adacore.com>
558
559         * exp_ch7.adb: Minor reformatting.
560
561 2011-08-04  Robert Dewar  <dewar@adacore.com>
562
563         * exp_strm.adb: Minor reformatting.
564
565 2011-08-04  Vadim Godunko  <godunko@adacore.com>
566
567         * s-atocou.adb: Replace by dummy version and use on targets where atomic
568         operations are not supported.
569         * s-atocou-builtin.adb: Renamed from s-atocou.adb.
570         * s-atocou-x86.adb: New file.
571         * Makefile.rtl: Add s-atocou.o file
572
573 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
574
575         * make.adb (Compile): Move setting of CodePeer_Mode to ...
576         (Compilation_Phase): ... here.
577         (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
578
579 2011-08-04  Thomas Quinot  <quinot@adacore.com>
580
581         * Make-generated.in: Fix minor typo in comment.
582
583 2011-08-04  Thomas Quinot  <quinot@adacore.com>
584
585         * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
586         the project path.
587
588 2011-08-04  Robert Dewar  <dewar@adacore.com>
589
590         * a-coinho.adb: Minor reformatting.
591
592 2011-08-04  Robert Dewar  <dewar@adacore.com>
593
594         * a-coinho.ads: Minor reformatting.
595
596 2011-08-04  Vadim Godunko  <godunko@adacore.com>
597
598         * s-atocou.ads, s-atocou.adb: New files.
599         * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
600         a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
601         direct use of GCC's atomic builtins and replace them by use of new
602         atomic counter package.
603
604 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
605
606         * exp_strm.adb: better error message for No_Default_Stream_Attributes.
607
608 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
609
610         * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
611         with a call to Get_External_Tag.
612         * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
613         subprogram usage. Remove the guard against package declarations and
614         bodies since Build_Cleanup_Statements is no longer invoked in that
615         context.
616         (Build_Components): Initialize Tagged_Type_Stmts when the context
617         contains at least one library-level tagged type.
618         (Build_Finalizer): New local variables Has_Tagged_Types and
619         Tagged_Type_Stmts along with associated comments on usage. Update the
620         logic to include tagged type processing.
621         (Create_Finalizer): Insert all library-level tagged type unregistration
622         code before the jump block circuitry.
623         (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
624         (Expand_N_Package_Declaration): Remove the call to
625         Build_Cleanup_Statements.
626         (Process_Tagged_Type_Declaration): New routine. Generate a call to
627         unregister the external tag of a tagged type.
628         (Processing_Actions): Reimplemented to handle tagged types.
629         (Process_Declarations): Detect the declaration of a library-level
630         tagged type and carry out the appropriate actions.
631         (Unregister_Tagged_Types): Removed. The machinery has been directly
632         merged with Build_Finalizer.
633
634 2011-08-04  Robert Dewar  <dewar@adacore.com>
635
636         * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
637         gnatls.adb, exp_ch3.adb: Minor reformatting.
638
639 2011-08-04  Marc Sango  <sango@adacore.com>
640
641         * sem_attr.adb (Analyze_Attribute): Replace the message
642         "invisible attribute of}" of the spark restriction violation in
643         attribute reference by the simple message "invisible attribute of type".
644         Indeed, the node value Error_Msg_Node_1 used is in conflit with the
645         two insertion characters: '&' and '}'.
646
647 2011-08-04  Vadim Godunko  <godunko@adacore.com>
648
649         * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
650         * a-coinho.ads, a-coinho.adb: New file.
651         * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
652
653 2011-08-04  Nicolas Roche  <roche@adacore.com>
654
655         * alfa_test.adb: Not all ali files are containing alfa information even
656         if compiled with -gnatd.F. So suppress warning about missing ALFA
657         information.
658
659 2011-08-04  Yannick Moy  <moy@adacore.com>
660
661         * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
662         scope.
663         * put_alfa.adb: Check that scope name is not empty.
664
665 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
666
667         * exp_ch3.adb (Stream_Operation_Ok): new predicate
668         Needs_Elementary_Stream_Operation, to determine whether user-defined
669         Read and Write attributes are available for the elementary components
670         of the given type. If only the predefined attributes are available,
671         then when restriction No_Default_Stream_Attributes is active the
672         predefined stream attributes for the composite type cannot be created.
673
674 2011-08-04  Robert Dewar  <dewar@adacore.com>
675
676         * bindgen.adb: Fix obsolete comments and names from Ada/C days.
677         Put routines in alpha order
678
679 2011-08-04  Jose Ruiz  <ruiz@adacore.com>
680
681         * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
682         * gcc-interface/Make-lang.in: Update dependencies.
683
684 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
685
686         * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
687         * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
688         gnat1why).
689
690 2011-08-04  Robert Dewar  <dewar@adacore.com>
691
692         * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
693         lib-xref-alfa.adb: Minor reformatting.
694
695 2011-08-04  Marc Sango  <sango@adacore.com>
696
697         * sem_ch12.adb (Analyze_Generic_Package_Declaration,
698         Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
699         Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
700         mode.
701
702 2011-08-04  Tristan Gingold  <gingold@adacore.com>
703
704         * bindgen.adb (Gen_Adainit_C): Remove.
705         (Gen_Adafinal_C): Ditto.
706         (Gen_Elab_Externals_C): Ditto.
707         (Gen_Elab_Calls_C): Ditto.
708         (Gen_Elab_Order_C): Ditto.
709         (Gen_Elab_Defs_C): Ditto.
710         (Gen_Finalize_Library_C): Ditto.
711         (Gen_Finalize_Library_Defs_C): Ditto.
712         (Gen_Main_C): Ditto.
713         (Gen_Output_File_C): Ditto.
714         (Gen_Restrictions_C): Ditto.
715         (Gen_Versions_C): Ditto.
716         (Write_Info_Ada_C): Ditto.
717         (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
718         (Gen_Output_File): Do not force Ada_Bind_File anymore.
719         Always call Gen_Output_File_Ada.
720         * gnatlink.adb (Begin_Info): Now a constant.
721         (End_Info): Ditto.
722         (Ada_Bind_File): Remove
723         (Process_Args): Do not handle -A/-C.  Remove not Ada_Bind_File cases.
724         * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
725         * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
726         * opt.ads (Ada_Bind_File): Remove.
727
728 2011-08-04  Thomas Quinot  <quinot@adacore.com>
729
730         * projects.texi: Document target-specific directory in default project
731         path for gnatmake.
732
733 2011-08-04  Thomas Quinot  <quinot@adacore.com>
734
735         * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
736         path in all cases .
737
738 2011-08-04  Yannick Moy  <moy@adacore.com>
739
740         * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
741         opt.ads, lib-xref.ads: Code clean up.
742
743 2011-08-04  Yannick Moy  <moy@adacore.com>
744
745         * gnat_rm.texi: Update description of Test_Case
746         * gnat_ugn.texi: Typo.
747
748 2011-08-04  Ed Falis  <falis@adacore.com>
749
750         * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
751
752 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
753
754         * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
755         it is of type Root_Controlled. This action eliminates fields Prev and
756         Next from type equality.
757
758 2011-08-04  Yannick Moy  <moy@adacore.com>
759
760         * lib-xref-alfa.adb: Correct typo.
761
762 2011-08-04  Matthew Heaney  <heaney@adacore.com>
763
764         * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
765         component.
766
767 2011-08-04  Yannick Moy  <moy@adacore.com>
768
769         * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
770         (Analyze_Pragma): allow static string expression for name of Test_Case,
771         instead of simply string literals.
772         * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
773         expressions.
774
775 2011-08-04  Vincent Celier  <celier@adacore.com>
776
777         * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
778         case suffixes to find truncated main sources.
779
780 2011-08-04  Tristan Gingold  <gingold@adacore.com>
781
782         * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
783         s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
784         (Compute_Current_Task): Ditto.
785
786 2011-08-04  Tristan Gingold  <gingold@adacore.com>
787
788         * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
789
790 2011-08-04  Yannick Moy  <moy@adacore.com>
791
792         * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
793         library-level constant.
794         (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
795         * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
796         used as selector of parameter association, in ALFA mode.
797
798 2011-08-04  Robert Dewar  <dewar@adacore.com>
799
800         * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
801         s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
802         reformatting.
803
804 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
805
806         * make.adb (Linking_Phase): Set source search path before calling
807         gnatlink in CodePeer mode.
808
809 2011-08-04  Javier Miranda  <miranda@adacore.com>
810
811         * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
812         Remove code which takes care of building TSDs.
813         * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
814         * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
815         the accessibility check in VM targets.
816         * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
817         (Building_Static_DT): Now returns false for VM targets.
818         (Build_VM_TSDs): Removed.
819         (Expand_Interface_Conversion): Generate missing runtime check for
820         conversions to interface types whose target type is unknown at compile
821         time.
822         (Make_VM_TSD): Add missing code to disable the generation of calls to
823         Check_TSD if the tagged type is not defined at library level, or not
824         has a representation clause specifying its external tag, or -gnatdQ is
825         active.
826         * exp_disp.ads (Build_VM_TSDs): Removed.
827         (Make_VM_TSDs): Spec relocated from exp_disp.adb
828         * sem_disp.adb (Check_Dispatching_Operation): No code required to
829         register primitives in the dispatch tables in VM targets.
830         * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
831         initialization of class-wide interface objects in VM targets.
832         (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
833         of Make_DT).
834
835 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
836
837         * gnatlink.adb (Gnatlink): Correct missleading error message displayed
838         when dotnet-ld cannot be found.
839
840 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
841
842         * bindgen.adb: Simplify significantly generation of binder body file in
843         CodePeer mode.
844         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
845         when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
846         not expanded).
847
848 2011-08-04  Yannick Moy  <moy@adacore.com>
849
850         * sem_prag.adb, sem.ads: Code cleanup.
851
852 2011-08-04  Tristan Gingold  <gingold@adacore.com>
853
854         * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
855         * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
856         results if possible.
857         * s-stusta.adb (Print): Adjust after changes in s-stausa.
858         * gnat_ugn.texi: Update dynamic stack usage section.
859
860 2011-08-04  Steve Baird  <baird@adacore.com>
861
862         * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
863         Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
864         contains only a call to the user-defined main subprogram.
865         (Gen_Main_Ada) - If CodePeer_Mode is set, then
866         call the "wrapper" subprogram instead of directly
867         calling the user-defined main subprogram.
868
869 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
870
871         * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
872         alternatives of a case statement for controlled objects. Rename local
873         variable A to Dead_Alt.
874         (Expand_N_If_Statement): Check the then and else statements of an if
875         statement for controlled objects. Check the then statements of all
876         elsif parts of an if statement for controlled objects.
877         (Expand_N_Loop_Statement): Check the statements of a loop for controlled
878         objects.
879         * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
880         detects a loop associated with the expansion of an array object.
881         Augment the processing of the loop statements to account for a possible
882         wrap done by Process_Statements_For_Controlled_Objects.
883         * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
884         statements and abortable part of an asynchronous select for controlled
885         objects.
886         (Expand_N_Conditional_Entry_Call): Check the else statements of a
887         conditional entry call for controlled objects.
888         (Expand_N_Selective_Accept): Check the alternatives of a selective
889         accept for controlled objects.
890         (Expand_N_Timed_Entry_Call): Check the entry call and delay
891         alternatives of a timed entry call for controlled objects.
892         * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
893         exception handler for controlled objects.
894         * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
895         Add formal parameter Nested_Constructs along with its associated
896         comment.
897         (Requires_Cleanup_Actions (Node_Id)): Update all calls to
898         Requires_Cleanup_Actions.
899         (Process_Statements_For_Controlled_Objects): New routine.
900         * exp_util.ads (Process_Statements_For_Controlled_Objects): New
901         routine. Inspect a node which contains a non-handled sequence of
902         statements for controlled objects. If such an object is found, the
903         statements are wrapped in a block.
904
905 2011-08-04  Bob Duff  <duff@adacore.com>
906
907         * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
908         need to compare with Class_Wide_Type (T2), in order to get at the
909         original class-wide type node.
910         * sem_type.ads (Covers): Improve the comment.
911         * einfo.ads (Class_Wide_Type): Improve the comment.
912         * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
913         the type of the Deref.
914
915 2011-08-04  Yannick Moy  <moy@adacore.com>
916
917         * gnat_rm.texi: Document that Test_Case pragma can only appear on
918         separate declarations.
919         * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
920         check identifier of pragma argument.
921         (Chain_TC): check that no other test case associated to the same entity
922         share the same name.
923         (Check_Test_Case): disallow test case inside subprogram body
924         (Analyze_Pragma): correct call to check identifier and not argument
925         * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
926         function gets name from test case pragma.
927
928 2011-08-04  Yannick Moy  <moy@adacore.com>
929
930         * gnat_rm.texi: Document new pragma and aspect.
931         * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
932         (No_Duplicates_Allowed): new constant array defining whether duplicates
933         aspects of each kind can appear on the same declaration.
934         * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
935         field, which points to a node holding the previous Spec_PPC_List.
936         * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
937         through the indirection with Contract.
938         * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
939         * par-prag.adb (Prag): do nothing on Test_Case pragma
940         * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
941         be called directly.
942         * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
943         component Ensures of Test_Case.
944         * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
945         (Analyze_Generic_Subprogram_Declaration,
946         Analyze_Subprogram_Instantiation,
947         Analyze_Abstract_Subprogram_Declaration,
948         Analyze_Subprogram_Body_Helper,
949         Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
950         insert contract in subprogram node at point of definition
951         * sem_ch13.adb
952         (Aspect_Loop): do not raise error on duplicate Test_Case aspect
953         (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
954         corresponding pragma
955         (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
956         * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
957         similar to the analysis of pre/post
958         (Derive_Subprogram): insert contract in subprogram node at point of
959         derivation.
960         * sem_prag.adb, sem_prag.ads
961         (Check_Arg_Is_String_Literal, Check_Identifier):
962         new checking procedures to be called in treatment of pragmas
963         (Check_Test_Case): new procedure to check that a Test_Case aspect or
964         pragma is well-formed. This does not check currently that 'Result is
965         used only in the Ensures component of a Test_Case.
966         (Analyze_Pragma): add case for Test_Case
967         (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
968         components of a Test_Case.
969         (Preanalyze_TC_Args): new procedure to preanalyze the boolean
970         expressions in the 3rd (and 4th if present) arguments of a Test_Case
971         pragma, treated as spec expressions.
972         (Sig_Flags): add value -1 for Test_Case.
973         * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
974         Get_Requires_From_Test_Case_Pragma): getters for both expression
975         components of a Test_Case.
976         * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
977         indirection between an entry or [generic] subprogram entity and its
978         pre/post + test-cases.
979         (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
980         get/set for fields of an N_Contract node.
981         * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
982         Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
983         names and pragma for Test_Case.
984         * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
985
986 2011-08-04  Vincent Celier  <celier@adacore.com>
987
988         * gnat_ugn.texi: Improve documentation of gnatmake switch
989         --source-info-file=.
990
991 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
992
993         * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
994         type). Initialize Atyp to the appropriate type which is later checked
995         for completion. Rewrite the assertion associated with private type
996         completion.
997
998 2011-08-04  Ed Falis  <falis@adacore.com>
999
1000         * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
1001         initialize the number of CPUs.
1002
1003 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
1004
1005         * sem_type.adb (Disambiguate): New subsidiary routine
1006         In_Same_Declaration_List, to implement AI05-0020: a user-defined
1007         equality on an anonymous access type whose designated type is private
1008         does not lead to an ambiguity with the universal access equality
1009         operator in the body or child units of the defining package. The same
1010         is true for a multiplication operator on a private type completed with
1011         a fixed-point-type.
1012
1013 2011-08-04  Javier Miranda  <miranda@adacore.com>
1014
1015         * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
1016         (Normalize_Scalars_Config): Removed.
1017         * opt.adb
1018         (Register_Opt_Config_Switches): Remove registering config values of
1019         Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
1020         (Restore_Opt_Config_Switches): Remove code which restores the values of
1021         Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
1022         Init_Or_Norm_Scalars.
1023         (Save_Opt_Config_Switches): Remove code which saves values of
1024         Init_Or_Norm_Scalars and Normalize_Scalars.
1025         (Set_Opt_Config_Switches): Remove code which restores config values of
1026         Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
1027         Init_Or_Norm_Scalars.
1028
1029 2011-08-04  Yannick Moy  <moy@adacore.com>
1030
1031         * frontend.adb (Frontend): remove previous patch to avoid full
1032         qualification in ALFA mode.
1033         * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
1034         * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
1035         unique name for an entity, which could be used to identify the entity
1036         across compilation units.
1037
1038 2011-08-04  Thomas Quinot  <quinot@adacore.com>
1039
1040         * prj-env.adb
1041         (Initialize_Default_Project_Path): Add target specific directory
1042         ($prefix/$target/lib/gnat) in front of project path in all cases
1043         (making gnatmake's behaviour consistent with gprbuild).
1044         * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
1045         Pass target name from Sdefault to project subsystem.
1046         * gnatls.adb: Show new target specific default project directory.
1047
1048 2011-08-04  Johannes Kanig  <kanig@adacore.com>
1049
1050         * cstand.adb: Add Information to Identifier in Standard
1051         (Identifer_For): Set Entity to the corresponding entity
1052
1053 2011-08-04  Sergey Rybin  <rybin@adacore.com>
1054
1055         * gnat_ugn.texi: Update doc on gnatcheck.
1056
1057 2011-08-04  Yannick Moy  <moy@adacore.com>
1058
1059         * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
1060         xrefs in a scope.
1061
1062 2011-08-04  Yannick Moy  <moy@adacore.com>
1063
1064         * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
1065         performing expansion.
1066         * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
1067         Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
1068         it is not called in ALFA mode.
1069
1070 2011-08-04  Emmanuel Briot  <briot@adacore.com>
1071
1072         * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
1073         after all, so removed.
1074
1075 2011-08-04  Sergey Rybin  <rybin@adacore.com>
1076
1077         * vms_data.ads: Add missing VMS qualifiers.
1078
1079 2011-08-04  Emmanuel Briot  <briot@adacore.com>
1080
1081         * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
1082         the list of files on the command line after processing it through
1083         Complete_Mains.
1084
1085 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1086
1087         * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
1088         processing for .NET/JVM. These targets can now benefit from
1089         Raise_From_Controlled_Operation and they share the same processing with
1090         standard targets.
1091         (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
1092         These targets need transient scopes in order to properly finalize short
1093         lived controlled objects.
1094         (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
1095          NET/JVM. These targets can now benefit from
1096         Raise_From_Controlled_Operation and they share the same processing with
1097         standard targets.
1098
1099 2011-08-04  Geert Bosch  <bosch@adacore.com>
1100
1101         * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
1102
1103 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
1104
1105         * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
1106         Expand_Record_Aggregate, to determine whether aggregate must be
1107         expanded into assignments. This is the case if the ancestor part is
1108         private, regarless of the setting of the flag Has_Private_Ancestor.
1109
1110 2011-08-04  Ed Falis  <falis@adacore.com>
1111
1112         * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
1113
1114 2011-08-04  Bob Duff  <duff@adacore.com>
1115
1116         * sinfo.ads: Fix comment.
1117
1118 2011-08-04  Steve Baird  <baird@adacore.com>
1119
1120         * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
1121         choose a package name in much the same way as is
1122         done for JGNAT when VM_Target /= No_VM, except that
1123         a slightly more distinctive prefix string is used.
1124
1125 2011-08-04  Emmanuel Briot  <briot@adacore.com>
1126
1127         * makeutl.adb (Complete_Mains): no longer accept unit names on the
1128         gnatmake command line.
1129         This behavior was never documented (and was supported only because of
1130         an early bug in the code). This case might lead to ambiguous cases
1131         (between unit names and truncated base names without suffixes).
1132
1133 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1134
1135         * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
1136         Remove the external tag of a tagged type from the internal hash table.
1137         * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
1138         expanded usage of the routine. Strenghten the check for Is_Master. Add
1139         processing for tagged types.
1140         (Build_Finalizer): Create all the necessary lists used in finalizer
1141         creation when the processed context is a package that may contain
1142         tagged types.
1143         (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
1144         Requires_Cleanup_Actions.
1145         (Expand_N_Package_Body): Package bodies may need clean up code
1146         depending on whether they contain tagged types.
1147         (Expand_N_Package_Declaration): Package declarations may need clean up
1148         code depending on whether they contain tagged types.
1149         (Unregister_Tagged_Types): New routine. Search through a list of
1150         declarations or statements, looking for non-abstract Ada tagged types.
1151         For each such type, generate code to unregister the external tag.
1152         * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
1153         Requires_Cleanup_Actions.
1154         (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
1155         through a list of declarations or statements looking for non-abstract
1156         Ada tagged types or controlled objects.
1157         * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
1158         Requires_Cleanup_Actions.
1159         (Has_Controlled_Objects (List_Id, Boolean)): Removed.
1160         * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
1161         RE_Unit_Table.
1162
1163 2011-08-04  Vincent Celier  <celier@adacore.com>
1164
1165         * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
1166         has Ada sources, not project Project, because if the root project
1167         Project has no sources of its own, all projects will be deemed without
1168         sources.
1169
1170 2011-08-04  Gary Dismukes  <dismukes@adacore.com>
1171
1172         * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
1173         of the No_Param_Proc acc-to-subp type used for initialization of
1174         __gnat_finalize_library_objects so that it's declared at library level
1175         rather than nested inside of the adainit routine.
1176
1177 2011-08-04  Javier Miranda  <miranda@adacore.com>
1178
1179         * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
1180         if the tagged type has a representation clause which specifies its
1181         external tag.
1182
1183 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
1184
1185         * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
1186         Remove previous procedure with that name.
1187         * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
1188         when appropriate.
1189         * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
1190         subtype mark, the ancestor cannot have unknown discriminants.
1191         (Resolve_Record_Aggregate): if the type has invisible components
1192         because of a private ancestor, the aggregate is illegal.
1193
1194 2011-08-04  Vincent Celier  <celier@adacore.com>
1195
1196         * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
1197         account switches -gnat2005, -gnat12 and -gnat2012.
1198
1199 2011-08-04  Bob Duff  <duff@adacore.com>
1200
1201         * s-tasdeb.ads: Minor comment fix.
1202
1203 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
1204
1205         * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
1206         CodePeer mode.
1207         * switch.ads, switch.adb (Is_Language_Switch): New function.
1208
1209 2011-08-04  Vincent Celier  <celier@adacore.com>
1210
1211         * switch-c.adb: Minor comment addition.
1212
1213 2011-08-04  Vincent Celier  <celier@adacore.com>
1214
1215         * vms_conv.adb (Process_Argument): Fail graciously when qualifier
1216         ending with '=' is followed by a space (missing file name).
1217
1218 2011-08-04  Pascal Obry  <obry@adacore.com>
1219
1220         * g-regist.ads: Fix size of HKEY on x86_64-windows.
1221
1222 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
1223
1224         * sem_ch12.adb (Analyze_Associations): New routine
1225         Check_Overloaded_Formal_Subprogram to reject a formal package when
1226         there is a named association or a box initialisation for an overloaded
1227         formal subprogram of the corresponding generic.
1228
1229 2011-08-04  Yannick Moy  <moy@adacore.com>
1230
1231         * alfa.ads (ALFA_Xref_Record): add component for type of entity
1232         * get_alfa.adb, put_alfa.adb: Read and write new component of
1233         cross-reference.
1234         * lib-xref-alfa.adb (Collect_ALFA): generate new component.
1235
1236 2011-08-04  Pascal Obry  <obry@adacore.com>
1237
1238         * urealp.adb: Minor reformatting.
1239
1240 2011-08-04  Tristan Gingold  <gingold@adacore.com>
1241
1242         * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
1243         Handle the case when Cleanup_Protected_Object returns Empty.
1244
1245 2011-08-04  Yannick Moy  <moy@adacore.com>
1246
1247         * frontend.adb (Frontend): only qualify names in non-ALFA mode
1248
1249 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
1250
1251         * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
1252         call, ignore functions.
1253
1254 2011-08-04  Geert Bosch  <bosch@adacore.com>
1255
1256         * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
1257         point.
1258
1259 2011-08-04  Emmanuel Briot  <briot@adacore.com>
1260
1261         * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
1262         as an index for Builder'Switches. This conforms to the documentation.
1263         * make.adb (Insert_Project_Sources): avoid duplicate code
1264
1265 2011-08-04  Emmanuel Briot  <briot@adacore.com>
1266
1267         * makeutl.adb (Complete_Mains): if the user has passed a relative file
1268         name on the command line (for instance "../dummy"), never assume it can
1269         be a unit name.
1270
1271 2011-08-04  Tristan Gingold  <gingold@adacore.com>
1272
1273         * bindgen.adb: Remove code the reference or create the
1274         Break_Start/__gnat_break_start procedure.
1275         * s-stalib.adb (Break_Start): Removed.
1276
1277 2011-08-04  Emmanuel Briot  <briot@adacore.com>
1278
1279         * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
1280         shared with gprbuild.
1281
1282 2011-08-04  Yannick Moy  <moy@adacore.com>
1283
1284         * par-ch4.adb (P_Primary): preferentially issue an error message about
1285         a missing parenthesis arount a conditional or case expression in Ada
1286         2012 mode, if we detect that the alignment is not correct for a
1287         statement.
1288
1289 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1290
1291         * exp_ch7.adb (Process_Declarations): Do not consider the result of a
1292         tag-to-class-wide conversion as needing finalization actions.
1293         * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
1294         a tag-to-class-wide conversion as needing finalization actions.
1295         (Is_Finalizable_Transient): The result of a tag-to-class-wide
1296         conversion does not need finalization actions.
1297         (Is_Tag_To_CW_Conversion): New routine.
1298         * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
1299         whether an object is the result of a tag-to-class-wide conversion.
1300
1301 2011-08-04  Yannick Moy  <moy@adacore.com>
1302
1303         * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
1304         the left-hand-side and right-hand-side of a conjunct are inserted when
1305         translating a pre- or postcondition
1306         * sem_ch6.adb: Correct typo in comment
1307
1308 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
1309
1310         * gnat_rm.texi: Ravenscar does not prohibit dependence on
1311         Unchecked_Conversion and Unchecked_Deallocation.
1312
1313 2011-08-04  Thomas Quinot  <quinot@adacore.com>
1314
1315         * make.adb: Minor reformatting.
1316
1317 2011-08-04  Emmanuel Briot  <briot@adacore.com>
1318
1319         * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
1320         sources in the project and its imported projects, but not in the whole
1321         tree.
1322
1323 2011-08-04  Emmanuel Briot  <briot@adacore.com>
1324
1325         * make.adb: Remove debug trace.
1326
1327 2011-08-04  Vincent Celier  <celier@adacore.com>
1328
1329         * makeutl.adb (Do_Complete): Get the absolute path name of a relative
1330         path in canonical form, to be able to compare path names on platforms
1331         such as Windows or Darwin.
1332
1333 2011-08-04  Thomas Quinot  <quinot@adacore.com>
1334
1335         * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
1336         For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
1337         * scos.ads: Update documentation accordingly.
1338         * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
1339         pragmas.
1340
1341 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
1342
1343         * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
1344         attribute only if prefix type is scalar.
1345
1346 2011-08-04  Emmanuel Briot  <briot@adacore.com>
1347
1348         * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
1349         in gnatmake for specifying mains on the command line that do not belong
1350         to the main project. These mains must currently all belong to the same
1351         project, though.
1352         (Ultimate_Extension_Of): removed, since duplicated
1353         Ultimate_Extending_Project.
1354
1355 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
1356
1357         * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
1358         instead.
1359         (CodePeer_Mode_String): New.
1360         (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
1361         CodePeer mode.
1362         (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
1363         * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
1364         mode, since no useful elaboration subprogram is needed by CodePeer.
1365         * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
1366         In this mode, compile binder file with -gnatC and do stop after this
1367         step.
1368
1369 2011-08-04  Vincent Celier  <celier@adacore.com>
1370
1371         * exp_ch7.adb: Minor comment fix.
1372
1373 2011-08-04  Robert Dewar  <dewar@adacore.com>
1374
1375         * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
1376         exp_ch4.adb, makeutl.adb: Minor reformatting.
1377
1378 2011-08-04  Emmanuel Briot  <briot@adacore.com>
1379
1380         * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
1381         Create several new subprograms to move code out of Make. This makes the
1382         code more readable, removes code duplication, and is a preparation work
1383         for adding support for aggregate projects.
1384
1385 2011-08-04  Tristan Gingold  <gingold@adacore.com>
1386
1387         * s-po32gl.ads, s-po32gl.adb: New files.
1388         * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
1389         * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
1390         (Build_Finalization_Collection): Use it.
1391         * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
1392         * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
1393         literals.
1394         * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
1395         * gcc-interface/Make-lang.in: Update dependencies.
1396
1397 2011-08-04  Emmanuel Briot  <briot@adacore.com>
1398
1399         * makeutl.adb (Complete_Mains): add support for specs with no suffix on
1400         the command line.
1401
1402 2011-08-04  Emmanuel Briot  <briot@adacore.com>
1403
1404         * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
1405         command line is not a file name, also check whether it could be a unit
1406         name.
1407
1408 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
1409
1410         * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
1411         the header of the finalization routine.
1412         If the unit has no finalizer but is a body whose spec has one, then
1413         generate the decrement of the elaboration entity only.
1414         If the unit has a finalizer and is a spec, then do not generate the
1415         decrement of the elaboration entity.
1416         (Gen_Finalize_Library_C): Likewise.
1417
1418 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1419
1420         * exp_ch7.adb (Alignment_Of): New subsidiary routine.
1421         (Bounds_Size_Expression): Removed.
1422         (Double_Alignment_Of): New subsidiary routine.
1423         (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
1424         for a hole in the dope vector of unconstrained arrays due to different
1425         index and element alignments.
1426
1427 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
1428
1429         * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
1430         raise program_error because body has not been seen yet.
1431
1432 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
1433
1434         * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
1435         an unresolved name.
1436
1437 2011-08-04  Vincent Celier  <celier@adacore.com>
1438
1439         * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
1440
1441 2011-08-04  Yannick Moy  <moy@adacore.com>
1442
1443         * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
1444         * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
1445
1446 2011-08-04  Thomas Quinot  <quinot@adacore.com>
1447
1448         * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
1449         instantiation in RCI.
1450
1451 2011-08-04  Emmanuel Briot  <briot@adacore.com>
1452
1453         * make.adb: Share more code with gprbuild
1454
1455 2011-08-04  Emmanuel Briot  <briot@adacore.com>
1456
1457         * projects.texi: Added documentation for the IDE'Gnat project file
1458         attribute.
1459
1460 2011-08-04  Nicolas Roche  <roche@adacore.com>
1461
1462         * gnat_rm.texi: Minor editing.
1463
1464 2011-08-04  Javier Miranda  <miranda@adacore.com>
1465
1466         * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
1467         and the library case for VM targets.
1468         (Gen_Adainit_Ada): Likewise.
1469
1470 2011-08-04  Robert Dewar  <dewar@adacore.com>
1471
1472         * g-altive.ads: Minor comment updates.
1473         * prj-nmsc.adb: Minor reformatting.
1474
1475 2011-08-04  Javier Miranda  <miranda@adacore.com>
1476
1477         * opt.ads
1478         (Normalize_Scalars_Config): Value of the configuration switch set by
1479         pragma Normalize_Scalars when it appears in the gnat.adc file.
1480         (Normalize_Scalars): New field for record Config_Switches_Type. Used
1481         to save and restore settings of this pragma.
1482         * opt.adb
1483         (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
1484         Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
1485
1486 2011-08-04  Vincent Celier  <celier@adacore.com>
1487
1488         * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
1489
1490 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
1491
1492         * makeutl.adb: Minor reformatting.
1493
1494 2011-08-04  Olivier Hainque  <hainque@adacore.com>
1495
1496         * g-altive.ads: Update comments to reflect that only the soft
1497         binding is available today.
1498
1499 2011-08-04  Robert Dewar  <dewar@adacore.com>
1500
1501         * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
1502         makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
1503         * gcc-interface/Make-lang.in: Update dependencies.
1504
1505 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
1506
1507         * prj-env.adb: Remove local debug traces.
1508
1509 2011-08-04  Yannick Moy  <moy@adacore.com>
1510
1511         * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
1512         was used instead of Hi_OK, which could cause a read of an uninitialized
1513         value later on. Detected while working on the new warning.
1514         * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
1515         to local variable.
1516         * sem_ch5.adb (Analyze_Assignment): set the last assignment component
1517         in more cases, in order to detect more unreferenced values.
1518         * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
1519         object for expression, if any.
1520
1521 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
1522
1523         * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
1524         the operand types instead of the Esize.
1525
1526 2011-08-04  Steve Baird  <baird@adacore.com>
1527
1528         * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
1529         enable CodePeer_Mode.
1530         * bindusg.adb (Display): Add help message describing -P binder switch.
1531         * gnat_ugn.texi: Document -P binder switch.
1532         * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
1533         user-defined main program directly.
1534         (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
1535         user-defined main program in the context clause of the package body.
1536
1537 2011-08-04  Yannick Moy  <moy@adacore.com>
1538
1539         * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
1540         duplicate of Defining_Entity
1541         (Get_Unique_Entity_For_Decl): rename function into
1542         Unique_Defining_Entity
1543         * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
1544         (Formal_Proof_On): remove synthesized flag
1545         * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
1546         sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
1547         sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
1548         * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
1549         Annotate (Formal_Proof)
1550
1551 2011-08-04  Emmanuel Briot  <briot@adacore.com>
1552
1553         * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
1554         source files with non-standard naming schemes, in imported projects
1555
1556 2011-08-04  Emmanuel Briot  <briot@adacore.com>
1557
1558         * makeutl.adb (Complete_Mains): when a multi-unit source file is
1559         specified on the gprbuild command line, we need to compile all units
1560         within that file, not just the first one we find
1561         Fix error message for mains that are not found.
1562
1563 2011-08-04  Thomas Quinot  <quinot@adacore.com>
1564
1565         * sem_ch6.adb: Update comment.
1566         * sem_ch12.adb: Minor reformatting.
1567
1568 2011-08-04  Bob Duff  <duff@adacore.com>
1569
1570         * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
1571         Acceptor.Terminate_Alternative without locking Acceptor, which causes a
1572         race condition whose symptom is to fail to lock Parent. That, in turn,
1573         causes Parent.Awake_Count to be accessed without locking Parent, which
1574         causes another race condition whose symptom is that Parent.Awake_Count
1575         can be off by 1 (either too high or too low). The solution is to lock
1576         Parent unconditionally, and then lock Acceptor, before reading
1577         Acceptor.Terminate_Alternative.
1578
1579 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
1580
1581         * debug.adb: Update comment.
1582
1583 2011-08-04  Robert Dewar  <dewar@adacore.com>
1584
1585         * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
1586         sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
1587         exp_ch6.adb: Minor reformatting.
1588
1589 2011-08-04  Gary Dismukes  <dismukes@adacore.com>
1590
1591         * gnat_ugn.texi: Add sentence about the case of compile-time-detected
1592         checks for -gnateE.
1593
1594 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
1595
1596         * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
1597
1598 2011-08-04  Thomas Quinot  <quinot@adacore.com>
1599
1600         * sinfo.ads: Minor reformatting.
1601
1602 2011-08-04  Emmanuel Briot  <briot@adacore.com>
1603
1604         * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
1605         even if there is no location.
1606
1607 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
1608
1609         * sem_res.adb, sem_ch4.adb: move check for restriction
1610         No_Task_Hierarchy to resolve_allocator.
1611
1612 2011-08-04  Thomas Quinot  <quinot@adacore.com>
1613
1614         * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
1615         This flag of N_Pragma nodes is not used, remove it as well as all of
1616         the associated circuitry.
1617
1618 2011-08-04  Javier Miranda  <miranda@adacore.com>
1619
1620         * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
1621         runtime check on duplicated externa tags
1622         * debug.adb Document switch -gnatdQ.
1623
1624 2011-08-04  Gary Dismukes  <dismukes@adacore.com>
1625
1626         * a-fihema.ads: Minor typo fix.
1627
1628 2011-08-04  Yannick Moy  <moy@adacore.com>
1629
1630         * sem_ch10.adb: Minor comment update.
1631
1632 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1633
1634         * einfo.adb: Update the node field usage to reflect the renaming of
1635         Return_Flag to Return_ Flag_Or_Transient_Decl.
1636         (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
1637         (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
1638         (Write_Field15_Name): Change Return_Flag to
1639         Return_Flag_Or_Transient_Decl.
1640         * einfo.ads: Rename node field Return_Flag to
1641         Return_Flag_Or_Transient_Decl. Update the associated comment and all
1642         occurrences in entities.
1643         (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
1644         associated Inline pragma.
1645         (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
1646         associated Inline pragma.
1647         * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
1648         routine.
1649         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
1650         Return_Flag and Set_Return_Flag.
1651         * exp_ch7.adb (Process_Declarations): Add code to recognize hook
1652         objects generated for controlled transients declared inside an
1653         Exception_With_Actions. Update the calls to Return_Flag.
1654         (Process_Object_Declaration): Add code to add a null guard for hook
1655         objects generated for controlled transients declared inside an
1656         Exception_With_Actions. Update related comment.
1657         * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
1658         objects generated for controlled transients declared inside an
1659         Exception_With_Actions. Update the calls to Return_Flag.
1660         * expander.adb (Expand): Add new case for N_Expression_With_Actions.
1661
1662 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
1663
1664         * sem_util.adb:(Wrong_Type): Improve error message on a one-element
1665         positional aggregate.
1666
1667 2011-08-04  Vincent Celier  <celier@adacore.com>
1668
1669         * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
1670         SLOC only for pragmas.
1671
1672 2011-08-04  Emmanuel Briot  <briot@adacore.com>
1673
1674         * projects.texi: Minor typo fix.
1675
1676 2011-08-04  Emmanuel Briot  <briot@adacore.com>
1677
1678         * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
1679         on case-sensitive file systems.
1680
1681 2011-08-04  Thomas Quinot  <quinot@adacore.com>
1682
1683         * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
1684         nested in a disabled pragma.
1685         * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
1686         enclosing pragma, if any, for X decisions.
1687
1688 2011-08-04  Thomas Quinot  <quinot@adacore.com>
1689
1690         * sem_prag.adb: Minor reformatting.
1691
1692 2011-08-04  Vincent Celier  <celier@adacore.com>
1693
1694         * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
1695         allowed in no run time mode.
1696
1697 2011-08-04  Vincent Celier  <celier@adacore.com>
1698
1699         * make.adb (Check): When -gnatc is used, check for the source file
1700         inside the ALI file with a canonical case file name.
1701
1702 2011-08-04  Emmanuel Briot  <briot@adacore.com>
1703
1704         * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
1705         overriding the separator.
1706
1707 2011-08-04  Robert Dewar  <dewar@adacore.com>
1708
1709         * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
1710         prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
1711
1712 2011-08-04  Robert Dewar  <dewar@adacore.com>
1713
1714         * gnat_rm.texi: Minor documentation fix for pragma Annotate.
1715
1716 2011-08-04  Yannick Moy  <moy@adacore.com>
1717
1718         * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
1719         'Result only appears in postcondition of function.
1720
1721 2011-08-04  Thomas Quinot  <quinot@adacore.com>
1722
1723         * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
1724         external tag, include the value of the external tag in the exception
1725         message.
1726
1727 2011-08-04  Yannick Moy  <moy@adacore.com>
1728
1729         * sem_attr.adb (Result): modify error message for misplaced 'Result
1730
1731 2011-08-04  Sergey Rybin  <rybin@adacore.com>
1732
1733         * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
1734         clear that the second argument must be an identifier.
1735
1736 2011-08-04  Thomas Quinot  <quinot@adacore.com>
1737
1738         * exp_ch9.adb (Build_Barrier_Function): When compiling with
1739         -fpreserve-control-flow, insert an IF statement on the barrier
1740         condition to ensure that a conditional branch instruction is generated.
1741
1742 2011-08-04  Emmanuel Briot  <briot@adacore.com>
1743
1744         * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
1745         (Processing_Flags.Ignore_Missing_With): new flag.
1746
1747 2011-08-04  Emmanuel Briot  <briot@adacore.com>
1748
1749         * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
1750         Source_List_File on case-insensitive systems where the file is actually
1751         on a case-sensitive file system (NFS,...).
1752
1753 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1754
1755         * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
1756         function return contains a controlled [extension] aggregate and the
1757         return statement is not part of a handled sequence of statements, wrap
1758         the return in a block. This ensures that all controlled temporaries
1759         generated during aggregate resolution will be picked up by the
1760         finalization machinery.
1761
1762 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
1763
1764         * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
1765         components, freeze type before resolution, to ensure that default
1766         initializations are present for all components.
1767         * sem_res.adb (Resolve_Actuals): the designated object of an
1768         accces-to-constant type is a legal actual in a call to an
1769         initialization procedure.
1770
1771 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1772
1773         * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
1774         N_Unchecked_Type_Conversion to the possible containers of a renamed
1775         transient variable.
1776
1777 2011-08-04  Yannick Moy  <moy@adacore.com>
1778
1779         * par-ch13.adb (Aspect_Specifications_Present): recognize
1780         "with Identifier'Class =>" as an aspect, so that a meaningful warning
1781         is issued in Strict mode.
1782         * par.adb: Fix typos in comments.
1783
1784 2011-08-04  Yannick Moy  <moy@adacore.com>
1785
1786         * sem_attr.adb (Result): modify error message to take into account Post
1787         aspect when compiling Ada 2012 (or newer) code.
1788
1789 2011-08-04  Nicolas Roche  <roche@adacore.com>
1790
1791         * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
1792         remove need for GCC exceptions.
1793
1794 2011-08-04  Vincent Celier  <celier@adacore.com>
1795
1796         * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
1797         project, not the source file name.
1798         * prj.adb (Find_Sources.Look_For_Sources): If the source has been
1799         excluded, continue looking. This excluded source will only be returned
1800         if there is no other source with the same base name that is not locally
1801         removed.
1802
1803 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
1804
1805         * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
1806         private and one of the operands is a real literal, use a qualified
1807         expression rather than a conversion which is not meaningful to the
1808         back-end.
1809
1810 2011-08-04  Yannick Moy  <moy@adacore.com>
1811
1812         * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
1813         corresponding aspect X'Class are allowed, proceed with analysis of the
1814         aspect instead of skipping it.
1815
1816 2011-08-04  Tristan Gingold  <gingold@adacore.com>
1817
1818         * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
1819         This will allow to have an Ada implementation for the subprogram.
1820
1821 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
1822
1823         * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
1824         completion and aspects are present, apply them to the entity for the
1825         type which is currently the partial view, but which is the one that
1826         will be frozen.
1827         * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
1828         applies to a partial view, indicate that the full view has predicates
1829         and delayed aspects.
1830         (Replace_Type_Reference): Handle properly predicates that apply to the
1831         full view of a private completion.
1832
1833 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
1834
1835         * layout.adb (Layout_Type): For composite types, do not set Esize.
1836         * freeze.adb (Set_Small_Size): Remove test on alignment and do not
1837         set Esize.
1838         (Size_Known): Look at the RM size of components instead of the Esize.
1839         (Freeze_Record_Type): Look at the RM size instead of the Esize to
1840         issue warning and activate Implicit_Packing.
1841         (Freeze_Entity): Likewise.  Do not issue a warning for alias/atomic
1842         if the Esize is not known.
1843         * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
1844         for elementary types only.
1845         (Analyze_Record_Representation_Clause): Look at the RM size instead
1846         of the Esize to issue errors.
1847         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
1848         is not known.
1849         <E_Record_Type>: Look at the RM size instead of the Esize.  Remove
1850         obsolete block.
1851         Look at the RM size instead of the Esize for types if the latter is
1852         not known.
1853         (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
1854
1855 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
1856
1857         * sem_type.adb: proper handling of equality not involving anonymous
1858         access types.
1859
1860 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1861
1862         * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
1863         Vis_Decls. When creating a library-level finalizer for a package spec,
1864         both the declaration and body of the finalizer are inserted either in
1865         the visible or private declarations of the package spec.
1866
1867 2011-08-04  Javier Miranda  <miranda@adacore.com>
1868
1869         * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
1870         use of the full-view of a type when invoking Is_Ancestor.
1871         * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
1872         the full-view of private parents is requested, then use also the
1873         full-view of the parent of the first derivation.
1874
1875 2011-08-04  Tristan Gingold  <gingold@adacore.com>
1876
1877         * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
1878         instead of the locally imported procedure.
1879         * s-taprop-mingw.adb (Enter_Task): Ditto.
1880         * s-valrea.adb (Scan_Real): Ditto.
1881         * s-imgrea.adb (Set_Image_Real): Ditto.
1882         * s-flocon.ads: Make the package pure.
1883
1884 2011-08-04  Thomas Quinot  <quinot@adacore.com>
1885
1886         * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
1887         * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
1888         * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
1889         New subprogram, moved here from...
1890         * par.adb, par-ch5.adb (P_Statement_Name): ... here.
1891         * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
1892         rewriting of the last argument into a procedure call statement here...
1893         * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
1894         instead.
1895
1896 2011-08-04  Thomas Quinot  <quinot@adacore.com>
1897
1898         * par_sco.adb: Minor reformatting.
1899
1900 2011-08-04  Robert Dewar  <dewar@adacore.com>
1901
1902         * erroutc.adb: Minor reformatting.
1903
1904 2011-08-04  Thomas Quinot  <quinot@adacore.com>
1905
1906         * par_sco.adb: Comment update.
1907
1908 2011-08-04  Tristan Gingold  <gingold@adacore.com>
1909
1910         * s-flocon.ads: New file.
1911         * g-flocon.ads: Now a renaming of s-flocon.
1912         * Makefile.rtl: Add s-flocon.o
1913
1914 2011-08-04  Javier Miranda  <miranda@adacore.com>
1915
1916         * exp_strm.adb (Build_Array_Input_Function): if the array type is
1917         constrained, do not attempt to build a subtype of it.
1918
1919 2011-08-04  Yannick Moy  <moy@adacore.com>
1920
1921         * errout.ads Change comments: remove 'R'M as an example where quotes
1922         are needed; add ALFA as another case where quotes are not needed
1923         * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
1924         case where quotes are not needed.
1925         * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
1926         sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
1927         Remove all occurrences of 'A'L'F'A
1928
1929 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
1930
1931         * sem_ch13.adb: check legality of invariant pragma.
1932
1933 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
1934
1935         * bindgen.adb: Add comments.
1936
1937 2011-08-04  Yannick Moy  <moy@adacore.com>
1938
1939         * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
1940         synthesized flag.
1941         * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
1942         (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
1943
1944 2011-08-04  Robert Dewar  <dewar@adacore.com>
1945
1946         * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
1947         osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
1948         sem_ch13.adb, s-pooloc.adb: Minor reformatting.
1949
1950 2011-08-04  Thomas Quinot  <quinot@adacore.com>
1951
1952         * s-pooloc.ads, s-pooglo.ads: Minor reformatting
1953
1954 2011-08-04  Thomas Quinot  <quinot@adacore.com>
1955
1956         PR ada/47880
1957         * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
1958         allocated object.
1959
1960 2011-08-04  Robert Dewar  <dewar@adacore.com>
1961
1962         * einfo.ads, exp_ch4.adb: Minor reformatting.
1963
1964 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
1965
1966         * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
1967
1968 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
1969
1970         * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
1971         type in all cases to compute list of primitive operations, because full
1972         view may be an itype that is not attached to the list of declarations.
1973
1974 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
1975
1976         * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
1977         library has already been finalized.
1978         (Gen_Adafinal_C): Likewise.
1979         (Gen_Adainit_Ada): Generate an early return if the library has
1980         already been elaborated.
1981         (Gen_Adainit_C): Likewise.
1982         (Gen_Output_File_Ada): Generate an elaboration flag.
1983         (Gen_Output_File_C): Likewise.
1984
1985 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1986
1987         * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
1988         Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
1989         built in the first place.
1990         (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
1991         for CodePeer because Finalize_Address was not built to begin with.
1992         * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
1993
1994 2011-08-04  Pascal Obry  <obry@adacore.com>
1995
1996         * adaint.c (__gnat_tmp_name): Use current process id to create temp
1997         filenames, this ensures unicity of filenames across processes.
1998
1999 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2000
2001         * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
2002         Raise_Controlled to Raise_From_Controlled_Operation. Update the
2003         signature of Raise_From_Controlled_Operation by adding flag From_Abort.
2004         Add False as the actual to From_Abort in the generated call to
2005         Raise_From_Controlled_Operation.
2006
2007 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
2008
2009         * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
2010         so that the ali file name can be retrieved from outside of this package.
2011         * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
2012         doing nothing in the general case, but used to update the object file
2013         timestamp if directly generated by the backend.
2014         * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
2015         to a later time than the ali file one.
2016
2017 2011-08-04  Yannick Moy  <moy@adacore.com>
2018
2019         * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
2020         entities whose body contains an Annotate pragma which forces formal
2021         proof on this body.
2022         * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
2023         sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
2024         Mark_Non_ALFA_Subprogram to pass in a message and node.
2025         * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
2026         (Forma_Proof, On) which sets the flag Formal_Proof_On in the
2027         surrounding subprogram.
2028         * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
2029         Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
2030         as not in ALFA is annotated with Formal_Proof being On, then an error
2031         is issued based on the additional parameters for message and node.
2032         * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
2033         * gcc-interface/Make-lang.in: Update dependencies.
2034
2035 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2036
2037         * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
2038         Finalize_Address when CodePeer is enabled.
2039
2040 2011-08-04  Pascal Obry  <obry@adacore.com>
2041
2042         * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
2043         the latter returns a pointer to a static buffer which is deallocated
2044         at the end of the routine.
2045
2046 2011-08-04  Yannick Moy  <moy@adacore.com>
2047
2048         * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
2049         after index creation; mark unconstrained base array type generated as
2050         being in/not in ALFA as well
2051         (Make_Index): mark subtype created as in/not in ALFA
2052         * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
2053         over a loop as in/not in ALFA, depending on its type and form of loop
2054         iteration.
2055
2056 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2057
2058         * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
2059         directly to False on .NET and JVM.
2060
2061 2011-08-04  Yannick Moy  <moy@adacore.com>
2062
2063         * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
2064         constraint that subtype must come from source code to be in ALFA, so
2065         that anonymous subtypes can be in ALFA too.
2066
2067 2011-08-04  Yannick Moy  <moy@adacore.com>
2068
2069         * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
2070         reference for ALFA mode.
2071         * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
2072         procedure public so as to use it from formal verification back-end.
2073
2074 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
2075
2076         * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
2077         invalid checks of the Parameter, making Remove_Switch not working
2078         correctly.
2079
2080 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
2081
2082         * targparm.ads: Update header: no run-time exception is needed on this
2083         file.
2084
2085 2011-08-04  Vincent Celier  <celier@adacore.com>
2086
2087         * a-fihema.adb: Use System.IO instead of GNAT.IO
2088
2089 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2090
2091         * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
2092         are forbidden in Compiler_Unit mode.
2093
2094 2011-08-04  Robert Dewar  <dewar@adacore.com>
2095
2096         * sem_util.adb: Minor reformatting.
2097
2098 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2099
2100         * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
2101         library-level finalizers.
2102         (Gen_Finalize_Library_C): Update the import string for library-level
2103         finalizers.
2104         (Gen_Finalize_Library_Defs_C): Update the definition name of a
2105         library-level finalizer.
2106         * exp_ch7.adb: Remove with and use clauses for Stringt.
2107         (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
2108         Spec_Decl. Add local variable Body_Id. The names of library-level
2109         finalizers are now manually fully qualified and are no longer external.
2110         A single name is now capable of servicing .NET, JVM and non-VM targets.
2111         Pragma Export is no longer required to provide visibility for the name.
2112         (Create_Finalizer_String): Removed.
2113         (New_Finalizer_Name): New routine which mimics New_..._Name.
2114
2115 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
2116
2117         * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
2118         elaboration counter to Standard_Short_Integer.
2119         * sem_util.adb (Build_Elaboration_Entity): Likewise.
2120         * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
2121         (Gen_Elab_Externals_C): Likewise.
2122
2123 2011-08-04  Ed Falis  <falis@adacore.com>
2124
2125         * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
2126         system-vxworks-ppc.ads, system-vxworks-m68k.ads,
2127         system-vxworks-mips.ads, system-vxworks-x86.ads
2128         (Always_Compatible_Rep): set to False for all VxWorks targets.
2129
2130 2011-08-04  Robert Dewar  <dewar@adacore.com>
2131
2132         * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
2133         makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
2134         exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
2135         exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
2136         exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
2137         sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
2138         sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
2139         Minor reformatting and code reorganization.
2140
2141 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2142
2143         * projects.texi: Added doc for aggregate projects.
2144
2145 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2146
2147         * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
2148         Add support for overriding the Project_Path in aggregate projects.
2149
2150 2011-08-04  Robert Dewar  <dewar@adacore.com>
2151
2152         * a-cofove.ads: Minor reformatting.
2153
2154 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2155
2156         * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
2157         on the generated code.
2158         (Build_Finalize_Statements): Update the comment on the generated code.
2159         (Build_Initialize_Statements): Update the comment on the generated code.
2160         (Build_Object_Declarations): Add local variable Result. The object
2161         declarations are now built in sequence.
2162         * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
2163         RE_Unit_Table.
2164
2165 2011-08-04  Robert Dewar  <dewar@adacore.com>
2166
2167         * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
2168
2169 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
2170
2171         * einfo.ads (Elaboration_Entity): Document new definition and use.
2172         (Elaboration_Entity_Required): Adjust to above change.
2173         * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
2174         * exp_ch12.adb: And with and use for Snames.
2175         (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
2176         * exp_util.adb (Set_Elaboration_Flag): Likewise.
2177         * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
2178         <Check_Unit_Name>: Deal with N_Expanded_Name.
2179         <Attribute_Elaborated>: Extend to all unit names.
2180         * sem_elab.adb: And with and use for Uintp.
2181         (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
2182         * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
2183         * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
2184         * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
2185         from Gen_Adainit_Ada.
2186         (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
2187         (Gen_Adafinal_Ada): Remove redundant test.  In the non-main program
2188         case, do not call System.Standard_Library.Adafinal; instead call
2189         finalize_library if needed.
2190         (Gen_Adafinal_C): Likewise.
2191         (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
2192         non-main program case.
2193         (Gen_Adainit_C): Generate a couple of external declarations here.
2194         In the main program case, set SSL.Finalize_Library_Objects.
2195         (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
2196         (Gen_Elab_Calls_C): Likewise.
2197         (Gen_Finalize_Library_Ada): Likewise.  Skip SAL interface units.
2198         (Gen_Finalize_Library_C): Likewise.  Generate a full function.
2199         (Gen_Main_C): Put back call to Ada_Final and don't finalize library
2200         objects here.
2201         (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
2202         if -a is specified.  Call Gen_Elab_Externals_Ada.  Move around call to
2203         Gen_Adafinal_Ada.
2204         (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
2205         if -a is specified.  Call Gen_Elab_Externals_C.  Remove useless couple
2206         of external declarations.  Call Gen_Finalize_Library_C.
2207
2208 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2209
2210         * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
2211         Compute_Compilation_Phases): new subprogram.
2212         (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
2213         The number of mains as well as the various compilation phases that
2214         need to be run are now project tree specific, since various
2215         aggregated trees might have different requirements. In particular,
2216         they do not all require bind or link phases.
2217
2218 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2219
2220         * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
2221         (Project_Tree_Appdata): New type.
2222         It is now possible to associate application-specific data to a project
2223         tree. In particular, this is used in the gprbuild builder to avoid a
2224         number of global tables and htables, especially now that there can be
2225         several project trees loaded at once because of aggregate projects.
2226         (Debug_Name): new procedure.
2227         * projects.texi: Clarify syntax of "**" for Source_Dirs
2228
2229 2011-08-03  Emmanuel Briot  <briot@adacore.com>
2230
2231         * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
2232         the "roots" for a main.
2233         (Fill_From_Project): add support for aggregate projects. Main units
2234         in aggregated projects are now automatically added in the list of
2235         files to build (although this fails later on in gprbuild, because
2236         these files are not using the root proejct tree, so this needs
2237         further cleanup)
2238         * gcc-interface/Make-lang.in: Update dependencies.
2239
2240 2011-08-03  Yannick Moy  <moy@adacore.com>
2241
2242         * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
2243         conditional expression in ALFA.
2244         * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
2245         expressions as not in ALFA.
2246
2247 2011-08-03  Robert Dewar  <dewar@adacore.com>
2248
2249         * a-cofove.adb: Minor reformatting.
2250
2251 2011-08-03  Emmanuel Briot  <briot@adacore.com>
2252
2253         * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
2254         (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
2255         gprbuild sources.
2256         These packages are more logically placed in the Queue package, since
2257         they manipulate the queue. It is also likely that they can be adapted
2258         for gnatmake, thus sharing more code.
2259         (Finish_Program, Fail_Program): moved from the gprbuild sources, so
2260         that we could move the above.
2261
2262 2011-08-03  Emmanuel Briot  <briot@adacore.com>
2263
2264         * errutil.adb (Finalize): clean up the list of error messages on exit.
2265         Calling this subprogram multiple times will no longer show duplicate
2266         error messages on stderr.
2267
2268 2011-08-03  Emmanuel Briot  <briot@adacore.com>
2269
2270         * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
2271         Getopt_Switches when we have already define a command line
2272         configuration.
2273
2274 2011-08-03  Yannick Moy  <moy@adacore.com>
2275
2276         * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
2277         in ALFA. Instead, they are considered as assertions to prove.
2278         * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
2279         nodes as not in ALFA. Instead, include conditional expressions in ALFA
2280         if they have no ELSE part, or if they occur in pre- and postconditions,
2281         where the Condition cannot have side-effects in ALFA
2282         (Analyze_Membership_Op): do not mark such nodes as not in ALFA
2283         (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
2284         Instead, include type conversion between scalar types in ALFA.
2285         * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
2286         if-and-only-if its type is in ALFA.
2287
2288 2011-08-03  Thomas Quinot  <quinot@adacore.com>
2289
2290         * scos.adb, get_scos.adb, put_scos.adb
2291         New code letter for decisions: G (entry guard)
2292         * par_sco.adb
2293         (Traverse_Subprogram_Body): Rename to...
2294         (Traverse_Subprogram_Or_Task_Body): New subrpogram.
2295         (Traverse_Protected_Body): New subprogram
2296         (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
2297         protected bodies and entry bodies.
2298
2299 2011-08-03  Yannick Moy  <moy@adacore.com>
2300
2301         * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
2302         entities with get/set subprograms, which is set on procedure entities
2303         generated by the compiler for a postcondition.
2304         * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
2305         * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
2306         entity for a declaration
2307         (Get_Unique_Entity_For_Decl): new function returning an entity which
2308         represents a declaration, so that matching spec and body have the same
2309         entity.
2310
2311 2011-08-03  Robert Dewar  <dewar@adacore.com>
2312
2313         * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
2314         a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
2315
2316 2011-08-03  Yannick Moy  <moy@adacore.com>
2317
2318         * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
2319         library-level because retriction No_Implicit_Dynamic_Code in the
2320         front-end prevents its definition as a local subprogram
2321         (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
2322         for reuse in other contexts
2323         (Traverse_Declarations_Or_Statements,
2324         Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
2325         Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
2326         procedures take a callback parameter to be called on all declarations
2327         * lib-xref.ads
2328         (Traverse_All_Compilation_Units): new generic function to traverse a
2329         compilation unit and call a callback parameter on all declarations
2330
2331 2011-08-03  Javier Miranda  <miranda@adacore.com>
2332
2333         * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
2334         in Java since they are always enclosed in a namespace that
2335         differentiates them, and overloaded entities are supported by the VM.
2336
2337 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
2338
2339         * checks.adb (Determine_Range): If a computed bound of an operation is
2340         outside the range of the base type of the expression, and overflow
2341         checks are enabled, the result is unknown and cannot be used for any
2342         subsequent constant folding.
2343         * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
2344         unknown, so is the result of the comparison.
2345
2346 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
2347
2348         * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
2349         From_Abort. When finalization was triggered by an abort, propagate
2350         Standard'Abort_Signal rather than Program_Error.
2351         * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
2352         From_Abort.
2353         * a-except.adb (Raise_From_Controlled_Operation): Add new formal
2354         From_Abort. When finalization was triggered by an abort, propagate
2355         Standard'Abort_Signal rather than Program_Error.
2356         * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
2357         From_Abort.
2358         * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
2359         Abort_Id. Update the calls to Build_Object_Declarations and
2360         Build_Raise_Statement to include Abort_Id.
2361         (Build_Adjust_Statements): New local variable Abort_Id. Update the
2362         calls to Build_Object_Declarations and Build_Raise_Statement to include
2363         Abort_Id.
2364         (Build_Finalize_Statements): New local variable Abort_Id. Update the
2365         calls to Build_Object_Declarations and Build_Raise_Statement to include
2366         Abort_Id.
2367         (Build_Components): Create an entity for Abort_Id when exceptions are
2368         allowed on the target.
2369         (Build_Finalizer): New local variable Abort_Id.
2370         (Build_Initialize_Statements): New local variable Abort_Id. Update the
2371         calls to Build_Object_Declarations and Build_Raise_Statement to include
2372         Abort_Id.
2373         (Build_Object_Declarations): Add new formal Abort_Id. Create the
2374         declaration of flag Abort_Id to preserve the original abort status
2375         before finalization code is executed.
2376         (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
2377         runtime routine Raise_From_Controlled_Operation.
2378         (Create_Finalizer): Update the call to Build_Raise_Statement to include
2379         Abort_Id. Update the call to Build_Object_Declarations to include
2380         Abort_Id. Update the layout of the finalizer body.
2381         (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
2382         (Process_Transient_Objects): New local variable Abort_Id. Remove the
2383         clunky code to create all flags and objects related to
2384         exception propagation and replace it with a call to
2385         Build_Object_Declarations. Update the call to Build_Raise_Statement to
2386         include Abort_Id.
2387         * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
2388         Add new formal Abort_Id and associated comment on its use.
2389         (Build_Raise_Statement): Add new formal Abort_Id and associated comment
2390         on its use.
2391         * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
2392         Remove the clunky code to create all flags and objects related to
2393         exception propagation and replace it with a call to
2394         Build_Object_Declarations. Update the call to Build_Raise_Statement.
2395
2396 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
2397
2398         * s-tassta.adb: Fix minor typos.
2399
2400 2011-08-03  Robert Dewar  <dewar@adacore.com>
2401
2402         * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
2403         lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
2404
2405 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
2406
2407         * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
2408         to packages. This ensures that the finalizer body will not end up
2409         inside the freeze node.
2410         (Process_Declarations): Add code to detect whether a freeze node has a
2411         nested finalization collection.
2412
2413 2011-08-03  Pascal Obry  <obry@adacore.com>
2414
2415         * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
2416         (Current_Session): Return a not null access to Session_Type.
2417         (Default_Session): Likewise.
2418
2419 2011-08-03  Robert Dewar  <dewar@adacore.com>
2420
2421         * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
2422         exp_ch3.adb, exp_ch3.ads: Minor reformatting.
2423
2424 2011-08-03  Pascal Obry  <obry@adacore.com>
2425
2426         * g-awk.ads: Minor comment fix.
2427
2428 2011-08-03  Sergey Rybin  <rybin@adacore.com>
2429
2430         * tree_io.ads (ASIS_Version_Number): Update because of the changes in
2431         the tree structure related to discriminant constraints.
2432         Original_Discriminant cannot be used any more for computing the
2433         defining name for the reference to a discriminant.
2434
2435 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
2436
2437         * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
2438         function is not visibly tagged, this is not a dispatching call and
2439         therfore is not Tag_Indeterminate, even if the function is marked as
2440         dispatching on result.
2441
2442 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
2443
2444         * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
2445         (Expand_N_Free_Statement): Add a guard to protect against run-times
2446         which do not support controlled types.
2447         * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
2448         against run-times which do not support controlled types.
2449         * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
2450         against run-times which do not support controlled types.
2451         * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
2452         against run-times which do not support controlled types.
2453         * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
2454         protect against run-times which do not support controlled types.
2455
2456 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
2457
2458         * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
2459         (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
2460
2461 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
2462
2463         * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
2464         modified in the source, to prevent spurious warnings when compiling
2465         with -gnatg.
2466
2467 2011-08-03  Thomas Quinot  <quinot@adacore.com>
2468
2469         * a-except-2005.adb: Minor reformatting.
2470
2471 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
2472
2473         * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
2474         is a renaming declaration in the private part of a package, do not emit
2475         a warning that the with_clause could be moved because the renaming may
2476         be used in the body or in a child unit.
2477
2478 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
2479
2480         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
2481         Propagate the Comes_From_Source attribute from the original return
2482         object to the renaming.
2483
2484 2011-08-03  Jose Ruiz  <ruiz@adacore.com>
2485
2486         * exp_ch7.adb (Build_Raise_Statement): Do not call
2487         Raise_From_Controlled_Operation when this routine is not present in
2488         the run-time library.
2489         (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
2490         libraries (Ravenscar), tasks are non-terminating, and protected objects
2491         and tasks can only appear at library level, so we do not want
2492         finalization of protected objects nor tasks.
2493         * exp_intr.adb: Minor clarification in comment.
2494         bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
2495         Gen_Output_File_C): Remove references to finalization of library-level
2496         objects when using restricted run-time libraries.
2497
2498 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
2499
2500         * sem_ch3.adb (Build_Discriminant_Constraints): Set
2501         Original_Discriminant only if the parent type is a generic formal.
2502
2503 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
2504
2505         * exp_ch13.adb: Add with and use clause for Targparm;
2506         (Expand_N_Free_Statement): Prevent the generation of a custom
2507         Deallocate on .NET/JVM targets since this requires pools and address
2508         arithmetic.
2509         * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
2510         .NET/JVM targets, attach the newly allocated object to the access
2511         type's finalization collection. Do not generate a call to
2512         Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
2513         exist in the runtime.
2514         (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
2515         create a custom Allocate for object that do not require initialization.
2516         Attach a newly allocated object to the access type's finalization
2517         collection on .NET/JVM.
2518         * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
2519         assignment of controlled types on .NET/JVM. The two hidden pointers
2520         Prev and Next and stored and later restored after the assignment takes
2521         place.
2522         * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
2523         kludge for .NET/JVM to recognize a particular piece of code coming from
2524         Heap_Management and change the call to Finalize into Deep_Finalize.
2525         * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
2526         finalization collections on .NET/JVM only for types derived from
2527         Controlled. Separate the association of storage pools with a collection
2528         and only allow it on non-.NET/JVM targets.
2529         (Make_Attach_Call): New routine.
2530         (Make_Detach_Call): New routine.
2531         (Process_Object_Declarations): Suppress the generation of
2532         build-in-place return object clean up code on .NET/JVM since it uses
2533         pools.
2534         * exp_ch7.ads (Make_Attach_Call): New routine.
2535         (Make_Detach_Call): New routine.
2536         * exp_intr.adb Add with and use clause for Targparm.
2537         (Expand_Unc_Deallocation): Detach a controlled object from a collection
2538         on .NET/JVM targets.
2539         * rtsfind.ads: Add entries RE_Attach, RE_Detach and
2540         RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
2541         * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
2542         names used in finalization.
2543
2544 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
2545
2546         * a-fihema.adb: Add with and use clauses for System.Soft_Links.
2547         (Attach, Detach): Lock the current task when chaining an object onto a
2548         collection.
2549
2550 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
2551
2552         * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
2553         Rewritten to create the message strings when the exception is not
2554         raised by an abort during finalization.
2555         * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
2556         Raise_From_Controlled_Operation and update its associated comment.
2557         * a-fihema.ads, a-fihema.adb: New GNAT unit.
2558         Ada.Finalization.Heap_Management provides key functionality
2559         associated with controlled objects on the heap, their creation,
2560         finalization and reclamation. Type Finalization_Collection is
2561         effectively a wrapper which sits ontop of a storage pool and performs
2562         all necessary bookkeeping for all the objects it contains. Each
2563         access-to-controlled or access-to-class-wide type receives a collection
2564         as part of its expansion. The compiler generates buffer code and
2565         invokes Allocate / Deallocate to create and destroy allocated
2566         controlled objects.
2567         * a-finali.adb ("="): Removed.
2568         * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
2569         fields Prev and Next.
2570         * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
2571         A library unit with at least one controlled object on the library level
2572         has a special finalizer which is invoked by the binder. To signal this,
2573         ali files carry field PF.
2574         * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
2575         associated comment on field usage.
2576         * a-tags.adb (Get_RC_Offset): Removed.
2577         (Needs_Finalization): New routine.
2578         * a-tags.ads: Update the structure of the GNAT dispatch tables.
2579         Dispatch tables now carry field Needs_Finalization which provides
2580         runtime indication whether a type is controlled or has controlled
2581         components or both. Remove field RC_Offset.
2582         (Get_RC_Offset): Removed along with its associated pragma Export.
2583         Since tagged types with controlled components no longer carry hidden
2584         field _controller, the special mechanism to retrieve its location is no
2585         longer needed.
2586         (Needs_Finalization): New routine.
2587         * atree.ads, atree.adb (Elist24): New routine.
2588         (Set_Elist24): New routine.
2589         * atree.h: Add a define clause for Elist24.
2590         * bindgen.adb New library-level variable Lib_Final_Built.
2591         (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
2592         presence of a VM target, the routine generates calls to the proper
2593         library finalization routine.
2594         (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
2595         targets. Set the correct library finalization routine depending on
2596         whether the library has controlled objects or this is a VM compilation.
2597         (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
2598         to library-level finalizers of compiled units in reverse order of
2599         elaboration. It also produces exception management code and reraises a
2600         potential exception after all units have been finalized.
2601         (Gen_Finalize_Library_C): New routine. This procedure generates calls to
2602         library-level finalizers of compiled units in reverse order of
2603         elaboration.
2604         (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
2605         definitions of all library-level finalizers available to the compilation
2606         (Gen_Main_Ada): Directly call Adafinal which now contails all target
2607         dependent code.
2608         (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
2609         System.Standard_Library.Adafinal directly. If the library needs
2610         finalization actions, create the sequence of finalization calls.
2611         (Gen_Output_File_Ada): Alphabetize local variables and constants.
2612         Generate a with clause for System.Soft_Links when compiling for a VM.
2613         Remove the code which imports System.Standard_Library.Adafinal as
2614         Do_Finalize. Generate the library finalization routine.
2615         (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
2616         If the library needs finalization actions, create all the definitions
2617         of library- level finalizers.
2618         (Has_Finalizer): New routine. Determines whether at least one compiled
2619         unit has a library-level finalizer.
2620         Add type Qualification_Mode.
2621         (Set_Unit_Name): Add a formal which controls the replacement of a dot.
2622         * einfo.adb: New usage of field 15 as Return_Flag.
2623         Remove Finalization_Chain_Entity from the usages of field 19.
2624         Remove Associated_Final_Chain from the usages of field 23.
2625         New usage of field 23 as Associated_Collection.
2626         New usage of field 24 as Finalizer.
2627         New usage of flag 252 as Is_Processed_Transient.
2628         (Associated_Final_Chain): Removed.
2629         (Associated_Collection): New routine.
2630         (Finalization_Chain_Entity): Removed.
2631         (Finalizer): New routine.
2632         (Is_Finalizer): New routine.
2633         (Is_Processed_Transient): New routine.
2634         (Return_Flag): New routine.
2635         (Set_Associated_Final_Chain): Removed.
2636         (Set_Associated_Collection): New routine.
2637         (Set_Finalization_Chain_Entity): Removed.
2638         (Set_Finalizer): New routine.
2639         (Set_Is_Processed_Transient): New routine.
2640         (Set_Return_Flag): New routine.
2641         (Write_Entity_Flags): Include Is_Processed_Transient to the list of
2642         displayed flags.
2643         (Write_Field8_Name): Alphabetize the output.
2644         (Write_Field11_Name): Alphabetize the output.
2645         (Write_Field12_Name): Alphabetize the output.
2646         (Write_Field13_Name): Alphabetize the output.
2647         (Write_Field14_Name): Alphabetize the output.
2648         (Write_Field15_Name): Alphabetize the output.
2649         (Write_Field16_Name): Alphabetize the output.
2650         (Write_Field17_Name): Alphabetize the output.
2651         (Write_Field18_Name): Alphabetize the output.
2652         (Write_Field19_Name): Alphabetize the output. Remove the output of
2653         Finalization_Chain_Entity.
2654         (Write_Field20_Name): Alphabetize the output.
2655         (Write_Field21_Name): Alphabetize the output.
2656         (Write_Field22_Name): Alphabetize the output.
2657         (Write_Field23_Name): Alphabetize the output. Remove the output of
2658         Associated_Final_Chain. Add output for Associated_Collection.
2659         (Write_Field24_Name): Alphabetize the output.
2660         (Write_Field25_Name): Add output for Finalizer.
2661         (Write_Field26_Name): Alphabetize the output.
2662         (Write_Field27_Name): Alphabetize the output.
2663         (Write_Field28_Name): Alphabetize the output.
2664         * einfo.ads: Add new field description for Associated_Collection and
2665         its uses in nodes.
2666         Remove Associated_Final_Chain and its uses in nodes.
2667         Remove Finalization_Chain_Entity and its uses in nodes.
2668         Add new field description for Finalizer and its uses in nodes.
2669         Add new synthesized attribute Is_Finalizer.
2670         Add new flag description for Is_Processed_Transient and its uses in
2671         nodes.
2672         Add new field description for Return_Flag and its uses in nodes.
2673         (Associated_Final_Chain): Removed along with its pragma Inline.
2674         (Associated_Collection): New routine and pragma Inline.
2675         (Finalization_Chain_Entity): Removed along with its pragma Inline.
2676         (Finalizer): New routine and pragma Inline.
2677         (Is_Finalizer): New routine and pragma Inline.
2678         (Is_Processed_Transient): New routine and pragma Inline.
2679         (Return_Flag): New routine and pragma Inline.
2680         (Set_Associated_Final_Chain): Removed along with its pragma Inline.
2681         (Set_Associated_Collection): New routine and pragma Inline.
2682         (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
2683         (Set_Finalizer): New routine and pragma Inline.
2684         (Set_Is_Processed_Transient): New routine and pragma Inline.
2685         (Set_Return_Flag): New routine and pragma Inline.
2686         * exp_aggr.adb: Alphabetize subprograms.
2687         (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
2688         (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
2689         associated comments. Remove local variables External_Final_List and
2690         Attach.
2691         Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
2692         Ancestor. Remove the retrieval of finalization lists. Update the call to
2693         Make_Adjust_Call.
2694         (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
2695         lists. Update the call to Late_Expansion.
2696         (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
2697         (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
2698         (Gen_Assign): Remove the retrieval of the finalization list used to
2699         build the assignment. Update the calls to Make_Init_Call and
2700         Make_Adjust_Call.
2701         (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
2702         Remove the mechanism to determine attachment levels and finalization
2703         list retrieval. Remove the processing for coextensions.
2704         (Init_Controller): Removed. Controllers no longer exist.
2705         (Late_Expansion): Remove formals Flist and Obj along with their
2706         associated comments. Update the calls to Build_Record_Aggr_Code and
2707         Build_Array_Aggr_Code.
2708         * exp_ch13.adb (Expand_N_Free_Statement): New routine.
2709         (Expand_N_Freeze_Entity): Add special processing for finalizers which
2710         appear in entry bodies, protected subprograms and task bodies.
2711         * exp_ch13.ads (Expand_N_Free_Statement): New routine.
2712         * exp_ch3.adb (Add_Final_Chain): Removed.
2713         (Build_Array_Init_Proc): Alphabetize local variables.
2714         (Build_Assignment): Alphabetize local variables. Update the call to
2715         Maked_Adjust_Call.
2716         (Build_Class_Wide_Master): Rename local variables to better reflect
2717         their role.
2718         (Build_Discriminant_Assignments): Code reformatting.
2719         (Build_Init_Call_Thru): Code reformatting.
2720         (Build_Init_Procedure): Code reformatting. Generate a special version
2721         of Deep_Finalize which is capable of finalizing all initialized
2722         components and ignore the rest.
2723         (Build_Init_Statements): Rename local variables to better reflect their
2724         role.
2725         Reimplement the mechanism to include the creation and update of an index
2726         variable called a "counter". It is used as a bookmark for tracing
2727         initialized and non-initialized components.
2728         (Build_Initialization_Call): Remove local variable Controller_Typ.
2729         Alphabetize all local variables. Remove the initialization of the
2730         record controller and update the call to Make_Init_Call.
2731         (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
2732         New local variable Counter.
2733         (Constrain_Array): Alphabetize.
2734         (Expand_Freeze_Array_Type): Create a collection instead of a
2735         finalization list.
2736         (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
2737         Finalize_Address which is used in conjunction with allocated controlled
2738         objects.
2739         (Expand_N_Object_Declaration): Remove the creation of a finalization
2740         list for anonymous access types. Update the calls to Make_Init_Call and
2741         Make_Adjust_Call.
2742         (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
2743         retrieval of finalization lists. Remove the expansion of the record
2744         controller. Create TSS primitive Finalize_Address used in conjunction
2745         with controlled objects on the heap. Create finalization collections
2746         for access-to-controlled record components.
2747         (Expand_Record_Controller): Removed.
2748         (Freeze_Type): Remove the freezing of record controllers. Freezing of
2749         class-wide types now requires additional processing. Create
2750         finalization collections for access-to-controlled types.
2751         (Increment_Counter): New routine.
2752         (Make_Counter): New routine.
2753         (Make_Eq_If): Remove the mention of Name_uController.
2754         (Make_Predefined_Primitive_Specs): There is no longer need to skip
2755         types coming from System.Finalization_Root.
2756         (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
2757         (Predefined_Primitive_Bodies): There is no longer need to skip types
2758         coming from System.Finalization_Root.
2759         (Stream_Operation_OK): Do not generate stream routines for
2760         type Ada.Finalization.Heap_Management.Finalization_Collection.
2761         * exp_ch3.ads: Alphabetize subprograms.
2762         * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
2763         Add with and use clause for Lib.
2764         (Complete_Coextension_Finalization): Removed.
2765         (Complete_Controlled_Allocation): New routine. Create a finalization
2766         collection for anonymous access-to-controlled types. Create a custom
2767         Allocate which interfaces with the back end and the machinery in
2768         Heap_Management.
2769         (Expand_Allocator_Expression): Add necessary calls to
2770         Complete_Controlled_Allocation. Remove the retrieval of finalization
2771         lists. Update the calls to Make_Adjust_Call. Generate a call to
2772         Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
2773         the associated collection.
2774         (Expand_N_Allocator): Remove the processing for dynamic coextensions.
2775         Code clean up. Remove the retrieval of finalization lists and
2776         attachment levels.
2777         Update the call to Make_Init_Call. Generate a call to
2778         Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
2779         the associated collection.
2780         (Get_Allocator_Final_List): Removed. Finalization lists are not
2781         available.
2782         (Suitable_Element): Remove the mention of Name_uController.
2783         * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
2784         (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
2785         the left hand side, carry out the assignment and adjust the left hand
2786         side.
2787         * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
2788         (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
2789         (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
2790         BIP_Collection and BIPcollection.
2791         (Build_Heap_Allocator): New routine used to allocate the return object
2792         of a build-in-place function onto a collection.
2793         (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
2794         (Expand_Call): Do not replace direct calls to Deep routines with their
2795         aliases.
2796         (Expand_N_Extended_Return_Statement): Give all variables shorter names
2797         and update their occurrences. Add a special return flag to monitor the
2798         [ab]normal execution of the function. The flag is set right before the
2799         return statement.
2800         Rewrite the mechanism used to allocate a build-in-place return object
2801         on the heap or on a storage pool.
2802         (Is_Direct_Deep_Call): New routine.
2803         (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
2804         build-in-place function call instead of a final list. Build a call to
2805         Set_Finalize_Address_Ptr to decorate the associated collection.
2806         (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
2807         order to name the build-in-place function call's result for later
2808         finalization. Add a collection to a build-in-place function call
2809         instead of a final list.
2810         (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
2811         build-in-place function call instead of a final list. Remove the code
2812         which moves one final list and transforms it into the actual in a
2813         nested build-in-place call.
2814         (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
2815         build-in-place function call instead of a final list.
2816         (Move_Final_List): Removed.
2817         (Needs_BIP_Collection): New routine.
2818         (Needs_BIP_Final_List): Removed.
2819         * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
2820         enumeration type BIP_Formal_Kind.
2821         Update the related comment.
2822         (Needs_BIP_Collection): New routine.
2823         (Needs_BIP_Final_List): Removed.
2824         * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
2825         and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
2826         majority of subprograms in this unit. Add Name_Finalize_Address to
2827         array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
2828         (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
2829         statements for an array type.
2830         (Build_Adjust_Statements): Create the adjust statements for a record
2831         type.
2832         (Build_Cleanup_Statements): New routine. A procedure which given any
2833         construct containing asynchronous calls, references to _master, or is a
2834         task body, a task allocation or a protected body produces the necessary
2835         runtime calls to clean up these constructs.
2836         (Build_Exception_Handler): New routine.
2837         (Build_Final_List): Removed.
2838         (Build_Finalization_Collection): New routine. A core procedure which
2839         creates a collection to service heap allocated controlled objects
2840         associated with an access-to-controlled type.
2841         (Build_Finalize_Statements): Create the finalization statements for a
2842         record types.
2843         (Build_Finalizer): New routine. A core procedure which given any
2844         construct with declarations and/or statements detects all objects which
2845         need any type of clean up (controlled objects, protected objects) and
2846         generates all necessary code to clean up the said objects in the proper
2847         order.
2848         (Build_Finalizer_Call): New routine.
2849         (Build_Initialize_Statements): Create the initialization statements for
2850         an array type. The generated routine contains code to finalize partially
2851         initialized arrays.
2852         (Build_Object_Declarations): New routine.
2853         (Build_Raise_Statement): New routine.
2854         (Clean_Simple_Protected_Objects): Removed.
2855         (Controller_Component): Removed.
2856         (Enclosing_Function): New routine.
2857         (Expand_Cleanup_Actions): Create a finalizer for a construct which has
2858         either declarations or statements or both.
2859         (Expand_N_Package_Body): Create a finalizer for a non-generic package.
2860         (Expand_N_Package_Declaration): Create a finalizer for a non-generic
2861         package.
2862         (Find_Final_List): Removed.
2863         (Global_Flist_Ref): Removed.
2864         (In_Finalization_Root): Removed.
2865         (Insert_Actions_In_Scope_Around): Determine the range of the transient
2866         scope in terms of tree nodes. Process all transient variables within
2867         that range.
2868         (Make_Adjust_Call): Rewritten. There is no longer an attach call
2869         generated after the adjust.
2870         (Make_Attach_Call): Removed.
2871         (Make_Call): New routine.
2872         (Make_Clean): Removed.
2873         (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
2874         build routines.
2875         (Make_Deep_Proc): Rewritten to generate the new profile signature used
2876         in Deep routines.
2877         (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
2878         build routines.
2879         (Make_Final_Call): Modified to simply create a call to either
2880         Deep_Finalize or Finalize.
2881         (Make_Finalize_Address_Body): New routine.
2882         (Make_Finalize_Address_Stmts): New routine. A function which produces
2883         TSS primitive Finalize_Address used in conjunction with heap allocated
2884         controlled objects.
2885         (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
2886         (Make_Init_Call): Rewritten. There is no longer an attach call
2887         generated after initialization.
2888         (Make_Local_Deep_Finalize): New routine.
2889         (Make_Set_Finalize_Address_Ptr_Call): New routine.
2890         (Make_Transient_Block): Remove the finalization list retrieval and
2891         manipulation.
2892         (Needs_Finalization): Moved to Exp_Util.
2893         (Parent_Field_Type): New routine.
2894         (Preprocess_Components): New routine.
2895         (Process_Transient_Objects): New routine.
2896         (Wrap_HSS_In_Block): New routine.
2897         (Wrap_Transient_Declaration): Remove finalization list management and
2898         controller insertion.
2899         (Wrap_Transient_Expression): Code reformatting.
2900         (Wrap_Transient_Statement): Code reformatting.
2901         * exp_ch7.ads (Build_Final_List): Removed.
2902         (Build_Finalization_Collection): New routine.
2903         (Build_Raise_Statement): New routine.
2904         (Controller_Component): Removed.
2905         (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
2906         (Find_Final_List): Removed.
2907         (In_Finalization_Root): Removed.
2908         (Is_Simple_Protected_Type): Update related comment.
2909         (Make_Adjust_Call): New parameter profile and associated comments.
2910         (Make_Attach_Call): Removed.
2911         (Make_Final_Call): New parameter profile and associated comments.
2912         (Make_Finalize_Address_Body): New routine.
2913         (Make_Init_Call): New parameter profile and associated comments.
2914         (Make_Local_Deep_Finalize): New routine.
2915         (Make_Set_Finalize_Address_Ptr_Call): New routine.
2916         (Needs_Finalization): Moved to Exp_Util.
2917         * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
2918         (Expand_N_Protected_Body): Remove the handling of finalization lists.
2919         (Find_Protection_Type): Moved to Exp_Util.
2920         * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
2921         (Make_DT): Update sequence of dispatch table initialization. Remove the
2922         initialization of field RC_Offset. Add initialization of field Needs_
2923         Finalization.
2924         * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
2925         Reimplement how an object is first finalized, then deallocated.
2926         * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
2927         Code reformatting.
2928         * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
2929         Register TSS_Finalize_Address with type TSS_Names.
2930         * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
2931         procedure provides the interface between an allocation / deallocation
2932         and the support machinery in Ada.Finalization.Heap_Management.
2933         (Find_Init_Call): Code reformatting.
2934         (Find_Init_Call_In_List): Code reformatting.
2935         (Find_Protection_Type): Moved from Exp_Ch9.
2936         (Find_Prim_Op): Reimplement to add preference of recovered primitive.
2937         (Has_Controlled_Coextensions): Removed.
2938         (Has_Controlled_Objects): New routine.
2939         (In_Library_Level_Package_Body): New routine.
2940         (Insert_Action_After): New routine.
2941         (Is_Finalizable_Transient): New routine. This predicate determines
2942         whether an object declaration is one of the many variants of controlled
2943         transients.
2944         (Is_Null_Access_BIP_Func_Call): New routine.
2945         (Is_Non_BIP_Func_Call): New routine.
2946         (Is_Related_To_Func_Return): New routine.
2947         (Needs_Finalization): Moved from Exp_Ch7.
2948         * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
2949         (Find_Protection_Type): Moved from Exp_Ch9.
2950         (Has_Controlled_Coextensions): Removed.
2951         (Has_Controlled_Objects): New routine.
2952         (In_Library_Level_Package_Body): New routine.
2953         (Insert_Action_After): New routine.
2954         (Is_Finalizable_Transient): New routine.
2955         (Is_Null_Access_BIP_Func_Call): New routine.
2956         (Is_Non_BIP_Func_Call): New routine.
2957         (Is_Related_To_Func_Return): New routine.
2958         (Needs_Finalization): Moved from Exp_ch7.
2959         * expander.adb (Expand): Add a case for N_Free_Statement.
2960         * freeze.adb (Freeze_All): Replace the generation of a finalization
2961         list with a collection for access-to-controlled types.
2962         (Freeze_Entity): Code reformatting.
2963         (Freeze_Record_Type): Remove the freezing of a record controller
2964         component.
2965         (Freeze_Subprogram): Code reformatting.
2966         * inline.adb (Cleanup_Scopes): Remove the reset of the scope
2967         finalization list.
2968         * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
2969         has a library-level finalizer.
2970         * lib-writ.ads: Add "PF" to the sequence of unit attributes.
2971         * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
2972         * Makefile.rtl: Remove a-filico and s-finimp from the list of object
2973         files. Add a-fihema to the list of object files.
2974         * par-ch4.adb:
2975         Alphabetize the associations in type Is_Parameterless_Attribute.
2976         * rtsfind.ads: Ada.Finalization_List.Controller and
2977         System.Finalization_Implementation are no longer a GNAT unit.
2978         Update the range of type Ada_Finalization_Child. Remove the following
2979         recoverable entities:
2980
2981            RE_Attach_To_Final_List
2982            RE_Deep_Tag_Attach
2983            RE_Finalize_List
2984            RE_Finalize_One
2985            RE_Finalizable_Ptr_Ptr
2986            RE_Global_Final_List
2987            RE_Limited_Record_Controller
2988            RE_List_Controller
2989            RE_Move_Final_List
2990            RE_Record_Controller
2991            RE_Simple_List_Controller
2992
2993         Add the following recoverable entities:
2994
2995            RE_Add_Offset_To_Address
2996            RE_Allocate
2997            RE_Base_Pool
2998            RE_Deallocate
2999            RE_Exception_Identity
3000            RE_Finalization_Collection
3001            RE_Finalization_Collection_Ptr
3002            RE_Needs_Finalization
3003            RE_Save_Library_Occurrence
3004            RE_Set_Finalize_Address_Ptr
3005            RE_Set_Storage_Pool_Ptr
3006            RE_Storage_Count
3007         * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
3008         Name_uController.
3009         * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
3010         (First_Stored_Discriminant): Remove the mention of Name_uController.
3011         * sem_aux.ads: Comment reformatting.
3012         * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
3013         to redecorate an already existing class-wide type.
3014         (Decorate_Tagged_Type): New parameter profile and associated comment.
3015         Create a "shadow class-wide type" for a shadow entity.
3016         * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
3017         of the final chain along with the associated comment.
3018         * sem_ch3.adb (Access_Type_Declaration): Add new local variable
3019         Full_Desig and set it to the full view of the designated type.
3020         Initialize the finalization collection to empty.
3021         (Build_Derived_Record_Type): Alphabetize local variables. Code
3022         reformatting.
3023         (Collect_Fixed_Components): Remove the mention of Name_uController.
3024         (Create_Constrained_Components): Remove the mention of Name_uController.
3025         (Make_Class_Wide_Type): Add specialized code to redecorate an existing
3026         class-wide type of a shadow entity.
3027         (Process_Full_View): Update the machinery which marks type
3028         Limited_Controlled's entity as limited.
3029         * sem_ch4.adb (Analyze_One_Call): Code reformatting.
3030         * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
3031         list, instead make a collection build-in-place formal.
3032         * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
3033         a designated type in order to establish a match between the renaming
3034         and the renamed entity.
3035         (Find_Selected_Component): Add guard to prevent spurious exceptions
3036         from being raised on .NET/JVM.
3037         * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
3038         to the list of primitive that need special processing. Update arrays
3039         C_Names and D_Names.
3040         (Replace_Types): Handle class-wide types.
3041         * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
3042         different parameter profile, look at the first formal.
3043         * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
3044         use clauses for Exp_Util.
3045         * sem_res.adb: Remove with and use clauses for Elists.
3046         (Propagate_Coextensions): Removed.
3047         (Resolve_Allocator): Do not propagate the list of coextensions from one
3048         allocator to another.
3049         * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
3050         Deaccessed_T to Desig_Typ.
3051         (Enter_Name): Remove the mention of Name_uController.
3052         (Gather_Components): Remove the mention of Name_uController.
3053         (Incomplete_Or_Private_View): New routine.
3054         (Is_Coextension_Root): Removed.
3055         (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
3056         * sem_util.ads (Incomplete_Or_Private_View): New routine.
3057         (Is_Coextension_Root): Removed.
3058         * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
3059         Controlled types are now derived from a null tagged record. Remove
3060         types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
3061         * sinfo.adb (Coextensions): Removed.
3062         (Set_Coextensions): Removed.
3063         * sinfo.ads: Remove Coextensions from the explanation of node fields
3064         and its uses in nodes.
3065         Update the field usage of N_Allocator.
3066         (Coextensions): Removed along with its pragma Inline.
3067         (Set_Coextensions): Removed along with its pragma Inline.
3068         * snames.ads-tmpl: Remove names
3069
3070           Name_uClean
3071           Name_uController
3072           Name_uFinal_List
3073           Name_uLocal_Final_List
3074           Name_Finalization_Root
3075           Name_Next
3076           Name_Prev
3077
3078         Add names
3079
3080           Name_uFinalizer
3081           Name_Finalize_Address
3082         * s-pooglo.adb (Allocate): Add overriding indicator.
3083         (Deallocate): Add overriding indicator.
3084         (Storage_Size): Add overriding indicator.
3085         * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
3086         than Finalize_Global_List.
3087         (Null_Finalize_Global_List): Removed.
3088         (Save_Library_Occurrence): New routine.
3089         * s-soflin.ads: Remove variable Finalize_Global_List along with its
3090         initialization. Add variable Finalize_Library_Objects along with its
3091         pragma Export. Add variables Library_Exception and
3092         Library_Exception_Set along with their pragma Export.
3093         (Null_Finalize_Global_List): Removed.
3094         (Save_Library_Occurrence): New routine.
3095         * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
3096         rather than Finalize_Global_List.
3097         * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
3098         of the constructed node.
3099
3100 2011-08-03  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3101
3102         * link.c: Include "auto-host.h" before system headers.
3103
3104 2011-08-03  Vincent Celier  <celier@adacore.com>
3105
3106         * make.adb (Gnatmake): Add to table Library_Projs only library projects
3107         that are not extended. Do not check if a library project that is
3108         extended should be regenerated. Do not add to table Library_Paths the
3109         libraries that are in extended projects. Link only with libraries that
3110         are in libray projects that are not extended.
3111         * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
3112         for a library project that is extended.
3113
3114 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
3115
3116         * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
3117         conforming subprogram renamings that appear to be completions if they
3118         are not fully conformant.
3119         Such renamings are homographs but not completions.
3120         * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
3121         names in a subprogram renaming that appears in an instance.
3122
3123 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
3124
3125         * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
3126         not immutably limited, build actual subtype from expression to provide
3127         proper bounds to caller.
3128
3129 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
3130
3131         * sem_ch8.adb: Minor comment correction.
3132
3133 2011-08-03  Thomas Quinot  <quinot@adacore.com>
3134
3135         * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
3136         returning a limited array, use an extended return statement.
3137
3138 2011-08-03  Vincent Celier  <celier@adacore.com>
3139
3140         * make.adb (Initialize): If --subdirs= is used, but no project file is
3141         specified, attempt to create the specify subdir if it does not already
3142         exist and use it as the object directory as if -D had been specified.
3143
3144 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
3145
3146         * s-tpopsp-vms.adb: New file.
3147         * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
3148         * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
3149
3150 2011-08-03  Emmanuel Briot  <briot@adacore.com>
3151
3152         * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
3153         package.
3154
3155 2011-08-03  Yannick Moy  <moy@adacore.com>
3156
3157         * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
3158         * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
3159         * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
3160         detect that an array has static bounds.
3161
3162 2011-08-03  Thomas Quinot  <quinot@adacore.com>
3163
3164         * exp_dist.adb: Minor reformatting.
3165
3166 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
3167
3168         * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
3169         (ATCB_Key): Removed, not always used.
3170
3171 2011-08-03  Emmanuel Briot  <briot@adacore.com>
3172
3173         * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
3174         clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
3175         most remaining global variables.
3176
3177 2011-08-03  Robert Dewar  <dewar@adacore.com>
3178
3179         * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
3180         prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
3181         reformatting.
3182
3183 2011-08-03  Javier Miranda  <miranda@adacore.com>
3184
3185         * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
3186         that must be passed by copy in VM targets.
3187
3188 2011-08-03  Emmanuel Briot  <briot@adacore.com>
3189
3190         * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
3191         duplicates a similar htable now in the project tree.
3192
3193 2011-08-03  Claire Dross  <dross@adacore.com>
3194
3195         * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
3196         a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
3197         Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
3198         Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
3199         Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
3200         Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
3201         Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
3202         update.
3203
3204 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
3205
3206         * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
3207         (ATCB_Key): Removed, not always used.
3208         * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
3209         s-taprop-posix.adb.
3210         * s-tpopsp-tls.adb: New file.
3211         * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
3212         x86/x64/ia64/powerpc/sparc Linux.
3213
3214 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
3215
3216         * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
3217         * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
3218
3219 2011-08-03  Thomas Quinot  <quinot@adacore.com>
3220
3221         * rtsfind.ads, exp_dist.adb, exp_dist.ads
3222         (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
3223         Fix type selection for mapping integer types to PolyORB types.
3224
3225 2011-08-03  Bob Duff  <duff@adacore.com>
3226
3227         * sem_ch7.adb: Minor comment clarification.
3228
3229 2011-08-03  Bob Duff  <duff@adacore.com>
3230
3231         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
3232         an error analyzing a choice, skip further processing. Further
3233         processing could cause a crash or cascade errors.
3234
3235 2011-08-03  Emmanuel Briot  <briot@adacore.com>
3236
3237         * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
3238         prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
3239         prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
3240         prj-env.ads (Shared_Project_Tree_Data): new type
3241         An aggregate project and its aggregated trees need to share the common
3242         data structures used for lists of strings, packages,... This makes the
3243         code simpler since otherwise we have to pass the root tree (also used
3244         for the configuration file data) in addition to the current project
3245         tree. This also avoids ambiguities as to which tree should be used.
3246         And finally this saves a bit of memory.
3247         (For_Every_Project_Imported): new parameter Tree.
3248         Since aggregated projects are using a different tree, we need to let
3249         the caller know which tree to use to manipulate the returned project.
3250
3251 2011-08-03  Robert Dewar  <dewar@adacore.com>
3252
3253         * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
3254         prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
3255         lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
3256         prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
3257
3258 2011-08-03  Javier Miranda  <miranda@adacore.com>
3259
3260         * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
3261         Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
3262
3263 2011-08-03  Bob Duff  <duff@adacore.com>
3264
3265         * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
3266         the Base_Type.
3267
3268 2011-08-03  Joel Brobecker  <brobecker@adacore.com brobecker>
3269
3270         * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
3271         g-sehash.ads: Fix typo. Update header.
3272
3273 2011-08-03  Thomas Quinot  <quinot@adacore.com>
3274
3275         * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
3276         expansion.
3277
3278 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
3279
3280         * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
3281         prefixes of private types along with records, since the selector may be
3282         a discriminant.
3283         * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
3284         private types along with records, since the selector may be a
3285         discriminant.
3286
3287 2011-08-03  Emmanuel Briot  <briot@adacore.com>
3288
3289         * prj-pp.adb (Pretty_Print): remove trailing blank line in the file
3290
3291 2011-08-03  Javier Miranda  <miranda@adacore.com>
3292
3293         * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
3294         Tagged_Type_Expansion.
3295
3296 2011-08-03  Yannick Moy  <moy@adacore.com>
3297
3298         * sem_res.adb
3299         (Resolve_Op_Concat_Arg): do not issue a SPARK violation when argument of
3300         concatenation is the name of a constant
3301
3302 2011-08-03  Emmanuel Briot  <briot@adacore.com>
3303
3304         * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
3305         prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
3306         (Process_Declarative_Items): new parameter Child_Env.
3307
3308 2011-08-03  Yannick Moy  <moy@adacore.com>
3309
3310         * alfa.ads Update format of ALFA section in ALI file in order to add a
3311         mapping from bodies to specs when both are present
3312         (ALFA_Scope_Record): add components for spec file/scope
3313         * get_alfa.adb (Get_ALFA): read the new file/scope for spec when present
3314         * lib-xref-alfa.adb
3315         (Collect_ALFA): after all scopes have been collected, fill in the spec
3316          information when relevant
3317         * put_alfa.adb (Put_ALFA): write the new file/scope for spec when
3318         present.
3319
3320 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
3321
3322         * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
3323         code unit to decide whether to add internally generated subprograms.
3324
3325 2011-08-03  Javier Miranda  <miranda@adacore.com>
3326
3327         * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
3328         * exp_ch9.adb
3329         (Build_Simple_Entry_Call): Handle actuals that must be handled by copy
3330         in VM targets.
3331
3332 2011-08-03  Emmanuel Briot  <briot@adacore.com>
3333
3334         * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): now shares
3335         code with Makeutl.Get_Switches.
3336         * prj-tree.adb: Update comment.
3337
3338 2011-08-03  Thomas Quinot  <quinot@adacore.com>
3339
3340         * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
3341         subprogram with a limited formal that does not support external
3342         streaming.
3343
3344 2011-08-03  Yannick Moy  <moy@adacore.com>
3345
3346         * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
3347         continuation line
3348         * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
3349         not from current unit in two phases, because it is not possible to
3350         change the table while iterating over its content.
3351         * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
3352
3353 2011-08-03  Sergey Rybin  <rybin@adacore.com>
3354
3355         * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
3356         * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
3357
3358 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
3359
3360         * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
3361         and the component type is composite, this is ambiguous for predefined
3362         concatenation, but if the node is not overloaded and the entity is a use
3363         -defined function its profile can be used to resolve that aggregate.
3364
3365 2011-08-03  Robert Dewar  <dewar@adacore.com>
3366
3367         * exp_ch4.adb: Minor code cleanup.
3368
3369 2011-08-03  Thomas Quinot  <quinot@adacore.com>
3370
3371         * exp_dist.adb: Do not generate distribution stubs if serious errors
3372         have been diagnosed.
3373
3374 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
3375
3376         * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
3377         the first formal of a primitive operation, go to the base type to
3378         handle properly an access to a derived type with constrained
3379         discriminants.
3380         * sem_type.adb (Disambiguate): an immediately visible operator hides a
3381         user-defined function that is only use-visible.
3382
3383 2011-08-03  Robert Dewar  <dewar@adacore.com>
3384
3385         * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
3386         make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
3387         fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
3388         prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
3389         sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
3390         prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
3391         prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
3392         alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
3393
3394 2011-08-03  Robert Dewar  <dewar@adacore.com>
3395
3396         * repinfo.adb (List_Mechanism): Add handling of
3397         Convention_Ada_Pass_By_XXX.
3398         * sem_mech.adb (Set_Mechanism): Ditto.
3399         * sem_prag.adb (Process_Convention): Add entries for
3400         Convention_Ada_Pass_By_XXX.
3401         * snames.adb-tmpl, snames.ads-tmpl: Ditto.
3402
3403 2011-08-03  Pascal Obry  <obry@adacore.com>
3404
3405         * makeutl.adb: Minor reformatting.
3406
3407 2011-08-03  Vincent Celier  <celier@adacore.com>
3408
3409         * fname-uf.adb
3410         (Get_File_Name) If the file cannot be found when there are no config
3411         pragmas file and May_Fail is True, return No_File instead of the file
3412         name, to be consistent.
3413
3414 2011-08-03  Pascal Obry  <obry@adacore.com>
3415
3416         * adaint.c (__gnat_is_executable_file_attr): Avoid access
3417         to null pointer.
3418
3419 2011-08-03  Javier Miranda  <miranda@adacore.com>
3420
3421         * sem_ch13.adb
3422         (Same_Representation): In VM targets the representation of arrays with
3423         aliased components differs from arrays with non-aliased components.
3424
3425 2011-08-03  Emmanuel Briot  <briot@adacore.com>
3426
3427         * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
3428         not systematically lower case attribute indexes that contain no "."
3429         Fix definition of several Naming attributes, which take
3430         a unit name as index and therefore should be case insensitive.
3431         Minor refactoring (reduce length of variable names).
3432
3433 2011-08-03  Emmanuel Briot  <briot@adacore.com>
3434
3435         * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
3436
3437 2011-08-03  Emmanuel Briot  <briot@adacore.com>
3438
3439         * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
3440         prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
3441         prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
3442         prj-tree.ads (Prj.Tree.Environment): new type.
3443
3444 2011-08-03  Emmanuel Briot  <briot@adacore.com>
3445
3446         * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
3447         prj-tree.adb, prj-tree.ads (Environment): new type.
3448
3449 2011-08-03  Emmanuel Briot  <briot@adacore.com>
3450
3451         * prj-tree.ads: Remove unused variable.
3452
3453 2011-08-03  Yannick Moy  <moy@adacore.com>
3454
3455         * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
3456         issuing messages related to SPARK restriction violation.
3457
3458 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
3459
3460         * sem_ch6.adb: guard against error nodes in return statements.
3461
3462 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
3463
3464         * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
3465         a warning can only appear on a configuration file, so emit warning
3466         without further checks.
3467
3468 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
3469
3470         * s-interr.ads: add overriding keyword.
3471
3472 2011-08-03  Geert Bosch  <bosch@adacore.com>
3473
3474         * exp_attr.adb: Fix minor typo.
3475
3476 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
3477
3478         * par-ch4.adb: improve error recovery.
3479
3480 2011-08-03  Emmanuel Briot  <briot@adacore.com>
3481
3482         * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
3483         prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
3484         to Errout_Handling.
3485
3486 2011-08-03  Emmanuel Briot  <briot@adacore.com>
3487
3488         * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
3489         "external" as an attribute name in aggregate projects.
3490
3491 2011-08-03  Jose Ruiz  <ruiz@adacore.com>
3492
3493         * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
3494         uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
3495         from 0, so we need to adjust.
3496
3497 2011-08-03  Emmanuel Briot  <briot@adacore.com>
3498
3499         * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
3500         prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
3501
3502 2011-08-03  Yannick Moy  <moy@adacore.com>
3503
3504         * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
3505         restriction on overloaded entity if the entity is not an operator.
3506
3507 2011-08-03  Yannick Moy  <moy@adacore.com>
3508
3509         * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
3510         restrict.ads: Rename remaining Check_Formal_Restriction* into
3511         Check_SPARK_Restriction*.
3512
3513 2011-08-03  Emmanuel Briot  <briot@adacore.com>
3514
3515         * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
3516         prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
3517         qualifier.
3518         (Project_Empty): removed
3519         (Empty_Project): new parameter Qualifier
3520         This is used to have fields specific to aggregate projects, cleaner
3521         New field to store the list of aggregated projects.
3522         (Check_Aggregate_Project): removed
3523         (Process_Aggregated_Projects, Free): new subprograms.
3524
3525 2011-08-03  Olivier Hainque  <hainque@adacore.com>
3526
3527         * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
3528
3529 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
3530
3531         * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
3532         explicit dereference of an unconstrained type, create a constrained
3533         subtype for it, as is done for function calls that return an
3534         unconstrained type.
3535
3536 2011-08-03  Thomas Quinot  <quinot@adacore.com>
3537
3538         * g-pehage.adb (Finalize): Avoid possible double-free.
3539
3540 2011-08-03  Steve Baird  <baird@adacore.com>
3541
3542         * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
3543         Elab_Spec/Body attrs in CodePeer_Mode.
3544
3545 2011-08-03  Javier Miranda  <miranda@adacore.com>
3546
3547         * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
3548         low bound is not known at compile time but they have no others choice.
3549         Done because in this case the bounds can be obtained directly from the
3550         aggregate.
3551
3552 2011-08-03  Ed Falis  <falis@adacore.com>
3553
3554         * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
3555         on VxWorks SMP. Remove unusable constant ANY_CPU.
3556
3557 2011-08-03  Emmanuel Briot  <briot@adacore.com>
3558
3559         * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
3560         clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
3561         prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
3562         Prj.Env.Initialize_Empty): new subprograms
3563         (Get_Env, Find_Project): remove parameter Target_Name.
3564
3565 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
3566
3567         * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
3568         as a condition for the delayed call to Derived_Subprograms done for the
3569         case of the rewriting of a derived type that constrains the
3570         discriminants of its parent type.
3571         Avoids redundant subprogram derivations for private subtype derivations.
3572
3573 2011-08-03  Javier Miranda  <miranda@adacore.com>
3574
3575         * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
3576         Build_Record_Aggr_Code.
3577         (Build_Record_Aggr_Code): Add missing support to initialize hidden
3578         discriminants in extension aggregates.
3579
3580 2011-08-03  Emmanuel Briot  <briot@adacore.com>
3581
3582         * prj-pp.adb (Print): also output project qualifiers, since in
3583         particular "aggregate" is mandatory in an aggregate project.
3584
3585 2011-08-03  Emmanuel Briot  <briot@adacore.com>
3586
3587         * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
3588         (Debug_Output): new function.
3589
3590 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
3591
3592         * gnat_ugn.texi: Document -Wstack-usage.
3593         * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
3594
3595 2011-08-03  Thomas Quinot  <quinot@adacore.com>
3596
3597         * sem_prag.adb Issue an error (not a warning) when a C++ type does not
3598         have keyword LIMITED.
3599
3600 2011-08-03  Yannick Moy  <moy@adacore.com>
3601
3602         * alfa.adb, alfa.ads, alfa_test.adb: New files.
3603         * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
3604         (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
3605         section (does not happen in compiler, only if code directly calls
3606         Scan_ALI).
3607         * get_alfa.adb, get_alfa.ads: New files.
3608         * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
3609         needed.
3610         * lib-xref-alfa.adb: New file.
3611         * lib-xref.adb, lib-xref.ads
3612         (Xref_Entry): redefine information needed in cross-references for ALFA.
3613         Push ALFA treatments in separated local package.
3614         (Enclosing_Subpragram_Or_Package): treat specially subprogram
3615         identifiers. Return entity of package body instead of spec. Return
3616         Empty for a scope with no location.
3617         (Generate_Reference): adapt to new components for ALFA information.
3618         Remove the need for D references on definitions.
3619         (Is_Local_Reference): moved to ALFA local package
3620         (Output_References): extract subfunction as Extract_Source_Name
3621         (Output_Local_References): remove procedure, replaced by filtering of
3622         cross-references in package ALFA and printing in Put_ALFA.
3623         (Write_Entity_Name): remove procedure
3624         * lib.adb, lib.ads (Extract_Source_Name): extract here function to
3625         print exact name of entity as it appears in source file
3626         (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
3627         * put_alfa.adb, put_alfa.ads: New files.
3628         * xref_lib.adb (Search_Xref): protect read of cross-references against
3629         reading other sections of the ALI file, in gnatxref
3630         (Search): protect read of cross-references against reading other
3631         sections of the ALI file, in gnatfind.
3632         * gcc-interface/Make-lang.in: Update dependencies.
3633
3634 2011-08-03  Thomas Quinot  <quinot@adacore.com>
3635
3636         * sem_ch3.adb: Minor reformatting.
3637
3638 2011-08-03  Jose Ruiz  <ruiz@adacore.com>
3639
3640         * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
3641         raising an exception.
3642
3643 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
3644
3645         * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
3646         type, always use 1 as the lower bound or string, even if lower bound of
3647         context is not static, to handle properly null strings in a non-static
3648         context.
3649
3650 2011-08-03  Bob Duff  <duff@adacore.com>
3651
3652         * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
3653         always legal on the right-hand side of an assignment statement; there
3654         is always an applicable index constraint in this case. Therefore, the
3655         check for Pkind = N_Assignment_Statement is now unconditional -- it
3656         doesn't depend on whether Is_Constrained (Typ).
3657
3658 2011-08-03  Robert Dewar  <dewar@adacore.com>
3659
3660         * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
3661
3662 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
3663
3664         * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
3665         for an itype created within a generic unit.
3666
3667 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
3668
3669         * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
3670         suppresses all inlining.
3671
3672 2011-08-03  Robert Dewar  <dewar@adacore.com>
3673
3674         * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
3675         exp_aggr.adb: Minor reformatting.
3676
3677 2011-08-03  Thomas Quinot  <quinot@adacore.com>
3678
3679         * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
3680         tagged assignment when discriminant checks are suppressed. This is
3681         useless and extremely costly in terms of static stack usage.
3682
3683 2011-08-03  Bob Duff  <duff@adacore.com>
3684
3685         * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
3686         of generics, because this leads to the wrong entity in the wrong scope,
3687         causing (e.g.) pragma Export_Procedure to get an error if the entity is
3688         an instance.
3689         (Process_Interface_Name): Follow Alias for instances of generics, to
3690         correct for the above change.
3691
3692 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
3693
3694         * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
3695         is an integer literal it is always safe to replace the reference. In
3696         addition, if the reference appears in the generated code for an object
3697         declaration it is necessary to copy because otherwise the reference
3698         might be to the uninitilized value of the discriminant of the object
3699         itself.
3700
3701 2011-08-03  Pascal Obry  <obry@adacore.com>
3702
3703         * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
3704         ACL used, in this case we want to check for ending .exe, not .exe
3705         anywhere in the path.
3706
3707 2011-08-03  Sergey Rybin  <rybin@adacore.com>
3708
3709         * tree_io.ads (ASIS_Version_Number): Update because of the changes in
3710         the tree structure (semantic decoration of references to record
3711         discriminants).
3712
3713 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
3714
3715         * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
3716         choices of a named array aggregate, bail out when any choices are
3717         marked as Errors_Posted.
3718
3719 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
3720
3721         * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
3722         in which entity is frozen, to handle properly loop variables in
3723         iterators.
3724
3725 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
3726
3727         * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
3728         subtype is not static, compute the upper bound using attributes, to
3729         handle properly index types that are not integer types.
3730
3731 2011-08-03  Bob Duff  <duff@adacore.com>
3732
3733         * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
3734         Update copyright notice.
3735
3736 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
3737
3738         * sem_ch3.adb (Build_Discriminant_Constraints): Only use
3739         Original_Discriminant if within an instance.
3740         * sem_ch4.adb (Analyze_Selected_Component): Ditto.
3741
3742 2011-08-03  Thomas Quinot  <quinot@adacore.com>
3743
3744         * einfo.ads: Minor reformatting.
3745
3746 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
3747
3748         * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
3749         composite type with an unfrozen subcomponent, in the profile of a
3750         primitive operation.
3751
3752 2011-08-03  Robert Dewar  <dewar@adacore.com>
3753
3754         * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
3755
3756 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
3757
3758         * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
3759         unconstrained type with discriminants is initialized with an aggregate,
3760         use the constrained subtype of the aggregate as the type of the object,
3761         because it is immutable, and this allows the back-end to generate no
3762         code for the object declaration.
3763
3764 2011-08-03  Robert Dewar  <dewar@adacore.com>
3765
3766         * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
3767         comparison operand is variable, and turns out to be zero or negative.
3768
3769 2011-08-03  Javier Miranda  <miranda@adacore.com>
3770
3771         * exp_intr.adb
3772         (Expand_Dispatching_Constructor_Call): Disable expansion of
3773         code required for native targets. Done to avoid generating
3774         references to unavailable runtime entities in VM targets.
3775         * exp_ch3.adb
3776         (Expand_N_Object_Declaration): Add missing support to handle
3777         the explicit initialization of class-wide interface objects.
3778         Fix documentation.
3779
3780 2011-08-03  Matthew Heaney  <heaney@adacore.com>
3781
3782         * a-cobove.adb (Merge): Move source onto target, instead of using Assign
3783
3784 2011-08-03  Matthew Heaney  <heaney@adacore.com>
3785
3786         * a-cbdlli.adb (Splice): move source items from first to last
3787
3788 2011-08-03  Yannick Moy  <moy@adacore.com>
3789
3790         * sem_util.ads: comment added.
3791
3792 2011-08-03  Javier Miranda  <miranda@adacore.com>
3793
3794         * exp_aggr.adb
3795         (Expand_Record_Aggregate): In VM targets disable the expansion into
3796         assignments of aggregates whose type is not known at compile time.
3797
3798 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
3799
3800         * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
3801         protected entries and task entries, to build the proper renaming
3802         declaration for entry formals, used in debugging.
3803         * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
3804         parameters in the same way.
3805
3806 2011-08-02  Robert Dewar  <dewar@adacore.com>
3807
3808         * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
3809         sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
3810         code reorganization.
3811
3812 2011-08-02  Robert Dewar  <dewar@adacore.com>
3813
3814         * debug.adb: Debug flag d.P to suppress length comparison optimization
3815         * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
3816         comparison of Length by comparing First/Last instead.
3817
3818 2011-08-02  Matthew Heaney  <heaney@adacore.com>
3819
3820         * a-cobove.ads: Code clean up.
3821
3822 2011-08-02  Vincent Celier  <celier@adacore.com>
3823
3824         * adaint.c (file_names_case_sensitive_cache): New static int.
3825         (__gnat_get_file_names_case_sensitive): Cache the return value in
3826         file_names_case_sensitive_cache at the first invocation, to avoid
3827         multiple calls to getenv.
3828
3829 2011-08-02  Bob Duff  <duff@adacore.com>
3830
3831         * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
3832
3833 2011-08-02  Yannick Moy  <moy@adacore.com>
3834
3835         * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
3836         sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
3837         sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
3838         indicate that we are in a precondition or postcondition. This is used in
3839         Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
3840         decide whether to flag the spec or body of the current subprogram as
3841         not in ALFA.
3842
3843 2011-08-02  Fabien Chouteau  <chouteau@adacore.com>
3844
3845         * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
3846         list.
3847         * a-extiin.ads: New file.
3848
3849 2011-08-02  Bob Duff  <duff@adacore.com>
3850
3851         * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
3852         now raises Name_Error instead of Use_Error in certain cases. The other
3853         parts of this AI were already implemented properly.
3854
3855 2011-08-02  Vincent Celier  <celier@adacore.com>
3856
3857         * link.c: Only import "auto-host.h" when building the gnattools.
3858
3859 2011-08-02  Yannick Moy  <moy@adacore.com>
3860
3861         * sem_util.adb: Inter-unit inlining does not work for a subprogram
3862         which calls a local subprogram, so extract subprogram
3863         from Mark_Non_ALFA_Subprogram_Body.
3864
3865 2011-08-02  Javier Miranda  <miranda@adacore.com>
3866
3867         * exp_ch9.adb
3868         (Extract_Dispatching_Call): If the type of the dispatching object is an
3869         access type then return an explicit dereference in the Object out-mode
3870         parameter.
3871
3872 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
3873
3874         * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
3875         compatibility checks for all indexes of an array subtype, not just the
3876         first. Reset Has_Dynamic_Range_Check on the subtype before each
3877         potential check to ensure that Insert_Range_Checks will not elide any
3878         of the dynamic checks.
3879
3880 2011-08-02  Yannick Moy  <moy@adacore.com>
3881
3882         * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
3883         SPARK restriction at parsing time.
3884         * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
3885         directive only if the SPARK restriction is set for this unit.
3886
3887 2011-08-02  Yannick Moy  <moy@adacore.com>
3888
3889         * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
3890         sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
3891         sem_ch11.adb: Protect call to Current_Subprogram which might be costly
3892         when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
3893         Mark_Non_ALFA_Subprogram_Body.
3894         Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
3895         inlined.
3896
3897 2011-08-02  Yannick Moy  <moy@adacore.com>
3898
3899         * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
3900         might be costly.
3901
3902 2011-08-02  Robert Dewar  <dewar@adacore.com>
3903
3904         * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
3905         exp_ch3.adb: Minor reformatting.
3906
3907 2011-08-02  Emmanuel Briot  <briot@adacore.com>
3908
3909         * adaint.c (__gnat_locate_exec_on_path): only returns executable
3910         files, not any regular file.
3911         (__gnat_locate_file_with_predicate): new subprogram.
3912
3913 2011-08-02  Yannick Moy  <moy@adacore.com>
3914
3915         * sinfo.adb, sinfo.ads: Restrict the use of flags
3916         Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
3917         nodes, plus N_Subtype_Declaration for the 2nd one.
3918
3919 2011-08-02  Sergey Rybin  <rybin@adacore.com>
3920
3921         * gnat_rm.texi: Ramification of pragma Eliminate documentation
3922          - fix bugs in the description of Source_Trace;
3923          - get rid of UNIT_NAME;
3924
3925 2011-08-02  Javier Miranda  <miranda@adacore.com>
3926
3927         * exp_ch9.adb
3928         (Build_Dispatching_Requeue): Adding support for VM targets
3929         since we cannot directly reference the Tag entity.
3930         * exp_sel.adb (Build_K): Adding support for VM targets.
3931         (Build_S_Assignment): Adding support for VM targets.
3932         * exp_disp.adb
3933         (Default_Prim_Op_Position): In VM targets do not restrict availability
3934         of predefined interface primitives to compiling in Ada 2005 mode.
3935         (Is_Predefined_Interface_Primitive): In VM targets this service is not
3936         restricted to compiling in Ada 2005 mode.
3937         (Make_VM_TSD): Generate code that declares and initializes the OSD
3938         record. Needed to support dispatching calls through synchronized
3939         interfaces.
3940         * exp_ch3.adb
3941         (Make_Predefined_Primitive_Specs): Enable generation of predefined
3942         primitives associated with synchronized interfaces.
3943         (Make_Predefined_Primitive_Bodies): Enable generation of predefined
3944         primitives associated with synchronized interfaces.
3945
3946 2011-08-02  Yannick Moy  <moy@adacore.com>
3947
3948         * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
3949         statements hidden in SPARK if preceded by the HIDE directive
3950         (Parse_Exception_Handlers): mark each exception handler in a sequence of
3951         exception handlers as hidden in SPARK if preceded by the HIDE directive
3952         * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
3953         if starting with the HIDE directive
3954         * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
3955         starting with the HIDE directive; mark the declarations in a private
3956         part as hidden in SPARK if the private part starts with the HIDE
3957         directive
3958         * restrict.adb, restrict.ads
3959         (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
3960         (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
3961         argument node belongs to a part which is hidden in SPARK
3962         (Check_SPARK_Restriction): do not issue violations on nodes in hidden
3963         parts in SPARK; protect the possibly costly call to
3964         Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
3965         * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
3966         * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
3967         Accumulate_Token_Checksum_GNAT_5_03): add case for new token
3968         Tok_SPARK_Hide.
3969         (Scan): recognize special comment starting with '#' and followed by
3970         SPARK keyword "hide" as a HIDE directive.
3971
3972 2011-08-02  Yannick Moy  <moy@adacore.com>
3973
3974         * types.ads, erroutc.ads: Minor reformatting.
3975
3976 2011-08-02  Vincent Celier  <celier@adacore.com>
3977
3978         * link.c: Add response file support for cross platforms.
3979
3980 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
3981
3982         * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
3983         in an association, set parent field of copy before partial analysis.
3984         * sem_res.adb (Resolve_Slice): create reference to itype only when
3985         expansion is enabled.
3986
3987 2011-08-02  Yannick Moy  <moy@adacore.com>
3988
3989         * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
3990         for new flag denoting which subprogram bodies are in ALFA
3991         * restrict.adb, sem_ch7.adb: Update comment
3992         * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
3993         sem_ch9.adb, sem_res.adb: Add calls to
3994         Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
3995         * sem_ch6.adb (Analyze_Function_Return): add calls to
3996         Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
3997         middle of the body, and extended return.
3998         (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
3999         False when missing return.
4000         (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
4001         to True for subprograms whose spec is in ALFA. Remove later on the flag
4002         on the entity used for a subprogram body when there exists a separate
4003         declaration.
4004         * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
4005         if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
4006         False, otherwise do nothing.
4007
4008 2011-08-02  Robert Dewar  <dewar@adacore.com>
4009
4010         * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
4011
4012 2011-08-02  Yannick Moy  <moy@adacore.com>
4013
4014         * sem_ch4.ads: minor formatting.
4015
4016 2011-08-02  Yannick Moy  <moy@adacore.com>
4017
4018         * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
4019         debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
4020         errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
4021         restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
4022         opt.ads: cleanup of SPARK mode
4023
4024 2011-08-02  Yannick Moy  <moy@adacore.com>
4025
4026         * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
4027         types.
4028         * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
4029         (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
4030         * sem_ch3.adb
4031         (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
4032         (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
4033         (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
4034         (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
4035         types.
4036         (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
4037         non-static range.
4038         * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
4039         functions whose return type is not in ALFA.
4040         (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
4041         specifications.
4042         (Process_Formals): unset Is_In_ALFA flag for subprograms if a
4043         parameter's type is not in ALFA.
4044         * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
4045         types are in ALFA.
4046
4047 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
4048
4049         * sem_ch6 (Analyze_Expression_Function): treat the function as
4050         Inline_Always, and introduce a subprogram declaration for it when it is
4051         not a completion.
4052         * inline.adb (Add_Inlined_Body): recognize bodies that come from
4053         expression functions, so that the back-end can determine whether they
4054         can in fact be inlined.
4055         * sem_util.adb (Is_Expression_Function): predicate to determine whether
4056         a function body comes from an expression function.
4057
4058 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
4059
4060         * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
4061         null exclusions to test Can_Never_Be_Null on the anonymous access types
4062         of the formals rather than testing the formals themselves. Exclude this
4063         check in cases where the Old_Formal is marked as a controlling formal,
4064         to avoid issuing spurious errors for bodies completing dispatching
4065         operations (due to the flag not getting set on controlling access
4066         formals in body specs).
4067         (Find_Corresponding_Spec): When checking full and subtype conformance of
4068         subprogram bodies in instances, pass Designated and E in that order, for
4069         consistency with the expected order of the formals (New_Id followed by
4070         Old_Id).
4071
4072 2011-08-02  Robert Dewar  <dewar@adacore.com>
4073
4074         * sem_ch8.adb: Minor reformatting.
4075
4076 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
4077
4078         * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
4079         Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
4080         primitive operations of class-wide actuals.
4081
4082 2011-08-02  Javier Miranda  <miranda@adacore.com>
4083
4084         * exp_atag.ads, exp_atag.adb
4085         (Build_Common_Dispatching_Select_Statements): Remove argument Loc
4086         since its value is implicitly passed in argument Typ.
4087         * exp_disp.adb (Make_Disp_Conditional_Select_Body,
4088         Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
4089         Build_Common_Dispatching_Select_Statements.
4090
4091 2011-08-02  Robert Dewar  <dewar@adacore.com>
4092
4093         * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
4094         exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
4095         Minor reformatting.
4096
4097 2011-08-02  Robert Dewar  <dewar@adacore.com>
4098
4099         * sem_res.adb: Minor reformatting.
4100         * sem_prag.adb: Minor reformatting.
4101
4102 2011-08-02  Javier Miranda  <miranda@adacore.com>
4103
4104         * exp_atag.adb, exp_atags.ads
4105         (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
4106         by the tagged type Entity. Required to use this routine in the VM
4107         targets since we do not have available the Tag entity in the VM
4108         platforms.
4109         * exp_ch6.adb
4110         (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
4111         Ada.Tags has not been previously loaded.
4112         * exp_ch7.adb
4113         (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
4114         Build_VM_TSDs if package Ada.Tags has not been previously loaded.
4115         * sem_aux.adb
4116         (Enclosing_Dynamic_Scope): Add missing support to handle the full
4117         view of enclosing scopes. Required to handle enclosing scopes that
4118         are synchronized types whose full view is a task type.
4119         * exp_disp.adb
4120         (Build_VM_TSDs): Minor code improvement to avoid generating and
4121         analyzing lists with empty nodes.
4122         (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
4123         (Make_Disp_Conditional_Select_Body): Add support for VM targets.
4124         (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
4125         (Make_Disp_Timed_Select_Body): Add support for VM targets.
4126         (Make_Select_Specific_Data_Table): Add support for VM targets.
4127         (Make_VM_TSD): Generate code to initialize the SSD structure of
4128         the TSD.
4129
4130 2011-08-02  Yannick Moy  <moy@adacore.com>
4131
4132         * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
4133         cross-references section in ALI.
4134         * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
4135         (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
4136         Sub).
4137         (Enclosing_Subprogram_Or_Package): new function to return the enclosing
4138         subprogram or package entity of a node
4139         (Is_Local_Reference_Type): new function returns True for references
4140         selected in local cross-references.
4141         (Lt): function extracted from Lt in Output_References
4142         (Write_Entity_Name): function extracted from Output_References
4143         (Generate_Definition): generate reference with type 'D' for definition
4144         of objects (object declaration and parameter specification), with
4145         appropriate locations and units, for use in local cross-references.
4146         (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
4147         references of type 'I' for initialization in object definition.
4148         (Output_References): move part of function Lt and procedure
4149         Write_Entity_Name outside of the body. Ignore references of types 'D'
4150         and 'I' introduced for local cross-references.
4151         (Output_Local_References): new procedure to output the local
4152         cross-references sections.
4153         (Lref_Entity_Status): new array defining whether an entity is a local
4154         * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
4155         with 'I' type when initialization expression is present.
4156         * get_scos.adb, get_scos.ads: Correct comments and typos
4157
4158 2011-08-02  Javier Miranda  <miranda@adacore.com>
4159
4160         * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
4161         the JVM target.
4162         * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
4163         the JVM target.
4164         * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
4165         TSD support.
4166
4167 2011-08-02  Vincent Celier  <celier@adacore.com>
4168
4169         * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
4170         (No_Space_Img): New function
4171         (Find_Excluded_Sources): When reading from a file, record the file name
4172         and the line number for each excluded source.
4173         (Mark_Excluded_Sources): When reporting an error, if the excluded
4174         sources were read from a file, include file name and line number in
4175         the error message.
4176
4177 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
4178
4179         * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
4180
4181 2011-08-02  Robert Dewar  <dewar@adacore.com>
4182
4183         * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
4184
4185 2011-08-02  Javier Miranda  <miranda@adacore.com>
4186
4187         * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
4188         generation of TSDs to the DOTNET compiler.
4189         * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
4190         generation of TSDs to the DOTNET compiler.
4191
4192 2011-08-02  Javier Miranda  <miranda@adacore.com>
4193
4194         * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
4195         record of all the tagged types declared inside library level package
4196         declarations, library level package bodies or library level subprograms.
4197         * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
4198         associated with a given tagged type.
4199         (Build_VM_TSDs): New subprogram.
4200         * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
4201         compilation units that are subprograms.
4202         * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
4203         compilation units that are package bodies.
4204         (Expand_N_Package_Declaration): Generate TSDs of the main compilation
4205         units that are a package declaration or a package instantiation.
4206         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
4207         reorganization to improve the error generated by the frontend when the
4208         function Ada.Tags.Secondary_Tag is not available.
4209         * rtsfind.ads (RE_Register_TSD): New runtime entity.
4210         * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
4211
4212 2011-08-02  Javier Miranda  <miranda@adacore.com>
4213
4214         * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
4215
4216 2011-08-02  Robert Dewar  <dewar@adacore.com>
4217
4218         * s-imenne.ads: Minor reformatting.
4219
4220 2011-08-02  Robert Dewar  <dewar@adacore.com>
4221
4222         * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
4223         * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
4224         * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
4225
4226 2011-08-02  Robert Dewar  <dewar@adacore.com>
4227
4228         * einfo.ads (Materialize_Entity): Document this is only for renamings
4229         * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
4230         required debug information in the case where we transform the object
4231         declaration into a renaming declaration.
4232         * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
4233         object
4234         * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
4235         Materialize_Entity.
4236
4237 2011-08-02  Robert Dewar  <dewar@adacore.com>
4238
4239         * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
4240         Suppress_Init_Procs.
4241         * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
4242         Suppress_Initialization/Initialization_Suppressed.
4243         * gnat_rm.texi: New documentation for pragma Suppress_Initialization
4244         * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
4245         * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
4246         * sem_prag.adb: New processing for pragma Suppress_Initialization.
4247
4248 2011-08-02  Robert Dewar  <dewar@adacore.com>
4249
4250         * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
4251         Minor reformatting.
4252
4253 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
4254
4255         * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
4256         only have inheritable classwide pre/postconditions.
4257
4258 2011-08-02  Javier Miranda  <miranda@adacore.com>
4259
4260         * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
4261         * rtsfind.ads (RE_Check_TSD): New runtime entity.
4262         * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
4263         checks if the external tag of a type is the same as the external tag
4264         of some other declaration.
4265
4266 2011-08-02  Thomas Quinot  <quinot@adacore.com>
4267
4268         * s-taskin.ads: Minor reformatting.
4269
4270 2011-08-02  Emmanuel Briot  <briot@adacore.com>
4271
4272         * g-comlin.adb (Display_Help): swap the order in which it prints the
4273         short help and the general usage.
4274
4275 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
4276
4277         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
4278         the aspect declarations and attach them to the generic copy for
4279         subsequent analysis.
4280         (Analyze_Subprogram_Instantiation): copy explicitly the aspect
4281         declarations of the generic tree to the new subprogram declarations.
4282         * sem_attr.adb (Check_Precondition_Postcondition): recognize
4283         conditions that apply to a subprogram instance.
4284
4285 2011-08-02  Robert Dewar  <dewar@adacore.com>
4286
4287         * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
4288
4289 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
4290
4291         * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
4292         private type with a tagged full view is not derived in the immediate
4293         scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
4294
4295 2011-08-02  Robert Dewar  <dewar@adacore.com>
4296
4297         * exp_ch4.adb: Minor reformatting.
4298
4299 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
4300
4301         * sem_ch5.adb (Analyze_Loop_Statement):  If the iteration scheme is an
4302         Ada2012 iterator, the loop will be rewritten during expansion into a
4303         while loop with a cursor and an element declaration. Do not analyze the
4304         body in this case, because if the container is for indefinite types the
4305         actual subtype of the elements will only be determined when the cursor
4306         declaration is analyzed.
4307
4308 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
4309
4310         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
4311         size/alignment related attributes in CodePeer_Mode.
4312
4313 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
4314
4315         * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
4316         Prepend_Element, since this can result in the operation getting the
4317         wrong slot in the full type's dispatch table if the full type has
4318         inherited operations. The incomplete type's operation will get added
4319         to the proper position in the full type's primitives
4320         list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
4321         (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
4322         dispatching operations, since there are cases where nonprimitive
4323         subprograms can get added to the list of incomplete dependents (such
4324         as subprograms in nested packages).
4325         * sem_ch6.adb (Process_Formals): First, remove test for being in a
4326         private part when determining whether to add a primitive with a
4327         parameter of a tagged incomplete type to the Private_Dependents list.
4328         Such primitives can also occur in the visible part, and should not have
4329         been excluded from being private dependents.
4330         * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
4331         RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
4332         list of a Taft-amendment incomplete type is a primitive before issuing
4333         an error that the full type must appear in the same unit. There are
4334         cases where nonprimitives can be in the list (such as subprograms in
4335         nested packages).
4336         * sem_disp.adb (Derives_From): Use correct condition for checking that
4337         a formal's type is derived from the type of the corresponding formal in
4338         the parent subprogram (the condition was completely wrong). Add
4339         checking that was missing for controlling result types being derived
4340         from the result type of the parent operation.
4341
4342 2011-08-02  Yannick Moy  <moy@adacore.com>
4343
4344         * errout.adb (First_Node): minor renaming
4345         * restrict.adb (Check_Formal_Restriction): put restriction warning on
4346         first node.
4347
4348 2011-08-02  Yannick Moy  <moy@adacore.com>
4349
4350         * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
4351         before accessing operands.
4352         * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
4353         decide whether an initialization expression respects SPARK rules, as
4354         the plain node is the expanded one. This allows for more valid warnings
4355         to be issued.
4356         * gnat_rm.texi: Minor update.
4357
4358 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
4359
4360         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
4361         previous change.
4362
4363 2011-08-02  Robert Dewar  <dewar@adacore.com>
4364
4365         * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
4366
4367 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
4368
4369         * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
4370         loop statements and the element renaming declaration with a block when
4371         the element type is controlled.
4372
4373 2011-08-02  Yannick Moy  <moy@adacore.com>
4374
4375         * sinfo.ads: Minor formatting.
4376
4377 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
4378
4379         * sem_aggr.adb (Add_Association): if the association has a box and no
4380         expression, use the Sloc of the aggregate itself for the new
4381         association.
4382         * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
4383         the Original_Node.
4384
4385 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
4386
4387         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
4388         When a container is provided via a function call, generate a renaming
4389         of the function result. This avoids the creation of a transient scope
4390         and the premature finalization of the container.
4391         * exp_ch7.adb (Is_Container_Cursor): Removed.
4392         (Wrap_Transient_Declaration): Remove the supression of the finalization
4393         of the list controller when the declaration denotes a container cursor,
4394         it is not needed.
4395
4396 2011-08-02  Yannick Moy  <moy@adacore.com>
4397
4398         * restrict.adb (Check_Formal_Restriction): only issue a warning if the
4399         node is from source, instead of the original node being from source.
4400         * sem_aggr.adb
4401         (Resolve_Array_Aggregate): refine the check for a static expression, to
4402         recognize also static ranges
4403         * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
4404         Array_Type_Declaration): postpone the test for the type being a subtype
4405         mark after the type has been resolved, so that component-selection and
4406         expanded-name are discriminated.
4407         (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
4408         to distinguish the case of an iteration scheme, so that an error is
4409         issed on a non-static range in SPARK except in an iteration scheme.
4410         * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
4411         In_Iter_Schm = True.
4412         * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
4413         user-defined operators so that they are allowed in renaming
4414         * sem_ch8.adb
4415         (Find_Selected_Component): refine the check for prefixing of operators
4416         so that they are allowed in renaming. Move the checks for restrictions
4417         on selector name after analysis discriminated between
4418         component-selection and expanded-name.
4419         * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
4420         concatenation argument of string type if it is static.
4421         * sem_util.adb, sem_util.ads
4422         (Check_Later_Vs_Basic_Declarations): add a new function
4423         Is_Later_Declarative_Item to decice which declarations are allowed as
4424         later items, in the two different modes Ada 83 and SPARK. In the SPARK
4425         mode, add that renamings are considered as later items.
4426         (Enclosing_Package): new function to return the enclosing package
4427         (Enter_Name): correct the rule for homonyms in SPARK
4428         (Is_SPARK_Initialization_Expr): default to returning True on nodes not
4429         from source (result of expansion) to avoid issuing wrong warnings.
4430
4431 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
4432
4433         * errout.adb: On anything but an expression First_Node returns its
4434         argument.
4435
4436 2011-08-02  Pascal Obry  <obry@adacore.com>
4437
4438         * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
4439
4440 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
4441
4442         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
4443         Set the associated loop as the related expression of internally
4444         generated cursors.
4445         * exp_ch7.adb (Is_Container_Cursor): New routine.
4446         (Wrap_Transient_Declaration): Supress the finalization of the list
4447         controller when the declaration denotes a container cursor.
4448
4449 2011-08-02  Yannick Moy  <moy@adacore.com>
4450
4451         * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
4452         command line now.
4453         * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
4454         expression is a simple expression. This check cannot be performed in
4455         the semantics, so just drop it.
4456         (P_Index_Or_Discriminant_Constraint): move check that the index or
4457         discriminant is a subtype mark to Analyze_Subtype_Declaration in the
4458         semantics. Other cases were previously checked in the semantics.
4459         * par-ch4.adb (P_Name): move checks that a selector name is not
4460         character literal or an operator symbol to Find_Selected_Component in
4461         the semantics
4462         * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
4463         declarations are not placed after later declarations in a separate
4464         procedure in Sem_Util (possibly not the best choice?), to be used both
4465         during parsing, for Ada 83 mode, and during semantic analysis, for
4466         SPARK mode.
4467         * par-endh.adb (Check_End): move check that end label is not missing
4468         to Process_End_Label in the semantics
4469         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
4470         the special case for SPARK restriction
4471         * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
4472         * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
4473         parameter Force to issue the error message even on internal node (used
4474         for generated end label). Call Check_Restriction to check when an error
4475         must be issued. In SPARK mode, issue an error message even if the
4476         restriction is not set.
4477         (Check_Restriction): new procedure with an additional out parameter to
4478         inform the caller that a message has been issued
4479         * sem_aggr.adb: Minor modification of message
4480         * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
4481         instead of issuing an error message directly
4482         * sem_ch3.adb (Analyze_Declarations): move here the check that basic
4483         declarations are not placed after later declarations, by calling
4484         Check_Later_Vs_Basic_Declarations
4485         (Analyze_Subtype_Declaration): move here the check that an index or
4486         discriminant constraint must be a subtype mark. Change the check that
4487         a subtype of String must start at one so that it works on subtype marks.
4488         * sem_ch4.adb (Analyze_Call): move here the check that a named
4489         association cannot follow a positional one in a call
4490         * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
4491         instead of issuing an error message directly
4492         * sem_ch8.adb (Find_Selected_Component): move here the check that a
4493         selector name is not a character literal or an operator symbol. Move
4494         here the check that the prefix of an expanded name cannot be a
4495         subprogram or a loop statement.
4496         * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
4497         procedure called from parsing and semantics to check that basic
4498         declarations are not placed after later declarations
4499         (Process_End_Label): move here the check that end label is not missing
4500
4501 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
4502
4503         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
4504         representation clause in codepeer mode, since it confuses CodePeer and
4505         does not bring useful info.
4506
4507 2011-08-02  Ed Falis  <falis@adacore.com>
4508
4509         * init.c: initialize fp hw on MILS.
4510
4511 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
4512
4513         * errout.adb (First_Node): for bodies, return the node itself (small
4514         optimization). For other nodes, do not check source_unit if the node
4515         comes from Standard.
4516
4517 2011-08-02  Robert Dewar  <dewar@adacore.com>
4518
4519         * exp_ch3.adb: Minor comment additions.
4520         * sem_ch13.adb: Minor reformatting.
4521
4522 2011-08-02  Pascal Obry  <obry@adacore.com>
4523
4524         * make.adb, makeutl.adb: Removes some superfluous directory separator.
4525
4526 2011-08-02  Robert Dewar  <dewar@adacore.com>
4527
4528         * sem_attr.adb: Minor reformatting.
4529
4530 2011-08-02  Robert Dewar  <dewar@adacore.com>
4531
4532         * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
4533         (Has_Default_Component_Value): Removed
4534         * einfo.ads Comment updates
4535         (Has_Default_Aspect): Replaces Has_Default_Value
4536         (Has_Default_Component_Value): Removed
4537         * exp_ch13.adb
4538         (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
4539         * exp_ch3.adb
4540         (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
4541         (Get_Simple_Init_Val): Handle Default_Value aspect
4542         (Needs_Simple_Initialization): Handle Default_Value aspect
4543         * exp_ch3.ads: Needs_Simple_Initialization
4544         * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
4545         * par-prag.adb (Pragma_Default[_Component]Value) Removed
4546         * sem_ch13.adb
4547         (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
4548         * sem_prag.adb (Pragma_Default[_Component]Value) Removed
4549         * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
4550
4551 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
4552
4553         * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
4554         package containing iteration primitives.
4555         exp_ch5.adb (Expand_Iterator_Loop): ditto.
4556
4557 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
4558
4559         * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
4560         "of", pre-analyze expression in case it is a function call with
4561         finalization actions that must be placed ahead of the loop.
4562         * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
4563         on an Ada2012 iterator, insert them ahead of the rewritten loop.
4564
4565 2011-08-02  Geert Bosch  <bosch@adacore.com>
4566
4567         * cstand.adb (Create_Float_Types): Only consider C's long double for
4568         Long_Long_Float, in addition to double.
4569
4570 2011-08-02  Robert Dewar  <dewar@adacore.com>
4571
4572         * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
4573         sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
4574         prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
4575         Minor reformatting.
4576
4577 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
4578
4579         * sem_attr.adb: handle properly 'Result when it is a prefix of an
4580         indexed component.
4581
4582 2011-08-02  Javier Miranda  <miranda@adacore.com>
4583
4584         * einfo.ads, einfo.adb
4585         (Original_Access_Type): Move this attribute to Node26 since there was
4586         an undocumented use of Node21 in E_Access_Subprogram_Type entities
4587         which causes conflicts and breaks the generation of the .NET compiler.
4588         (Interface_Name): Add missing documentation on JGNAT only uses of
4589         this attribute.
4590
4591 2011-08-02  Geert Bosch  <bosch@adacore.com>
4592
4593         * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
4594         (Find_Back_End_Float_Type): Likewise
4595         (Create_Back_End_Float_Types): Likewise
4596         (Create_Float_Types): Likewise
4597         (Register_Float_Type): Likewise
4598         * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
4599         Nlist and split out type selection in new local Find_Base_Type function.
4600         * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
4601         Nlist
4602         * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
4603
4604 2011-08-02  Robert Dewar  <dewar@adacore.com>
4605
4606         * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
4607         alpha order).
4608         * opt.ads: Minor comment change.
4609         * sem_ch12.adb: Minor code reorganization.
4610
4611 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
4612
4613         * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
4614         subtype's list of rep items to the list on the full subtype in the case
4615         where the lists are the same.
4616
4617 2011-08-02  Geert Bosch  <bosch@adacore.com>
4618
4619         * switch-c.adb (Free): New deallocation procedure to avoid implicitly
4620         using the one from System.Strings, which also deallocates all strings.
4621
4622 2011-08-02  Geert Bosch  <bosch@adacore.com>
4623
4624         * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
4625         function.
4626         * gcc-interface/Make-lang.in: Update dependencies.
4627
4628 2011-08-02  Olivier Hainque  <hainque@adacore.com>
4629
4630         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
4631         end_locus.
4632
4633 2011-08-02  Javier Miranda  <miranda@adacore.com>
4634
4635         * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
4636         associated with anonymous access to subprograms.
4637
4638 2011-08-02  Geert Bosch  <bosch@adacore.com>
4639
4640         * opt.ads
4641         (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
4642         (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
4643         * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
4644         (Add_Symbol_Definition): Move to switch-c.adb
4645         (Process_Command_Line_Symbol_Definitions): Adjust references to above.
4646         * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
4647         (Add_Symbol_Definition): Move to switch-c.adb.
4648         * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
4649         * sem_warn.adb
4650         (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
4651         Move to warnsw.adb.
4652         * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
4653         Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
4654         Move to warnsw.adb.
4655         * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
4656         (Add_Symbol_Definition): Moved from Prepcomp.
4657         * switch-c.ads: Update copyright notice. Use String_List instead of
4658         Argument_List, removing dependency on System.OS_Lib.
4659
4660 2011-08-02  Yannick Moy  <moy@adacore.com>
4661
4662         * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
4663         mode on initialization expression which does not respect SPARK
4664         restrictions.
4665         * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
4666         if the tree referenced by its argument represents an initialization
4667         expression in SPARK, suitable for initializing an object in an object
4668         declaration.
4669
4670 2011-08-02  Javier Miranda  <miranda@adacore.com>
4671
4672         * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
4673         internally generated access to subprogram with its associated protected
4674         subprogram type.
4675         * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
4676
4677 2011-08-02  Geert Bosch  <bosch@adacore.com>
4678
4679         * cstand.adb (Register_Float_Type): Print information about type to
4680         register, if the Debug_Flag_Dot_B is set.
4681         * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
4682         * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
4683         * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
4684         with a requested precision of more than Max_Digits digits and no more
4685         than Max_Base_Digits digits, if a range specification is present and the
4686         Predefined_Float_Types list has a suitable type to derive from.
4687         * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
4688         case of type completion with pragma Import
4689         * sem_prag.adb
4690         (Process_Import_Predefined_Type): Processing to complete a type
4691         with pragma Import. Currently supports floating point types only.
4692         (Set_Convention_From_Pragma): Do nothing without underlying type.
4693         (Process_Convention): Guard against absence of underlying type,
4694         which may happen when importing incomplete types.
4695         (Process_Import_Or_Interface): Handle case of importing predefined
4696         types. Tweak error message.
4697
4698 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
4699
4700         * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
4701         functions to previous change.  Reorganize code slightly.
4702
4703 2011-08-02  Geert Bosch  <bosch@adacore.com>
4704
4705         * back_end.ads (Register_Type_Proc): New call back procedure type for
4706         allowing the back end to provide information about available types.
4707         (Register_Back_End_Types): New procedure to register back end types.
4708         * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
4709         available types.
4710         * cstand.adb (Back_End_Float_Types): New list for floating point types
4711         supported by the back end.
4712         (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
4713         (Copy_Float_Type): New procedure to make new copies of predefined types.
4714         (Register_Float_Type): New call back procedure to populate the BEFT list
4715         (Find_Back_End_Float_Type): New procedure to find a BEFT by name
4716         (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
4717         (Create_Float_Types): New procedure to create entities for floating
4718         point types predefined in Standard, and put these and any remaining
4719         BEFTs on the Predefined_Float_Types list.
4720         * stand.ads (Predefined_Float_Types): New list for predefined floating
4721         point types that do not have declarations in package Standard.
4722
4723 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
4724
4725         * inline.adb (Get_Code_Unit_Entity): New local function.  Returns the
4726         entity node for the unit containing the parameter.
4727         (Add_Inlined_Body): Use it to find the unit containing the subprogram.
4728         (Add_Inlined_Subprogram): Likewise.
4729         * gcc-interface/Make-lang.in: Update dependencies.
4730
4731 2011-08-02  Thomas Quinot  <quinot@adacore.com>
4732
4733         * s-stusta.adb (Print): Make sure Pos is always initialized to a
4734         suitable value.
4735
4736 2011-08-02  Geert Bosch  <bosch@adacore.com>
4737
4738         * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
4739
4740 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
4741
4742         * sem_type.adb (Covers): Move trivial case to the top and reuse the
4743         computed value of Base_Type.
4744
4745 2011-08-02  Yannick Moy  <moy@adacore.com>
4746
4747         * restrict.adb (Check_Restriction): issue an error for any use of
4748         class-wide, even if the No_Dispatch restriction is not set.
4749         * sem_aggr.adb: Correct typos in comments and messages in formal mode
4750         * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
4751         when completing a private extension, the type named in the private part
4752         is not the same as that named in the visible part.
4753         * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
4754         of an inherited primitive operations of a tagged type or type extension
4755         that returns the tagged type.
4756         * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
4757         function which returns True for an implicit operation inherited by the
4758         derived type declaration for the argument type.
4759         (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
4760         order.
4761
4762 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
4763
4764         * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
4765         Process_Bounds, to perform analysis with expansion of a range or an
4766         expression that is the iteration scheme for a loop.
4767         (Analyze_Iterator_Specification): If domain of iteration is given by a
4768         function call with a controlled result, as is the case if call returns
4769         a predefined container, ensure that finalization actions are properly
4770         generated.
4771         * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
4772
4773 2011-08-02  Javier Miranda  <miranda@adacore.com>
4774
4775         * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
4776         * gcc-interface/Make-lang.in: Update dependencies.
4777
4778 2011-08-02  Javier Miranda  <miranda@adacore.com>
4779
4780         * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
4781         determine if the analysis is performed using N or Original_Node (N).
4782         * exp_util.adb (Side_Effect_Free): Code cleanup since the new
4783         functionality of routine Is_Variable avoids code duplication.
4784         * checks.adb (Determine_Range): Handle temporaries generated by
4785         Remove_Side_Effects.
4786
4787 2011-08-02  Javier Miranda  <miranda@adacore.com>
4788
4789         * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
4790         expansion of the condition. Required since the previous analysis was
4791         done with expansion disabled (see Resolve_Quantified_Expression) and
4792         hence checks were not inserted and record comparisons have not been
4793         expanded.
4794
4795 2011-08-02  Ed Falis  <falis@adacore.com>
4796
4797         * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
4798         Update header.
4799
4800 2011-08-02  Bob Duff  <duff@adacore.com>
4801
4802         * opt.ads: Minor comment fix.
4803
4804 2011-08-02  Bob Duff  <duff@adacore.com>
4805
4806         * sem_ch12.adb (Analyze_Package_Instantiation,
4807         Analyze_Subprogram_Instantiation): Turn off style checking while
4808         analyzing an instance. Whatever style checks that apply to the generic
4809         unit should apply, so it makes no sense to apply them in an instance.
4810         This was causing trouble when compiling an instance of a runtime
4811         unit that violates the -gnatyO switch.
4812         * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
4813         one of the two case statements, causing spurious errors.
4814
4815 2011-08-02  Robert Dewar  <dewar@adacore.com>
4816
4817         * uname.adb: Minor reformatting.
4818         * gnatcmd.adb: Minor reformatting.
4819         * exp_attr.adb: Minor reformatting.
4820
4821 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
4822
4823         * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
4824         No_Dispatching_Calls, do not look for the Assign primitive, because
4825         predefined primitives are not created in this case.
4826
4827 2011-08-02  Bob Duff  <duff@adacore.com>
4828
4829         * stylesw.ads: Minor comment fixes.
4830
4831 2011-08-02  Robert Dewar  <dewar@adacore.com>
4832
4833         * freeze.adb (Add_To_Result): New procedure.
4834
4835 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
4836
4837         * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
4838         time, if the specific run-time routines for handling streams of strings
4839         are not available, use the default mechanism.
4840
4841 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
4842
4843         * s-regpat.ads: Fix typo.
4844
4845 2011-08-02  Vincent Celier  <celier@adacore.com>
4846
4847         * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
4848         not null, call it to create the in memory config project file without
4849         parsing an existing default config project file.
4850
4851 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
4852
4853         * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
4854
4855 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
4856
4857         * sem_elim.adb: an abstract subprogram does not need an eliminate
4858         pragma for its descendant to be eliminable.
4859
4860 2011-08-02  Ed Falis  <falis@adacore.com>
4861
4862         * init.c: revert to handling before previous checkin for VxWorks
4863         * s-intman-vxworks.adb: delete unnecessary declarations related to
4864         using Ada interrupt facilities for handling signals.
4865         Delete Initialize_Interrupts. Use __gnat_install_handler instead.
4866         * s-intman-vxworks.ads: Import __gnat_install_handler as
4867         Initialize_Interrupts.
4868         * s-taprop-vxworks.adb: Delete Signal_Mask.
4869         (Abort_Handler): change construction of mask to unblock exception
4870         signals.
4871
4872 2011-08-02  Jerome Guitton  <guitton@adacore.com>
4873
4874         * a-except-2005.adb (Raise_From_Signal_Handler): Call
4875         Debug_Raise_Exception before propagation starts.
4876
4877 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
4878
4879         * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
4880         to Restriction_Check_Required.
4881         * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
4882         * sem_res.adb (Resolve_Call): Likewise.
4883         * sem_attr.adb (Check_Stream_Attribute): Likewise.
4884
4885 2011-08-02  Bob Duff  <duff@adacore.com>
4886
4887         * stylesw.ads: Update comment.
4888         * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
4889         * errout.ads: Remove obsolete comment.
4890
4891 2011-08-02  Javier Miranda  <miranda@adacore.com>
4892
4893         * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
4894         (Set_Is_Safe_To_Reevaluate): new procedure.
4895         * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
4896         assignment is allowed on safe-to-reevaluate variables.
4897         (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
4898         temporary created to remove side effects in expressions that use
4899         the secondary stack as safe-to-reevaluate.
4900         * exp_util.adb (Side_Effect_Free): Add missing code to handle well
4901         variables that are not true constants.
4902
4903 2011-08-02  Robert Dewar  <dewar@adacore.com>
4904
4905         * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
4906         sem_res.adb, sem_ch6.adb: Minor reformatting.
4907
4908 2011-08-02  Jerome Guitton  <guitton@adacore.com>
4909
4910         * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
4911
4912 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
4913
4914         * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
4915         not set Overridden_Operation if subprogram is an initialization
4916         procedure.
4917
4918 2011-08-02  Yannick Moy  <moy@adacore.com>
4919
4920         * par-ch6.adb: Correct obsolete name in comments
4921         * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
4922         which takes two message arguments (existing function takes one), with
4923         second message used for continuation.
4924         * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
4925         block statements that originate from a source block statement, not
4926         generated block statements
4927         * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
4928         symmetry with procedure case
4929         * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
4930         function to issue an error in formal mode if a package specification
4931         contains more than one tagged type or type extension.
4932         * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
4933         parameters matching formals of tagged types are objects (or ancestor
4934         type conversions of objects), not general expressions. Issue an error
4935         on view conversions that are not involving ancestor conversion of an
4936         extended type.
4937         (Resolve_Type_Conversion): in formal mode, issue an error on the
4938         operand of an ancestor type conversion which is not an object
4939         * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
4940         procedure so that it works also for actuals of function calls
4941         (Is_Actual_Tagged_Parameter): new function which determines if its
4942         argument is an actual parameter of a formal of tagged type in a
4943         subprogram call
4944         (Is_SPARK_Object_Reference): new function which determines if the tree
4945         referenced by its argument represents an object in SPARK
4946
4947 2011-08-02  Robert Dewar  <dewar@adacore.com>
4948
4949         * sem_ch3.adb: Minor reformatting
4950         Minor comment addition
4951         Minor error msg text change
4952
4953 2011-08-02  Javier Miranda  <miranda@adacore.com>
4954
4955         * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
4956         function. Used to be more precise when we generate a variable plus one
4957         assignment to remove side effects in the evaluation of the Bound
4958         expressions.
4959         (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
4960         of the bound expression to force its re-analysis and thus expand the
4961         associated transient scope (if required). Code cleanup replacing the
4962         previous code that declared the constant entity by an invocation to
4963         routine Force_Evaluation which centralizes this work in the frontend.
4964
4965 2011-08-02  Robert Dewar  <dewar@adacore.com>
4966
4967         * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
4968         (Base_Type): Now uses improved Is_Base_Type function
4969         * einfo.ads (Base_Type): Inline this function
4970
4971 2011-08-02  Robert Dewar  <dewar@adacore.com>
4972
4973         * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
4974         (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
4975
4976 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
4977
4978         * gcc-interface/Make-lang.in: Update dependencies.
4979         * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
4980         targets.
4981
4982 2011-08-02  Yannick Moy  <moy@adacore.com>
4983
4984         * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
4985         non-simple expression used in delta constraint
4986         (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
4987         index constraint which is not a subtype mark
4988         * par.adb: With and use Restrict
4989         * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
4990         mode on component type which is not a subtype mark and default
4991         expression on component
4992         (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
4993         of string which does not have a lower index bound equal to 1
4994         (Array_Type_Declaration): issue an error in formal mode on index or
4995         component type which is not a subtype mark, and on aliased keyword on
4996         component
4997         (Derived_Type_Declaration): issue an error in formal mode on interface,
4998         limited or abstract type
4999         (Record_Type_Declaration): issue an error in formal mode on interface
5000         (Record_Type_Definition): issue an error in formal mode on tagged types
5001         and type extensions not declared in the specification of a library unit
5002         package; on null non-tagged record; on variant part
5003
5004 2011-08-02  Vincent Celier  <celier@adacore.com>
5005
5006         * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
5007         not declared for qualified library project when Library_Name is not
5008         declared, but Library_Dir is.
5009
5010 2011-08-02  Robert Dewar  <dewar@adacore.com>
5011
5012         * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
5013         pragmas (affects aspects [Component_]Default_Value
5014         (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
5015         component type for the resolution
5016
5017 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
5018
5019         * einfo.adb (Base_Type): Tune implementation for speed.
5020
5021 2011-08-02  Robert Dewar  <dewar@adacore.com>
5022
5023         * freeze.adb: Minor reformatting.
5024
5025 2011-08-02  Thomas Quinot  <quinot@adacore.com>
5026
5027         * scos.ads: Update comments.
5028
5029 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5030
5031         * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
5032         base type, because the parent may be a subtype of a private type whose
5033         convention is established in a private part.
5034
5035 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
5036
5037         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
5038         statement in a block when the expansion of the return expression has
5039         created a finalization chain.
5040         * freeze.adb (Freeze_Expression): Alphabetize all choices associated
5041         with the parent node.
5042         Add N_Extended_Return_Statement to handle the case where a transient
5043         object declaration appears in the Return_Object_Declarations list of
5044         an extended return statement.
5045
5046 2011-08-02  Matthew Gingell  <gingell@adacore.com>
5047
5048         * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
5049         unused parameter 'name'.
5050
5051 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5052
5053         * sem_elim.adb (Set_Eliminated): If the overridden operation is an
5054         inherited operation, check whether its alias, which is the source
5055         operastion that it renames, has been marked eliminated.
5056
5057 2011-08-02  Javier Miranda  <miranda@adacore.com>
5058
5059         * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
5060         in-mode parameter whose type is an access type since it can be used to
5061         modify its designated object. Enforce code that handles as safe an
5062         access type that is not access-to-constant but it is the result of a
5063         previous removal of side-effects.
5064         (Remove_Side_Effects): Minor code reorganization of cases which require
5065         no action. Done to incorporate documentation on new cases uncovered
5066         working in this ticket: no action needed if this routine was invoked
5067         too early and the nodes are not yet decorated.
5068         * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
5069         to routine Remove_Side_Effects by calls to Force_Evaluation since they
5070         were issued with actuals that are implicitly provided by
5071         Force_Evaluation.
5072
5073 2011-08-02  Robert Dewar  <dewar@adacore.com>
5074
5075         * sem_ch3.adb, sem_res.adb: Minor reformatting.
5076
5077 2011-08-02  Yannick Moy  <moy@adacore.com>
5078
5079         * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
5080         to issue an error in formal mode on attribute not supported in this mode
5081         (Analyze_Attribute): issue errors on standard attributes not supported
5082         in formal mode.
5083         * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
5084         comment, and issue error in formal mode on modulus which is not a power
5085         of 2.
5086         (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
5087         range.
5088         * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
5089         subtype mark.
5090         * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
5091         operator on modular type (except 'not').
5092
5093 2011-08-02  Robert Dewar  <dewar@adacore.com>
5094
5095         * gnat_rm.texi: Minor reformatting.
5096
5097 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
5098
5099         * s-osinte-linux.ads: Minor comment update and reformatting.
5100         * i-cexten.ads: Make this unit pure, as for its parent.
5101         Will allow its usage in more contexts if needed.
5102
5103 2011-08-02  Robert Dewar  <dewar@adacore.com>
5104
5105         * s-utf_32.ads: Minor comment fix.
5106
5107 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5108
5109         * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
5110         operation of a tagged synchronized type, handle the case where the
5111         controlling argument is overloaded.
5112
5113 2011-08-02  Yannick Moy  <moy@adacore.com>
5114
5115         * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
5116         Replace pragma SPARK_95 with pragma Restrictions (SPARK)
5117         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
5118         SPARK mode and formal verification mode on processing SPARK restriction
5119         * s-rident.ads (Restriction_Id): add SPARK restriction in those not
5120         requiring consistency checking.
5121
5122 2011-08-02  Robert Dewar  <dewar@adacore.com>
5123
5124         * sem_res.adb: Minor reformatting.
5125
5126 2011-08-02  Robert Dewar  <dewar@adacore.com>
5127
5128         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
5129         a-cforse.ads: Remove unneeded with of Ada.Containers
5130         Remove commented out pragma Inline's
5131         Move specifications of new subprograms to the actual specs
5132
5133 2011-08-02  Yannick Moy  <moy@adacore.com>
5134
5135         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
5136         a-cforse.ads: Update comments.
5137
5138 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5139
5140         * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
5141
5142 2011-08-02  Robert Dewar  <dewar@adacore.com>
5143
5144         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
5145         a-cforse.ads, a-cofove.ads: Minor reformatting.
5146
5147 2011-08-02  Claire Dross  <dross@adacore.com>
5148
5149         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
5150         a-cofove.ads: Add comments.
5151
5152 2011-08-02  Yannick Moy  <moy@adacore.com>
5153
5154         * gnat_rm.texi: Document formal containers.
5155
5156 2011-08-02  Emmanuel Briot  <briot@adacore.com>
5157
5158         * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
5159         are empty sections.
5160
5161 2011-08-02  Robert Dewar  <dewar@adacore.com>
5162
5163         * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
5164         reformatting.
5165
5166 2011-08-02  Robert Dewar  <dewar@adacore.com>
5167
5168         * aspects.adb: New aspects Default_Value and Default_Component_Value
5169         New format of Aspect_Names table checks for omitted entries
5170         * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
5171         handling of boolean aspects for derived types.
5172         New aspects Default_Value and Default_Component_Value
5173         New format of Aspect_Names table checks for omitted entries
5174         * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
5175         (Has_Default_Value): New flag
5176         (Has_Default_Component_Value): New flag
5177         (Has_Default_Value): New flag
5178         * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
5179         table.
5180         * par-prag.adb: New pragmas Default_Value and Default_Component_Value
5181         * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
5182         Default_Value and Default_Component_Value
5183         * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
5184         New aspects Default_Value and Default_Component_Value
5185         * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
5186         * sprint.adb: Print N_Aspect_Specification node when called from gdb
5187
5188 2011-08-02  Vincent Celier  <celier@adacore.com>
5189
5190         * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
5191         inherit library kind.
5192
5193 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5194
5195         * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
5196         Minor reformatting.
5197
5198 2011-08-02  Robert Dewar  <dewar@adacore.com>
5199
5200         * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
5201
5202 2011-08-02  Yannick Moy  <moy@adacore.com>
5203
5204         * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
5205
5206 2011-08-02  Robert Dewar  <dewar@adacore.com>
5207
5208         * impunit.adb: Add comment.
5209
5210 2011-08-02  Yannick Moy  <moy@adacore.com>
5211
5212         * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
5213         qualification of aggregates in formal mode
5214         (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
5215         another aggregate
5216         (Resolve_Aggregate): complete the test that an aggregate is adequately
5217         qualified in formal mode
5218
5219 2011-08-02  Pascal Obry  <obry@adacore.com>
5220
5221         * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
5222         * mlib-prj.adb: Supress warning when compiling binder generated file.
5223         (Build_Library): Supress all warnings when compiling the binder
5224         generated file.
5225
5226 2011-08-02  Yannick Moy  <moy@adacore.com>
5227
5228         * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
5229         from here...
5230         * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
5231         * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
5232         Add with/use clauses to make Check_Formal_Restriction visible
5233
5234 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5235
5236         * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
5237         in-parameters when type of the generic formal is private in the generic
5238         spec and non-private in the body.
5239
5240 2011-08-02  Claire Dross  <dross@adacore.com>
5241
5242         * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
5243         a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
5244         a-cofove.adb, a-cofove.ads: New files implementing formal containers.
5245         * impunit.adb, Makefile.rtl: Take new files into account.
5246
5247 2011-08-02  Robert Dewar  <dewar@adacore.com>
5248
5249         * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
5250         sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
5251
5252 2011-08-02  Yannick Moy  <moy@adacore.com>
5253
5254         * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
5255         formal mode
5256         * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
5257         matching static array bounds, taking into account the special case of
5258         string literals
5259         * sem_ch3.adb: Typo in comment.
5260
5261 2011-08-02  Yannick Moy  <moy@adacore.com>
5262
5263         * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
5264         which issues an error in formal mode if its argument node is originally
5265         from source
5266         * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
5267         has a discriminant specification so that it does not include the case
5268         of derived types
5269         (Derived_Type_Declaration): move here the test that a derived type has a
5270         discriminant specification
5271         * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
5272         first element of a component association before accessing its choices
5273         (presence of component association is not enough)
5274         * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
5275         declaration is a library item before accessing the next element in a
5276         list, as library items are not member of lists
5277         * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
5278         sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
5279         Check_Formal_Restriction whenever possible.
5280
5281 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5282
5283         * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
5284         reference when needed.
5285
5286 2011-08-02  Bob Duff  <duff@adacore.com>
5287
5288         * gnat_ugn.texi: Fix typo.
5289
5290 2011-08-02  Vincent Celier  <celier@adacore.com>
5291
5292         * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
5293         archive file name. Do not use the full path name of archives for Open
5294         VMS.
5295
5296 2011-08-02  Robert Dewar  <dewar@adacore.com>
5297
5298         * sem_ch12.adb, sem_ch11.adb: New calling sequence for
5299         Analyze_Aspect_Specifications
5300         * sem_ch13.adb
5301         (Analyze_Aspect_Specifications): New handling for boolean aspects
5302         * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
5303         * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
5304         sequence for Analyze_Aspect_Specifications
5305         * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
5306         * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
5307
5308 2011-08-02  Robert Dewar  <dewar@adacore.com>
5309
5310         * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
5311         aspects, since these no longer exist.
5312
5313 2011-08-02  Robert Dewar  <dewar@adacore.com>
5314
5315         * par-ch13.adb (Aspect_Specifications_Present): Always return false on
5316         semicolon, do not try to see if there are aspects following it.
5317         * par-ch3.adb (P_Declarative_Items): Better message for unexpected
5318         aspect spec.
5319
5320 2011-08-02  Robert Dewar  <dewar@adacore.com>
5321
5322         * sem_ch8.adb, aspects.ads: Minor reformatting.
5323
5324 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
5325
5326         * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
5327         * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
5328         extracted from...
5329         (Analyze_Aspect_Specifications): ...here.  Call above procedure.
5330
5331 2011-08-02  Yannick Moy  <moy@adacore.com>
5332
5333         * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
5334         mode on subprogram declaration outside of package specification, unless
5335         it is followed by a pragma Import
5336         * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
5337         Access_Type_Declaration): issue error in formal mode on access type
5338         (Analyze_Incomplete_Type_Decl): issue error in formal mode on
5339         incomplete type
5340         (Analyze_Object_Declaration): issue error in formal mode on object
5341         declaration which does not respect SPARK restrictions
5342         (Analyze_Subtype_Declaration): issue error in formal mode on subtype
5343         declaration which does not respect SPARK restrictions
5344         (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
5345         error in formal mode on digits or delta constraint
5346         (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
5347         decimal fixed point type
5348         (Derived_Type_Declaration): issue error in formal mode on derived type
5349         other than type extensions of tagged record types
5350         * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
5351         with check on access definition
5352         * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
5353         mode on protected definition.
5354         (Analyze_Task_Definition): issue error in formal mode on task definition
5355
5356 2011-08-02  Robert Dewar  <dewar@adacore.com>
5357
5358         * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
5359
5360 2011-08-02  Javier Miranda  <miranda@adacore.com>
5361
5362         * sem_ch6.adb (Can_Override_Operator): New function.
5363         (Verify_Overriding_Indicator): Add missing code to check overriding
5364         indicator in operators. Fixes regression.
5365         (Check_Overriding_Indicator): Minor reformating after replacing the
5366         code that evaluates if the subprogram can override an operator by
5367         invocations to the above new function.
5368         * einfo.adb
5369         (Write_Field26_Name): Add missing code to ensure that, following
5370         the documentation in einfo.ads, this field is not shown as attribute
5371         "Static_Initialization" on non-dispatching functions.
5372
5373 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
5374
5375         * sem_res.adb (Resolve_Call): A call to
5376         Ada.Real_Time.Timing_Events.Set_Handler violates restriction
5377         No_Relative_Delay (AI-0211) only when it sets a relative timing event,
5378         i.e., when the second parameter is of type Time_Span.
5379
5380 2011-08-02  Vincent Celier  <celier@adacore.com>
5381
5382         * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
5383         with an archive instead of -L<library dir> -l<library name>.
5384
5385 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5386
5387         * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
5388         mark the base types In_Use in addition to making the operations
5389         use_visible.
5390
5391 2011-08-02  Ed Falis  <falis@adacore.com>
5392
5393         * init.c: add and setup __gnat_signal_mask for the exception signals
5394         * s-inmaop-vxworks.adb: new file.
5395         * s-intman-vxworks.adb: remove unnecessary initializations and
5396         simplify remaining
5397         * s-intman-vxworks.ads: remove unnecessary variable
5398         * s-taprop-vxworks.adb: simplify signal initialization
5399
5400 2011-08-02  Robert Dewar  <dewar@adacore.com>
5401
5402         * sem_ch8.adb: Minor code reorganization, comment updates.
5403
5404 2011-08-02  Robert Dewar  <dewar@adacore.com>
5405
5406         * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
5407         * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
5408         here from Sem_Res.
5409         (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
5410         (Matching_Static_Array_Bounds): Moved here from Sem_Res
5411
5412 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5413
5414         * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
5415         * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
5416         * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
5417         use_type_clauses, to handle more efficiently use_type and use_all_type
5418         constructs.
5419         * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
5420         Ada2012 Use_All_Type clause.
5421         (Use_Class_Wide_Operations): new procedure.
5422
5423 2011-08-02  Robert Dewar  <dewar@adacore.com>
5424
5425         * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
5426         sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
5427         expression to expression function.
5428
5429 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5430
5431         * sem_ch4.adb: transform simple Ada2012 membership into equality only
5432         if types are compatible.
5433
5434 2011-08-02  Yannick Moy  <moy@adacore.com>
5435
5436         * sem_res.adb (Matching_Static_Array_Bounds): new function which
5437         returns True if its argument array types have same dimension and same
5438         static bounds at each index.
5439         (Resolve_Actuals): issue an error in formal mode on actuals passed as
5440         OUT or IN OUT paramaters which are not view conversions in SPARK.
5441         (Resolve_Arithmetic_Op): issue an error in formal mode on
5442         multiplication or division with operands of fixed point types which are
5443         not qualified or explicitly converted.
5444         (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
5445         Boolean or array type (except String) operands.
5446         (Resolve_Equality_Op): issue an error in formal mode on equality
5447         operators for array types other than String with non-matching static
5448         bounds.
5449         (Resolve_Logical_Op): issue an error in formal mode on logical operators
5450         for array types with non-matching static bounds. Factorize the code in
5451         Matching_Static_Array_Bounds.
5452         (Resolve_Qualified_Expression): issue an error in formal mode on
5453         qualified expressions for array types with non-matching static bounds.
5454         (Resolve_Type_Conversion): issue an error in formal mode on type
5455         conversion for array types with non-matching static bounds
5456
5457 2011-08-02  Robert Dewar  <dewar@adacore.com>
5458
5459         * par-ch10.adb: Minor code reorganization (use Nkind_In).
5460
5461 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5462
5463         * par-ch9.adb: save location of entry for proper error message.
5464
5465 2011-08-02  Javier Miranda  <miranda@adacore.com>
5466
5467         * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
5468         (Use_Full_View) which permits this routine to climb through the
5469         ancestors using the full-view of private parents.
5470         * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
5471         Use_Full_View to true in calls to Is_Ancestor.
5472         * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
5473         true in call to Is_Ancestor.
5474         * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
5475         Use_Full_View to true in call to Is_Ancestor.
5476         * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
5477         call to Is_Ancestor.
5478         * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
5479         Use_Full_View to true in calls to Is_Ancestor.
5480         * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
5481         Make_Select_Specific_Data_Table, Register_Primitive,
5482         Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
5483         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
5484         to true in call to Is_Ancestor.
5485         * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
5486         Use_Full_View to true in calls to Is_Ancestor.
5487         * exp_cg.adb
5488         (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
5489         (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
5490
5491 2011-08-02  Robert Dewar  <dewar@adacore.com>
5492
5493         * gnat_rm.texi: Minor reformatting.
5494         * sem_prag.adb: Minor reformatting.
5495
5496 2011-08-02  Tristan Gingold  <gingold@adacore.com>
5497
5498         * vms_data.ads: Add VMS qualifier for -gnateP.
5499
5500 2011-08-02  Robert Dewar  <dewar@adacore.com>
5501
5502         * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
5503         * par-ch7.adb (P_Package): Proper placement of aspects for package
5504         decl/instantiation.
5505         * par-endh.adb (Check_End): Ad Is_Sloc parameter
5506         (End_Statements): Add Is_Sloc parameterr
5507         * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
5508         (Check_End): Ad Is_Sloc parameter
5509         (End_Statements): Add Is_Sloc parameterr
5510
5511 2011-08-02  Vincent Celier  <celier@adacore.com>
5512
5513         * ug_words: Add VMS qualifier equivalent to -gnateP:
5514         /SYMBOL_PREPROCESSING.
5515
5516 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
5517
5518         * gnat-style.texi: For hexadecimal numeric literals the typical
5519         grouping of digits is 4 to represent 2 bytes.
5520         A procedure spec which is split into several lines is indented two
5521         characters.
5522
5523 2011-08-02  Yannick Moy  <moy@adacore.com>
5524
5525         * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
5526         * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
5527         (Resolve_Aggregate): issue errors in formal modes when aggregate is not
5528         properly qualified
5529         (Resolve_Array_Aggregate): issue errors in formal modes on non-static
5530         choice in array aggregate
5531         (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
5532         mark as ancestor
5533         (Resolve_Record_Aggregate): issue errors in formal modes on mixed
5534         positional and named aggregate for record, or others in record
5535         aggregate, or multiple choice in record aggregate
5536         * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
5537         array operands to logical operations AND, OR and XOR do not have the
5538         same static lower and higher bounds
5539         * sem_ch5.adb, sinfo.ads: Correct typos in comments
5540
5541 2011-08-01  Robert Dewar  <dewar@adacore.com>
5542
5543         * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
5544         Replaces Last_Source_Node_In_Sequence.
5545         * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
5546         * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
5547         parens and blank in string (this was inconsistently implemented).
5548         * errout.ads
5549         (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
5550         blank in string (this was inconsistently implemented).
5551         * gnat1drv.adb
5552         (Set_Global_Switches): Set formal mode switches appropriately
5553         * opt.ads, opt.adb: Formal mode is now global switches, more consistent
5554         * par-prag.adb
5555         (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
5556         call Set_Error_Msg_Lang to set "spark" as language name.
5557         * par.adb: Remove unnecessary call to set formal language for errout
5558         * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
5559         appropriately and call Set_Error_Msg_Lang to set "spark" as language
5560         name.
5561         * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
5562         calls to it, moved after resolution so that types are known
5563         * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
5564         result of concatenation is not of type String
5565         (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
5566         concatenation is not properly restricted
5567         * gnat_rm.texi: Add doc on pragma Spark_95.
5568         * gcc-interface/Makefile.in: Remove obsolete target pairs for
5569         Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
5570         * gcc-interface/Make-lang.in: Update dependencies.
5571
5572 2011-08-01  Javier Miranda  <miranda@adacore.com>
5573
5574         * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
5575         condition that detects if the overridden operation must replace an
5576         existing entity.
5577
5578 2011-08-01  Javier Miranda  <miranda@adacore.com>
5579
5580         * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
5581         code declarations inserted by Insert_Actions in each alternative of the
5582         N_Case_Expression node.
5583
5584 2011-08-01  Robert Dewar  <dewar@adacore.com>
5585
5586         * sem_ch6.adb: Minor code reorganization.
5587         * sem_util.adb: Minor reformatting.
5588
5589 2011-08-01  Pascal Obry  <obry@adacore.com>
5590
5591         * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
5592         * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
5593
5594 2011-08-01  Yannick Moy  <moy@adacore.com>
5595
5596         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
5597         literal or operator symbol which is prefixed
5598         * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
5599         mode on access attributes.
5600         * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
5601         that concatenation operands are properly restricted in formal mode
5602         (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
5603         Analyze_Concatenation_Operand. Issue an error in formal mode if the
5604         result of the concatenation has a type different from String.
5605         (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
5606         Analyze_Quantified_Expression, Analyze_Slice,
5607         Analyze_Null): issue an error in formal mode on unsupported constructs
5608         * sem_ch5.adb
5609         (Analyze_Block_Statement): only issue error on source block statement
5610         * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
5611         function which returns the last node in a list of nodes for which
5612         Comes_From_Source returns True, if any
5613         * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
5614         Last_Source_Node_In_Sequence
5615         * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
5616         Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
5617         mode on unsupported constructs
5618         * sem_ch9.adb Do not return after issuing error in formal mode, as the
5619         rest of the actions may be needed later on since the error is marked as
5620         not serious.
5621         * sinfo.ads: Typos in comments.
5622
5623 2011-08-01  Pascal Obry  <obry@adacore.com>
5624
5625         * projects.texi: Minor editing.
5626
5627 2011-08-01  Yannick Moy  <moy@adacore.com>
5628
5629         * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
5630         insertion character ~~
5631         * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
5632         (Set_Error_Msg_Lang): new procedure which fixes the language for use
5633         with insertion character ~~
5634         (Set_Msg_Text): treat insertion character ~~
5635         * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
5636         sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
5637         Formal_Error_Msg_... procedures by equivalent Error_Msg_...
5638         procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
5639         errors related to the formal language restriction not serious
5640         (insertion character |).
5641         * par.adb (Par): set formal language for error messages if needed
5642         * sem_ch6.adb (Check_Missing_Return): take into account possible
5643         generated statements at the end of the function
5644         * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
5645         enumeration value to define a new pragma SPARK_95
5646         * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
5647         SPARK_Version): new type and variables to store the SPARK version
5648         (none by default).
5649         (SPARK_Mode): return True when SPARK_Version is set
5650         * par-prag.adb: Correct indentation
5651         (Prag): take Pragma_SPARK_95 into account
5652         * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
5653         into account.
5654
5655 2011-08-01  Robert Dewar  <dewar@adacore.com>
5656
5657         * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
5658         sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
5659         sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
5660
5661 2011-08-01  Pascal Obry  <obry@adacore.com>
5662
5663         * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
5664         Target_Name to Get_Path call.
5665         (Parse_Single_Project): Likewise.
5666         (Post_Parse_Context_Clause): Likewise.
5667         * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
5668         Call Initialise_Project_Path with the proper Target_Name.
5669         (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
5670         search path.
5671         (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
5672         with the proper Target_Name.
5673         * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
5674         Part.Parse routine.
5675         (Parse_Project_And_Apply_Config): Likewise.
5676         * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
5677         This is fine as this part of the code is supporting only native
5678         compilation.
5679         * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
5680         is fine as this part of the code is supporting only native compilation.
5681
5682 2011-08-01  Yannick Moy  <moy@adacore.com>
5683
5684         * sem_util.adb (Enter_Name): issue error in formal mode on declaration
5685         of homonym, unless the homonym is one of the cases allowed in SPARK
5686         * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
5687         package declaration occurring after a body.
5688
5689 2011-08-01  Robert Dewar  <dewar@adacore.com>
5690
5691         * checks.adb, exp_ch4.adb: Minor reformatting.
5692
5693 2011-08-01  Javier Miranda  <miranda@adacore.com>
5694
5695         * einfo.ads (Access_Disp_Table): Fix documentation.
5696         (Dispatch_Table_Wrappers): Fix documentation.
5697
5698 2011-08-01  Pascal Obry  <obry@adacore.com>
5699
5700         * prj-env.adb, prj-env.ads: Minor reformatting.
5701
5702 2011-08-01  Yannick Moy  <moy@adacore.com>
5703
5704         * sem_util.ads, sem_util.adb, par.adb, par_util.adb
5705         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
5706         procedures out of these packages.
5707         * errout.ads, errout.adb
5708         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
5709         procedures in of this package
5710         (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
5711         * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
5712         on misplaced later vs initial declarations, like in Ada 83
5713         * sem_attr.adb (Processing for Analyze_Attribute): issue error in
5714         formal mode on attribute of private type whose full type declaration
5715         is not visible
5716         * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
5717         package declaration inside a package specification
5718         (Analyze_Full_Type_Declaration): issue error in formal mode on
5719         controlled type or discriminant type
5720         * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
5721         user-defined operator means that it should come from the source
5722         (New_Overloaded_Entity): issue error in formal mode on overloaded
5723         entity.
5724         * sem_ch6.ads, sem_ch13.ads: typos in comments.
5725
5726 2011-08-01  Thomas Quinot  <quinot@adacore.com>
5727
5728         * atree.adb: Minor reformatting.
5729         * checks.adb: Minor reformatting.
5730
5731 2011-08-01  Vincent Celier  <celier@adacore.com>
5732
5733         * s-parame-vms-ia64.ads: Fix typo in comment
5734         Minor reformatting
5735         * s-parame-vms-restrict.ads: Removed, unused.
5736
5737 2011-08-01  Javier Miranda  <miranda@adacore.com>
5738
5739         * exp_ch3.adb
5740         (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
5741         * sem_ch3.adb
5742         (Constrain_Index): Remove side effects in the evaluation of the bounds.
5743         * sem_ch3.ads, sem_ch3.adb
5744         (Is_Constant_Bound): New extended version of the subprogram that was
5745         previously located inside function Exp_Ch3.Is_Variable_Size_Array.
5746         Moved here since it is shared by routines of sem_ch3 and exp_ch3.
5747         * sem_aux.ads (Constant_Value): Fix typo in comment.
5748         * checks.adb (Generate_Index_Checks): New implementation which, for
5749         array objects with constant bounds, generates the runtime check
5750         referencing the bounds of the array type. For other cases this routine
5751         provides its previous behavior obtaining such values from the array
5752         object.
5753         * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
5754         parent type.
5755         * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
5756         we cannot have semantic interpretations of the new node.
5757
5758 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
5759
5760         * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
5761         expressions.
5762
5763 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
5764
5765         * sem_ch8.adb: Minor code editing.
5766         * s-vxwext.adb: Remove trailing space.
5767         * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
5768         consistency with other files.
5769
5770 2011-08-01  Thomas Quinot  <quinot@adacore.com>
5771
5772         * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
5773
5774 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
5775
5776         * par-ch10.adb: reject parameterized expressions as compilation unit.
5777         * sem_ch4.adb: handle properly conditional expression with overloaded
5778         then_clause and no else_clause.
5779
5780 2011-08-01  Tristan Gingold  <gingold@adacore.com>
5781
5782         * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
5783         like done by System.Aux_DEC.
5784         * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
5785
5786 2011-08-01  Yannick Moy  <moy@adacore.com>
5787
5788         * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
5789         missing label at end of declaration (subprogram or package)
5790         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
5791         of positional and named parameter association
5792         * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
5793         Error_Msg_SP which adds a prefix to the error message giving the name
5794         of the formal language analyzed
5795         * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
5796         access result type in subprogram, unconstrained array as result type,.
5797         (Analyze_Subprogram_Declaration): issue an error in formal mode for null
5798         procedure
5799         * sem_ch8.adb: Code clean up.
5800
5801 2011-08-01  Javier Miranda  <miranda@adacore.com>
5802
5803         * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
5804         * einfo.ads (Access_Disp_Table): Fix documentation.
5805         (Dispatch_Table_Wrappers): Fix documentation.
5806         * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
5807         Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
5808         to enforce the documentation of this attribute.
5809         (Set_Is_Interface): Cleanup the assertion.
5810         * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
5811         the Underlying_Type entity before reading attribute Access_Disp_Table.
5812         * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
5813         Locate the Underlying_Type before reading attribute Access_Disp_Table.
5814         * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
5815         the Underlying_Type entity before reading attribute Access_Disp_Table.
5816         * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
5817         Locate the Underlying_Type entity before reading attribute
5818         Access_Disp_Table.
5819
5820 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
5821
5822         * s-poosiz.ads: Additional overriding indicators.
5823
5824 2011-08-01  Yannick Moy  <moy@adacore.com>
5825
5826         * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
5827         formal mode.
5828         (Analyze_Iteration_Scheme): issue error in formal mode when loop
5829         parameter specification does not include a subtype mark.
5830         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
5831         formal mode on abstract subprogram.
5832         (Analyze_Subprogram_Specification): issue error in formal mode on
5833         user-defined operator.
5834         (Process_Formals): issue error in formal mode on access parameter and
5835         default expression.
5836         * sem_ch9.adb (Analyze_Abort_Statement,
5837         Analyze_Accept_Statement, Analyze_Asynchronous_Select,
5838         Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
5839         Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
5840         Analyze_Requeue, Analyze_Selective_Accept,
5841         Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
5842         * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
5843         issue error in formal mode on user-defined raise statement.
5844
5845 2011-08-01  Thomas Quinot  <quinot@adacore.com>
5846
5847         * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
5848         declaration being hidden when overriding an implicit inherited
5849         subprogram.
5850         * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
5851         (-gnats), do not complain about a source file that contains only a
5852         pragma No_Body.
5853
5854 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
5855
5856         * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
5857         variable if already set.
5858
5859 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
5860
5861         * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
5862         g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
5863         s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
5864         g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
5865         g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
5866         g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
5867         g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
5868         g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
5869         g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
5870         g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
5871         g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
5872         s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
5873         g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
5874         s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
5875         g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
5876         g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
5877         g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
5878         g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
5879         g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
5880         g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
5881         s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
5882         s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
5883         a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
5884         s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
5885         s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
5886         g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
5887         g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
5888         g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
5889         g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
5890         g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
5891         g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
5892         s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
5893         s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
5894         g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
5895         g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
5896         s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
5897         s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
5898         g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
5899         g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
5900         g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
5901         s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
5902         g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
5903         g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
5904         g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
5905         s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
5906         g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
5907         g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
5908         g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
5909         s-osinte-mingw.ads: Update to GPLv3 run-time license.
5910         Use GNAT instead of GNARL.
5911
5912 2011-08-01  Bob Duff  <duff@adacore.com>
5913
5914         * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
5915         a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
5916         a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
5917         reformatting.
5918
5919 2011-08-01  Yannick Moy  <moy@adacore.com>
5920
5921         * debug.adb (d.D) reverve flag for the SPARK mode
5922         (d.E) reverve flag for SPARK generation mode
5923         (d.F) reverve flag for Why generation mode
5924         * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
5925         ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode):  New
5926         functions which return True when the corresponding modes are set
5927         (Formal_Language): return "spark" or "alfa" when in formal verification
5928         mode.
5929         * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
5930         Error_Msg to prefix the error message with a tag giving the formal
5931         language
5932         (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
5933         message with a tag giving the formal language
5934         * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
5935         block statement
5936         (Analyze_Case_Statement): issue error in formal mode on case statement
5937         with a single "others" case alternative
5938         (Analyze_Exit_Statement): issue errors in formal mode on exit
5939         statements which do not respect SPARK restrictions
5940         (Analyze_Goto_Statement): issue error in formal mode on goto statement
5941         (Check_Unreachable_Code): always issue an error (not a warning) in
5942         formal mode on unreachable code (concerns both code after an infinite
5943         loop and after an unconditional jump, both not allowed in SPARK)
5944         * sem_ch6.adb (Analyze_Return_Statement): add call to
5945         Set_Return_Present for a procedure containing a return statement
5946         (already done for functions in Analyze_Function_Return)
5947         (Analyze_Function_Return): issue error in formal mode on extended
5948         return or if return is not last statement in function
5949         (Check_Missing_Return): issue error in formal mode if function does
5950         not end with return or if procedure contains a return
5951         * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
5952         function to detect if there is an inner scope of its parameter S which
5953         is a loop.
5954
5955 2011-08-01  Thomas Quinot  <quinot@adacore.com>
5956
5957         * sem_ch6.ads: Minor reformatting.
5958
5959 2011-08-01  Javier Miranda  <miranda@adacore.com>
5960
5961         * sem_util.adb (Abstract_Interface_List): Complete condition when
5962         processing private type declarations to avoid reading unavailable
5963         attribute.
5964         (Is_Synchronized_Tagged_Type): Complete condition when processing
5965         private extension declaration nodes to avoid reading unavailable
5966         attribute.
5967
5968 2011-08-01  Thomas Quinot  <quinot@adacore.com>
5969
5970         * sem_ch3.adb: Minor reformatting.
5971
5972 2011-08-01  Thomas Quinot  <quinot@adacore.com>
5973
5974         * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
5975         i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
5976         s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
5977         s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
5978         for VMS, instead parametrize the common implementation with
5979         System.Parameters declarations.
5980
5981 2011-08-01  Eric Botcazou  <ebotcazou@adacore.com>
5982
5983         * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
5984
5985 2011-08-01  Tristan Gingold  <gingold@adacore.com>
5986
5987         * seh_init.c: Fix SEH handler installation on win64.
5988
5989 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
5990
5991         * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
5992         double analysis of an anonymous access to subprogram, because it can
5993         lead to improper sharing of profiles and a back-end crash.
5994
5995 2011-08-01  Robert Dewar  <dewar@adacore.com>
5996
5997         * make.adb, sem_ch4.adb: Minor reformatting.
5998         * gcc-interface/Make-lang.in: Update dependencies.
5999         * sem_util.adb, exp_ch5.adb: Minor reformatting.
6000
6001 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
6002
6003         * gnat_rm.texi: Fix definition of Long_Integer.
6004
6005 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
6006
6007         * exp_aggr.adb: check limit size of static aggregate unconditionally,
6008         to prevent storage exhaustion.
6009         * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
6010         finalized is a function body, insert the cleanup code before the final
6011         return statement, to prevent spurious warnings.
6012         * s-pooglo.ads: add overriding indicator.
6013
6014 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
6015
6016         * sem_ch4.adb (Operator_Check): improve error message when both a
6017         with_clause and a use_clause are needed to make operator usage legal.
6018         * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
6019         determine whether a compilation unit is visible within an other,
6020         either through a with_clause in the current unit, or a with_clause in
6021         its library unit or one one of its parents.
6022
6023 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
6024
6025         * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
6026         over an arbitrary expression of an array or container type.
6027         * lib-xref.adb: clarify comment.
6028
6029 2011-08-01  Bob Duff  <duff@adacore.com>
6030
6031         * einfo.ads: Minor reformatting.
6032         * debug.adb: Minor comment improvement.
6033
6034 2011-08-01  Javier Miranda  <miranda@adacore.com>
6035
6036         * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
6037         consider hidden subprograms as valid candidates.
6038
6039 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
6040
6041         * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
6042
6043 2011-08-01  Vasiliy Fofanov  <fofanov@adacore.com>
6044
6045         * gnat_ugn.texi: Fix typo.
6046
6047 2011-08-01  Robert Dewar  <dewar@adacore.com>
6048
6049         * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
6050         lib-xref.adb: Minor reformatting
6051
6052 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
6053
6054         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
6055         when to generate a call to Move_Final_List.
6056         (Has_Controlled_Parts): Remove this function.
6057
6058 2011-08-01  Geert Bosch  <bosch@adacore.com>
6059
6060         * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
6061         "," in choice list.
6062
6063 2011-08-01  Thomas Quinot  <quinot@adacore.com>
6064
6065         * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
6066         explicit raise of a predefined exception as Comes_From_Source if the
6067         original N_Raise_Statement comes from source.
6068
6069 2011-08-01  Robert Dewar  <dewar@adacore.com>
6070
6071         * sinfo.ads: Add comment.
6072         * sem_ch6.adb: Minor reformatting.
6073
6074 2011-08-01  Robert Dewar  <dewar@adacore.com>
6075
6076         * freeze.adb (Freeze_Entity): Refine check for bad component size
6077         clause to avoid rejecting confirming clause when atomic/aliased present.
6078
6079 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
6080
6081         * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
6082         better determine whether an entity reference is a write.
6083         * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
6084         subcomponent.
6085         * lib-xref.adb (Output_References): Do no suppress a read reference at
6086         the same location as an immediately preceeding modify-reference, to
6087         handle properly in-out actuals.
6088
6089 2011-08-01  Tristan Gingold  <gingold@adacore.com>
6090
6091         * env.c (__gnat_setenv) [VMS]: Refine previous change.
6092
6093 2011-08-01  Quentin Ochem  <ochem@adacore.com>
6094
6095         * i-cstrin.adb (New_String): Changed implementation, now uses only the
6096         heap to compute the result.
6097
6098 2011-08-01  Robert Dewar  <dewar@adacore.com>
6099
6100         * atree.ads: Minor reformatting.
6101
6102 2011-08-01  Emmanuel Briot  <briot@adacore.com>
6103
6104         * g-expect.adb (Get_Command_Output): Fix memory leak.
6105
6106 2011-08-01  Geert Bosch  <bosch@adacore.com>
6107
6108         * cstand.adb (P_Float_Type): New procedure to print the definition of
6109         predefined fpt types.
6110         (P_Mixed_Name): New procedure to print a name using mixed case
6111         (Print_Standard): Use P_Float_Type for printing floating point types
6112         * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
6113         precision IEEE float.
6114
6115 2011-08-01  Thomas Quinot  <quinot@adacore.com>
6116
6117         * sem_ch3.adb: Minor reformatting.
6118
6119 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
6120
6121         * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
6122         the completion of a generic function, insert the new body rather than
6123         rewriting the original.
6124
6125 2011-08-01  Yannick Moy  <moy@adacore.com>
6126
6127         * sinfo.ads, errout.ads: Typos in comments.
6128
6129 2011-08-01  Robert Dewar  <dewar@adacore.com>
6130
6131         * par-endh.adb: Minor reformatting.
6132
6133 2011-08-01  Robert Dewar  <dewar@adacore.com>
6134
6135         * aspects.ads, aspects.adb: Add aspects for library unit pragmas
6136         (Pre_Post_Aspects): New subtype.
6137         * par-ch12.adb (P_Generic): New syntax for aspects in packages
6138         * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
6139         * par-ch7.adb (P_Package): Remove Decl parameter
6140         (P_Package): Handle new syntax for aspects (before IS)
6141         * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
6142         new aspect syntax
6143         (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
6144         * par.adb (P_Aspect_Specifications): Add Semicolon parameter
6145         (P_Package): Remove Decl parameter
6146         * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
6147         aspects
6148         * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
6149         specs
6150         * sem_util.ads, sem_util.adb (Static_Boolean): New function
6151         * sinfo.ads: Document new syntax for aspects in packages etc.
6152         * sprint.adb: Handle new syntax of aspects before IS in package
6153
6154 2011-08-01  Thomas Quinot  <quinot@adacore.com>
6155
6156         * atree.ads: Minor reformatting.
6157         * sem_prag.adb: Minor reformatting.
6158
6159 2011-08-01  Robert Dewar  <dewar@adacore.com>
6160
6161         * exp_util.adb (Insert_Actions): Fix error in handling Actions for
6162         case expr alternative.
6163
6164 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
6165
6166         * sem_ch12.adb: Fix typo.
6167
6168 2011-08-01  Geert Bosch  <bosch@adacore.com>
6169
6170         * sem_prag.adb (Check_No_Link_Name): New procedure.
6171         (Process_Import_Or_Interface): Use Check_No_Link_Name.
6172         * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
6173         instead of Standard_Long_Long_Float_Size global. Preparation for
6174         eventual removal of per type constants.
6175         * exp_util.ads (Get_Stream_Size): New function returning the stream
6176         size value of subtype E.
6177         * exp_util.adb (Get_Stream_Size): Implement new function.
6178         * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
6179         function.
6180         * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
6181         * einfo.adb:
6182         (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
6183
6184 2011-08-01  Geert Bosch  <bosch@adacore.com>
6185
6186         * cstand.adb: Fix comments.
6187         * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
6188         count of arguments.
6189
6190 2011-08-01  Robert Dewar  <dewar@adacore.com>
6191
6192         * exp_ch4.adb, sem_cat.adb: Minor reformatting.
6193
6194 2011-08-01  Geert Bosch  <bosch@adacore.com>
6195
6196         * atree.ads: Fix comment.
6197
6198 2011-08-01  Robert Dewar  <dewar@adacore.com>
6199
6200         * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
6201         * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
6202         * par.adb: Add with for Namet.Sp.
6203         * par-tchk.adb: Minor reformatting.
6204
6205 2011-08-01  Vincent Celier  <celier@adacore.com>
6206
6207         * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
6208         (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
6209         of the init procedure of a SAL.
6210         * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
6211         New procedure.
6212
6213 2011-08-01  Thomas Quinot  <quinot@adacore.com>
6214
6215         * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
6216         reformatting.
6217
6218 2011-08-01  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6219
6220         * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
6221
6222 2011-08-01  Thomas Quinot  <quinot@adacore.com>
6223
6224         * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
6225         conformant with its spec (return True only for types that have
6226         an overriding Initialize primitive operation that prevents them from
6227         having preelaborable initialization).
6228         * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
6229         initialization for controlled types in Ada 2005 or later mode.
6230
6231 2011-08-01  Robert Dewar  <dewar@adacore.com>
6232
6233         * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
6234         Postcondition.
6235         (Same_Aspect): New function.
6236         * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
6237         Type_Invariant, Precondition, Postcondition.
6238         * snames.ads-tmpl: Add Name_Type_Invariant.
6239
6240 2011-08-01  Robert Dewar  <dewar@adacore.com>
6241
6242         * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
6243         here.
6244         (Freeze_All_Ent): Fix error in handling inherited aspects.
6245         * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
6246         already analyzed, but don't skip entire processing of a declaration,
6247         that's wrong in some cases of declarations being rewritten.
6248         (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
6249         Don't delay for integer, string literals
6250         Treat predicates in usual manner for delay, remove special case code,
6251         not needed.
6252         (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
6253         (Build_Predicate_Function): Update saved expression in aspect
6254         (Build_Invariant_Procedure): Update saved expression in aspect
6255         * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
6256         of replacement of discriminant references if the reference is simple.
6257
6258 2011-08-01  Robert Dewar  <dewar@adacore.com>
6259
6260         * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
6261         * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
6262         Static_Predicate and Dynamic_Predicate.
6263         (Build_Predicate_Function): Add processing for Static_Predicate
6264         and Dynamic_Predicate.
6265         * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
6266         (From_Static_Predicate): New flag
6267         * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
6268
6269 2011-08-01  Robert Dewar  <dewar@adacore.com>
6270
6271         * usage.adb: Documentation cleanup for Ada version modes in usage.
6272         * expander.adb: Minor reformatting.
6273
6274 2011-08-01  Robert Dewar  <dewar@adacore.com>
6275
6276         * atree.ads: Minor comment fix.
6277         * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
6278         a-witeio.ads, sem_prag.adb: Minor reformatting.
6279
6280 2011-08-01  Doug Rupp  <rupp@adacore.com>
6281
6282         * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
6283         pointers. Use descrip.h header file for convenience. Add some
6284         comments.
6285
6286 2011-08-01  Robert Dewar  <dewar@adacore.com>
6287
6288         * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
6289         (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
6290         * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
6291         New procedure.
6292         (Check_Aspect_At_End_Of_Declarations): New procedure
6293         (Analye_Aspect_Specification): Minor changes for above procedures
6294         * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
6295         specification node as well.
6296
6297 2011-08-01  Pascal Obry  <obry@adacore.com>
6298
6299         * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
6300         Windows files. Use GetFilesAttributes() in this case to check for file
6301         existence instead of returning with an error code.
6302
6303 2011-08-01  Vincent Celier  <celier@adacore.com>
6304
6305         * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
6306         High is above Source length.
6307
6308 2011-08-01  Robert Dewar  <dewar@adacore.com>
6309
6310         * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
6311
6312 2011-08-01  Robert Dewar  <dewar@adacore.com>
6313
6314         * aspects.ads (Boolean_Aspects): New subtype.
6315         * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
6316         for derived types in cases where the parent type and derived type have
6317         aspects.
6318         * freeze.adb (Freeze_Entity): Fix problems in handling derived type
6319         with aspects when parent type also has aspects.
6320         (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
6321         boolean expression at this point).
6322         * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
6323         accordance with final decision on the Ada 2012 feature.
6324         * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
6325
6326 2011-08-01  Matthew Heaney  <heaney@adacore.com>
6327
6328         * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
6329
6330 2011-08-01  Pascal Obry  <obry@adacore.com>
6331
6332         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
6333         Fix Replace_Slice when High is above current string size.
6334         (Replace_Slice): Fix DL computation when High is above current
6335         string length.
6336
6337 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
6338
6339         * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
6340
6341 2011-08-01  Matthew Heaney  <heaney@adacore.com>
6342
6343         * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
6344         of node.
6345
6346 2011-08-01  Pascal Obry  <obry@adacore.com>
6347
6348         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
6349         reformatting.
6350
6351 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
6352
6353         * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
6354         access to protected subprograms in generic bodies.
6355         * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
6356         protected type, indicate that the convention of the subprogram is
6357         Convention_Protected, because it may be used in subsequent declarations
6358         within the protected declaration.
6359
6360 2011-08-01  Vincent Celier  <celier@adacore.com>
6361
6362         * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
6363         and "final" procedures when the name of the library is "ada", to avoid
6364         duplicate symbols "adainit" and "adafinal" in executables.
6365
6366 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
6367
6368         * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
6369         quantified expression that appears within a postcondition and uses the
6370         Ada2012 'Result attribute.
6371
6372 2011-07-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6373
6374         * init.c (__gnat_error_handler): Cast reason to int.
6375         (__gnat_install_handler): Explain sa_sigaction use.
6376
6377 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
6378
6379         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
6380         subprogram has copy-in copy-out parameters, try to promote the mode of
6381         the return type if it is passed in registers.
6382
6383 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
6384
6385         * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
6386         left operand as addressable.
6387
6388 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
6389
6390         * gcc-interface/gigi.h (build_function_stub): Remove.
6391         (build_return_expr): Likewise.
6392         (convert_vms_descriptor): Declare.
6393         * gcc-interface/utils.c (convert_vms_descriptor): Make global.
6394         (build_function_stub): Move to...
6395         * gcc-interface/utils2.c (build_return_expr): Move to...
6396         * gcc-interface/trans.c (build_function_stub): ...here.
6397         (build_return_expr): ...here.
6398         (Subprogram_Body_to_gnu): Add local variable for language_function.
6399         Disconnect the parameter attributes cache, if any, once done with it.
6400         Call end_subprog_body only after setting the end_locus.
6401         Build the stub associated with the function, if any, at the very end.
6402         (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
6403         variables and streamline control flow.
6404
6405 2011-07-23  Arnaud Charlet  <charlet@adacore.com>
6406
6407         PR ada/49819
6408         * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
6409         g-trasym-dwarf.adb.
6410
6411 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6412
6413         PR bootstrap/49794
6414         * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
6415         Assign to act.sa_sigaction.
6416         * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
6417         current->return_address to char * before arithmetic.
6418
6419 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6420
6421         * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
6422         Correct argument types.
6423         Extract code from reason.
6424         (__gnat_install_handler): Assign to act.sa_sigaction.
6425
6426 2011-07-21  Eric Botcazou  <ebotcazou@adacore.com>
6427
6428         * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
6429         (GNAT1_OBJS): ...here.
6430
6431 2011-07-15  Eric Botcazou  <ebotcazou@adacore.com>
6432
6433         PR ada/48711
6434         * g-socthi-mingw.adb (Fill): Fix formatting.
6435
6436         * gcc-interface/gigi.h: Move around comment.
6437
6438 2011-07-14  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
6439
6440         PR ada/46350
6441         * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
6442
6443 2011-07-14  Florian Weimer  <fw@deneb.enyo.de>
6444
6445         PR ada/48711
6446         * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
6447
6448 2011-07-13  Eric Botcazou  <ebotcazou@adacore.com>
6449
6450         * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
6451         range comparison if Pmode is SImode.
6452
6453 2011-07-12  Laurent GUERBY  <laurent@guerby.net>
6454             Eric Botcazou  <ebotcazou@adacore.com>
6455
6456         * adadecode.c: Wrap up in extern "C" block.
6457         * adadecode.h: Likewise.
6458         * adaint.c: Likewise.  Remove 'const' keyword.
6459         * adaint.h: Likewise.
6460         * argv.c: Likewise.
6461         * atree.h: Likewise.
6462         * cio.c: Likewise.
6463         * cstreams.c: Likewise.
6464         * env.c: Likewise.
6465         * exit.c: Likewise.
6466         * fe.h: Likewise.
6467         * final.c: Likewise.
6468         * init.c: Likewise.
6469         * initialize.c: Likewise.
6470         * link.c: Likewise.
6471         * namet.h: Likewise.
6472         * nlists.h: Likewise.
6473         * raise.c: Likewise.
6474         * raise.h: Likewise.
6475         * repinfo.h: Likewise.
6476         * seh_init.c: Likewise.
6477         * targext.c: Likewise.
6478         * tracebak.c: Likewise.
6479         * uintp.h: Likewise.
6480         * urealp.h: Likewise.
6481         * xeinfo.adb: Wrap up generated C code in extern "C" block.
6482         * xsinfo.adb: Likewise.
6483         * xsnamest.adb: Likewise.
6484         * gcc-interface/gadaint.h: Wrap up in extern "C" block.
6485         * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
6486         * gcc-interface/misc.c: Likewise.
6487         * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
6488         (GNAT1_C_OBJS): Remove ada/b_gnat1.o.  List ada/seh_init.o and
6489         ada/targext.o here...
6490         (GNAT_ADA_OBJS): ...and not here.
6491         (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
6492         (GNATBIND_OBJS): Reorder.
6493
6494 2011-07-07  Richard Henderson  <rth@redhat.com>
6495
6496         * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
6497         dwarf2out_frame_init.
6498
6499 2011-07-07  Eric Botcazou  <ebotcazou@adacore.com>
6500
6501         * gcc-interface/misc.c (gnat_init): Tweak previous change.
6502
6503 2011-07-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6504
6505         PR target/39150
6506         * gcc-interface/Makefile.in: Handle x86_64-solaris2.
6507
6508 2011-07-06  Richard Guenther  <rguenther@suse.de>
6509
6510         * gcc-interface/misc.c (gnat_init): Merge calls to
6511         build_common_tree_nodes and build_common_tree_nodes_2.
6512         Re-initialize boolean_false_node.
6513
6514 2011-07-02  Eric Botcazou  <ebotcazou@adacore.com>
6515             Olivier Hainque  <hainque@adacore.com>
6516             Nicolas Setton  <setton@adacore.com>
6517
6518         * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
6519         the type according to the ARTIFICIAL_P parameter.
6520         (create_type_decl): Likewise.
6521         (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
6522
6523 2011-07-01  Eric Botcazou  <ebotcazou@adacore.com>
6524
6525         * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
6526         (gnatbind): Likewise.
6527
6528 2011-06-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6529
6530         * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
6531
6532 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
6533
6534         * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
6535         local variable throughout.  Remove useless call to Base_Type.
6536         (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
6537         Take it also into account for the volatileness of the field.  Set the
6538         TREE_SIDE_EFFECTS flag as well in this case.  Reorder some warnings.
6539
6540 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
6541
6542         * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
6543         on a dereference built for a by-ref object if it has an address clause.
6544
6545 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
6546
6547         * einfo.ads (Address_Taken): Document use for the second argument of
6548         Asm_Input and Asm_Output attributes.
6549         * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
6550         argument is an entity name, then set Address_Taken on it.
6551         <Attribute_Asm_Output>: Likewise.
6552         * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
6553         Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
6554         (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
6555         memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
6556
6557 2011-06-16  Joern Rennecke  <joern.rennecke@embecosm.com>
6558
6559         PR middle-end/46500
6560         * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
6561
6562 2011-06-14  Joseph Myers  <joseph@codesourcery.com>
6563
6564         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
6565         (ada/utils.o): Update dependencies.
6566         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
6567         ../../../libcpp/libcpp.a.
6568         * gcc-interface/utils.c: Include common/common-target.h.
6569         (process_attributes): Use targetm_common.have_named_sections.
6570
6571 2011-06-07  Richard Guenther  <rguenther@suse.de>
6572
6573         * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
6574         set_sizetype.
6575
6576 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
6577
6578         * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
6579         TREE_THIS_NOTRAP flag.
6580
6581 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
6582
6583         * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
6584         Fix thinko.
6585
6586 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
6587
6588         * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
6589         constants whose full view has discriminants specially.
6590
6591 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
6592
6593         * gcc-interface/utils.c: Include diagnostic.h.
6594         (gnat_write_global_declarations): Output debug information for all
6595         global type declarations before finalizing the compilation unit.
6596         * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
6597
6598 2011-05-25  Jakub Jelinek  <jakub@redhat.com>
6599
6600         * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
6601
6602 2011-05-25  Kai Tietz  <ktietz@redhat.com>
6603
6604         * adaint.c (__gnat_to_canonical_file_list_next): Use array
6605         initialization instead of const/none-const pointer assignment.
6606
6607 2011-05-24  Joseph Myers  <joseph@codesourcery.com>
6608
6609         * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
6610         $(EXTRA_GNAT1_OBJS).
6611         (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
6612         (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
6613         (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
6614         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
6615         libcommon-target.a instead of prefix.o.
6616
6617 2011-05-21  Joseph Myers  <joseph@codesourcery.com>
6618
6619         PR ada/49097
6620         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
6621
6622 2011-05-20  Joseph Myers  <joseph@codesourcery.com>
6623
6624         * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
6625         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
6626         instead of version.o.
6627
6628 2011-05-18  Kai Tietz <ktietz@redhat.com>
6629
6630         * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
6631         boolean_false_node instead of integer_zero_node.
6632         (convert_with_check): Likewise.
6633         * gcc-interface/decl.c (choices_to_gnu): Likewise.
6634
6635 2011-05-12  Eric Botcazou  <ebotcazou@adacore.com>
6636
6637         * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
6638         type of the parameter is an unconstrained array, convert the actual to
6639         the type of the formal in the In Out and Out cases as well.
6640
6641 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
6642
6643         * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
6644         call build_function_type_array or build_varargs_function_type_array
6645         instead.
6646         (create_subprog_type): Don't call build_function_type; call
6647         build_function_type_vec instead.
6648
6649 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
6650
6651         * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
6652         (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
6653         (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
6654
6655 2011-05-07  Eric Botcazou  <ebotcazou@adacore.com>
6656
6657         * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
6658
6659         * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
6660         * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
6661
6662 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
6663
6664         * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
6665
6666 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
6667
6668         * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
6669         instead of accessing TYPE_ARG_TYPES directly.
6670         * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
6671
6672 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
6673
6674         PR ada/48844
6675         * gcc-interface/gigi.h (get_variant_part): Declare.
6676         * gcc-interface/decl.c (get_variant_part): Make global.
6677         * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
6678         types have the same constant size, are record types and T1 has a
6679         variant part while T2 doesn't.
6680
6681 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
6682
6683         * gcc-interface/utils.c (begin_subprog_body): Do not call
6684         get_pending_sizes.
6685         (end_subprog_body): Likewise.
6686
6687 2011-05-04  Richard Guenther  <rguenther@suse.de>
6688
6689         * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
6690         int_const_binop.
6691         (pos_to_constructor): Likewise.
6692
6693 2011-05-03  Nathan Froyd  <froydnj@codesourcery.com>
6694             Eric Botcazou  <ebotcazou@adacore.com>
6695
6696         * gcc-interface/trans.c (gigi): Call build_function_type_list instead
6697         of build_function_type.  Adjust calls to...
6698         (build_raise_check): ...this.  Do not take a void_tree parameter.
6699         Call build_function_type_list instead of build_function_type.
6700         Fix head comment and swap couple of conditional blocks.
6701
6702 2011-04-30  Eric Botcazou  <ebotcazou@adacore.com>
6703
6704         * gnatvsn.ads (Library_Version): Bump to 4.7.
6705         (Current_Year): Bump to 2011.
6706
6707 2011-04-29  Michael Matz  <matz@suse.de>
6708
6709         * gcc-interface/misc.c (gnat_handle_option): Set
6710         warn_maybe_uninitialized.
6711
6712 2011-04-23  Gerald Pfeifer  <gerald@pfeifer.com>
6713
6714         * gnat_ugn.texi (Complexity Metrics Control): Update link to
6715         the Watson/McCabe paper.
6716
6717 2011-04-23  Jim Meyering  <meyering@redhat.com>
6718
6719         * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
6720
6721 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
6722
6723         * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
6724         onto the new type.
6725
6726 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
6727
6728         * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
6729         parameter.
6730         * gcc-interface/utils.c (create_subprog_decl): Likewise.  Set
6731         DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
6732         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
6733         ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
6734         <all>: Do not set flags on the reused DECL node coming from an alias.
6735         Set DECL_IGNORED_P on the DECL node built for subprograms if they
6736         don't need debug info here...
6737         * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
6738         (gigi): Adjust calls to create_subprog_decl.
6739         (build_raise_check): Likewise.
6740         (establish_gnat_vms_condition_handler): Likewise.
6741         (Compilation_Unit_to_gnu): Likewise.
6742         (gnat_to_gnu): Likewise.
6743
6744 2011-04-21  Eric Botcazou  <ebotcazou@adacore.com>
6745
6746         * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
6747         (NO_REORDER_ADAFLAGS): New variable.
6748         (EXTRA_GNATTOOLS): Always define.
6749         (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
6750         Clean up and adjust list of files compiled with special options.
6751         * gcc-interface/Make-lang.in: Likewise.
6752         (ada/decl.o): Cosmetical change.
6753         (ada/misc.o): Remove dependency on $(PLUGIN_H).
6754
6755 2011-04-20  Jim Meyering  <meyering@redhat.com>
6756
6757         * initialize.c (__gnat_initialize): Remove useless if-before-free.
6758
6759 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
6760
6761         * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
6762         $(CFLAGS) on the link line.
6763
6764 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
6765
6766         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
6767         padded type built for the return type if it is unconstrained.
6768
6769 2011-04-14  Nathan Froyd  <froydnj@codesourcery.com>
6770
6771         * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
6772
6773 2011-04-12  Nathan Froyd  <froydnj@codesourcery.com>
6774
6775         * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
6776         before calling TREE_CHAIN.
6777         * gcc-interface/misc.c (gnat_init_ts): New function.
6778         (LANG_HOOKS_INIT_TS): Define.
6779
6780 2011-04-12  Martin Jambor  <mjambor@suse.cz>
6781
6782         * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
6783         instead of cgraph_node.
6784
6785 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
6786
6787         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
6788         alignment on fields of the RETURN type built for the Copy-In Copy-Out
6789         mechanism.
6790
6791 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
6792
6793         * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
6794         of aggregate types that contain a placeholder.
6795
6796 2011-04-08  Nathan Froyd  <froydnj@codesourcery.com>
6797
6798         * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
6799         TYPE_ARG_TYPES.
6800         (handle_type_generic_attribute): Likewise.
6801
6802 2011-04-04  Eric Botcazou  <ebotcazou@adacore.com>
6803
6804         PR ada/47163
6805         * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
6806
6807 2011-04-04  Kai Tietz  <ktietz@redhat.com>
6808
6809         PR ada/47163
6810         * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
6811         to flag value.
6812
6813 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
6814
6815         * gcc-interface/utils2.c (build_allocator): In the unconstrained array
6816         type case, do not strip a padding type around the array type.
6817
6818 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
6819
6820         * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
6821         types.
6822
6823 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
6824
6825         * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
6826         * gcc-interface/misc.c (gnat_handle_option): Remove special handling
6827         code for -feliminate-unused-debug-types.
6828         (gnat_post_options): Likewise.
6829
6830 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
6831
6832         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
6833         declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
6834         distinct copy.
6835
6836 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
6837
6838         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
6839         DECL_ARTIFICIAL flag on enumeration types.
6840
6841 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
6842
6843         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
6844         fat pointer types artificial unconditionally.
6845         <E_Array_Subtype>: Attach the base array type as a parallel type if it
6846         isn't artificial.
6847
6848 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
6849
6850         * gcc-interface/gigi.h (get_dummy_type): Declare.
6851         (build_dummy_unc_pointer_types): Likewise.
6852         (finish_fat_pointer_type): Likewise.
6853         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
6854         fat pointer type has been built, complete it in place.
6855         <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
6856         and thin pointers.  Remove useless variable.
6857         (finish_fat_pointer_type): Make global and move to...
6858         * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
6859         (get_dummy_type): New function.
6860         (build_dummy_unc_pointer_types): Likewise.
6861         (gnat_pushdecl): Propage the name to the anonymous variants only.
6862         (update_pointer_to): Only adjust the pointer types in the unconstrained
6863         array case.
6864
6865 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
6866
6867         * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
6868         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
6869         if this is a Taft amendment type and the full declaration is available.
6870         * gcc-interface/trans.c (process_type): Likewise.
6871         If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
6872         (process_freeze_entity): Likewise.
6873         * gcc-interface/utils.c (dummy_global): New static variable.
6874         (gnat_write_global_declarations): If there are types declared as used
6875         at the global level, insert them in the global hash table.
6876
6877 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
6878
6879         * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
6880         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
6881         declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
6882         copy.
6883         (record_builtin_type): Add ARTIFICIAL_P parameter.  Set DECL_ARTIFICIAL
6884         flag of the type accordingly.
6885         * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
6886
6887 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
6888
6889         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
6890         finalizing types when updating the pointers to the designated type.
6891         <all>: Finalize the deferred types even if we didn't defer processing
6892         of incomplete types in this invocation.
6893
6894 2011-04-01  Olivier Hainque  <hainque@adacore.com>
6895             Nicolas Setton  <setton@adacore.com>
6896             Eric Botcazou  <ebotcazou@adacore.com>
6897
6898         * gcc-interface/misc.c (gnat_descriptive_type): New function.
6899         (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
6900
6901 2011-03-28  Kai Tietz  <ktietz@redhat.com>
6902
6903         * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
6904         Windows targets.
6905         (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
6906         * system-mingw.ads (System): Change ZCX_By_Default default to True.
6907
6908         * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
6909
6910 2011-03-28  Tristan Gingold  <gingold@adacore.com>
6911
6912         PR ada/44431
6913         * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
6914         Use ada output of gnatbind.
6915         (ada/b_gnatb.adb): Ditto.
6916         (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
6917         (ada.mostlyclean, ada.stage1)
6918         (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
6919         (ada.stagefeedback): Adjust.
6920         * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
6921         Use ada output of gnatbind.
6922         (b_gnatm.adb): Ditto.
6923         (b_gnatl.o, b_gnatm.o): New rules.
6924
6925 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
6926
6927         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
6928         for the padded type built to support a specified size or alignment.
6929
6930 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
6931
6932         * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
6933         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
6934         unconditionally to the end of the unit when the designated type is
6935         limited_with'ed.
6936         <all>: Rename local variable.  Attempt to un-defer types only and do it
6937         for limited_with'ed types as well.
6938         (finalize_from_with_types): Adjust comment.  Rename variable and tidy.
6939         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
6940         consistently and remove redundant call to finalize_from_with_types.
6941
6942 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
6943
6944         * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
6945         subprograms without a previous spec declared in the same unit.
6946         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
6947         subprograms at the end of the unit instead of at the beginning.
6948         * gcc-interface/utils.c (create_subprog_decl): Check that the entity
6949         isn't public for the special handling of non-inline functions nested
6950         inside inline external functions.
6951
6952 2011-03-25  Jeff Law  <law@redhat.com>
6953
6954         * gcc-interface/utils.c (def_fn_type): Add missing va_end.
6955
6956 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
6957
6958         * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
6959         * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
6960         to compute Set_Size_Depends_On_Discriminant.
6961         (Layout_Type): Call it on array types in back-end layout mode.
6962         * sem_util.adb (Requires_Transient_Scope): Return true for array
6963         types only if the size depends on the value of discriminants.
6964         * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
6965         type if the RHS is a call to a function that returns an unconstrained
6966         type with default discriminant.
6967
6968 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
6969
6970         * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
6971         non-conversion to the nominal result type at the end.
6972
6973 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
6974
6975         * gcc-interface/trans.c (create_temporary): New function taken from...
6976         (create_init_temporary): ...here.  Call it.
6977         (call_to_gnu): Create the temporary for the return value early, if any.
6978         Create it for a function with copy-in/copy-out parameters if there is
6979         no target; in other cases of copy-in/copy-out, use another temporary.
6980         Push the new binding level lazily.  Add and rename local variables.
6981
6982 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
6983
6984         * gcc-interface/decl.c (validate_size): Improve comments and tweak
6985         error message.
6986         (set_rm_size): Likewise.
6987
6988 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
6989
6990         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
6991         for the padded type built in order to support a specified alignment.
6992         Fix incorrect formatting.
6993
6994 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
6995
6996         PR bootstrap/48216
6997         * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
6998
6999 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
7000
7001         * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
7002         rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
7003         to the end of the list.  Adjust recursive call.  Rename local variable.
7004         If REORDER is true, reorder components of the record type.
7005         (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
7006         components_to_record and adjust the parameter list.
7007
7008 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
7009
7010         * gcc-interface/decl.c (elaborate_expression_1): When optimization is
7011         disabled, use the variable for bounds of loop iteration scheme.
7012
7013 2011-03-21  Kai Tietz  <ktietz@redhat.com>
7014
7015         PR target/12171
7016         * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
7017
7018 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
7019
7020         * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
7021         out whether the expression is read-only.  Short-circuit placeholder
7022         case and rename a couple of local variables.
7023
7024 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
7025
7026         * gcc-interface/gigi.h (smaller_form_type_p): Declare.
7027         * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
7028         * gcc-interface/utils.c (smaller_form_type_p): ...to here.
7029         (convert): Deal with conversions from a smaller form type specially.
7030
7031 2011-02-14  Eric Botcazou  <ebotcazou@adacore.com>
7032
7033         * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
7034         its argument, except for the special -I- switch.
7035
7036 2011-02-12  Gerald Pfeifer  <gerald@pfeifer.com>
7037
7038         * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
7039         "Ada Issues".
7040
7041 2011-02-08  Eric Botcazou  <ebotcazou@adacore.com>
7042
7043         * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
7044
7045 2011-02-03  Eric Botcazou  <ebotcazou@adacore.com>
7046
7047         * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
7048         GNAT_FORMAL.
7049         * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
7050         * gcc-interface/utils.c (fill_vms_descriptor): ...here.  Take GNU_TYPE
7051         instead of GNAT_FORMAL.  Protect the expression against multiple uses.
7052         Do not generate the check directly, instead instantiate the template
7053         check present in the descriptor.
7054         (make_descriptor_field): Move around.
7055         (build_vms_descriptor32): Build a template check in the POINTER field.
7056         (build_vms_descriptor): Remove useless suffixes.
7057         * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
7058
7059 2011-01-26  Eric Botcazou  <ebotcazou@adacore.com>
7060
7061         PR bootstrap/47467
7062         * targext.c: Include target files if IN_RTS is defined.
7063
7064 2011-01-26  Richard Guenther  <rguenther@suse.de>
7065
7066         PR bootstrap/47467
7067         * targext.c: Include config.h.
7068         * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
7069         dependency.
7070
7071 2011-01-04  Pascal Obry  <obry@adacore.com>
7072             Eric Botcazou  <ebotcazou@adacore.com>
7073
7074         * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
7075
7076 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
7077
7078         * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
7079         end-of-case on the end label and its associated gotos, if any.
7080
7081 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
7082
7083         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
7084         expressions of the parameter cache within the statement group of
7085         the CICO mechanism.
7086
7087 2011-01-04  Olivier Hainque  <hainque@adacore.com>
7088             Eric Botcazou  <ebotcazou@adacore.com>
7089
7090         * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
7091         (set_end_locus_from_node): New function.
7092         (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
7093         make and the function end_locus.
7094         (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
7095         for the elaboration subprogram.
7096         (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
7097         set the end_locus of the expression as well.
7098
7099 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
7100
7101         PR ada/47131
7102         * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
7103         variables that are referenced in exception handlers volatile.
7104
7105
7106 \f
7107 Copyright (C) 2011 Free Software Foundation, Inc.
7108
7109 Copying and distribution of this file, with or without modification,
7110 are permitted in any medium without royalty provided the copyright
7111 notice and this notice are preserved.
7112
7113         * gnat_rm.texi: Ramification of pragma Eliminate documentation
7114          - fix bugs in the description of Source_Trace;
7115          - get rid of UNIT_NAME;
7116
7117 2011-08-02  Javier Miranda  <miranda@adacore.com>
7118
7119         * exp_ch9.adb
7120         (Build_Dispatching_Requeue): Adding support for VM targets
7121         since we cannot directly reference the Tag entity.
7122         * exp_sel.adb (Build_K): Adding support for VM targets.
7123         (Build_S_Assignment): Adding support for VM targets.
7124         * exp_disp.adb
7125         (Default_Prim_Op_Position): In VM targets do not restrict availability
7126         of predefined interface primitives to compiling in Ada 2005 mode.
7127         (Is_Predefined_Interface_Primitive): In VM targets this service is not
7128         restricted to compiling in Ada 2005 mode.
7129         (Make_VM_TSD): Generate code that declares and initializes the OSD
7130         record. Needed to support dispatching calls through synchronized
7131         interfaces.
7132         * exp_ch3.adb
7133         (Make_Predefined_Primitive_Specs): Enable generation of predefined
7134         primitives associated with synchronized interfaces.
7135         (Make_Predefined_Primitive_Bodies): Enable generation of predefined
7136         primitives associated with synchronized interfaces.
7137
7138 2011-08-02  Yannick Moy  <moy@adacore.com>
7139
7140         * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
7141         statements hidden in SPARK if preceded by the HIDE directive
7142         (Parse_Exception_Handlers): mark each exception handler in a sequence of
7143         exception handlers as hidden in SPARK if preceded by the HIDE directive
7144         * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
7145         if starting with the HIDE directive
7146         * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
7147         starting with the HIDE directive; mark the declarations in a private
7148         part as hidden in SPARK if the private part starts with the HIDE
7149         directive
7150         * restrict.adb, restrict.ads
7151         (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
7152         (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
7153         argument node belongs to a part which is hidden in SPARK
7154         (Check_SPARK_Restriction): do not issue violations on nodes in hidden
7155         parts in SPARK; protect the possibly costly call to
7156         Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
7157         * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
7158         * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
7159         Accumulate_Token_Checksum_GNAT_5_03): add case for new token
7160         Tok_SPARK_Hide.
7161         (Scan): recognize special comment starting with '#' and followed by
7162         SPARK keyword "hide" as a HIDE directive.
7163
7164 2011-08-02  Yannick Moy  <moy@adacore.com>
7165
7166         * types.ads, erroutc.ads: Minor reformatting.
7167
7168 2011-08-02  Vincent Celier  <celier@adacore.com>
7169
7170         * link.c: Add response file support for cross platforms.
7171
7172 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7173
7174         * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
7175         in an association, set parent field of copy before partial analysis.
7176         * sem_res.adb (Resolve_Slice): create reference to itype only when
7177         expansion is enabled.
7178
7179 2011-08-02  Yannick Moy  <moy@adacore.com>
7180
7181         * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
7182         for new flag denoting which subprogram bodies are in ALFA
7183         * restrict.adb, sem_ch7.adb: Update comment
7184         * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
7185         sem_ch9.adb, sem_res.adb: Add calls to
7186         Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
7187         * sem_ch6.adb (Analyze_Function_Return): add calls to
7188         Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
7189         middle of the body, and extended return.
7190         (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
7191         False when missing return.
7192         (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
7193         to True for subprograms whose spec is in ALFA. Remove later on the flag
7194         on the entity used for a subprogram body when there exists a separate
7195         declaration.
7196         * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
7197         if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
7198         False, otherwise do nothing.
7199
7200 2011-08-02  Robert Dewar  <dewar@adacore.com>
7201
7202         * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
7203
7204 2011-08-02  Yannick Moy  <moy@adacore.com>
7205
7206         * sem_ch4.ads: minor formatting.
7207
7208 2011-08-02  Yannick Moy  <moy@adacore.com>
7209
7210         * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
7211         debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
7212         errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
7213         restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
7214         opt.ads: cleanup of SPARK mode
7215
7216 2011-08-02  Yannick Moy  <moy@adacore.com>
7217
7218         * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
7219         types.
7220         * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
7221         (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
7222         * sem_ch3.adb
7223         (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
7224         (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
7225         (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
7226         (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
7227         types.
7228         (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
7229         non-static range.
7230         * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
7231         functions whose return type is not in ALFA.
7232         (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
7233         specifications.
7234         (Process_Formals): unset Is_In_ALFA flag for subprograms if a
7235         parameter's type is not in ALFA.
7236         * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
7237         types are in ALFA.
7238
7239 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7240
7241         * sem_ch6 (Analyze_Expression_Function): treat the function as
7242         Inline_Always, and introduce a subprogram declaration for it when it is
7243         not a completion.
7244         * inline.adb (Add_Inlined_Body): recognize bodies that come from
7245         expression functions, so that the back-end can determine whether they
7246         can in fact be inlined.
7247         * sem_util.adb (Is_Expression_Function): predicate to determine whether
7248         a function body comes from an expression function.
7249
7250 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
7251
7252         * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
7253         null exclusions to test Can_Never_Be_Null on the anonymous access types
7254         of the formals rather than testing the formals themselves. Exclude this
7255         check in cases where the Old_Formal is marked as a controlling formal,
7256         to avoid issuing spurious errors for bodies completing dispatching
7257         operations (due to the flag not getting set on controlling access
7258         formals in body specs).
7259         (Find_Corresponding_Spec): When checking full and subtype conformance of
7260         subprogram bodies in instances, pass Designated and E in that order, for
7261         consistency with the expected order of the formals (New_Id followed by
7262         Old_Id).
7263
7264 2011-08-02  Robert Dewar  <dewar@adacore.com>
7265
7266         * sem_ch8.adb: Minor reformatting.
7267
7268 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7269
7270         * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
7271         Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
7272         primitive operations of class-wide actuals.
7273
7274 2011-08-02  Javier Miranda  <miranda@adacore.com>
7275
7276         * exp_atag.ads, exp_atag.adb
7277         (Build_Common_Dispatching_Select_Statements): Remove argument Loc
7278         since its value is implicitly passed in argument Typ.
7279         * exp_disp.adb (Make_Disp_Conditional_Select_Body,
7280         Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
7281         Build_Common_Dispatching_Select_Statements.
7282
7283 2011-08-02  Robert Dewar  <dewar@adacore.com>
7284
7285         * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
7286         exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
7287         Minor reformatting.
7288
7289 2011-08-02  Robert Dewar  <dewar@adacore.com>
7290
7291         * sem_res.adb: Minor reformatting.
7292         * sem_prag.adb: Minor reformatting.
7293
7294 2011-08-02  Javier Miranda  <miranda@adacore.com>
7295
7296         * exp_atag.adb, exp_atags.ads
7297         (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
7298         by the tagged type Entity. Required to use this routine in the VM
7299         targets since we do not have available the Tag entity in the VM
7300         platforms.
7301         * exp_ch6.adb
7302         (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
7303         Ada.Tags has not been previously loaded.
7304         * exp_ch7.adb
7305         (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
7306         Build_VM_TSDs if package Ada.Tags has not been previously loaded.
7307         * sem_aux.adb
7308         (Enclosing_Dynamic_Scope): Add missing support to handle the full
7309         view of enclosing scopes. Required to handle enclosing scopes that
7310         are synchronized types whose full view is a task type.
7311         * exp_disp.adb
7312         (Build_VM_TSDs): Minor code improvement to avoid generating and
7313         analyzing lists with empty nodes.
7314         (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
7315         (Make_Disp_Conditional_Select_Body): Add support for VM targets.
7316         (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
7317         (Make_Disp_Timed_Select_Body): Add support for VM targets.
7318         (Make_Select_Specific_Data_Table): Add support for VM targets.
7319         (Make_VM_TSD): Generate code to initialize the SSD structure of
7320         the TSD.
7321
7322 2011-08-02  Yannick Moy  <moy@adacore.com>
7323
7324         * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
7325         cross-references section in ALI.
7326         * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
7327         (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
7328         Sub).
7329         (Enclosing_Subprogram_Or_Package): new function to return the enclosing
7330         subprogram or package entity of a node
7331         (Is_Local_Reference_Type): new function returns True for references
7332         selected in local cross-references.
7333         (Lt): function extracted from Lt in Output_References
7334         (Write_Entity_Name): function extracted from Output_References
7335         (Generate_Definition): generate reference with type 'D' for definition
7336         of objects (object declaration and parameter specification), with
7337         appropriate locations and units, for use in local cross-references.
7338         (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
7339         references of type 'I' for initialization in object definition.
7340         (Output_References): move part of function Lt and procedure
7341         Write_Entity_Name outside of the body. Ignore references of types 'D'
7342         and 'I' introduced for local cross-references.
7343         (Output_Local_References): new procedure to output the local
7344         cross-references sections.
7345         (Lref_Entity_Status): new array defining whether an entity is a local
7346         * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
7347         with 'I' type when initialization expression is present.
7348         * get_scos.adb, get_scos.ads: Correct comments and typos
7349
7350 2011-08-02  Javier Miranda  <miranda@adacore.com>
7351
7352         * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
7353         the JVM target.
7354         * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
7355         the JVM target.
7356         * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
7357         TSD support.
7358
7359 2011-08-02  Vincent Celier  <celier@adacore.com>
7360
7361         * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
7362         (No_Space_Img): New function
7363         (Find_Excluded_Sources): When reading from a file, record the file name
7364         and the line number for each excluded source.
7365         (Mark_Excluded_Sources): When reporting an error, if the excluded
7366         sources were read from a file, include file name and line number in
7367         the error message.
7368
7369 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7370
7371         * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
7372
7373 2011-08-02  Robert Dewar  <dewar@adacore.com>
7374
7375         * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
7376
7377 2011-08-02  Javier Miranda  <miranda@adacore.com>
7378
7379         * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
7380         generation of TSDs to the DOTNET compiler.
7381         * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
7382         generation of TSDs to the DOTNET compiler.
7383
7384 2011-08-02  Javier Miranda  <miranda@adacore.com>
7385
7386         * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
7387         record of all the tagged types declared inside library level package
7388         declarations, library level package bodies or library level subprograms.
7389         * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
7390         associated with a given tagged type.
7391         (Build_VM_TSDs): New subprogram.
7392         * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
7393         compilation units that are subprograms.
7394         * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
7395         compilation units that are package bodies.
7396         (Expand_N_Package_Declaration): Generate TSDs of the main compilation
7397         units that are a package declaration or a package instantiation.
7398         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
7399         reorganization to improve the error generated by the frontend when the
7400         function Ada.Tags.Secondary_Tag is not available.
7401         * rtsfind.ads (RE_Register_TSD): New runtime entity.
7402         * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
7403
7404 2011-08-02  Javier Miranda  <miranda@adacore.com>
7405
7406         * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
7407
7408 2011-08-02  Robert Dewar  <dewar@adacore.com>
7409
7410         * s-imenne.ads: Minor reformatting.
7411
7412 2011-08-02  Robert Dewar  <dewar@adacore.com>
7413
7414         * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
7415         * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
7416         * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
7417
7418 2011-08-02  Robert Dewar  <dewar@adacore.com>
7419
7420         * einfo.ads (Materialize_Entity): Document this is only for renamings
7421         * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
7422         required debug information in the case where we transform the object
7423         declaration into a renaming declaration.
7424         * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
7425         object
7426         * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
7427         Materialize_Entity.
7428
7429 2011-08-02  Robert Dewar  <dewar@adacore.com>
7430
7431         * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
7432         Suppress_Init_Procs.
7433         * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
7434         Suppress_Initialization/Initialization_Suppressed.
7435         * gnat_rm.texi: New documentation for pragma Suppress_Initialization
7436         * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
7437         * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
7438         * sem_prag.adb: New processing for pragma Suppress_Initialization.
7439
7440 2011-08-02  Robert Dewar  <dewar@adacore.com>
7441
7442         * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
7443         Minor reformatting.
7444
7445 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7446
7447         * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
7448         only have inheritable classwide pre/postconditions.
7449
7450 2011-08-02  Javier Miranda  <miranda@adacore.com>
7451
7452         * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
7453         * rtsfind.ads (RE_Check_TSD): New runtime entity.
7454         * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
7455         checks if the external tag of a type is the same as the external tag
7456         of some other declaration.
7457
7458 2011-08-02  Thomas Quinot  <quinot@adacore.com>
7459
7460         * s-taskin.ads: Minor reformatting.
7461
7462 2011-08-02  Emmanuel Briot  <briot@adacore.com>
7463
7464         * g-comlin.adb (Display_Help): swap the order in which it prints the
7465         short help and the general usage.
7466
7467 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7468
7469         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
7470         the aspect declarations and attach them to the generic copy for
7471         subsequent analysis.
7472         (Analyze_Subprogram_Instantiation): copy explicitly the aspect
7473         declarations of the generic tree to the new subprogram declarations.
7474         * sem_attr.adb (Check_Precondition_Postcondition): recognize
7475         conditions that apply to a subprogram instance.
7476
7477 2011-08-02  Robert Dewar  <dewar@adacore.com>
7478
7479         * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
7480
7481 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7482
7483         * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
7484         private type with a tagged full view is not derived in the immediate
7485         scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
7486
7487 2011-08-02  Robert Dewar  <dewar@adacore.com>
7488
7489         * exp_ch4.adb: Minor reformatting.
7490
7491 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7492
7493         * sem_ch5.adb (Analyze_Loop_Statement):  If the iteration scheme is an
7494         Ada2012 iterator, the loop will be rewritten during expansion into a
7495         while loop with a cursor and an element declaration. Do not analyze the
7496         body in this case, because if the container is for indefinite types the
7497         actual subtype of the elements will only be determined when the cursor
7498         declaration is analyzed.
7499
7500 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
7501
7502         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
7503         size/alignment related attributes in CodePeer_Mode.
7504
7505 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
7506
7507         * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
7508         Prepend_Element, since this can result in the operation getting the
7509         wrong slot in the full type's dispatch table if the full type has
7510         inherited operations. The incomplete type's operation will get added
7511         to the proper position in the full type's primitives
7512         list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
7513         (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
7514         dispatching operations, since there are cases where nonprimitive
7515         subprograms can get added to the list of incomplete dependents (such
7516         as subprograms in nested packages).
7517         * sem_ch6.adb (Process_Formals): First, remove test for being in a
7518         private part when determining whether to add a primitive with a
7519         parameter of a tagged incomplete type to the Private_Dependents list.
7520         Such primitives can also occur in the visible part, and should not have
7521         been excluded from being private dependents.
7522         * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
7523         RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
7524         list of a Taft-amendment incomplete type is a primitive before issuing
7525         an error that the full type must appear in the same unit. There are
7526         cases where nonprimitives can be in the list (such as subprograms in
7527         nested packages).
7528         * sem_disp.adb (Derives_From): Use correct condition for checking that
7529         a formal's type is derived from the type of the corresponding formal in
7530         the parent subprogram (the condition was completely wrong). Add
7531         checking that was missing for controlling result types being derived
7532         from the result type of the parent operation.
7533
7534 2011-08-02  Yannick Moy  <moy@adacore.com>
7535
7536         * errout.adb (First_Node): minor renaming
7537         * restrict.adb (Check_Formal_Restriction): put restriction warning on
7538         first node.
7539
7540 2011-08-02  Yannick Moy  <moy@adacore.com>
7541
7542         * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
7543         before accessing operands.
7544         * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
7545         decide whether an initialization expression respects SPARK rules, as
7546         the plain node is the expanded one. This allows for more valid warnings
7547         to be issued.
7548         * gnat_rm.texi: Minor update.
7549
7550 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
7551
7552         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
7553         previous change.
7554
7555 2011-08-02  Robert Dewar  <dewar@adacore.com>
7556
7557         * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
7558
7559 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
7560
7561         * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
7562         loop statements and the element renaming declaration with a block when
7563         the element type is controlled.
7564
7565 2011-08-02  Yannick Moy  <moy@adacore.com>
7566
7567         * sinfo.ads: Minor formatting.
7568
7569 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7570
7571         * sem_aggr.adb (Add_Association): if the association has a box and no
7572         expression, use the Sloc of the aggregate itself for the new
7573         association.
7574         * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
7575         the Original_Node.
7576
7577 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
7578
7579         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
7580         When a container is provided via a function call, generate a renaming
7581         of the function result. This avoids the creation of a transient scope
7582         and the premature finalization of the container.
7583         * exp_ch7.adb (Is_Container_Cursor): Removed.
7584         (Wrap_Transient_Declaration): Remove the supression of the finalization
7585         of the list controller when the declaration denotes a container cursor,
7586         it is not needed.
7587
7588 2011-08-02  Yannick Moy  <moy@adacore.com>
7589
7590         * restrict.adb (Check_Formal_Restriction): only issue a warning if the
7591         node is from source, instead of the original node being from source.
7592         * sem_aggr.adb
7593         (Resolve_Array_Aggregate): refine the check for a static expression, to
7594         recognize also static ranges
7595         * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
7596         Array_Type_Declaration): postpone the test for the type being a subtype
7597         mark after the type has been resolved, so that component-selection and
7598         expanded-name are discriminated.
7599         (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
7600         to distinguish the case of an iteration scheme, so that an error is
7601         issed on a non-static range in SPARK except in an iteration scheme.
7602         * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
7603         In_Iter_Schm = True.
7604         * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
7605         user-defined operators so that they are allowed in renaming
7606         * sem_ch8.adb
7607         (Find_Selected_Component): refine the check for prefixing of operators
7608         so that they are allowed in renaming. Move the checks for restrictions
7609         on selector name after analysis discriminated between
7610         component-selection and expanded-name.
7611         * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
7612         concatenation argument of string type if it is static.
7613         * sem_util.adb, sem_util.ads
7614         (Check_Later_Vs_Basic_Declarations): add a new function
7615         Is_Later_Declarative_Item to decice which declarations are allowed as
7616         later items, in the two different modes Ada 83 and SPARK. In the SPARK
7617         mode, add that renamings are considered as later items.
7618         (Enclosing_Package): new function to return the enclosing package
7619         (Enter_Name): correct the rule for homonyms in SPARK
7620         (Is_SPARK_Initialization_Expr): default to returning True on nodes not
7621         from source (result of expansion) to avoid issuing wrong warnings.
7622
7623 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7624
7625         * errout.adb: On anything but an expression First_Node returns its
7626         argument.
7627
7628 2011-08-02  Pascal Obry  <obry@adacore.com>
7629
7630         * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
7631
7632 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
7633
7634         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
7635         Set the associated loop as the related expression of internally
7636         generated cursors.
7637         * exp_ch7.adb (Is_Container_Cursor): New routine.
7638         (Wrap_Transient_Declaration): Supress the finalization of the list
7639         controller when the declaration denotes a container cursor.
7640
7641 2011-08-02  Yannick Moy  <moy@adacore.com>
7642
7643         * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
7644         command line now.
7645         * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
7646         expression is a simple expression. This check cannot be performed in
7647         the semantics, so just drop it.
7648         (P_Index_Or_Discriminant_Constraint): move check that the index or
7649         discriminant is a subtype mark to Analyze_Subtype_Declaration in the
7650         semantics. Other cases were previously checked in the semantics.
7651         * par-ch4.adb (P_Name): move checks that a selector name is not
7652         character literal or an operator symbol to Find_Selected_Component in
7653         the semantics
7654         * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
7655         declarations are not placed after later declarations in a separate
7656         procedure in Sem_Util (possibly not the best choice?), to be used both
7657         during parsing, for Ada 83 mode, and during semantic analysis, for
7658         SPARK mode.
7659         * par-endh.adb (Check_End): move check that end label is not missing
7660         to Process_End_Label in the semantics
7661         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
7662         the special case for SPARK restriction
7663         * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
7664         * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
7665         parameter Force to issue the error message even on internal node (used
7666         for generated end label). Call Check_Restriction to check when an error
7667         must be issued. In SPARK mode, issue an error message even if the
7668         restriction is not set.
7669         (Check_Restriction): new procedure with an additional out parameter to
7670         inform the caller that a message has been issued
7671         * sem_aggr.adb: Minor modification of message
7672         * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
7673         instead of issuing an error message directly
7674         * sem_ch3.adb (Analyze_Declarations): move here the check that basic
7675         declarations are not placed after later declarations, by calling
7676         Check_Later_Vs_Basic_Declarations
7677         (Analyze_Subtype_Declaration): move here the check that an index or
7678         discriminant constraint must be a subtype mark. Change the check that
7679         a subtype of String must start at one so that it works on subtype marks.
7680         * sem_ch4.adb (Analyze_Call): move here the check that a named
7681         association cannot follow a positional one in a call
7682         * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
7683         instead of issuing an error message directly
7684         * sem_ch8.adb (Find_Selected_Component): move here the check that a
7685         selector name is not a character literal or an operator symbol. Move
7686         here the check that the prefix of an expanded name cannot be a
7687         subprogram or a loop statement.
7688         * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
7689         procedure called from parsing and semantics to check that basic
7690         declarations are not placed after later declarations
7691         (Process_End_Label): move here the check that end label is not missing
7692
7693 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
7694
7695         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
7696         representation clause in codepeer mode, since it confuses CodePeer and
7697         does not bring useful info.
7698
7699 2011-08-02  Ed Falis  <falis@adacore.com>
7700
7701         * init.c: initialize fp hw on MILS.
7702
7703 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7704
7705         * errout.adb (First_Node): for bodies, return the node itself (small
7706         optimization). For other nodes, do not check source_unit if the node
7707         comes from Standard.
7708
7709 2011-08-02  Robert Dewar  <dewar@adacore.com>
7710
7711         * exp_ch3.adb: Minor comment additions.
7712         * sem_ch13.adb: Minor reformatting.
7713
7714 2011-08-02  Pascal Obry  <obry@adacore.com>
7715
7716         * make.adb, makeutl.adb: Removes some superfluous directory separator.
7717
7718 2011-08-02  Robert Dewar  <dewar@adacore.com>
7719
7720         * sem_attr.adb: Minor reformatting.
7721
7722 2011-08-02  Robert Dewar  <dewar@adacore.com>
7723
7724         * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
7725         (Has_Default_Component_Value): Removed
7726         * einfo.ads Comment updates
7727         (Has_Default_Aspect): Replaces Has_Default_Value
7728         (Has_Default_Component_Value): Removed
7729         * exp_ch13.adb
7730         (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
7731         * exp_ch3.adb
7732         (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
7733         (Get_Simple_Init_Val): Handle Default_Value aspect
7734         (Needs_Simple_Initialization): Handle Default_Value aspect
7735         * exp_ch3.ads: Needs_Simple_Initialization
7736         * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
7737         * par-prag.adb (Pragma_Default[_Component]Value) Removed
7738         * sem_ch13.adb
7739         (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
7740         * sem_prag.adb (Pragma_Default[_Component]Value) Removed
7741         * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
7742
7743 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7744
7745         * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
7746         package containing iteration primitives.
7747         exp_ch5.adb (Expand_Iterator_Loop): ditto.
7748
7749 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7750
7751         * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
7752         "of", pre-analyze expression in case it is a function call with
7753         finalization actions that must be placed ahead of the loop.
7754         * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
7755         on an Ada2012 iterator, insert them ahead of the rewritten loop.
7756
7757 2011-08-02  Geert Bosch  <bosch@adacore.com>
7758
7759         * cstand.adb (Create_Float_Types): Only consider C's long double for
7760         Long_Long_Float, in addition to double.
7761
7762 2011-08-02  Robert Dewar  <dewar@adacore.com>
7763
7764         * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
7765         sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
7766         prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
7767         Minor reformatting.
7768
7769 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7770
7771         * sem_attr.adb: handle properly 'Result when it is a prefix of an
7772         indexed component.
7773
7774 2011-08-02  Javier Miranda  <miranda@adacore.com>
7775
7776         * einfo.ads, einfo.adb
7777         (Original_Access_Type): Move this attribute to Node26 since there was
7778         an undocumented use of Node21 in E_Access_Subprogram_Type entities
7779         which causes conflicts and breaks the generation of the .NET compiler.
7780         (Interface_Name): Add missing documentation on JGNAT only uses of
7781         this attribute.
7782
7783 2011-08-02  Geert Bosch  <bosch@adacore.com>
7784
7785         * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
7786         (Find_Back_End_Float_Type): Likewise
7787         (Create_Back_End_Float_Types): Likewise
7788         (Create_Float_Types): Likewise
7789         (Register_Float_Type): Likewise
7790         * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
7791         Nlist and split out type selection in new local Find_Base_Type function.
7792         * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
7793         Nlist
7794         * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
7795
7796 2011-08-02  Robert Dewar  <dewar@adacore.com>
7797
7798         * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
7799         alpha order).
7800         * opt.ads: Minor comment change.
7801         * sem_ch12.adb: Minor code reorganization.
7802
7803 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
7804
7805         * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
7806         subtype's list of rep items to the list on the full subtype in the case
7807         where the lists are the same.
7808
7809 2011-08-02  Geert Bosch  <bosch@adacore.com>
7810
7811         * switch-c.adb (Free): New deallocation procedure to avoid implicitly
7812         using the one from System.Strings, which also deallocates all strings.
7813
7814 2011-08-02  Geert Bosch  <bosch@adacore.com>
7815
7816         * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
7817         function.
7818         * gcc-interface/Make-lang.in: Update dependencies.
7819
7820 2011-08-02  Olivier Hainque  <hainque@adacore.com>
7821
7822         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
7823         end_locus.
7824
7825 2011-08-02  Javier Miranda  <miranda@adacore.com>
7826
7827         * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
7828         associated with anonymous access to subprograms.
7829
7830 2011-08-02  Geert Bosch  <bosch@adacore.com>
7831
7832         * opt.ads
7833         (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
7834         (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
7835         * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
7836         (Add_Symbol_Definition): Move to switch-c.adb
7837         (Process_Command_Line_Symbol_Definitions): Adjust references to above.
7838         * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
7839         (Add_Symbol_Definition): Move to switch-c.adb.
7840         * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
7841         * sem_warn.adb
7842         (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
7843         Move to warnsw.adb.
7844         * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
7845         Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
7846         Move to warnsw.adb.
7847         * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
7848         (Add_Symbol_Definition): Moved from Prepcomp.
7849         * switch-c.ads: Update copyright notice. Use String_List instead of
7850         Argument_List, removing dependency on System.OS_Lib.
7851
7852 2011-08-02  Yannick Moy  <moy@adacore.com>
7853
7854         * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
7855         mode on initialization expression which does not respect SPARK
7856         restrictions.
7857         * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
7858         if the tree referenced by its argument represents an initialization
7859         expression in SPARK, suitable for initializing an object in an object
7860         declaration.
7861
7862 2011-08-02  Javier Miranda  <miranda@adacore.com>
7863
7864         * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
7865         internally generated access to subprogram with its associated protected
7866         subprogram type.
7867         * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
7868
7869 2011-08-02  Geert Bosch  <bosch@adacore.com>
7870
7871         * cstand.adb (Register_Float_Type): Print information about type to
7872         register, if the Debug_Flag_Dot_B is set.
7873         * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
7874         * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
7875         * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
7876         with a requested precision of more than Max_Digits digits and no more
7877         than Max_Base_Digits digits, if a range specification is present and the
7878         Predefined_Float_Types list has a suitable type to derive from.
7879         * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
7880         case of type completion with pragma Import
7881         * sem_prag.adb
7882         (Process_Import_Predefined_Type): Processing to complete a type
7883         with pragma Import. Currently supports floating point types only.
7884         (Set_Convention_From_Pragma): Do nothing without underlying type.
7885         (Process_Convention): Guard against absence of underlying type,
7886         which may happen when importing incomplete types.
7887         (Process_Import_Or_Interface): Handle case of importing predefined
7888         types. Tweak error message.
7889
7890 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
7891
7892         * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
7893         functions to previous change.  Reorganize code slightly.
7894
7895 2011-08-02  Geert Bosch  <bosch@adacore.com>
7896
7897         * back_end.ads (Register_Type_Proc): New call back procedure type for
7898         allowing the back end to provide information about available types.
7899         (Register_Back_End_Types): New procedure to register back end types.
7900         * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
7901         available types.
7902         * cstand.adb (Back_End_Float_Types): New list for floating point types
7903         supported by the back end.
7904         (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
7905         (Copy_Float_Type): New procedure to make new copies of predefined types.
7906         (Register_Float_Type): New call back procedure to populate the BEFT list
7907         (Find_Back_End_Float_Type): New procedure to find a BEFT by name
7908         (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
7909         (Create_Float_Types): New procedure to create entities for floating
7910         point types predefined in Standard, and put these and any remaining
7911         BEFTs on the Predefined_Float_Types list.
7912         * stand.ads (Predefined_Float_Types): New list for predefined floating
7913         point types that do not have declarations in package Standard.
7914
7915 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
7916
7917         * inline.adb (Get_Code_Unit_Entity): New local function.  Returns the
7918         entity node for the unit containing the parameter.
7919         (Add_Inlined_Body): Use it to find the unit containing the subprogram.
7920         (Add_Inlined_Subprogram): Likewise.
7921         * gcc-interface/Make-lang.in: Update dependencies.
7922
7923 2011-08-02  Thomas Quinot  <quinot@adacore.com>
7924
7925         * s-stusta.adb (Print): Make sure Pos is always initialized to a
7926         suitable value.
7927
7928 2011-08-02  Geert Bosch  <bosch@adacore.com>
7929
7930         * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
7931
7932 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
7933
7934         * sem_type.adb (Covers): Move trivial case to the top and reuse the
7935         computed value of Base_Type.
7936
7937 2011-08-02  Yannick Moy  <moy@adacore.com>
7938
7939         * restrict.adb (Check_Restriction): issue an error for any use of
7940         class-wide, even if the No_Dispatch restriction is not set.
7941         * sem_aggr.adb: Correct typos in comments and messages in formal mode
7942         * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
7943         when completing a private extension, the type named in the private part
7944         is not the same as that named in the visible part.
7945         * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
7946         of an inherited primitive operations of a tagged type or type extension
7947         that returns the tagged type.
7948         * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
7949         function which returns True for an implicit operation inherited by the
7950         derived type declaration for the argument type.
7951         (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
7952         order.
7953
7954 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7955
7956         * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
7957         Process_Bounds, to perform analysis with expansion of a range or an
7958         expression that is the iteration scheme for a loop.
7959         (Analyze_Iterator_Specification): If domain of iteration is given by a
7960         function call with a controlled result, as is the case if call returns
7961         a predefined container, ensure that finalization actions are properly
7962         generated.
7963         * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
7964
7965 2011-08-02  Javier Miranda  <miranda@adacore.com>
7966
7967         * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
7968         * gcc-interface/Make-lang.in: Update dependencies.
7969
7970 2011-08-02  Javier Miranda  <miranda@adacore.com>
7971
7972         * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
7973         determine if the analysis is performed using N or Original_Node (N).
7974         * exp_util.adb (Side_Effect_Free): Code cleanup since the new
7975         functionality of routine Is_Variable avoids code duplication.
7976         * checks.adb (Determine_Range): Handle temporaries generated by
7977         Remove_Side_Effects.
7978
7979 2011-08-02  Javier Miranda  <miranda@adacore.com>
7980
7981         * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
7982         expansion of the condition. Required since the previous analysis was
7983         done with expansion disabled (see Resolve_Quantified_Expression) and
7984         hence checks were not inserted and record comparisons have not been
7985         expanded.
7986
7987 2011-08-02  Ed Falis  <falis@adacore.com>
7988
7989         * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
7990         Update header.
7991
7992 2011-08-02  Bob Duff  <duff@adacore.com>
7993
7994         * opt.ads: Minor comment fix.
7995
7996 2011-08-02  Bob Duff  <duff@adacore.com>
7997
7998         * sem_ch12.adb (Analyze_Package_Instantiation,
7999         Analyze_Subprogram_Instantiation): Turn off style checking while
8000         analyzing an instance. Whatever style checks that apply to the generic
8001         unit should apply, so it makes no sense to apply them in an instance.
8002         This was causing trouble when compiling an instance of a runtime
8003         unit that violates the -gnatyO switch.
8004         * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
8005         one of the two case statements, causing spurious errors.
8006
8007 2011-08-02  Robert Dewar  <dewar@adacore.com>
8008
8009         * uname.adb: Minor reformatting.
8010         * gnatcmd.adb: Minor reformatting.
8011         * exp_attr.adb: Minor reformatting.
8012
8013 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8014
8015         * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
8016         No_Dispatching_Calls, do not look for the Assign primitive, because
8017         predefined primitives are not created in this case.
8018
8019 2011-08-02  Bob Duff  <duff@adacore.com>
8020
8021         * stylesw.ads: Minor comment fixes.
8022
8023 2011-08-02  Robert Dewar  <dewar@adacore.com>
8024
8025         * freeze.adb (Add_To_Result): New procedure.
8026
8027 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
8028
8029         * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
8030         time, if the specific run-time routines for handling streams of strings
8031         are not available, use the default mechanism.
8032
8033 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
8034
8035         * s-regpat.ads: Fix typo.
8036
8037 2011-08-02  Vincent Celier  <celier@adacore.com>
8038
8039         * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
8040         not null, call it to create the in memory config project file without
8041         parsing an existing default config project file.
8042
8043 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
8044
8045         * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
8046
8047 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8048
8049         * sem_elim.adb: an abstract subprogram does not need an eliminate
8050         pragma for its descendant to be eliminable.
8051
8052 2011-08-02  Ed Falis  <falis@adacore.com>
8053
8054         * init.c: revert to handling before previous checkin for VxWorks
8055         * s-intman-vxworks.adb: delete unnecessary declarations related to
8056         using Ada interrupt facilities for handling signals.
8057         Delete Initialize_Interrupts. Use __gnat_install_handler instead.
8058         * s-intman-vxworks.ads: Import __gnat_install_handler as
8059         Initialize_Interrupts.
8060         * s-taprop-vxworks.adb: Delete Signal_Mask.
8061         (Abort_Handler): change construction of mask to unblock exception
8062         signals.
8063
8064 2011-08-02  Jerome Guitton  <guitton@adacore.com>
8065
8066         * a-except-2005.adb (Raise_From_Signal_Handler): Call
8067         Debug_Raise_Exception before propagation starts.
8068
8069 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
8070
8071         * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
8072         to Restriction_Check_Required.
8073         * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
8074         * sem_res.adb (Resolve_Call): Likewise.
8075         * sem_attr.adb (Check_Stream_Attribute): Likewise.
8076
8077 2011-08-02  Bob Duff  <duff@adacore.com>
8078
8079         * stylesw.ads: Update comment.
8080         * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
8081         * errout.ads: Remove obsolete comment.
8082
8083 2011-08-02  Javier Miranda  <miranda@adacore.com>
8084
8085         * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
8086         (Set_Is_Safe_To_Reevaluate): new procedure.
8087         * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
8088         assignment is allowed on safe-to-reevaluate variables.
8089         (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
8090         temporary created to remove side effects in expressions that use
8091         the secondary stack as safe-to-reevaluate.
8092         * exp_util.adb (Side_Effect_Free): Add missing code to handle well
8093         variables that are not true constants.
8094
8095 2011-08-02  Robert Dewar  <dewar@adacore.com>
8096
8097         * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
8098         sem_res.adb, sem_ch6.adb: Minor reformatting.
8099
8100 2011-08-02  Jerome Guitton  <guitton@adacore.com>
8101
8102         * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
8103
8104 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8105
8106         * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
8107         not set Overridden_Operation if subprogram is an initialization
8108         procedure.
8109
8110 2011-08-02  Yannick Moy  <moy@adacore.com>
8111
8112         * par-ch6.adb: Correct obsolete name in comments
8113         * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
8114         which takes two message arguments (existing function takes one), with
8115         second message used for continuation.
8116         * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
8117         block statements that originate from a source block statement, not
8118         generated block statements
8119         * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
8120         symmetry with procedure case
8121         * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
8122         function to issue an error in formal mode if a package specification
8123         contains more than one tagged type or type extension.
8124         * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
8125         parameters matching formals of tagged types are objects (or ancestor
8126         type conversions of objects), not general expressions. Issue an error
8127         on view conversions that are not involving ancestor conversion of an
8128         extended type.
8129         (Resolve_Type_Conversion): in formal mode, issue an error on the
8130         operand of an ancestor type conversion which is not an object
8131         * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
8132         procedure so that it works also for actuals of function calls
8133         (Is_Actual_Tagged_Parameter): new function which determines if its
8134         argument is an actual parameter of a formal of tagged type in a
8135         subprogram call
8136         (Is_SPARK_Object_Reference): new function which determines if the tree
8137         referenced by its argument represents an object in SPARK
8138
8139 2011-08-02  Robert Dewar  <dewar@adacore.com>
8140
8141         * sem_ch3.adb: Minor reformatting
8142         Minor comment addition
8143         Minor error msg text change
8144
8145 2011-08-02  Javier Miranda  <miranda@adacore.com>
8146
8147         * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
8148         function. Used to be more precise when we generate a variable plus one
8149         assignment to remove side effects in the evaluation of the Bound
8150         expressions.
8151         (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
8152         of the bound expression to force its re-analysis and thus expand the
8153         associated transient scope (if required). Code cleanup replacing the
8154         previous code that declared the constant entity by an invocation to
8155         routine Force_Evaluation which centralizes this work in the frontend.
8156
8157 2011-08-02  Robert Dewar  <dewar@adacore.com>
8158
8159         * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
8160         (Base_Type): Now uses improved Is_Base_Type function
8161         * einfo.ads (Base_Type): Inline this function
8162
8163 2011-08-02  Robert Dewar  <dewar@adacore.com>
8164
8165         * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
8166         (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
8167
8168 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
8169
8170         * gcc-interface/Make-lang.in: Update dependencies.
8171         * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
8172         targets.
8173
8174 2011-08-02  Yannick Moy  <moy@adacore.com>
8175
8176         * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
8177         non-simple expression used in delta constraint
8178         (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
8179         index constraint which is not a subtype mark
8180         * par.adb: With and use Restrict
8181         * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
8182         mode on component type which is not a subtype mark and default
8183         expression on component
8184         (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
8185         of string which does not have a lower index bound equal to 1
8186         (Array_Type_Declaration): issue an error in formal mode on index or
8187         component type which is not a subtype mark, and on aliased keyword on
8188         component
8189         (Derived_Type_Declaration): issue an error in formal mode on interface,
8190         limited or abstract type
8191         (Record_Type_Declaration): issue an error in formal mode on interface
8192         (Record_Type_Definition): issue an error in formal mode on tagged types
8193         and type extensions not declared in the specification of a library unit
8194         package; on null non-tagged record; on variant part
8195
8196 2011-08-02  Vincent Celier  <celier@adacore.com>
8197
8198         * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
8199         not declared for qualified library project when Library_Name is not
8200         declared, but Library_Dir is.
8201
8202 2011-08-02  Robert Dewar  <dewar@adacore.com>
8203
8204         * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
8205         pragmas (affects aspects [Component_]Default_Value
8206         (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
8207         component type for the resolution
8208
8209 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
8210
8211         * einfo.adb (Base_Type): Tune implementation for speed.
8212
8213 2011-08-02  Robert Dewar  <dewar@adacore.com>
8214
8215         * freeze.adb: Minor reformatting.
8216
8217 2011-08-02  Thomas Quinot  <quinot@adacore.com>
8218
8219         * scos.ads: Update comments.
8220
8221 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8222
8223         * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
8224         base type, because the parent may be a subtype of a private type whose
8225         convention is established in a private part.
8226
8227 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
8228
8229         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
8230         statement in a block when the expansion of the return expression has
8231         created a finalization chain.
8232         * freeze.adb (Freeze_Expression): Alphabetize all choices associated
8233         with the parent node.
8234         Add N_Extended_Return_Statement to handle the case where a transient
8235         object declaration appears in the Return_Object_Declarations list of
8236         an extended return statement.
8237
8238 2011-08-02  Matthew Gingell  <gingell@adacore.com>
8239
8240         * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
8241         unused parameter 'name'.
8242
8243 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8244
8245         * sem_elim.adb (Set_Eliminated): If the overridden operation is an
8246         inherited operation, check whether its alias, which is the source
8247         operastion that it renames, has been marked eliminated.
8248
8249 2011-08-02  Javier Miranda  <miranda@adacore.com>
8250
8251         * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
8252         in-mode parameter whose type is an access type since it can be used to
8253         modify its designated object. Enforce code that handles as safe an
8254         access type that is not access-to-constant but it is the result of a
8255         previous removal of side-effects.
8256         (Remove_Side_Effects): Minor code reorganization of cases which require
8257         no action. Done to incorporate documentation on new cases uncovered
8258         working in this ticket: no action needed if this routine was invoked
8259         too early and the nodes are not yet decorated.
8260         * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
8261         to routine Remove_Side_Effects by calls to Force_Evaluation since they
8262         were issued with actuals that are implicitly provided by
8263         Force_Evaluation.
8264
8265 2011-08-02  Robert Dewar  <dewar@adacore.com>
8266
8267         * sem_ch3.adb, sem_res.adb: Minor reformatting.
8268
8269 2011-08-02  Yannick Moy  <moy@adacore.com>
8270
8271         * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
8272         to issue an error in formal mode on attribute not supported in this mode
8273         (Analyze_Attribute): issue errors on standard attributes not supported
8274         in formal mode.
8275         * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
8276         comment, and issue error in formal mode on modulus which is not a power
8277         of 2.
8278         (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
8279         range.
8280         * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
8281         subtype mark.
8282         * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
8283         operator on modular type (except 'not').
8284
8285 2011-08-02  Robert Dewar  <dewar@adacore.com>
8286
8287         * gnat_rm.texi: Minor reformatting.
8288
8289 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
8290
8291         * s-osinte-linux.ads: Minor comment update and reformatting.
8292         * i-cexten.ads: Make this unit pure, as for its parent.
8293         Will allow its usage in more contexts if needed.
8294
8295 2011-08-02  Robert Dewar  <dewar@adacore.com>
8296
8297         * s-utf_32.ads: Minor comment fix.
8298
8299 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8300
8301         * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
8302         operation of a tagged synchronized type, handle the case where the
8303         controlling argument is overloaded.
8304
8305 2011-08-02  Yannick Moy  <moy@adacore.com>
8306
8307         * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
8308         Replace pragma SPARK_95 with pragma Restrictions (SPARK)
8309         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
8310         SPARK mode and formal verification mode on processing SPARK restriction
8311         * s-rident.ads (Restriction_Id): add SPARK restriction in those not
8312         requiring consistency checking.
8313
8314 2011-08-02  Robert Dewar  <dewar@adacore.com>
8315
8316         * sem_res.adb: Minor reformatting.
8317
8318 2011-08-02  Robert Dewar  <dewar@adacore.com>
8319
8320         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8321         a-cforse.ads: Remove unneeded with of Ada.Containers
8322         Remove commented out pragma Inline's
8323         Move specifications of new subprograms to the actual specs
8324
8325 2011-08-02  Yannick Moy  <moy@adacore.com>
8326
8327         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8328         a-cforse.ads: Update comments.
8329
8330 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8331
8332         * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
8333
8334 2011-08-02  Robert Dewar  <dewar@adacore.com>
8335
8336         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8337         a-cforse.ads, a-cofove.ads: Minor reformatting.
8338
8339 2011-08-02  Claire Dross  <dross@adacore.com>
8340
8341         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
8342         a-cofove.ads: Add comments.
8343
8344 2011-08-02  Yannick Moy  <moy@adacore.com>
8345
8346         * gnat_rm.texi: Document formal containers.
8347
8348 2011-08-02  Emmanuel Briot  <briot@adacore.com>
8349
8350         * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
8351         are empty sections.
8352
8353 2011-08-02  Robert Dewar  <dewar@adacore.com>
8354
8355         * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
8356         reformatting.
8357
8358 2011-08-02  Robert Dewar  <dewar@adacore.com>
8359
8360         * aspects.adb: New aspects Default_Value and Default_Component_Value
8361         New format of Aspect_Names table checks for omitted entries
8362         * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
8363         handling of boolean aspects for derived types.
8364         New aspects Default_Value and Default_Component_Value
8365         New format of Aspect_Names table checks for omitted entries
8366         * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
8367         (Has_Default_Value): New flag
8368         (Has_Default_Component_Value): New flag
8369         (Has_Default_Value): New flag
8370         * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
8371         table.
8372         * par-prag.adb: New pragmas Default_Value and Default_Component_Value
8373         * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
8374         Default_Value and Default_Component_Value
8375         * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
8376         New aspects Default_Value and Default_Component_Value
8377         * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
8378         * sprint.adb: Print N_Aspect_Specification node when called from gdb
8379
8380 2011-08-02  Vincent Celier  <celier@adacore.com>
8381
8382         * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
8383         inherit library kind.
8384
8385 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8386
8387         * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
8388         Minor reformatting.
8389
8390 2011-08-02  Robert Dewar  <dewar@adacore.com>
8391
8392         * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
8393
8394 2011-08-02  Yannick Moy  <moy@adacore.com>
8395
8396         * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
8397
8398 2011-08-02  Robert Dewar  <dewar@adacore.com>
8399
8400         * impunit.adb: Add comment.
8401
8402 2011-08-02  Yannick Moy  <moy@adacore.com>
8403
8404         * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
8405         qualification of aggregates in formal mode
8406         (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
8407         another aggregate
8408         (Resolve_Aggregate): complete the test that an aggregate is adequately
8409         qualified in formal mode
8410
8411 2011-08-02  Pascal Obry  <obry@adacore.com>
8412
8413         * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
8414         * mlib-prj.adb: Supress warning when compiling binder generated file.
8415         (Build_Library): Supress all warnings when compiling the binder
8416         generated file.
8417
8418 2011-08-02  Yannick Moy  <moy@adacore.com>
8419
8420         * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
8421         from here...
8422         * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
8423         * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
8424         Add with/use clauses to make Check_Formal_Restriction visible
8425
8426 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8427
8428         * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
8429         in-parameters when type of the generic formal is private in the generic
8430         spec and non-private in the body.
8431
8432 2011-08-02  Claire Dross  <dross@adacore.com>
8433
8434         * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
8435         a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
8436         a-cofove.adb, a-cofove.ads: New files implementing formal containers.
8437         * impunit.adb, Makefile.rtl: Take new files into account.
8438
8439 2011-08-02  Robert Dewar  <dewar@adacore.com>
8440
8441         * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
8442         sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
8443
8444 2011-08-02  Yannick Moy  <moy@adacore.com>
8445
8446         * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
8447         formal mode
8448         * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
8449         matching static array bounds, taking into account the special case of
8450         string literals
8451         * sem_ch3.adb: Typo in comment.
8452
8453 2011-08-02  Yannick Moy  <moy@adacore.com>
8454
8455         * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
8456         which issues an error in formal mode if its argument node is originally
8457         from source
8458         * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
8459         has a discriminant specification so that it does not include the case
8460         of derived types
8461         (Derived_Type_Declaration): move here the test that a derived type has a
8462         discriminant specification
8463         * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
8464         first element of a component association before accessing its choices
8465         (presence of component association is not enough)
8466         * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
8467         declaration is a library item before accessing the next element in a
8468         list, as library items are not member of lists
8469         * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
8470         sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
8471         Check_Formal_Restriction whenever possible.
8472
8473 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8474
8475         * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
8476         reference when needed.
8477
8478 2011-08-02  Bob Duff  <duff@adacore.com>
8479
8480         * gnat_ugn.texi: Fix typo.
8481
8482 2011-08-02  Vincent Celier  <celier@adacore.com>
8483
8484         * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
8485         archive file name. Do not use the full path name of archives for Open
8486         VMS.
8487
8488 2011-08-02  Robert Dewar  <dewar@adacore.com>
8489
8490         * sem_ch12.adb, sem_ch11.adb: New calling sequence for
8491         Analyze_Aspect_Specifications
8492         * sem_ch13.adb
8493         (Analyze_Aspect_Specifications): New handling for boolean aspects
8494         * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
8495         * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
8496         sequence for Analyze_Aspect_Specifications
8497         * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
8498         * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
8499
8500 2011-08-02  Robert Dewar  <dewar@adacore.com>
8501
8502         * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
8503         aspects, since these no longer exist.
8504
8505 2011-08-02  Robert Dewar  <dewar@adacore.com>
8506
8507         * par-ch13.adb (Aspect_Specifications_Present): Always return false on
8508         semicolon, do not try to see if there are aspects following it.
8509         * par-ch3.adb (P_Declarative_Items): Better message for unexpected
8510         aspect spec.
8511
8512 2011-08-02  Robert Dewar  <dewar@adacore.com>
8513
8514         * sem_ch8.adb, aspects.ads: Minor reformatting.
8515
8516 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
8517
8518         * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
8519         * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
8520         extracted from...
8521         (Analyze_Aspect_Specifications): ...here.  Call above procedure.
8522
8523 2011-08-02  Yannick Moy  <moy@adacore.com>
8524
8525         * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
8526         mode on subprogram declaration outside of package specification, unless
8527         it is followed by a pragma Import
8528         * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
8529         Access_Type_Declaration): issue error in formal mode on access type
8530         (Analyze_Incomplete_Type_Decl): issue error in formal mode on
8531         incomplete type
8532         (Analyze_Object_Declaration): issue error in formal mode on object
8533         declaration which does not respect SPARK restrictions
8534         (Analyze_Subtype_Declaration): issue error in formal mode on subtype
8535         declaration which does not respect SPARK restrictions
8536         (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
8537         error in formal mode on digits or delta constraint
8538         (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
8539         decimal fixed point type
8540         (Derived_Type_Declaration): issue error in formal mode on derived type
8541         other than type extensions of tagged record types
8542         * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
8543         with check on access definition
8544         * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
8545         mode on protected definition.
8546         (Analyze_Task_Definition): issue error in formal mode on task definition
8547
8548 2011-08-02  Robert Dewar  <dewar@adacore.com>
8549
8550         * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
8551
8552 2011-08-02  Javier Miranda  <miranda@adacore.com>
8553
8554         * sem_ch6.adb (Can_Override_Operator): New function.
8555         (Verify_Overriding_Indicator): Add missing code to check overriding
8556         indicator in operators. Fixes regression.
8557         (Check_Overriding_Indicator): Minor reformating after replacing the
8558         code that evaluates if the subprogram can override an operator by
8559         invocations to the above new function.
8560         * einfo.adb
8561         (Write_Field26_Name): Add missing code to ensure that, following
8562         the documentation in einfo.ads, this field is not shown as attribute
8563         "Static_Initialization" on non-dispatching functions.
8564
8565 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
8566
8567         * sem_res.adb (Resolve_Call): A call to
8568         Ada.Real_Time.Timing_Events.Set_Handler violates restriction
8569         No_Relative_Delay (AI-0211) only when it sets a relative timing event,
8570         i.e., when the second parameter is of type Time_Span.
8571
8572 2011-08-02  Vincent Celier  <celier@adacore.com>
8573
8574         * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
8575         with an archive instead of -L<library dir> -l<library name>.
8576
8577 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8578
8579         * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
8580         mark the base types In_Use in addition to making the operations
8581         use_visible.
8582
8583 2011-08-02  Ed Falis  <falis@adacore.com>
8584
8585         * init.c: add and setup __gnat_signal_mask for the exception signals
8586         * s-inmaop-vxworks.adb: new file.
8587         * s-intman-vxworks.adb: remove unnecessary initializations and
8588         simplify remaining
8589         * s-intman-vxworks.ads: remove unnecessary variable
8590         * s-taprop-vxworks.adb: simplify signal initialization
8591
8592 2011-08-02  Robert Dewar  <dewar@adacore.com>
8593
8594         * sem_ch8.adb: Minor code reorganization, comment updates.
8595
8596 2011-08-02  Robert Dewar  <dewar@adacore.com>
8597
8598         * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
8599         * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
8600         here from Sem_Res.
8601         (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
8602         (Matching_Static_Array_Bounds): Moved here from Sem_Res
8603
8604 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8605
8606         * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
8607         * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
8608         * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
8609         use_type_clauses, to handle more efficiently use_type and use_all_type
8610         constructs.
8611         * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
8612         Ada2012 Use_All_Type clause.
8613         (Use_Class_Wide_Operations): new procedure.
8614
8615 2011-08-02  Robert Dewar  <dewar@adacore.com>
8616
8617         * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
8618         sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
8619         expression to expression function.
8620
8621 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8622
8623         * sem_ch4.adb: transform simple Ada2012 membership into equality only
8624         if types are compatible.
8625
8626 2011-08-02  Yannick Moy  <moy@adacore.com>
8627
8628         * sem_res.adb (Matching_Static_Array_Bounds): new function which
8629         returns True if its argument array types have same dimension and same
8630         static bounds at each index.
8631         (Resolve_Actuals): issue an error in formal mode on actuals passed as
8632         OUT or IN OUT paramaters which are not view conversions in SPARK.
8633         (Resolve_Arithmetic_Op): issue an error in formal mode on
8634         multiplication or division with operands of fixed point types which are
8635         not qualified or explicitly converted.
8636         (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
8637         Boolean or array type (except String) operands.
8638         (Resolve_Equality_Op): issue an error in formal mode on equality
8639         operators for array types other than String with non-matching static
8640         bounds.
8641         (Resolve_Logical_Op): issue an error in formal mode on logical operators
8642         for array types with non-matching static bounds. Factorize the code in
8643         Matching_Static_Array_Bounds.
8644         (Resolve_Qualified_Expression): issue an error in formal mode on
8645         qualified expressions for array types with non-matching static bounds.
8646         (Resolve_Type_Conversion): issue an error in formal mode on type
8647         conversion for array types with non-matching static bounds
8648
8649 2011-08-02  Robert Dewar  <dewar@adacore.com>
8650
8651         * par-ch10.adb: Minor code reorganization (use Nkind_In).
8652
8653 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8654
8655         * par-ch9.adb: save location of entry for proper error message.
8656
8657 2011-08-02  Javier Miranda  <miranda@adacore.com>
8658
8659         * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
8660         (Use_Full_View) which permits this routine to climb through the
8661         ancestors using the full-view of private parents.
8662         * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
8663         Use_Full_View to true in calls to Is_Ancestor.
8664         * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
8665         true in call to Is_Ancestor.
8666         * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
8667         Use_Full_View to true in call to Is_Ancestor.
8668         * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
8669         call to Is_Ancestor.
8670         * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
8671         Use_Full_View to true in calls to Is_Ancestor.
8672         * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
8673         Make_Select_Specific_Data_Table, Register_Primitive,
8674         Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
8675         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
8676         to true in call to Is_Ancestor.
8677         * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
8678         Use_Full_View to true in calls to Is_Ancestor.
8679         * exp_cg.adb
8680         (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
8681         (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
8682
8683 2011-08-02  Robert Dewar  <dewar@adacore.com>
8684
8685         * gnat_rm.texi: Minor reformatting.
8686         * sem_prag.adb: Minor reformatting.
8687
8688 2011-08-02  Tristan Gingold  <gingold@adacore.com>
8689
8690         * vms_data.ads: Add VMS qualifier for -gnateP.
8691
8692 2011-08-02  Robert Dewar  <dewar@adacore.com>
8693
8694         * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
8695         * par-ch7.adb (P_Package): Proper placement of aspects for package
8696         decl/instantiation.
8697         * par-endh.adb (Check_End): Ad Is_Sloc parameter
8698         (End_Statements): Add Is_Sloc parameterr
8699         * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
8700         (Check_End): Ad Is_Sloc parameter
8701         (End_Statements): Add Is_Sloc parameterr
8702
8703 2011-08-02  Vincent Celier  <celier@adacore.com>
8704
8705         * ug_words: Add VMS qualifier equivalent to -gnateP:
8706         /SYMBOL_PREPROCESSING.
8707
8708 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
8709
8710         * gnat-style.texi: For hexadecimal numeric literals the typical
8711         grouping of digits is 4 to represent 2 bytes.
8712         A procedure spec which is split into several lines is indented two
8713         characters.
8714
8715 2011-08-02  Yannick Moy  <moy@adacore.com>
8716
8717         * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
8718         * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
8719         (Resolve_Aggregate): issue errors in formal modes when aggregate is not
8720         properly qualified
8721         (Resolve_Array_Aggregate): issue errors in formal modes on non-static
8722         choice in array aggregate
8723         (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
8724         mark as ancestor
8725         (Resolve_Record_Aggregate): issue errors in formal modes on mixed
8726         positional and named aggregate for record, or others in record
8727         aggregate, or multiple choice in record aggregate
8728         * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
8729         array operands to logical operations AND, OR and XOR do not have the
8730         same static lower and higher bounds
8731         * sem_ch5.adb, sinfo.ads: Correct typos in comments
8732
8733 2011-08-01  Robert Dewar  <dewar@adacore.com>
8734
8735         * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
8736         Replaces Last_Source_Node_In_Sequence.
8737         * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
8738         * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
8739         parens and blank in string (this was inconsistently implemented).
8740         * errout.ads
8741         (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
8742         blank in string (this was inconsistently implemented).
8743         * gnat1drv.adb
8744         (Set_Global_Switches): Set formal mode switches appropriately
8745         * opt.ads, opt.adb: Formal mode is now global switches, more consistent
8746         * par-prag.adb
8747         (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
8748         call Set_Error_Msg_Lang to set "spark" as language name.
8749         * par.adb: Remove unnecessary call to set formal language for errout
8750         * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
8751         appropriately and call Set_Error_Msg_Lang to set "spark" as language
8752         name.
8753         * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
8754         calls to it, moved after resolution so that types are known
8755         * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
8756         result of concatenation is not of type String
8757         (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
8758         concatenation is not properly restricted
8759         * gnat_rm.texi: Add doc on pragma Spark_95.
8760         * gcc-interface/Makefile.in: Remove obsolete target pairs for
8761         Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
8762         * gcc-interface/Make-lang.in: Update dependencies.
8763
8764 2011-08-01  Javier Miranda  <miranda@adacore.com>
8765
8766         * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
8767         condition that detects if the overridden operation must replace an
8768         existing entity.
8769
8770 2011-08-01  Javier Miranda  <miranda@adacore.com>
8771
8772         * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
8773         code declarations inserted by Insert_Actions in each alternative of the
8774         N_Case_Expression node.
8775
8776 2011-08-01  Robert Dewar  <dewar@adacore.com>
8777
8778         * sem_ch6.adb: Minor code reorganization.
8779         * sem_util.adb: Minor reformatting.
8780
8781 2011-08-01  Pascal Obry  <obry@adacore.com>
8782
8783         * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
8784         * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
8785
8786 2011-08-01  Yannick Moy  <moy@adacore.com>
8787
8788         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
8789         literal or operator symbol which is prefixed
8790         * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
8791         mode on access attributes.
8792         * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
8793         that concatenation operands are properly restricted in formal mode
8794         (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
8795         Analyze_Concatenation_Operand. Issue an error in formal mode if the
8796         result of the concatenation has a type different from String.
8797         (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
8798         Analyze_Quantified_Expression, Analyze_Slice,
8799         Analyze_Null): issue an error in formal mode on unsupported constructs
8800         * sem_ch5.adb
8801         (Analyze_Block_Statement): only issue error on source block statement
8802         * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
8803         function which returns the last node in a list of nodes for which
8804         Comes_From_Source returns True, if any
8805         * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
8806         Last_Source_Node_In_Sequence
8807         * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
8808         Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
8809         mode on unsupported constructs
8810         * sem_ch9.adb Do not return after issuing error in formal mode, as the
8811         rest of the actions may be needed later on since the error is marked as
8812         not serious.
8813         * sinfo.ads: Typos in comments.
8814
8815 2011-08-01  Pascal Obry  <obry@adacore.com>
8816
8817         * projects.texi: Minor editing.
8818
8819 2011-08-01  Yannick Moy  <moy@adacore.com>
8820
8821         * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
8822         insertion character ~~
8823         * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
8824         (Set_Error_Msg_Lang): new procedure which fixes the language for use
8825         with insertion character ~~
8826         (Set_Msg_Text): treat insertion character ~~
8827         * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
8828         sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
8829         Formal_Error_Msg_... procedures by equivalent Error_Msg_...
8830         procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
8831         errors related to the formal language restriction not serious
8832         (insertion character |).
8833         * par.adb (Par): set formal language for error messages if needed
8834         * sem_ch6.adb (Check_Missing_Return): take into account possible
8835         generated statements at the end of the function
8836         * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
8837         enumeration value to define a new pragma SPARK_95
8838         * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
8839         SPARK_Version): new type and variables to store the SPARK version
8840         (none by default).
8841         (SPARK_Mode): return True when SPARK_Version is set
8842         * par-prag.adb: Correct indentation
8843         (Prag): take Pragma_SPARK_95 into account
8844         * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
8845         into account.
8846
8847 2011-08-01  Robert Dewar  <dewar@adacore.com>
8848
8849         * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
8850         sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
8851         sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
8852
8853 2011-08-01  Pascal Obry  <obry@adacore.com>
8854
8855         * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
8856         Target_Name to Get_Path call.
8857         (Parse_Single_Project): Likewise.
8858         (Post_Parse_Context_Clause): Likewise.
8859         * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
8860         Call Initialise_Project_Path with the proper Target_Name.
8861         (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
8862         search path.
8863         (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
8864         with the proper Target_Name.
8865         * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
8866         Part.Parse routine.
8867         (Parse_Project_And_Apply_Config): Likewise.
8868         * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
8869         This is fine as this part of the code is supporting only native
8870         compilation.
8871         * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
8872         is fine as this part of the code is supporting only native compilation.
8873
8874 2011-08-01  Yannick Moy  <moy@adacore.com>
8875
8876         * sem_util.adb (Enter_Name): issue error in formal mode on declaration
8877         of homonym, unless the homonym is one of the cases allowed in SPARK
8878         * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
8879         package declaration occurring after a body.
8880
8881 2011-08-01  Robert Dewar  <dewar@adacore.com>
8882
8883         * checks.adb, exp_ch4.adb: Minor reformatting.
8884
8885 2011-08-01  Javier Miranda  <miranda@adacore.com>
8886
8887         * einfo.ads (Access_Disp_Table): Fix documentation.
8888         (Dispatch_Table_Wrappers): Fix documentation.
8889
8890 2011-08-01  Pascal Obry  <obry@adacore.com>
8891
8892         * prj-env.adb, prj-env.ads: Minor reformatting.
8893
8894 2011-08-01  Yannick Moy  <moy@adacore.com>
8895
8896         * sem_util.ads, sem_util.adb, par.adb, par_util.adb
8897         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
8898         procedures out of these packages.
8899         * errout.ads, errout.adb
8900         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
8901         procedures in of this package
8902         (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
8903         * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
8904         on misplaced later vs initial declarations, like in Ada 83
8905         * sem_attr.adb (Processing for Analyze_Attribute): issue error in
8906         formal mode on attribute of private type whose full type declaration
8907         is not visible
8908         * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
8909         package declaration inside a package specification
8910         (Analyze_Full_Type_Declaration): issue error in formal mode on
8911         controlled type or discriminant type
8912         * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
8913         user-defined operator means that it should come from the source
8914         (New_Overloaded_Entity): issue error in formal mode on overloaded
8915         entity.
8916         * sem_ch6.ads, sem_ch13.ads: typos in comments.
8917
8918 2011-08-01  Thomas Quinot  <quinot@adacore.com>
8919
8920         * atree.adb: Minor reformatting.
8921         * checks.adb: Minor reformatting.
8922
8923 2011-08-01  Vincent Celier  <celier@adacore.com>
8924
8925         * s-parame-vms-ia64.ads: Fix typo in comment
8926         Minor reformatting
8927         * s-parame-vms-restrict.ads: Removed, unused.
8928
8929 2011-08-01  Javier Miranda  <miranda@adacore.com>
8930
8931         * exp_ch3.adb
8932         (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
8933         * sem_ch3.adb
8934         (Constrain_Index): Remove side effects in the evaluation of the bounds.
8935         * sem_ch3.ads, sem_ch3.adb
8936         (Is_Constant_Bound): New extended version of the subprogram that was
8937         previously located inside function Exp_Ch3.Is_Variable_Size_Array.
8938         Moved here since it is shared by routines of sem_ch3 and exp_ch3.
8939         * sem_aux.ads (Constant_Value): Fix typo in comment.
8940         * checks.adb (Generate_Index_Checks): New implementation which, for
8941         array objects with constant bounds, generates the runtime check
8942         referencing the bounds of the array type. For other cases this routine
8943         provides its previous behavior obtaining such values from the array
8944         object.
8945         * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
8946         parent type.
8947         * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
8948         we cannot have semantic interpretations of the new node.
8949
8950 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
8951
8952         * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
8953         expressions.
8954
8955 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
8956
8957         * sem_ch8.adb: Minor code editing.
8958         * s-vxwext.adb: Remove trailing space.
8959         * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
8960         consistency with other files.
8961
8962 2011-08-01  Thomas Quinot  <quinot@adacore.com>
8963
8964         * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
8965
8966 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
8967
8968         * par-ch10.adb: reject parameterized expressions as compilation unit.
8969         * sem_ch4.adb: handle properly conditional expression with overloaded
8970         then_clause and no else_clause.
8971
8972 2011-08-01  Tristan Gingold  <gingold@adacore.com>
8973
8974         * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
8975         like done by System.Aux_DEC.
8976         * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
8977
8978 2011-08-01  Yannick Moy  <moy@adacore.com>
8979
8980         * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
8981         missing label at end of declaration (subprogram or package)
8982         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
8983         of positional and named parameter association
8984         * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
8985         Error_Msg_SP which adds a prefix to the error message giving the name
8986         of the formal language analyzed
8987         * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
8988         access result type in subprogram, unconstrained array as result type,.
8989         (Analyze_Subprogram_Declaration): issue an error in formal mode for null
8990         procedure
8991         * sem_ch8.adb: Code clean up.
8992
8993 2011-08-01  Javier Miranda  <miranda@adacore.com>
8994
8995         * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
8996         * einfo.ads (Access_Disp_Table): Fix documentation.
8997         (Dispatch_Table_Wrappers): Fix documentation.
8998         * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
8999         Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
9000         to enforce the documentation of this attribute.
9001         (Set_Is_Interface): Cleanup the assertion.
9002         * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
9003         the Underlying_Type entity before reading attribute Access_Disp_Table.
9004         * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
9005         Locate the Underlying_Type before reading attribute Access_Disp_Table.
9006         * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
9007         the Underlying_Type entity before reading attribute Access_Disp_Table.
9008         * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
9009         Locate the Underlying_Type entity before reading attribute
9010         Access_Disp_Table.
9011
9012 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
9013
9014         * s-poosiz.ads: Additional overriding indicators.
9015
9016 2011-08-01  Yannick Moy  <moy@adacore.com>
9017
9018         * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
9019         formal mode.
9020         (Analyze_Iteration_Scheme): issue error in formal mode when loop
9021         parameter specification does not include a subtype mark.
9022         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
9023         formal mode on abstract subprogram.
9024         (Analyze_Subprogram_Specification): issue error in formal mode on
9025         user-defined operator.
9026         (Process_Formals): issue error in formal mode on access parameter and
9027         default expression.
9028         * sem_ch9.adb (Analyze_Abort_Statement,
9029         Analyze_Accept_Statement, Analyze_Asynchronous_Select,
9030         Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
9031         Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
9032         Analyze_Requeue, Analyze_Selective_Accept,
9033         Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
9034         * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
9035         issue error in formal mode on user-defined raise statement.
9036
9037 2011-08-01  Thomas Quinot  <quinot@adacore.com>
9038
9039         * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
9040         declaration being hidden when overriding an implicit inherited
9041         subprogram.
9042         * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
9043         (-gnats), do not complain about a source file that contains only a
9044         pragma No_Body.
9045
9046 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
9047
9048         * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
9049         variable if already set.
9050
9051 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
9052
9053         * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
9054         g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
9055         s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
9056         g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
9057         g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
9058         g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
9059         g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
9060         g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
9061         g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
9062         g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
9063         g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
9064         s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
9065         g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
9066         s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
9067         g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
9068         g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
9069         g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
9070         g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
9071         g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
9072         g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
9073         s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
9074         s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
9075         a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
9076         s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
9077         s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
9078         g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
9079         g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
9080         g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
9081         g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
9082         g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
9083         g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
9084         s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
9085         s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
9086         g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
9087         g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
9088         s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
9089         s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
9090         g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
9091         g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
9092         g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
9093         s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
9094         g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
9095         g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
9096         g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
9097         s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
9098         g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
9099         g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
9100         g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
9101         s-osinte-mingw.ads: Update to GPLv3 run-time license.
9102         Use GNAT instead of GNARL.
9103
9104 2011-08-01  Bob Duff  <duff@adacore.com>
9105
9106         * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
9107         a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
9108         a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
9109         reformatting.
9110
9111 2011-08-01  Yannick Moy  <moy@adacore.com>
9112
9113         * debug.adb (d.D) reverve flag for the SPARK mode
9114         (d.E) reverve flag for SPARK generation mode
9115         (d.F) reverve flag for Why generation mode
9116         * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
9117         ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode):  New
9118         functions which return True when the corresponding modes are set
9119         (Formal_Language): return "spark" or "alfa" when in formal verification
9120         mode.
9121         * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
9122         Error_Msg to prefix the error message with a tag giving the formal
9123         language
9124         (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
9125         message with a tag giving the formal language
9126         * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
9127         block statement
9128         (Analyze_Case_Statement): issue error in formal mode on case statement
9129         with a single "others" case alternative
9130         (Analyze_Exit_Statement): issue errors in formal mode on exit
9131         statements which do not respect SPARK restrictions
9132         (Analyze_Goto_Statement): issue error in formal mode on goto statement
9133         (Check_Unreachable_Code): always issue an error (not a warning) in
9134         formal mode on unreachable code (concerns both code after an infinite
9135         loop and after an unconditional jump, both not allowed in SPARK)
9136         * sem_ch6.adb (Analyze_Return_Statement): add call to
9137         Set_Return_Present for a procedure containing a return statement
9138         (already done for functions in Analyze_Function_Return)
9139         (Analyze_Function_Return): issue error in formal mode on extended
9140         return or if return is not last statement in function
9141         (Check_Missing_Return): issue error in formal mode if function does
9142         not end with return or if procedure contains a return
9143         * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
9144         function to detect if there is an inner scope of its parameter S which
9145         is a loop.
9146
9147 2011-08-01  Thomas Quinot  <quinot@adacore.com>
9148
9149         * sem_ch6.ads: Minor reformatting.
9150
9151 2011-08-01  Javier Miranda  <miranda@adacore.com>
9152
9153         * sem_util.adb (Abstract_Interface_List): Complete condition when
9154         processing private type declarations to avoid reading unavailable
9155         attribute.
9156         (Is_Synchronized_Tagged_Type): Complete condition when processing
9157         private extension declaration nodes to avoid reading unavailable
9158         attribute.
9159
9160 2011-08-01  Thomas Quinot  <quinot@adacore.com>
9161
9162         * sem_ch3.adb: Minor reformatting.
9163
9164 2011-08-01  Thomas Quinot  <quinot@adacore.com>
9165
9166         * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
9167         i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
9168         s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
9169         s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
9170         for VMS, instead parametrize the common implementation with
9171         System.Parameters declarations.
9172
9173 2011-08-01  Eric Botcazou  <ebotcazou@adacore.com>
9174
9175         * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
9176
9177 2011-08-01  Tristan Gingold  <gingold@adacore.com>
9178
9179         * seh_init.c: Fix SEH handler installation on win64.
9180
9181 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
9182
9183         * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
9184         double analysis of an anonymous access to subprogram, because it can
9185         lead to improper sharing of profiles and a back-end crash.
9186
9187 2011-08-01  Robert Dewar  <dewar@adacore.com>
9188
9189         * make.adb, sem_ch4.adb: Minor reformatting.
9190         * gcc-interface/Make-lang.in: Update dependencies.
9191         * sem_util.adb, exp_ch5.adb: Minor reformatting.
9192
9193 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
9194
9195         * gnat_rm.texi: Fix definition of Long_Integer.
9196
9197 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
9198
9199         * exp_aggr.adb: check limit size of static aggregate unconditionally,
9200         to prevent storage exhaustion.
9201         * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
9202         finalized is a function body, insert the cleanup code before the final
9203         return statement, to prevent spurious warnings.
9204         * s-pooglo.ads: add overriding indicator.
9205
9206 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
9207
9208         * sem_ch4.adb (Operator_Check): improve error message when both a
9209         with_clause and a use_clause are needed to make operator usage legal.
9210         * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
9211         determine whether a compilation unit is visible within an other,
9212         either through a with_clause in the current unit, or a with_clause in
9213         its library unit or one one of its parents.
9214
9215 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
9216
9217         * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
9218         over an arbitrary expression of an array or container type.
9219         * lib-xref.adb: clarify comment.
9220
9221 2011-08-01  Bob Duff  <duff@adacore.com>
9222
9223         * einfo.ads: Minor reformatting.
9224         * debug.adb: Minor comment improvement.
9225
9226 2011-08-01  Javier Miranda  <miranda@adacore.com>
9227
9228         * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
9229         consider hidden subprograms as valid candidates.
9230
9231 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
9232
9233         * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
9234
9235 2011-08-01  Vasiliy Fofanov  <fofanov@adacore.com>
9236
9237         * gnat_ugn.texi: Fix typo.
9238
9239 2011-08-01  Robert Dewar  <dewar@adacore.com>
9240
9241         * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
9242         lib-xref.adb: Minor reformatting
9243
9244 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
9245
9246         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
9247         when to generate a call to Move_Final_List.
9248         (Has_Controlled_Parts): Remove this function.
9249
9250 2011-08-01  Geert Bosch  <bosch@adacore.com>
9251
9252         * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
9253         "," in choice list.
9254
9255 2011-08-01  Thomas Quinot  <quinot@adacore.com>
9256
9257         * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
9258         explicit raise of a predefined exception as Comes_From_Source if the
9259         original N_Raise_Statement comes from source.
9260
9261 2011-08-01  Robert Dewar  <dewar@adacore.com>
9262
9263         * sinfo.ads: Add comment.
9264         * sem_ch6.adb: Minor reformatting.
9265
9266 2011-08-01  Robert Dewar  <dewar@adacore.com>
9267
9268         * freeze.adb (Freeze_Entity): Refine check for bad component size
9269         clause to avoid rejecting confirming clause when atomic/aliased present.
9270
9271 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
9272
9273         * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
9274         better determine whether an entity reference is a write.
9275         * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
9276         subcomponent.
9277         * lib-xref.adb (Output_References): Do no suppress a read reference at
9278         the same location as an immediately preceeding modify-reference, to
9279         handle properly in-out actuals.
9280
9281 2011-08-01  Tristan Gingold  <gingold@adacore.com>
9282
9283         * env.c (__gnat_setenv) [VMS]: Refine previous change.
9284
9285 2011-08-01  Quentin Ochem  <ochem@adacore.com>
9286
9287         * i-cstrin.adb (New_String): Changed implementation, now uses only the
9288         heap to compute the result.
9289
9290 2011-08-01  Robert Dewar  <dewar@adacore.com>
9291
9292         * atree.ads: Minor reformatting.
9293
9294 2011-08-01  Emmanuel Briot  <briot@adacore.com>
9295
9296         * g-expect.adb (Get_Command_Output): Fix memory leak.
9297
9298 2011-08-01  Geert Bosch  <bosch@adacore.com>
9299
9300         * cstand.adb (P_Float_Type): New procedure to print the definition of
9301         predefined fpt types.
9302         (P_Mixed_Name): New procedure to print a name using mixed case
9303         (Print_Standard): Use P_Float_Type for printing floating point types
9304         * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
9305         precision IEEE float.
9306
9307 2011-08-01  Thomas Quinot  <quinot@adacore.com>
9308
9309         * sem_ch3.adb: Minor reformatting.
9310
9311 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
9312
9313         * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
9314         the completion of a generic function, insert the new body rather than
9315         rewriting the original.
9316
9317 2011-08-01  Yannick Moy  <moy@adacore.com>
9318
9319         * sinfo.ads, errout.ads: Typos in comments.
9320
9321 2011-08-01  Robert Dewar  <dewar@adacore.com>
9322
9323         * par-endh.adb: Minor reformatting.
9324
9325 2011-08-01  Robert Dewar  <dewar@adacore.com>
9326
9327         * aspects.ads, aspects.adb: Add aspects for library unit pragmas
9328         (Pre_Post_Aspects): New subtype.
9329         * par-ch12.adb (P_Generic): New syntax for aspects in packages
9330         * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
9331         * par-ch7.adb (P_Package): Remove Decl parameter
9332         (P_Package): Handle new syntax for aspects (before IS)
9333         * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
9334         new aspect syntax
9335         (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
9336         * par.adb (P_Aspect_Specifications): Add Semicolon parameter
9337         (P_Package): Remove Decl parameter
9338         * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
9339         aspects
9340         * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
9341         specs
9342         * sem_util.ads, sem_util.adb (Static_Boolean): New function
9343         * sinfo.ads: Document new syntax for aspects in packages etc.
9344         * sprint.adb: Handle new syntax of aspects before IS in package
9345
9346 2011-08-01  Thomas Quinot  <quinot@adacore.com>
9347
9348         * atree.ads: Minor reformatting.
9349         * sem_prag.adb: Minor reformatting.
9350
9351 2011-08-01  Robert Dewar  <dewar@adacore.com>
9352
9353         * exp_util.adb (Insert_Actions): Fix error in handling Actions for
9354         case expr alternative.
9355
9356 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
9357
9358         * sem_ch12.adb: Fix typo.
9359
9360 2011-08-01  Geert Bosch  <bosch@adacore.com>
9361
9362         * sem_prag.adb (Check_No_Link_Name): New procedure.
9363         (Process_Import_Or_Interface): Use Check_No_Link_Name.
9364         * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
9365         instead of Standard_Long_Long_Float_Size global. Preparation for
9366         eventual removal of per type constants.
9367         * exp_util.ads (Get_Stream_Size): New function returning the stream
9368         size value of subtype E.
9369         * exp_util.adb (Get_Stream_Size): Implement new function.
9370         * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
9371         function.
9372         * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
9373         * einfo.adb:
9374         (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
9375
9376 2011-08-01  Geert Bosch  <bosch@adacore.com>
9377
9378         * cstand.adb: Fix comments.
9379         * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
9380         count of arguments.
9381
9382 2011-08-01  Robert Dewar  <dewar@adacore.com>
9383
9384         * exp_ch4.adb, sem_cat.adb: Minor reformatting.
9385
9386 2011-08-01  Geert Bosch  <bosch@adacore.com>
9387
9388         * atree.ads: Fix comment.
9389
9390 2011-08-01  Robert Dewar  <dewar@adacore.com>
9391
9392         * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
9393         * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
9394         * par.adb: Add with for Namet.Sp.
9395         * par-tchk.adb: Minor reformatting.
9396
9397 2011-08-01  Vincent Celier  <celier@adacore.com>
9398
9399         * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
9400         (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
9401         of the init procedure of a SAL.
9402         * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
9403         New procedure.
9404
9405 2011-08-01  Thomas Quinot  <quinot@adacore.com>
9406
9407         * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
9408         reformatting.
9409
9410 2011-08-01  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9411
9412         * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
9413
9414 2011-08-01  Thomas Quinot  <quinot@adacore.com>
9415
9416         * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
9417         conformant with its spec (return True only for types that have
9418         an overriding Initialize primitive operation that prevents them from
9419         having preelaborable initialization).
9420         * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
9421         initialization for controlled types in Ada 2005 or later mode.
9422
9423 2011-08-01  Robert Dewar  <dewar@adacore.com>
9424
9425         * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
9426         Postcondition.
9427         (Same_Aspect): New function.
9428         * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
9429         Type_Invariant, Precondition, Postcondition.
9430         * snames.ads-tmpl: Add Name_Type_Invariant.
9431
9432 2011-08-01  Robert Dewar  <dewar@adacore.com>
9433
9434         * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
9435         here.
9436         (Freeze_All_Ent): Fix error in handling inherited aspects.
9437         * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
9438         already analyzed, but don't skip entire processing of a declaration,
9439         that's wrong in some cases of declarations being rewritten.
9440         (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
9441         Don't delay for integer, string literals
9442         Treat predicates in usual manner for delay, remove special case code,
9443         not needed.
9444         (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
9445         (Build_Predicate_Function): Update saved expression in aspect
9446         (Build_Invariant_Procedure): Update saved expression in aspect
9447         * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
9448         of replacement of discriminant references if the reference is simple.
9449
9450 2011-08-01  Robert Dewar  <dewar@adacore.com>
9451
9452         * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
9453         * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
9454         Static_Predicate and Dynamic_Predicate.
9455         (Build_Predicate_Function): Add processing for Static_Predicate
9456         and Dynamic_Predicate.
9457         * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
9458         (From_Static_Predicate): New flag
9459         * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
9460
9461 2011-08-01  Robert Dewar  <dewar@adacore.com>
9462
9463         * usage.adb: Documentation cleanup for Ada version modes in usage.
9464         * expander.adb: Minor reformatting.
9465
9466 2011-08-01  Robert Dewar  <dewar@adacore.com>
9467
9468         * atree.ads: Minor comment fix.
9469         * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
9470         a-witeio.ads, sem_prag.adb: Minor reformatting.
9471
9472 2011-08-01  Doug Rupp  <rupp@adacore.com>
9473
9474         * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
9475         pointers. Use descrip.h header file for convenience. Add some
9476         comments.
9477
9478 2011-08-01  Robert Dewar  <dewar@adacore.com>
9479
9480         * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
9481         (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
9482         * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
9483         New procedure.
9484         (Check_Aspect_At_End_Of_Declarations): New procedure
9485         (Analye_Aspect_Specification): Minor changes for above procedures
9486         * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
9487         specification node as well.
9488
9489 2011-08-01  Pascal Obry  <obry@adacore.com>
9490
9491         * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
9492         Windows files. Use GetFilesAttributes() in this case to check for file
9493         existence instead of returning with an error code.
9494
9495 2011-08-01  Vincent Celier  <celier@adacore.com>
9496
9497         * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
9498         High is above Source length.
9499
9500 2011-08-01  Robert Dewar  <dewar@adacore.com>
9501
9502         * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
9503
9504 2011-08-01  Robert Dewar  <dewar@adacore.com>
9505
9506         * aspects.ads (Boolean_Aspects): New subtype.
9507         * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
9508         for derived types in cases where the parent type and derived type have
9509         aspects.
9510         * freeze.adb (Freeze_Entity): Fix problems in handling derived type
9511         with aspects when parent type also has aspects.
9512         (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
9513         boolean expression at this point).
9514         * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
9515         accordance with final decision on the Ada 2012 feature.
9516         * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
9517
9518 2011-08-01  Matthew Heaney  <heaney@adacore.com>
9519
9520         * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
9521
9522 2011-08-01  Pascal Obry  <obry@adacore.com>
9523
9524         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
9525         Fix Replace_Slice when High is above current string size.
9526         (Replace_Slice): Fix DL computation when High is above current
9527         string length.
9528
9529 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
9530
9531         * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
9532
9533 2011-08-01  Matthew Heaney  <heaney@adacore.com>
9534
9535         * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
9536         of node.
9537
9538 2011-08-01  Pascal Obry  <obry@adacore.com>
9539
9540         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
9541         reformatting.
9542
9543 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
9544
9545         * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
9546         access to protected subprograms in generic bodies.
9547         * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
9548         protected type, indicate that the convention of the subprogram is
9549         Convention_Protected, because it may be used in subsequent declarations
9550         within the protected declaration.
9551
9552 2011-08-01  Vincent Celier  <celier@adacore.com>
9553
9554         * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
9555         and "final" procedures when the name of the library is "ada", to avoid
9556         duplicate symbols "adainit" and "adafinal" in executables.
9557
9558 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
9559
9560         * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
9561         quantified expression that appears within a postcondition and uses the
9562         Ada2012 'Result attribute.
9563
9564 2011-07-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9565
9566         * init.c (__gnat_error_handler): Cast reason to int.
9567         (__gnat_install_handler): Explain sa_sigaction use.
9568
9569 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
9570
9571         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
9572         subprogram has copy-in copy-out parameters, try to promote the mode of
9573         the return type if it is passed in registers.
9574
9575 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
9576
9577         * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
9578         left operand as addressable.
9579
9580 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
9581
9582         * gcc-interface/gigi.h (build_function_stub): Remove.
9583         (build_return_expr): Likewise.
9584         (convert_vms_descriptor): Declare.
9585         * gcc-interface/utils.c (convert_vms_descriptor): Make global.
9586         (build_function_stub): Move to...
9587         * gcc-interface/utils2.c (build_return_expr): Move to...
9588         * gcc-interface/trans.c (build_function_stub): ...here.
9589         (build_return_expr): ...here.
9590         (Subprogram_Body_to_gnu): Add local variable for language_function.
9591         Disconnect the parameter attributes cache, if any, once done with it.
9592         Call end_subprog_body only after setting the end_locus.
9593         Build the stub associated with the function, if any, at the very end.
9594         (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
9595         variables and streamline control flow.
9596
9597 2011-07-23  Arnaud Charlet  <charlet@adacore.com>
9598
9599         PR ada/49819
9600         * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
9601         g-trasym-dwarf.adb.
9602
9603 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9604
9605         PR bootstrap/49794
9606         * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
9607         Assign to act.sa_sigaction.
9608         * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
9609         current->return_address to char * before arithmetic.
9610
9611 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9612
9613         * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
9614         Correct argument types.
9615         Extract code from reason.
9616         (__gnat_install_handler): Assign to act.sa_sigaction.
9617
9618 2011-07-21  Eric Botcazou  <ebotcazou@adacore.com>
9619
9620         * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
9621         (GNAT1_OBJS): ...here.
9622
9623 2011-07-15  Eric Botcazou  <ebotcazou@adacore.com>
9624
9625         PR ada/48711
9626         * g-socthi-mingw.adb (Fill): Fix formatting.
9627
9628         * gcc-interface/gigi.h: Move around comment.
9629
9630 2011-07-14  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
9631
9632         PR ada/46350
9633         * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
9634
9635 2011-07-14  Florian Weimer  <fw@deneb.enyo.de>
9636
9637         PR ada/48711
9638         * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
9639
9640 2011-07-13  Eric Botcazou  <ebotcazou@adacore.com>
9641
9642         * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
9643         range comparison if Pmode is SImode.
9644
9645 2011-07-12  Laurent GUERBY  <laurent@guerby.net>
9646             Eric Botcazou  <ebotcazou@adacore.com>
9647
9648         * adadecode.c: Wrap up in extern "C" block.
9649         * adadecode.h: Likewise.
9650         * adaint.c: Likewise.  Remove 'const' keyword.
9651         * adaint.h: Likewise.
9652         * argv.c: Likewise.
9653         * atree.h: Likewise.
9654         * cio.c: Likewise.
9655         * cstreams.c: Likewise.
9656         * env.c: Likewise.
9657         * exit.c: Likewise.
9658         * fe.h: Likewise.
9659         * final.c: Likewise.
9660         * init.c: Likewise.
9661         * initialize.c: Likewise.
9662         * link.c: Likewise.
9663         * namet.h: Likewise.
9664         * nlists.h: Likewise.
9665         * raise.c: Likewise.
9666         * raise.h: Likewise.
9667         * repinfo.h: Likewise.
9668         * seh_init.c: Likewise.
9669         * targext.c: Likewise.
9670         * tracebak.c: Likewise.
9671         * uintp.h: Likewise.
9672         * urealp.h: Likewise.
9673         * xeinfo.adb: Wrap up generated C code in extern "C" block.
9674         * xsinfo.adb: Likewise.
9675         * xsnamest.adb: Likewise.
9676         * gcc-interface/gadaint.h: Wrap up in extern "C" block.
9677         * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
9678         * gcc-interface/misc.c: Likewise.
9679         * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
9680         (GNAT1_C_OBJS): Remove ada/b_gnat1.o.  List ada/seh_init.o and
9681         ada/targext.o here...
9682         (GNAT_ADA_OBJS): ...and not here.
9683         (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
9684         (GNATBIND_OBJS): Reorder.
9685
9686 2011-07-07  Richard Henderson  <rth@redhat.com>
9687
9688         * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
9689         dwarf2out_frame_init.
9690
9691 2011-07-07  Eric Botcazou  <ebotcazou@adacore.com>
9692
9693         * gcc-interface/misc.c (gnat_init): Tweak previous change.
9694
9695 2011-07-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9696
9697         PR target/39150
9698         * gcc-interface/Makefile.in: Handle x86_64-solaris2.
9699
9700 2011-07-06  Richard Guenther  <rguenther@suse.de>
9701
9702         * gcc-interface/misc.c (gnat_init): Merge calls to
9703         build_common_tree_nodes and build_common_tree_nodes_2.
9704         Re-initialize boolean_false_node.
9705
9706 2011-07-02  Eric Botcazou  <ebotcazou@adacore.com>
9707             Olivier Hainque  <hainque@adacore.com>
9708             Nicolas Setton  <setton@adacore.com>
9709
9710         * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
9711         the type according to the ARTIFICIAL_P parameter.
9712         (create_type_decl): Likewise.
9713         (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
9714
9715 2011-07-01  Eric Botcazou  <ebotcazou@adacore.com>
9716
9717         * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
9718         (gnatbind): Likewise.
9719
9720 2011-06-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9721
9722         * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
9723
9724 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
9725
9726         * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
9727         local variable throughout.  Remove useless call to Base_Type.
9728         (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
9729         Take it also into account for the volatileness of the field.  Set the
9730         TREE_SIDE_EFFECTS flag as well in this case.  Reorder some warnings.
9731
9732 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
9733
9734         * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
9735         on a dereference built for a by-ref object if it has an address clause.
9736
9737 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
9738
9739         * einfo.ads (Address_Taken): Document use for the second argument of
9740         Asm_Input and Asm_Output attributes.
9741         * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
9742         argument is an entity name, then set Address_Taken on it.
9743         <Attribute_Asm_Output>: Likewise.
9744         * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
9745         Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
9746         (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
9747         memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
9748
9749 2011-06-16  Joern Rennecke  <joern.rennecke@embecosm.com>
9750
9751         PR middle-end/46500
9752         * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
9753
9754 2011-06-14  Joseph Myers  <joseph@codesourcery.com>
9755
9756         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
9757         (ada/utils.o): Update dependencies.
9758         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
9759         ../../../libcpp/libcpp.a.
9760         * gcc-interface/utils.c: Include common/common-target.h.
9761         (process_attributes): Use targetm_common.have_named_sections.
9762
9763 2011-06-07  Richard Guenther  <rguenther@suse.de>
9764
9765         * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
9766         set_sizetype.
9767
9768 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
9769
9770         * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
9771         TREE_THIS_NOTRAP flag.
9772
9773 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
9774
9775         * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
9776         Fix thinko.
9777
9778 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
9779
9780         * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
9781         constants whose full view has discriminants specially.
9782
9783 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
9784
9785         * gcc-interface/utils.c: Include diagnostic.h.
9786         (gnat_write_global_declarations): Output debug information for all
9787         global type declarations before finalizing the compilation unit.
9788         * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
9789
9790 2011-05-25  Jakub Jelinek  <jakub@redhat.com>
9791
9792         * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
9793
9794 2011-05-25  Kai Tietz  <ktietz@redhat.com>
9795
9796         * adaint.c (__gnat_to_canonical_file_list_next): Use array
9797         initialization instead of const/none-const pointer assignment.
9798
9799 2011-05-24  Joseph Myers  <joseph@codesourcery.com>
9800
9801         * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
9802         $(EXTRA_GNAT1_OBJS).
9803         (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
9804         (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
9805         (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
9806         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
9807         libcommon-target.a instead of prefix.o.
9808
9809 2011-05-21  Joseph Myers  <joseph@codesourcery.com>
9810
9811         PR ada/49097
9812         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
9813
9814 2011-05-20  Joseph Myers  <joseph@codesourcery.com>
9815
9816         * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
9817         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
9818         instead of version.o.
9819
9820 2011-05-18  Kai Tietz <ktietz@redhat.com>
9821
9822         * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
9823         boolean_false_node instead of integer_zero_node.
9824         (convert_with_check): Likewise.
9825         * gcc-interface/decl.c (choices_to_gnu): Likewise.
9826
9827 2011-05-12  Eric Botcazou  <ebotcazou@adacore.com>
9828
9829         * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
9830         type of the parameter is an unconstrained array, convert the actual to
9831         the type of the formal in the In Out and Out cases as well.
9832
9833 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
9834
9835         * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
9836         call build_function_type_array or build_varargs_function_type_array
9837         instead.
9838         (create_subprog_type): Don't call build_function_type; call
9839         build_function_type_vec instead.
9840
9841 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
9842
9843         * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
9844         (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
9845         (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
9846
9847 2011-05-07  Eric Botcazou  <ebotcazou@adacore.com>
9848
9849         * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
9850
9851         * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
9852         * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
9853
9854 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
9855
9856         * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
9857
9858 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
9859
9860         * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
9861         instead of accessing TYPE_ARG_TYPES directly.
9862         * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
9863
9864 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
9865
9866         PR ada/48844
9867         * gcc-interface/gigi.h (get_variant_part): Declare.
9868         * gcc-interface/decl.c (get_variant_part): Make global.
9869         * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
9870         types have the same constant size, are record types and T1 has a
9871         variant part while T2 doesn't.
9872
9873 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
9874
9875         * gcc-interface/utils.c (begin_subprog_body): Do not call
9876         get_pending_sizes.
9877         (end_subprog_body): Likewise.
9878
9879 2011-05-04  Richard Guenther  <rguenther@suse.de>
9880
9881         * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
9882         int_const_binop.
9883         (pos_to_constructor): Likewise.
9884
9885 2011-05-03  Nathan Froyd  <froydnj@codesourcery.com>
9886             Eric Botcazou  <ebotcazou@adacore.com>
9887
9888         * gcc-interface/trans.c (gigi): Call build_function_type_list instead
9889         of build_function_type.  Adjust calls to...
9890         (build_raise_check): ...this.  Do not take a void_tree parameter.
9891         Call build_function_type_list instead of build_function_type.
9892         Fix head comment and swap couple of conditional blocks.
9893
9894 2011-04-30  Eric Botcazou  <ebotcazou@adacore.com>
9895
9896         * gnatvsn.ads (Library_Version): Bump to 4.7.
9897         (Current_Year): Bump to 2011.
9898
9899 2011-04-29  Michael Matz  <matz@suse.de>
9900
9901         * gcc-interface/misc.c (gnat_handle_option): Set
9902         warn_maybe_uninitialized.
9903
9904 2011-04-23  Gerald Pfeifer  <gerald@pfeifer.com>
9905
9906         * gnat_ugn.texi (Complexity Metrics Control): Update link to
9907         the Watson/McCabe paper.
9908
9909 2011-04-23  Jim Meyering  <meyering@redhat.com>
9910
9911         * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
9912
9913 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
9914
9915         * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
9916         onto the new type.
9917
9918 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
9919
9920         * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
9921         parameter.
9922         * gcc-interface/utils.c (create_subprog_decl): Likewise.  Set
9923         DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
9924         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
9925         ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
9926         <all>: Do not set flags on the reused DECL node coming from an alias.
9927         Set DECL_IGNORED_P on the DECL node built for subprograms if they
9928         don't need debug info here...
9929         * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
9930         (gigi): Adjust calls to create_subprog_decl.
9931         (build_raise_check): Likewise.
9932         (establish_gnat_vms_condition_handler): Likewise.
9933         (Compilation_Unit_to_gnu): Likewise.
9934         (gnat_to_gnu): Likewise.
9935
9936 2011-04-21  Eric Botcazou  <ebotcazou@adacore.com>
9937
9938         * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
9939         (NO_REORDER_ADAFLAGS): New variable.
9940         (EXTRA_GNATTOOLS): Always define.
9941         (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
9942         Clean up and adjust list of files compiled with special options.
9943         * gcc-interface/Make-lang.in: Likewise.
9944         (ada/decl.o): Cosmetical change.
9945         (ada/misc.o): Remove dependency on $(PLUGIN_H).
9946
9947 2011-04-20  Jim Meyering  <meyering@redhat.com>
9948
9949         * initialize.c (__gnat_initialize): Remove useless if-before-free.
9950
9951 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
9952
9953         * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
9954         $(CFLAGS) on the link line.
9955
9956 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
9957
9958         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
9959         padded type built for the return type if it is unconstrained.
9960
9961 2011-04-14  Nathan Froyd  <froydnj@codesourcery.com>
9962
9963         * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
9964
9965 2011-04-12  Nathan Froyd  <froydnj@codesourcery.com>
9966
9967         * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
9968         before calling TREE_CHAIN.
9969         * gcc-interface/misc.c (gnat_init_ts): New function.
9970         (LANG_HOOKS_INIT_TS): Define.
9971
9972 2011-04-12  Martin Jambor  <mjambor@suse.cz>
9973
9974         * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
9975         instead of cgraph_node.
9976
9977 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
9978
9979         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
9980         alignment on fields of the RETURN type built for the Copy-In Copy-Out
9981         mechanism.
9982
9983 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
9984
9985         * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
9986         of aggregate types that contain a placeholder.
9987
9988 2011-04-08  Nathan Froyd  <froydnj@codesourcery.com>
9989
9990         * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
9991         TYPE_ARG_TYPES.
9992         (handle_type_generic_attribute): Likewise.
9993
9994 2011-04-04  Eric Botcazou  <ebotcazou@adacore.com>
9995
9996         PR ada/47163
9997         * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
9998
9999 2011-04-04  Kai Tietz  <ktietz@redhat.com>
10000
10001         PR ada/47163
10002         * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
10003         to flag value.
10004
10005 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
10006
10007         * gcc-interface/utils2.c (build_allocator): In the unconstrained array
10008         type case, do not strip a padding type around the array type.
10009
10010 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
10011
10012         * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
10013         types.
10014
10015 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
10016
10017         * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
10018         * gcc-interface/misc.c (gnat_handle_option): Remove special handling
10019         code for -feliminate-unused-debug-types.
10020         (gnat_post_options): Likewise.
10021
10022 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
10023
10024         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
10025         declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
10026         distinct copy.
10027
10028 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
10029
10030         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
10031         DECL_ARTIFICIAL flag on enumeration types.
10032
10033 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
10034
10035         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
10036         fat pointer types artificial unconditionally.
10037         <E_Array_Subtype>: Attach the base array type as a parallel type if it
10038         isn't artificial.
10039
10040 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
10041
10042         * gcc-interface/gigi.h (get_dummy_type): Declare.
10043         (build_dummy_unc_pointer_types): Likewise.
10044         (finish_fat_pointer_type): Likewise.
10045         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
10046         fat pointer type has been built, complete it in place.
10047         <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
10048         and thin pointers.  Remove useless variable.
10049         (finish_fat_pointer_type): Make global and move to...
10050         * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
10051         (get_dummy_type): New function.
10052         (build_dummy_unc_pointer_types): Likewise.
10053         (gnat_pushdecl): Propage the name to the anonymous variants only.
10054         (update_pointer_to): Only adjust the pointer types in the unconstrained
10055         array case.
10056
10057 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
10058
10059         * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
10060         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
10061         if this is a Taft amendment type and the full declaration is available.
10062         * gcc-interface/trans.c (process_type): Likewise.
10063         If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
10064         (process_freeze_entity): Likewise.
10065         * gcc-interface/utils.c (dummy_global): New static variable.
10066         (gnat_write_global_declarations): If there are types declared as used
10067         at the global level, insert them in the global hash table.
10068
10069 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
10070
10071         * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
10072         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
10073         declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
10074         copy.
10075         (record_builtin_type): Add ARTIFICIAL_P parameter.  Set DECL_ARTIFICIAL
10076         flag of the type accordingly.
10077         * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
10078
10079 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
10080
10081         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
10082         finalizing types when updating the pointers to the designated type.
10083         <all>: Finalize the deferred types even if we didn't defer processing
10084         of incomplete types in this invocation.
10085
10086 2011-04-01  Olivier Hainque  <hainque@adacore.com>
10087             Nicolas Setton  <setton@adacore.com>
10088             Eric Botcazou  <ebotcazou@adacore.com>
10089
10090         * gcc-interface/misc.c (gnat_descriptive_type): New function.
10091         (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
10092
10093 2011-03-28  Kai Tietz  <ktietz@redhat.com>
10094
10095         * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
10096         Windows targets.
10097         (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
10098         * system-mingw.ads (System): Change ZCX_By_Default default to True.
10099
10100         * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
10101
10102 2011-03-28  Tristan Gingold  <gingold@adacore.com>
10103
10104         PR ada/44431
10105         * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
10106         Use ada output of gnatbind.
10107         (ada/b_gnatb.adb): Ditto.
10108         (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
10109         (ada.mostlyclean, ada.stage1)
10110         (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
10111         (ada.stagefeedback): Adjust.
10112         * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
10113         Use ada output of gnatbind.
10114         (b_gnatm.adb): Ditto.
10115         (b_gnatl.o, b_gnatm.o): New rules.
10116
10117 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
10118
10119         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
10120         for the padded type built to support a specified size or alignment.
10121
10122 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
10123
10124         * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
10125         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
10126         unconditionally to the end of the unit when the designated type is
10127         limited_with'ed.
10128         <all>: Rename local variable.  Attempt to un-defer types only and do it
10129         for limited_with'ed types as well.
10130         (finalize_from_with_types): Adjust comment.  Rename variable and tidy.
10131         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
10132         consistently and remove redundant call to finalize_from_with_types.
10133
10134 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
10135
10136         * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
10137         subprograms without a previous spec declared in the same unit.
10138         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
10139         subprograms at the end of the unit instead of at the beginning.
10140         * gcc-interface/utils.c (create_subprog_decl): Check that the entity
10141         isn't public for the special handling of non-inline functions nested
10142         inside inline external functions.
10143
10144 2011-03-25  Jeff Law  <law@redhat.com>
10145
10146         * gcc-interface/utils.c (def_fn_type): Add missing va_end.
10147
10148 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
10149
10150         * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
10151         * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
10152         to compute Set_Size_Depends_On_Discriminant.
10153         (Layout_Type): Call it on array types in back-end layout mode.
10154         * sem_util.adb (Requires_Transient_Scope): Return true for array
10155         types only if the size depends on the value of discriminants.
10156         * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
10157         type if the RHS is a call to a function that returns an unconstrained
10158         type with default discriminant.
10159
10160 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
10161
10162         * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
10163         non-conversion to the nominal result type at the end.
10164
10165 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
10166
10167         * gcc-interface/trans.c (create_temporary): New function taken from...
10168         (create_init_temporary): ...here.  Call it.
10169         (call_to_gnu): Create the temporary for the return value early, if any.
10170         Create it for a function with copy-in/copy-out parameters if there is
10171         no target; in other cases of copy-in/copy-out, use another temporary.
10172         Push the new binding level lazily.  Add and rename local variables.
10173
10174 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
10175
10176         * gcc-interface/decl.c (validate_size): Improve comments and tweak
10177         error message.
10178         (set_rm_size): Likewise.
10179
10180 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
10181
10182         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
10183         for the padded type built in order to support a specified alignment.
10184         Fix incorrect formatting.
10185
10186 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
10187
10188         PR bootstrap/48216
10189         * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
10190
10191 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
10192
10193         * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
10194         rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
10195         to the end of the list.  Adjust recursive call.  Rename local variable.
10196         If REORDER is true, reorder components of the record type.
10197         (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
10198         components_to_record and adjust the parameter list.
10199
10200 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
10201
10202         * gcc-interface/decl.c (elaborate_expression_1): When optimization is
10203         disabled, use the variable for bounds of loop iteration scheme.
10204
10205 2011-03-21  Kai Tietz  <ktietz@redhat.com>
10206
10207         PR target/12171
10208         * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
10209
10210 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
10211
10212         * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
10213         out whether the expression is read-only.  Short-circuit placeholder
10214         case and rename a couple of local variables.
10215
10216 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
10217
10218         * gcc-interface/gigi.h (smaller_form_type_p): Declare.
10219         * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
10220         * gcc-interface/utils.c (smaller_form_type_p): ...to here.
10221         (convert): Deal with conversions from a smaller form type specially.
10222
10223 2011-02-14  Eric Botcazou  <ebotcazou@adacore.com>
10224
10225         * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
10226         its argument, except for the special -I- switch.
10227
10228 2011-02-12  Gerald Pfeifer  <gerald@pfeifer.com>
10229
10230         * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
10231         "Ada Issues".
10232
10233 2011-02-08  Eric Botcazou  <ebotcazou@adacore.com>
10234
10235         * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
10236
10237 2011-02-03  Eric Botcazou  <ebotcazou@adacore.com>
10238
10239         * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
10240         GNAT_FORMAL.
10241         * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
10242         * gcc-interface/utils.c (fill_vms_descriptor): ...here.  Take GNU_TYPE
10243         instead of GNAT_FORMAL.  Protect the expression against multiple uses.
10244         Do not generate the check directly, instead instantiate the template
10245         check present in the descriptor.
10246         (make_descriptor_field): Move around.
10247         (build_vms_descriptor32): Build a template check in the POINTER field.
10248         (build_vms_descriptor): Remove useless suffixes.
10249         * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
10250
10251 2011-01-26  Eric Botcazou  <ebotcazou@adacore.com>
10252
10253         PR bootstrap/47467
10254         * targext.c: Include target files if IN_RTS is defined.
10255
10256 2011-01-26  Richard Guenther  <rguenther@suse.de>
10257
10258         PR bootstrap/47467
10259         * targext.c: Include config.h.
10260         * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
10261         dependency.
10262
10263 2011-01-04  Pascal Obry  <obry@adacore.com>
10264             Eric Botcazou  <ebotcazou@adacore.com>
10265
10266         * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
10267
10268 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
10269
10270         * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
10271         end-of-case on the end label and its associated gotos, if any.
10272
10273 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
10274
10275         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
10276         expressions of the parameter cache within the statement group of
10277         the CICO mechanism.
10278
10279 2011-01-04  Olivier Hainque  <hainque@adacore.com>
10280             Eric Botcazou  <ebotcazou@adacore.com>
10281
10282         * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
10283         (set_end_locus_from_node): New function.
10284         (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
10285         make and the function end_locus.
10286         (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
10287         for the elaboration subprogram.
10288         (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
10289         set the end_locus of the expression as well.
10290
10291 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
10292
10293         PR ada/47131
10294         * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
10295         variables that are referenced in exception handlers volatile.
10296
10297
10298 \f
10299 Copyright (C) 2011 Free Software Foundation, Inc.
10300
10301 Copying and distribution of this file, with or without modification,
10302 are permitted in any medium without royalty provided the copyright
10303 notice and this notice are preserved.