OSDN Git Service

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