OSDN Git Service

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