OSDN Git Service

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