OSDN Git Service

2011-08-29 Tristan Gingold <gingold@adacore.com>
[pf3gnuchains/gcc-fork.git] / gcc / ada / ChangeLog
1 2011-08-29  Tristan Gingold  <gingold@adacore.com>
2
3         * a-exexpr.adb (Propagate_Exception): Remove all the parameters as
4         they were unused.
5         * a-exexpr-gcc.adb (Propagate_Exception): Ditto.
6         * a-except-2005.adb (Propagate_Exception): Adjust spec.
7         (Raise_Current_Excep): Adjust call.
8         (Raise_From_Signal_Handler): Call now simply call Raise_Current_Excep.
9
10 2011-08-29  Thomas Quinot  <quinot@adacore.com>
11
12         * exp_disp.adb: Minor reformatting.
13
14 2011-08-29  Tristan Gingold  <gingold@adacore.com>
15
16         * a-exexpr.adb (Setup_Exception): Removed.
17         * a-exexpr-gcc.adb (Setup_Exception): Removed.
18         * a-except.adb (Exception_Propagation): Removed.
19         * a-except-2005.adb (Setup_Exception): Removed.
20         (Reraise): Remove call to Setup_Exception.
21         (Reraise_Occurrence): Ditto.
22         (Reraise_Occurrence_Always): Ditto.
23         (Reraise_Occurrence_No_Defer): Ditto.
24         (Transfer_Occurrence): Ditto.
25         * a-exexda.adb (Set_Exception_C_Msg): Remove call to Setup_Exception.
26         (Set_Exception_Msg): Ditto.
27
28 2011-08-29  Robert Dewar  <dewar@adacore.com>
29
30         * a-convec.adb, exp_disp.adb: Minor reformatting.
31
32 2011-08-29  Tristan Gingold  <gingold@adacore.com>
33
34         * a-exexpr-gcc.adb (GNAT_GCC_Exception_Access): Set to convention C.
35
36 2011-08-29  Gary Dismukes  <dismukes@adacore.com>
37
38         * exp_ch3.adb (Build_Record_Init_Proc.Build_Init_Procedure): Set
39         Exception_Handlers to No_List instead of Empty_List in the case where
40         there are no handlers.
41
42 2011-08-29  Tristan Gingold  <gingold@adacore.com>
43
44         * gcc-interface/gigi.h (enum standard_datatypes): Add
45         ADT_reraise_zcx_decl
46         (reraise_zcx_decl): New macro.
47         * gcc-interface/trans.c (gnu_incoming_exc_ptr): New variable.
48         (gigi): Set reraise_zcx_decl.
49         (Exception_Handler_to_gnu_zcx): Save and restore gnu_incoming_exc_ptr.
50         (gnat_to_gnu): Handle N_Raise_Statement.
51
52 2011-08-29  Robert Dewar  <dewar@adacore.com>
53
54         * sem_ch6.adb, exp_ch3.adb, s-stposu.adb, a-undesu.ads,
55         a-undesu.adb: Minor reformatting.
56
57 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
58
59         * exp_disp.adb (Check_Premature_Freezing): When building a dispatch
60         table, accept an unfrozen untagged component if it is an actual for a
61         formal incomplete type.
62         * a-convec.ads, a-convec.adb: Instantiate Ada.Iterator_Interfaces to
63         provide new iterator forms over vectors.
64         Introduce type Iterator in package body to implement operations of
65         Reversible_Iterator interface.
66         * a-iteint.ads: Make package pure so it is usable with new container
67         packages, that are categorized Remote_Types.
68
69 2011-08-29  Robert Dewar  <dewar@adacore.com>
70
71         * a-exexpr-gcc.adb, a-synbar.adb, sem_ch13.adb: Minor reformatting.
72
73 2011-08-29  Bob Duff  <duff@adacore.com>
74
75         * sem_aggr.adb (Resolve_Aggr_Expr): Call this routine even in the case
76         of <>, because this is the routine that checks for dimensionality
77         errors (for example, for a two-dimensional array, (others => <>) should
78         be (others => (others => <>)).
79
80 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
81
82         * impunit.adb: Add new run-time units.
83         * freeze.adb, exp_ch7.ads, exp_ch7.adb, exp_util.ads, exp_util.adb,
84         s-stposu.ads, s-stposu.adb: Code clean up.
85         Handle protected class-wide or task class-wide types
86         Handle C/C++/CIL/Java types.
87         * s-spsufi.adb, s-spsufi.ads: New files.
88
89 2011-08-29  Yannick Moy  <moy@adacore.com>
90
91         * sem_ch13.adb (Analyze_Aspect_Specifications): Reject test-case on
92         library-level subprogram.
93         * sem_prag.adb (Check_Test_Case): Stricter rules for test-case
94         placement.
95         (Analyze_Pragma): Change name "Normal" for "Nominal" in test-case
96         component.
97         * snames.ads-tmpl: Change name "Normal" for "Nominal" in test-case
98         component.
99         * gnat_rm.texi: Update doc for Test_Case pragma.
100
101 2011-08-29  Tristan Gingold  <gingold@adacore.com>
102
103         * a-exexpr-gcc.adb (Unwind_Exception): Remove default value, made it
104         convention C.
105         (GCC_Exception_Access): New type.
106         (Unwind_DeleteException): New imported procedure
107         (Foreign_Exception): Import it.
108         (GNAT_GCC_Exception): Simply have the occurrence inside.
109         (To_GCC_Exception): New function.
110         (To_GNAT_GCC_Exception): New function.
111         (GNAT_GCC_Exception_Cleanup): New procedure..
112         (Propagate_GCC_Exception): New procedure.
113         (Reraise_GCC_Exception): New procedure.
114         (Setup_Current_Excep): New procedure.
115         (CleanupUnwind_Handler): Change type of UW_Exception parameter.
116         (Unwind_RaiseException): Ditto.
117         (Unwind_ForcedUnwind): Ditto.
118         (Remove): Removed.
119         (Begin_Handler): Change type of parameter.
120         (End_Handler): Ditto. Now delete the exception if still present.
121         (Setup_Key): Removed.
122         (Is_Setup_And_Not_Propagated): Removed.
123         (Set_Setup_And_Not_Propagated): Ditto.
124         (Clear_Setup_And_Not_Propagated): Ditto.
125         (Save_Occurrence_And_Private): Ditto.
126         (EID_For): Add 'not null' constraint on parameter.
127         (Setup_Exception): Does nothing.
128         (Propagate_Exception): Simplified.
129         * exp_ch11.adb (Expand_N_Raise_Statement): In back-end exception model,
130         re-raise is not expanded anymore.
131         * s-except.ads (Foreign_Exception): New exception - placeholder for
132         non Ada exceptions.
133         * raise-gcc.c (__gnat_setup_current_excep): Declare
134         (CXX_EXCEPTION_CLASS): Define (not yet used)
135         (GNAT_EXCEPTION_CLASS): Define.
136         (is_handled_by): Handle foreign exceptions.
137         (PERSONALITY_FUNCTION): Call __gnat_setup_current_excep.
138
139 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
140
141         * a-synbar.adb (Synchronous_Barrier): Some additional clarification.
142
143 2011-08-29  Thomas Quinot  <quinot@adacore.com>
144
145         * a-synbar-posix.adb: Minor reformatting.
146
147 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
148
149         * a-exetim-posix.adb, a-exetim-mingw.adb, a-exetim-mingw.ads,
150         a-exetim-default.ads (Interrupt_Clocks_Supported,
151         Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
152         definitions to be compliant with AI-0171. The target systems do not
153         support separate account for the execution time of interrupt handlers.
154
155 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
156
157         * a-synbar.adb (Wait): Change the order of evaluation of the conditions
158         in the barrier to put first the easiest to evaluate (and the one which
159         will be True more often). More efficient.
160
161 2011-08-29  Eric Botcazou  <ebotcazou@adacore.com>
162
163         * s-atocou-x86.adb: Fix constraint in machine code insertion.
164
165 2011-08-29  Bob Duff  <duff@adacore.com>
166
167         * aspects.ads, aspects.adb: Add new aspects for various pragmas and
168         attributes that are now aspects, as specified by AI05-0229-1.
169         * sem_ch13.adb (Analyze_Aspect_Specifications,
170         Check_Aspect_At_Freeze_Point): Analyze the new aspects. Turn them into
171         pragmas or attribute references, as appropriate.
172
173 2011-08-29  Robert Dewar  <dewar@adacore.com>
174
175         * a-synbar.ads, a-synbar.adb, a-synbar-posix.adb,
176         a-synbar-posix.ads: Minor reformatting.
177
178 2011-08-29  Yannick Moy  <moy@adacore.com>
179
180         * snames.ads-tmpl: Add name Force.
181
182 2011-08-29  Pascal Obry  <obry@adacore.com>
183
184         * prj-nmsc.adb: Minor reformatting.
185
186 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
187
188         * a-exetim.ads (Interrupt_Clocks_Supported,
189         Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
190         definitions to be compliant with AI-0171.
191
192 2011-08-29  Robert Dewar  <dewar@adacore.com>
193
194         * a-ngelfu.adb: Add comments.
195
196 2011-08-29  Geert Bosch  <bosch@adacore.com>
197
198         * a-ngelfu.adb (Tan): Do not raise Constraint_Error if the argument is
199         the closest machine number to Pi / 2.0.
200
201 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
202
203         * impunit.adb (Non_Imp_File_Names_12): Add a-synbar for new Ada 2012
204         package Ada.Synchronous_Barriers.
205         * a-synbar.ads, a-synbar.adb, a-synbar-posix.ads, a-synbar-posix.adb:
206         Add new specs and bodies for Ada.Synchronous_Barriers. There is a
207         default implementation using protected objects and another one
208         a-synbar-posix using POSIX barriers as the underlying support.
209         * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for Linux (x86,
210         x86_64, ia64) and MIPS IRIX): Use the a-synbar-posix implementation of
211         Ada.Synchronous_Barriers which uses POSIX barriers (more efficient).
212         Clean up dependencies.
213         * Makefile.rtl (GNATRTL_TASKING_OBJS): Add a-synbar.o
214
215 2011-08-29  Robert Dewar  <dewar@adacore.com>
216
217         * sem_ch7.adb, make.adb, sem_res.adb, exp_intr.adb,
218         exp_dist.adb: Minor code reorganization.
219         Minor reformatting.
220
221 2011-08-29  Thomas Quinot  <quinot@adacore.com>
222
223         * sem_cat.adb (Validate_RACW_Primitive): The return type of an RACW
224         primitive operation must support external streaming if it is not a
225         controlling access result.
226
227 2011-08-29  Thomas Quinot  <quinot@adacore.com>
228
229         * sinfo.ads, sem_ch7.adb: Minor reformatting.
230
231 2011-08-29  Bob Duff  <duff@adacore.com>
232
233         * sem_ch4.adb (Analyze_Allocator): Check No_Nested_Finalization
234         restriction on allocators, as required by AI05-0013-1.
235         * restrict.ads: Minor comment fix.
236
237 2011-08-29  Tristan Gingold  <gingold@adacore.com>
238
239         * a-exexpr.adb, a-except-2005.ads (Jmpbuf_Address): Move to a-exexpr.adb
240         (To_Jmpbuf_Address): Ditto
241         (builtin_longjmp): Ditto
242
243 2011-08-29  Thomas Quinot  <quinot@adacore.com>
244
245         * sem_res.adb: Minor reformatting.
246
247 2011-08-29  Vincent Celier  <celier@adacore.com>
248
249         * make.adb (Gnatmake): Move special processing for VM targets after the
250         call to Get_Target_Parameters.
251
252 2011-08-29  Thomas Quinot  <quinot@adacore.com>
253
254         * sem_ch12.adb, par-ch12.adb: Minor reformatting.
255
256 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
257
258         * sem_res.adb (Resolve_Allocator): Implement Ada2012-B052. Detect cases
259         where an anonymous access discriminant of a limited designated type
260         appears in a non-immutably limited discriminated type and issue an
261         error message. Add local variable Desig_T and replace all occurrences
262         of Designated_Type.
263
264 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
265
266         * a-rttiev.adb (Set_Handler): Update comment to indicate that our
267         implementation is compliant to RM D.15(15/2) after the modification
268         imposed by AI05-0094-1 (binding interpretation).
269
270 2011-08-29  Robert Dewar  <dewar@adacore.com>
271
272         * exp_ch9.adb, s-tasren.adb, exp_sel.adb, exp_sel.ads, exp_ch11.adb,
273         s-interr-hwint.adb, s-tpobop.adb, sem_ch13.adb: Minor reformatting.
274
275 2011-08-29  Thomas Quinot  <quinot@adacore.com>
276
277         * par-endh.adb (Check_End): For an END where it is mandatory to repeat
278         the scope name, do not report a missing label as a style violation (it
279         will be diagnosed as an illegality).
280         * exp_dist.adb (Add_Params_For_Variant_Components): Fix handling of
281         variant records: Get_Enum_Lit_From_Pos already returns a usage
282         occurrence of the literal, no need to use New_Occurrence_Of. Set Etype
283         on Expr in Integer_Literal case so that it can be used by
284         Build_To_Any_Call.
285
286 2011-08-29  Tristan Gingold  <gingold@adacore.com>
287
288         * exp_sel.ads (Build_Abort_BLock_Handler): New function spec.
289         Adjust comment.
290         * exp_sel.adb (Build_Abort_Block): Use Build_Abort_Block_Handler.
291         (Build_Abort_Block_Handler): New function to build an Abort_Signal
292         exception handler.
293         * exp_ch9.adb (Expand_N_Asynchronous_Select): Call
294         Build_Abort_Block_Handler to build the exception handler. Do not
295         undefer aborts for the Abort_Signal exception handler if back-end
296         exception mechanism.
297         * exp_ch11.adb (Expand_Exception_Handlers): Do not undefer aborts if
298         back_end exceptions for all others and abort_signal.
299         * s-except.ads (ZCX_By_Default): New constant.
300         * a-except-2005.adb (Raise_Exception): Do not defer abort if ZCX.
301         (Raise_Exception_Always): Ditto.
302         (Raise_From_Signal_Handler): Ditto.
303         (Raise_With_Location_And_Msg): Ditto.
304         (Raise_With_Msg): Ditto.
305         (Reraise): Ditto.
306         (Reraise_Occurence): Ditto.
307         (Reraise_Occurrence_Always): Ditto.
308         * s-tasren.adb (Exceptional_Complete_Rendezvous): Defer aborts if ZCX.
309         * s-tpobop.adb: (Exceptional_Complete_Body): Undefer abort if ZCX.
310
311 2011-08-29  Thomas Quinot  <quinot@adacore.com>
312
313         * sem_util.ads (Get_Enum_Lit_From_Pos): Clarify documentation.
314
315 2011-08-29  Robert Dewar  <dewar@adacore.com>
316
317         * snames.adb-tmpl, sem_ch13.adb: Minor reformatting
318         Minor code reorganization.
319
320 2011-08-29  Bob Duff  <duff@adacore.com>
321
322         * usage.adb (-gnatwy): Fix documentation: this switch applies to Ada
323         2012, not just Ada 2005.
324
325 2011-08-29  Vincent Celier  <celier@adacore.com>
326
327         * gnat_ugn.texi: Indicate that when the compiler is called by gnatmake
328         with a project file or with gprbuid, if -gnatep= is specified, the
329         builder may need to be invoked with -x.
330
331 2011-08-29  Tristan Gingold  <gingold@adacore.com>
332
333         * a-exexpr-gcc.adb: Minor comment fix.
334
335 2011-08-29  Robert Dewar  <dewar@adacore.com>
336
337         * sem_ch8.adb: Minor reformatting.
338
339 2011-08-29  Bob Duff  <duff@adacore.com>
340
341         * par-ch2.adb (P_Identifier): Warn that "some" is reserved in Ada 2012.
342         * par-ch4.adb (P_Quantified_Expression): Remove unnecessary code for
343         treating "some" as unreserved in earlier Ada versions. This is now
344         handled in Snames.Is_Keyword_Name. Parse "for some" using Tok_Some,
345         rather than Name_Some, since Tok_Some is now recognized as reserved.
346         * scans.adb (Initialize_Ada_Keywords): Handle Tok_Some like any other
347         reserved word.
348         * scans.ads: Minor comment fixes.
349         * snames.adb-tmpl (Is_Keyword_Name): Handle Ada 2012 reserved words as
350         for other language versions.
351         * scn.adb (Scan_Reserved_Identifier): Remove unnecessary code for
352         treating "some" as unreserved in earlier Ada versions. This is now
353         handled in Snames.Is_Keyword_Name.
354         * par-ch3.adb (P_Defining_Identifier): Warn that "some" is reserved in
355         Ada 2012.
356         (P_Subtype_Mark_Resync): Remove unnecessary code for treating "some" as
357         unreserved in earlier Ada versions. This is now handled in
358         Snames.Is_Keyword_Name.
359         * snames.ads-tmpl (Ada_2012_Reserved_Words): Handle Ada 2012 reserved
360         words as for other language versions.
361         * gnat_ugn.texi (-gnatwy): Fix documentation: this switch applies to
362         Ada 2012, not just Ada 2005.
363
364 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
365
366         * sem_ch13.adb: Additional semantic checks for aspects involved in
367         iterators.
368
369 2011-08-29  Matthew Heaney  <heaney@adacore.com>
370
371         * a-comutr.ads, a-comutr.adb, a-cimutr.ads, a-cimutr.adb,
372         a-cbmutr.ads, a-cbmutr.adb (Find_In_Subtree): Remove superfluous
373         Container parameter.
374         (Ancestor_Find): ditto.
375
376 2011-08-29  Thomas Quinot  <quinot@adacore.com>
377
378         * par-endh.adb: Minor reformatting.
379
380 2011-08-29  Tristan Gingold  <gingold@adacore.com>
381
382         * a-exexpr-gcc.adb (Unwind_Action) Rewrite as an integer with constants.
383         (GNAT_GCC_Exception): Remove N_Cleanups_To_Trigger component.
384         (Adjust_N_CLeanups_For): Remove.
385         (CleanupUnwind_Handler): Call Unhandled_Exception_Terminate when end of
386         stack is reached.
387         (Propgate_Exception): Adjust.
388         * raise-gcc.c: Add a few static/const.
389         (Adjust_N_Cleanups_For): Remove declaration.
390         (PERSONALITY_FUNCTION): Remove code dealing with N_Cleanups_To_Trigger.
391
392 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
393
394         * sem_ch8.adb: Use type of function return when rewriting as object
395         declaration.
396
397 2011-08-29  Gary Dismukes  <dismukes@adacore.com>
398
399         * sem_type.adb: Minor reformatting.
400
401 2011-08-29  Robert Dewar  <dewar@adacore.com>
402
403         * makeutl.adb: Minor reformatting.
404
405 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
406
407         * sem_ch8.adb (Analyze_Object_Renaming): If the renamed object is a
408         function call of a limited type, the expansion of the renaming is
409         complicated by the presence of various temporaries and subtypes that
410         capture constraints of the renamed object.
411         Rewrite node as an object declaration, whose expansion is simpler.
412         Given that the object is limited there is no copy involved and no
413         performance hit.
414
415 2011-08-29  Robert Dewar  <dewar@adacore.com>
416
417         * exp_ch5.adb, sinfo.ads, make.adb, s-pooglo.adb, sem_ch12.adb,
418         freeze.adb, sem_ch6.adb, par-ch12.adb: Minor reformatting.
419
420 2011-08-29  Tristan Gingold  <gingold@adacore.com>
421
422         * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
423         system-tru64.ads, system-irix-n32.ads, system-vxworks-arm.ads,
424         system-linux-hppa.ads, system-linux-s390.ads,
425         system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
426         system-vms_64.ads, system-vxworks-sparcv9.ads, system-linux-ppc.ads,
427         system-aix64.ads, system-lynxos-ppc.ads, system-linux-sh4.ads,
428         system-solaris-x86.ads, system-linux-x86_64.ads, system-linux-x86.ads,
429         system-vxworks-ppc.ads, system-hpux.ads, system-darwin-ppc.ads,
430         system-solaris-sparc.ads, system-lynxos-x86.ads,
431         system-vxworks-m68k.ads, system-hpux-ia64.ads, system-irix-o32.ads,
432         system-solaris-x86_64.ads, system-mingw-x86_64.ads,
433         system-vxworks-mips.ads, system-linux-sparc.ads, system-vms-ia64.ads,
434         system-freebsd-x86.ads, system-aix.ads, system-darwin-x86_64.ads,
435         system-vxworks-x86.ads: Remove GCC_ZCX_Support
436         * s-taprop-posix.adb, s-taprop-irix.adb, s-taprop-vxworks.adb,
437         s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-solaris.adb: Ditto.
438         * opt.ads: Adjust comment.
439         * targparm.ads, targparm.adb: Remove GCC_ZCX_Support_On_Target.
440         * gnat1drv.adb: Do not check for GCC_ZCX_Support_On_Target.
441         * system.ads: Move GCC_ZCX_Support to obsolete entries.
442
443 2011-08-29  Emmanuel Briot  <briot@adacore.com>
444
445         * makeutl.adb (Do_Complete): Resolve symbolic links when a relative
446         file name is specified on the gnatmake or gprbuild command line, and
447         before we search for that file in the project.
448
449 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
450
451         * sem_type.adb (Within_Instance): New predicate in Collect_Interps,
452         used to determine whether a possible interpretation for an overloadable
453         entity is declared within the current instantiation and should be
454         included in the candidate set.
455
456 2011-08-29  Vasiliy Fofanov  <fofanov@adacore.com>
457
458         * gnat_rm.texi, gnat_ugn.texi: Clean ups.
459
460 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
461
462         * sem_res.adb (Resolve_Actuals): Use base type to determine whether an
463         access subtype is access_to_subprogram, when applying checks for
464         RM 3.10.2 (27).
465
466 2011-08-29  Matthew Heaney  <heaney@adacore.com>
467
468         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check
469         for sibling when common parent.
470
471 2011-08-29  Thomas Quinot  <quinot@adacore.com>
472
473         * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with
474         "pragma_".
475
476 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
477
478         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions
479         for the return type when in ASIS mode.
480
481 2011-08-29  Vincent Celier  <celier@adacore.com>
482
483         * make.adb (Gnatmake): Get the default search dirs, then the target
484         parameters after getting the Builder switches, as the Builder switches
485         may include --RTS= and that could change the default search dirs.
486
487 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
488
489         * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of
490         Make_Final_Call. Move the processing for class-wide types before the
491         processing for derivations from [Limited_]Controlled.
492         (Make_Final_Call): Move the processing for class-wide types before the
493         processing for derivations from [Limited_]Controlled.
494         * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check.
495         Add code to account for alignments larger than the list header. Add a
496         comment illustrating the structure of the allocated object + padding +
497         header.
498         (Deallocate_Any_Controlled): Add code to account for alignments larger
499         than the list header.
500
501 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
502
503         * sinfo.ads, sinfo.adb: New node kind
504         N_Formal_Incomplete_Type_Definition, related flags.
505         par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition):
506         Parse formal incomplete types.
507         * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in
508         sem_ch12.
509         * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body):
510         Formal incomplete types do not need completion.
511         * sem_ch12.adb (Analyze_Formal_Incomplete_Type,
512         Validate_Incomplete_Type_Instance): New procedures to handle formal
513         incomplete types.
514         * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual
515         that corresponds to a formal incomplete type.
516         * sprint.adb: Handle formal incomplete type declarations.
517         * exp_util.adb (Insert_Actions): An incomplete_type_definition is not
518         an insertion point.
519
520 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
521
522         * a-fihema.ads, a-fihema.adb: Unit removed.
523         * a-undesu.ads, a-undesu.adb: New unit implementing
524         Ada.Unchecked_Deallocate_Subpool.
525         * einfo.adb: Remove Associated_Collection from the node usage.
526         Add Finalization_Master to the node usage.
527         (Associated_Collection): Removed.
528         (Finalization_Master): New routine.
529         (Set_Associated_Collection): Removed.
530         (Set_Finalization_Master): New routine.
531         (Write_Field23_Name): Remove Associated_Collection from the output. Add
532         Finalization_Master to the output.
533         * einfo.ads: Remove attribute Associated_Collection and its uses in
534         entities.
535         Add new attribute Finalization_Master along with its uses in entitites.
536         (Associated_Collection): Removed along with its pragma import.
537         (Finalization_Master): New routine along with a pragma import.
538         (Set_Associated_Collection): Removed along with its pragma import.
539         (Set_Finalization_Master): New routine along with a pragma import.
540         * exp_ch3.adb (Expand_Freeze_Array_Type): Replace call to
541         Build_Finalization_Collection with Build_Finalization_Master.
542         (Expand_Freeze_Record_Type): Move the generation of Finalize_Address
543         before the bodies of the predefined routines. Add comment explaining
544         this. Replace call to Build_Finalization_Collection with
545         Build_Finalization_Master.
546         (Freeze_Type): Replace call to Build_Finalization_Collection with
547         Build_Finalization_Master.
548         (Make_Finalize_Address_Body): Comment reformatting.
549         (Make_Predefined_Primitive_Specs): Code reformatting.
550         (Stream_Operation_OK): Update comment mentioning finalization
551         collections. Replace RE_Finalization_Collection with
552         RE_Finalization_Master.
553         * exp_ch4.adb (Complete_Controlled_Allocation): Replace call to
554         Associated_Collection with Finalization_Master. Replace call to
555         Build_Finalization_Collection with Build_Finalization_Master.
556         (Expand_Allocator_Expression): Replace call to Associated_Collection
557         with Finalization_Master. Replace call to Set_Associated_Collection with
558         Set_Finalization_Master. Remove the generation of
559         Set_Finalize_Address_Ptr.
560         (Expand_N_Allocator): Replace call to Associated_Collection with
561         Finalization_Master. Remove the generation of Set_Finalize_Address_Ptr.
562         * exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call): Renamed to
563         Add_Finalization_Master_Actual_To_Build_In_Place_Call. Update the
564         comment on usage. Replace call to Needs_BIP_Collection with
565         Needs_BIP_Finalization_Master Remplace BIP_Collection with
566         BIP_Finalization_Master. Update all comments which mention finalization
567         collections. Replace Associated_Collection with
568         Finalization_Master. Replace Build_Finalization_Collection with
569         Build_Finalization_Master.
570         (BIP_Formal_Suffix): Update BIP_Collection's case.
571         (Build_Heap_Allocator): Update the related comment. Rename local
572         variable Collect to Fin_Mas_Id and update its occurrences. Update
573         comments which mention finalization collections. Replace
574         Set_Associated_Collection with Set_Finalization_Master.
575         (Expand_Call): Update the code which detects a special piece of library
576         code for .NET/JVM.
577         (Make_Build_In_Place_Call_In_Allocator): Replace the call to
578         Add_Collection_Actual_To_Build_In_Place_Call with
579         Add_Finalization_Master_Actual_To_Build_In_Place_Call. Remove the code
580         which generates a call to Make_Set_Finalize_Address_Ptr_Call.
581         (Make_Build_In_Place_Call_In_Anonymous_Context): Replace call to
582         Add_Collection_Actual_To_Build_In_Place_Call with
583         Add_Finalization_Master_Actual_To_Build_In_Place_Call.
584         (Make_Build_In_Place_Call_In_Assignment): Replace call to
585         Add_Collection_Actual_To_Build_In_Place_Call with
586         Add_Finalization_Master_Actual_To_Build_In_Place_Call.
587         (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
588         * exp_ch6.ads: Rename BIP_Collection to BIP_Finalization_Master.
589         (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
590         * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Update comment on usage.
591         Rename local variable Collect to Fin_Mas_Id and update its occurrences.
592         Replace call to Set_Associated_Collection with Set_Finalization_Master.
593         (Build_Finalization_Collection): Renamed to Build_Finalization_Master.
594         Replace the call to Associated_Collection with Finalization_Master.
595         Rename local variable Coll_Id to Fin_Mas_Id and update its occurrences.
596         Update the way finalization master names are generated. Update the
597         retrieval of the correct access type which will carry the pool and
598         master attributes.
599         (Make_Final_Call): Reimplement the way [Deep_]Finalize is retrieved.
600         (Make_Finalize_Address_Body): Abstract types do not need
601         Finalize_Address. Code reformatting.
602         (Make_Finalize_Address_Stmts): Update comment on usage.
603         (Make_Set_Finalize_Address_Ptr_Call): Removed.
604         (Process_Declarations): Update comments.
605         * exp_ch7.ads (Build_Finalization_Collection): Renamed to
606         Build_Finalization_Master. Update associated comment.
607         (Make_Set_Finalize_Address_Ptr_Call): Removed.
608         * exp_ch13.adb: Update comments which mention finalization collections.
609         (Expand_N_Free_Statement): Replace the call to Associated_Collection
610         with Finalization_Master.
611         * exp_util.adb (Build_Allocate_Deallocate_Proc): Reimplemented to
612         create calls to routines Allocate_Any_Controlled and
613         Deallocate_Any_Controlled.
614         (Find_Finalize_Address): New routine.
615         (Is_Allocate_Deallocate_Proc): Update the RTE entities used in the
616         comparison.
617         (Requires_Cleanup_Actions): Update the comment on freeze node
618         inspection.
619         * exp_util.ads: Remove comment on generated code for
620         Build_Allocate_Deallocate_Proc. The code is now quite complex and it
621         is better to simply look in the body.
622         * freeze.adb (Freeze_All): Update the comment of finalization
623         collections. Replace the call to Associated_Collection with
624         Finalization_Master. Replace the call to Build_Finalization_Collection
625         with Build_Finalization_Master.
626         * impunit.adb: Add a-undesu and s-stposu to the list of units.
627         * Makefile.rtl: Add files a-undesu, s-finmas and s-stposu. Remove file
628         a-fihema.
629         * rtsfind.adb (Get_Unit_Name): Remove the processing for children of
630         Ada.Finalization. Add processing for children of System.Storage_Pools.
631         * rtsfind.ads: Remove the naming of second level children of
632         Ada.Finalization.
633         Remove Ada_Finalization_Heap_Management from the list of units.
634         Remove subtype Ada_Finalization_Child.
635         Remove the following subprogram entities:
636         
637            RE_Allocate
638            RE_Deallocate
639            RE_Finalization_Collection
640            RE_Finalization_Collection_Ptr
641            RE_Set_Finalize_Address_Ptr
642         
643         Add the naming of second level children of System.Storage_Pools.
644         Add System_Finalization_Masters and System_Storage_Pools_Subpools to
645         the list of units.
646         Add subtype System_Storage_Pools_Child.
647         Add the following subprogram entities to System.Finalization_Masters:
648         
649            RE_Finalization_Master
650            RE_Finalization_Master_Ptr
651         
652         Add the following subprogram entities to System.Storage_Pools.Subpools:
653         
654            RE_Allocate_Any_Controlled
655            RE_Deallocate_Any_Controlled
656            RE_Root_Storage_Pool_With_Subpools
657            RE_Root_Subpool
658            RE_Subpool_Handle
659         
660         Move the following subprogram entities from
661         Ada.Finalization.Heap_Management to System.Finalization_Masters:
662         
663            RE_Add_Offset_To_Address
664            RE_Attach
665            RE_Base_Pool
666            RE_Detach
667         
668         * sem_ch3.adb (Access_Type_Declaration): Replace the call to
669         Set_Associated_Collection with Set_Finalization_Master.
670         * sem_ch6.adb (Create_Extra_Formals): Update the way extra formal
671         BIP_Finalization_Master is created.
672         * s-finmas.adb: New unit System.Finalization_Masters.
673         * s-finmas.ads: New unit System.Finalization_Masters.
674         * s-stopoo.ads, s-stopoo.adb: Minor code reformatting.
675         * s-stposu.ads, s-stposu.adb: New unit implementing
676         System.Storage_Pools.Subpools.
677
678 2011-08-29  Bob Duff  <duff@adacore.com>
679
680         * tbuild.adb: Add assertion.
681
682 2011-08-29  Thomas Quinot  <quinot@adacore.com>
683
684         * s-pooglo.adb: Minor reformatting.
685
686 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
687
688         * exp_ch5.adb (Expand_N_Assignment_Statement): if the left-hand side is
689         an indexed component of a packed array whose element type is a record
690         with a representation clause different from that of the right-hand
691         side, generate a temporary to minimuze the number of bit-field
692         operations generated.
693
694 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
695
696         * exp_util.adb (Insert_Actions): Use clauses can be part of lists of
697         declarations, and thus are likely insertion points for actions.
698
699 2011-08-29  Bob Duff  <duff@adacore.com>
700
701         * einfo.ads: Minor comment fix.
702
703 2011-08-29  Robert Dewar  <dewar@adacore.com>
704
705         * frontend.adb, gnat1drv.adb: Minor reformatting.
706
707 2011-08-29  Tristan Gingold  <gingold@adacore.com>
708
709         * s-pooglo.adb (Allocate, Deallocate): Take into account the alignment.
710         * a-fihema.adb (Allocate, Deallocate): Ditto.  Possibly add padding
711         space in front of the header.
712
713 2011-08-29  Johannes Kanig  <kanig@adacore.com>
714
715         * frontend.adb (Frontend): Exit after creating Standard package when
716         -gnatd.H is present.
717         * gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is
718         present.
719
720 2011-08-29  Robert Dewar  <dewar@adacore.com>
721
722         * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb,
723         makeutl.adb, makeutl.ads, atree.ads, snames.adb-tmpl,
724         snames.ads-tmpl: Minor reformatting.
725
726 2011-08-29  Philippe Gil  <gil@adacore.com>
727
728         * prj.adb (Reset_Units_In_Table): New procedure.
729         Reset units to avoid access to freed memory.
730
731 2011-08-29  Thomas Quinot  <quinot@adacore.com>
732
733         * get_scos.adb: When reading a P statement SCO without a pragma name
734         (from an older ALI file), ensure that the Pragma_Name component is set
735         to Unknown_Pragma (not left uninitialized).
736
737 2011-08-29  Vincent Celier  <celier@adacore.com>
738
739         * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and
740         modified to compute correctly the object path of a SAL project that is
741         extending another library project.
742         (Write_Path_File): New procedure.
743         * makeutl.ads (Directories): New table moved from Buildgpr
744         (Get_Directories): New procedure moved from Buildgpr
745         (Write_Path_File): New procedure
746         * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the
747         paths before binding SALs, instead of Set_Ada_Paths.
748         * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package
749         Prj.
750         * prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env
751         (Current_Source_Path_File_Of): New function
752         (Set_Current_Object_Path_File_Of): New procedure
753         (Current_Source_Object_File_Of): New function
754         (Set_Current_Object_Path_File_Of): New procedure
755         * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env
756         (Current_Source_Path_File_Of): New function
757         (Set_Current_Object_Path_File_Of): New procedure
758         (Current_Source_Object_File_Of): New function
759         (Set_Current_Object_Path_File_Of): New procedure
760
761 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
762
763         * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a
764         packed entity, use a bit-field assignment only if there is no change of
765         representation.
766
767 2011-08-29  Thomas Quinot  <quinot@adacore.com>
768
769         * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use
770         Is_RTU instead of using Chars comparisons.
771
772 2011-08-29  Thomas Quinot  <quinot@adacore.com>
773
774         * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a
775         temporary object if the actual is constrained, and the discriminants
776         read from the stream don't match.
777
778 2011-08-29  Tristan Gingold  <gingold@adacore.com>
779
780         * sem_attr.adb, exp_attr.adb: Add handling of
781         Attribute_System_Allocator_Alignment
782         * snames.ads-tmpl: Add Name_System_Allocator_Alignment and
783         Attribute_System_Allocator_Alignment.
784         * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment.
785         * gcc-interface/targtyps.c, gcc-interface/utils2.c,
786         gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to
787         get_target_system_allocator_alignment.
788
789 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
790
791         * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
792         dependencies.
793
794 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
795
796         * exp_ch3.adb (In_Runtime): Fix typo.
797
798 2011-08-29  Bob Duff  <duff@adacore.com>
799
800         * sem_ch4.adb (Analyze_Allocator): Analyze the subpool specification.
801
802 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
803
804         * exp_ch3.adb (Expand_N_Object_Declaration): If the entity is tagged
805         and a separate tag assignment is generated, ensure that the tag
806         assignment is analyzed.
807
808 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
809
810         * atree.ads, atree.adb (Copy_Separate_List): New function that applies
811         Copy_Separate_Tree to a list of nodes. Used to create disjoint copies
812         of statement lists that may contain local declarations.
813         * exp_ch9.adb (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to
814         duplicate the triggering statements needed for the expansion of this
815         construct, when the trigger is a dispatching call to a synchronized
816         primitive.
817
818 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
819
820         * gnat_rm.texi: Add doc for 'Elab_Subp_Body.
821         * bindgen.adb: Add comments.
822         * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body
823         in CodePeer mode.
824
825 2011-08-29  Robert Dewar  <dewar@adacore.com>
826
827         * exp_attr.adb: Minor reformatting.
828         Minor code reorganization and commenting.
829         * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
830         reformatting.
831
832 2011-08-29  Thomas Quinot  <quinot@adacore.com>
833
834         * get_scos.adb: Ignore chaining indicators not currently supported
835         by Ada.
836
837 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
838
839         * system.ads: Minor editing.
840
841 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
842
843         * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
844         CodePeer mode.
845         * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
846         Attribute_Elab_Subp_Body.
847         * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
848         * sem_util.adb: Update comments.
849
850 2011-08-29  Thomas Quinot  <quinot@adacore.com>
851
852         * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
853         pragma name for each SCO statement corresponding to a pragma.
854
855 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
856
857         * opt.ads: Minor editing.
858
859 2011-08-29  Yannick Moy  <moy@adacore.com>
860
861         * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
862         that only made sense for CodePeer mode.
863
864 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
865
866         * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
867         which is no longer used.
868         * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
869         handling of the 64-bit division check.
870         * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
871         division available.
872         * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
873         longer used.
874
875 2011-08-29  Thomas Quinot  <quinot@adacore.com>
876
877         * get_scos.adb: Minor reformatting.
878
879 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
880
881         * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
882         statement list is wrapped in a block, the block is explicitly analyzed
883         in order to properly redecorate the entities and create a servicing
884         finalizer.
885
886 2011-08-29  Tristan Gingold  <gingold@adacore.com>
887
888         * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
889         (Set_Zero_Cost_Handling): Remove.
890
891 2011-08-29  Thomas Quinot  <quinot@adacore.com>
892
893         * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
894
895 2011-08-29  Geert Bosch  <bosch@adacore.com>
896
897         * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
898         instruction, as the latter may produce -0.0, which is not a valid VAX
899         F float number.
900         (Neg_G): Likewise for VAX F float.
901
902 2011-08-29  Robert Dewar  <dewar@adacore.com>
903
904         * exp_util.adb: Minor reformatting.
905
906 2011-08-29  Yannick Moy  <moy@adacore.com>
907
908         * sem_ch3.adb: Minor comment update.
909
910 2011-08-29  Thomas Quinot  <quinot@adacore.com>
911
912         * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
913         the operand type.
914
915 2011-08-29  Thomas Quinot  <quinot@adacore.com>
916
917         * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
918         current statement sequence on a generic instantiation or a subprogram
919         declaration.
920
921 2011-08-29  Robert Dewar  <dewar@adacore.com>
922
923         * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
924         Minor reformatting.
925
926 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
927
928         * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
929         Correct the check which involves the freeze node of a controlled or
930         access-to-controlled type.
931
932 2011-08-29  Geert Bosch  <bosch@adacore.com>
933
934         * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
935         statements.
936         * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
937         Asm statements.
938
939 2011-08-29  Yannick Moy  <moy@adacore.com>
940
941         * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
942         for every index type and component type that is not a subtype_mark.
943         (Process_Subtype): Set Etype of subtype.
944
945 2011-08-29  Robert Dewar  <dewar@adacore.com>
946
947         * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
948         reorganization.  Minor reformatting.
949
950 2011-08-29  Steve Baird  <baird@adacore.com>
951
952         * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
953         for CodePeer and ALFA modes.
954
955 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
956
957         * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
958         that comes from an enclosing scope if it is not the renaming of an
959         actual, to handle properly a spurious ambiguity in an instance.
960
961 2011-08-29  Eric Botcazou  <ebotcazou@adacore.com>
962
963         * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
964         (Alignment_Check_For_Size_Change): ...this.  Add SIZE parameter and
965         use it instead of the Esize of the first parameter.
966         (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
967         above change.
968         <Size>: Likewise.  Call it for composite types on the RM size.
969
970 2011-08-29  Yannick Moy  <moy@adacore.com>
971
972         * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
973         * sem_util.adb (Unique_Name): Correct behaviour for names of
974         compilation units.
975
976 2011-08-29  Yannick Moy  <moy@adacore.com>
977
978         * sem_prag.adb (Check_Precondition_Postcondition): In formal
979         verification mode, analyze pragma expression for correctness, for
980         pre/post on library-level subprogram, as it is not expanded later.
981
982 2011-08-29  Yannick Moy  <moy@adacore.com>
983
984         * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
985         in formal verification.
986
987 2011-08-29  Thomas Quinot  <quinot@adacore.com>
988
989         * sem_util.adb: Minor reformatting.
990         * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
991         there's no pragma.
992         * par_sco.ads, par_sco.adb: Update comments.
993
994 2011-08-29  Yannick Moy  <moy@adacore.com>
995
996         * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
997         associated getter/setter.
998         * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
999
1000 2011-08-29  Vincent Celier  <celier@adacore.com>
1001
1002         * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
1003         * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
1004         with declarations for Language_Kind and Dependency_Kind for Ada.
1005         * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
1006         (Process_Compiler): Take into account the new attributes Dependency_Kind
1007         and Language_Kind.
1008         (Check_Configuration): Check if language kind is unit based, not if the
1009         language name is Ada.
1010         (Process_Exceptions_Unit_Based): Ditto
1011         (Add_Language): Remove default additions of language and dependency kind
1012         * prj.ads: Minor comment change
1013         * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
1014
1015 2011-08-29  Johannes Kanig  <kanig@adacore.com>
1016
1017         * debug.adb: Update comments.
1018
1019 2011-08-24  Joseph Myers  <joseph@codesourcery.com>
1020
1021         * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
1022         (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
1023         (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
1024         (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
1025         (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
1026
1027 2011-08-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1028
1029         * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
1030         (GNATLIBCFLAGS_FOR_C): Replace
1031         TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
1032         (gnatlib-shared-default, gnatlib-shared-dual-win32)
1033         (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
1034         (gnatlib-sjlj, gnatlib-zcx): Likewise.
1035
1036 2011-08-07  Eric Botcazou  <ebotcazou@adacore.com>
1037
1038         * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
1039
1040         * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
1041
1042         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
1043
1044 2011-08-05  Nicolas Roche  <roche@adacore.com>
1045
1046         * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
1047         libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
1048         canadian cross.
1049         * gcc-interface/Make-lang.in: Add support for canadian cross setting.
1050
1051 2011-08-05  Matthew Heaney  <heaney@adacore.com>
1052
1053         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
1054         subprogram bodies declared out-of-order.
1055
1056 2011-08-05  Yannick Moy  <moy@adacore.com>
1057
1058         * sem_util.adb (Unique_Name): only prefix with "standard" the names of
1059         entities directly in package Standard, otherwise skip the standard
1060         prefix.
1061
1062 2011-08-05  Robert Dewar  <dewar@adacore.com>
1063
1064         * a-cbmutr.adb: Minor reformatting
1065         (Allocate_Node): refactor node allocation algorithm
1066
1067 2011-08-05  Robert Dewar  <dewar@adacore.com>
1068
1069         * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
1070         * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
1071         mode.
1072         (Analyze_Pragma, case Check_Policy): Ditto.
1073         * sem_prag.ads (Check_Disabled): New function
1074         * snames.ads-tmpl: Add Name_Disable.
1075
1076 2011-08-05  Robert Dewar  <dewar@adacore.com>
1077
1078         * gnat_rm.texi: Document implementation-defined policy DISABLE for
1079         pragmas Assertion_Policy, Check_Policy, Debug_Policy.
1080
1081 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1082
1083         * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
1084         that appears in a generic formal part and applies to a formal
1085         subprogram.
1086
1087 2011-08-05  Robert Dewar  <dewar@adacore.com>
1088
1089         * a-cbmutr.ads: Minor reformatting.
1090
1091 2011-08-05  Matthew Heaney  <heaney@adacore.com>
1092
1093         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
1094         to check count, check sign of value instead.
1095         * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
1096         (Copy_Subtree): allocate copy of source element
1097         (Equal_Subtree): compare elements, not access objects
1098
1099 2011-08-05  Vincent Celier  <celier@adacore.com>
1100
1101         * gnat_ugn.texi: Fix VMS alternative.
1102
1103 2011-08-05  Thomas Quinot  <quinot@adacore.com>
1104
1105         * sem_ch11.adb: Add comment.
1106
1107 2011-08-05  Robert Dewar  <dewar@adacore.com>
1108
1109         * exp_util.adb: Minor comment fix.
1110
1111 2011-08-05  Robert Dewar  <dewar@adacore.com>
1112
1113         * scng.adb (Error_Unterminated_String): Improve flag position when
1114         comma present.
1115
1116 2011-08-05  Matthew Heaney  <heaney@adacore.com>
1117
1118         * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
1119         tree containers).
1120         * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
1121         multiway tree containers.
1122
1123 2011-08-05  Robert Dewar  <dewar@adacore.com>
1124
1125         * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
1126         * stylesw.adb: Implement -gnatyC to control comment spacing
1127         * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
1128         -gnatyc/C).
1129         * usage.adb: Add line for -gnatyC.
1130
1131 2011-08-05  Robert Dewar  <dewar@adacore.com>
1132
1133         * gnat_ugn.texi: Document -gnatyC.
1134         * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
1135         synonym for COMMENTS2).
1136
1137 2011-08-05  Robert Dewar  <dewar@adacore.com>
1138
1139         * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
1140         a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
1141         sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
1142         a-comutr.ads, lib-xref.adb: Minor reformatting.
1143
1144 2011-08-05  Robert Dewar  <dewar@adacore.com>
1145
1146         * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
1147         warning if there is an exception handler present.
1148
1149 2011-08-05  Pascal Obry  <obry@adacore.com>
1150
1151         * a-iteint.ads: Fix copyright year.
1152
1153 2011-08-05  Thomas Quinot  <quinot@adacore.com>
1154
1155         * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
1156         statement SCO for a USE clause or a representation clause.
1157
1158 2011-08-05  Yannick Moy  <moy@adacore.com>
1159
1160         * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
1161         between body and spec for stub.
1162         (Detect_And_Add_ALFA_Scope): take into account subprogram stub
1163         * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
1164         pragma precondition or postcondition, for which the enclosing
1165         subprogram or package in the AST is not the desired one, return empty.
1166
1167 2011-08-05  Thomas Quinot  <quinot@adacore.com>
1168
1169         * g-expect.adb: Minor reformatting.
1170
1171 2011-08-05  Bob Duff  <duff@adacore.com>
1172
1173         * a-fihema.adb: Comment out OS_Lib.
1174
1175 2011-08-05  Matthew Heaney  <heaney@adacore.com>
1176
1177         * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
1178         (unbounded multiway tree containers) and a-iteint.ads.
1179         * a-comutr.ads, a-comutr.adb:
1180         This is the new Ada 2012 unit for unbounded multiway tree containers
1181         * a-cimutr.ads, a-cimutr.adb
1182         This is the new Ada 2012 unit for indefinite multiway tree containers
1183         * a-iteint.ads: New file.
1184
1185 2011-08-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1186
1187         * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
1188
1189 2011-08-05  Bob Duff  <duff@adacore.com>
1190
1191         * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
1192         subpools.
1193         * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
1194
1195 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1196
1197         * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
1198         general indexing aspects of Ada2012. Called when analyzing indexed
1199         components when other interpretations fail.
1200         * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
1201         in an expression context where overloading is meaningful. This excludes
1202         the occurrence in an aspect specification (efficiency only).
1203         * sem_attr.adb (Analyze_Attribute): indicate that the attributes
1204         related to iterators can be set by an attribute specification, but
1205         cannot be queried.
1206         * sem_ch13.adb (Analyze_Aspect_Specifications): handle
1207         Constant_Indexing and Variable_Indexing.
1208         (Check_Indexing_Functions): New procedure to perform legality checks.
1209         Additional semantic checks at end of declarations.
1210
1211 2011-08-05  Sergey Rybin  <rybin@adacore.com>
1212
1213         * tree_io.ads: Update ASIS_Version_Number because of the change of the
1214         order of calling Tree_Write/Tree_Read routines made for aspects.
1215
1216 2011-08-05  Bob Duff  <duff@adacore.com>
1217
1218         * a-fihema.adb (Finalize): Fix race condition.
1219
1220 2011-08-05  Yannick Moy  <moy@adacore.com>
1221
1222         * sem_ch12.adb (Analyze_Package_Instantiation,
1223         Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
1224         mode.
1225
1226 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1227
1228         * sem_type.adb (Specific_Type): in an instance, the type-specific
1229         operand of an equality check that involves null may have a private
1230         type. Use full view to determine legality of construct.
1231
1232 2011-08-05  Vincent Celier  <celier@adacore.com>
1233
1234         * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
1235         delete or close the file when the call to gnatmake was successful.
1236
1237 2011-08-05  Yannick Moy  <moy@adacore.com>
1238
1239         * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
1240         Global_Discard_Names.
1241
1242 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1243
1244         * sinfo.ads: comments on use of entity field for aspect specifications.
1245
1246 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1247
1248         * sem_ch12.adb (Reset_Entity): If the entity field of the associated
1249         node is not itself an entity but a selected component, it is a
1250         rewritten parameterless call to an en enclosing synchronized operation,
1251         and this expansion will be performed again in the instance, so there is
1252         no global information to preserve.
1253
1254 2011-08-05  Javier Miranda  <miranda@adacore.com>
1255
1256         * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
1257         for renamings of predefined primitives.
1258         (In_Predef_Prims_DT): New subprogram.
1259
1260 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1261
1262         * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
1263         possible interpretation of name is a reference type, add an
1264         interpretation that is the designated type of the reference
1265         discriminant of that type.
1266         * sem_res.adb (resolve): If the interpretation imposed by context is an
1267         implicit dereference, rewrite the node as the deference of the
1268         reference discriminant.
1269         * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
1270         Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
1271         parent type or base type.
1272         * sem_ch4.adb (Process_Indexed_Component,
1273         Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
1274         Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
1275         Check for implicit dereference.
1276         (List_Operand_Interps): Indicate when an implicit dereference is
1277         ambiguous.
1278         * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
1279
1280 2011-08-05  Thomas Quinot  <quinot@adacore.com>
1281
1282         * scos.ads: Update documentation of SCO table. Pragma statements can now
1283         be marked as disabled (using 'p' instead of 'P' as the statement kind).
1284         * par_sco.ads, par_sco.adb: Implement the above change.
1285         (Process_Decisions_Defer): Generate a P decision for the first parameter
1286         of a dyadic pragma Debug.
1287         * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
1288         necessary.
1289         * put_scos.adb: Code simplification based on above change.
1290
1291 2011-08-05  Robert Dewar  <dewar@adacore.com>
1292
1293         * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
1294         bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
1295         a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
1296         prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
1297
1298 2011-08-05  Bob Duff  <duff@adacore.com>
1299
1300         * a-stunau.ads, g-spipat.adb: Update comments.
1301
1302 2011-08-05  Bob Duff  <duff@adacore.com>
1303
1304         * a-fihema.ads: Minor comment fix.
1305         * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
1306         correct.
1307         (Attach, Detach): Remove some unnecessary code.
1308         (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
1309
1310 2011-08-05  Bob Duff  <duff@adacore.com>
1311
1312         * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
1313         allocation for Objects component. This simplifies the code somewhat. It
1314         is also a little more efficient in the not-so-unusual case where there
1315         are no controlled objects allocated.
1316         Make Finalization_Started flag atomic.
1317         (Finalize): Avoid unnecessary detachment of items from the list.
1318         (pcol): Minor cleanup.
1319
1320 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1321
1322         * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
1323         package whose name is the same as that of the generic unit, or its
1324         ultimate prefix.
1325
1326 2011-08-05  Bob Duff  <duff@adacore.com>
1327
1328         * a-fihema.adb, a-fihema.ads: Minor comment improvements.
1329         * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
1330         Minor comment fixes.
1331
1332 2011-08-05  Arnaud Charlet  <charlet@adacore.com>
1333
1334         * make.adb (Linking_Phase): No longer need to set source search path
1335         before calling gnatlink in CodePeer mode.
1336         * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
1337         gcc in CodePeer mode, since the binder generated file no longer has a
1338         'with Main'.
1339         * switch.ads, switch.adb (Is_Language_Switch): Removed.
1340         * switch-c.adb: Update comment.
1341
1342 2011-08-05  Thomas Quinot  <quinot@adacore.com>
1343
1344         * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
1345
1346 2011-08-05  Nicolas Roche  <roche@adacore.com>
1347
1348         * gnat_ugn.texi: Fix minor syntax error issue.
1349
1350 2011-08-05  Vincent Celier  <celier@adacore.com>
1351
1352         * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
1353         delete or close the file when the call to gnatmake returns a non
1354         successful return code.
1355
1356 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1357
1358         * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
1359         check, indicate that the copy of the original node does not come from
1360         source, to prevent an infinite recursion of the expansion.
1361
1362 2011-08-05  Johannes Kanig  <kanig@adacore.com>
1363
1364         * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
1365         VC generation for subprogram bodies.
1366
1367 2011-08-05  Yannick Moy  <moy@adacore.com>
1368
1369         * einfo.ads: Typo.
1370         * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
1371         the base type with the smallest allowed base type.
1372
1373 2011-08-05  Sergey Rybin  <rybin@adacore.com>
1374
1375         * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
1376         aspects.
1377
1378 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1379
1380         * sem_ch12.ads: minor comment updates.
1381
1382 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1383
1384         * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
1385         instantiation and a formal package the compiler generates a package
1386         renaming declaration so that the generic name within the declaration
1387         is interpreted as a renaming of the instance. At the end of a formal
1388         package declaration, this renaming must become invisible.
1389
1390 2011-08-05  Hristian Kirtchev  <kirtchev@adacore.com>
1391
1392         * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
1393         comparison and rely on concrete entities instead.
1394
1395 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1396
1397         * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
1398         and discriminants, to indicate that the type has an access discriminant
1399         that supports implicit dereference.
1400         * snames.ads-tmpl: Add names of aspects and attributes related to
1401         Ada2012 iterators: constant_indexing, default_iterator,
1402         iterator_element, implicit_dereference, variable_indexing.
1403         * aspects.ads, aspects.adb: entries for iterator-related aspects.
1404         * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
1405         iterator-related aspects.
1406         * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
1407
1408 2011-08-05  Sergey Rybin  <rybin@adacore.com>
1409
1410         * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
1411         metrics in gnatmetric to cover new kinds of coupling mentrics.
1412
1413 2011-08-05  Steve Baird  <baird@adacore.com>
1414
1415         * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
1416         of calling the user-defined main subprogram.
1417         (Gen_Main):  Declare Ada_Main_Program and (if CodePeer_Mode
1418         is set) Call_Main_Subprogram ahead of, as opposed to
1419         inside of, Main.
1420         (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
1421         generation of a "with" of the user-defined main subprogram.
1422         Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
1423         (which is now called from Gen_Main instead).
1424
1425 2011-08-05  Emmanuel Briot  <briot@adacore.com>
1426
1427         * projects.texi: Added reference to the Makefile package.
1428
1429 2011-08-05  Thomas Quinot  <quinot@adacore.com>
1430
1431         * exp_ch7.adb: Minor comment rewording.
1432
1433 2011-08-05  Ed Falis  <falis@adacore.com>
1434
1435         * env.c: Fix comment.
1436
1437 2011-08-05  Hristian Kirtchev  <kirtchev@adacore.com>
1438
1439         * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
1440         character comparison and rely on concrete entities instead.
1441
1442 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1443
1444         * sem_ch3.adb: (Check_Private_Overriding): better error message,
1445         suggested by AI95-0068.
1446
1447 2011-08-05  Hristian Kirtchev  <kirtchev@adacore.com>
1448
1449         * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
1450         the two potential initialization calls. This accounts for any
1451         access-before-elaboration checks which may precede the initialization
1452         calls.
1453         (Next_Suitable_Statement): New routine. Returns the next real statement
1454         after the input node while skipping generated checks.
1455         * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
1456         with comment on usage.
1457         Do not generate Elaborate_All when the trigger is a finalization call
1458         coming from a type init proc.
1459         (Check_Elab_Call): Propagate the initialization procedure context to
1460         subsequent calls to Check_A_Call.
1461         (Check_Internal_Call_Continue): Propagate the initialization procedure
1462         context to subsequent calls to Check_Elab_Call.
1463         (Is_Finalization_Procedure): New routine. Returns True if the input
1464         entity denotes a [Deep_]Finalize routine.
1465         * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
1466         along with comment on usage.
1467
1468 2011-08-05  Vadim Godunko  <godunko@adacore.com>
1469
1470         * s-atocou.ads: Add list of supported platforms.
1471
1472 2011-08-05  Yannick Moy  <moy@adacore.com>
1473
1474         * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
1475
1476         * opt.ads (Disable_ALI_File): new Boolean flag
1477         * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
1478
1479 2011-08-05  Ed Falis  <falis@adacore.com>
1480
1481         * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
1482         environ is properly defined.
1483
1484 2011-08-05  Vincent Celier  <celier@adacore.com>
1485
1486         * make.adb (Compilation_Phase): Exit immediately when all objects have
1487         been found up to date, to avoid multiple exit messages.
1488         * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
1489         same project for languages with no compiler.
1490         * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
1491         -eI.
1492 2011-08-05  Robert Dewar  <dewar@adacore.com>
1493
1494         * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
1495         sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
1496         prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
1497         s-atocou-builtin.adb: Minor reformatting.
1498
1499 2011-08-05  Yannick Moy  <moy@adacore.com>
1500
1501         * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
1502         if the node to wrap is a pragma check, this node and enclosed
1503         expression are not expanded, so do not apply any transformations here.
1504         * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
1505         introducing transient scopes.
1506
1507 2011-08-05  Jose Ruiz  <ruiz@adacore.com>
1508
1509         * adaint.c (__gnat_set_writable, __gnat_set_readable,
1510         __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
1511         __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
1512         routine is available, so we use the default implementation of these
1513         functions.
1514         * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
1515         support for copying attributes on VxWorks 6.
1516
1517 2011-08-05  Yannick Moy  <moy@adacore.com>
1518
1519         * debug.adb: Remove use of -gnatd.D.
1520         * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
1521         * opt.ads: Simplify variables for ALFA mode, to keep one only
1522         * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
1523         to ALFA mode.
1524
1525 2011-08-05  Vincent Celier  <celier@adacore.com>
1526
1527         * prj-conf.adb (Do_Autoconf): Look also for --RTS in
1528         Builder'Default_Switches.
1529
1530 2011-08-05  Vincent Celier  <celier@adacore.com>
1531
1532         * makeusg.adb: Add lines for --create-map-file switches.
1533
1534 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1535
1536         * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
1537         profile is incomplete and the full view is available, replace it with
1538         the full view.
1539         * sem_ch6.adb (Possible_Freeze): if a type in the profile is
1540         incomplete, freezing the subprogram is delayed until the full view is
1541         frozen.
1542         * sem_type.adb (Disambiguate): an ambiguity between a user-defined
1543         fixed-point multiplication operator and the predefined operator is
1544         resolved in favor of the user-defined one.
1545
1546 2011-08-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1547
1548         * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
1549         CONST_CAST.
1550
1551 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
1552
1553         * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
1554         whether a type lacks user-defined Read or Write operations, or has a
1555         component that lacks them.
1556         * sem_attr.adb (Check_Stream_Attribute): if restriction
1557         No_Default_Stream_Attributes is active, verify that all subcomponent
1558         types of the target have user-defined stream operations, and report
1559         error otherwise.
1560         * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
1561         * exp_strm.adb: Build_Elementary_Input_Call,
1562         Build_Elementary_Write_Call): remove checks for restriction
1563         No_Default_Stream_Attributes, now checked in semantics.
1564
1565 2011-08-04  Vincent Celier  <celier@adacore.com>
1566
1567         * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
1568         switches on the command line, look for all valid --RTS switches in the
1569         Builder switches and for each language use the first runtime name found
1570         to invoke gprconfig.
1571         (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
1572         command line and there is no auto-configuration.
1573         (Runtime_Name_Set_For): New function.
1574
1575 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1576
1577         * exp_ch7.adb (Build_Object_Declarations): Do not generate the
1578         elaborate initialization expression for variable Abort when processing
1579         a package body or a declaration.
1580         (Create_Finalizer): Propagate the package context when creating the
1581         exception-related variables.
1582         * exp_ch7.ads (Build_Object_Declarations): New formal parameter
1583         For_Package along with usage comment.
1584
1585 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
1586
1587         * gcc-interface/Makefile.in: Clean up targets.
1588         Enable new package for atomic counters and copy-on-write implementation
1589         of unbounded strings on x86 platforms.
1590         * gcc-interface/Make-lang.in: Update dependencies.
1591
1592 2011-08-04  Robert Dewar  <dewar@adacore.com>
1593
1594         * exp_ch7.adb: Minor reformatting.
1595
1596 2011-08-04  Robert Dewar  <dewar@adacore.com>
1597
1598         * exp_strm.adb: Minor reformatting.
1599
1600 2011-08-04  Vadim Godunko  <godunko@adacore.com>
1601
1602         * s-atocou.adb: Replace by dummy version and use on targets where atomic
1603         operations are not supported.
1604         * s-atocou-builtin.adb: Renamed from s-atocou.adb.
1605         * s-atocou-x86.adb: New file.
1606         * Makefile.rtl: Add s-atocou.o file
1607
1608 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
1609
1610         * make.adb (Compile): Move setting of CodePeer_Mode to ...
1611         (Compilation_Phase): ... here.
1612         (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
1613
1614 2011-08-04  Thomas Quinot  <quinot@adacore.com>
1615
1616         * Make-generated.in: Fix minor typo in comment.
1617
1618 2011-08-04  Thomas Quinot  <quinot@adacore.com>
1619
1620         * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
1621         the project path.
1622
1623 2011-08-04  Robert Dewar  <dewar@adacore.com>
1624
1625         * a-coinho.adb: Minor reformatting.
1626
1627 2011-08-04  Robert Dewar  <dewar@adacore.com>
1628
1629         * a-coinho.ads: Minor reformatting.
1630
1631 2011-08-04  Vadim Godunko  <godunko@adacore.com>
1632
1633         * s-atocou.ads, s-atocou.adb: New files.
1634         * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
1635         a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
1636         direct use of GCC's atomic builtins and replace them by use of new
1637         atomic counter package.
1638
1639 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
1640
1641         * exp_strm.adb: better error message for No_Default_Stream_Attributes.
1642
1643 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1644
1645         * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
1646         with a call to Get_External_Tag.
1647         * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
1648         subprogram usage. Remove the guard against package declarations and
1649         bodies since Build_Cleanup_Statements is no longer invoked in that
1650         context.
1651         (Build_Components): Initialize Tagged_Type_Stmts when the context
1652         contains at least one library-level tagged type.
1653         (Build_Finalizer): New local variables Has_Tagged_Types and
1654         Tagged_Type_Stmts along with associated comments on usage. Update the
1655         logic to include tagged type processing.
1656         (Create_Finalizer): Insert all library-level tagged type unregistration
1657         code before the jump block circuitry.
1658         (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
1659         (Expand_N_Package_Declaration): Remove the call to
1660         Build_Cleanup_Statements.
1661         (Process_Tagged_Type_Declaration): New routine. Generate a call to
1662         unregister the external tag of a tagged type.
1663         (Processing_Actions): Reimplemented to handle tagged types.
1664         (Process_Declarations): Detect the declaration of a library-level
1665         tagged type and carry out the appropriate actions.
1666         (Unregister_Tagged_Types): Removed. The machinery has been directly
1667         merged with Build_Finalizer.
1668
1669 2011-08-04  Robert Dewar  <dewar@adacore.com>
1670
1671         * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
1672         gnatls.adb, exp_ch3.adb: Minor reformatting.
1673
1674 2011-08-04  Marc Sango  <sango@adacore.com>
1675
1676         * sem_attr.adb (Analyze_Attribute): Replace the message
1677         "invisible attribute of}" of the spark restriction violation in
1678         attribute reference by the simple message "invisible attribute of type".
1679         Indeed, the node value Error_Msg_Node_1 used is in conflit with the
1680         two insertion characters: '&' and '}'.
1681
1682 2011-08-04  Vadim Godunko  <godunko@adacore.com>
1683
1684         * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
1685         * a-coinho.ads, a-coinho.adb: New file.
1686         * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
1687
1688 2011-08-04  Nicolas Roche  <roche@adacore.com>
1689
1690         * alfa_test.adb: Not all ali files are containing alfa information even
1691         if compiled with -gnatd.F. So suppress warning about missing ALFA
1692         information.
1693
1694 2011-08-04  Yannick Moy  <moy@adacore.com>
1695
1696         * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
1697         scope.
1698         * put_alfa.adb: Check that scope name is not empty.
1699
1700 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
1701
1702         * exp_ch3.adb (Stream_Operation_Ok): new predicate
1703         Needs_Elementary_Stream_Operation, to determine whether user-defined
1704         Read and Write attributes are available for the elementary components
1705         of the given type. If only the predefined attributes are available,
1706         then when restriction No_Default_Stream_Attributes is active the
1707         predefined stream attributes for the composite type cannot be created.
1708
1709 2011-08-04  Robert Dewar  <dewar@adacore.com>
1710
1711         * bindgen.adb: Fix obsolete comments and names from Ada/C days.
1712         Put routines in alpha order
1713
1714 2011-08-04  Jose Ruiz  <ruiz@adacore.com>
1715
1716         * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
1717         * gcc-interface/Make-lang.in: Update dependencies.
1718
1719 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
1720
1721         * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
1722         * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
1723         gnat1why).
1724
1725 2011-08-04  Robert Dewar  <dewar@adacore.com>
1726
1727         * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
1728         lib-xref-alfa.adb: Minor reformatting.
1729
1730 2011-08-04  Marc Sango  <sango@adacore.com>
1731
1732         * sem_ch12.adb (Analyze_Generic_Package_Declaration,
1733         Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
1734         Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
1735         mode.
1736
1737 2011-08-04  Tristan Gingold  <gingold@adacore.com>
1738
1739         * bindgen.adb (Gen_Adainit_C): Remove.
1740         (Gen_Adafinal_C): Ditto.
1741         (Gen_Elab_Externals_C): Ditto.
1742         (Gen_Elab_Calls_C): Ditto.
1743         (Gen_Elab_Order_C): Ditto.
1744         (Gen_Elab_Defs_C): Ditto.
1745         (Gen_Finalize_Library_C): Ditto.
1746         (Gen_Finalize_Library_Defs_C): Ditto.
1747         (Gen_Main_C): Ditto.
1748         (Gen_Output_File_C): Ditto.
1749         (Gen_Restrictions_C): Ditto.
1750         (Gen_Versions_C): Ditto.
1751         (Write_Info_Ada_C): Ditto.
1752         (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
1753         (Gen_Output_File): Do not force Ada_Bind_File anymore.
1754         Always call Gen_Output_File_Ada.
1755         * gnatlink.adb (Begin_Info): Now a constant.
1756         (End_Info): Ditto.
1757         (Ada_Bind_File): Remove
1758         (Process_Args): Do not handle -A/-C.  Remove not Ada_Bind_File cases.
1759         * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
1760         * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
1761         * opt.ads (Ada_Bind_File): Remove.
1762
1763 2011-08-04  Thomas Quinot  <quinot@adacore.com>
1764
1765         * projects.texi: Document target-specific directory in default project
1766         path for gnatmake.
1767
1768 2011-08-04  Thomas Quinot  <quinot@adacore.com>
1769
1770         * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
1771         path in all cases .
1772
1773 2011-08-04  Yannick Moy  <moy@adacore.com>
1774
1775         * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
1776         opt.ads, lib-xref.ads: Code clean up.
1777
1778 2011-08-04  Yannick Moy  <moy@adacore.com>
1779
1780         * gnat_rm.texi: Update description of Test_Case
1781         * gnat_ugn.texi: Typo.
1782
1783 2011-08-04  Ed Falis  <falis@adacore.com>
1784
1785         * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
1786
1787 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1788
1789         * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
1790         it is of type Root_Controlled. This action eliminates fields Prev and
1791         Next from type equality.
1792
1793 2011-08-04  Yannick Moy  <moy@adacore.com>
1794
1795         * lib-xref-alfa.adb: Correct typo.
1796
1797 2011-08-04  Matthew Heaney  <heaney@adacore.com>
1798
1799         * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
1800         component.
1801
1802 2011-08-04  Yannick Moy  <moy@adacore.com>
1803
1804         * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
1805         (Analyze_Pragma): allow static string expression for name of Test_Case,
1806         instead of simply string literals.
1807         * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
1808         expressions.
1809
1810 2011-08-04  Vincent Celier  <celier@adacore.com>
1811
1812         * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
1813         case suffixes to find truncated main sources.
1814
1815 2011-08-04  Tristan Gingold  <gingold@adacore.com>
1816
1817         * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
1818         s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
1819         (Compute_Current_Task): Ditto.
1820
1821 2011-08-04  Tristan Gingold  <gingold@adacore.com>
1822
1823         * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
1824
1825 2011-08-04  Yannick Moy  <moy@adacore.com>
1826
1827         * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
1828         library-level constant.
1829         (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
1830         * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
1831         used as selector of parameter association, in ALFA mode.
1832
1833 2011-08-04  Robert Dewar  <dewar@adacore.com>
1834
1835         * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
1836         s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
1837         reformatting.
1838
1839 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
1840
1841         * make.adb (Linking_Phase): Set source search path before calling
1842         gnatlink in CodePeer mode.
1843
1844 2011-08-04  Javier Miranda  <miranda@adacore.com>
1845
1846         * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
1847         Remove code which takes care of building TSDs.
1848         * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
1849         * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
1850         the accessibility check in VM targets.
1851         * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
1852         (Building_Static_DT): Now returns false for VM targets.
1853         (Build_VM_TSDs): Removed.
1854         (Expand_Interface_Conversion): Generate missing runtime check for
1855         conversions to interface types whose target type is unknown at compile
1856         time.
1857         (Make_VM_TSD): Add missing code to disable the generation of calls to
1858         Check_TSD if the tagged type is not defined at library level, or not
1859         has a representation clause specifying its external tag, or -gnatdQ is
1860         active.
1861         * exp_disp.ads (Build_VM_TSDs): Removed.
1862         (Make_VM_TSDs): Spec relocated from exp_disp.adb
1863         * sem_disp.adb (Check_Dispatching_Operation): No code required to
1864         register primitives in the dispatch tables in VM targets.
1865         * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
1866         initialization of class-wide interface objects in VM targets.
1867         (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
1868         of Make_DT).
1869
1870 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
1871
1872         * gnatlink.adb (Gnatlink): Correct missleading error message displayed
1873         when dotnet-ld cannot be found.
1874
1875 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
1876
1877         * bindgen.adb: Simplify significantly generation of binder body file in
1878         CodePeer mode.
1879         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
1880         when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
1881         not expanded).
1882
1883 2011-08-04  Yannick Moy  <moy@adacore.com>
1884
1885         * sem_prag.adb, sem.ads: Code cleanup.
1886
1887 2011-08-04  Tristan Gingold  <gingold@adacore.com>
1888
1889         * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
1890         * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
1891         results if possible.
1892         * s-stusta.adb (Print): Adjust after changes in s-stausa.
1893         * gnat_ugn.texi: Update dynamic stack usage section.
1894
1895 2011-08-04  Steve Baird  <baird@adacore.com>
1896
1897         * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
1898         Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
1899         contains only a call to the user-defined main subprogram.
1900         (Gen_Main_Ada) - If CodePeer_Mode is set, then
1901         call the "wrapper" subprogram instead of directly
1902         calling the user-defined main subprogram.
1903
1904 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1905
1906         * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
1907         alternatives of a case statement for controlled objects. Rename local
1908         variable A to Dead_Alt.
1909         (Expand_N_If_Statement): Check the then and else statements of an if
1910         statement for controlled objects. Check the then statements of all
1911         elsif parts of an if statement for controlled objects.
1912         (Expand_N_Loop_Statement): Check the statements of a loop for controlled
1913         objects.
1914         * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
1915         detects a loop associated with the expansion of an array object.
1916         Augment the processing of the loop statements to account for a possible
1917         wrap done by Process_Statements_For_Controlled_Objects.
1918         * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
1919         statements and abortable part of an asynchronous select for controlled
1920         objects.
1921         (Expand_N_Conditional_Entry_Call): Check the else statements of a
1922         conditional entry call for controlled objects.
1923         (Expand_N_Selective_Accept): Check the alternatives of a selective
1924         accept for controlled objects.
1925         (Expand_N_Timed_Entry_Call): Check the entry call and delay
1926         alternatives of a timed entry call for controlled objects.
1927         * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
1928         exception handler for controlled objects.
1929         * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
1930         Add formal parameter Nested_Constructs along with its associated
1931         comment.
1932         (Requires_Cleanup_Actions (Node_Id)): Update all calls to
1933         Requires_Cleanup_Actions.
1934         (Process_Statements_For_Controlled_Objects): New routine.
1935         * exp_util.ads (Process_Statements_For_Controlled_Objects): New
1936         routine. Inspect a node which contains a non-handled sequence of
1937         statements for controlled objects. If such an object is found, the
1938         statements are wrapped in a block.
1939
1940 2011-08-04  Bob Duff  <duff@adacore.com>
1941
1942         * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
1943         need to compare with Class_Wide_Type (T2), in order to get at the
1944         original class-wide type node.
1945         * sem_type.ads (Covers): Improve the comment.
1946         * einfo.ads (Class_Wide_Type): Improve the comment.
1947         * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
1948         the type of the Deref.
1949
1950 2011-08-04  Yannick Moy  <moy@adacore.com>
1951
1952         * gnat_rm.texi: Document that Test_Case pragma can only appear on
1953         separate declarations.
1954         * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
1955         check identifier of pragma argument.
1956         (Chain_TC): check that no other test case associated to the same entity
1957         share the same name.
1958         (Check_Test_Case): disallow test case inside subprogram body
1959         (Analyze_Pragma): correct call to check identifier and not argument
1960         * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
1961         function gets name from test case pragma.
1962
1963 2011-08-04  Yannick Moy  <moy@adacore.com>
1964
1965         * gnat_rm.texi: Document new pragma and aspect.
1966         * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
1967         (No_Duplicates_Allowed): new constant array defining whether duplicates
1968         aspects of each kind can appear on the same declaration.
1969         * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
1970         field, which points to a node holding the previous Spec_PPC_List.
1971         * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
1972         through the indirection with Contract.
1973         * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
1974         * par-prag.adb (Prag): do nothing on Test_Case pragma
1975         * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
1976         be called directly.
1977         * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
1978         component Ensures of Test_Case.
1979         * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
1980         (Analyze_Generic_Subprogram_Declaration,
1981         Analyze_Subprogram_Instantiation,
1982         Analyze_Abstract_Subprogram_Declaration,
1983         Analyze_Subprogram_Body_Helper,
1984         Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
1985         insert contract in subprogram node at point of definition
1986         * sem_ch13.adb
1987         (Aspect_Loop): do not raise error on duplicate Test_Case aspect
1988         (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
1989         corresponding pragma
1990         (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
1991         * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
1992         similar to the analysis of pre/post
1993         (Derive_Subprogram): insert contract in subprogram node at point of
1994         derivation.
1995         * sem_prag.adb, sem_prag.ads
1996         (Check_Arg_Is_String_Literal, Check_Identifier):
1997         new checking procedures to be called in treatment of pragmas
1998         (Check_Test_Case): new procedure to check that a Test_Case aspect or
1999         pragma is well-formed. This does not check currently that 'Result is
2000         used only in the Ensures component of a Test_Case.
2001         (Analyze_Pragma): add case for Test_Case
2002         (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
2003         components of a Test_Case.
2004         (Preanalyze_TC_Args): new procedure to preanalyze the boolean
2005         expressions in the 3rd (and 4th if present) arguments of a Test_Case
2006         pragma, treated as spec expressions.
2007         (Sig_Flags): add value -1 for Test_Case.
2008         * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
2009         Get_Requires_From_Test_Case_Pragma): getters for both expression
2010         components of a Test_Case.
2011         * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
2012         indirection between an entry or [generic] subprogram entity and its
2013         pre/post + test-cases.
2014         (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
2015         get/set for fields of an N_Contract node.
2016         * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
2017         Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
2018         names and pragma for Test_Case.
2019         * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
2020
2021 2011-08-04  Vincent Celier  <celier@adacore.com>
2022
2023         * gnat_ugn.texi: Improve documentation of gnatmake switch
2024         --source-info-file=.
2025
2026 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2027
2028         * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
2029         type). Initialize Atyp to the appropriate type which is later checked
2030         for completion. Rewrite the assertion associated with private type
2031         completion.
2032
2033 2011-08-04  Ed Falis  <falis@adacore.com>
2034
2035         * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
2036         initialize the number of CPUs.
2037
2038 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2039
2040         * sem_type.adb (Disambiguate): New subsidiary routine
2041         In_Same_Declaration_List, to implement AI05-0020: a user-defined
2042         equality on an anonymous access type whose designated type is private
2043         does not lead to an ambiguity with the universal access equality
2044         operator in the body or child units of the defining package. The same
2045         is true for a multiplication operator on a private type completed with
2046         a fixed-point-type.
2047
2048 2011-08-04  Javier Miranda  <miranda@adacore.com>
2049
2050         * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
2051         (Normalize_Scalars_Config): Removed.
2052         * opt.adb
2053         (Register_Opt_Config_Switches): Remove registering config values of
2054         Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
2055         (Restore_Opt_Config_Switches): Remove code which restores the values of
2056         Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
2057         Init_Or_Norm_Scalars.
2058         (Save_Opt_Config_Switches): Remove code which saves values of
2059         Init_Or_Norm_Scalars and Normalize_Scalars.
2060         (Set_Opt_Config_Switches): Remove code which restores config values of
2061         Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
2062         Init_Or_Norm_Scalars.
2063
2064 2011-08-04  Yannick Moy  <moy@adacore.com>
2065
2066         * frontend.adb (Frontend): remove previous patch to avoid full
2067         qualification in ALFA mode.
2068         * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
2069         * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
2070         unique name for an entity, which could be used to identify the entity
2071         across compilation units.
2072
2073 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2074
2075         * prj-env.adb
2076         (Initialize_Default_Project_Path): Add target specific directory
2077         ($prefix/$target/lib/gnat) in front of project path in all cases
2078         (making gnatmake's behaviour consistent with gprbuild).
2079         * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
2080         Pass target name from Sdefault to project subsystem.
2081         * gnatls.adb: Show new target specific default project directory.
2082
2083 2011-08-04  Johannes Kanig  <kanig@adacore.com>
2084
2085         * cstand.adb: Add Information to Identifier in Standard
2086         (Identifer_For): Set Entity to the corresponding entity
2087
2088 2011-08-04  Sergey Rybin  <rybin@adacore.com>
2089
2090         * gnat_ugn.texi: Update doc on gnatcheck.
2091
2092 2011-08-04  Yannick Moy  <moy@adacore.com>
2093
2094         * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
2095         xrefs in a scope.
2096
2097 2011-08-04  Yannick Moy  <moy@adacore.com>
2098
2099         * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
2100         performing expansion.
2101         * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
2102         Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
2103         it is not called in ALFA mode.
2104
2105 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2106
2107         * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
2108         after all, so removed.
2109
2110 2011-08-04  Sergey Rybin  <rybin@adacore.com>
2111
2112         * vms_data.ads: Add missing VMS qualifiers.
2113
2114 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2115
2116         * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
2117         the list of files on the command line after processing it through
2118         Complete_Mains.
2119
2120 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2121
2122         * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
2123         processing for .NET/JVM. These targets can now benefit from
2124         Raise_From_Controlled_Operation and they share the same processing with
2125         standard targets.
2126         (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
2127         These targets need transient scopes in order to properly finalize short
2128         lived controlled objects.
2129         (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
2130          NET/JVM. These targets can now benefit from
2131         Raise_From_Controlled_Operation and they share the same processing with
2132         standard targets.
2133
2134 2011-08-04  Geert Bosch  <bosch@adacore.com>
2135
2136         * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
2137
2138 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2139
2140         * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
2141         Expand_Record_Aggregate, to determine whether aggregate must be
2142         expanded into assignments. This is the case if the ancestor part is
2143         private, regarless of the setting of the flag Has_Private_Ancestor.
2144
2145 2011-08-04  Ed Falis  <falis@adacore.com>
2146
2147         * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
2148
2149 2011-08-04  Bob Duff  <duff@adacore.com>
2150
2151         * sinfo.ads: Fix comment.
2152
2153 2011-08-04  Steve Baird  <baird@adacore.com>
2154
2155         * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
2156         choose a package name in much the same way as is
2157         done for JGNAT when VM_Target /= No_VM, except that
2158         a slightly more distinctive prefix string is used.
2159
2160 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2161
2162         * makeutl.adb (Complete_Mains): no longer accept unit names on the
2163         gnatmake command line.
2164         This behavior was never documented (and was supported only because of
2165         an early bug in the code). This case might lead to ambiguous cases
2166         (between unit names and truncated base names without suffixes).
2167
2168 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2169
2170         * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
2171         Remove the external tag of a tagged type from the internal hash table.
2172         * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
2173         expanded usage of the routine. Strenghten the check for Is_Master. Add
2174         processing for tagged types.
2175         (Build_Finalizer): Create all the necessary lists used in finalizer
2176         creation when the processed context is a package that may contain
2177         tagged types.
2178         (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
2179         Requires_Cleanup_Actions.
2180         (Expand_N_Package_Body): Package bodies may need clean up code
2181         depending on whether they contain tagged types.
2182         (Expand_N_Package_Declaration): Package declarations may need clean up
2183         code depending on whether they contain tagged types.
2184         (Unregister_Tagged_Types): New routine. Search through a list of
2185         declarations or statements, looking for non-abstract Ada tagged types.
2186         For each such type, generate code to unregister the external tag.
2187         * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
2188         Requires_Cleanup_Actions.
2189         (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
2190         through a list of declarations or statements looking for non-abstract
2191         Ada tagged types or controlled objects.
2192         * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
2193         Requires_Cleanup_Actions.
2194         (Has_Controlled_Objects (List_Id, Boolean)): Removed.
2195         * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
2196         RE_Unit_Table.
2197
2198 2011-08-04  Vincent Celier  <celier@adacore.com>
2199
2200         * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
2201         has Ada sources, not project Project, because if the root project
2202         Project has no sources of its own, all projects will be deemed without
2203         sources.
2204
2205 2011-08-04  Gary Dismukes  <dismukes@adacore.com>
2206
2207         * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
2208         of the No_Param_Proc acc-to-subp type used for initialization of
2209         __gnat_finalize_library_objects so that it's declared at library level
2210         rather than nested inside of the adainit routine.
2211
2212 2011-08-04  Javier Miranda  <miranda@adacore.com>
2213
2214         * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
2215         if the tagged type has a representation clause which specifies its
2216         external tag.
2217
2218 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2219
2220         * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
2221         Remove previous procedure with that name.
2222         * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
2223         when appropriate.
2224         * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
2225         subtype mark, the ancestor cannot have unknown discriminants.
2226         (Resolve_Record_Aggregate): if the type has invisible components
2227         because of a private ancestor, the aggregate is illegal.
2228
2229 2011-08-04  Vincent Celier  <celier@adacore.com>
2230
2231         * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
2232         account switches -gnat2005, -gnat12 and -gnat2012.
2233
2234 2011-08-04  Bob Duff  <duff@adacore.com>
2235
2236         * s-tasdeb.ads: Minor comment fix.
2237
2238 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
2239
2240         * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
2241         CodePeer mode.
2242         * switch.ads, switch.adb (Is_Language_Switch): New function.
2243
2244 2011-08-04  Vincent Celier  <celier@adacore.com>
2245
2246         * switch-c.adb: Minor comment addition.
2247
2248 2011-08-04  Vincent Celier  <celier@adacore.com>
2249
2250         * vms_conv.adb (Process_Argument): Fail graciously when qualifier
2251         ending with '=' is followed by a space (missing file name).
2252
2253 2011-08-04  Pascal Obry  <obry@adacore.com>
2254
2255         * g-regist.ads: Fix size of HKEY on x86_64-windows.
2256
2257 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2258
2259         * sem_ch12.adb (Analyze_Associations): New routine
2260         Check_Overloaded_Formal_Subprogram to reject a formal package when
2261         there is a named association or a box initialisation for an overloaded
2262         formal subprogram of the corresponding generic.
2263
2264 2011-08-04  Yannick Moy  <moy@adacore.com>
2265
2266         * alfa.ads (ALFA_Xref_Record): add component for type of entity
2267         * get_alfa.adb, put_alfa.adb: Read and write new component of
2268         cross-reference.
2269         * lib-xref-alfa.adb (Collect_ALFA): generate new component.
2270
2271 2011-08-04  Pascal Obry  <obry@adacore.com>
2272
2273         * urealp.adb: Minor reformatting.
2274
2275 2011-08-04  Tristan Gingold  <gingold@adacore.com>
2276
2277         * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
2278         Handle the case when Cleanup_Protected_Object returns Empty.
2279
2280 2011-08-04  Yannick Moy  <moy@adacore.com>
2281
2282         * frontend.adb (Frontend): only qualify names in non-ALFA mode
2283
2284 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2285
2286         * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
2287         call, ignore functions.
2288
2289 2011-08-04  Geert Bosch  <bosch@adacore.com>
2290
2291         * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
2292         point.
2293
2294 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2295
2296         * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
2297         as an index for Builder'Switches. This conforms to the documentation.
2298         * make.adb (Insert_Project_Sources): avoid duplicate code
2299
2300 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2301
2302         * makeutl.adb (Complete_Mains): if the user has passed a relative file
2303         name on the command line (for instance "../dummy"), never assume it can
2304         be a unit name.
2305
2306 2011-08-04  Tristan Gingold  <gingold@adacore.com>
2307
2308         * bindgen.adb: Remove code the reference or create the
2309         Break_Start/__gnat_break_start procedure.
2310         * s-stalib.adb (Break_Start): Removed.
2311
2312 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2313
2314         * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
2315         shared with gprbuild.
2316
2317 2011-08-04  Yannick Moy  <moy@adacore.com>
2318
2319         * par-ch4.adb (P_Primary): preferentially issue an error message about
2320         a missing parenthesis arount a conditional or case expression in Ada
2321         2012 mode, if we detect that the alignment is not correct for a
2322         statement.
2323
2324 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2325
2326         * exp_ch7.adb (Process_Declarations): Do not consider the result of a
2327         tag-to-class-wide conversion as needing finalization actions.
2328         * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
2329         a tag-to-class-wide conversion as needing finalization actions.
2330         (Is_Finalizable_Transient): The result of a tag-to-class-wide
2331         conversion does not need finalization actions.
2332         (Is_Tag_To_CW_Conversion): New routine.
2333         * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
2334         whether an object is the result of a tag-to-class-wide conversion.
2335
2336 2011-08-04  Yannick Moy  <moy@adacore.com>
2337
2338         * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
2339         the left-hand-side and right-hand-side of a conjunct are inserted when
2340         translating a pre- or postcondition
2341         * sem_ch6.adb: Correct typo in comment
2342
2343 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2344
2345         * gnat_rm.texi: Ravenscar does not prohibit dependence on
2346         Unchecked_Conversion and Unchecked_Deallocation.
2347
2348 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2349
2350         * make.adb: Minor reformatting.
2351
2352 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2353
2354         * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
2355         sources in the project and its imported projects, but not in the whole
2356         tree.
2357
2358 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2359
2360         * make.adb: Remove debug trace.
2361
2362 2011-08-04  Vincent Celier  <celier@adacore.com>
2363
2364         * makeutl.adb (Do_Complete): Get the absolute path name of a relative
2365         path in canonical form, to be able to compare path names on platforms
2366         such as Windows or Darwin.
2367
2368 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2369
2370         * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
2371         For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
2372         * scos.ads: Update documentation accordingly.
2373         * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
2374         pragmas.
2375
2376 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2377
2378         * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
2379         attribute only if prefix type is scalar.
2380
2381 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2382
2383         * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
2384         in gnatmake for specifying mains on the command line that do not belong
2385         to the main project. These mains must currently all belong to the same
2386         project, though.
2387         (Ultimate_Extension_Of): removed, since duplicated
2388         Ultimate_Extending_Project.
2389
2390 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
2391
2392         * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
2393         instead.
2394         (CodePeer_Mode_String): New.
2395         (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
2396         CodePeer mode.
2397         (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
2398         * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
2399         mode, since no useful elaboration subprogram is needed by CodePeer.
2400         * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
2401         In this mode, compile binder file with -gnatC and do stop after this
2402         step.
2403
2404 2011-08-04  Vincent Celier  <celier@adacore.com>
2405
2406         * exp_ch7.adb: Minor comment fix.
2407
2408 2011-08-04  Robert Dewar  <dewar@adacore.com>
2409
2410         * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
2411         exp_ch4.adb, makeutl.adb: Minor reformatting.
2412
2413 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2414
2415         * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
2416         Create several new subprograms to move code out of Make. This makes the
2417         code more readable, removes code duplication, and is a preparation work
2418         for adding support for aggregate projects.
2419
2420 2011-08-04  Tristan Gingold  <gingold@adacore.com>
2421
2422         * s-po32gl.ads, s-po32gl.adb: New files.
2423         * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
2424         * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
2425         (Build_Finalization_Collection): Use it.
2426         * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
2427         * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
2428         literals.
2429         * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
2430         * gcc-interface/Make-lang.in: Update dependencies.
2431
2432 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2433
2434         * makeutl.adb (Complete_Mains): add support for specs with no suffix on
2435         the command line.
2436
2437 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2438
2439         * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
2440         command line is not a file name, also check whether it could be a unit
2441         name.
2442
2443 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
2444
2445         * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
2446         the header of the finalization routine.
2447         If the unit has no finalizer but is a body whose spec has one, then
2448         generate the decrement of the elaboration entity only.
2449         If the unit has a finalizer and is a spec, then do not generate the
2450         decrement of the elaboration entity.
2451         (Gen_Finalize_Library_C): Likewise.
2452
2453 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2454
2455         * exp_ch7.adb (Alignment_Of): New subsidiary routine.
2456         (Bounds_Size_Expression): Removed.
2457         (Double_Alignment_Of): New subsidiary routine.
2458         (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
2459         for a hole in the dope vector of unconstrained arrays due to different
2460         index and element alignments.
2461
2462 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2463
2464         * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
2465         raise program_error because body has not been seen yet.
2466
2467 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2468
2469         * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
2470         an unresolved name.
2471
2472 2011-08-04  Vincent Celier  <celier@adacore.com>
2473
2474         * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
2475
2476 2011-08-04  Yannick Moy  <moy@adacore.com>
2477
2478         * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
2479         * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
2480
2481 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2482
2483         * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
2484         instantiation in RCI.
2485
2486 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2487
2488         * make.adb: Share more code with gprbuild
2489
2490 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2491
2492         * projects.texi: Added documentation for the IDE'Gnat project file
2493         attribute.
2494
2495 2011-08-04  Nicolas Roche  <roche@adacore.com>
2496
2497         * gnat_rm.texi: Minor editing.
2498
2499 2011-08-04  Javier Miranda  <miranda@adacore.com>
2500
2501         * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
2502         and the library case for VM targets.
2503         (Gen_Adainit_Ada): Likewise.
2504
2505 2011-08-04  Robert Dewar  <dewar@adacore.com>
2506
2507         * g-altive.ads: Minor comment updates.
2508         * prj-nmsc.adb: Minor reformatting.
2509
2510 2011-08-04  Javier Miranda  <miranda@adacore.com>
2511
2512         * opt.ads
2513         (Normalize_Scalars_Config): Value of the configuration switch set by
2514         pragma Normalize_Scalars when it appears in the gnat.adc file.
2515         (Normalize_Scalars): New field for record Config_Switches_Type. Used
2516         to save and restore settings of this pragma.
2517         * opt.adb
2518         (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
2519         Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
2520
2521 2011-08-04  Vincent Celier  <celier@adacore.com>
2522
2523         * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
2524
2525 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
2526
2527         * makeutl.adb: Minor reformatting.
2528
2529 2011-08-04  Olivier Hainque  <hainque@adacore.com>
2530
2531         * g-altive.ads: Update comments to reflect that only the soft
2532         binding is available today.
2533
2534 2011-08-04  Robert Dewar  <dewar@adacore.com>
2535
2536         * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
2537         makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
2538         * gcc-interface/Make-lang.in: Update dependencies.
2539
2540 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
2541
2542         * prj-env.adb: Remove local debug traces.
2543
2544 2011-08-04  Yannick Moy  <moy@adacore.com>
2545
2546         * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
2547         was used instead of Hi_OK, which could cause a read of an uninitialized
2548         value later on. Detected while working on the new warning.
2549         * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
2550         to local variable.
2551         * sem_ch5.adb (Analyze_Assignment): set the last assignment component
2552         in more cases, in order to detect more unreferenced values.
2553         * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
2554         object for expression, if any.
2555
2556 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
2557
2558         * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
2559         the operand types instead of the Esize.
2560
2561 2011-08-04  Steve Baird  <baird@adacore.com>
2562
2563         * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
2564         enable CodePeer_Mode.
2565         * bindusg.adb (Display): Add help message describing -P binder switch.
2566         * gnat_ugn.texi: Document -P binder switch.
2567         * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
2568         user-defined main program directly.
2569         (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
2570         user-defined main program in the context clause of the package body.
2571
2572 2011-08-04  Yannick Moy  <moy@adacore.com>
2573
2574         * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
2575         duplicate of Defining_Entity
2576         (Get_Unique_Entity_For_Decl): rename function into
2577         Unique_Defining_Entity
2578         * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
2579         (Formal_Proof_On): remove synthesized flag
2580         * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
2581         sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
2582         sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
2583         * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
2584         Annotate (Formal_Proof)
2585
2586 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2587
2588         * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
2589         source files with non-standard naming schemes, in imported projects
2590
2591 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2592
2593         * makeutl.adb (Complete_Mains): when a multi-unit source file is
2594         specified on the gprbuild command line, we need to compile all units
2595         within that file, not just the first one we find
2596         Fix error message for mains that are not found.
2597
2598 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2599
2600         * sem_ch6.adb: Update comment.
2601         * sem_ch12.adb: Minor reformatting.
2602
2603 2011-08-04  Bob Duff  <duff@adacore.com>
2604
2605         * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
2606         Acceptor.Terminate_Alternative without locking Acceptor, which causes a
2607         race condition whose symptom is to fail to lock Parent. That, in turn,
2608         causes Parent.Awake_Count to be accessed without locking Parent, which
2609         causes another race condition whose symptom is that Parent.Awake_Count
2610         can be off by 1 (either too high or too low). The solution is to lock
2611         Parent unconditionally, and then lock Acceptor, before reading
2612         Acceptor.Terminate_Alternative.
2613
2614 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
2615
2616         * debug.adb: Update comment.
2617
2618 2011-08-04  Robert Dewar  <dewar@adacore.com>
2619
2620         * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
2621         sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
2622         exp_ch6.adb: Minor reformatting.
2623
2624 2011-08-04  Gary Dismukes  <dismukes@adacore.com>
2625
2626         * gnat_ugn.texi: Add sentence about the case of compile-time-detected
2627         checks for -gnateE.
2628
2629 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2630
2631         * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
2632
2633 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2634
2635         * sinfo.ads: Minor reformatting.
2636
2637 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2638
2639         * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
2640         even if there is no location.
2641
2642 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2643
2644         * sem_res.adb, sem_ch4.adb: move check for restriction
2645         No_Task_Hierarchy to resolve_allocator.
2646
2647 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2648
2649         * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
2650         This flag of N_Pragma nodes is not used, remove it as well as all of
2651         the associated circuitry.
2652
2653 2011-08-04  Javier Miranda  <miranda@adacore.com>
2654
2655         * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
2656         runtime check on duplicated externa tags
2657         * debug.adb Document switch -gnatdQ.
2658
2659 2011-08-04  Gary Dismukes  <dismukes@adacore.com>
2660
2661         * a-fihema.ads: Minor typo fix.
2662
2663 2011-08-04  Yannick Moy  <moy@adacore.com>
2664
2665         * sem_ch10.adb: Minor comment update.
2666
2667 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2668
2669         * einfo.adb: Update the node field usage to reflect the renaming of
2670         Return_Flag to Return_ Flag_Or_Transient_Decl.
2671         (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
2672         (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
2673         (Write_Field15_Name): Change Return_Flag to
2674         Return_Flag_Or_Transient_Decl.
2675         * einfo.ads: Rename node field Return_Flag to
2676         Return_Flag_Or_Transient_Decl. Update the associated comment and all
2677         occurrences in entities.
2678         (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
2679         associated Inline pragma.
2680         (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
2681         associated Inline pragma.
2682         * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
2683         routine.
2684         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
2685         Return_Flag and Set_Return_Flag.
2686         * exp_ch7.adb (Process_Declarations): Add code to recognize hook
2687         objects generated for controlled transients declared inside an
2688         Exception_With_Actions. Update the calls to Return_Flag.
2689         (Process_Object_Declaration): Add code to add a null guard for hook
2690         objects generated for controlled transients declared inside an
2691         Exception_With_Actions. Update related comment.
2692         * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
2693         objects generated for controlled transients declared inside an
2694         Exception_With_Actions. Update the calls to Return_Flag.
2695         * expander.adb (Expand): Add new case for N_Expression_With_Actions.
2696
2697 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2698
2699         * sem_util.adb:(Wrong_Type): Improve error message on a one-element
2700         positional aggregate.
2701
2702 2011-08-04  Vincent Celier  <celier@adacore.com>
2703
2704         * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
2705         SLOC only for pragmas.
2706
2707 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2708
2709         * projects.texi: Minor typo fix.
2710
2711 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2712
2713         * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
2714         on case-sensitive file systems.
2715
2716 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2717
2718         * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
2719         nested in a disabled pragma.
2720         * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
2721         enclosing pragma, if any, for X decisions.
2722
2723 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2724
2725         * sem_prag.adb: Minor reformatting.
2726
2727 2011-08-04  Vincent Celier  <celier@adacore.com>
2728
2729         * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
2730         allowed in no run time mode.
2731
2732 2011-08-04  Vincent Celier  <celier@adacore.com>
2733
2734         * make.adb (Check): When -gnatc is used, check for the source file
2735         inside the ALI file with a canonical case file name.
2736
2737 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2738
2739         * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
2740         overriding the separator.
2741
2742 2011-08-04  Robert Dewar  <dewar@adacore.com>
2743
2744         * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
2745         prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
2746
2747 2011-08-04  Robert Dewar  <dewar@adacore.com>
2748
2749         * gnat_rm.texi: Minor documentation fix for pragma Annotate.
2750
2751 2011-08-04  Yannick Moy  <moy@adacore.com>
2752
2753         * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
2754         'Result only appears in postcondition of function.
2755
2756 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2757
2758         * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
2759         external tag, include the value of the external tag in the exception
2760         message.
2761
2762 2011-08-04  Yannick Moy  <moy@adacore.com>
2763
2764         * sem_attr.adb (Result): modify error message for misplaced 'Result
2765
2766 2011-08-04  Sergey Rybin  <rybin@adacore.com>
2767
2768         * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
2769         clear that the second argument must be an identifier.
2770
2771 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2772
2773         * exp_ch9.adb (Build_Barrier_Function): When compiling with
2774         -fpreserve-control-flow, insert an IF statement on the barrier
2775         condition to ensure that a conditional branch instruction is generated.
2776
2777 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2778
2779         * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
2780         (Processing_Flags.Ignore_Missing_With): new flag.
2781
2782 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2783
2784         * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
2785         Source_List_File on case-insensitive systems where the file is actually
2786         on a case-sensitive file system (NFS,...).
2787
2788 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2789
2790         * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
2791         function return contains a controlled [extension] aggregate and the
2792         return statement is not part of a handled sequence of statements, wrap
2793         the return in a block. This ensures that all controlled temporaries
2794         generated during aggregate resolution will be picked up by the
2795         finalization machinery.
2796
2797 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2798
2799         * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
2800         components, freeze type before resolution, to ensure that default
2801         initializations are present for all components.
2802         * sem_res.adb (Resolve_Actuals): the designated object of an
2803         accces-to-constant type is a legal actual in a call to an
2804         initialization procedure.
2805
2806 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2807
2808         * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
2809         N_Unchecked_Type_Conversion to the possible containers of a renamed
2810         transient variable.
2811
2812 2011-08-04  Yannick Moy  <moy@adacore.com>
2813
2814         * par-ch13.adb (Aspect_Specifications_Present): recognize
2815         "with Identifier'Class =>" as an aspect, so that a meaningful warning
2816         is issued in Strict mode.
2817         * par.adb: Fix typos in comments.
2818
2819 2011-08-04  Yannick Moy  <moy@adacore.com>
2820
2821         * sem_attr.adb (Result): modify error message to take into account Post
2822         aspect when compiling Ada 2012 (or newer) code.
2823
2824 2011-08-04  Nicolas Roche  <roche@adacore.com>
2825
2826         * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
2827         remove need for GCC exceptions.
2828
2829 2011-08-04  Vincent Celier  <celier@adacore.com>
2830
2831         * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
2832         project, not the source file name.
2833         * prj.adb (Find_Sources.Look_For_Sources): If the source has been
2834         excluded, continue looking. This excluded source will only be returned
2835         if there is no other source with the same base name that is not locally
2836         removed.
2837
2838 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2839
2840         * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
2841         private and one of the operands is a real literal, use a qualified
2842         expression rather than a conversion which is not meaningful to the
2843         back-end.
2844
2845 2011-08-04  Yannick Moy  <moy@adacore.com>
2846
2847         * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
2848         corresponding aspect X'Class are allowed, proceed with analysis of the
2849         aspect instead of skipping it.
2850
2851 2011-08-04  Tristan Gingold  <gingold@adacore.com>
2852
2853         * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
2854         This will allow to have an Ada implementation for the subprogram.
2855
2856 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2857
2858         * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
2859         completion and aspects are present, apply them to the entity for the
2860         type which is currently the partial view, but which is the one that
2861         will be frozen.
2862         * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
2863         applies to a partial view, indicate that the full view has predicates
2864         and delayed aspects.
2865         (Replace_Type_Reference): Handle properly predicates that apply to the
2866         full view of a private completion.
2867
2868 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
2869
2870         * layout.adb (Layout_Type): For composite types, do not set Esize.
2871         * freeze.adb (Set_Small_Size): Remove test on alignment and do not
2872         set Esize.
2873         (Size_Known): Look at the RM size of components instead of the Esize.
2874         (Freeze_Record_Type): Look at the RM size instead of the Esize to
2875         issue warning and activate Implicit_Packing.
2876         (Freeze_Entity): Likewise.  Do not issue a warning for alias/atomic
2877         if the Esize is not known.
2878         * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
2879         for elementary types only.
2880         (Analyze_Record_Representation_Clause): Look at the RM size instead
2881         of the Esize to issue errors.
2882         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
2883         is not known.
2884         <E_Record_Type>: Look at the RM size instead of the Esize.  Remove
2885         obsolete block.
2886         Look at the RM size instead of the Esize for types if the latter is
2887         not known.
2888         (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
2889
2890 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2891
2892         * sem_type.adb: proper handling of equality not involving anonymous
2893         access types.
2894
2895 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2896
2897         * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
2898         Vis_Decls. When creating a library-level finalizer for a package spec,
2899         both the declaration and body of the finalizer are inserted either in
2900         the visible or private declarations of the package spec.
2901
2902 2011-08-04  Javier Miranda  <miranda@adacore.com>
2903
2904         * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
2905         use of the full-view of a type when invoking Is_Ancestor.
2906         * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
2907         the full-view of private parents is requested, then use also the
2908         full-view of the parent of the first derivation.
2909
2910 2011-08-04  Tristan Gingold  <gingold@adacore.com>
2911
2912         * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
2913         instead of the locally imported procedure.
2914         * s-taprop-mingw.adb (Enter_Task): Ditto.
2915         * s-valrea.adb (Scan_Real): Ditto.
2916         * s-imgrea.adb (Set_Image_Real): Ditto.
2917         * s-flocon.ads: Make the package pure.
2918
2919 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2920
2921         * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
2922         * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
2923         * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
2924         New subprogram, moved here from...
2925         * par.adb, par-ch5.adb (P_Statement_Name): ... here.
2926         * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
2927         rewriting of the last argument into a procedure call statement here...
2928         * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
2929         instead.
2930
2931 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2932
2933         * par_sco.adb: Minor reformatting.
2934
2935 2011-08-04  Robert Dewar  <dewar@adacore.com>
2936
2937         * erroutc.adb: Minor reformatting.
2938
2939 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2940
2941         * par_sco.adb: Comment update.
2942
2943 2011-08-04  Tristan Gingold  <gingold@adacore.com>
2944
2945         * s-flocon.ads: New file.
2946         * g-flocon.ads: Now a renaming of s-flocon.
2947         * Makefile.rtl: Add s-flocon.o
2948
2949 2011-08-04  Javier Miranda  <miranda@adacore.com>
2950
2951         * exp_strm.adb (Build_Array_Input_Function): if the array type is
2952         constrained, do not attempt to build a subtype of it.
2953
2954 2011-08-04  Yannick Moy  <moy@adacore.com>
2955
2956         * errout.ads Change comments: remove 'R'M as an example where quotes
2957         are needed; add ALFA as another case where quotes are not needed
2958         * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
2959         case where quotes are not needed.
2960         * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
2961         sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
2962         Remove all occurrences of 'A'L'F'A
2963
2964 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2965
2966         * sem_ch13.adb: check legality of invariant pragma.
2967
2968 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
2969
2970         * bindgen.adb: Add comments.
2971
2972 2011-08-04  Yannick Moy  <moy@adacore.com>
2973
2974         * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
2975         synthesized flag.
2976         * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
2977         (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
2978
2979 2011-08-04  Robert Dewar  <dewar@adacore.com>
2980
2981         * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
2982         osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
2983         sem_ch13.adb, s-pooloc.adb: Minor reformatting.
2984
2985 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2986
2987         * s-pooloc.ads, s-pooglo.ads: Minor reformatting
2988
2989 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2990
2991         PR ada/47880
2992         * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
2993         allocated object.
2994
2995 2011-08-04  Robert Dewar  <dewar@adacore.com>
2996
2997         * einfo.ads, exp_ch4.adb: Minor reformatting.
2998
2999 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
3000
3001         * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
3002
3003 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3004
3005         * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
3006         type in all cases to compute list of primitive operations, because full
3007         view may be an itype that is not attached to the list of declarations.
3008
3009 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
3010
3011         * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
3012         library has already been finalized.
3013         (Gen_Adafinal_C): Likewise.
3014         (Gen_Adainit_Ada): Generate an early return if the library has
3015         already been elaborated.
3016         (Gen_Adainit_C): Likewise.
3017         (Gen_Output_File_Ada): Generate an elaboration flag.
3018         (Gen_Output_File_C): Likewise.
3019
3020 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3021
3022         * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
3023         Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
3024         built in the first place.
3025         (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
3026         for CodePeer because Finalize_Address was not built to begin with.
3027         * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
3028
3029 2011-08-04  Pascal Obry  <obry@adacore.com>
3030
3031         * adaint.c (__gnat_tmp_name): Use current process id to create temp
3032         filenames, this ensures unicity of filenames across processes.
3033
3034 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3035
3036         * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
3037         Raise_Controlled to Raise_From_Controlled_Operation. Update the
3038         signature of Raise_From_Controlled_Operation by adding flag From_Abort.
3039         Add False as the actual to From_Abort in the generated call to
3040         Raise_From_Controlled_Operation.
3041
3042 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
3043
3044         * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
3045         so that the ali file name can be retrieved from outside of this package.
3046         * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
3047         doing nothing in the general case, but used to update the object file
3048         timestamp if directly generated by the backend.
3049         * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
3050         to a later time than the ali file one.
3051
3052 2011-08-04  Yannick Moy  <moy@adacore.com>
3053
3054         * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
3055         entities whose body contains an Annotate pragma which forces formal
3056         proof on this body.
3057         * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
3058         sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
3059         Mark_Non_ALFA_Subprogram to pass in a message and node.
3060         * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
3061         (Forma_Proof, On) which sets the flag Formal_Proof_On in the
3062         surrounding subprogram.
3063         * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
3064         Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
3065         as not in ALFA is annotated with Formal_Proof being On, then an error
3066         is issued based on the additional parameters for message and node.
3067         * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
3068         * gcc-interface/Make-lang.in: Update dependencies.
3069
3070 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3071
3072         * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
3073         Finalize_Address when CodePeer is enabled.
3074
3075 2011-08-04  Pascal Obry  <obry@adacore.com>
3076
3077         * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
3078         the latter returns a pointer to a static buffer which is deallocated
3079         at the end of the routine.
3080
3081 2011-08-04  Yannick Moy  <moy@adacore.com>
3082
3083         * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
3084         after index creation; mark unconstrained base array type generated as
3085         being in/not in ALFA as well
3086         (Make_Index): mark subtype created as in/not in ALFA
3087         * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
3088         over a loop as in/not in ALFA, depending on its type and form of loop
3089         iteration.
3090
3091 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3092
3093         * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
3094         directly to False on .NET and JVM.
3095
3096 2011-08-04  Yannick Moy  <moy@adacore.com>
3097
3098         * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
3099         constraint that subtype must come from source code to be in ALFA, so
3100         that anonymous subtypes can be in ALFA too.
3101
3102 2011-08-04  Yannick Moy  <moy@adacore.com>
3103
3104         * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
3105         reference for ALFA mode.
3106         * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
3107         procedure public so as to use it from formal verification back-end.
3108
3109 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
3110
3111         * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
3112         invalid checks of the Parameter, making Remove_Switch not working
3113         correctly.
3114
3115 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
3116
3117         * targparm.ads: Update header: no run-time exception is needed on this
3118         file.
3119
3120 2011-08-04  Vincent Celier  <celier@adacore.com>
3121
3122         * a-fihema.adb: Use System.IO instead of GNAT.IO
3123
3124 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3125
3126         * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
3127         are forbidden in Compiler_Unit mode.
3128
3129 2011-08-04  Robert Dewar  <dewar@adacore.com>
3130
3131         * sem_util.adb: Minor reformatting.
3132
3133 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3134
3135         * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
3136         library-level finalizers.
3137         (Gen_Finalize_Library_C): Update the import string for library-level
3138         finalizers.
3139         (Gen_Finalize_Library_Defs_C): Update the definition name of a
3140         library-level finalizer.
3141         * exp_ch7.adb: Remove with and use clauses for Stringt.
3142         (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
3143         Spec_Decl. Add local variable Body_Id. The names of library-level
3144         finalizers are now manually fully qualified and are no longer external.
3145         A single name is now capable of servicing .NET, JVM and non-VM targets.
3146         Pragma Export is no longer required to provide visibility for the name.
3147         (Create_Finalizer_String): Removed.
3148         (New_Finalizer_Name): New routine which mimics New_..._Name.
3149
3150 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
3151
3152         * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
3153         elaboration counter to Standard_Short_Integer.
3154         * sem_util.adb (Build_Elaboration_Entity): Likewise.
3155         * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
3156         (Gen_Elab_Externals_C): Likewise.
3157
3158 2011-08-04  Ed Falis  <falis@adacore.com>
3159
3160         * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
3161         system-vxworks-ppc.ads, system-vxworks-m68k.ads,
3162         system-vxworks-mips.ads, system-vxworks-x86.ads
3163         (Always_Compatible_Rep): set to False for all VxWorks targets.
3164
3165 2011-08-04  Robert Dewar  <dewar@adacore.com>
3166
3167         * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
3168         makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
3169         exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
3170         exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
3171         exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
3172         sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
3173         sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
3174         Minor reformatting and code reorganization.
3175
3176 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3177
3178         * projects.texi: Added doc for aggregate projects.
3179
3180 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3181
3182         * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
3183         Add support for overriding the Project_Path in aggregate projects.
3184
3185 2011-08-04  Robert Dewar  <dewar@adacore.com>
3186
3187         * a-cofove.ads: Minor reformatting.
3188
3189 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3190
3191         * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
3192         on the generated code.
3193         (Build_Finalize_Statements): Update the comment on the generated code.
3194         (Build_Initialize_Statements): Update the comment on the generated code.
3195         (Build_Object_Declarations): Add local variable Result. The object
3196         declarations are now built in sequence.
3197         * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
3198         RE_Unit_Table.
3199
3200 2011-08-04  Robert Dewar  <dewar@adacore.com>
3201
3202         * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
3203
3204 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
3205
3206         * einfo.ads (Elaboration_Entity): Document new definition and use.
3207         (Elaboration_Entity_Required): Adjust to above change.
3208         * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
3209         * exp_ch12.adb: And with and use for Snames.
3210         (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
3211         * exp_util.adb (Set_Elaboration_Flag): Likewise.
3212         * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
3213         <Check_Unit_Name>: Deal with N_Expanded_Name.
3214         <Attribute_Elaborated>: Extend to all unit names.
3215         * sem_elab.adb: And with and use for Uintp.
3216         (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
3217         * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
3218         * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
3219         * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
3220         from Gen_Adainit_Ada.
3221         (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
3222         (Gen_Adafinal_Ada): Remove redundant test.  In the non-main program
3223         case, do not call System.Standard_Library.Adafinal; instead call
3224         finalize_library if needed.
3225         (Gen_Adafinal_C): Likewise.
3226         (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
3227         non-main program case.
3228         (Gen_Adainit_C): Generate a couple of external declarations here.
3229         In the main program case, set SSL.Finalize_Library_Objects.
3230         (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
3231         (Gen_Elab_Calls_C): Likewise.
3232         (Gen_Finalize_Library_Ada): Likewise.  Skip SAL interface units.
3233         (Gen_Finalize_Library_C): Likewise.  Generate a full function.
3234         (Gen_Main_C): Put back call to Ada_Final and don't finalize library
3235         objects here.
3236         (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
3237         if -a is specified.  Call Gen_Elab_Externals_Ada.  Move around call to
3238         Gen_Adafinal_Ada.
3239         (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
3240         if -a is specified.  Call Gen_Elab_Externals_C.  Remove useless couple
3241         of external declarations.  Call Gen_Finalize_Library_C.
3242
3243 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3244
3245         * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
3246         Compute_Compilation_Phases): new subprogram.
3247         (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
3248         The number of mains as well as the various compilation phases that
3249         need to be run are now project tree specific, since various
3250         aggregated trees might have different requirements. In particular,
3251         they do not all require bind or link phases.
3252
3253 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3254
3255         * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
3256         (Project_Tree_Appdata): New type.
3257         It is now possible to associate application-specific data to a project
3258         tree. In particular, this is used in the gprbuild builder to avoid a
3259         number of global tables and htables, especially now that there can be
3260         several project trees loaded at once because of aggregate projects.
3261         (Debug_Name): new procedure.
3262         * projects.texi: Clarify syntax of "**" for Source_Dirs
3263
3264 2011-08-03  Emmanuel Briot  <briot@adacore.com>
3265
3266         * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
3267         the "roots" for a main.
3268         (Fill_From_Project): add support for aggregate projects. Main units
3269         in aggregated projects are now automatically added in the list of
3270         files to build (although this fails later on in gprbuild, because
3271         these files are not using the root proejct tree, so this needs
3272         further cleanup)
3273         * gcc-interface/Make-lang.in: Update dependencies.
3274
3275 2011-08-03  Yannick Moy  <moy@adacore.com>
3276
3277         * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
3278         conditional expression in ALFA.
3279         * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
3280         expressions as not in ALFA.
3281
3282 2011-08-03  Robert Dewar  <dewar@adacore.com>
3283
3284         * a-cofove.adb: Minor reformatting.
3285
3286 2011-08-03  Emmanuel Briot  <briot@adacore.com>
3287
3288         * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
3289         (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
3290         gprbuild sources.
3291         These packages are more logically placed in the Queue package, since
3292         they manipulate the queue. It is also likely that they can be adapted
3293         for gnatmake, thus sharing more code.
3294         (Finish_Program, Fail_Program): moved from the gprbuild sources, so
3295         that we could move the above.
3296
3297 2011-08-03  Emmanuel Briot  <briot@adacore.com>
3298
3299         * errutil.adb (Finalize): clean up the list of error messages on exit.
3300         Calling this subprogram multiple times will no longer show duplicate
3301         error messages on stderr.
3302
3303 2011-08-03  Emmanuel Briot  <briot@adacore.com>
3304
3305         * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
3306         Getopt_Switches when we have already define a command line
3307         configuration.
3308
3309 2011-08-03  Yannick Moy  <moy@adacore.com>
3310
3311         * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
3312         in ALFA. Instead, they are considered as assertions to prove.
3313         * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
3314         nodes as not in ALFA. Instead, include conditional expressions in ALFA
3315         if they have no ELSE part, or if they occur in pre- and postconditions,
3316         where the Condition cannot have side-effects in ALFA
3317         (Analyze_Membership_Op): do not mark such nodes as not in ALFA
3318         (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
3319         Instead, include type conversion between scalar types in ALFA.
3320         * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
3321         if-and-only-if its type is in ALFA.
3322
3323 2011-08-03  Thomas Quinot  <quinot@adacore.com>
3324
3325         * scos.adb, get_scos.adb, put_scos.adb
3326         New code letter for decisions: G (entry guard)
3327         * par_sco.adb
3328         (Traverse_Subprogram_Body): Rename to...
3329         (Traverse_Subprogram_Or_Task_Body): New subrpogram.
3330         (Traverse_Protected_Body): New subprogram
3331         (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
3332         protected bodies and entry bodies.
3333
3334 2011-08-03  Yannick Moy  <moy@adacore.com>
3335
3336         * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
3337         entities with get/set subprograms, which is set on procedure entities
3338         generated by the compiler for a postcondition.
3339         * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
3340         * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
3341         entity for a declaration
3342         (Get_Unique_Entity_For_Decl): new function returning an entity which
3343         represents a declaration, so that matching spec and body have the same
3344         entity.
3345
3346 2011-08-03  Robert Dewar  <dewar@adacore.com>
3347
3348         * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
3349         a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
3350
3351 2011-08-03  Yannick Moy  <moy@adacore.com>
3352
3353         * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
3354         library-level because retriction No_Implicit_Dynamic_Code in the
3355         front-end prevents its definition as a local subprogram
3356         (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
3357         for reuse in other contexts
3358         (Traverse_Declarations_Or_Statements,
3359         Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
3360         Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
3361         procedures take a callback parameter to be called on all declarations
3362         * lib-xref.ads
3363         (Traverse_All_Compilation_Units): new generic function to traverse a
3364         compilation unit and call a callback parameter on all declarations
3365
3366 2011-08-03  Javier Miranda  <miranda@adacore.com>
3367
3368         * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
3369         in Java since they are always enclosed in a namespace that
3370         differentiates them, and overloaded entities are supported by the VM.
3371
3372 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
3373
3374         * checks.adb (Determine_Range): If a computed bound of an operation is
3375         outside the range of the base type of the expression, and overflow
3376         checks are enabled, the result is unknown and cannot be used for any
3377         subsequent constant folding.
3378         * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
3379         unknown, so is the result of the comparison.
3380
3381 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
3382
3383         * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
3384         From_Abort. When finalization was triggered by an abort, propagate
3385         Standard'Abort_Signal rather than Program_Error.
3386         * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
3387         From_Abort.
3388         * a-except.adb (Raise_From_Controlled_Operation): Add new formal
3389         From_Abort. When finalization was triggered by an abort, propagate
3390         Standard'Abort_Signal rather than Program_Error.
3391         * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
3392         From_Abort.
3393         * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
3394         Abort_Id. Update the calls to Build_Object_Declarations and
3395         Build_Raise_Statement to include Abort_Id.
3396         (Build_Adjust_Statements): New local variable Abort_Id. Update the
3397         calls to Build_Object_Declarations and Build_Raise_Statement to include
3398         Abort_Id.
3399         (Build_Finalize_Statements): New local variable Abort_Id. Update the
3400         calls to Build_Object_Declarations and Build_Raise_Statement to include
3401         Abort_Id.
3402         (Build_Components): Create an entity for Abort_Id when exceptions are
3403         allowed on the target.
3404         (Build_Finalizer): New local variable Abort_Id.
3405         (Build_Initialize_Statements): New local variable Abort_Id. Update the
3406         calls to Build_Object_Declarations and Build_Raise_Statement to include
3407         Abort_Id.
3408         (Build_Object_Declarations): Add new formal Abort_Id. Create the
3409         declaration of flag Abort_Id to preserve the original abort status
3410         before finalization code is executed.
3411         (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
3412         runtime routine Raise_From_Controlled_Operation.
3413         (Create_Finalizer): Update the call to Build_Raise_Statement to include
3414         Abort_Id. Update the call to Build_Object_Declarations to include
3415         Abort_Id. Update the layout of the finalizer body.
3416         (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
3417         (Process_Transient_Objects): New local variable Abort_Id. Remove the
3418         clunky code to create all flags and objects related to
3419         exception propagation and replace it with a call to
3420         Build_Object_Declarations. Update the call to Build_Raise_Statement to
3421         include Abort_Id.
3422         * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
3423         Add new formal Abort_Id and associated comment on its use.
3424         (Build_Raise_Statement): Add new formal Abort_Id and associated comment
3425         on its use.
3426         * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
3427         Remove the clunky code to create all flags and objects related to
3428         exception propagation and replace it with a call to
3429         Build_Object_Declarations. Update the call to Build_Raise_Statement.
3430
3431 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
3432
3433         * s-tassta.adb: Fix minor typos.
3434
3435 2011-08-03  Robert Dewar  <dewar@adacore.com>
3436
3437         * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
3438         lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
3439
3440 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
3441
3442         * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
3443         to packages. This ensures that the finalizer body will not end up
3444         inside the freeze node.
3445         (Process_Declarations): Add code to detect whether a freeze node has a
3446         nested finalization collection.
3447
3448 2011-08-03  Pascal Obry  <obry@adacore.com>
3449
3450         * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
3451         (Current_Session): Return a not null access to Session_Type.
3452         (Default_Session): Likewise.
3453
3454 2011-08-03  Robert Dewar  <dewar@adacore.com>
3455
3456         * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
3457         exp_ch3.adb, exp_ch3.ads: Minor reformatting.
3458
3459 2011-08-03  Pascal Obry  <obry@adacore.com>
3460
3461         * g-awk.ads: Minor comment fix.
3462
3463 2011-08-03  Sergey Rybin  <rybin@adacore.com>
3464
3465         * tree_io.ads (ASIS_Version_Number): Update because of the changes in
3466         the tree structure related to discriminant constraints.
3467         Original_Discriminant cannot be used any more for computing the
3468         defining name for the reference to a discriminant.
3469
3470 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
3471
3472         * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
3473         function is not visibly tagged, this is not a dispatching call and
3474         therfore is not Tag_Indeterminate, even if the function is marked as
3475         dispatching on result.
3476
3477 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
3478
3479         * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
3480         (Expand_N_Free_Statement): Add a guard to protect against run-times
3481         which do not support controlled types.
3482         * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
3483         against run-times which do not support controlled types.
3484         * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
3485         against run-times which do not support controlled types.
3486         * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
3487         against run-times which do not support controlled types.
3488         * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
3489         protect against run-times which do not support controlled types.
3490
3491 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
3492
3493         * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
3494         (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
3495
3496 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
3497
3498         * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
3499         modified in the source, to prevent spurious warnings when compiling
3500         with -gnatg.
3501
3502 2011-08-03  Thomas Quinot  <quinot@adacore.com>
3503
3504         * a-except-2005.adb: Minor reformatting.
3505
3506 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
3507
3508         * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
3509         is a renaming declaration in the private part of a package, do not emit
3510         a warning that the with_clause could be moved because the renaming may
3511         be used in the body or in a child unit.
3512
3513 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
3514
3515         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
3516         Propagate the Comes_From_Source attribute from the original return
3517         object to the renaming.
3518
3519 2011-08-03  Jose Ruiz  <ruiz@adacore.com>
3520
3521         * exp_ch7.adb (Build_Raise_Statement): Do not call
3522         Raise_From_Controlled_Operation when this routine is not present in
3523         the run-time library.
3524         (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
3525         libraries (Ravenscar), tasks are non-terminating, and protected objects
3526         and tasks can only appear at library level, so we do not want
3527         finalization of protected objects nor tasks.
3528         * exp_intr.adb: Minor clarification in comment.
3529         bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
3530         Gen_Output_File_C): Remove references to finalization of library-level
3531         objects when using restricted run-time libraries.
3532
3533 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
3534
3535         * sem_ch3.adb (Build_Discriminant_Constraints): Set
3536         Original_Discriminant only if the parent type is a generic formal.
3537
3538 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
3539
3540         * exp_ch13.adb: Add with and use clause for Targparm;
3541         (Expand_N_Free_Statement): Prevent the generation of a custom
3542         Deallocate on .NET/JVM targets since this requires pools and address
3543         arithmetic.
3544         * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
3545         .NET/JVM targets, attach the newly allocated object to the access
3546         type's finalization collection. Do not generate a call to
3547         Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
3548         exist in the runtime.
3549         (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
3550         create a custom Allocate for object that do not require initialization.
3551         Attach a newly allocated object to the access type's finalization
3552         collection on .NET/JVM.
3553         * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
3554         assignment of controlled types on .NET/JVM. The two hidden pointers
3555         Prev and Next and stored and later restored after the assignment takes
3556         place.
3557         * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
3558         kludge for .NET/JVM to recognize a particular piece of code coming from
3559         Heap_Management and change the call to Finalize into Deep_Finalize.
3560         * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
3561         finalization collections on .NET/JVM only for types derived from
3562         Controlled. Separate the association of storage pools with a collection
3563         and only allow it on non-.NET/JVM targets.
3564         (Make_Attach_Call): New routine.
3565         (Make_Detach_Call): New routine.
3566         (Process_Object_Declarations): Suppress the generation of
3567         build-in-place return object clean up code on .NET/JVM since it uses
3568         pools.
3569         * exp_ch7.ads (Make_Attach_Call): New routine.
3570         (Make_Detach_Call): New routine.
3571         * exp_intr.adb Add with and use clause for Targparm.
3572         (Expand_Unc_Deallocation): Detach a controlled object from a collection
3573         on .NET/JVM targets.
3574         * rtsfind.ads: Add entries RE_Attach, RE_Detach and
3575         RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
3576         * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
3577         names used in finalization.
3578
3579 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
3580
3581         * a-fihema.adb: Add with and use clauses for System.Soft_Links.
3582         (Attach, Detach): Lock the current task when chaining an object onto a
3583         collection.
3584
3585 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
3586
3587         * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
3588         Rewritten to create the message strings when the exception is not
3589         raised by an abort during finalization.
3590         * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
3591         Raise_From_Controlled_Operation and update its associated comment.
3592         * a-fihema.ads, a-fihema.adb: New GNAT unit.
3593         Ada.Finalization.Heap_Management provides key functionality
3594         associated with controlled objects on the heap, their creation,
3595         finalization and reclamation. Type Finalization_Collection is
3596         effectively a wrapper which sits ontop of a storage pool and performs
3597         all necessary bookkeeping for all the objects it contains. Each
3598         access-to-controlled or access-to-class-wide type receives a collection
3599         as part of its expansion. The compiler generates buffer code and
3600         invokes Allocate / Deallocate to create and destroy allocated
3601         controlled objects.
3602         * a-finali.adb ("="): Removed.
3603         * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
3604         fields Prev and Next.
3605         * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
3606         A library unit with at least one controlled object on the library level
3607         has a special finalizer which is invoked by the binder. To signal this,
3608         ali files carry field PF.
3609         * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
3610         associated comment on field usage.
3611         * a-tags.adb (Get_RC_Offset): Removed.
3612         (Needs_Finalization): New routine.
3613         * a-tags.ads: Update the structure of the GNAT dispatch tables.
3614         Dispatch tables now carry field Needs_Finalization which provides
3615         runtime indication whether a type is controlled or has controlled
3616         components or both. Remove field RC_Offset.
3617         (Get_RC_Offset): Removed along with its associated pragma Export.
3618         Since tagged types with controlled components no longer carry hidden
3619         field _controller, the special mechanism to retrieve its location is no
3620         longer needed.
3621         (Needs_Finalization): New routine.
3622         * atree.ads, atree.adb (Elist24): New routine.
3623         (Set_Elist24): New routine.
3624         * atree.h: Add a define clause for Elist24.
3625         * bindgen.adb New library-level variable Lib_Final_Built.
3626         (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
3627         presence of a VM target, the routine generates calls to the proper
3628         library finalization routine.
3629         (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
3630         targets. Set the correct library finalization routine depending on
3631         whether the library has controlled objects or this is a VM compilation.
3632         (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
3633         to library-level finalizers of compiled units in reverse order of
3634         elaboration. It also produces exception management code and reraises a
3635         potential exception after all units have been finalized.
3636         (Gen_Finalize_Library_C): New routine. This procedure generates calls to
3637         library-level finalizers of compiled units in reverse order of
3638         elaboration.
3639         (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
3640         definitions of all library-level finalizers available to the compilation
3641         (Gen_Main_Ada): Directly call Adafinal which now contails all target
3642         dependent code.
3643         (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
3644         System.Standard_Library.Adafinal directly. If the library needs
3645         finalization actions, create the sequence of finalization calls.
3646         (Gen_Output_File_Ada): Alphabetize local variables and constants.
3647         Generate a with clause for System.Soft_Links when compiling for a VM.
3648         Remove the code which imports System.Standard_Library.Adafinal as
3649         Do_Finalize. Generate the library finalization routine.
3650         (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
3651         If the library needs finalization actions, create all the definitions
3652         of library- level finalizers.
3653         (Has_Finalizer): New routine. Determines whether at least one compiled
3654         unit has a library-level finalizer.
3655         Add type Qualification_Mode.
3656         (Set_Unit_Name): Add a formal which controls the replacement of a dot.
3657         * einfo.adb: New usage of field 15 as Return_Flag.
3658         Remove Finalization_Chain_Entity from the usages of field 19.
3659         Remove Associated_Final_Chain from the usages of field 23.
3660         New usage of field 23 as Associated_Collection.
3661         New usage of field 24 as Finalizer.
3662         New usage of flag 252 as Is_Processed_Transient.
3663         (Associated_Final_Chain): Removed.
3664         (Associated_Collection): New routine.
3665         (Finalization_Chain_Entity): Removed.
3666         (Finalizer): New routine.
3667         (Is_Finalizer): New routine.
3668         (Is_Processed_Transient): New routine.
3669         (Return_Flag): New routine.
3670         (Set_Associated_Final_Chain): Removed.
3671         (Set_Associated_Collection): New routine.
3672         (Set_Finalization_Chain_Entity): Removed.
3673         (Set_Finalizer): New routine.
3674         (Set_Is_Processed_Transient): New routine.
3675         (Set_Return_Flag): New routine.
3676         (Write_Entity_Flags): Include Is_Processed_Transient to the list of
3677         displayed flags.
3678         (Write_Field8_Name): Alphabetize the output.
3679         (Write_Field11_Name): Alphabetize the output.
3680         (Write_Field12_Name): Alphabetize the output.
3681         (Write_Field13_Name): Alphabetize the output.
3682         (Write_Field14_Name): Alphabetize the output.
3683         (Write_Field15_Name): Alphabetize the output.
3684         (Write_Field16_Name): Alphabetize the output.
3685         (Write_Field17_Name): Alphabetize the output.
3686         (Write_Field18_Name): Alphabetize the output.
3687         (Write_Field19_Name): Alphabetize the output. Remove the output of
3688         Finalization_Chain_Entity.
3689         (Write_Field20_Name): Alphabetize the output.
3690         (Write_Field21_Name): Alphabetize the output.
3691         (Write_Field22_Name): Alphabetize the output.
3692         (Write_Field23_Name): Alphabetize the output. Remove the output of
3693         Associated_Final_Chain. Add output for Associated_Collection.
3694         (Write_Field24_Name): Alphabetize the output.
3695         (Write_Field25_Name): Add output for Finalizer.
3696         (Write_Field26_Name): Alphabetize the output.
3697         (Write_Field27_Name): Alphabetize the output.
3698         (Write_Field28_Name): Alphabetize the output.
3699         * einfo.ads: Add new field description for Associated_Collection and
3700         its uses in nodes.
3701         Remove Associated_Final_Chain and its uses in nodes.
3702         Remove Finalization_Chain_Entity and its uses in nodes.
3703         Add new field description for Finalizer and its uses in nodes.
3704         Add new synthesized attribute Is_Finalizer.
3705         Add new flag description for Is_Processed_Transient and its uses in
3706         nodes.
3707         Add new field description for Return_Flag and its uses in nodes.
3708         (Associated_Final_Chain): Removed along with its pragma Inline.
3709         (Associated_Collection): New routine and pragma Inline.
3710         (Finalization_Chain_Entity): Removed along with its pragma Inline.
3711         (Finalizer): New routine and pragma Inline.
3712         (Is_Finalizer): New routine and pragma Inline.
3713         (Is_Processed_Transient): New routine and pragma Inline.
3714         (Return_Flag): New routine and pragma Inline.
3715         (Set_Associated_Final_Chain): Removed along with its pragma Inline.
3716         (Set_Associated_Collection): New routine and pragma Inline.
3717         (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
3718         (Set_Finalizer): New routine and pragma Inline.
3719         (Set_Is_Processed_Transient): New routine and pragma Inline.
3720         (Set_Return_Flag): New routine and pragma Inline.
3721         * exp_aggr.adb: Alphabetize subprograms.
3722         (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
3723         (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
3724         associated comments. Remove local variables External_Final_List and
3725         Attach.
3726         Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
3727         Ancestor. Remove the retrieval of finalization lists. Update the call to
3728         Make_Adjust_Call.
3729         (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
3730         lists. Update the call to Late_Expansion.
3731         (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
3732         (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
3733         (Gen_Assign): Remove the retrieval of the finalization list used to
3734         build the assignment. Update the calls to Make_Init_Call and
3735         Make_Adjust_Call.
3736         (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
3737         Remove the mechanism to determine attachment levels and finalization
3738         list retrieval. Remove the processing for coextensions.
3739         (Init_Controller): Removed. Controllers no longer exist.
3740         (Late_Expansion): Remove formals Flist and Obj along with their
3741         associated comments. Update the calls to Build_Record_Aggr_Code and
3742         Build_Array_Aggr_Code.
3743         * exp_ch13.adb (Expand_N_Free_Statement): New routine.
3744         (Expand_N_Freeze_Entity): Add special processing for finalizers which
3745         appear in entry bodies, protected subprograms and task bodies.
3746         * exp_ch13.ads (Expand_N_Free_Statement): New routine.
3747         * exp_ch3.adb (Add_Final_Chain): Removed.
3748         (Build_Array_Init_Proc): Alphabetize local variables.
3749         (Build_Assignment): Alphabetize local variables. Update the call to
3750         Maked_Adjust_Call.
3751         (Build_Class_Wide_Master): Rename local variables to better reflect
3752         their role.
3753         (Build_Discriminant_Assignments): Code reformatting.
3754         (Build_Init_Call_Thru): Code reformatting.
3755         (Build_Init_Procedure): Code reformatting. Generate a special version
3756         of Deep_Finalize which is capable of finalizing all initialized
3757         components and ignore the rest.
3758         (Build_Init_Statements): Rename local variables to better reflect their
3759         role.
3760         Reimplement the mechanism to include the creation and update of an index
3761         variable called a "counter". It is used as a bookmark for tracing
3762         initialized and non-initialized components.
3763         (Build_Initialization_Call): Remove local variable Controller_Typ.
3764         Alphabetize all local variables. Remove the initialization of the
3765         record controller and update the call to Make_Init_Call.
3766         (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
3767         New local variable Counter.
3768         (Constrain_Array): Alphabetize.
3769         (Expand_Freeze_Array_Type): Create a collection instead of a
3770         finalization list.
3771         (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
3772         Finalize_Address which is used in conjunction with allocated controlled
3773         objects.
3774         (Expand_N_Object_Declaration): Remove the creation of a finalization
3775         list for anonymous access types. Update the calls to Make_Init_Call and
3776         Make_Adjust_Call.
3777         (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
3778         retrieval of finalization lists. Remove the expansion of the record
3779         controller. Create TSS primitive Finalize_Address used in conjunction
3780         with controlled objects on the heap. Create finalization collections
3781         for access-to-controlled record components.
3782         (Expand_Record_Controller): Removed.
3783         (Freeze_Type): Remove the freezing of record controllers. Freezing of
3784         class-wide types now requires additional processing. Create
3785         finalization collections for access-to-controlled types.
3786         (Increment_Counter): New routine.
3787         (Make_Counter): New routine.
3788         (Make_Eq_If): Remove the mention of Name_uController.
3789         (Make_Predefined_Primitive_Specs): There is no longer need to skip
3790         types coming from System.Finalization_Root.
3791         (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
3792         (Predefined_Primitive_Bodies): There is no longer need to skip types
3793         coming from System.Finalization_Root.
3794         (Stream_Operation_OK): Do not generate stream routines for
3795         type Ada.Finalization.Heap_Management.Finalization_Collection.
3796         * exp_ch3.ads: Alphabetize subprograms.
3797         * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
3798         Add with and use clause for Lib.
3799         (Complete_Coextension_Finalization): Removed.
3800         (Complete_Controlled_Allocation): New routine. Create a finalization
3801         collection for anonymous access-to-controlled types. Create a custom
3802         Allocate which interfaces with the back end and the machinery in
3803         Heap_Management.
3804         (Expand_Allocator_Expression): Add necessary calls to
3805         Complete_Controlled_Allocation. Remove the retrieval of finalization
3806         lists. Update the calls to Make_Adjust_Call. Generate a call to
3807         Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
3808         the associated collection.
3809         (Expand_N_Allocator): Remove the processing for dynamic coextensions.
3810         Code clean up. Remove the retrieval of finalization lists and
3811         attachment levels.
3812         Update the call to Make_Init_Call. Generate a call to
3813         Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
3814         the associated collection.
3815         (Get_Allocator_Final_List): Removed. Finalization lists are not
3816         available.
3817         (Suitable_Element): Remove the mention of Name_uController.
3818         * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
3819         (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
3820         the left hand side, carry out the assignment and adjust the left hand
3821         side.
3822         * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
3823         (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
3824         (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
3825         BIP_Collection and BIPcollection.
3826         (Build_Heap_Allocator): New routine used to allocate the return object
3827         of a build-in-place function onto a collection.
3828         (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
3829         (Expand_Call): Do not replace direct calls to Deep routines with their
3830         aliases.
3831         (Expand_N_Extended_Return_Statement): Give all variables shorter names
3832         and update their occurrences. Add a special return flag to monitor the
3833         [ab]normal execution of the function. The flag is set right before the
3834         return statement.
3835         Rewrite the mechanism used to allocate a build-in-place return object
3836         on the heap or on a storage pool.
3837         (Is_Direct_Deep_Call): New routine.
3838         (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
3839         build-in-place function call instead of a final list. Build a call to
3840         Set_Finalize_Address_Ptr to decorate the associated collection.
3841         (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
3842         order to name the build-in-place function call's result for later
3843         finalization. Add a collection to a build-in-place function call
3844         instead of a final list.
3845         (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
3846         build-in-place function call instead of a final list. Remove the code
3847         which moves one final list and transforms it into the actual in a
3848         nested build-in-place call.
3849         (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
3850         build-in-place function call instead of a final list.
3851         (Move_Final_List): Removed.
3852         (Needs_BIP_Collection): New routine.
3853         (Needs_BIP_Final_List): Removed.
3854         * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
3855         enumeration type BIP_Formal_Kind.
3856         Update the related comment.
3857         (Needs_BIP_Collection): New routine.
3858         (Needs_BIP_Final_List): Removed.
3859         * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
3860         and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
3861         majority of subprograms in this unit. Add Name_Finalize_Address to
3862         array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
3863         (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
3864         statements for an array type.
3865         (Build_Adjust_Statements): Create the adjust statements for a record
3866         type.
3867         (Build_Cleanup_Statements): New routine. A procedure which given any
3868         construct containing asynchronous calls, references to _master, or is a
3869         task body, a task allocation or a protected body produces the necessary
3870         runtime calls to clean up these constructs.
3871         (Build_Exception_Handler): New routine.
3872         (Build_Final_List): Removed.
3873         (Build_Finalization_Collection): New routine. A core procedure which
3874         creates a collection to service heap allocated controlled objects
3875         associated with an access-to-controlled type.
3876         (Build_Finalize_Statements): Create the finalization statements for a
3877         record types.
3878         (Build_Finalizer): New routine. A core procedure which given any
3879         construct with declarations and/or statements detects all objects which
3880         need any type of clean up (controlled objects, protected objects) and
3881         generates all necessary code to clean up the said objects in the proper
3882         order.
3883         (Build_Finalizer_Call): New routine.
3884         (Build_Initialize_Statements): Create the initialization statements for
3885         an array type. The generated routine contains code to finalize partially
3886         initialized arrays.
3887         (Build_Object_Declarations): New routine.
3888         (Build_Raise_Statement): New routine.
3889         (Clean_Simple_Protected_Objects): Removed.
3890         (Controller_Component): Removed.
3891         (Enclosing_Function): New routine.
3892         (Expand_Cleanup_Actions): Create a finalizer for a construct which has
3893         either declarations or statements or both.
3894         (Expand_N_Package_Body): Create a finalizer for a non-generic package.
3895         (Expand_N_Package_Declaration): Create a finalizer for a non-generic
3896         package.
3897         (Find_Final_List): Removed.
3898         (Global_Flist_Ref): Removed.
3899         (In_Finalization_Root): Removed.
3900         (Insert_Actions_In_Scope_Around): Determine the range of the transient
3901         scope in terms of tree nodes. Process all transient variables within
3902         that range.
3903         (Make_Adjust_Call): Rewritten. There is no longer an attach call
3904         generated after the adjust.
3905         (Make_Attach_Call): Removed.
3906         (Make_Call): New routine.
3907         (Make_Clean): Removed.
3908         (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
3909         build routines.
3910         (Make_Deep_Proc): Rewritten to generate the new profile signature used
3911         in Deep routines.
3912         (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
3913         build routines.
3914         (Make_Final_Call): Modified to simply create a call to either
3915         Deep_Finalize or Finalize.
3916         (Make_Finalize_Address_Body): New routine.
3917         (Make_Finalize_Address_Stmts): New routine. A function which produces
3918         TSS primitive Finalize_Address used in conjunction with heap allocated
3919         controlled objects.
3920         (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
3921         (Make_Init_Call): Rewritten. There is no longer an attach call
3922         generated after initialization.
3923         (Make_Local_Deep_Finalize): New routine.
3924         (Make_Set_Finalize_Address_Ptr_Call): New routine.
3925         (Make_Transient_Block): Remove the finalization list retrieval and
3926         manipulation.
3927         (Needs_Finalization): Moved to Exp_Util.
3928         (Parent_Field_Type): New routine.
3929         (Preprocess_Components): New routine.
3930         (Process_Transient_Objects): New routine.
3931         (Wrap_HSS_In_Block): New routine.
3932         (Wrap_Transient_Declaration): Remove finalization list management and
3933         controller insertion.
3934         (Wrap_Transient_Expression): Code reformatting.
3935         (Wrap_Transient_Statement): Code reformatting.
3936         * exp_ch7.ads (Build_Final_List): Removed.
3937         (Build_Finalization_Collection): New routine.
3938         (Build_Raise_Statement): New routine.
3939         (Controller_Component): Removed.
3940         (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
3941         (Find_Final_List): Removed.
3942         (In_Finalization_Root): Removed.
3943         (Is_Simple_Protected_Type): Update related comment.
3944         (Make_Adjust_Call): New parameter profile and associated comments.
3945         (Make_Attach_Call): Removed.
3946         (Make_Final_Call): New parameter profile and associated comments.
3947         (Make_Finalize_Address_Body): New routine.
3948         (Make_Init_Call): New parameter profile and associated comments.
3949         (Make_Local_Deep_Finalize): New routine.
3950         (Make_Set_Finalize_Address_Ptr_Call): New routine.
3951         (Needs_Finalization): Moved to Exp_Util.
3952         * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
3953         (Expand_N_Protected_Body): Remove the handling of finalization lists.
3954         (Find_Protection_Type): Moved to Exp_Util.
3955         * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
3956         (Make_DT): Update sequence of dispatch table initialization. Remove the
3957         initialization of field RC_Offset. Add initialization of field Needs_
3958         Finalization.
3959         * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
3960         Reimplement how an object is first finalized, then deallocated.
3961         * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
3962         Code reformatting.
3963         * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
3964         Register TSS_Finalize_Address with type TSS_Names.
3965         * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
3966         procedure provides the interface between an allocation / deallocation
3967         and the support machinery in Ada.Finalization.Heap_Management.
3968         (Find_Init_Call): Code reformatting.
3969         (Find_Init_Call_In_List): Code reformatting.
3970         (Find_Protection_Type): Moved from Exp_Ch9.
3971         (Find_Prim_Op): Reimplement to add preference of recovered primitive.
3972         (Has_Controlled_Coextensions): Removed.
3973         (Has_Controlled_Objects): New routine.
3974         (In_Library_Level_Package_Body): New routine.
3975         (Insert_Action_After): New routine.
3976         (Is_Finalizable_Transient): New routine. This predicate determines
3977         whether an object declaration is one of the many variants of controlled
3978         transients.
3979         (Is_Null_Access_BIP_Func_Call): New routine.
3980         (Is_Non_BIP_Func_Call): New routine.
3981         (Is_Related_To_Func_Return): New routine.
3982         (Needs_Finalization): Moved from Exp_Ch7.
3983         * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
3984         (Find_Protection_Type): Moved from Exp_Ch9.
3985         (Has_Controlled_Coextensions): Removed.
3986         (Has_Controlled_Objects): New routine.
3987         (In_Library_Level_Package_Body): New routine.
3988         (Insert_Action_After): New routine.
3989         (Is_Finalizable_Transient): New routine.
3990         (Is_Null_Access_BIP_Func_Call): New routine.
3991         (Is_Non_BIP_Func_Call): New routine.
3992         (Is_Related_To_Func_Return): New routine.
3993         (Needs_Finalization): Moved from Exp_ch7.
3994         * expander.adb (Expand): Add a case for N_Free_Statement.
3995         * freeze.adb (Freeze_All): Replace the generation of a finalization
3996         list with a collection for access-to-controlled types.
3997         (Freeze_Entity): Code reformatting.
3998         (Freeze_Record_Type): Remove the freezing of a record controller
3999         component.
4000         (Freeze_Subprogram): Code reformatting.
4001         * inline.adb (Cleanup_Scopes): Remove the reset of the scope
4002         finalization list.
4003         * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
4004         has a library-level finalizer.
4005         * lib-writ.ads: Add "PF" to the sequence of unit attributes.
4006         * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
4007         * Makefile.rtl: Remove a-filico and s-finimp from the list of object
4008         files. Add a-fihema to the list of object files.
4009         * par-ch4.adb:
4010         Alphabetize the associations in type Is_Parameterless_Attribute.
4011         * rtsfind.ads: Ada.Finalization_List.Controller and
4012         System.Finalization_Implementation are no longer a GNAT unit.
4013         Update the range of type Ada_Finalization_Child. Remove the following
4014         recoverable entities:
4015
4016            RE_Attach_To_Final_List
4017            RE_Deep_Tag_Attach
4018            RE_Finalize_List
4019            RE_Finalize_One
4020            RE_Finalizable_Ptr_Ptr
4021            RE_Global_Final_List
4022            RE_Limited_Record_Controller
4023            RE_List_Controller
4024            RE_Move_Final_List
4025            RE_Record_Controller
4026            RE_Simple_List_Controller
4027
4028         Add the following recoverable entities:
4029
4030            RE_Add_Offset_To_Address
4031            RE_Allocate
4032            RE_Base_Pool
4033            RE_Deallocate
4034            RE_Exception_Identity
4035            RE_Finalization_Collection
4036            RE_Finalization_Collection_Ptr
4037            RE_Needs_Finalization
4038            RE_Save_Library_Occurrence
4039            RE_Set_Finalize_Address_Ptr
4040            RE_Set_Storage_Pool_Ptr
4041            RE_Storage_Count
4042         * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
4043         Name_uController.
4044         * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
4045         (First_Stored_Discriminant): Remove the mention of Name_uController.
4046         * sem_aux.ads: Comment reformatting.
4047         * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
4048         to redecorate an already existing class-wide type.
4049         (Decorate_Tagged_Type): New parameter profile and associated comment.
4050         Create a "shadow class-wide type" for a shadow entity.
4051         * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
4052         of the final chain along with the associated comment.
4053         * sem_ch3.adb (Access_Type_Declaration): Add new local variable
4054         Full_Desig and set it to the full view of the designated type.
4055         Initialize the finalization collection to empty.
4056         (Build_Derived_Record_Type): Alphabetize local variables. Code
4057         reformatting.
4058         (Collect_Fixed_Components): Remove the mention of Name_uController.
4059         (Create_Constrained_Components): Remove the mention of Name_uController.
4060         (Make_Class_Wide_Type): Add specialized code to redecorate an existing
4061         class-wide type of a shadow entity.
4062         (Process_Full_View): Update the machinery which marks type
4063         Limited_Controlled's entity as limited.
4064         * sem_ch4.adb (Analyze_One_Call): Code reformatting.
4065         * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
4066         list, instead make a collection build-in-place formal.
4067         * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
4068         a designated type in order to establish a match between the renaming
4069         and the renamed entity.
4070         (Find_Selected_Component): Add guard to prevent spurious exceptions
4071         from being raised on .NET/JVM.
4072         * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
4073         to the list of primitive that need special processing. Update arrays
4074         C_Names and D_Names.
4075         (Replace_Types): Handle class-wide types.
4076         * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
4077         different parameter profile, look at the first formal.
4078         * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
4079         use clauses for Exp_Util.
4080         * sem_res.adb: Remove with and use clauses for Elists.
4081         (Propagate_Coextensions): Removed.
4082         (Resolve_Allocator): Do not propagate the list of coextensions from one
4083         allocator to another.
4084         * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
4085         Deaccessed_T to Desig_Typ.
4086         (Enter_Name): Remove the mention of Name_uController.
4087         (Gather_Components): Remove the mention of Name_uController.
4088         (Incomplete_Or_Private_View): New routine.
4089         (Is_Coextension_Root): Removed.
4090         (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
4091         * sem_util.ads (Incomplete_Or_Private_View): New routine.
4092         (Is_Coextension_Root): Removed.
4093         * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
4094         Controlled types are now derived from a null tagged record. Remove
4095         types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
4096         * sinfo.adb (Coextensions): Removed.
4097         (Set_Coextensions): Removed.
4098         * sinfo.ads: Remove Coextensions from the explanation of node fields
4099         and its uses in nodes.
4100         Update the field usage of N_Allocator.
4101         (Coextensions): Removed along with its pragma Inline.
4102         (Set_Coextensions): Removed along with its pragma Inline.
4103         * snames.ads-tmpl: Remove names
4104
4105           Name_uClean
4106           Name_uController
4107           Name_uFinal_List
4108           Name_uLocal_Final_List
4109           Name_Finalization_Root
4110           Name_Next
4111           Name_Prev
4112
4113         Add names
4114
4115           Name_uFinalizer
4116           Name_Finalize_Address
4117         * s-pooglo.adb (Allocate): Add overriding indicator.
4118         (Deallocate): Add overriding indicator.
4119         (Storage_Size): Add overriding indicator.
4120         * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
4121         than Finalize_Global_List.
4122         (Null_Finalize_Global_List): Removed.
4123         (Save_Library_Occurrence): New routine.
4124         * s-soflin.ads: Remove variable Finalize_Global_List along with its
4125         initialization. Add variable Finalize_Library_Objects along with its
4126         pragma Export. Add variables Library_Exception and
4127         Library_Exception_Set along with their pragma Export.
4128         (Null_Finalize_Global_List): Removed.
4129         (Save_Library_Occurrence): New routine.
4130         * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
4131         rather than Finalize_Global_List.
4132         * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
4133         of the constructed node.
4134
4135 2011-08-03  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4136
4137         * link.c: Include "auto-host.h" before system headers.
4138
4139 2011-08-03  Vincent Celier  <celier@adacore.com>
4140
4141         * make.adb (Gnatmake): Add to table Library_Projs only library projects
4142         that are not extended. Do not check if a library project that is
4143         extended should be regenerated. Do not add to table Library_Paths the
4144         libraries that are in extended projects. Link only with libraries that
4145         are in libray projects that are not extended.
4146         * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
4147         for a library project that is extended.
4148
4149 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
4150
4151         * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
4152         conforming subprogram renamings that appear to be completions if they
4153         are not fully conformant.
4154         Such renamings are homographs but not completions.
4155         * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
4156         names in a subprogram renaming that appears in an instance.
4157
4158 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4159
4160         * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
4161         not immutably limited, build actual subtype from expression to provide
4162         proper bounds to caller.
4163
4164 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
4165
4166         * sem_ch8.adb: Minor comment correction.
4167
4168 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4169
4170         * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
4171         returning a limited array, use an extended return statement.
4172
4173 2011-08-03  Vincent Celier  <celier@adacore.com>
4174
4175         * make.adb (Initialize): If --subdirs= is used, but no project file is
4176         specified, attempt to create the specify subdir if it does not already
4177         exist and use it as the object directory as if -D had been specified.
4178
4179 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
4180
4181         * s-tpopsp-vms.adb: New file.
4182         * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
4183         * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
4184
4185 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4186
4187         * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
4188         package.
4189
4190 2011-08-03  Yannick Moy  <moy@adacore.com>
4191
4192         * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
4193         * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
4194         * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
4195         detect that an array has static bounds.
4196
4197 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4198
4199         * exp_dist.adb: Minor reformatting.
4200
4201 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
4202
4203         * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
4204         (ATCB_Key): Removed, not always used.
4205
4206 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4207
4208         * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
4209         clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
4210         most remaining global variables.
4211
4212 2011-08-03  Robert Dewar  <dewar@adacore.com>
4213
4214         * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
4215         prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
4216         reformatting.
4217
4218 2011-08-03  Javier Miranda  <miranda@adacore.com>
4219
4220         * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
4221         that must be passed by copy in VM targets.
4222
4223 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4224
4225         * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
4226         duplicates a similar htable now in the project tree.
4227
4228 2011-08-03  Claire Dross  <dross@adacore.com>
4229
4230         * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
4231         a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
4232         Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
4233         Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
4234         Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
4235         Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
4236         Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
4237         update.
4238
4239 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
4240
4241         * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
4242         (ATCB_Key): Removed, not always used.
4243         * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
4244         s-taprop-posix.adb.
4245         * s-tpopsp-tls.adb: New file.
4246         * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
4247         x86/x64/ia64/powerpc/sparc Linux.
4248
4249 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
4250
4251         * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
4252         * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
4253
4254 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4255
4256         * rtsfind.ads, exp_dist.adb, exp_dist.ads
4257         (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
4258         Fix type selection for mapping integer types to PolyORB types.
4259
4260 2011-08-03  Bob Duff  <duff@adacore.com>
4261
4262         * sem_ch7.adb: Minor comment clarification.
4263
4264 2011-08-03  Bob Duff  <duff@adacore.com>
4265
4266         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
4267         an error analyzing a choice, skip further processing. Further
4268         processing could cause a crash or cascade errors.
4269
4270 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4271
4272         * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
4273         prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
4274         prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
4275         prj-env.ads (Shared_Project_Tree_Data): new type
4276         An aggregate project and its aggregated trees need to share the common
4277         data structures used for lists of strings, packages,... This makes the
4278         code simpler since otherwise we have to pass the root tree (also used
4279         for the configuration file data) in addition to the current project
4280         tree. This also avoids ambiguities as to which tree should be used.
4281         And finally this saves a bit of memory.
4282         (For_Every_Project_Imported): new parameter Tree.
4283         Since aggregated projects are using a different tree, we need to let
4284         the caller know which tree to use to manipulate the returned project.
4285
4286 2011-08-03  Robert Dewar  <dewar@adacore.com>
4287
4288         * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
4289         prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
4290         lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
4291         prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
4292
4293 2011-08-03  Javier Miranda  <miranda@adacore.com>
4294
4295         * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
4296         Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
4297
4298 2011-08-03  Bob Duff  <duff@adacore.com>
4299
4300         * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
4301         the Base_Type.
4302
4303 2011-08-03  Joel Brobecker  <brobecker@adacore.com brobecker>
4304
4305         * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
4306         g-sehash.ads: Fix typo. Update header.
4307
4308 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4309
4310         * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
4311         expansion.
4312
4313 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
4314
4315         * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
4316         prefixes of private types along with records, since the selector may be
4317         a discriminant.
4318         * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
4319         private types along with records, since the selector may be a
4320         discriminant.
4321
4322 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4323
4324         * prj-pp.adb (Pretty_Print): Remove trailing blank line.
4325
4326 2011-08-03  Javier Miranda  <miranda@adacore.com>
4327
4328         * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
4329         Tagged_Type_Expansion.
4330
4331 2011-08-03  Yannick Moy  <moy@adacore.com>
4332
4333         * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
4334         violation when the argument of concatenation is the name of a
4335         constant.
4336
4337 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4338
4339         * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
4340         prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
4341         (Process_Declarative_Items): new parameter Child_Env.
4342
4343 2011-08-03  Yannick Moy  <moy@adacore.com>
4344
4345         * alfa.ads: Update format of ALFA section in ALI file in order to
4346         add a mapping from bodies to specs when both are present.
4347         (ALFA_Scope_Record): Add components for spec file/scope.
4348         * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
4349         present.
4350         * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
4351         collected, fill in the spec information when relevant.
4352         * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
4353         present.
4354
4355 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
4356
4357         * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
4358         code unit to decide whether to add internally generated subprograms.
4359
4360 2011-08-03  Javier Miranda  <miranda@adacore.com>
4361
4362         * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
4363         * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
4364         be handled by copy in VM targets.
4365
4366 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4367
4368         * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
4369         code with Makeutl.Get_Switches.
4370         * prj-tree.adb: Update comment.
4371
4372 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4373
4374         * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
4375         subprogram with a limited formal that does not support external
4376         streaming.
4377
4378 2011-08-03  Yannick Moy  <moy@adacore.com>
4379
4380         * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
4381         continuation line
4382         * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
4383         not from current unit in two phases, because it is not possible to
4384         change the table while iterating over its content.
4385         * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
4386
4387 2011-08-03  Sergey Rybin  <rybin@adacore.com>
4388
4389         * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
4390         * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
4391
4392 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4393
4394         * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
4395         and the component type is composite, this is ambiguous for predefined
4396         concatenation, but if the node is not overloaded and the entity is a use
4397         -defined function its profile can be used to resolve that aggregate.
4398
4399 2011-08-03  Robert Dewar  <dewar@adacore.com>
4400
4401         * exp_ch4.adb: Minor code cleanup.
4402
4403 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4404
4405         * exp_dist.adb: Do not generate distribution stubs if serious errors
4406         have been diagnosed.
4407
4408 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4409
4410         * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
4411         the first formal of a primitive operation, go to the base type to
4412         handle properly an access to a derived type with constrained
4413         discriminants.
4414         * sem_type.adb (Disambiguate): an immediately visible operator hides a
4415         user-defined function that is only use-visible.
4416
4417 2011-08-03  Robert Dewar  <dewar@adacore.com>
4418
4419         * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
4420         make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
4421         fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
4422         prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
4423         sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
4424         prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
4425         prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
4426         alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
4427
4428 2011-08-03  Robert Dewar  <dewar@adacore.com>
4429
4430         * repinfo.adb (List_Mechanism): Add handling of
4431         Convention_Ada_Pass_By_XXX.
4432         * sem_mech.adb (Set_Mechanism): Ditto.
4433         * sem_prag.adb (Process_Convention): Add entries for
4434         Convention_Ada_Pass_By_XXX.
4435         * snames.adb-tmpl, snames.ads-tmpl: Ditto.
4436
4437 2011-08-03  Pascal Obry  <obry@adacore.com>
4438
4439         * makeutl.adb: Minor reformatting.
4440
4441 2011-08-03  Vincent Celier  <celier@adacore.com>
4442
4443         * fname-uf.adb
4444         (Get_File_Name) If the file cannot be found when there are no config
4445         pragmas file and May_Fail is True, return No_File instead of the file
4446         name, to be consistent.
4447
4448 2011-08-03  Pascal Obry  <obry@adacore.com>
4449
4450         * adaint.c (__gnat_is_executable_file_attr): Avoid access
4451         to null pointer.
4452
4453 2011-08-03  Javier Miranda  <miranda@adacore.com>
4454
4455         * sem_ch13.adb
4456         (Same_Representation): In VM targets the representation of arrays with
4457         aliased components differs from arrays with non-aliased components.
4458
4459 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4460
4461         * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
4462         not systematically lower case attribute indexes that contain no "."
4463         Fix definition of several Naming attributes, which take
4464         a unit name as index and therefore should be case insensitive.
4465         Minor refactoring (reduce length of variable names).
4466
4467 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4468
4469         * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
4470
4471 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4472
4473         * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
4474         prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
4475         prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
4476         prj-tree.ads (Prj.Tree.Environment): new type.
4477
4478 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4479
4480         * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
4481         prj-tree.adb, prj-tree.ads (Environment): new type.
4482
4483 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4484
4485         * prj-tree.ads: Remove unused variable.
4486
4487 2011-08-03  Yannick Moy  <moy@adacore.com>
4488
4489         * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
4490         issuing messages related to SPARK restriction violation.
4491
4492 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4493
4494         * sem_ch6.adb: guard against error nodes in return statements.
4495
4496 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
4497
4498         * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
4499         a warning can only appear on a configuration file, so emit warning
4500         without further checks.
4501
4502 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
4503
4504         * s-interr.ads: add overriding keyword.
4505
4506 2011-08-03  Geert Bosch  <bosch@adacore.com>
4507
4508         * exp_attr.adb: Fix minor typo.
4509
4510 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4511
4512         * par-ch4.adb: improve error recovery.
4513
4514 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4515
4516         * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
4517         prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
4518         to Errout_Handling.
4519
4520 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4521
4522         * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
4523         "external" as an attribute name in aggregate projects.
4524
4525 2011-08-03  Jose Ruiz  <ruiz@adacore.com>
4526
4527         * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
4528         uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
4529         from 0, so we need to adjust.
4530
4531 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4532
4533         * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
4534         prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
4535
4536 2011-08-03  Yannick Moy  <moy@adacore.com>
4537
4538         * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
4539         restriction on overloaded entity if the entity is not an operator.
4540
4541 2011-08-03  Yannick Moy  <moy@adacore.com>
4542
4543         * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
4544         restrict.ads: Rename remaining Check_Formal_Restriction* into
4545         Check_SPARK_Restriction*.
4546
4547 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4548
4549         * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
4550         prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
4551         qualifier.
4552         (Project_Empty): removed
4553         (Empty_Project): new parameter Qualifier
4554         This is used to have fields specific to aggregate projects, cleaner
4555         New field to store the list of aggregated projects.
4556         (Check_Aggregate_Project): removed
4557         (Process_Aggregated_Projects, Free): new subprograms.
4558
4559 2011-08-03  Olivier Hainque  <hainque@adacore.com>
4560
4561         * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
4562
4563 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4564
4565         * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
4566         explicit dereference of an unconstrained type, create a constrained
4567         subtype for it, as is done for function calls that return an
4568         unconstrained type.
4569
4570 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4571
4572         * g-pehage.adb (Finalize): Avoid possible double-free.
4573
4574 2011-08-03  Steve Baird  <baird@adacore.com>
4575
4576         * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
4577         Elab_Spec/Body attrs in CodePeer_Mode.
4578
4579 2011-08-03  Javier Miranda  <miranda@adacore.com>
4580
4581         * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
4582         low bound is not known at compile time but they have no others choice.
4583         Done because in this case the bounds can be obtained directly from the
4584         aggregate.
4585
4586 2011-08-03  Ed Falis  <falis@adacore.com>
4587
4588         * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
4589         on VxWorks SMP. Remove unusable constant ANY_CPU.
4590
4591 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4592
4593         * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
4594         clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
4595         prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
4596         Prj.Env.Initialize_Empty): new subprograms
4597         (Get_Env, Find_Project): remove parameter Target_Name.
4598
4599 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
4600
4601         * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
4602         as a condition for the delayed call to Derived_Subprograms done for the
4603         case of the rewriting of a derived type that constrains the
4604         discriminants of its parent type.
4605         Avoids redundant subprogram derivations for private subtype derivations.
4606
4607 2011-08-03  Javier Miranda  <miranda@adacore.com>
4608
4609         * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
4610         Build_Record_Aggr_Code.
4611         (Build_Record_Aggr_Code): Add missing support to initialize hidden
4612         discriminants in extension aggregates.
4613
4614 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4615
4616         * prj-pp.adb (Print): also output project qualifiers, since in
4617         particular "aggregate" is mandatory in an aggregate project.
4618
4619 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4620
4621         * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
4622         (Debug_Output): new function.
4623
4624 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
4625
4626         * gnat_ugn.texi: Document -Wstack-usage.
4627         * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
4628
4629 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4630
4631         * sem_prag.adb Issue an error (not a warning) when a C++ type does not
4632         have keyword LIMITED.
4633
4634 2011-08-03  Yannick Moy  <moy@adacore.com>
4635
4636         * alfa.adb, alfa.ads, alfa_test.adb: New files.
4637         * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
4638         (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
4639         section (does not happen in compiler, only if code directly calls
4640         Scan_ALI).
4641         * get_alfa.adb, get_alfa.ads: New files.
4642         * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
4643         needed.
4644         * lib-xref-alfa.adb: New file.
4645         * lib-xref.adb, lib-xref.ads
4646         (Xref_Entry): redefine information needed in cross-references for ALFA.
4647         Push ALFA treatments in separated local package.
4648         (Enclosing_Subpragram_Or_Package): treat specially subprogram
4649         identifiers. Return entity of package body instead of spec. Return
4650         Empty for a scope with no location.
4651         (Generate_Reference): adapt to new components for ALFA information.
4652         Remove the need for D references on definitions.
4653         (Is_Local_Reference): moved to ALFA local package
4654         (Output_References): extract subfunction as Extract_Source_Name
4655         (Output_Local_References): remove procedure, replaced by filtering of
4656         cross-references in package ALFA and printing in Put_ALFA.
4657         (Write_Entity_Name): remove procedure
4658         * lib.adb, lib.ads (Extract_Source_Name): extract here function to
4659         print exact name of entity as it appears in source file
4660         (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
4661         * put_alfa.adb, put_alfa.ads: New files.
4662         * xref_lib.adb (Search_Xref): protect read of cross-references against
4663         reading other sections of the ALI file, in gnatxref
4664         (Search): protect read of cross-references against reading other
4665         sections of the ALI file, in gnatfind.
4666         * gcc-interface/Make-lang.in: Update dependencies.
4667
4668 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4669
4670         * sem_ch3.adb: Minor reformatting.
4671
4672 2011-08-03  Jose Ruiz  <ruiz@adacore.com>
4673
4674         * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
4675         raising an exception.
4676
4677 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4678
4679         * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
4680         type, always use 1 as the lower bound or string, even if lower bound of
4681         context is not static, to handle properly null strings in a non-static
4682         context.
4683
4684 2011-08-03  Bob Duff  <duff@adacore.com>
4685
4686         * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
4687         always legal on the right-hand side of an assignment statement; there
4688         is always an applicable index constraint in this case. Therefore, the
4689         check for Pkind = N_Assignment_Statement is now unconditional -- it
4690         doesn't depend on whether Is_Constrained (Typ).
4691
4692 2011-08-03  Robert Dewar  <dewar@adacore.com>
4693
4694         * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
4695
4696 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4697
4698         * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
4699         for an itype created within a generic unit.
4700
4701 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
4702
4703         * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
4704         suppresses all inlining.
4705
4706 2011-08-03  Robert Dewar  <dewar@adacore.com>
4707
4708         * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
4709         exp_aggr.adb: Minor reformatting.
4710
4711 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4712
4713         * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
4714         tagged assignment when discriminant checks are suppressed. This is
4715         useless and extremely costly in terms of static stack usage.
4716
4717 2011-08-03  Bob Duff  <duff@adacore.com>
4718
4719         * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
4720         of generics, because this leads to the wrong entity in the wrong scope,
4721         causing (e.g.) pragma Export_Procedure to get an error if the entity is
4722         an instance.
4723         (Process_Interface_Name): Follow Alias for instances of generics, to
4724         correct for the above change.
4725
4726 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4727
4728         * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
4729         is an integer literal it is always safe to replace the reference. In
4730         addition, if the reference appears in the generated code for an object
4731         declaration it is necessary to copy because otherwise the reference
4732         might be to the uninitilized value of the discriminant of the object
4733         itself.
4734
4735 2011-08-03  Pascal Obry  <obry@adacore.com>
4736
4737         * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
4738         ACL used, in this case we want to check for ending .exe, not .exe
4739         anywhere in the path.
4740
4741 2011-08-03  Sergey Rybin  <rybin@adacore.com>
4742
4743         * tree_io.ads (ASIS_Version_Number): Update because of the changes in
4744         the tree structure (semantic decoration of references to record
4745         discriminants).
4746
4747 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
4748
4749         * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
4750         choices of a named array aggregate, bail out when any choices are
4751         marked as Errors_Posted.
4752
4753 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4754
4755         * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
4756         in which entity is frozen, to handle properly loop variables in
4757         iterators.
4758
4759 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4760
4761         * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
4762         subtype is not static, compute the upper bound using attributes, to
4763         handle properly index types that are not integer types.
4764
4765 2011-08-03  Bob Duff  <duff@adacore.com>
4766
4767         * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
4768         Update copyright notice.
4769
4770 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4771
4772         * sem_ch3.adb (Build_Discriminant_Constraints): Only use
4773         Original_Discriminant if within an instance.
4774         * sem_ch4.adb (Analyze_Selected_Component): Ditto.
4775
4776 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4777
4778         * einfo.ads: Minor reformatting.
4779
4780 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4781
4782         * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
4783         composite type with an unfrozen subcomponent, in the profile of a
4784         primitive operation.
4785
4786 2011-08-03  Robert Dewar  <dewar@adacore.com>
4787
4788         * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
4789
4790 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4791
4792         * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
4793         unconstrained type with discriminants is initialized with an aggregate,
4794         use the constrained subtype of the aggregate as the type of the object,
4795         because it is immutable, and this allows the back-end to generate no
4796         code for the object declaration.
4797
4798 2011-08-03  Robert Dewar  <dewar@adacore.com>
4799
4800         * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
4801         comparison operand is variable, and turns out to be zero or negative.
4802
4803 2011-08-03  Javier Miranda  <miranda@adacore.com>
4804
4805         * exp_intr.adb
4806         (Expand_Dispatching_Constructor_Call): Disable expansion of
4807         code required for native targets. Done to avoid generating
4808         references to unavailable runtime entities in VM targets.
4809         * exp_ch3.adb
4810         (Expand_N_Object_Declaration): Add missing support to handle
4811         the explicit initialization of class-wide interface objects.
4812         Fix documentation.
4813
4814 2011-08-03  Matthew Heaney  <heaney@adacore.com>
4815
4816         * a-cobove.adb (Merge): Move source onto target, instead of using Assign
4817
4818 2011-08-03  Matthew Heaney  <heaney@adacore.com>
4819
4820         * a-cbdlli.adb (Splice): move source items from first to last
4821
4822 2011-08-03  Yannick Moy  <moy@adacore.com>
4823
4824         * sem_util.ads: comment added.
4825
4826 2011-08-03  Javier Miranda  <miranda@adacore.com>
4827
4828         * exp_aggr.adb
4829         (Expand_Record_Aggregate): In VM targets disable the expansion into
4830         assignments of aggregates whose type is not known at compile time.
4831
4832 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4833
4834         * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
4835         protected entries and task entries, to build the proper renaming
4836         declaration for entry formals, used in debugging.
4837         * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
4838         parameters in the same way.
4839
4840 2011-08-02  Robert Dewar  <dewar@adacore.com>
4841
4842         * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
4843         sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
4844         code reorganization.
4845
4846 2011-08-02  Robert Dewar  <dewar@adacore.com>
4847
4848         * debug.adb: Debug flag d.P to suppress length comparison optimization
4849         * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
4850         comparison of Length by comparing First/Last instead.
4851
4852 2011-08-02  Matthew Heaney  <heaney@adacore.com>
4853
4854         * a-cobove.ads: Code clean up.
4855
4856 2011-08-02  Vincent Celier  <celier@adacore.com>
4857
4858         * adaint.c (file_names_case_sensitive_cache): New static int.
4859         (__gnat_get_file_names_case_sensitive): Cache the return value in
4860         file_names_case_sensitive_cache at the first invocation, to avoid
4861         multiple calls to getenv.
4862
4863 2011-08-02  Bob Duff  <duff@adacore.com>
4864
4865         * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
4866
4867 2011-08-02  Yannick Moy  <moy@adacore.com>
4868
4869         * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
4870         sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
4871         sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
4872         indicate that we are in a precondition or postcondition. This is used in
4873         Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
4874         decide whether to flag the spec or body of the current subprogram as
4875         not in ALFA.
4876
4877 2011-08-02  Fabien Chouteau  <chouteau@adacore.com>
4878
4879         * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
4880         list.
4881         * a-extiin.ads: New file.
4882
4883 2011-08-02  Bob Duff  <duff@adacore.com>
4884
4885         * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
4886         now raises Name_Error instead of Use_Error in certain cases. The other
4887         parts of this AI were already implemented properly.
4888
4889 2011-08-02  Vincent Celier  <celier@adacore.com>
4890
4891         * link.c: Only import "auto-host.h" when building the gnattools.
4892
4893 2011-08-02  Yannick Moy  <moy@adacore.com>
4894
4895         * sem_util.adb: Inter-unit inlining does not work for a subprogram
4896         which calls a local subprogram, so extract subprogram
4897         from Mark_Non_ALFA_Subprogram_Body.
4898
4899 2011-08-02  Javier Miranda  <miranda@adacore.com>
4900
4901         * exp_ch9.adb
4902         (Extract_Dispatching_Call): If the type of the dispatching object is an
4903         access type then return an explicit dereference in the Object out-mode
4904         parameter.
4905
4906 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
4907
4908         * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
4909         compatibility checks for all indexes of an array subtype, not just the
4910         first. Reset Has_Dynamic_Range_Check on the subtype before each
4911         potential check to ensure that Insert_Range_Checks will not elide any
4912         of the dynamic checks.
4913
4914 2011-08-02  Yannick Moy  <moy@adacore.com>
4915
4916         * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
4917         SPARK restriction at parsing time.
4918         * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
4919         directive only if the SPARK restriction is set for this unit.
4920
4921 2011-08-02  Yannick Moy  <moy@adacore.com>
4922
4923         * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
4924         sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
4925         sem_ch11.adb: Protect call to Current_Subprogram which might be costly
4926         when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
4927         Mark_Non_ALFA_Subprogram_Body.
4928         Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
4929         inlined.
4930
4931 2011-08-02  Yannick Moy  <moy@adacore.com>
4932
4933         * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
4934         might be costly.
4935
4936 2011-08-02  Robert Dewar  <dewar@adacore.com>
4937
4938         * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
4939         exp_ch3.adb: Minor reformatting.
4940
4941 2011-08-02  Emmanuel Briot  <briot@adacore.com>
4942
4943         * adaint.c (__gnat_locate_exec_on_path): only returns executable
4944         files, not any regular file.
4945         (__gnat_locate_file_with_predicate): new subprogram.
4946
4947 2011-08-02  Yannick Moy  <moy@adacore.com>
4948
4949         * sinfo.adb, sinfo.ads: Restrict the use of flags
4950         Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
4951         nodes, plus N_Subtype_Declaration for the 2nd one.
4952
4953 2011-08-02  Sergey Rybin  <rybin@adacore.com>
4954
4955         * gnat_rm.texi: Ramification of pragma Eliminate documentation
4956          - fix bugs in the description of Source_Trace;
4957          - get rid of UNIT_NAME;
4958
4959 2011-08-02  Javier Miranda  <miranda@adacore.com>
4960
4961         * exp_ch9.adb
4962         (Build_Dispatching_Requeue): Adding support for VM targets
4963         since we cannot directly reference the Tag entity.
4964         * exp_sel.adb (Build_K): Adding support for VM targets.
4965         (Build_S_Assignment): Adding support for VM targets.
4966         * exp_disp.adb
4967         (Default_Prim_Op_Position): In VM targets do not restrict availability
4968         of predefined interface primitives to compiling in Ada 2005 mode.
4969         (Is_Predefined_Interface_Primitive): In VM targets this service is not
4970         restricted to compiling in Ada 2005 mode.
4971         (Make_VM_TSD): Generate code that declares and initializes the OSD
4972         record. Needed to support dispatching calls through synchronized
4973         interfaces.
4974         * exp_ch3.adb
4975         (Make_Predefined_Primitive_Specs): Enable generation of predefined
4976         primitives associated with synchronized interfaces.
4977         (Make_Predefined_Primitive_Bodies): Enable generation of predefined
4978         primitives associated with synchronized interfaces.
4979
4980 2011-08-02  Yannick Moy  <moy@adacore.com>
4981
4982         * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
4983         statements hidden in SPARK if preceded by the HIDE directive
4984         (Parse_Exception_Handlers): mark each exception handler in a sequence of
4985         exception handlers as hidden in SPARK if preceded by the HIDE directive
4986         * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
4987         if starting with the HIDE directive
4988         * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
4989         starting with the HIDE directive; mark the declarations in a private
4990         part as hidden in SPARK if the private part starts with the HIDE
4991         directive
4992         * restrict.adb, restrict.ads
4993         (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
4994         (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
4995         argument node belongs to a part which is hidden in SPARK
4996         (Check_SPARK_Restriction): do not issue violations on nodes in hidden
4997         parts in SPARK; protect the possibly costly call to
4998         Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
4999         * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
5000         * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
5001         Accumulate_Token_Checksum_GNAT_5_03): add case for new token
5002         Tok_SPARK_Hide.
5003         (Scan): recognize special comment starting with '#' and followed by
5004         SPARK keyword "hide" as a HIDE directive.
5005
5006 2011-08-02  Yannick Moy  <moy@adacore.com>
5007
5008         * types.ads, erroutc.ads: Minor reformatting.
5009
5010 2011-08-02  Vincent Celier  <celier@adacore.com>
5011
5012         * link.c: Add response file support for cross platforms.
5013
5014 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5015
5016         * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
5017         in an association, set parent field of copy before partial analysis.
5018         * sem_res.adb (Resolve_Slice): create reference to itype only when
5019         expansion is enabled.
5020
5021 2011-08-02  Yannick Moy  <moy@adacore.com>
5022
5023         * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
5024         for new flag denoting which subprogram bodies are in ALFA
5025         * restrict.adb, sem_ch7.adb: Update comment
5026         * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
5027         sem_ch9.adb, sem_res.adb: Add calls to
5028         Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
5029         * sem_ch6.adb (Analyze_Function_Return): add calls to
5030         Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
5031         middle of the body, and extended return.
5032         (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
5033         False when missing return.
5034         (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
5035         to True for subprograms whose spec is in ALFA. Remove later on the flag
5036         on the entity used for a subprogram body when there exists a separate
5037         declaration.
5038         * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
5039         if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
5040         False, otherwise do nothing.
5041
5042 2011-08-02  Robert Dewar  <dewar@adacore.com>
5043
5044         * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
5045
5046 2011-08-02  Yannick Moy  <moy@adacore.com>
5047
5048         * sem_ch4.ads: minor formatting.
5049
5050 2011-08-02  Yannick Moy  <moy@adacore.com>
5051
5052         * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
5053         debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
5054         errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
5055         restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
5056         opt.ads: cleanup of SPARK mode
5057
5058 2011-08-02  Yannick Moy  <moy@adacore.com>
5059
5060         * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
5061         types.
5062         * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
5063         (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
5064         * sem_ch3.adb
5065         (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
5066         (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
5067         (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
5068         (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
5069         types.
5070         (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
5071         non-static range.
5072         * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
5073         functions whose return type is not in ALFA.
5074         (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
5075         specifications.
5076         (Process_Formals): unset Is_In_ALFA flag for subprograms if a
5077         parameter's type is not in ALFA.
5078         * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
5079         types are in ALFA.
5080
5081 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5082
5083         * sem_ch6 (Analyze_Expression_Function): treat the function as
5084         Inline_Always, and introduce a subprogram declaration for it when it is
5085         not a completion.
5086         * inline.adb (Add_Inlined_Body): recognize bodies that come from
5087         expression functions, so that the back-end can determine whether they
5088         can in fact be inlined.
5089         * sem_util.adb (Is_Expression_Function): predicate to determine whether
5090         a function body comes from an expression function.
5091
5092 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
5093
5094         * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
5095         null exclusions to test Can_Never_Be_Null on the anonymous access types
5096         of the formals rather than testing the formals themselves. Exclude this
5097         check in cases where the Old_Formal is marked as a controlling formal,
5098         to avoid issuing spurious errors for bodies completing dispatching
5099         operations (due to the flag not getting set on controlling access
5100         formals in body specs).
5101         (Find_Corresponding_Spec): When checking full and subtype conformance of
5102         subprogram bodies in instances, pass Designated and E in that order, for
5103         consistency with the expected order of the formals (New_Id followed by
5104         Old_Id).
5105
5106 2011-08-02  Robert Dewar  <dewar@adacore.com>
5107
5108         * sem_ch8.adb: Minor reformatting.
5109
5110 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5111
5112         * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
5113         Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
5114         primitive operations of class-wide actuals.
5115
5116 2011-08-02  Javier Miranda  <miranda@adacore.com>
5117
5118         * exp_atag.ads, exp_atag.adb
5119         (Build_Common_Dispatching_Select_Statements): Remove argument Loc
5120         since its value is implicitly passed in argument Typ.
5121         * exp_disp.adb (Make_Disp_Conditional_Select_Body,
5122         Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
5123         Build_Common_Dispatching_Select_Statements.
5124
5125 2011-08-02  Robert Dewar  <dewar@adacore.com>
5126
5127         * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
5128         exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
5129         Minor reformatting.
5130
5131 2011-08-02  Robert Dewar  <dewar@adacore.com>
5132
5133         * sem_res.adb: Minor reformatting.
5134         * sem_prag.adb: Minor reformatting.
5135
5136 2011-08-02  Javier Miranda  <miranda@adacore.com>
5137
5138         * exp_atag.adb, exp_atags.ads
5139         (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
5140         by the tagged type Entity. Required to use this routine in the VM
5141         targets since we do not have available the Tag entity in the VM
5142         platforms.
5143         * exp_ch6.adb
5144         (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
5145         Ada.Tags has not been previously loaded.
5146         * exp_ch7.adb
5147         (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
5148         Build_VM_TSDs if package Ada.Tags has not been previously loaded.
5149         * sem_aux.adb
5150         (Enclosing_Dynamic_Scope): Add missing support to handle the full
5151         view of enclosing scopes. Required to handle enclosing scopes that
5152         are synchronized types whose full view is a task type.
5153         * exp_disp.adb
5154         (Build_VM_TSDs): Minor code improvement to avoid generating and
5155         analyzing lists with empty nodes.
5156         (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
5157         (Make_Disp_Conditional_Select_Body): Add support for VM targets.
5158         (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
5159         (Make_Disp_Timed_Select_Body): Add support for VM targets.
5160         (Make_Select_Specific_Data_Table): Add support for VM targets.
5161         (Make_VM_TSD): Generate code to initialize the SSD structure of
5162         the TSD.
5163
5164 2011-08-02  Yannick Moy  <moy@adacore.com>
5165
5166         * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
5167         cross-references section in ALI.
5168         * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
5169         (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
5170         Sub).
5171         (Enclosing_Subprogram_Or_Package): new function to return the enclosing
5172         subprogram or package entity of a node
5173         (Is_Local_Reference_Type): new function returns True for references
5174         selected in local cross-references.
5175         (Lt): function extracted from Lt in Output_References
5176         (Write_Entity_Name): function extracted from Output_References
5177         (Generate_Definition): generate reference with type 'D' for definition
5178         of objects (object declaration and parameter specification), with
5179         appropriate locations and units, for use in local cross-references.
5180         (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
5181         references of type 'I' for initialization in object definition.
5182         (Output_References): move part of function Lt and procedure
5183         Write_Entity_Name outside of the body. Ignore references of types 'D'
5184         and 'I' introduced for local cross-references.
5185         (Output_Local_References): new procedure to output the local
5186         cross-references sections.
5187         (Lref_Entity_Status): new array defining whether an entity is a local
5188         * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
5189         with 'I' type when initialization expression is present.
5190         * get_scos.adb, get_scos.ads: Correct comments and typos
5191
5192 2011-08-02  Javier Miranda  <miranda@adacore.com>
5193
5194         * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
5195         the JVM target.
5196         * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
5197         the JVM target.
5198         * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
5199         TSD support.
5200
5201 2011-08-02  Vincent Celier  <celier@adacore.com>
5202
5203         * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
5204         (No_Space_Img): New function
5205         (Find_Excluded_Sources): When reading from a file, record the file name
5206         and the line number for each excluded source.
5207         (Mark_Excluded_Sources): When reporting an error, if the excluded
5208         sources were read from a file, include file name and line number in
5209         the error message.
5210
5211 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5212
5213         * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
5214
5215 2011-08-02  Robert Dewar  <dewar@adacore.com>
5216
5217         * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
5218
5219 2011-08-02  Javier Miranda  <miranda@adacore.com>
5220
5221         * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
5222         generation of TSDs to the DOTNET compiler.
5223         * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
5224         generation of TSDs to the DOTNET compiler.
5225
5226 2011-08-02  Javier Miranda  <miranda@adacore.com>
5227
5228         * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
5229         record of all the tagged types declared inside library level package
5230         declarations, library level package bodies or library level subprograms.
5231         * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
5232         associated with a given tagged type.
5233         (Build_VM_TSDs): New subprogram.
5234         * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
5235         compilation units that are subprograms.
5236         * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
5237         compilation units that are package bodies.
5238         (Expand_N_Package_Declaration): Generate TSDs of the main compilation
5239         units that are a package declaration or a package instantiation.
5240         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
5241         reorganization to improve the error generated by the frontend when the
5242         function Ada.Tags.Secondary_Tag is not available.
5243         * rtsfind.ads (RE_Register_TSD): New runtime entity.
5244         * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
5245
5246 2011-08-02  Javier Miranda  <miranda@adacore.com>
5247
5248         * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
5249
5250 2011-08-02  Robert Dewar  <dewar@adacore.com>
5251
5252         * s-imenne.ads: Minor reformatting.
5253
5254 2011-08-02  Robert Dewar  <dewar@adacore.com>
5255
5256         * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
5257         * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
5258         * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
5259
5260 2011-08-02  Robert Dewar  <dewar@adacore.com>
5261
5262         * einfo.ads (Materialize_Entity): Document this is only for renamings
5263         * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
5264         required debug information in the case where we transform the object
5265         declaration into a renaming declaration.
5266         * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
5267         object
5268         * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
5269         Materialize_Entity.
5270
5271 2011-08-02  Robert Dewar  <dewar@adacore.com>
5272
5273         * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
5274         Suppress_Init_Procs.
5275         * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
5276         Suppress_Initialization/Initialization_Suppressed.
5277         * gnat_rm.texi: New documentation for pragma Suppress_Initialization
5278         * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
5279         * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
5280         * sem_prag.adb: New processing for pragma Suppress_Initialization.
5281
5282 2011-08-02  Robert Dewar  <dewar@adacore.com>
5283
5284         * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
5285         Minor reformatting.
5286
5287 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5288
5289         * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
5290         only have inheritable classwide pre/postconditions.
5291
5292 2011-08-02  Javier Miranda  <miranda@adacore.com>
5293
5294         * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
5295         * rtsfind.ads (RE_Check_TSD): New runtime entity.
5296         * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
5297         checks if the external tag of a type is the same as the external tag
5298         of some other declaration.
5299
5300 2011-08-02  Thomas Quinot  <quinot@adacore.com>
5301
5302         * s-taskin.ads: Minor reformatting.
5303
5304 2011-08-02  Emmanuel Briot  <briot@adacore.com>
5305
5306         * g-comlin.adb (Display_Help): swap the order in which it prints the
5307         short help and the general usage.
5308
5309 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5310
5311         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
5312         the aspect declarations and attach them to the generic copy for
5313         subsequent analysis.
5314         (Analyze_Subprogram_Instantiation): copy explicitly the aspect
5315         declarations of the generic tree to the new subprogram declarations.
5316         * sem_attr.adb (Check_Precondition_Postcondition): recognize
5317         conditions that apply to a subprogram instance.
5318
5319 2011-08-02  Robert Dewar  <dewar@adacore.com>
5320
5321         * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
5322
5323 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5324
5325         * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
5326         private type with a tagged full view is not derived in the immediate
5327         scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
5328
5329 2011-08-02  Robert Dewar  <dewar@adacore.com>
5330
5331         * exp_ch4.adb: Minor reformatting.
5332
5333 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5334
5335         * sem_ch5.adb (Analyze_Loop_Statement):  If the iteration scheme is an
5336         Ada2012 iterator, the loop will be rewritten during expansion into a
5337         while loop with a cursor and an element declaration. Do not analyze the
5338         body in this case, because if the container is for indefinite types the
5339         actual subtype of the elements will only be determined when the cursor
5340         declaration is analyzed.
5341
5342 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
5343
5344         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
5345         size/alignment related attributes in CodePeer_Mode.
5346
5347 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
5348
5349         * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
5350         Prepend_Element, since this can result in the operation getting the
5351         wrong slot in the full type's dispatch table if the full type has
5352         inherited operations. The incomplete type's operation will get added
5353         to the proper position in the full type's primitives
5354         list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
5355         (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
5356         dispatching operations, since there are cases where nonprimitive
5357         subprograms can get added to the list of incomplete dependents (such
5358         as subprograms in nested packages).
5359         * sem_ch6.adb (Process_Formals): First, remove test for being in a
5360         private part when determining whether to add a primitive with a
5361         parameter of a tagged incomplete type to the Private_Dependents list.
5362         Such primitives can also occur in the visible part, and should not have
5363         been excluded from being private dependents.
5364         * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
5365         RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
5366         list of a Taft-amendment incomplete type is a primitive before issuing
5367         an error that the full type must appear in the same unit. There are
5368         cases where nonprimitives can be in the list (such as subprograms in
5369         nested packages).
5370         * sem_disp.adb (Derives_From): Use correct condition for checking that
5371         a formal's type is derived from the type of the corresponding formal in
5372         the parent subprogram (the condition was completely wrong). Add
5373         checking that was missing for controlling result types being derived
5374         from the result type of the parent operation.
5375
5376 2011-08-02  Yannick Moy  <moy@adacore.com>
5377
5378         * errout.adb (First_Node): minor renaming
5379         * restrict.adb (Check_Formal_Restriction): put restriction warning on
5380         first node.
5381
5382 2011-08-02  Yannick Moy  <moy@adacore.com>
5383
5384         * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
5385         before accessing operands.
5386         * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
5387         decide whether an initialization expression respects SPARK rules, as
5388         the plain node is the expanded one. This allows for more valid warnings
5389         to be issued.
5390         * gnat_rm.texi: Minor update.
5391
5392 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
5393
5394         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
5395         previous change.
5396
5397 2011-08-02  Robert Dewar  <dewar@adacore.com>
5398
5399         * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
5400
5401 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
5402
5403         * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
5404         loop statements and the element renaming declaration with a block when
5405         the element type is controlled.
5406
5407 2011-08-02  Yannick Moy  <moy@adacore.com>
5408
5409         * sinfo.ads: Minor formatting.
5410
5411 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5412
5413         * sem_aggr.adb (Add_Association): if the association has a box and no
5414         expression, use the Sloc of the aggregate itself for the new
5415         association.
5416         * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
5417         the Original_Node.
5418
5419 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
5420
5421         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
5422         When a container is provided via a function call, generate a renaming
5423         of the function result. This avoids the creation of a transient scope
5424         and the premature finalization of the container.
5425         * exp_ch7.adb (Is_Container_Cursor): Removed.
5426         (Wrap_Transient_Declaration): Remove the supression of the finalization
5427         of the list controller when the declaration denotes a container cursor,
5428         it is not needed.
5429
5430 2011-08-02  Yannick Moy  <moy@adacore.com>
5431
5432         * restrict.adb (Check_Formal_Restriction): only issue a warning if the
5433         node is from source, instead of the original node being from source.
5434         * sem_aggr.adb
5435         (Resolve_Array_Aggregate): refine the check for a static expression, to
5436         recognize also static ranges
5437         * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
5438         Array_Type_Declaration): postpone the test for the type being a subtype
5439         mark after the type has been resolved, so that component-selection and
5440         expanded-name are discriminated.
5441         (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
5442         to distinguish the case of an iteration scheme, so that an error is
5443         issed on a non-static range in SPARK except in an iteration scheme.
5444         * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
5445         In_Iter_Schm = True.
5446         * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
5447         user-defined operators so that they are allowed in renaming
5448         * sem_ch8.adb
5449         (Find_Selected_Component): refine the check for prefixing of operators
5450         so that they are allowed in renaming. Move the checks for restrictions
5451         on selector name after analysis discriminated between
5452         component-selection and expanded-name.
5453         * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
5454         concatenation argument of string type if it is static.
5455         * sem_util.adb, sem_util.ads
5456         (Check_Later_Vs_Basic_Declarations): add a new function
5457         Is_Later_Declarative_Item to decice which declarations are allowed as
5458         later items, in the two different modes Ada 83 and SPARK. In the SPARK
5459         mode, add that renamings are considered as later items.
5460         (Enclosing_Package): new function to return the enclosing package
5461         (Enter_Name): correct the rule for homonyms in SPARK
5462         (Is_SPARK_Initialization_Expr): default to returning True on nodes not
5463         from source (result of expansion) to avoid issuing wrong warnings.
5464
5465 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5466
5467         * errout.adb: On anything but an expression First_Node returns its
5468         argument.
5469
5470 2011-08-02  Pascal Obry  <obry@adacore.com>
5471
5472         * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
5473
5474 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
5475
5476         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
5477         Set the associated loop as the related expression of internally
5478         generated cursors.
5479         * exp_ch7.adb (Is_Container_Cursor): New routine.
5480         (Wrap_Transient_Declaration): Supress the finalization of the list
5481         controller when the declaration denotes a container cursor.
5482
5483 2011-08-02  Yannick Moy  <moy@adacore.com>
5484
5485         * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
5486         command line now.
5487         * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
5488         expression is a simple expression. This check cannot be performed in
5489         the semantics, so just drop it.
5490         (P_Index_Or_Discriminant_Constraint): move check that the index or
5491         discriminant is a subtype mark to Analyze_Subtype_Declaration in the
5492         semantics. Other cases were previously checked in the semantics.
5493         * par-ch4.adb (P_Name): move checks that a selector name is not
5494         character literal or an operator symbol to Find_Selected_Component in
5495         the semantics
5496         * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
5497         declarations are not placed after later declarations in a separate
5498         procedure in Sem_Util (possibly not the best choice?), to be used both
5499         during parsing, for Ada 83 mode, and during semantic analysis, for
5500         SPARK mode.
5501         * par-endh.adb (Check_End): move check that end label is not missing
5502         to Process_End_Label in the semantics
5503         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
5504         the special case for SPARK restriction
5505         * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
5506         * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
5507         parameter Force to issue the error message even on internal node (used
5508         for generated end label). Call Check_Restriction to check when an error
5509         must be issued. In SPARK mode, issue an error message even if the
5510         restriction is not set.
5511         (Check_Restriction): new procedure with an additional out parameter to
5512         inform the caller that a message has been issued
5513         * sem_aggr.adb: Minor modification of message
5514         * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
5515         instead of issuing an error message directly
5516         * sem_ch3.adb (Analyze_Declarations): move here the check that basic
5517         declarations are not placed after later declarations, by calling
5518         Check_Later_Vs_Basic_Declarations
5519         (Analyze_Subtype_Declaration): move here the check that an index or
5520         discriminant constraint must be a subtype mark. Change the check that
5521         a subtype of String must start at one so that it works on subtype marks.
5522         * sem_ch4.adb (Analyze_Call): move here the check that a named
5523         association cannot follow a positional one in a call
5524         * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
5525         instead of issuing an error message directly
5526         * sem_ch8.adb (Find_Selected_Component): move here the check that a
5527         selector name is not a character literal or an operator symbol. Move
5528         here the check that the prefix of an expanded name cannot be a
5529         subprogram or a loop statement.
5530         * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
5531         procedure called from parsing and semantics to check that basic
5532         declarations are not placed after later declarations
5533         (Process_End_Label): move here the check that end label is not missing
5534
5535 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
5536
5537         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
5538         representation clause in codepeer mode, since it confuses CodePeer and
5539         does not bring useful info.
5540
5541 2011-08-02  Ed Falis  <falis@adacore.com>
5542
5543         * init.c: initialize fp hw on MILS.
5544
5545 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5546
5547         * errout.adb (First_Node): for bodies, return the node itself (small
5548         optimization). For other nodes, do not check source_unit if the node
5549         comes from Standard.
5550
5551 2011-08-02  Robert Dewar  <dewar@adacore.com>
5552
5553         * exp_ch3.adb: Minor comment additions.
5554         * sem_ch13.adb: Minor reformatting.
5555
5556 2011-08-02  Pascal Obry  <obry@adacore.com>
5557
5558         * make.adb, makeutl.adb: Removes some superfluous directory separator.
5559
5560 2011-08-02  Robert Dewar  <dewar@adacore.com>
5561
5562         * sem_attr.adb: Minor reformatting.
5563
5564 2011-08-02  Robert Dewar  <dewar@adacore.com>
5565
5566         * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
5567         (Has_Default_Component_Value): Removed
5568         * einfo.ads Comment updates
5569         (Has_Default_Aspect): Replaces Has_Default_Value
5570         (Has_Default_Component_Value): Removed
5571         * exp_ch13.adb
5572         (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
5573         * exp_ch3.adb
5574         (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
5575         (Get_Simple_Init_Val): Handle Default_Value aspect
5576         (Needs_Simple_Initialization): Handle Default_Value aspect
5577         * exp_ch3.ads: Needs_Simple_Initialization
5578         * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
5579         * par-prag.adb (Pragma_Default[_Component]Value) Removed
5580         * sem_ch13.adb
5581         (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
5582         * sem_prag.adb (Pragma_Default[_Component]Value) Removed
5583         * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
5584
5585 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5586
5587         * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
5588         package containing iteration primitives.
5589         exp_ch5.adb (Expand_Iterator_Loop): ditto.
5590
5591 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5592
5593         * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
5594         "of", pre-analyze expression in case it is a function call with
5595         finalization actions that must be placed ahead of the loop.
5596         * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
5597         on an Ada2012 iterator, insert them ahead of the rewritten loop.
5598
5599 2011-08-02  Geert Bosch  <bosch@adacore.com>
5600
5601         * cstand.adb (Create_Float_Types): Only consider C's long double for
5602         Long_Long_Float, in addition to double.
5603
5604 2011-08-02  Robert Dewar  <dewar@adacore.com>
5605
5606         * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
5607         sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
5608         prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
5609         Minor reformatting.
5610
5611 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5612
5613         * sem_attr.adb: handle properly 'Result when it is a prefix of an
5614         indexed component.
5615
5616 2011-08-02  Javier Miranda  <miranda@adacore.com>
5617
5618         * einfo.ads, einfo.adb
5619         (Original_Access_Type): Move this attribute to Node26 since there was
5620         an undocumented use of Node21 in E_Access_Subprogram_Type entities
5621         which causes conflicts and breaks the generation of the .NET compiler.
5622         (Interface_Name): Add missing documentation on JGNAT only uses of
5623         this attribute.
5624
5625 2011-08-02  Geert Bosch  <bosch@adacore.com>
5626
5627         * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
5628         (Find_Back_End_Float_Type): Likewise
5629         (Create_Back_End_Float_Types): Likewise
5630         (Create_Float_Types): Likewise
5631         (Register_Float_Type): Likewise
5632         * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
5633         Nlist and split out type selection in new local Find_Base_Type function.
5634         * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
5635         Nlist
5636         * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
5637
5638 2011-08-02  Robert Dewar  <dewar@adacore.com>
5639
5640         * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
5641         alpha order).
5642         * opt.ads: Minor comment change.
5643         * sem_ch12.adb: Minor code reorganization.
5644
5645 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
5646
5647         * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
5648         subtype's list of rep items to the list on the full subtype in the case
5649         where the lists are the same.
5650
5651 2011-08-02  Geert Bosch  <bosch@adacore.com>
5652
5653         * switch-c.adb (Free): New deallocation procedure to avoid implicitly
5654         using the one from System.Strings, which also deallocates all strings.
5655
5656 2011-08-02  Geert Bosch  <bosch@adacore.com>
5657
5658         * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
5659         function.
5660         * gcc-interface/Make-lang.in: Update dependencies.
5661
5662 2011-08-02  Olivier Hainque  <hainque@adacore.com>
5663
5664         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
5665         end_locus.
5666
5667 2011-08-02  Javier Miranda  <miranda@adacore.com>
5668
5669         * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
5670         associated with anonymous access to subprograms.
5671
5672 2011-08-02  Geert Bosch  <bosch@adacore.com>
5673
5674         * opt.ads
5675         (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
5676         (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
5677         * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
5678         (Add_Symbol_Definition): Move to switch-c.adb
5679         (Process_Command_Line_Symbol_Definitions): Adjust references to above.
5680         * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
5681         (Add_Symbol_Definition): Move to switch-c.adb.
5682         * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
5683         * sem_warn.adb
5684         (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
5685         Move to warnsw.adb.
5686         * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
5687         Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
5688         Move to warnsw.adb.
5689         * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
5690         (Add_Symbol_Definition): Moved from Prepcomp.
5691         * switch-c.ads: Update copyright notice. Use String_List instead of
5692         Argument_List, removing dependency on System.OS_Lib.
5693
5694 2011-08-02  Yannick Moy  <moy@adacore.com>
5695
5696         * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
5697         mode on initialization expression which does not respect SPARK
5698         restrictions.
5699         * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
5700         if the tree referenced by its argument represents an initialization
5701         expression in SPARK, suitable for initializing an object in an object
5702         declaration.
5703
5704 2011-08-02  Javier Miranda  <miranda@adacore.com>
5705
5706         * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
5707         internally generated access to subprogram with its associated protected
5708         subprogram type.
5709         * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
5710
5711 2011-08-02  Geert Bosch  <bosch@adacore.com>
5712
5713         * cstand.adb (Register_Float_Type): Print information about type to
5714         register, if the Debug_Flag_Dot_B is set.
5715         * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
5716         * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
5717         * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
5718         with a requested precision of more than Max_Digits digits and no more
5719         than Max_Base_Digits digits, if a range specification is present and the
5720         Predefined_Float_Types list has a suitable type to derive from.
5721         * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
5722         case of type completion with pragma Import
5723         * sem_prag.adb
5724         (Process_Import_Predefined_Type): Processing to complete a type
5725         with pragma Import. Currently supports floating point types only.
5726         (Set_Convention_From_Pragma): Do nothing without underlying type.
5727         (Process_Convention): Guard against absence of underlying type,
5728         which may happen when importing incomplete types.
5729         (Process_Import_Or_Interface): Handle case of importing predefined
5730         types. Tweak error message.
5731
5732 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
5733
5734         * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
5735         functions to previous change.  Reorganize code slightly.
5736
5737 2011-08-02  Geert Bosch  <bosch@adacore.com>
5738
5739         * back_end.ads (Register_Type_Proc): New call back procedure type for
5740         allowing the back end to provide information about available types.
5741         (Register_Back_End_Types): New procedure to register back end types.
5742         * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
5743         available types.
5744         * cstand.adb (Back_End_Float_Types): New list for floating point types
5745         supported by the back end.
5746         (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
5747         (Copy_Float_Type): New procedure to make new copies of predefined types.
5748         (Register_Float_Type): New call back procedure to populate the BEFT list
5749         (Find_Back_End_Float_Type): New procedure to find a BEFT by name
5750         (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
5751         (Create_Float_Types): New procedure to create entities for floating
5752         point types predefined in Standard, and put these and any remaining
5753         BEFTs on the Predefined_Float_Types list.
5754         * stand.ads (Predefined_Float_Types): New list for predefined floating
5755         point types that do not have declarations in package Standard.
5756
5757 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
5758
5759         * inline.adb (Get_Code_Unit_Entity): New local function.  Returns the
5760         entity node for the unit containing the parameter.
5761         (Add_Inlined_Body): Use it to find the unit containing the subprogram.
5762         (Add_Inlined_Subprogram): Likewise.
5763         * gcc-interface/Make-lang.in: Update dependencies.
5764
5765 2011-08-02  Thomas Quinot  <quinot@adacore.com>
5766
5767         * s-stusta.adb (Print): Make sure Pos is always initialized to a
5768         suitable value.
5769
5770 2011-08-02  Geert Bosch  <bosch@adacore.com>
5771
5772         * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
5773
5774 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
5775
5776         * sem_type.adb (Covers): Move trivial case to the top and reuse the
5777         computed value of Base_Type.
5778
5779 2011-08-02  Yannick Moy  <moy@adacore.com>
5780
5781         * restrict.adb (Check_Restriction): issue an error for any use of
5782         class-wide, even if the No_Dispatch restriction is not set.
5783         * sem_aggr.adb: Correct typos in comments and messages in formal mode
5784         * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
5785         when completing a private extension, the type named in the private part
5786         is not the same as that named in the visible part.
5787         * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
5788         of an inherited primitive operations of a tagged type or type extension
5789         that returns the tagged type.
5790         * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
5791         function which returns True for an implicit operation inherited by the
5792         derived type declaration for the argument type.
5793         (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
5794         order.
5795
5796 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5797
5798         * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
5799         Process_Bounds, to perform analysis with expansion of a range or an
5800         expression that is the iteration scheme for a loop.
5801         (Analyze_Iterator_Specification): If domain of iteration is given by a
5802         function call with a controlled result, as is the case if call returns
5803         a predefined container, ensure that finalization actions are properly
5804         generated.
5805         * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
5806
5807 2011-08-02  Javier Miranda  <miranda@adacore.com>
5808
5809         * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
5810         * gcc-interface/Make-lang.in: Update dependencies.
5811
5812 2011-08-02  Javier Miranda  <miranda@adacore.com>
5813
5814         * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
5815         determine if the analysis is performed using N or Original_Node (N).
5816         * exp_util.adb (Side_Effect_Free): Code cleanup since the new
5817         functionality of routine Is_Variable avoids code duplication.
5818         * checks.adb (Determine_Range): Handle temporaries generated by
5819         Remove_Side_Effects.
5820
5821 2011-08-02  Javier Miranda  <miranda@adacore.com>
5822
5823         * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
5824         expansion of the condition. Required since the previous analysis was
5825         done with expansion disabled (see Resolve_Quantified_Expression) and
5826         hence checks were not inserted and record comparisons have not been
5827         expanded.
5828
5829 2011-08-02  Ed Falis  <falis@adacore.com>
5830
5831         * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
5832         Update header.
5833
5834 2011-08-02  Bob Duff  <duff@adacore.com>
5835
5836         * opt.ads: Minor comment fix.
5837
5838 2011-08-02  Bob Duff  <duff@adacore.com>
5839
5840         * sem_ch12.adb (Analyze_Package_Instantiation,
5841         Analyze_Subprogram_Instantiation): Turn off style checking while
5842         analyzing an instance. Whatever style checks that apply to the generic
5843         unit should apply, so it makes no sense to apply them in an instance.
5844         This was causing trouble when compiling an instance of a runtime
5845         unit that violates the -gnatyO switch.
5846         * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
5847         one of the two case statements, causing spurious errors.
5848
5849 2011-08-02  Robert Dewar  <dewar@adacore.com>
5850
5851         * uname.adb: Minor reformatting.
5852         * gnatcmd.adb: Minor reformatting.
5853         * exp_attr.adb: Minor reformatting.
5854
5855 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5856
5857         * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
5858         No_Dispatching_Calls, do not look for the Assign primitive, because
5859         predefined primitives are not created in this case.
5860
5861 2011-08-02  Bob Duff  <duff@adacore.com>
5862
5863         * stylesw.ads: Minor comment fixes.
5864
5865 2011-08-02  Robert Dewar  <dewar@adacore.com>
5866
5867         * freeze.adb (Add_To_Result): New procedure.
5868
5869 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
5870
5871         * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
5872         time, if the specific run-time routines for handling streams of strings
5873         are not available, use the default mechanism.
5874
5875 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
5876
5877         * s-regpat.ads: Fix typo.
5878
5879 2011-08-02  Vincent Celier  <celier@adacore.com>
5880
5881         * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
5882         not null, call it to create the in memory config project file without
5883         parsing an existing default config project file.
5884
5885 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
5886
5887         * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
5888
5889 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5890
5891         * sem_elim.adb: an abstract subprogram does not need an eliminate
5892         pragma for its descendant to be eliminable.
5893
5894 2011-08-02  Ed Falis  <falis@adacore.com>
5895
5896         * init.c: revert to handling before previous checkin for VxWorks
5897         * s-intman-vxworks.adb: delete unnecessary declarations related to
5898         using Ada interrupt facilities for handling signals.
5899         Delete Initialize_Interrupts. Use __gnat_install_handler instead.
5900         * s-intman-vxworks.ads: Import __gnat_install_handler as
5901         Initialize_Interrupts.
5902         * s-taprop-vxworks.adb: Delete Signal_Mask.
5903         (Abort_Handler): change construction of mask to unblock exception
5904         signals.
5905
5906 2011-08-02  Jerome Guitton  <guitton@adacore.com>
5907
5908         * a-except-2005.adb (Raise_From_Signal_Handler): Call
5909         Debug_Raise_Exception before propagation starts.
5910
5911 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
5912
5913         * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
5914         to Restriction_Check_Required.
5915         * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
5916         * sem_res.adb (Resolve_Call): Likewise.
5917         * sem_attr.adb (Check_Stream_Attribute): Likewise.
5918
5919 2011-08-02  Bob Duff  <duff@adacore.com>
5920
5921         * stylesw.ads: Update comment.
5922         * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
5923         * errout.ads: Remove obsolete comment.
5924
5925 2011-08-02  Javier Miranda  <miranda@adacore.com>
5926
5927         * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
5928         (Set_Is_Safe_To_Reevaluate): new procedure.
5929         * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
5930         assignment is allowed on safe-to-reevaluate variables.
5931         (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
5932         temporary created to remove side effects in expressions that use
5933         the secondary stack as safe-to-reevaluate.
5934         * exp_util.adb (Side_Effect_Free): Add missing code to handle well
5935         variables that are not true constants.
5936
5937 2011-08-02  Robert Dewar  <dewar@adacore.com>
5938
5939         * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
5940         sem_res.adb, sem_ch6.adb: Minor reformatting.
5941
5942 2011-08-02  Jerome Guitton  <guitton@adacore.com>
5943
5944         * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
5945
5946 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5947
5948         * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
5949         not set Overridden_Operation if subprogram is an initialization
5950         procedure.
5951
5952 2011-08-02  Yannick Moy  <moy@adacore.com>
5953
5954         * par-ch6.adb: Correct obsolete name in comments
5955         * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
5956         which takes two message arguments (existing function takes one), with
5957         second message used for continuation.
5958         * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
5959         block statements that originate from a source block statement, not
5960         generated block statements
5961         * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
5962         symmetry with procedure case
5963         * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
5964         function to issue an error in formal mode if a package specification
5965         contains more than one tagged type or type extension.
5966         * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
5967         parameters matching formals of tagged types are objects (or ancestor
5968         type conversions of objects), not general expressions. Issue an error
5969         on view conversions that are not involving ancestor conversion of an
5970         extended type.
5971         (Resolve_Type_Conversion): in formal mode, issue an error on the
5972         operand of an ancestor type conversion which is not an object
5973         * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
5974         procedure so that it works also for actuals of function calls
5975         (Is_Actual_Tagged_Parameter): new function which determines if its
5976         argument is an actual parameter of a formal of tagged type in a
5977         subprogram call
5978         (Is_SPARK_Object_Reference): new function which determines if the tree
5979         referenced by its argument represents an object in SPARK
5980
5981 2011-08-02  Robert Dewar  <dewar@adacore.com>
5982
5983         * sem_ch3.adb: Minor reformatting
5984         Minor comment addition
5985         Minor error msg text change
5986
5987 2011-08-02  Javier Miranda  <miranda@adacore.com>
5988
5989         * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
5990         function. Used to be more precise when we generate a variable plus one
5991         assignment to remove side effects in the evaluation of the Bound
5992         expressions.
5993         (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
5994         of the bound expression to force its re-analysis and thus expand the
5995         associated transient scope (if required). Code cleanup replacing the
5996         previous code that declared the constant entity by an invocation to
5997         routine Force_Evaluation which centralizes this work in the frontend.
5998
5999 2011-08-02  Robert Dewar  <dewar@adacore.com>
6000
6001         * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
6002         (Base_Type): Now uses improved Is_Base_Type function
6003         * einfo.ads (Base_Type): Inline this function
6004
6005 2011-08-02  Robert Dewar  <dewar@adacore.com>
6006
6007         * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
6008         (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
6009
6010 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
6011
6012         * gcc-interface/Make-lang.in: Update dependencies.
6013         * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
6014         targets.
6015
6016 2011-08-02  Yannick Moy  <moy@adacore.com>
6017
6018         * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
6019         non-simple expression used in delta constraint
6020         (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
6021         index constraint which is not a subtype mark
6022         * par.adb: With and use Restrict
6023         * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
6024         mode on component type which is not a subtype mark and default
6025         expression on component
6026         (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
6027         of string which does not have a lower index bound equal to 1
6028         (Array_Type_Declaration): issue an error in formal mode on index or
6029         component type which is not a subtype mark, and on aliased keyword on
6030         component
6031         (Derived_Type_Declaration): issue an error in formal mode on interface,
6032         limited or abstract type
6033         (Record_Type_Declaration): issue an error in formal mode on interface
6034         (Record_Type_Definition): issue an error in formal mode on tagged types
6035         and type extensions not declared in the specification of a library unit
6036         package; on null non-tagged record; on variant part
6037
6038 2011-08-02  Vincent Celier  <celier@adacore.com>
6039
6040         * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
6041         not declared for qualified library project when Library_Name is not
6042         declared, but Library_Dir is.
6043
6044 2011-08-02  Robert Dewar  <dewar@adacore.com>
6045
6046         * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
6047         pragmas (affects aspects [Component_]Default_Value
6048         (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
6049         component type for the resolution
6050
6051 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
6052
6053         * einfo.adb (Base_Type): Tune implementation for speed.
6054
6055 2011-08-02  Robert Dewar  <dewar@adacore.com>
6056
6057         * freeze.adb: Minor reformatting.
6058
6059 2011-08-02  Thomas Quinot  <quinot@adacore.com>
6060
6061         * scos.ads: Update comments.
6062
6063 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6064
6065         * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
6066         base type, because the parent may be a subtype of a private type whose
6067         convention is established in a private part.
6068
6069 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
6070
6071         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
6072         statement in a block when the expansion of the return expression has
6073         created a finalization chain.
6074         * freeze.adb (Freeze_Expression): Alphabetize all choices associated
6075         with the parent node.
6076         Add N_Extended_Return_Statement to handle the case where a transient
6077         object declaration appears in the Return_Object_Declarations list of
6078         an extended return statement.
6079
6080 2011-08-02  Matthew Gingell  <gingell@adacore.com>
6081
6082         * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
6083         unused parameter 'name'.
6084
6085 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6086
6087         * sem_elim.adb (Set_Eliminated): If the overridden operation is an
6088         inherited operation, check whether its alias, which is the source
6089         operastion that it renames, has been marked eliminated.
6090
6091 2011-08-02  Javier Miranda  <miranda@adacore.com>
6092
6093         * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
6094         in-mode parameter whose type is an access type since it can be used to
6095         modify its designated object. Enforce code that handles as safe an
6096         access type that is not access-to-constant but it is the result of a
6097         previous removal of side-effects.
6098         (Remove_Side_Effects): Minor code reorganization of cases which require
6099         no action. Done to incorporate documentation on new cases uncovered
6100         working in this ticket: no action needed if this routine was invoked
6101         too early and the nodes are not yet decorated.
6102         * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
6103         to routine Remove_Side_Effects by calls to Force_Evaluation since they
6104         were issued with actuals that are implicitly provided by
6105         Force_Evaluation.
6106
6107 2011-08-02  Robert Dewar  <dewar@adacore.com>
6108
6109         * sem_ch3.adb, sem_res.adb: Minor reformatting.
6110
6111 2011-08-02  Yannick Moy  <moy@adacore.com>
6112
6113         * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
6114         to issue an error in formal mode on attribute not supported in this mode
6115         (Analyze_Attribute): issue errors on standard attributes not supported
6116         in formal mode.
6117         * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
6118         comment, and issue error in formal mode on modulus which is not a power
6119         of 2.
6120         (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
6121         range.
6122         * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
6123         subtype mark.
6124         * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
6125         operator on modular type (except 'not').
6126
6127 2011-08-02  Robert Dewar  <dewar@adacore.com>
6128
6129         * gnat_rm.texi: Minor reformatting.
6130
6131 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
6132
6133         * s-osinte-linux.ads: Minor comment update and reformatting.
6134         * i-cexten.ads: Make this unit pure, as for its parent.
6135         Will allow its usage in more contexts if needed.
6136
6137 2011-08-02  Robert Dewar  <dewar@adacore.com>
6138
6139         * s-utf_32.ads: Minor comment fix.
6140
6141 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6142
6143         * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
6144         operation of a tagged synchronized type, handle the case where the
6145         controlling argument is overloaded.
6146
6147 2011-08-02  Yannick Moy  <moy@adacore.com>
6148
6149         * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
6150         Replace pragma SPARK_95 with pragma Restrictions (SPARK)
6151         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
6152         SPARK mode and formal verification mode on processing SPARK restriction
6153         * s-rident.ads (Restriction_Id): add SPARK restriction in those not
6154         requiring consistency checking.
6155
6156 2011-08-02  Robert Dewar  <dewar@adacore.com>
6157
6158         * sem_res.adb: Minor reformatting.
6159
6160 2011-08-02  Robert Dewar  <dewar@adacore.com>
6161
6162         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
6163         a-cforse.ads: Remove unneeded with of Ada.Containers
6164         Remove commented out pragma Inline's
6165         Move specifications of new subprograms to the actual specs
6166
6167 2011-08-02  Yannick Moy  <moy@adacore.com>
6168
6169         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
6170         a-cforse.ads: Update comments.
6171
6172 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6173
6174         * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
6175
6176 2011-08-02  Robert Dewar  <dewar@adacore.com>
6177
6178         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
6179         a-cforse.ads, a-cofove.ads: Minor reformatting.
6180
6181 2011-08-02  Claire Dross  <dross@adacore.com>
6182
6183         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
6184         a-cofove.ads: Add comments.
6185
6186 2011-08-02  Yannick Moy  <moy@adacore.com>
6187
6188         * gnat_rm.texi: Document formal containers.
6189
6190 2011-08-02  Emmanuel Briot  <briot@adacore.com>
6191
6192         * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
6193         are empty sections.
6194
6195 2011-08-02  Robert Dewar  <dewar@adacore.com>
6196
6197         * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
6198         reformatting.
6199
6200 2011-08-02  Robert Dewar  <dewar@adacore.com>
6201
6202         * aspects.adb: New aspects Default_Value and Default_Component_Value
6203         New format of Aspect_Names table checks for omitted entries
6204         * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
6205         handling of boolean aspects for derived types.
6206         New aspects Default_Value and Default_Component_Value
6207         New format of Aspect_Names table checks for omitted entries
6208         * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
6209         (Has_Default_Value): New flag
6210         (Has_Default_Component_Value): New flag
6211         (Has_Default_Value): New flag
6212         * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
6213         table.
6214         * par-prag.adb: New pragmas Default_Value and Default_Component_Value
6215         * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
6216         Default_Value and Default_Component_Value
6217         * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
6218         New aspects Default_Value and Default_Component_Value
6219         * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
6220         * sprint.adb: Print N_Aspect_Specification node when called from gdb
6221
6222 2011-08-02  Vincent Celier  <celier@adacore.com>
6223
6224         * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
6225         inherit library kind.
6226
6227 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6228
6229         * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
6230         Minor reformatting.
6231
6232 2011-08-02  Robert Dewar  <dewar@adacore.com>
6233
6234         * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
6235
6236 2011-08-02  Yannick Moy  <moy@adacore.com>
6237
6238         * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
6239
6240 2011-08-02  Robert Dewar  <dewar@adacore.com>
6241
6242         * impunit.adb: Add comment.
6243
6244 2011-08-02  Yannick Moy  <moy@adacore.com>
6245
6246         * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
6247         qualification of aggregates in formal mode
6248         (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
6249         another aggregate
6250         (Resolve_Aggregate): complete the test that an aggregate is adequately
6251         qualified in formal mode
6252
6253 2011-08-02  Pascal Obry  <obry@adacore.com>
6254
6255         * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
6256         * mlib-prj.adb: Supress warning when compiling binder generated file.
6257         (Build_Library): Supress all warnings when compiling the binder
6258         generated file.
6259
6260 2011-08-02  Yannick Moy  <moy@adacore.com>
6261
6262         * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
6263         from here...
6264         * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
6265         * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
6266         Add with/use clauses to make Check_Formal_Restriction visible
6267
6268 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6269
6270         * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
6271         in-parameters when type of the generic formal is private in the generic
6272         spec and non-private in the body.
6273
6274 2011-08-02  Claire Dross  <dross@adacore.com>
6275
6276         * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
6277         a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
6278         a-cofove.adb, a-cofove.ads: New files implementing formal containers.
6279         * impunit.adb, Makefile.rtl: Take new files into account.
6280
6281 2011-08-02  Robert Dewar  <dewar@adacore.com>
6282
6283         * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
6284         sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
6285
6286 2011-08-02  Yannick Moy  <moy@adacore.com>
6287
6288         * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
6289         formal mode
6290         * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
6291         matching static array bounds, taking into account the special case of
6292         string literals
6293         * sem_ch3.adb: Typo in comment.
6294
6295 2011-08-02  Yannick Moy  <moy@adacore.com>
6296
6297         * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
6298         which issues an error in formal mode if its argument node is originally
6299         from source
6300         * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
6301         has a discriminant specification so that it does not include the case
6302         of derived types
6303         (Derived_Type_Declaration): move here the test that a derived type has a
6304         discriminant specification
6305         * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
6306         first element of a component association before accessing its choices
6307         (presence of component association is not enough)
6308         * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
6309         declaration is a library item before accessing the next element in a
6310         list, as library items are not member of lists
6311         * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
6312         sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
6313         Check_Formal_Restriction whenever possible.
6314
6315 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6316
6317         * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
6318         reference when needed.
6319
6320 2011-08-02  Bob Duff  <duff@adacore.com>
6321
6322         * gnat_ugn.texi: Fix typo.
6323
6324 2011-08-02  Vincent Celier  <celier@adacore.com>
6325
6326         * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
6327         archive file name. Do not use the full path name of archives for Open
6328         VMS.
6329
6330 2011-08-02  Robert Dewar  <dewar@adacore.com>
6331
6332         * sem_ch12.adb, sem_ch11.adb: New calling sequence for
6333         Analyze_Aspect_Specifications
6334         * sem_ch13.adb
6335         (Analyze_Aspect_Specifications): New handling for boolean aspects
6336         * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
6337         * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
6338         sequence for Analyze_Aspect_Specifications
6339         * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
6340         * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
6341
6342 2011-08-02  Robert Dewar  <dewar@adacore.com>
6343
6344         * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
6345         aspects, since these no longer exist.
6346
6347 2011-08-02  Robert Dewar  <dewar@adacore.com>
6348
6349         * par-ch13.adb (Aspect_Specifications_Present): Always return false on
6350         semicolon, do not try to see if there are aspects following it.
6351         * par-ch3.adb (P_Declarative_Items): Better message for unexpected
6352         aspect spec.
6353
6354 2011-08-02  Robert Dewar  <dewar@adacore.com>
6355
6356         * sem_ch8.adb, aspects.ads: Minor reformatting.
6357
6358 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
6359
6360         * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
6361         * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
6362         extracted from...
6363         (Analyze_Aspect_Specifications): ...here.  Call above procedure.
6364
6365 2011-08-02  Yannick Moy  <moy@adacore.com>
6366
6367         * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
6368         mode on subprogram declaration outside of package specification, unless
6369         it is followed by a pragma Import
6370         * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
6371         Access_Type_Declaration): issue error in formal mode on access type
6372         (Analyze_Incomplete_Type_Decl): issue error in formal mode on
6373         incomplete type
6374         (Analyze_Object_Declaration): issue error in formal mode on object
6375         declaration which does not respect SPARK restrictions
6376         (Analyze_Subtype_Declaration): issue error in formal mode on subtype
6377         declaration which does not respect SPARK restrictions
6378         (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
6379         error in formal mode on digits or delta constraint
6380         (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
6381         decimal fixed point type
6382         (Derived_Type_Declaration): issue error in formal mode on derived type
6383         other than type extensions of tagged record types
6384         * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
6385         with check on access definition
6386         * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
6387         mode on protected definition.
6388         (Analyze_Task_Definition): issue error in formal mode on task definition
6389
6390 2011-08-02  Robert Dewar  <dewar@adacore.com>
6391
6392         * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
6393
6394 2011-08-02  Javier Miranda  <miranda@adacore.com>
6395
6396         * sem_ch6.adb (Can_Override_Operator): New function.
6397         (Verify_Overriding_Indicator): Add missing code to check overriding
6398         indicator in operators. Fixes regression.
6399         (Check_Overriding_Indicator): Minor reformating after replacing the
6400         code that evaluates if the subprogram can override an operator by
6401         invocations to the above new function.
6402         * einfo.adb
6403         (Write_Field26_Name): Add missing code to ensure that, following
6404         the documentation in einfo.ads, this field is not shown as attribute
6405         "Static_Initialization" on non-dispatching functions.
6406
6407 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
6408
6409         * sem_res.adb (Resolve_Call): A call to
6410         Ada.Real_Time.Timing_Events.Set_Handler violates restriction
6411         No_Relative_Delay (AI-0211) only when it sets a relative timing event,
6412         i.e., when the second parameter is of type Time_Span.
6413
6414 2011-08-02  Vincent Celier  <celier@adacore.com>
6415
6416         * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
6417         with an archive instead of -L<library dir> -l<library name>.
6418
6419 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6420
6421         * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
6422         mark the base types In_Use in addition to making the operations
6423         use_visible.
6424
6425 2011-08-02  Ed Falis  <falis@adacore.com>
6426
6427         * init.c: add and setup __gnat_signal_mask for the exception signals
6428         * s-inmaop-vxworks.adb: new file.
6429         * s-intman-vxworks.adb: remove unnecessary initializations and
6430         simplify remaining
6431         * s-intman-vxworks.ads: remove unnecessary variable
6432         * s-taprop-vxworks.adb: simplify signal initialization
6433
6434 2011-08-02  Robert Dewar  <dewar@adacore.com>
6435
6436         * sem_ch8.adb: Minor code reorganization, comment updates.
6437
6438 2011-08-02  Robert Dewar  <dewar@adacore.com>
6439
6440         * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
6441         * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
6442         here from Sem_Res.
6443         (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
6444         (Matching_Static_Array_Bounds): Moved here from Sem_Res
6445
6446 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6447
6448         * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
6449         * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
6450         * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
6451         use_type_clauses, to handle more efficiently use_type and use_all_type
6452         constructs.
6453         * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
6454         Ada2012 Use_All_Type clause.
6455         (Use_Class_Wide_Operations): new procedure.
6456
6457 2011-08-02  Robert Dewar  <dewar@adacore.com>
6458
6459         * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
6460         sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
6461         expression to expression function.
6462
6463 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6464
6465         * sem_ch4.adb: transform simple Ada2012 membership into equality only
6466         if types are compatible.
6467
6468 2011-08-02  Yannick Moy  <moy@adacore.com>
6469
6470         * sem_res.adb (Matching_Static_Array_Bounds): new function which
6471         returns True if its argument array types have same dimension and same
6472         static bounds at each index.
6473         (Resolve_Actuals): issue an error in formal mode on actuals passed as
6474         OUT or IN OUT paramaters which are not view conversions in SPARK.
6475         (Resolve_Arithmetic_Op): issue an error in formal mode on
6476         multiplication or division with operands of fixed point types which are
6477         not qualified or explicitly converted.
6478         (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
6479         Boolean or array type (except String) operands.
6480         (Resolve_Equality_Op): issue an error in formal mode on equality
6481         operators for array types other than String with non-matching static
6482         bounds.
6483         (Resolve_Logical_Op): issue an error in formal mode on logical operators
6484         for array types with non-matching static bounds. Factorize the code in
6485         Matching_Static_Array_Bounds.
6486         (Resolve_Qualified_Expression): issue an error in formal mode on
6487         qualified expressions for array types with non-matching static bounds.
6488         (Resolve_Type_Conversion): issue an error in formal mode on type
6489         conversion for array types with non-matching static bounds
6490
6491 2011-08-02  Robert Dewar  <dewar@adacore.com>
6492
6493         * par-ch10.adb: Minor code reorganization (use Nkind_In).
6494
6495 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6496
6497         * par-ch9.adb: save location of entry for proper error message.
6498
6499 2011-08-02  Javier Miranda  <miranda@adacore.com>
6500
6501         * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
6502         (Use_Full_View) which permits this routine to climb through the
6503         ancestors using the full-view of private parents.
6504         * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
6505         Use_Full_View to true in calls to Is_Ancestor.
6506         * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
6507         true in call to Is_Ancestor.
6508         * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
6509         Use_Full_View to true in call to Is_Ancestor.
6510         * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
6511         call to Is_Ancestor.
6512         * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
6513         Use_Full_View to true in calls to Is_Ancestor.
6514         * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
6515         Make_Select_Specific_Data_Table, Register_Primitive,
6516         Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
6517         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
6518         to true in call to Is_Ancestor.
6519         * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
6520         Use_Full_View to true in calls to Is_Ancestor.
6521         * exp_cg.adb
6522         (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
6523         (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
6524
6525 2011-08-02  Robert Dewar  <dewar@adacore.com>
6526
6527         * gnat_rm.texi: Minor reformatting.
6528         * sem_prag.adb: Minor reformatting.
6529
6530 2011-08-02  Tristan Gingold  <gingold@adacore.com>
6531
6532         * vms_data.ads: Add VMS qualifier for -gnateP.
6533
6534 2011-08-02  Robert Dewar  <dewar@adacore.com>
6535
6536         * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
6537         * par-ch7.adb (P_Package): Proper placement of aspects for package
6538         decl/instantiation.
6539         * par-endh.adb (Check_End): Ad Is_Sloc parameter
6540         (End_Statements): Add Is_Sloc parameterr
6541         * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
6542         (Check_End): Ad Is_Sloc parameter
6543         (End_Statements): Add Is_Sloc parameterr
6544
6545 2011-08-02  Vincent Celier  <celier@adacore.com>
6546
6547         * ug_words: Add VMS qualifier equivalent to -gnateP:
6548         /SYMBOL_PREPROCESSING.
6549
6550 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
6551
6552         * gnat-style.texi: For hexadecimal numeric literals the typical
6553         grouping of digits is 4 to represent 2 bytes.
6554         A procedure spec which is split into several lines is indented two
6555         characters.
6556
6557 2011-08-02  Yannick Moy  <moy@adacore.com>
6558
6559         * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
6560         * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
6561         (Resolve_Aggregate): issue errors in formal modes when aggregate is not
6562         properly qualified
6563         (Resolve_Array_Aggregate): issue errors in formal modes on non-static
6564         choice in array aggregate
6565         (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
6566         mark as ancestor
6567         (Resolve_Record_Aggregate): issue errors in formal modes on mixed
6568         positional and named aggregate for record, or others in record
6569         aggregate, or multiple choice in record aggregate
6570         * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
6571         array operands to logical operations AND, OR and XOR do not have the
6572         same static lower and higher bounds
6573         * sem_ch5.adb, sinfo.ads: Correct typos in comments
6574
6575 2011-08-01  Robert Dewar  <dewar@adacore.com>
6576
6577         * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
6578         Replaces Last_Source_Node_In_Sequence.
6579         * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
6580         * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
6581         parens and blank in string (this was inconsistently implemented).
6582         * errout.ads
6583         (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
6584         blank in string (this was inconsistently implemented).
6585         * gnat1drv.adb
6586         (Set_Global_Switches): Set formal mode switches appropriately
6587         * opt.ads, opt.adb: Formal mode is now global switches, more consistent
6588         * par-prag.adb
6589         (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
6590         call Set_Error_Msg_Lang to set "spark" as language name.
6591         * par.adb: Remove unnecessary call to set formal language for errout
6592         * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
6593         appropriately and call Set_Error_Msg_Lang to set "spark" as language
6594         name.
6595         * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
6596         calls to it, moved after resolution so that types are known
6597         * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
6598         result of concatenation is not of type String
6599         (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
6600         concatenation is not properly restricted
6601         * gnat_rm.texi: Add doc on pragma Spark_95.
6602         * gcc-interface/Makefile.in: Remove obsolete target pairs for
6603         Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
6604         * gcc-interface/Make-lang.in: Update dependencies.
6605
6606 2011-08-01  Javier Miranda  <miranda@adacore.com>
6607
6608         * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
6609         condition that detects if the overridden operation must replace an
6610         existing entity.
6611
6612 2011-08-01  Javier Miranda  <miranda@adacore.com>
6613
6614         * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
6615         code declarations inserted by Insert_Actions in each alternative of the
6616         N_Case_Expression node.
6617
6618 2011-08-01  Robert Dewar  <dewar@adacore.com>
6619
6620         * sem_ch6.adb: Minor code reorganization.
6621         * sem_util.adb: Minor reformatting.
6622
6623 2011-08-01  Pascal Obry  <obry@adacore.com>
6624
6625         * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
6626         * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
6627
6628 2011-08-01  Yannick Moy  <moy@adacore.com>
6629
6630         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
6631         literal or operator symbol which is prefixed
6632         * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
6633         mode on access attributes.
6634         * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
6635         that concatenation operands are properly restricted in formal mode
6636         (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
6637         Analyze_Concatenation_Operand. Issue an error in formal mode if the
6638         result of the concatenation has a type different from String.
6639         (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
6640         Analyze_Quantified_Expression, Analyze_Slice,
6641         Analyze_Null): issue an error in formal mode on unsupported constructs
6642         * sem_ch5.adb
6643         (Analyze_Block_Statement): only issue error on source block statement
6644         * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
6645         function which returns the last node in a list of nodes for which
6646         Comes_From_Source returns True, if any
6647         * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
6648         Last_Source_Node_In_Sequence
6649         * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
6650         Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
6651         mode on unsupported constructs
6652         * sem_ch9.adb Do not return after issuing error in formal mode, as the
6653         rest of the actions may be needed later on since the error is marked as
6654         not serious.
6655         * sinfo.ads: Typos in comments.
6656
6657 2011-08-01  Pascal Obry  <obry@adacore.com>
6658
6659         * projects.texi: Minor editing.
6660
6661 2011-08-01  Yannick Moy  <moy@adacore.com>
6662
6663         * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
6664         insertion character ~~
6665         * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
6666         (Set_Error_Msg_Lang): new procedure which fixes the language for use
6667         with insertion character ~~
6668         (Set_Msg_Text): treat insertion character ~~
6669         * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
6670         sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
6671         Formal_Error_Msg_... procedures by equivalent Error_Msg_...
6672         procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
6673         errors related to the formal language restriction not serious
6674         (insertion character |).
6675         * par.adb (Par): set formal language for error messages if needed
6676         * sem_ch6.adb (Check_Missing_Return): take into account possible
6677         generated statements at the end of the function
6678         * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
6679         enumeration value to define a new pragma SPARK_95
6680         * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
6681         SPARK_Version): new type and variables to store the SPARK version
6682         (none by default).
6683         (SPARK_Mode): return True when SPARK_Version is set
6684         * par-prag.adb: Correct indentation
6685         (Prag): take Pragma_SPARK_95 into account
6686         * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
6687         into account.
6688
6689 2011-08-01  Robert Dewar  <dewar@adacore.com>
6690
6691         * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
6692         sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
6693         sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
6694
6695 2011-08-01  Pascal Obry  <obry@adacore.com>
6696
6697         * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
6698         Target_Name to Get_Path call.
6699         (Parse_Single_Project): Likewise.
6700         (Post_Parse_Context_Clause): Likewise.
6701         * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
6702         Call Initialise_Project_Path with the proper Target_Name.
6703         (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
6704         search path.
6705         (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
6706         with the proper Target_Name.
6707         * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
6708         Part.Parse routine.
6709         (Parse_Project_And_Apply_Config): Likewise.
6710         * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
6711         This is fine as this part of the code is supporting only native
6712         compilation.
6713         * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
6714         is fine as this part of the code is supporting only native compilation.
6715
6716 2011-08-01  Yannick Moy  <moy@adacore.com>
6717
6718         * sem_util.adb (Enter_Name): issue error in formal mode on declaration
6719         of homonym, unless the homonym is one of the cases allowed in SPARK
6720         * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
6721         package declaration occurring after a body.
6722
6723 2011-08-01  Robert Dewar  <dewar@adacore.com>
6724
6725         * checks.adb, exp_ch4.adb: Minor reformatting.
6726
6727 2011-08-01  Javier Miranda  <miranda@adacore.com>
6728
6729         * einfo.ads (Access_Disp_Table): Fix documentation.
6730         (Dispatch_Table_Wrappers): Fix documentation.
6731
6732 2011-08-01  Pascal Obry  <obry@adacore.com>
6733
6734         * prj-env.adb, prj-env.ads: Minor reformatting.
6735
6736 2011-08-01  Yannick Moy  <moy@adacore.com>
6737
6738         * sem_util.ads, sem_util.adb, par.adb, par_util.adb
6739         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
6740         procedures out of these packages.
6741         * errout.ads, errout.adb
6742         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
6743         procedures in of this package
6744         (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
6745         * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
6746         on misplaced later vs initial declarations, like in Ada 83
6747         * sem_attr.adb (Processing for Analyze_Attribute): issue error in
6748         formal mode on attribute of private type whose full type declaration
6749         is not visible
6750         * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
6751         package declaration inside a package specification
6752         (Analyze_Full_Type_Declaration): issue error in formal mode on
6753         controlled type or discriminant type
6754         * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
6755         user-defined operator means that it should come from the source
6756         (New_Overloaded_Entity): issue error in formal mode on overloaded
6757         entity.
6758         * sem_ch6.ads, sem_ch13.ads: typos in comments.
6759
6760 2011-08-01  Thomas Quinot  <quinot@adacore.com>
6761
6762         * atree.adb: Minor reformatting.
6763         * checks.adb: Minor reformatting.
6764
6765 2011-08-01  Vincent Celier  <celier@adacore.com>
6766
6767         * s-parame-vms-ia64.ads: Fix typo in comment
6768         Minor reformatting
6769         * s-parame-vms-restrict.ads: Removed, unused.
6770
6771 2011-08-01  Javier Miranda  <miranda@adacore.com>
6772
6773         * exp_ch3.adb
6774         (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
6775         * sem_ch3.adb
6776         (Constrain_Index): Remove side effects in the evaluation of the bounds.
6777         * sem_ch3.ads, sem_ch3.adb
6778         (Is_Constant_Bound): New extended version of the subprogram that was
6779         previously located inside function Exp_Ch3.Is_Variable_Size_Array.
6780         Moved here since it is shared by routines of sem_ch3 and exp_ch3.
6781         * sem_aux.ads (Constant_Value): Fix typo in comment.
6782         * checks.adb (Generate_Index_Checks): New implementation which, for
6783         array objects with constant bounds, generates the runtime check
6784         referencing the bounds of the array type. For other cases this routine
6785         provides its previous behavior obtaining such values from the array
6786         object.
6787         * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
6788         parent type.
6789         * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
6790         we cannot have semantic interpretations of the new node.
6791
6792 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
6793
6794         * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
6795         expressions.
6796
6797 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
6798
6799         * sem_ch8.adb: Minor code editing.
6800         * s-vxwext.adb: Remove trailing space.
6801         * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
6802         consistency with other files.
6803
6804 2011-08-01  Thomas Quinot  <quinot@adacore.com>
6805
6806         * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
6807
6808 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
6809
6810         * par-ch10.adb: reject parameterized expressions as compilation unit.
6811         * sem_ch4.adb: handle properly conditional expression with overloaded
6812         then_clause and no else_clause.
6813
6814 2011-08-01  Tristan Gingold  <gingold@adacore.com>
6815
6816         * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
6817         like done by System.Aux_DEC.
6818         * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
6819
6820 2011-08-01  Yannick Moy  <moy@adacore.com>
6821
6822         * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
6823         missing label at end of declaration (subprogram or package)
6824         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
6825         of positional and named parameter association
6826         * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
6827         Error_Msg_SP which adds a prefix to the error message giving the name
6828         of the formal language analyzed
6829         * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
6830         access result type in subprogram, unconstrained array as result type,.
6831         (Analyze_Subprogram_Declaration): issue an error in formal mode for null
6832         procedure
6833         * sem_ch8.adb: Code clean up.
6834
6835 2011-08-01  Javier Miranda  <miranda@adacore.com>
6836
6837         * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
6838         * einfo.ads (Access_Disp_Table): Fix documentation.
6839         (Dispatch_Table_Wrappers): Fix documentation.
6840         * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
6841         Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
6842         to enforce the documentation of this attribute.
6843         (Set_Is_Interface): Cleanup the assertion.
6844         * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
6845         the Underlying_Type entity before reading attribute Access_Disp_Table.
6846         * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
6847         Locate the Underlying_Type before reading attribute Access_Disp_Table.
6848         * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
6849         the Underlying_Type entity before reading attribute Access_Disp_Table.
6850         * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
6851         Locate the Underlying_Type entity before reading attribute
6852         Access_Disp_Table.
6853
6854 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
6855
6856         * s-poosiz.ads: Additional overriding indicators.
6857
6858 2011-08-01  Yannick Moy  <moy@adacore.com>
6859
6860         * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
6861         formal mode.
6862         (Analyze_Iteration_Scheme): issue error in formal mode when loop
6863         parameter specification does not include a subtype mark.
6864         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
6865         formal mode on abstract subprogram.
6866         (Analyze_Subprogram_Specification): issue error in formal mode on
6867         user-defined operator.
6868         (Process_Formals): issue error in formal mode on access parameter and
6869         default expression.
6870         * sem_ch9.adb (Analyze_Abort_Statement,
6871         Analyze_Accept_Statement, Analyze_Asynchronous_Select,
6872         Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
6873         Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
6874         Analyze_Requeue, Analyze_Selective_Accept,
6875         Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
6876         * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
6877         issue error in formal mode on user-defined raise statement.
6878
6879 2011-08-01  Thomas Quinot  <quinot@adacore.com>
6880
6881         * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
6882         declaration being hidden when overriding an implicit inherited
6883         subprogram.
6884         * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
6885         (-gnats), do not complain about a source file that contains only a
6886         pragma No_Body.
6887
6888 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
6889
6890         * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
6891         variable if already set.
6892
6893 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
6894
6895         * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
6896         g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
6897         s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
6898         g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
6899         g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
6900         g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
6901         g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
6902         g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
6903         g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
6904         g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
6905         g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
6906         s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
6907         g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
6908         s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
6909         g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
6910         g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
6911         g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
6912         g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
6913         g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
6914         g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
6915         s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
6916         s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
6917         a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
6918         s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
6919         s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
6920         g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
6921         g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
6922         g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
6923         g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
6924         g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
6925         g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
6926         s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
6927         s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
6928         g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
6929         g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
6930         s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
6931         s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
6932         g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
6933         g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
6934         g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
6935         s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
6936         g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
6937         g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
6938         g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
6939         s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
6940         g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
6941         g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
6942         g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
6943         s-osinte-mingw.ads: Update to GPLv3 run-time license.
6944         Use GNAT instead of GNARL.
6945
6946 2011-08-01  Bob Duff  <duff@adacore.com>
6947
6948         * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
6949         a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
6950         a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
6951         reformatting.
6952
6953 2011-08-01  Yannick Moy  <moy@adacore.com>
6954
6955         * debug.adb (d.D) reverve flag for the SPARK mode
6956         (d.E) reverve flag for SPARK generation mode
6957         (d.F) reverve flag for Why generation mode
6958         * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
6959         ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode):  New
6960         functions which return True when the corresponding modes are set
6961         (Formal_Language): return "spark" or "alfa" when in formal verification
6962         mode.
6963         * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
6964         Error_Msg to prefix the error message with a tag giving the formal
6965         language
6966         (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
6967         message with a tag giving the formal language
6968         * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
6969         block statement
6970         (Analyze_Case_Statement): issue error in formal mode on case statement
6971         with a single "others" case alternative
6972         (Analyze_Exit_Statement): issue errors in formal mode on exit
6973         statements which do not respect SPARK restrictions
6974         (Analyze_Goto_Statement): issue error in formal mode on goto statement
6975         (Check_Unreachable_Code): always issue an error (not a warning) in
6976         formal mode on unreachable code (concerns both code after an infinite
6977         loop and after an unconditional jump, both not allowed in SPARK)
6978         * sem_ch6.adb (Analyze_Return_Statement): add call to
6979         Set_Return_Present for a procedure containing a return statement
6980         (already done for functions in Analyze_Function_Return)
6981         (Analyze_Function_Return): issue error in formal mode on extended
6982         return or if return is not last statement in function
6983         (Check_Missing_Return): issue error in formal mode if function does
6984         not end with return or if procedure contains a return
6985         * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
6986         function to detect if there is an inner scope of its parameter S which
6987         is a loop.
6988
6989 2011-08-01  Thomas Quinot  <quinot@adacore.com>
6990
6991         * sem_ch6.ads: Minor reformatting.
6992
6993 2011-08-01  Javier Miranda  <miranda@adacore.com>
6994
6995         * sem_util.adb (Abstract_Interface_List): Complete condition when
6996         processing private type declarations to avoid reading unavailable
6997         attribute.
6998         (Is_Synchronized_Tagged_Type): Complete condition when processing
6999         private extension declaration nodes to avoid reading unavailable
7000         attribute.
7001
7002 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7003
7004         * sem_ch3.adb: Minor reformatting.
7005
7006 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7007
7008         * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
7009         i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
7010         s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
7011         s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
7012         for VMS, instead parametrize the common implementation with
7013         System.Parameters declarations.
7014
7015 2011-08-01  Eric Botcazou  <ebotcazou@adacore.com>
7016
7017         * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
7018
7019 2011-08-01  Tristan Gingold  <gingold@adacore.com>
7020
7021         * seh_init.c: Fix SEH handler installation on win64.
7022
7023 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7024
7025         * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
7026         double analysis of an anonymous access to subprogram, because it can
7027         lead to improper sharing of profiles and a back-end crash.
7028
7029 2011-08-01  Robert Dewar  <dewar@adacore.com>
7030
7031         * make.adb, sem_ch4.adb: Minor reformatting.
7032         * gcc-interface/Make-lang.in: Update dependencies.
7033         * sem_util.adb, exp_ch5.adb: Minor reformatting.
7034
7035 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
7036
7037         * gnat_rm.texi: Fix definition of Long_Integer.
7038
7039 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7040
7041         * exp_aggr.adb: check limit size of static aggregate unconditionally,
7042         to prevent storage exhaustion.
7043         * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
7044         finalized is a function body, insert the cleanup code before the final
7045         return statement, to prevent spurious warnings.
7046         * s-pooglo.ads: add overriding indicator.
7047
7048 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7049
7050         * sem_ch4.adb (Operator_Check): improve error message when both a
7051         with_clause and a use_clause are needed to make operator usage legal.
7052         * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
7053         determine whether a compilation unit is visible within an other,
7054         either through a with_clause in the current unit, or a with_clause in
7055         its library unit or one one of its parents.
7056
7057 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7058
7059         * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
7060         over an arbitrary expression of an array or container type.
7061         * lib-xref.adb: clarify comment.
7062
7063 2011-08-01  Bob Duff  <duff@adacore.com>
7064
7065         * einfo.ads: Minor reformatting.
7066         * debug.adb: Minor comment improvement.
7067
7068 2011-08-01  Javier Miranda  <miranda@adacore.com>
7069
7070         * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
7071         consider hidden subprograms as valid candidates.
7072
7073 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
7074
7075         * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
7076
7077 2011-08-01  Vasiliy Fofanov  <fofanov@adacore.com>
7078
7079         * gnat_ugn.texi: Fix typo.
7080
7081 2011-08-01  Robert Dewar  <dewar@adacore.com>
7082
7083         * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
7084         lib-xref.adb: Minor reformatting
7085
7086 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
7087
7088         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
7089         when to generate a call to Move_Final_List.
7090         (Has_Controlled_Parts): Remove this function.
7091
7092 2011-08-01  Geert Bosch  <bosch@adacore.com>
7093
7094         * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
7095         "," in choice list.
7096
7097 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7098
7099         * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
7100         explicit raise of a predefined exception as Comes_From_Source if the
7101         original N_Raise_Statement comes from source.
7102
7103 2011-08-01  Robert Dewar  <dewar@adacore.com>
7104
7105         * sinfo.ads: Add comment.
7106         * sem_ch6.adb: Minor reformatting.
7107
7108 2011-08-01  Robert Dewar  <dewar@adacore.com>
7109
7110         * freeze.adb (Freeze_Entity): Refine check for bad component size
7111         clause to avoid rejecting confirming clause when atomic/aliased present.
7112
7113 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7114
7115         * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
7116         better determine whether an entity reference is a write.
7117         * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
7118         subcomponent.
7119         * lib-xref.adb (Output_References): Do no suppress a read reference at
7120         the same location as an immediately preceeding modify-reference, to
7121         handle properly in-out actuals.
7122
7123 2011-08-01  Tristan Gingold  <gingold@adacore.com>
7124
7125         * env.c (__gnat_setenv) [VMS]: Refine previous change.
7126
7127 2011-08-01  Quentin Ochem  <ochem@adacore.com>
7128
7129         * i-cstrin.adb (New_String): Changed implementation, now uses only the
7130         heap to compute the result.
7131
7132 2011-08-01  Robert Dewar  <dewar@adacore.com>
7133
7134         * atree.ads: Minor reformatting.
7135
7136 2011-08-01  Emmanuel Briot  <briot@adacore.com>
7137
7138         * g-expect.adb (Get_Command_Output): Fix memory leak.
7139
7140 2011-08-01  Geert Bosch  <bosch@adacore.com>
7141
7142         * cstand.adb (P_Float_Type): New procedure to print the definition of
7143         predefined fpt types.
7144         (P_Mixed_Name): New procedure to print a name using mixed case
7145         (Print_Standard): Use P_Float_Type for printing floating point types
7146         * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
7147         precision IEEE float.
7148
7149 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7150
7151         * sem_ch3.adb: Minor reformatting.
7152
7153 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7154
7155         * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
7156         the completion of a generic function, insert the new body rather than
7157         rewriting the original.
7158
7159 2011-08-01  Yannick Moy  <moy@adacore.com>
7160
7161         * sinfo.ads, errout.ads: Typos in comments.
7162
7163 2011-08-01  Robert Dewar  <dewar@adacore.com>
7164
7165         * par-endh.adb: Minor reformatting.
7166
7167 2011-08-01  Robert Dewar  <dewar@adacore.com>
7168
7169         * aspects.ads, aspects.adb: Add aspects for library unit pragmas
7170         (Pre_Post_Aspects): New subtype.
7171         * par-ch12.adb (P_Generic): New syntax for aspects in packages
7172         * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
7173         * par-ch7.adb (P_Package): Remove Decl parameter
7174         (P_Package): Handle new syntax for aspects (before IS)
7175         * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
7176         new aspect syntax
7177         (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
7178         * par.adb (P_Aspect_Specifications): Add Semicolon parameter
7179         (P_Package): Remove Decl parameter
7180         * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
7181         aspects
7182         * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
7183         specs
7184         * sem_util.ads, sem_util.adb (Static_Boolean): New function
7185         * sinfo.ads: Document new syntax for aspects in packages etc.
7186         * sprint.adb: Handle new syntax of aspects before IS in package
7187
7188 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7189
7190         * atree.ads: Minor reformatting.
7191         * sem_prag.adb: Minor reformatting.
7192
7193 2011-08-01  Robert Dewar  <dewar@adacore.com>
7194
7195         * exp_util.adb (Insert_Actions): Fix error in handling Actions for
7196         case expr alternative.
7197
7198 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7199
7200         * sem_ch12.adb: Fix typo.
7201
7202 2011-08-01  Geert Bosch  <bosch@adacore.com>
7203
7204         * sem_prag.adb (Check_No_Link_Name): New procedure.
7205         (Process_Import_Or_Interface): Use Check_No_Link_Name.
7206         * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
7207         instead of Standard_Long_Long_Float_Size global. Preparation for
7208         eventual removal of per type constants.
7209         * exp_util.ads (Get_Stream_Size): New function returning the stream
7210         size value of subtype E.
7211         * exp_util.adb (Get_Stream_Size): Implement new function.
7212         * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
7213         function.
7214         * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
7215         * einfo.adb:
7216         (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
7217
7218 2011-08-01  Geert Bosch  <bosch@adacore.com>
7219
7220         * cstand.adb: Fix comments.
7221         * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
7222         count of arguments.
7223
7224 2011-08-01  Robert Dewar  <dewar@adacore.com>
7225
7226         * exp_ch4.adb, sem_cat.adb: Minor reformatting.
7227
7228 2011-08-01  Geert Bosch  <bosch@adacore.com>
7229
7230         * atree.ads: Fix comment.
7231
7232 2011-08-01  Robert Dewar  <dewar@adacore.com>
7233
7234         * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
7235         * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
7236         * par.adb: Add with for Namet.Sp.
7237         * par-tchk.adb: Minor reformatting.
7238
7239 2011-08-01  Vincent Celier  <celier@adacore.com>
7240
7241         * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
7242         (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
7243         of the init procedure of a SAL.
7244         * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
7245         New procedure.
7246
7247 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7248
7249         * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
7250         reformatting.
7251
7252 2011-08-01  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7253
7254         * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
7255
7256 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7257
7258         * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
7259         conformant with its spec (return True only for types that have
7260         an overriding Initialize primitive operation that prevents them from
7261         having preelaborable initialization).
7262         * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
7263         initialization for controlled types in Ada 2005 or later mode.
7264
7265 2011-08-01  Robert Dewar  <dewar@adacore.com>
7266
7267         * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
7268         Postcondition.
7269         (Same_Aspect): New function.
7270         * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
7271         Type_Invariant, Precondition, Postcondition.
7272         * snames.ads-tmpl: Add Name_Type_Invariant.
7273
7274 2011-08-01  Robert Dewar  <dewar@adacore.com>
7275
7276         * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
7277         here.
7278         (Freeze_All_Ent): Fix error in handling inherited aspects.
7279         * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
7280         already analyzed, but don't skip entire processing of a declaration,
7281         that's wrong in some cases of declarations being rewritten.
7282         (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
7283         Don't delay for integer, string literals
7284         Treat predicates in usual manner for delay, remove special case code,
7285         not needed.
7286         (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
7287         (Build_Predicate_Function): Update saved expression in aspect
7288         (Build_Invariant_Procedure): Update saved expression in aspect
7289         * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
7290         of replacement of discriminant references if the reference is simple.
7291
7292 2011-08-01  Robert Dewar  <dewar@adacore.com>
7293
7294         * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
7295         * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
7296         Static_Predicate and Dynamic_Predicate.
7297         (Build_Predicate_Function): Add processing for Static_Predicate
7298         and Dynamic_Predicate.
7299         * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
7300         (From_Static_Predicate): New flag
7301         * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
7302
7303 2011-08-01  Robert Dewar  <dewar@adacore.com>
7304
7305         * usage.adb: Documentation cleanup for Ada version modes in usage.
7306         * expander.adb: Minor reformatting.
7307
7308 2011-08-01  Robert Dewar  <dewar@adacore.com>
7309
7310         * atree.ads: Minor comment fix.
7311         * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
7312         a-witeio.ads, sem_prag.adb: Minor reformatting.
7313
7314 2011-08-01  Doug Rupp  <rupp@adacore.com>
7315
7316         * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
7317         pointers. Use descrip.h header file for convenience. Add some
7318         comments.
7319
7320 2011-08-01  Robert Dewar  <dewar@adacore.com>
7321
7322         * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
7323         (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
7324         * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
7325         New procedure.
7326         (Check_Aspect_At_End_Of_Declarations): New procedure
7327         (Analye_Aspect_Specification): Minor changes for above procedures
7328         * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
7329         specification node as well.
7330
7331 2011-08-01  Pascal Obry  <obry@adacore.com>
7332
7333         * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
7334         Windows files. Use GetFilesAttributes() in this case to check for file
7335         existence instead of returning with an error code.
7336
7337 2011-08-01  Vincent Celier  <celier@adacore.com>
7338
7339         * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
7340         High is above Source length.
7341
7342 2011-08-01  Robert Dewar  <dewar@adacore.com>
7343
7344         * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
7345
7346 2011-08-01  Robert Dewar  <dewar@adacore.com>
7347
7348         * aspects.ads (Boolean_Aspects): New subtype.
7349         * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
7350         for derived types in cases where the parent type and derived type have
7351         aspects.
7352         * freeze.adb (Freeze_Entity): Fix problems in handling derived type
7353         with aspects when parent type also has aspects.
7354         (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
7355         boolean expression at this point).
7356         * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
7357         accordance with final decision on the Ada 2012 feature.
7358         * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
7359
7360 2011-08-01  Matthew Heaney  <heaney@adacore.com>
7361
7362         * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
7363
7364 2011-08-01  Pascal Obry  <obry@adacore.com>
7365
7366         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
7367         Fix Replace_Slice when High is above current string size.
7368         (Replace_Slice): Fix DL computation when High is above current
7369         string length.
7370
7371 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
7372
7373         * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
7374
7375 2011-08-01  Matthew Heaney  <heaney@adacore.com>
7376
7377         * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
7378         of node.
7379
7380 2011-08-01  Pascal Obry  <obry@adacore.com>
7381
7382         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
7383         reformatting.
7384
7385 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7386
7387         * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
7388         access to protected subprograms in generic bodies.
7389         * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
7390         protected type, indicate that the convention of the subprogram is
7391         Convention_Protected, because it may be used in subsequent declarations
7392         within the protected declaration.
7393
7394 2011-08-01  Vincent Celier  <celier@adacore.com>
7395
7396         * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
7397         and "final" procedures when the name of the library is "ada", to avoid
7398         duplicate symbols "adainit" and "adafinal" in executables.
7399
7400 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7401
7402         * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
7403         quantified expression that appears within a postcondition and uses the
7404         Ada2012 'Result attribute.
7405
7406 2011-07-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7407
7408         * init.c (__gnat_error_handler): Cast reason to int.
7409         (__gnat_install_handler): Explain sa_sigaction use.
7410
7411 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
7412
7413         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
7414         subprogram has copy-in copy-out parameters, try to promote the mode of
7415         the return type if it is passed in registers.
7416
7417 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
7418
7419         * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
7420         left operand as addressable.
7421
7422 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
7423
7424         * gcc-interface/gigi.h (build_function_stub): Remove.
7425         (build_return_expr): Likewise.
7426         (convert_vms_descriptor): Declare.
7427         * gcc-interface/utils.c (convert_vms_descriptor): Make global.
7428         (build_function_stub): Move to...
7429         * gcc-interface/utils2.c (build_return_expr): Move to...
7430         * gcc-interface/trans.c (build_function_stub): ...here.
7431         (build_return_expr): ...here.
7432         (Subprogram_Body_to_gnu): Add local variable for language_function.
7433         Disconnect the parameter attributes cache, if any, once done with it.
7434         Call end_subprog_body only after setting the end_locus.
7435         Build the stub associated with the function, if any, at the very end.
7436         (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
7437         variables and streamline control flow.
7438
7439 2011-07-23  Arnaud Charlet  <charlet@adacore.com>
7440
7441         PR ada/49819
7442         * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
7443         g-trasym-dwarf.adb.
7444
7445 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7446
7447         PR bootstrap/49794
7448         * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
7449         Assign to act.sa_sigaction.
7450         * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
7451         current->return_address to char * before arithmetic.
7452
7453 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7454
7455         * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
7456         Correct argument types.
7457         Extract code from reason.
7458         (__gnat_install_handler): Assign to act.sa_sigaction.
7459
7460 2011-07-21  Eric Botcazou  <ebotcazou@adacore.com>
7461
7462         * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
7463         (GNAT1_OBJS): ...here.
7464
7465 2011-07-15  Eric Botcazou  <ebotcazou@adacore.com>
7466
7467         PR ada/48711
7468         * g-socthi-mingw.adb (Fill): Fix formatting.
7469
7470         * gcc-interface/gigi.h: Move around comment.
7471
7472 2011-07-14  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
7473
7474         PR ada/46350
7475         * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
7476
7477 2011-07-14  Florian Weimer  <fw@deneb.enyo.de>
7478
7479         PR ada/48711
7480         * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
7481
7482 2011-07-13  Eric Botcazou  <ebotcazou@adacore.com>
7483
7484         * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
7485         range comparison if Pmode is SImode.
7486
7487 2011-07-12  Laurent GUERBY  <laurent@guerby.net>
7488             Eric Botcazou  <ebotcazou@adacore.com>
7489
7490         * adadecode.c: Wrap up in extern "C" block.
7491         * adadecode.h: Likewise.
7492         * adaint.c: Likewise.  Remove 'const' keyword.
7493         * adaint.h: Likewise.
7494         * argv.c: Likewise.
7495         * atree.h: Likewise.
7496         * cio.c: Likewise.
7497         * cstreams.c: Likewise.
7498         * env.c: Likewise.
7499         * exit.c: Likewise.
7500         * fe.h: Likewise.
7501         * final.c: Likewise.
7502         * init.c: Likewise.
7503         * initialize.c: Likewise.
7504         * link.c: Likewise.
7505         * namet.h: Likewise.
7506         * nlists.h: Likewise.
7507         * raise.c: Likewise.
7508         * raise.h: Likewise.
7509         * repinfo.h: Likewise.
7510         * seh_init.c: Likewise.
7511         * targext.c: Likewise.
7512         * tracebak.c: Likewise.
7513         * uintp.h: Likewise.
7514         * urealp.h: Likewise.
7515         * xeinfo.adb: Wrap up generated C code in extern "C" block.
7516         * xsinfo.adb: Likewise.
7517         * xsnamest.adb: Likewise.
7518         * gcc-interface/gadaint.h: Wrap up in extern "C" block.
7519         * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
7520         * gcc-interface/misc.c: Likewise.
7521         * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
7522         (GNAT1_C_OBJS): Remove ada/b_gnat1.o.  List ada/seh_init.o and
7523         ada/targext.o here...
7524         (GNAT_ADA_OBJS): ...and not here.
7525         (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
7526         (GNATBIND_OBJS): Reorder.
7527
7528 2011-07-07  Richard Henderson  <rth@redhat.com>
7529
7530         * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
7531         dwarf2out_frame_init.
7532
7533 2011-07-07  Eric Botcazou  <ebotcazou@adacore.com>
7534
7535         * gcc-interface/misc.c (gnat_init): Tweak previous change.
7536
7537 2011-07-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7538
7539         PR target/39150
7540         * gcc-interface/Makefile.in: Handle x86_64-solaris2.
7541
7542 2011-07-06  Richard Guenther  <rguenther@suse.de>
7543
7544         * gcc-interface/misc.c (gnat_init): Merge calls to
7545         build_common_tree_nodes and build_common_tree_nodes_2.
7546         Re-initialize boolean_false_node.
7547
7548 2011-07-02  Eric Botcazou  <ebotcazou@adacore.com>
7549             Olivier Hainque  <hainque@adacore.com>
7550             Nicolas Setton  <setton@adacore.com>
7551
7552         * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
7553         the type according to the ARTIFICIAL_P parameter.
7554         (create_type_decl): Likewise.
7555         (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
7556
7557 2011-07-01  Eric Botcazou  <ebotcazou@adacore.com>
7558
7559         * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
7560         (gnatbind): Likewise.
7561
7562 2011-06-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7563
7564         * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
7565
7566 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
7567
7568         * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
7569         local variable throughout.  Remove useless call to Base_Type.
7570         (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
7571         Take it also into account for the volatileness of the field.  Set the
7572         TREE_SIDE_EFFECTS flag as well in this case.  Reorder some warnings.
7573
7574 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
7575
7576         * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
7577         on a dereference built for a by-ref object if it has an address clause.
7578
7579 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
7580
7581         * einfo.ads (Address_Taken): Document use for the second argument of
7582         Asm_Input and Asm_Output attributes.
7583         * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
7584         argument is an entity name, then set Address_Taken on it.
7585         <Attribute_Asm_Output>: Likewise.
7586         * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
7587         Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
7588         (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
7589         memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
7590
7591 2011-06-16  Joern Rennecke  <joern.rennecke@embecosm.com>
7592
7593         PR middle-end/46500
7594         * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
7595
7596 2011-06-14  Joseph Myers  <joseph@codesourcery.com>
7597
7598         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
7599         (ada/utils.o): Update dependencies.
7600         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
7601         ../../../libcpp/libcpp.a.
7602         * gcc-interface/utils.c: Include common/common-target.h.
7603         (process_attributes): Use targetm_common.have_named_sections.
7604
7605 2011-06-07  Richard Guenther  <rguenther@suse.de>
7606
7607         * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
7608         set_sizetype.
7609
7610 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
7611
7612         * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
7613         TREE_THIS_NOTRAP flag.
7614
7615 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
7616
7617         * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
7618         Fix thinko.
7619
7620 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
7621
7622         * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
7623         constants whose full view has discriminants specially.
7624
7625 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
7626
7627         * gcc-interface/utils.c: Include diagnostic.h.
7628         (gnat_write_global_declarations): Output debug information for all
7629         global type declarations before finalizing the compilation unit.
7630         * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
7631
7632 2011-05-25  Jakub Jelinek  <jakub@redhat.com>
7633
7634         * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
7635
7636 2011-05-25  Kai Tietz  <ktietz@redhat.com>
7637
7638         * adaint.c (__gnat_to_canonical_file_list_next): Use array
7639         initialization instead of const/none-const pointer assignment.
7640
7641 2011-05-24  Joseph Myers  <joseph@codesourcery.com>
7642
7643         * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
7644         $(EXTRA_GNAT1_OBJS).
7645         (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
7646         (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
7647         (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
7648         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
7649         libcommon-target.a instead of prefix.o.
7650
7651 2011-05-21  Joseph Myers  <joseph@codesourcery.com>
7652
7653         PR ada/49097
7654         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
7655
7656 2011-05-20  Joseph Myers  <joseph@codesourcery.com>
7657
7658         * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
7659         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
7660         instead of version.o.
7661
7662 2011-05-18  Kai Tietz <ktietz@redhat.com>
7663
7664         * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
7665         boolean_false_node instead of integer_zero_node.
7666         (convert_with_check): Likewise.
7667         * gcc-interface/decl.c (choices_to_gnu): Likewise.
7668
7669 2011-05-12  Eric Botcazou  <ebotcazou@adacore.com>
7670
7671         * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
7672         type of the parameter is an unconstrained array, convert the actual to
7673         the type of the formal in the In Out and Out cases as well.
7674
7675 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
7676
7677         * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
7678         call build_function_type_array or build_varargs_function_type_array
7679         instead.
7680         (create_subprog_type): Don't call build_function_type; call
7681         build_function_type_vec instead.
7682
7683 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
7684
7685         * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
7686         (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
7687         (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
7688
7689 2011-05-07  Eric Botcazou  <ebotcazou@adacore.com>
7690
7691         * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
7692
7693         * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
7694         * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
7695
7696 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
7697
7698         * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
7699
7700 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
7701
7702         * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
7703         instead of accessing TYPE_ARG_TYPES directly.
7704         * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
7705
7706 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
7707
7708         PR ada/48844
7709         * gcc-interface/gigi.h (get_variant_part): Declare.
7710         * gcc-interface/decl.c (get_variant_part): Make global.
7711         * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
7712         types have the same constant size, are record types and T1 has a
7713         variant part while T2 doesn't.
7714
7715 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
7716
7717         * gcc-interface/utils.c (begin_subprog_body): Do not call
7718         get_pending_sizes.
7719         (end_subprog_body): Likewise.
7720
7721 2011-05-04  Richard Guenther  <rguenther@suse.de>
7722
7723         * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
7724         int_const_binop.
7725         (pos_to_constructor): Likewise.
7726
7727 2011-05-03  Nathan Froyd  <froydnj@codesourcery.com>
7728             Eric Botcazou  <ebotcazou@adacore.com>
7729
7730         * gcc-interface/trans.c (gigi): Call build_function_type_list instead
7731         of build_function_type.  Adjust calls to...
7732         (build_raise_check): ...this.  Do not take a void_tree parameter.
7733         Call build_function_type_list instead of build_function_type.
7734         Fix head comment and swap couple of conditional blocks.
7735
7736 2011-04-30  Eric Botcazou  <ebotcazou@adacore.com>
7737
7738         * gnatvsn.ads (Library_Version): Bump to 4.7.
7739         (Current_Year): Bump to 2011.
7740
7741 2011-04-29  Michael Matz  <matz@suse.de>
7742
7743         * gcc-interface/misc.c (gnat_handle_option): Set
7744         warn_maybe_uninitialized.
7745
7746 2011-04-23  Gerald Pfeifer  <gerald@pfeifer.com>
7747
7748         * gnat_ugn.texi (Complexity Metrics Control): Update link to
7749         the Watson/McCabe paper.
7750
7751 2011-04-23  Jim Meyering  <meyering@redhat.com>
7752
7753         * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
7754
7755 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
7756
7757         * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
7758         onto the new type.
7759
7760 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
7761
7762         * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
7763         parameter.
7764         * gcc-interface/utils.c (create_subprog_decl): Likewise.  Set
7765         DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
7766         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
7767         ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
7768         <all>: Do not set flags on the reused DECL node coming from an alias.
7769         Set DECL_IGNORED_P on the DECL node built for subprograms if they
7770         don't need debug info here...
7771         * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
7772         (gigi): Adjust calls to create_subprog_decl.
7773         (build_raise_check): Likewise.
7774         (establish_gnat_vms_condition_handler): Likewise.
7775         (Compilation_Unit_to_gnu): Likewise.
7776         (gnat_to_gnu): Likewise.
7777
7778 2011-04-21  Eric Botcazou  <ebotcazou@adacore.com>
7779
7780         * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
7781         (NO_REORDER_ADAFLAGS): New variable.
7782         (EXTRA_GNATTOOLS): Always define.
7783         (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
7784         Clean up and adjust list of files compiled with special options.
7785         * gcc-interface/Make-lang.in: Likewise.
7786         (ada/decl.o): Cosmetical change.
7787         (ada/misc.o): Remove dependency on $(PLUGIN_H).
7788
7789 2011-04-20  Jim Meyering  <meyering@redhat.com>
7790
7791         * initialize.c (__gnat_initialize): Remove useless if-before-free.
7792
7793 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
7794
7795         * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
7796         $(CFLAGS) on the link line.
7797
7798 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
7799
7800         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
7801         padded type built for the return type if it is unconstrained.
7802
7803 2011-04-14  Nathan Froyd  <froydnj@codesourcery.com>
7804
7805         * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
7806
7807 2011-04-12  Nathan Froyd  <froydnj@codesourcery.com>
7808
7809         * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
7810         before calling TREE_CHAIN.
7811         * gcc-interface/misc.c (gnat_init_ts): New function.
7812         (LANG_HOOKS_INIT_TS): Define.
7813
7814 2011-04-12  Martin Jambor  <mjambor@suse.cz>
7815
7816         * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
7817         instead of cgraph_node.
7818
7819 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
7820
7821         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
7822         alignment on fields of the RETURN type built for the Copy-In Copy-Out
7823         mechanism.
7824
7825 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
7826
7827         * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
7828         of aggregate types that contain a placeholder.
7829
7830 2011-04-08  Nathan Froyd  <froydnj@codesourcery.com>
7831
7832         * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
7833         TYPE_ARG_TYPES.
7834         (handle_type_generic_attribute): Likewise.
7835
7836 2011-04-04  Eric Botcazou  <ebotcazou@adacore.com>
7837
7838         PR ada/47163
7839         * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
7840
7841 2011-04-04  Kai Tietz  <ktietz@redhat.com>
7842
7843         PR ada/47163
7844         * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
7845         to flag value.
7846
7847 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
7848
7849         * gcc-interface/utils2.c (build_allocator): In the unconstrained array
7850         type case, do not strip a padding type around the array type.
7851
7852 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
7853
7854         * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
7855         types.
7856
7857 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
7858
7859         * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
7860         * gcc-interface/misc.c (gnat_handle_option): Remove special handling
7861         code for -feliminate-unused-debug-types.
7862         (gnat_post_options): Likewise.
7863
7864 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
7865
7866         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
7867         declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
7868         distinct copy.
7869
7870 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
7871
7872         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
7873         DECL_ARTIFICIAL flag on enumeration types.
7874
7875 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
7876
7877         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
7878         fat pointer types artificial unconditionally.
7879         <E_Array_Subtype>: Attach the base array type as a parallel type if it
7880         isn't artificial.
7881
7882 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
7883
7884         * gcc-interface/gigi.h (get_dummy_type): Declare.
7885         (build_dummy_unc_pointer_types): Likewise.
7886         (finish_fat_pointer_type): Likewise.
7887         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
7888         fat pointer type has been built, complete it in place.
7889         <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
7890         and thin pointers.  Remove useless variable.
7891         (finish_fat_pointer_type): Make global and move to...
7892         * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
7893         (get_dummy_type): New function.
7894         (build_dummy_unc_pointer_types): Likewise.
7895         (gnat_pushdecl): Propage the name to the anonymous variants only.
7896         (update_pointer_to): Only adjust the pointer types in the unconstrained
7897         array case.
7898
7899 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
7900
7901         * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
7902         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
7903         if this is a Taft amendment type and the full declaration is available.
7904         * gcc-interface/trans.c (process_type): Likewise.
7905         If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
7906         (process_freeze_entity): Likewise.
7907         * gcc-interface/utils.c (dummy_global): New static variable.
7908         (gnat_write_global_declarations): If there are types declared as used
7909         at the global level, insert them in the global hash table.
7910
7911 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
7912
7913         * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
7914         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
7915         declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
7916         copy.
7917         (record_builtin_type): Add ARTIFICIAL_P parameter.  Set DECL_ARTIFICIAL
7918         flag of the type accordingly.
7919         * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
7920
7921 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
7922
7923         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
7924         finalizing types when updating the pointers to the designated type.
7925         <all>: Finalize the deferred types even if we didn't defer processing
7926         of incomplete types in this invocation.
7927
7928 2011-04-01  Olivier Hainque  <hainque@adacore.com>
7929             Nicolas Setton  <setton@adacore.com>
7930             Eric Botcazou  <ebotcazou@adacore.com>
7931
7932         * gcc-interface/misc.c (gnat_descriptive_type): New function.
7933         (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
7934
7935 2011-03-28  Kai Tietz  <ktietz@redhat.com>
7936
7937         * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
7938         Windows targets.
7939         (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
7940         * system-mingw.ads (System): Change ZCX_By_Default default to True.
7941
7942         * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
7943
7944 2011-03-28  Tristan Gingold  <gingold@adacore.com>
7945
7946         PR ada/44431
7947         * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
7948         Use ada output of gnatbind.
7949         (ada/b_gnatb.adb): Ditto.
7950         (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
7951         (ada.mostlyclean, ada.stage1)
7952         (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
7953         (ada.stagefeedback): Adjust.
7954         * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
7955         Use ada output of gnatbind.
7956         (b_gnatm.adb): Ditto.
7957         (b_gnatl.o, b_gnatm.o): New rules.
7958
7959 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
7960
7961         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
7962         for the padded type built to support a specified size or alignment.
7963
7964 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
7965
7966         * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
7967         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
7968         unconditionally to the end of the unit when the designated type is
7969         limited_with'ed.
7970         <all>: Rename local variable.  Attempt to un-defer types only and do it
7971         for limited_with'ed types as well.
7972         (finalize_from_with_types): Adjust comment.  Rename variable and tidy.
7973         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
7974         consistently and remove redundant call to finalize_from_with_types.
7975
7976 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
7977
7978         * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
7979         subprograms without a previous spec declared in the same unit.
7980         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
7981         subprograms at the end of the unit instead of at the beginning.
7982         * gcc-interface/utils.c (create_subprog_decl): Check that the entity
7983         isn't public for the special handling of non-inline functions nested
7984         inside inline external functions.
7985
7986 2011-03-25  Jeff Law  <law@redhat.com>
7987
7988         * gcc-interface/utils.c (def_fn_type): Add missing va_end.
7989
7990 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
7991
7992         * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
7993         * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
7994         to compute Set_Size_Depends_On_Discriminant.
7995         (Layout_Type): Call it on array types in back-end layout mode.
7996         * sem_util.adb (Requires_Transient_Scope): Return true for array
7997         types only if the size depends on the value of discriminants.
7998         * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
7999         type if the RHS is a call to a function that returns an unconstrained
8000         type with default discriminant.
8001
8002 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
8003
8004         * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
8005         non-conversion to the nominal result type at the end.
8006
8007 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
8008
8009         * gcc-interface/trans.c (create_temporary): New function taken from...
8010         (create_init_temporary): ...here.  Call it.
8011         (call_to_gnu): Create the temporary for the return value early, if any.
8012         Create it for a function with copy-in/copy-out parameters if there is
8013         no target; in other cases of copy-in/copy-out, use another temporary.
8014         Push the new binding level lazily.  Add and rename local variables.
8015
8016 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
8017
8018         * gcc-interface/decl.c (validate_size): Improve comments and tweak
8019         error message.
8020         (set_rm_size): Likewise.
8021
8022 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
8023
8024         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
8025         for the padded type built in order to support a specified alignment.
8026         Fix incorrect formatting.
8027
8028 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
8029
8030         PR bootstrap/48216
8031         * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
8032
8033 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
8034
8035         * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
8036         rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
8037         to the end of the list.  Adjust recursive call.  Rename local variable.
8038         If REORDER is true, reorder components of the record type.
8039         (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
8040         components_to_record and adjust the parameter list.
8041
8042 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
8043
8044         * gcc-interface/decl.c (elaborate_expression_1): When optimization is
8045         disabled, use the variable for bounds of loop iteration scheme.
8046
8047 2011-03-21  Kai Tietz  <ktietz@redhat.com>
8048
8049         PR target/12171
8050         * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
8051
8052 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
8053
8054         * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
8055         out whether the expression is read-only.  Short-circuit placeholder
8056         case and rename a couple of local variables.
8057
8058 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
8059
8060         * gcc-interface/gigi.h (smaller_form_type_p): Declare.
8061         * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
8062         * gcc-interface/utils.c (smaller_form_type_p): ...to here.
8063         (convert): Deal with conversions from a smaller form type specially.
8064
8065 2011-02-14  Eric Botcazou  <ebotcazou@adacore.com>
8066
8067         * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
8068         its argument, except for the special -I- switch.
8069
8070 2011-02-12  Gerald Pfeifer  <gerald@pfeifer.com>
8071
8072         * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
8073         "Ada Issues".
8074
8075 2011-02-08  Eric Botcazou  <ebotcazou@adacore.com>
8076
8077         * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
8078
8079 2011-02-03  Eric Botcazou  <ebotcazou@adacore.com>
8080
8081         * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
8082         GNAT_FORMAL.
8083         * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
8084         * gcc-interface/utils.c (fill_vms_descriptor): ...here.  Take GNU_TYPE
8085         instead of GNAT_FORMAL.  Protect the expression against multiple uses.
8086         Do not generate the check directly, instead instantiate the template
8087         check present in the descriptor.
8088         (make_descriptor_field): Move around.
8089         (build_vms_descriptor32): Build a template check in the POINTER field.
8090         (build_vms_descriptor): Remove useless suffixes.
8091         * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
8092
8093 2011-01-26  Eric Botcazou  <ebotcazou@adacore.com>
8094
8095         PR bootstrap/47467
8096         * targext.c: Include target files if IN_RTS is defined.
8097
8098 2011-01-26  Richard Guenther  <rguenther@suse.de>
8099
8100         PR bootstrap/47467
8101         * targext.c: Include config.h.
8102         * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
8103         dependency.
8104
8105 2011-01-04  Pascal Obry  <obry@adacore.com>
8106             Eric Botcazou  <ebotcazou@adacore.com>
8107
8108         * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
8109
8110 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
8111
8112         * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
8113         end-of-case on the end label and its associated gotos, if any.
8114
8115 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
8116
8117         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
8118         expressions of the parameter cache within the statement group of
8119         the CICO mechanism.
8120
8121 2011-01-04  Olivier Hainque  <hainque@adacore.com>
8122             Eric Botcazou  <ebotcazou@adacore.com>
8123
8124         * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
8125         (set_end_locus_from_node): New function.
8126         (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
8127         make and the function end_locus.
8128         (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
8129         for the elaboration subprogram.
8130         (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
8131         set the end_locus of the expression as well.
8132
8133 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
8134
8135         PR ada/47131
8136         * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
8137         variables that are referenced in exception handlers volatile.
8138
8139
8140 \f
8141 Copyright (C) 2011 Free Software Foundation, Inc.
8142
8143 Copying and distribution of this file, with or without modification,
8144 are permitted in any medium without royalty provided the copyright
8145 notice and this notice are preserved.
8146
8147         * gnat_rm.texi: Ramification of pragma Eliminate documentation
8148          - fix bugs in the description of Source_Trace;
8149          - get rid of UNIT_NAME;
8150
8151 2011-08-02  Javier Miranda  <miranda@adacore.com>
8152
8153         * exp_ch9.adb
8154         (Build_Dispatching_Requeue): Adding support for VM targets
8155         since we cannot directly reference the Tag entity.
8156         * exp_sel.adb (Build_K): Adding support for VM targets.
8157         (Build_S_Assignment): Adding support for VM targets.
8158         * exp_disp.adb
8159         (Default_Prim_Op_Position): In VM targets do not restrict availability
8160         of predefined interface primitives to compiling in Ada 2005 mode.
8161         (Is_Predefined_Interface_Primitive): In VM targets this service is not
8162         restricted to compiling in Ada 2005 mode.
8163         (Make_VM_TSD): Generate code that declares and initializes the OSD
8164         record. Needed to support dispatching calls through synchronized
8165         interfaces.
8166         * exp_ch3.adb
8167         (Make_Predefined_Primitive_Specs): Enable generation of predefined
8168         primitives associated with synchronized interfaces.
8169         (Make_Predefined_Primitive_Bodies): Enable generation of predefined
8170         primitives associated with synchronized interfaces.
8171
8172 2011-08-02  Yannick Moy  <moy@adacore.com>
8173
8174         * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
8175         statements hidden in SPARK if preceded by the HIDE directive
8176         (Parse_Exception_Handlers): mark each exception handler in a sequence of
8177         exception handlers as hidden in SPARK if preceded by the HIDE directive
8178         * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
8179         if starting with the HIDE directive
8180         * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
8181         starting with the HIDE directive; mark the declarations in a private
8182         part as hidden in SPARK if the private part starts with the HIDE
8183         directive
8184         * restrict.adb, restrict.ads
8185         (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
8186         (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
8187         argument node belongs to a part which is hidden in SPARK
8188         (Check_SPARK_Restriction): do not issue violations on nodes in hidden
8189         parts in SPARK; protect the possibly costly call to
8190         Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
8191         * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
8192         * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
8193         Accumulate_Token_Checksum_GNAT_5_03): add case for new token
8194         Tok_SPARK_Hide.
8195         (Scan): recognize special comment starting with '#' and followed by
8196         SPARK keyword "hide" as a HIDE directive.
8197
8198 2011-08-02  Yannick Moy  <moy@adacore.com>
8199
8200         * types.ads, erroutc.ads: Minor reformatting.
8201
8202 2011-08-02  Vincent Celier  <celier@adacore.com>
8203
8204         * link.c: Add response file support for cross platforms.
8205
8206 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8207
8208         * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
8209         in an association, set parent field of copy before partial analysis.
8210         * sem_res.adb (Resolve_Slice): create reference to itype only when
8211         expansion is enabled.
8212
8213 2011-08-02  Yannick Moy  <moy@adacore.com>
8214
8215         * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
8216         for new flag denoting which subprogram bodies are in ALFA
8217         * restrict.adb, sem_ch7.adb: Update comment
8218         * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
8219         sem_ch9.adb, sem_res.adb: Add calls to
8220         Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
8221         * sem_ch6.adb (Analyze_Function_Return): add calls to
8222         Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
8223         middle of the body, and extended return.
8224         (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
8225         False when missing return.
8226         (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
8227         to True for subprograms whose spec is in ALFA. Remove later on the flag
8228         on the entity used for a subprogram body when there exists a separate
8229         declaration.
8230         * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
8231         if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
8232         False, otherwise do nothing.
8233
8234 2011-08-02  Robert Dewar  <dewar@adacore.com>
8235
8236         * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
8237
8238 2011-08-02  Yannick Moy  <moy@adacore.com>
8239
8240         * sem_ch4.ads: minor formatting.
8241
8242 2011-08-02  Yannick Moy  <moy@adacore.com>
8243
8244         * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
8245         debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
8246         errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
8247         restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
8248         opt.ads: cleanup of SPARK mode
8249
8250 2011-08-02  Yannick Moy  <moy@adacore.com>
8251
8252         * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
8253         types.
8254         * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
8255         (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
8256         * sem_ch3.adb
8257         (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
8258         (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
8259         (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
8260         (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
8261         types.
8262         (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
8263         non-static range.
8264         * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
8265         functions whose return type is not in ALFA.
8266         (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
8267         specifications.
8268         (Process_Formals): unset Is_In_ALFA flag for subprograms if a
8269         parameter's type is not in ALFA.
8270         * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
8271         types are in ALFA.
8272
8273 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8274
8275         * sem_ch6 (Analyze_Expression_Function): treat the function as
8276         Inline_Always, and introduce a subprogram declaration for it when it is
8277         not a completion.
8278         * inline.adb (Add_Inlined_Body): recognize bodies that come from
8279         expression functions, so that the back-end can determine whether they
8280         can in fact be inlined.
8281         * sem_util.adb (Is_Expression_Function): predicate to determine whether
8282         a function body comes from an expression function.
8283
8284 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
8285
8286         * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
8287         null exclusions to test Can_Never_Be_Null on the anonymous access types
8288         of the formals rather than testing the formals themselves. Exclude this
8289         check in cases where the Old_Formal is marked as a controlling formal,
8290         to avoid issuing spurious errors for bodies completing dispatching
8291         operations (due to the flag not getting set on controlling access
8292         formals in body specs).
8293         (Find_Corresponding_Spec): When checking full and subtype conformance of
8294         subprogram bodies in instances, pass Designated and E in that order, for
8295         consistency with the expected order of the formals (New_Id followed by
8296         Old_Id).
8297
8298 2011-08-02  Robert Dewar  <dewar@adacore.com>
8299
8300         * sem_ch8.adb: Minor reformatting.
8301
8302 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8303
8304         * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
8305         Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
8306         primitive operations of class-wide actuals.
8307
8308 2011-08-02  Javier Miranda  <miranda@adacore.com>
8309
8310         * exp_atag.ads, exp_atag.adb
8311         (Build_Common_Dispatching_Select_Statements): Remove argument Loc
8312         since its value is implicitly passed in argument Typ.
8313         * exp_disp.adb (Make_Disp_Conditional_Select_Body,
8314         Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
8315         Build_Common_Dispatching_Select_Statements.
8316
8317 2011-08-02  Robert Dewar  <dewar@adacore.com>
8318
8319         * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
8320         exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
8321         Minor reformatting.
8322
8323 2011-08-02  Robert Dewar  <dewar@adacore.com>
8324
8325         * sem_res.adb: Minor reformatting.
8326         * sem_prag.adb: Minor reformatting.
8327
8328 2011-08-02  Javier Miranda  <miranda@adacore.com>
8329
8330         * exp_atag.adb, exp_atags.ads
8331         (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
8332         by the tagged type Entity. Required to use this routine in the VM
8333         targets since we do not have available the Tag entity in the VM
8334         platforms.
8335         * exp_ch6.adb
8336         (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
8337         Ada.Tags has not been previously loaded.
8338         * exp_ch7.adb
8339         (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
8340         Build_VM_TSDs if package Ada.Tags has not been previously loaded.
8341         * sem_aux.adb
8342         (Enclosing_Dynamic_Scope): Add missing support to handle the full
8343         view of enclosing scopes. Required to handle enclosing scopes that
8344         are synchronized types whose full view is a task type.
8345         * exp_disp.adb
8346         (Build_VM_TSDs): Minor code improvement to avoid generating and
8347         analyzing lists with empty nodes.
8348         (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
8349         (Make_Disp_Conditional_Select_Body): Add support for VM targets.
8350         (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
8351         (Make_Disp_Timed_Select_Body): Add support for VM targets.
8352         (Make_Select_Specific_Data_Table): Add support for VM targets.
8353         (Make_VM_TSD): Generate code to initialize the SSD structure of
8354         the TSD.
8355
8356 2011-08-02  Yannick Moy  <moy@adacore.com>
8357
8358         * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
8359         cross-references section in ALI.
8360         * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
8361         (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
8362         Sub).
8363         (Enclosing_Subprogram_Or_Package): new function to return the enclosing
8364         subprogram or package entity of a node
8365         (Is_Local_Reference_Type): new function returns True for references
8366         selected in local cross-references.
8367         (Lt): function extracted from Lt in Output_References
8368         (Write_Entity_Name): function extracted from Output_References
8369         (Generate_Definition): generate reference with type 'D' for definition
8370         of objects (object declaration and parameter specification), with
8371         appropriate locations and units, for use in local cross-references.
8372         (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
8373         references of type 'I' for initialization in object definition.
8374         (Output_References): move part of function Lt and procedure
8375         Write_Entity_Name outside of the body. Ignore references of types 'D'
8376         and 'I' introduced for local cross-references.
8377         (Output_Local_References): new procedure to output the local
8378         cross-references sections.
8379         (Lref_Entity_Status): new array defining whether an entity is a local
8380         * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
8381         with 'I' type when initialization expression is present.
8382         * get_scos.adb, get_scos.ads: Correct comments and typos
8383
8384 2011-08-02  Javier Miranda  <miranda@adacore.com>
8385
8386         * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
8387         the JVM target.
8388         * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
8389         the JVM target.
8390         * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
8391         TSD support.
8392
8393 2011-08-02  Vincent Celier  <celier@adacore.com>
8394
8395         * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
8396         (No_Space_Img): New function
8397         (Find_Excluded_Sources): When reading from a file, record the file name
8398         and the line number for each excluded source.
8399         (Mark_Excluded_Sources): When reporting an error, if the excluded
8400         sources were read from a file, include file name and line number in
8401         the error message.
8402
8403 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8404
8405         * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
8406
8407 2011-08-02  Robert Dewar  <dewar@adacore.com>
8408
8409         * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
8410
8411 2011-08-02  Javier Miranda  <miranda@adacore.com>
8412
8413         * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
8414         generation of TSDs to the DOTNET compiler.
8415         * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
8416         generation of TSDs to the DOTNET compiler.
8417
8418 2011-08-02  Javier Miranda  <miranda@adacore.com>
8419
8420         * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
8421         record of all the tagged types declared inside library level package
8422         declarations, library level package bodies or library level subprograms.
8423         * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
8424         associated with a given tagged type.
8425         (Build_VM_TSDs): New subprogram.
8426         * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
8427         compilation units that are subprograms.
8428         * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
8429         compilation units that are package bodies.
8430         (Expand_N_Package_Declaration): Generate TSDs of the main compilation
8431         units that are a package declaration or a package instantiation.
8432         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
8433         reorganization to improve the error generated by the frontend when the
8434         function Ada.Tags.Secondary_Tag is not available.
8435         * rtsfind.ads (RE_Register_TSD): New runtime entity.
8436         * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
8437
8438 2011-08-02  Javier Miranda  <miranda@adacore.com>
8439
8440         * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
8441
8442 2011-08-02  Robert Dewar  <dewar@adacore.com>
8443
8444         * s-imenne.ads: Minor reformatting.
8445
8446 2011-08-02  Robert Dewar  <dewar@adacore.com>
8447
8448         * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
8449         * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
8450         * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
8451
8452 2011-08-02  Robert Dewar  <dewar@adacore.com>
8453
8454         * einfo.ads (Materialize_Entity): Document this is only for renamings
8455         * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
8456         required debug information in the case where we transform the object
8457         declaration into a renaming declaration.
8458         * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
8459         object
8460         * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
8461         Materialize_Entity.
8462
8463 2011-08-02  Robert Dewar  <dewar@adacore.com>
8464
8465         * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
8466         Suppress_Init_Procs.
8467         * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
8468         Suppress_Initialization/Initialization_Suppressed.
8469         * gnat_rm.texi: New documentation for pragma Suppress_Initialization
8470         * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
8471         * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
8472         * sem_prag.adb: New processing for pragma Suppress_Initialization.
8473
8474 2011-08-02  Robert Dewar  <dewar@adacore.com>
8475
8476         * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
8477         Minor reformatting.
8478
8479 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8480
8481         * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
8482         only have inheritable classwide pre/postconditions.
8483
8484 2011-08-02  Javier Miranda  <miranda@adacore.com>
8485
8486         * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
8487         * rtsfind.ads (RE_Check_TSD): New runtime entity.
8488         * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
8489         checks if the external tag of a type is the same as the external tag
8490         of some other declaration.
8491
8492 2011-08-02  Thomas Quinot  <quinot@adacore.com>
8493
8494         * s-taskin.ads: Minor reformatting.
8495
8496 2011-08-02  Emmanuel Briot  <briot@adacore.com>
8497
8498         * g-comlin.adb (Display_Help): swap the order in which it prints the
8499         short help and the general usage.
8500
8501 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8502
8503         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
8504         the aspect declarations and attach them to the generic copy for
8505         subsequent analysis.
8506         (Analyze_Subprogram_Instantiation): copy explicitly the aspect
8507         declarations of the generic tree to the new subprogram declarations.
8508         * sem_attr.adb (Check_Precondition_Postcondition): recognize
8509         conditions that apply to a subprogram instance.
8510
8511 2011-08-02  Robert Dewar  <dewar@adacore.com>
8512
8513         * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
8514
8515 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8516
8517         * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
8518         private type with a tagged full view is not derived in the immediate
8519         scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
8520
8521 2011-08-02  Robert Dewar  <dewar@adacore.com>
8522
8523         * exp_ch4.adb: Minor reformatting.
8524
8525 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8526
8527         * sem_ch5.adb (Analyze_Loop_Statement):  If the iteration scheme is an
8528         Ada2012 iterator, the loop will be rewritten during expansion into a
8529         while loop with a cursor and an element declaration. Do not analyze the
8530         body in this case, because if the container is for indefinite types the
8531         actual subtype of the elements will only be determined when the cursor
8532         declaration is analyzed.
8533
8534 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
8535
8536         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
8537         size/alignment related attributes in CodePeer_Mode.
8538
8539 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
8540
8541         * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
8542         Prepend_Element, since this can result in the operation getting the
8543         wrong slot in the full type's dispatch table if the full type has
8544         inherited operations. The incomplete type's operation will get added
8545         to the proper position in the full type's primitives
8546         list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
8547         (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
8548         dispatching operations, since there are cases where nonprimitive
8549         subprograms can get added to the list of incomplete dependents (such
8550         as subprograms in nested packages).
8551         * sem_ch6.adb (Process_Formals): First, remove test for being in a
8552         private part when determining whether to add a primitive with a
8553         parameter of a tagged incomplete type to the Private_Dependents list.
8554         Such primitives can also occur in the visible part, and should not have
8555         been excluded from being private dependents.
8556         * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
8557         RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
8558         list of a Taft-amendment incomplete type is a primitive before issuing
8559         an error that the full type must appear in the same unit. There are
8560         cases where nonprimitives can be in the list (such as subprograms in
8561         nested packages).
8562         * sem_disp.adb (Derives_From): Use correct condition for checking that
8563         a formal's type is derived from the type of the corresponding formal in
8564         the parent subprogram (the condition was completely wrong). Add
8565         checking that was missing for controlling result types being derived
8566         from the result type of the parent operation.
8567
8568 2011-08-02  Yannick Moy  <moy@adacore.com>
8569
8570         * errout.adb (First_Node): minor renaming
8571         * restrict.adb (Check_Formal_Restriction): put restriction warning on
8572         first node.
8573
8574 2011-08-02  Yannick Moy  <moy@adacore.com>
8575
8576         * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
8577         before accessing operands.
8578         * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
8579         decide whether an initialization expression respects SPARK rules, as
8580         the plain node is the expanded one. This allows for more valid warnings
8581         to be issued.
8582         * gnat_rm.texi: Minor update.
8583
8584 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
8585
8586         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
8587         previous change.
8588
8589 2011-08-02  Robert Dewar  <dewar@adacore.com>
8590
8591         * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
8592
8593 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
8594
8595         * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
8596         loop statements and the element renaming declaration with a block when
8597         the element type is controlled.
8598
8599 2011-08-02  Yannick Moy  <moy@adacore.com>
8600
8601         * sinfo.ads: Minor formatting.
8602
8603 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8604
8605         * sem_aggr.adb (Add_Association): if the association has a box and no
8606         expression, use the Sloc of the aggregate itself for the new
8607         association.
8608         * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
8609         the Original_Node.
8610
8611 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
8612
8613         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
8614         When a container is provided via a function call, generate a renaming
8615         of the function result. This avoids the creation of a transient scope
8616         and the premature finalization of the container.
8617         * exp_ch7.adb (Is_Container_Cursor): Removed.
8618         (Wrap_Transient_Declaration): Remove the supression of the finalization
8619         of the list controller when the declaration denotes a container cursor,
8620         it is not needed.
8621
8622 2011-08-02  Yannick Moy  <moy@adacore.com>
8623
8624         * restrict.adb (Check_Formal_Restriction): only issue a warning if the
8625         node is from source, instead of the original node being from source.
8626         * sem_aggr.adb
8627         (Resolve_Array_Aggregate): refine the check for a static expression, to
8628         recognize also static ranges
8629         * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
8630         Array_Type_Declaration): postpone the test for the type being a subtype
8631         mark after the type has been resolved, so that component-selection and
8632         expanded-name are discriminated.
8633         (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
8634         to distinguish the case of an iteration scheme, so that an error is
8635         issed on a non-static range in SPARK except in an iteration scheme.
8636         * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
8637         In_Iter_Schm = True.
8638         * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
8639         user-defined operators so that they are allowed in renaming
8640         * sem_ch8.adb
8641         (Find_Selected_Component): refine the check for prefixing of operators
8642         so that they are allowed in renaming. Move the checks for restrictions
8643         on selector name after analysis discriminated between
8644         component-selection and expanded-name.
8645         * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
8646         concatenation argument of string type if it is static.
8647         * sem_util.adb, sem_util.ads
8648         (Check_Later_Vs_Basic_Declarations): add a new function
8649         Is_Later_Declarative_Item to decice which declarations are allowed as
8650         later items, in the two different modes Ada 83 and SPARK. In the SPARK
8651         mode, add that renamings are considered as later items.
8652         (Enclosing_Package): new function to return the enclosing package
8653         (Enter_Name): correct the rule for homonyms in SPARK
8654         (Is_SPARK_Initialization_Expr): default to returning True on nodes not
8655         from source (result of expansion) to avoid issuing wrong warnings.
8656
8657 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8658
8659         * errout.adb: On anything but an expression First_Node returns its
8660         argument.
8661
8662 2011-08-02  Pascal Obry  <obry@adacore.com>
8663
8664         * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
8665
8666 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
8667
8668         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
8669         Set the associated loop as the related expression of internally
8670         generated cursors.
8671         * exp_ch7.adb (Is_Container_Cursor): New routine.
8672         (Wrap_Transient_Declaration): Supress the finalization of the list
8673         controller when the declaration denotes a container cursor.
8674
8675 2011-08-02  Yannick Moy  <moy@adacore.com>
8676
8677         * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
8678         command line now.
8679         * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
8680         expression is a simple expression. This check cannot be performed in
8681         the semantics, so just drop it.
8682         (P_Index_Or_Discriminant_Constraint): move check that the index or
8683         discriminant is a subtype mark to Analyze_Subtype_Declaration in the
8684         semantics. Other cases were previously checked in the semantics.
8685         * par-ch4.adb (P_Name): move checks that a selector name is not
8686         character literal or an operator symbol to Find_Selected_Component in
8687         the semantics
8688         * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
8689         declarations are not placed after later declarations in a separate
8690         procedure in Sem_Util (possibly not the best choice?), to be used both
8691         during parsing, for Ada 83 mode, and during semantic analysis, for
8692         SPARK mode.
8693         * par-endh.adb (Check_End): move check that end label is not missing
8694         to Process_End_Label in the semantics
8695         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
8696         the special case for SPARK restriction
8697         * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
8698         * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
8699         parameter Force to issue the error message even on internal node (used
8700         for generated end label). Call Check_Restriction to check when an error
8701         must be issued. In SPARK mode, issue an error message even if the
8702         restriction is not set.
8703         (Check_Restriction): new procedure with an additional out parameter to
8704         inform the caller that a message has been issued
8705         * sem_aggr.adb: Minor modification of message
8706         * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
8707         instead of issuing an error message directly
8708         * sem_ch3.adb (Analyze_Declarations): move here the check that basic
8709         declarations are not placed after later declarations, by calling
8710         Check_Later_Vs_Basic_Declarations
8711         (Analyze_Subtype_Declaration): move here the check that an index or
8712         discriminant constraint must be a subtype mark. Change the check that
8713         a subtype of String must start at one so that it works on subtype marks.
8714         * sem_ch4.adb (Analyze_Call): move here the check that a named
8715         association cannot follow a positional one in a call
8716         * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
8717         instead of issuing an error message directly
8718         * sem_ch8.adb (Find_Selected_Component): move here the check that a
8719         selector name is not a character literal or an operator symbol. Move
8720         here the check that the prefix of an expanded name cannot be a
8721         subprogram or a loop statement.
8722         * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
8723         procedure called from parsing and semantics to check that basic
8724         declarations are not placed after later declarations
8725         (Process_End_Label): move here the check that end label is not missing
8726
8727 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
8728
8729         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
8730         representation clause in codepeer mode, since it confuses CodePeer and
8731         does not bring useful info.
8732
8733 2011-08-02  Ed Falis  <falis@adacore.com>
8734
8735         * init.c: initialize fp hw on MILS.
8736
8737 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8738
8739         * errout.adb (First_Node): for bodies, return the node itself (small
8740         optimization). For other nodes, do not check source_unit if the node
8741         comes from Standard.
8742
8743 2011-08-02  Robert Dewar  <dewar@adacore.com>
8744
8745         * exp_ch3.adb: Minor comment additions.
8746         * sem_ch13.adb: Minor reformatting.
8747
8748 2011-08-02  Pascal Obry  <obry@adacore.com>
8749
8750         * make.adb, makeutl.adb: Removes some superfluous directory separator.
8751
8752 2011-08-02  Robert Dewar  <dewar@adacore.com>
8753
8754         * sem_attr.adb: Minor reformatting.
8755
8756 2011-08-02  Robert Dewar  <dewar@adacore.com>
8757
8758         * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
8759         (Has_Default_Component_Value): Removed
8760         * einfo.ads Comment updates
8761         (Has_Default_Aspect): Replaces Has_Default_Value
8762         (Has_Default_Component_Value): Removed
8763         * exp_ch13.adb
8764         (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
8765         * exp_ch3.adb
8766         (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
8767         (Get_Simple_Init_Val): Handle Default_Value aspect
8768         (Needs_Simple_Initialization): Handle Default_Value aspect
8769         * exp_ch3.ads: Needs_Simple_Initialization
8770         * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
8771         * par-prag.adb (Pragma_Default[_Component]Value) Removed
8772         * sem_ch13.adb
8773         (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
8774         * sem_prag.adb (Pragma_Default[_Component]Value) Removed
8775         * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
8776
8777 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8778
8779         * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
8780         package containing iteration primitives.
8781         exp_ch5.adb (Expand_Iterator_Loop): ditto.
8782
8783 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8784
8785         * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
8786         "of", pre-analyze expression in case it is a function call with
8787         finalization actions that must be placed ahead of the loop.
8788         * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
8789         on an Ada2012 iterator, insert them ahead of the rewritten loop.
8790
8791 2011-08-02  Geert Bosch  <bosch@adacore.com>
8792
8793         * cstand.adb (Create_Float_Types): Only consider C's long double for
8794         Long_Long_Float, in addition to double.
8795
8796 2011-08-02  Robert Dewar  <dewar@adacore.com>
8797
8798         * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
8799         sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
8800         prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
8801         Minor reformatting.
8802
8803 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8804
8805         * sem_attr.adb: handle properly 'Result when it is a prefix of an
8806         indexed component.
8807
8808 2011-08-02  Javier Miranda  <miranda@adacore.com>
8809
8810         * einfo.ads, einfo.adb
8811         (Original_Access_Type): Move this attribute to Node26 since there was
8812         an undocumented use of Node21 in E_Access_Subprogram_Type entities
8813         which causes conflicts and breaks the generation of the .NET compiler.
8814         (Interface_Name): Add missing documentation on JGNAT only uses of
8815         this attribute.
8816
8817 2011-08-02  Geert Bosch  <bosch@adacore.com>
8818
8819         * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
8820         (Find_Back_End_Float_Type): Likewise
8821         (Create_Back_End_Float_Types): Likewise
8822         (Create_Float_Types): Likewise
8823         (Register_Float_Type): Likewise
8824         * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
8825         Nlist and split out type selection in new local Find_Base_Type function.
8826         * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
8827         Nlist
8828         * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
8829
8830 2011-08-02  Robert Dewar  <dewar@adacore.com>
8831
8832         * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
8833         alpha order).
8834         * opt.ads: Minor comment change.
8835         * sem_ch12.adb: Minor code reorganization.
8836
8837 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
8838
8839         * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
8840         subtype's list of rep items to the list on the full subtype in the case
8841         where the lists are the same.
8842
8843 2011-08-02  Geert Bosch  <bosch@adacore.com>
8844
8845         * switch-c.adb (Free): New deallocation procedure to avoid implicitly
8846         using the one from System.Strings, which also deallocates all strings.
8847
8848 2011-08-02  Geert Bosch  <bosch@adacore.com>
8849
8850         * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
8851         function.
8852         * gcc-interface/Make-lang.in: Update dependencies.
8853
8854 2011-08-02  Olivier Hainque  <hainque@adacore.com>
8855
8856         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
8857         end_locus.
8858
8859 2011-08-02  Javier Miranda  <miranda@adacore.com>
8860
8861         * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
8862         associated with anonymous access to subprograms.
8863
8864 2011-08-02  Geert Bosch  <bosch@adacore.com>
8865
8866         * opt.ads
8867         (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
8868         (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
8869         * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
8870         (Add_Symbol_Definition): Move to switch-c.adb
8871         (Process_Command_Line_Symbol_Definitions): Adjust references to above.
8872         * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
8873         (Add_Symbol_Definition): Move to switch-c.adb.
8874         * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
8875         * sem_warn.adb
8876         (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
8877         Move to warnsw.adb.
8878         * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
8879         Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
8880         Move to warnsw.adb.
8881         * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
8882         (Add_Symbol_Definition): Moved from Prepcomp.
8883         * switch-c.ads: Update copyright notice. Use String_List instead of
8884         Argument_List, removing dependency on System.OS_Lib.
8885
8886 2011-08-02  Yannick Moy  <moy@adacore.com>
8887
8888         * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
8889         mode on initialization expression which does not respect SPARK
8890         restrictions.
8891         * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
8892         if the tree referenced by its argument represents an initialization
8893         expression in SPARK, suitable for initializing an object in an object
8894         declaration.
8895
8896 2011-08-02  Javier Miranda  <miranda@adacore.com>
8897
8898         * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
8899         internally generated access to subprogram with its associated protected
8900         subprogram type.
8901         * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
8902
8903 2011-08-02  Geert Bosch  <bosch@adacore.com>
8904
8905         * cstand.adb (Register_Float_Type): Print information about type to
8906         register, if the Debug_Flag_Dot_B is set.
8907         * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
8908         * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
8909         * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
8910         with a requested precision of more than Max_Digits digits and no more
8911         than Max_Base_Digits digits, if a range specification is present and the
8912         Predefined_Float_Types list has a suitable type to derive from.
8913         * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
8914         case of type completion with pragma Import
8915         * sem_prag.adb
8916         (Process_Import_Predefined_Type): Processing to complete a type
8917         with pragma Import. Currently supports floating point types only.
8918         (Set_Convention_From_Pragma): Do nothing without underlying type.
8919         (Process_Convention): Guard against absence of underlying type,
8920         which may happen when importing incomplete types.
8921         (Process_Import_Or_Interface): Handle case of importing predefined
8922         types. Tweak error message.
8923
8924 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
8925
8926         * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
8927         functions to previous change.  Reorganize code slightly.
8928
8929 2011-08-02  Geert Bosch  <bosch@adacore.com>
8930
8931         * back_end.ads (Register_Type_Proc): New call back procedure type for
8932         allowing the back end to provide information about available types.
8933         (Register_Back_End_Types): New procedure to register back end types.
8934         * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
8935         available types.
8936         * cstand.adb (Back_End_Float_Types): New list for floating point types
8937         supported by the back end.
8938         (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
8939         (Copy_Float_Type): New procedure to make new copies of predefined types.
8940         (Register_Float_Type): New call back procedure to populate the BEFT list
8941         (Find_Back_End_Float_Type): New procedure to find a BEFT by name
8942         (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
8943         (Create_Float_Types): New procedure to create entities for floating
8944         point types predefined in Standard, and put these and any remaining
8945         BEFTs on the Predefined_Float_Types list.
8946         * stand.ads (Predefined_Float_Types): New list for predefined floating
8947         point types that do not have declarations in package Standard.
8948
8949 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
8950
8951         * inline.adb (Get_Code_Unit_Entity): New local function.  Returns the
8952         entity node for the unit containing the parameter.
8953         (Add_Inlined_Body): Use it to find the unit containing the subprogram.
8954         (Add_Inlined_Subprogram): Likewise.
8955         * gcc-interface/Make-lang.in: Update dependencies.
8956
8957 2011-08-02  Thomas Quinot  <quinot@adacore.com>
8958
8959         * s-stusta.adb (Print): Make sure Pos is always initialized to a
8960         suitable value.
8961
8962 2011-08-02  Geert Bosch  <bosch@adacore.com>
8963
8964         * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
8965
8966 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
8967
8968         * sem_type.adb (Covers): Move trivial case to the top and reuse the
8969         computed value of Base_Type.
8970
8971 2011-08-02  Yannick Moy  <moy@adacore.com>
8972
8973         * restrict.adb (Check_Restriction): issue an error for any use of
8974         class-wide, even if the No_Dispatch restriction is not set.
8975         * sem_aggr.adb: Correct typos in comments and messages in formal mode
8976         * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
8977         when completing a private extension, the type named in the private part
8978         is not the same as that named in the visible part.
8979         * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
8980         of an inherited primitive operations of a tagged type or type extension
8981         that returns the tagged type.
8982         * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
8983         function which returns True for an implicit operation inherited by the
8984         derived type declaration for the argument type.
8985         (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
8986         order.
8987
8988 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8989
8990         * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
8991         Process_Bounds, to perform analysis with expansion of a range or an
8992         expression that is the iteration scheme for a loop.
8993         (Analyze_Iterator_Specification): If domain of iteration is given by a
8994         function call with a controlled result, as is the case if call returns
8995         a predefined container, ensure that finalization actions are properly
8996         generated.
8997         * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
8998
8999 2011-08-02  Javier Miranda  <miranda@adacore.com>
9000
9001         * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
9002         * gcc-interface/Make-lang.in: Update dependencies.
9003
9004 2011-08-02  Javier Miranda  <miranda@adacore.com>
9005
9006         * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
9007         determine if the analysis is performed using N or Original_Node (N).
9008         * exp_util.adb (Side_Effect_Free): Code cleanup since the new
9009         functionality of routine Is_Variable avoids code duplication.
9010         * checks.adb (Determine_Range): Handle temporaries generated by
9011         Remove_Side_Effects.
9012
9013 2011-08-02  Javier Miranda  <miranda@adacore.com>
9014
9015         * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
9016         expansion of the condition. Required since the previous analysis was
9017         done with expansion disabled (see Resolve_Quantified_Expression) and
9018         hence checks were not inserted and record comparisons have not been
9019         expanded.
9020
9021 2011-08-02  Ed Falis  <falis@adacore.com>
9022
9023         * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
9024         Update header.
9025
9026 2011-08-02  Bob Duff  <duff@adacore.com>
9027
9028         * opt.ads: Minor comment fix.
9029
9030 2011-08-02  Bob Duff  <duff@adacore.com>
9031
9032         * sem_ch12.adb (Analyze_Package_Instantiation,
9033         Analyze_Subprogram_Instantiation): Turn off style checking while
9034         analyzing an instance. Whatever style checks that apply to the generic
9035         unit should apply, so it makes no sense to apply them in an instance.
9036         This was causing trouble when compiling an instance of a runtime
9037         unit that violates the -gnatyO switch.
9038         * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
9039         one of the two case statements, causing spurious errors.
9040
9041 2011-08-02  Robert Dewar  <dewar@adacore.com>
9042
9043         * uname.adb: Minor reformatting.
9044         * gnatcmd.adb: Minor reformatting.
9045         * exp_attr.adb: Minor reformatting.
9046
9047 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9048
9049         * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
9050         No_Dispatching_Calls, do not look for the Assign primitive, because
9051         predefined primitives are not created in this case.
9052
9053 2011-08-02  Bob Duff  <duff@adacore.com>
9054
9055         * stylesw.ads: Minor comment fixes.
9056
9057 2011-08-02  Robert Dewar  <dewar@adacore.com>
9058
9059         * freeze.adb (Add_To_Result): New procedure.
9060
9061 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
9062
9063         * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
9064         time, if the specific run-time routines for handling streams of strings
9065         are not available, use the default mechanism.
9066
9067 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
9068
9069         * s-regpat.ads: Fix typo.
9070
9071 2011-08-02  Vincent Celier  <celier@adacore.com>
9072
9073         * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
9074         not null, call it to create the in memory config project file without
9075         parsing an existing default config project file.
9076
9077 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
9078
9079         * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
9080
9081 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9082
9083         * sem_elim.adb: an abstract subprogram does not need an eliminate
9084         pragma for its descendant to be eliminable.
9085
9086 2011-08-02  Ed Falis  <falis@adacore.com>
9087
9088         * init.c: revert to handling before previous checkin for VxWorks
9089         * s-intman-vxworks.adb: delete unnecessary declarations related to
9090         using Ada interrupt facilities for handling signals.
9091         Delete Initialize_Interrupts. Use __gnat_install_handler instead.
9092         * s-intman-vxworks.ads: Import __gnat_install_handler as
9093         Initialize_Interrupts.
9094         * s-taprop-vxworks.adb: Delete Signal_Mask.
9095         (Abort_Handler): change construction of mask to unblock exception
9096         signals.
9097
9098 2011-08-02  Jerome Guitton  <guitton@adacore.com>
9099
9100         * a-except-2005.adb (Raise_From_Signal_Handler): Call
9101         Debug_Raise_Exception before propagation starts.
9102
9103 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
9104
9105         * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
9106         to Restriction_Check_Required.
9107         * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
9108         * sem_res.adb (Resolve_Call): Likewise.
9109         * sem_attr.adb (Check_Stream_Attribute): Likewise.
9110
9111 2011-08-02  Bob Duff  <duff@adacore.com>
9112
9113         * stylesw.ads: Update comment.
9114         * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
9115         * errout.ads: Remove obsolete comment.
9116
9117 2011-08-02  Javier Miranda  <miranda@adacore.com>
9118
9119         * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
9120         (Set_Is_Safe_To_Reevaluate): new procedure.
9121         * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
9122         assignment is allowed on safe-to-reevaluate variables.
9123         (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
9124         temporary created to remove side effects in expressions that use
9125         the secondary stack as safe-to-reevaluate.
9126         * exp_util.adb (Side_Effect_Free): Add missing code to handle well
9127         variables that are not true constants.
9128
9129 2011-08-02  Robert Dewar  <dewar@adacore.com>
9130
9131         * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
9132         sem_res.adb, sem_ch6.adb: Minor reformatting.
9133
9134 2011-08-02  Jerome Guitton  <guitton@adacore.com>
9135
9136         * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
9137
9138 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9139
9140         * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
9141         not set Overridden_Operation if subprogram is an initialization
9142         procedure.
9143
9144 2011-08-02  Yannick Moy  <moy@adacore.com>
9145
9146         * par-ch6.adb: Correct obsolete name in comments
9147         * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
9148         which takes two message arguments (existing function takes one), with
9149         second message used for continuation.
9150         * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
9151         block statements that originate from a source block statement, not
9152         generated block statements
9153         * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
9154         symmetry with procedure case
9155         * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
9156         function to issue an error in formal mode if a package specification
9157         contains more than one tagged type or type extension.
9158         * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
9159         parameters matching formals of tagged types are objects (or ancestor
9160         type conversions of objects), not general expressions. Issue an error
9161         on view conversions that are not involving ancestor conversion of an
9162         extended type.
9163         (Resolve_Type_Conversion): in formal mode, issue an error on the
9164         operand of an ancestor type conversion which is not an object
9165         * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
9166         procedure so that it works also for actuals of function calls
9167         (Is_Actual_Tagged_Parameter): new function which determines if its
9168         argument is an actual parameter of a formal of tagged type in a
9169         subprogram call
9170         (Is_SPARK_Object_Reference): new function which determines if the tree
9171         referenced by its argument represents an object in SPARK
9172
9173 2011-08-02  Robert Dewar  <dewar@adacore.com>
9174
9175         * sem_ch3.adb: Minor reformatting
9176         Minor comment addition
9177         Minor error msg text change
9178
9179 2011-08-02  Javier Miranda  <miranda@adacore.com>
9180
9181         * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
9182         function. Used to be more precise when we generate a variable plus one
9183         assignment to remove side effects in the evaluation of the Bound
9184         expressions.
9185         (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
9186         of the bound expression to force its re-analysis and thus expand the
9187         associated transient scope (if required). Code cleanup replacing the
9188         previous code that declared the constant entity by an invocation to
9189         routine Force_Evaluation which centralizes this work in the frontend.
9190
9191 2011-08-02  Robert Dewar  <dewar@adacore.com>
9192
9193         * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
9194         (Base_Type): Now uses improved Is_Base_Type function
9195         * einfo.ads (Base_Type): Inline this function
9196
9197 2011-08-02  Robert Dewar  <dewar@adacore.com>
9198
9199         * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
9200         (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
9201
9202 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
9203
9204         * gcc-interface/Make-lang.in: Update dependencies.
9205         * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
9206         targets.
9207
9208 2011-08-02  Yannick Moy  <moy@adacore.com>
9209
9210         * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
9211         non-simple expression used in delta constraint
9212         (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
9213         index constraint which is not a subtype mark
9214         * par.adb: With and use Restrict
9215         * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
9216         mode on component type which is not a subtype mark and default
9217         expression on component
9218         (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
9219         of string which does not have a lower index bound equal to 1
9220         (Array_Type_Declaration): issue an error in formal mode on index or
9221         component type which is not a subtype mark, and on aliased keyword on
9222         component
9223         (Derived_Type_Declaration): issue an error in formal mode on interface,
9224         limited or abstract type
9225         (Record_Type_Declaration): issue an error in formal mode on interface
9226         (Record_Type_Definition): issue an error in formal mode on tagged types
9227         and type extensions not declared in the specification of a library unit
9228         package; on null non-tagged record; on variant part
9229
9230 2011-08-02  Vincent Celier  <celier@adacore.com>
9231
9232         * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
9233         not declared for qualified library project when Library_Name is not
9234         declared, but Library_Dir is.
9235
9236 2011-08-02  Robert Dewar  <dewar@adacore.com>
9237
9238         * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
9239         pragmas (affects aspects [Component_]Default_Value
9240         (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
9241         component type for the resolution
9242
9243 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
9244
9245         * einfo.adb (Base_Type): Tune implementation for speed.
9246
9247 2011-08-02  Robert Dewar  <dewar@adacore.com>
9248
9249         * freeze.adb: Minor reformatting.
9250
9251 2011-08-02  Thomas Quinot  <quinot@adacore.com>
9252
9253         * scos.ads: Update comments.
9254
9255 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9256
9257         * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
9258         base type, because the parent may be a subtype of a private type whose
9259         convention is established in a private part.
9260
9261 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
9262
9263         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
9264         statement in a block when the expansion of the return expression has
9265         created a finalization chain.
9266         * freeze.adb (Freeze_Expression): Alphabetize all choices associated
9267         with the parent node.
9268         Add N_Extended_Return_Statement to handle the case where a transient
9269         object declaration appears in the Return_Object_Declarations list of
9270         an extended return statement.
9271
9272 2011-08-02  Matthew Gingell  <gingell@adacore.com>
9273
9274         * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
9275         unused parameter 'name'.
9276
9277 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9278
9279         * sem_elim.adb (Set_Eliminated): If the overridden operation is an
9280         inherited operation, check whether its alias, which is the source
9281         operastion that it renames, has been marked eliminated.
9282
9283 2011-08-02  Javier Miranda  <miranda@adacore.com>
9284
9285         * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
9286         in-mode parameter whose type is an access type since it can be used to
9287         modify its designated object. Enforce code that handles as safe an
9288         access type that is not access-to-constant but it is the result of a
9289         previous removal of side-effects.
9290         (Remove_Side_Effects): Minor code reorganization of cases which require
9291         no action. Done to incorporate documentation on new cases uncovered
9292         working in this ticket: no action needed if this routine was invoked
9293         too early and the nodes are not yet decorated.
9294         * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
9295         to routine Remove_Side_Effects by calls to Force_Evaluation since they
9296         were issued with actuals that are implicitly provided by
9297         Force_Evaluation.
9298
9299 2011-08-02  Robert Dewar  <dewar@adacore.com>
9300
9301         * sem_ch3.adb, sem_res.adb: Minor reformatting.
9302
9303 2011-08-02  Yannick Moy  <moy@adacore.com>
9304
9305         * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
9306         to issue an error in formal mode on attribute not supported in this mode
9307         (Analyze_Attribute): issue errors on standard attributes not supported
9308         in formal mode.
9309         * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
9310         comment, and issue error in formal mode on modulus which is not a power
9311         of 2.
9312         (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
9313         range.
9314         * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
9315         subtype mark.
9316         * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
9317         operator on modular type (except 'not').
9318
9319 2011-08-02  Robert Dewar  <dewar@adacore.com>
9320
9321         * gnat_rm.texi: Minor reformatting.
9322
9323 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
9324
9325         * s-osinte-linux.ads: Minor comment update and reformatting.
9326         * i-cexten.ads: Make this unit pure, as for its parent.
9327         Will allow its usage in more contexts if needed.
9328
9329 2011-08-02  Robert Dewar  <dewar@adacore.com>
9330
9331         * s-utf_32.ads: Minor comment fix.
9332
9333 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9334
9335         * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
9336         operation of a tagged synchronized type, handle the case where the
9337         controlling argument is overloaded.
9338
9339 2011-08-02  Yannick Moy  <moy@adacore.com>
9340
9341         * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
9342         Replace pragma SPARK_95 with pragma Restrictions (SPARK)
9343         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
9344         SPARK mode and formal verification mode on processing SPARK restriction
9345         * s-rident.ads (Restriction_Id): add SPARK restriction in those not
9346         requiring consistency checking.
9347
9348 2011-08-02  Robert Dewar  <dewar@adacore.com>
9349
9350         * sem_res.adb: Minor reformatting.
9351
9352 2011-08-02  Robert Dewar  <dewar@adacore.com>
9353
9354         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
9355         a-cforse.ads: Remove unneeded with of Ada.Containers
9356         Remove commented out pragma Inline's
9357         Move specifications of new subprograms to the actual specs
9358
9359 2011-08-02  Yannick Moy  <moy@adacore.com>
9360
9361         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
9362         a-cforse.ads: Update comments.
9363
9364 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9365
9366         * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
9367
9368 2011-08-02  Robert Dewar  <dewar@adacore.com>
9369
9370         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
9371         a-cforse.ads, a-cofove.ads: Minor reformatting.
9372
9373 2011-08-02  Claire Dross  <dross@adacore.com>
9374
9375         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
9376         a-cofove.ads: Add comments.
9377
9378 2011-08-02  Yannick Moy  <moy@adacore.com>
9379
9380         * gnat_rm.texi: Document formal containers.
9381
9382 2011-08-02  Emmanuel Briot  <briot@adacore.com>
9383
9384         * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
9385         are empty sections.
9386
9387 2011-08-02  Robert Dewar  <dewar@adacore.com>
9388
9389         * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
9390         reformatting.
9391
9392 2011-08-02  Robert Dewar  <dewar@adacore.com>
9393
9394         * aspects.adb: New aspects Default_Value and Default_Component_Value
9395         New format of Aspect_Names table checks for omitted entries
9396         * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
9397         handling of boolean aspects for derived types.
9398         New aspects Default_Value and Default_Component_Value
9399         New format of Aspect_Names table checks for omitted entries
9400         * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
9401         (Has_Default_Value): New flag
9402         (Has_Default_Component_Value): New flag
9403         (Has_Default_Value): New flag
9404         * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
9405         table.
9406         * par-prag.adb: New pragmas Default_Value and Default_Component_Value
9407         * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
9408         Default_Value and Default_Component_Value
9409         * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
9410         New aspects Default_Value and Default_Component_Value
9411         * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
9412         * sprint.adb: Print N_Aspect_Specification node when called from gdb
9413
9414 2011-08-02  Vincent Celier  <celier@adacore.com>
9415
9416         * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
9417         inherit library kind.
9418
9419 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9420
9421         * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
9422         Minor reformatting.
9423
9424 2011-08-02  Robert Dewar  <dewar@adacore.com>
9425
9426         * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
9427
9428 2011-08-02  Yannick Moy  <moy@adacore.com>
9429
9430         * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
9431
9432 2011-08-02  Robert Dewar  <dewar@adacore.com>
9433
9434         * impunit.adb: Add comment.
9435
9436 2011-08-02  Yannick Moy  <moy@adacore.com>
9437
9438         * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
9439         qualification of aggregates in formal mode
9440         (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
9441         another aggregate
9442         (Resolve_Aggregate): complete the test that an aggregate is adequately
9443         qualified in formal mode
9444
9445 2011-08-02  Pascal Obry  <obry@adacore.com>
9446
9447         * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
9448         * mlib-prj.adb: Supress warning when compiling binder generated file.
9449         (Build_Library): Supress all warnings when compiling the binder
9450         generated file.
9451
9452 2011-08-02  Yannick Moy  <moy@adacore.com>
9453
9454         * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
9455         from here...
9456         * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
9457         * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
9458         Add with/use clauses to make Check_Formal_Restriction visible
9459
9460 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9461
9462         * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
9463         in-parameters when type of the generic formal is private in the generic
9464         spec and non-private in the body.
9465
9466 2011-08-02  Claire Dross  <dross@adacore.com>
9467
9468         * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
9469         a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
9470         a-cofove.adb, a-cofove.ads: New files implementing formal containers.
9471         * impunit.adb, Makefile.rtl: Take new files into account.
9472
9473 2011-08-02  Robert Dewar  <dewar@adacore.com>
9474
9475         * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
9476         sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
9477
9478 2011-08-02  Yannick Moy  <moy@adacore.com>
9479
9480         * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
9481         formal mode
9482         * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
9483         matching static array bounds, taking into account the special case of
9484         string literals
9485         * sem_ch3.adb: Typo in comment.
9486
9487 2011-08-02  Yannick Moy  <moy@adacore.com>
9488
9489         * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
9490         which issues an error in formal mode if its argument node is originally
9491         from source
9492         * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
9493         has a discriminant specification so that it does not include the case
9494         of derived types
9495         (Derived_Type_Declaration): move here the test that a derived type has a
9496         discriminant specification
9497         * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
9498         first element of a component association before accessing its choices
9499         (presence of component association is not enough)
9500         * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
9501         declaration is a library item before accessing the next element in a
9502         list, as library items are not member of lists
9503         * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
9504         sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
9505         Check_Formal_Restriction whenever possible.
9506
9507 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9508
9509         * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
9510         reference when needed.
9511
9512 2011-08-02  Bob Duff  <duff@adacore.com>
9513
9514         * gnat_ugn.texi: Fix typo.
9515
9516 2011-08-02  Vincent Celier  <celier@adacore.com>
9517
9518         * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
9519         archive file name. Do not use the full path name of archives for Open
9520         VMS.
9521
9522 2011-08-02  Robert Dewar  <dewar@adacore.com>
9523
9524         * sem_ch12.adb, sem_ch11.adb: New calling sequence for
9525         Analyze_Aspect_Specifications
9526         * sem_ch13.adb
9527         (Analyze_Aspect_Specifications): New handling for boolean aspects
9528         * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
9529         * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
9530         sequence for Analyze_Aspect_Specifications
9531         * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
9532         * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
9533
9534 2011-08-02  Robert Dewar  <dewar@adacore.com>
9535
9536         * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
9537         aspects, since these no longer exist.
9538
9539 2011-08-02  Robert Dewar  <dewar@adacore.com>
9540
9541         * par-ch13.adb (Aspect_Specifications_Present): Always return false on
9542         semicolon, do not try to see if there are aspects following it.
9543         * par-ch3.adb (P_Declarative_Items): Better message for unexpected
9544         aspect spec.
9545
9546 2011-08-02  Robert Dewar  <dewar@adacore.com>
9547
9548         * sem_ch8.adb, aspects.ads: Minor reformatting.
9549
9550 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
9551
9552         * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
9553         * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
9554         extracted from...
9555         (Analyze_Aspect_Specifications): ...here.  Call above procedure.
9556
9557 2011-08-02  Yannick Moy  <moy@adacore.com>
9558
9559         * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
9560         mode on subprogram declaration outside of package specification, unless
9561         it is followed by a pragma Import
9562         * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
9563         Access_Type_Declaration): issue error in formal mode on access type
9564         (Analyze_Incomplete_Type_Decl): issue error in formal mode on
9565         incomplete type
9566         (Analyze_Object_Declaration): issue error in formal mode on object
9567         declaration which does not respect SPARK restrictions
9568         (Analyze_Subtype_Declaration): issue error in formal mode on subtype
9569         declaration which does not respect SPARK restrictions
9570         (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
9571         error in formal mode on digits or delta constraint
9572         (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
9573         decimal fixed point type
9574         (Derived_Type_Declaration): issue error in formal mode on derived type
9575         other than type extensions of tagged record types
9576         * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
9577         with check on access definition
9578         * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
9579         mode on protected definition.
9580         (Analyze_Task_Definition): issue error in formal mode on task definition
9581
9582 2011-08-02  Robert Dewar  <dewar@adacore.com>
9583
9584         * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
9585
9586 2011-08-02  Javier Miranda  <miranda@adacore.com>
9587
9588         * sem_ch6.adb (Can_Override_Operator): New function.
9589         (Verify_Overriding_Indicator): Add missing code to check overriding
9590         indicator in operators. Fixes regression.
9591         (Check_Overriding_Indicator): Minor reformating after replacing the
9592         code that evaluates if the subprogram can override an operator by
9593         invocations to the above new function.
9594         * einfo.adb
9595         (Write_Field26_Name): Add missing code to ensure that, following
9596         the documentation in einfo.ads, this field is not shown as attribute
9597         "Static_Initialization" on non-dispatching functions.
9598
9599 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
9600
9601         * sem_res.adb (Resolve_Call): A call to
9602         Ada.Real_Time.Timing_Events.Set_Handler violates restriction
9603         No_Relative_Delay (AI-0211) only when it sets a relative timing event,
9604         i.e., when the second parameter is of type Time_Span.
9605
9606 2011-08-02  Vincent Celier  <celier@adacore.com>
9607
9608         * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
9609         with an archive instead of -L<library dir> -l<library name>.
9610
9611 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9612
9613         * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
9614         mark the base types In_Use in addition to making the operations
9615         use_visible.
9616
9617 2011-08-02  Ed Falis  <falis@adacore.com>
9618
9619         * init.c: add and setup __gnat_signal_mask for the exception signals
9620         * s-inmaop-vxworks.adb: new file.
9621         * s-intman-vxworks.adb: remove unnecessary initializations and
9622         simplify remaining
9623         * s-intman-vxworks.ads: remove unnecessary variable
9624         * s-taprop-vxworks.adb: simplify signal initialization
9625
9626 2011-08-02  Robert Dewar  <dewar@adacore.com>
9627
9628         * sem_ch8.adb: Minor code reorganization, comment updates.
9629
9630 2011-08-02  Robert Dewar  <dewar@adacore.com>
9631
9632         * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
9633         * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
9634         here from Sem_Res.
9635         (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
9636         (Matching_Static_Array_Bounds): Moved here from Sem_Res
9637
9638 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9639
9640         * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
9641         * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
9642         * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
9643         use_type_clauses, to handle more efficiently use_type and use_all_type
9644         constructs.
9645         * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
9646         Ada2012 Use_All_Type clause.
9647         (Use_Class_Wide_Operations): new procedure.
9648
9649 2011-08-02  Robert Dewar  <dewar@adacore.com>
9650
9651         * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
9652         sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
9653         expression to expression function.
9654
9655 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9656
9657         * sem_ch4.adb: transform simple Ada2012 membership into equality only
9658         if types are compatible.
9659
9660 2011-08-02  Yannick Moy  <moy@adacore.com>
9661
9662         * sem_res.adb (Matching_Static_Array_Bounds): new function which
9663         returns True if its argument array types have same dimension and same
9664         static bounds at each index.
9665         (Resolve_Actuals): issue an error in formal mode on actuals passed as
9666         OUT or IN OUT paramaters which are not view conversions in SPARK.
9667         (Resolve_Arithmetic_Op): issue an error in formal mode on
9668         multiplication or division with operands of fixed point types which are
9669         not qualified or explicitly converted.
9670         (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
9671         Boolean or array type (except String) operands.
9672         (Resolve_Equality_Op): issue an error in formal mode on equality
9673         operators for array types other than String with non-matching static
9674         bounds.
9675         (Resolve_Logical_Op): issue an error in formal mode on logical operators
9676         for array types with non-matching static bounds. Factorize the code in
9677         Matching_Static_Array_Bounds.
9678         (Resolve_Qualified_Expression): issue an error in formal mode on
9679         qualified expressions for array types with non-matching static bounds.
9680         (Resolve_Type_Conversion): issue an error in formal mode on type
9681         conversion for array types with non-matching static bounds
9682
9683 2011-08-02  Robert Dewar  <dewar@adacore.com>
9684
9685         * par-ch10.adb: Minor code reorganization (use Nkind_In).
9686
9687 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9688
9689         * par-ch9.adb: save location of entry for proper error message.
9690
9691 2011-08-02  Javier Miranda  <miranda@adacore.com>
9692
9693         * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
9694         (Use_Full_View) which permits this routine to climb through the
9695         ancestors using the full-view of private parents.
9696         * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
9697         Use_Full_View to true in calls to Is_Ancestor.
9698         * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
9699         true in call to Is_Ancestor.
9700         * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
9701         Use_Full_View to true in call to Is_Ancestor.
9702         * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
9703         call to Is_Ancestor.
9704         * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
9705         Use_Full_View to true in calls to Is_Ancestor.
9706         * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
9707         Make_Select_Specific_Data_Table, Register_Primitive,
9708         Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
9709         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
9710         to true in call to Is_Ancestor.
9711         * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
9712         Use_Full_View to true in calls to Is_Ancestor.
9713         * exp_cg.adb
9714         (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
9715         (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
9716
9717 2011-08-02  Robert Dewar  <dewar@adacore.com>
9718
9719         * gnat_rm.texi: Minor reformatting.
9720         * sem_prag.adb: Minor reformatting.
9721
9722 2011-08-02  Tristan Gingold  <gingold@adacore.com>
9723
9724         * vms_data.ads: Add VMS qualifier for -gnateP.
9725
9726 2011-08-02  Robert Dewar  <dewar@adacore.com>
9727
9728         * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
9729         * par-ch7.adb (P_Package): Proper placement of aspects for package
9730         decl/instantiation.
9731         * par-endh.adb (Check_End): Ad Is_Sloc parameter
9732         (End_Statements): Add Is_Sloc parameterr
9733         * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
9734         (Check_End): Ad Is_Sloc parameter
9735         (End_Statements): Add Is_Sloc parameterr
9736
9737 2011-08-02  Vincent Celier  <celier@adacore.com>
9738
9739         * ug_words: Add VMS qualifier equivalent to -gnateP:
9740         /SYMBOL_PREPROCESSING.
9741
9742 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
9743
9744         * gnat-style.texi: For hexadecimal numeric literals the typical
9745         grouping of digits is 4 to represent 2 bytes.
9746         A procedure spec which is split into several lines is indented two
9747         characters.
9748
9749 2011-08-02  Yannick Moy  <moy@adacore.com>
9750
9751         * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
9752         * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
9753         (Resolve_Aggregate): issue errors in formal modes when aggregate is not
9754         properly qualified
9755         (Resolve_Array_Aggregate): issue errors in formal modes on non-static
9756         choice in array aggregate
9757         (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
9758         mark as ancestor
9759         (Resolve_Record_Aggregate): issue errors in formal modes on mixed
9760         positional and named aggregate for record, or others in record
9761         aggregate, or multiple choice in record aggregate
9762         * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
9763         array operands to logical operations AND, OR and XOR do not have the
9764         same static lower and higher bounds
9765         * sem_ch5.adb, sinfo.ads: Correct typos in comments
9766
9767 2011-08-01  Robert Dewar  <dewar@adacore.com>
9768
9769         * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
9770         Replaces Last_Source_Node_In_Sequence.
9771         * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
9772         * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
9773         parens and blank in string (this was inconsistently implemented).
9774         * errout.ads
9775         (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
9776         blank in string (this was inconsistently implemented).
9777         * gnat1drv.adb
9778         (Set_Global_Switches): Set formal mode switches appropriately
9779         * opt.ads, opt.adb: Formal mode is now global switches, more consistent
9780         * par-prag.adb
9781         (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
9782         call Set_Error_Msg_Lang to set "spark" as language name.
9783         * par.adb: Remove unnecessary call to set formal language for errout
9784         * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
9785         appropriately and call Set_Error_Msg_Lang to set "spark" as language
9786         name.
9787         * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
9788         calls to it, moved after resolution so that types are known
9789         * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
9790         result of concatenation is not of type String
9791         (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
9792         concatenation is not properly restricted
9793         * gnat_rm.texi: Add doc on pragma Spark_95.
9794         * gcc-interface/Makefile.in: Remove obsolete target pairs for
9795         Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
9796         * gcc-interface/Make-lang.in: Update dependencies.
9797
9798 2011-08-01  Javier Miranda  <miranda@adacore.com>
9799
9800         * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
9801         condition that detects if the overridden operation must replace an
9802         existing entity.
9803
9804 2011-08-01  Javier Miranda  <miranda@adacore.com>
9805
9806         * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
9807         code declarations inserted by Insert_Actions in each alternative of the
9808         N_Case_Expression node.
9809
9810 2011-08-01  Robert Dewar  <dewar@adacore.com>
9811
9812         * sem_ch6.adb: Minor code reorganization.
9813         * sem_util.adb: Minor reformatting.
9814
9815 2011-08-01  Pascal Obry  <obry@adacore.com>
9816
9817         * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
9818         * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
9819
9820 2011-08-01  Yannick Moy  <moy@adacore.com>
9821
9822         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
9823         literal or operator symbol which is prefixed
9824         * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
9825         mode on access attributes.
9826         * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
9827         that concatenation operands are properly restricted in formal mode
9828         (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
9829         Analyze_Concatenation_Operand. Issue an error in formal mode if the
9830         result of the concatenation has a type different from String.
9831         (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
9832         Analyze_Quantified_Expression, Analyze_Slice,
9833         Analyze_Null): issue an error in formal mode on unsupported constructs
9834         * sem_ch5.adb
9835         (Analyze_Block_Statement): only issue error on source block statement
9836         * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
9837         function which returns the last node in a list of nodes for which
9838         Comes_From_Source returns True, if any
9839         * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
9840         Last_Source_Node_In_Sequence
9841         * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
9842         Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
9843         mode on unsupported constructs
9844         * sem_ch9.adb Do not return after issuing error in formal mode, as the
9845         rest of the actions may be needed later on since the error is marked as
9846         not serious.
9847         * sinfo.ads: Typos in comments.
9848
9849 2011-08-01  Pascal Obry  <obry@adacore.com>
9850
9851         * projects.texi: Minor editing.
9852
9853 2011-08-01  Yannick Moy  <moy@adacore.com>
9854
9855         * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
9856         insertion character ~~
9857         * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
9858         (Set_Error_Msg_Lang): new procedure which fixes the language for use
9859         with insertion character ~~
9860         (Set_Msg_Text): treat insertion character ~~
9861         * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
9862         sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
9863         Formal_Error_Msg_... procedures by equivalent Error_Msg_...
9864         procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
9865         errors related to the formal language restriction not serious
9866         (insertion character |).
9867         * par.adb (Par): set formal language for error messages if needed
9868         * sem_ch6.adb (Check_Missing_Return): take into account possible
9869         generated statements at the end of the function
9870         * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
9871         enumeration value to define a new pragma SPARK_95
9872         * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
9873         SPARK_Version): new type and variables to store the SPARK version
9874         (none by default).
9875         (SPARK_Mode): return True when SPARK_Version is set
9876         * par-prag.adb: Correct indentation
9877         (Prag): take Pragma_SPARK_95 into account
9878         * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
9879         into account.
9880
9881 2011-08-01  Robert Dewar  <dewar@adacore.com>
9882
9883         * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
9884         sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
9885         sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
9886
9887 2011-08-01  Pascal Obry  <obry@adacore.com>
9888
9889         * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
9890         Target_Name to Get_Path call.
9891         (Parse_Single_Project): Likewise.
9892         (Post_Parse_Context_Clause): Likewise.
9893         * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
9894         Call Initialise_Project_Path with the proper Target_Name.
9895         (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
9896         search path.
9897         (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
9898         with the proper Target_Name.
9899         * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
9900         Part.Parse routine.
9901         (Parse_Project_And_Apply_Config): Likewise.
9902         * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
9903         This is fine as this part of the code is supporting only native
9904         compilation.
9905         * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
9906         is fine as this part of the code is supporting only native compilation.
9907
9908 2011-08-01  Yannick Moy  <moy@adacore.com>
9909
9910         * sem_util.adb (Enter_Name): issue error in formal mode on declaration
9911         of homonym, unless the homonym is one of the cases allowed in SPARK
9912         * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
9913         package declaration occurring after a body.
9914
9915 2011-08-01  Robert Dewar  <dewar@adacore.com>
9916
9917         * checks.adb, exp_ch4.adb: Minor reformatting.
9918
9919 2011-08-01  Javier Miranda  <miranda@adacore.com>
9920
9921         * einfo.ads (Access_Disp_Table): Fix documentation.
9922         (Dispatch_Table_Wrappers): Fix documentation.
9923
9924 2011-08-01  Pascal Obry  <obry@adacore.com>
9925
9926         * prj-env.adb, prj-env.ads: Minor reformatting.
9927
9928 2011-08-01  Yannick Moy  <moy@adacore.com>
9929
9930         * sem_util.ads, sem_util.adb, par.adb, par_util.adb
9931         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
9932         procedures out of these packages.
9933         * errout.ads, errout.adb
9934         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
9935         procedures in of this package
9936         (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
9937         * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
9938         on misplaced later vs initial declarations, like in Ada 83
9939         * sem_attr.adb (Processing for Analyze_Attribute): issue error in
9940         formal mode on attribute of private type whose full type declaration
9941         is not visible
9942         * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
9943         package declaration inside a package specification
9944         (Analyze_Full_Type_Declaration): issue error in formal mode on
9945         controlled type or discriminant type
9946         * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
9947         user-defined operator means that it should come from the source
9948         (New_Overloaded_Entity): issue error in formal mode on overloaded
9949         entity.
9950         * sem_ch6.ads, sem_ch13.ads: typos in comments.
9951
9952 2011-08-01  Thomas Quinot  <quinot@adacore.com>
9953
9954         * atree.adb: Minor reformatting.
9955         * checks.adb: Minor reformatting.
9956
9957 2011-08-01  Vincent Celier  <celier@adacore.com>
9958
9959         * s-parame-vms-ia64.ads: Fix typo in comment
9960         Minor reformatting
9961         * s-parame-vms-restrict.ads: Removed, unused.
9962
9963 2011-08-01  Javier Miranda  <miranda@adacore.com>
9964
9965         * exp_ch3.adb
9966         (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
9967         * sem_ch3.adb
9968         (Constrain_Index): Remove side effects in the evaluation of the bounds.
9969         * sem_ch3.ads, sem_ch3.adb
9970         (Is_Constant_Bound): New extended version of the subprogram that was
9971         previously located inside function Exp_Ch3.Is_Variable_Size_Array.
9972         Moved here since it is shared by routines of sem_ch3 and exp_ch3.
9973         * sem_aux.ads (Constant_Value): Fix typo in comment.
9974         * checks.adb (Generate_Index_Checks): New implementation which, for
9975         array objects with constant bounds, generates the runtime check
9976         referencing the bounds of the array type. For other cases this routine
9977         provides its previous behavior obtaining such values from the array
9978         object.
9979         * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
9980         parent type.
9981         * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
9982         we cannot have semantic interpretations of the new node.
9983
9984 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
9985
9986         * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
9987         expressions.
9988
9989 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
9990
9991         * sem_ch8.adb: Minor code editing.
9992         * s-vxwext.adb: Remove trailing space.
9993         * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
9994         consistency with other files.
9995
9996 2011-08-01  Thomas Quinot  <quinot@adacore.com>
9997
9998         * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
9999
10000 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10001
10002         * par-ch10.adb: reject parameterized expressions as compilation unit.
10003         * sem_ch4.adb: handle properly conditional expression with overloaded
10004         then_clause and no else_clause.
10005
10006 2011-08-01  Tristan Gingold  <gingold@adacore.com>
10007
10008         * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
10009         like done by System.Aux_DEC.
10010         * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
10011
10012 2011-08-01  Yannick Moy  <moy@adacore.com>
10013
10014         * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
10015         missing label at end of declaration (subprogram or package)
10016         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
10017         of positional and named parameter association
10018         * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
10019         Error_Msg_SP which adds a prefix to the error message giving the name
10020         of the formal language analyzed
10021         * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
10022         access result type in subprogram, unconstrained array as result type,.
10023         (Analyze_Subprogram_Declaration): issue an error in formal mode for null
10024         procedure
10025         * sem_ch8.adb: Code clean up.
10026
10027 2011-08-01  Javier Miranda  <miranda@adacore.com>
10028
10029         * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
10030         * einfo.ads (Access_Disp_Table): Fix documentation.
10031         (Dispatch_Table_Wrappers): Fix documentation.
10032         * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
10033         Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
10034         to enforce the documentation of this attribute.
10035         (Set_Is_Interface): Cleanup the assertion.
10036         * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
10037         the Underlying_Type entity before reading attribute Access_Disp_Table.
10038         * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
10039         Locate the Underlying_Type before reading attribute Access_Disp_Table.
10040         * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
10041         the Underlying_Type entity before reading attribute Access_Disp_Table.
10042         * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
10043         Locate the Underlying_Type entity before reading attribute
10044         Access_Disp_Table.
10045
10046 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10047
10048         * s-poosiz.ads: Additional overriding indicators.
10049
10050 2011-08-01  Yannick Moy  <moy@adacore.com>
10051
10052         * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
10053         formal mode.
10054         (Analyze_Iteration_Scheme): issue error in formal mode when loop
10055         parameter specification does not include a subtype mark.
10056         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
10057         formal mode on abstract subprogram.
10058         (Analyze_Subprogram_Specification): issue error in formal mode on
10059         user-defined operator.
10060         (Process_Formals): issue error in formal mode on access parameter and
10061         default expression.
10062         * sem_ch9.adb (Analyze_Abort_Statement,
10063         Analyze_Accept_Statement, Analyze_Asynchronous_Select,
10064         Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
10065         Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
10066         Analyze_Requeue, Analyze_Selective_Accept,
10067         Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
10068         * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
10069         issue error in formal mode on user-defined raise statement.
10070
10071 2011-08-01  Thomas Quinot  <quinot@adacore.com>
10072
10073         * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
10074         declaration being hidden when overriding an implicit inherited
10075         subprogram.
10076         * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
10077         (-gnats), do not complain about a source file that contains only a
10078         pragma No_Body.
10079
10080 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10081
10082         * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
10083         variable if already set.
10084
10085 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
10086
10087         * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
10088         g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
10089         s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
10090         g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
10091         g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
10092         g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
10093         g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
10094         g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
10095         g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
10096         g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
10097         g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
10098         s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
10099         g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
10100         s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
10101         g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
10102         g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
10103         g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
10104         g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
10105         g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
10106         g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
10107         s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
10108         s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
10109         a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
10110         s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
10111         s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
10112         g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
10113         g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
10114         g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
10115         g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
10116         g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
10117         g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
10118         s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
10119         s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
10120         g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
10121         g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
10122         s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
10123         s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
10124         g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
10125         g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
10126         g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
10127         s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
10128         g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
10129         g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
10130         g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
10131         s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
10132         g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
10133         g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
10134         g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
10135         s-osinte-mingw.ads: Update to GPLv3 run-time license.
10136         Use GNAT instead of GNARL.
10137
10138 2011-08-01  Bob Duff  <duff@adacore.com>
10139
10140         * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
10141         a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
10142         a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
10143         reformatting.
10144
10145 2011-08-01  Yannick Moy  <moy@adacore.com>
10146
10147         * debug.adb (d.D) reverve flag for the SPARK mode
10148         (d.E) reverve flag for SPARK generation mode
10149         (d.F) reverve flag for Why generation mode
10150         * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
10151         ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode):  New
10152         functions which return True when the corresponding modes are set
10153         (Formal_Language): return "spark" or "alfa" when in formal verification
10154         mode.
10155         * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
10156         Error_Msg to prefix the error message with a tag giving the formal
10157         language
10158         (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
10159         message with a tag giving the formal language
10160         * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
10161         block statement
10162         (Analyze_Case_Statement): issue error in formal mode on case statement
10163         with a single "others" case alternative
10164         (Analyze_Exit_Statement): issue errors in formal mode on exit
10165         statements which do not respect SPARK restrictions
10166         (Analyze_Goto_Statement): issue error in formal mode on goto statement
10167         (Check_Unreachable_Code): always issue an error (not a warning) in
10168         formal mode on unreachable code (concerns both code after an infinite
10169         loop and after an unconditional jump, both not allowed in SPARK)
10170         * sem_ch6.adb (Analyze_Return_Statement): add call to
10171         Set_Return_Present for a procedure containing a return statement
10172         (already done for functions in Analyze_Function_Return)
10173         (Analyze_Function_Return): issue error in formal mode on extended
10174         return or if return is not last statement in function
10175         (Check_Missing_Return): issue error in formal mode if function does
10176         not end with return or if procedure contains a return
10177         * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
10178         function to detect if there is an inner scope of its parameter S which
10179         is a loop.
10180
10181 2011-08-01  Thomas Quinot  <quinot@adacore.com>
10182
10183         * sem_ch6.ads: Minor reformatting.
10184
10185 2011-08-01  Javier Miranda  <miranda@adacore.com>
10186
10187         * sem_util.adb (Abstract_Interface_List): Complete condition when
10188         processing private type declarations to avoid reading unavailable
10189         attribute.
10190         (Is_Synchronized_Tagged_Type): Complete condition when processing
10191         private extension declaration nodes to avoid reading unavailable
10192         attribute.
10193
10194 2011-08-01  Thomas Quinot  <quinot@adacore.com>
10195
10196         * sem_ch3.adb: Minor reformatting.
10197
10198 2011-08-01  Thomas Quinot  <quinot@adacore.com>
10199
10200         * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
10201         i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
10202         s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
10203         s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
10204         for VMS, instead parametrize the common implementation with
10205         System.Parameters declarations.
10206
10207 2011-08-01  Eric Botcazou  <ebotcazou@adacore.com>
10208
10209         * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
10210
10211 2011-08-01  Tristan Gingold  <gingold@adacore.com>
10212
10213         * seh_init.c: Fix SEH handler installation on win64.
10214
10215 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10216
10217         * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
10218         double analysis of an anonymous access to subprogram, because it can
10219         lead to improper sharing of profiles and a back-end crash.
10220
10221 2011-08-01  Robert Dewar  <dewar@adacore.com>
10222
10223         * make.adb, sem_ch4.adb: Minor reformatting.
10224         * gcc-interface/Make-lang.in: Update dependencies.
10225         * sem_util.adb, exp_ch5.adb: Minor reformatting.
10226
10227 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
10228
10229         * gnat_rm.texi: Fix definition of Long_Integer.
10230
10231 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10232
10233         * exp_aggr.adb: check limit size of static aggregate unconditionally,
10234         to prevent storage exhaustion.
10235         * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
10236         finalized is a function body, insert the cleanup code before the final
10237         return statement, to prevent spurious warnings.
10238         * s-pooglo.ads: add overriding indicator.
10239
10240 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10241
10242         * sem_ch4.adb (Operator_Check): improve error message when both a
10243         with_clause and a use_clause are needed to make operator usage legal.
10244         * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
10245         determine whether a compilation unit is visible within an other,
10246         either through a with_clause in the current unit, or a with_clause in
10247         its library unit or one one of its parents.
10248
10249 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10250
10251         * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
10252         over an arbitrary expression of an array or container type.
10253         * lib-xref.adb: clarify comment.
10254
10255 2011-08-01  Bob Duff  <duff@adacore.com>
10256
10257         * einfo.ads: Minor reformatting.
10258         * debug.adb: Minor comment improvement.
10259
10260 2011-08-01  Javier Miranda  <miranda@adacore.com>
10261
10262         * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
10263         consider hidden subprograms as valid candidates.
10264
10265 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
10266
10267         * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
10268
10269 2011-08-01  Vasiliy Fofanov  <fofanov@adacore.com>
10270
10271         * gnat_ugn.texi: Fix typo.
10272
10273 2011-08-01  Robert Dewar  <dewar@adacore.com>
10274
10275         * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
10276         lib-xref.adb: Minor reformatting
10277
10278 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
10279
10280         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
10281         when to generate a call to Move_Final_List.
10282         (Has_Controlled_Parts): Remove this function.
10283
10284 2011-08-01  Geert Bosch  <bosch@adacore.com>
10285
10286         * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
10287         "," in choice list.
10288
10289 2011-08-01  Thomas Quinot  <quinot@adacore.com>
10290
10291         * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
10292         explicit raise of a predefined exception as Comes_From_Source if the
10293         original N_Raise_Statement comes from source.
10294
10295 2011-08-01  Robert Dewar  <dewar@adacore.com>
10296
10297         * sinfo.ads: Add comment.
10298         * sem_ch6.adb: Minor reformatting.
10299
10300 2011-08-01  Robert Dewar  <dewar@adacore.com>
10301
10302         * freeze.adb (Freeze_Entity): Refine check for bad component size
10303         clause to avoid rejecting confirming clause when atomic/aliased present.
10304
10305 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10306
10307         * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
10308         better determine whether an entity reference is a write.
10309         * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
10310         subcomponent.
10311         * lib-xref.adb (Output_References): Do no suppress a read reference at
10312         the same location as an immediately preceeding modify-reference, to
10313         handle properly in-out actuals.
10314
10315 2011-08-01  Tristan Gingold  <gingold@adacore.com>
10316
10317         * env.c (__gnat_setenv) [VMS]: Refine previous change.
10318
10319 2011-08-01  Quentin Ochem  <ochem@adacore.com>
10320
10321         * i-cstrin.adb (New_String): Changed implementation, now uses only the
10322         heap to compute the result.
10323
10324 2011-08-01  Robert Dewar  <dewar@adacore.com>
10325
10326         * atree.ads: Minor reformatting.
10327
10328 2011-08-01  Emmanuel Briot  <briot@adacore.com>
10329
10330         * g-expect.adb (Get_Command_Output): Fix memory leak.
10331
10332 2011-08-01  Geert Bosch  <bosch@adacore.com>
10333
10334         * cstand.adb (P_Float_Type): New procedure to print the definition of
10335         predefined fpt types.
10336         (P_Mixed_Name): New procedure to print a name using mixed case
10337         (Print_Standard): Use P_Float_Type for printing floating point types
10338         * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
10339         precision IEEE float.
10340
10341 2011-08-01  Thomas Quinot  <quinot@adacore.com>
10342
10343         * sem_ch3.adb: Minor reformatting.
10344
10345 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10346
10347         * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
10348         the completion of a generic function, insert the new body rather than
10349         rewriting the original.
10350
10351 2011-08-01  Yannick Moy  <moy@adacore.com>
10352
10353         * sinfo.ads, errout.ads: Typos in comments.
10354
10355 2011-08-01  Robert Dewar  <dewar@adacore.com>
10356
10357         * par-endh.adb: Minor reformatting.
10358
10359 2011-08-01  Robert Dewar  <dewar@adacore.com>
10360
10361         * aspects.ads, aspects.adb: Add aspects for library unit pragmas
10362         (Pre_Post_Aspects): New subtype.
10363         * par-ch12.adb (P_Generic): New syntax for aspects in packages
10364         * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
10365         * par-ch7.adb (P_Package): Remove Decl parameter
10366         (P_Package): Handle new syntax for aspects (before IS)
10367         * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
10368         new aspect syntax
10369         (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
10370         * par.adb (P_Aspect_Specifications): Add Semicolon parameter
10371         (P_Package): Remove Decl parameter
10372         * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
10373         aspects
10374         * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
10375         specs
10376         * sem_util.ads, sem_util.adb (Static_Boolean): New function
10377         * sinfo.ads: Document new syntax for aspects in packages etc.
10378         * sprint.adb: Handle new syntax of aspects before IS in package
10379
10380 2011-08-01  Thomas Quinot  <quinot@adacore.com>
10381
10382         * atree.ads: Minor reformatting.
10383         * sem_prag.adb: Minor reformatting.
10384
10385 2011-08-01  Robert Dewar  <dewar@adacore.com>
10386
10387         * exp_util.adb (Insert_Actions): Fix error in handling Actions for
10388         case expr alternative.
10389
10390 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10391
10392         * sem_ch12.adb: Fix typo.
10393
10394 2011-08-01  Geert Bosch  <bosch@adacore.com>
10395
10396         * sem_prag.adb (Check_No_Link_Name): New procedure.
10397         (Process_Import_Or_Interface): Use Check_No_Link_Name.
10398         * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
10399         instead of Standard_Long_Long_Float_Size global. Preparation for
10400         eventual removal of per type constants.
10401         * exp_util.ads (Get_Stream_Size): New function returning the stream
10402         size value of subtype E.
10403         * exp_util.adb (Get_Stream_Size): Implement new function.
10404         * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
10405         function.
10406         * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
10407         * einfo.adb:
10408         (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
10409
10410 2011-08-01  Geert Bosch  <bosch@adacore.com>
10411
10412         * cstand.adb: Fix comments.
10413         * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
10414         count of arguments.
10415
10416 2011-08-01  Robert Dewar  <dewar@adacore.com>
10417
10418         * exp_ch4.adb, sem_cat.adb: Minor reformatting.
10419
10420 2011-08-01  Geert Bosch  <bosch@adacore.com>
10421
10422         * atree.ads: Fix comment.
10423
10424 2011-08-01  Robert Dewar  <dewar@adacore.com>
10425
10426         * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
10427         * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
10428         * par.adb: Add with for Namet.Sp.
10429         * par-tchk.adb: Minor reformatting.
10430
10431 2011-08-01  Vincent Celier  <celier@adacore.com>
10432
10433         * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
10434         (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
10435         of the init procedure of a SAL.
10436         * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
10437         New procedure.
10438
10439 2011-08-01  Thomas Quinot  <quinot@adacore.com>
10440
10441         * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
10442         reformatting.
10443
10444 2011-08-01  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10445
10446         * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
10447
10448 2011-08-01  Thomas Quinot  <quinot@adacore.com>
10449
10450         * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
10451         conformant with its spec (return True only for types that have
10452         an overriding Initialize primitive operation that prevents them from
10453         having preelaborable initialization).
10454         * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
10455         initialization for controlled types in Ada 2005 or later mode.
10456
10457 2011-08-01  Robert Dewar  <dewar@adacore.com>
10458
10459         * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
10460         Postcondition.
10461         (Same_Aspect): New function.
10462         * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
10463         Type_Invariant, Precondition, Postcondition.
10464         * snames.ads-tmpl: Add Name_Type_Invariant.
10465
10466 2011-08-01  Robert Dewar  <dewar@adacore.com>
10467
10468         * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
10469         here.
10470         (Freeze_All_Ent): Fix error in handling inherited aspects.
10471         * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
10472         already analyzed, but don't skip entire processing of a declaration,
10473         that's wrong in some cases of declarations being rewritten.
10474         (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
10475         Don't delay for integer, string literals
10476         Treat predicates in usual manner for delay, remove special case code,
10477         not needed.
10478         (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
10479         (Build_Predicate_Function): Update saved expression in aspect
10480         (Build_Invariant_Procedure): Update saved expression in aspect
10481         * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
10482         of replacement of discriminant references if the reference is simple.
10483
10484 2011-08-01  Robert Dewar  <dewar@adacore.com>
10485
10486         * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
10487         * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
10488         Static_Predicate and Dynamic_Predicate.
10489         (Build_Predicate_Function): Add processing for Static_Predicate
10490         and Dynamic_Predicate.
10491         * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
10492         (From_Static_Predicate): New flag
10493         * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
10494
10495 2011-08-01  Robert Dewar  <dewar@adacore.com>
10496
10497         * usage.adb: Documentation cleanup for Ada version modes in usage.
10498         * expander.adb: Minor reformatting.
10499
10500 2011-08-01  Robert Dewar  <dewar@adacore.com>
10501
10502         * atree.ads: Minor comment fix.
10503         * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
10504         a-witeio.ads, sem_prag.adb: Minor reformatting.
10505
10506 2011-08-01  Doug Rupp  <rupp@adacore.com>
10507
10508         * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
10509         pointers. Use descrip.h header file for convenience. Add some
10510         comments.
10511
10512 2011-08-01  Robert Dewar  <dewar@adacore.com>
10513
10514         * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
10515         (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
10516         * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
10517         New procedure.
10518         (Check_Aspect_At_End_Of_Declarations): New procedure
10519         (Analye_Aspect_Specification): Minor changes for above procedures
10520         * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
10521         specification node as well.
10522
10523 2011-08-01  Pascal Obry  <obry@adacore.com>
10524
10525         * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
10526         Windows files. Use GetFilesAttributes() in this case to check for file
10527         existence instead of returning with an error code.
10528
10529 2011-08-01  Vincent Celier  <celier@adacore.com>
10530
10531         * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
10532         High is above Source length.
10533
10534 2011-08-01  Robert Dewar  <dewar@adacore.com>
10535
10536         * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
10537
10538 2011-08-01  Robert Dewar  <dewar@adacore.com>
10539
10540         * aspects.ads (Boolean_Aspects): New subtype.
10541         * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
10542         for derived types in cases where the parent type and derived type have
10543         aspects.
10544         * freeze.adb (Freeze_Entity): Fix problems in handling derived type
10545         with aspects when parent type also has aspects.
10546         (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
10547         boolean expression at this point).
10548         * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
10549         accordance with final decision on the Ada 2012 feature.
10550         * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
10551
10552 2011-08-01  Matthew Heaney  <heaney@adacore.com>
10553
10554         * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
10555
10556 2011-08-01  Pascal Obry  <obry@adacore.com>
10557
10558         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
10559         Fix Replace_Slice when High is above current string size.
10560         (Replace_Slice): Fix DL computation when High is above current
10561         string length.
10562
10563 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
10564
10565         * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
10566
10567 2011-08-01  Matthew Heaney  <heaney@adacore.com>
10568
10569         * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
10570         of node.
10571
10572 2011-08-01  Pascal Obry  <obry@adacore.com>
10573
10574         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
10575         reformatting.
10576
10577 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10578
10579         * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
10580         access to protected subprograms in generic bodies.
10581         * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
10582         protected type, indicate that the convention of the subprogram is
10583         Convention_Protected, because it may be used in subsequent declarations
10584         within the protected declaration.
10585
10586 2011-08-01  Vincent Celier  <celier@adacore.com>
10587
10588         * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
10589         and "final" procedures when the name of the library is "ada", to avoid
10590         duplicate symbols "adainit" and "adafinal" in executables.
10591
10592 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10593
10594         * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
10595         quantified expression that appears within a postcondition and uses the
10596         Ada2012 'Result attribute.
10597
10598 2011-07-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10599
10600         * init.c (__gnat_error_handler): Cast reason to int.
10601         (__gnat_install_handler): Explain sa_sigaction use.
10602
10603 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
10604
10605         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
10606         subprogram has copy-in copy-out parameters, try to promote the mode of
10607         the return type if it is passed in registers.
10608
10609 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
10610
10611         * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
10612         left operand as addressable.
10613
10614 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
10615
10616         * gcc-interface/gigi.h (build_function_stub): Remove.
10617         (build_return_expr): Likewise.
10618         (convert_vms_descriptor): Declare.
10619         * gcc-interface/utils.c (convert_vms_descriptor): Make global.
10620         (build_function_stub): Move to...
10621         * gcc-interface/utils2.c (build_return_expr): Move to...
10622         * gcc-interface/trans.c (build_function_stub): ...here.
10623         (build_return_expr): ...here.
10624         (Subprogram_Body_to_gnu): Add local variable for language_function.
10625         Disconnect the parameter attributes cache, if any, once done with it.
10626         Call end_subprog_body only after setting the end_locus.
10627         Build the stub associated with the function, if any, at the very end.
10628         (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
10629         variables and streamline control flow.
10630
10631 2011-07-23  Arnaud Charlet  <charlet@adacore.com>
10632
10633         PR ada/49819
10634         * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
10635         g-trasym-dwarf.adb.
10636
10637 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10638
10639         PR bootstrap/49794
10640         * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
10641         Assign to act.sa_sigaction.
10642         * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
10643         current->return_address to char * before arithmetic.
10644
10645 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10646
10647         * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
10648         Correct argument types.
10649         Extract code from reason.
10650         (__gnat_install_handler): Assign to act.sa_sigaction.
10651
10652 2011-07-21  Eric Botcazou  <ebotcazou@adacore.com>
10653
10654         * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
10655         (GNAT1_OBJS): ...here.
10656
10657 2011-07-15  Eric Botcazou  <ebotcazou@adacore.com>
10658
10659         PR ada/48711
10660         * g-socthi-mingw.adb (Fill): Fix formatting.
10661
10662         * gcc-interface/gigi.h: Move around comment.
10663
10664 2011-07-14  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
10665
10666         PR ada/46350
10667         * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
10668
10669 2011-07-14  Florian Weimer  <fw@deneb.enyo.de>
10670
10671         PR ada/48711
10672         * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
10673
10674 2011-07-13  Eric Botcazou  <ebotcazou@adacore.com>
10675
10676         * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
10677         range comparison if Pmode is SImode.
10678
10679 2011-07-12  Laurent GUERBY  <laurent@guerby.net>
10680             Eric Botcazou  <ebotcazou@adacore.com>
10681
10682         * adadecode.c: Wrap up in extern "C" block.
10683         * adadecode.h: Likewise.
10684         * adaint.c: Likewise.  Remove 'const' keyword.
10685         * adaint.h: Likewise.
10686         * argv.c: Likewise.
10687         * atree.h: Likewise.
10688         * cio.c: Likewise.
10689         * cstreams.c: Likewise.
10690         * env.c: Likewise.
10691         * exit.c: Likewise.
10692         * fe.h: Likewise.
10693         * final.c: Likewise.
10694         * init.c: Likewise.
10695         * initialize.c: Likewise.
10696         * link.c: Likewise.
10697         * namet.h: Likewise.
10698         * nlists.h: Likewise.
10699         * raise.c: Likewise.
10700         * raise.h: Likewise.
10701         * repinfo.h: Likewise.
10702         * seh_init.c: Likewise.
10703         * targext.c: Likewise.
10704         * tracebak.c: Likewise.
10705         * uintp.h: Likewise.
10706         * urealp.h: Likewise.
10707         * xeinfo.adb: Wrap up generated C code in extern "C" block.
10708         * xsinfo.adb: Likewise.
10709         * xsnamest.adb: Likewise.
10710         * gcc-interface/gadaint.h: Wrap up in extern "C" block.
10711         * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
10712         * gcc-interface/misc.c: Likewise.
10713         * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
10714         (GNAT1_C_OBJS): Remove ada/b_gnat1.o.  List ada/seh_init.o and
10715         ada/targext.o here...
10716         (GNAT_ADA_OBJS): ...and not here.
10717         (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
10718         (GNATBIND_OBJS): Reorder.
10719
10720 2011-07-07  Richard Henderson  <rth@redhat.com>
10721
10722         * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
10723         dwarf2out_frame_init.
10724
10725 2011-07-07  Eric Botcazou  <ebotcazou@adacore.com>
10726
10727         * gcc-interface/misc.c (gnat_init): Tweak previous change.
10728
10729 2011-07-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10730
10731         PR target/39150
10732         * gcc-interface/Makefile.in: Handle x86_64-solaris2.
10733
10734 2011-07-06  Richard Guenther  <rguenther@suse.de>
10735
10736         * gcc-interface/misc.c (gnat_init): Merge calls to
10737         build_common_tree_nodes and build_common_tree_nodes_2.
10738         Re-initialize boolean_false_node.
10739
10740 2011-07-02  Eric Botcazou  <ebotcazou@adacore.com>
10741             Olivier Hainque  <hainque@adacore.com>
10742             Nicolas Setton  <setton@adacore.com>
10743
10744         * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
10745         the type according to the ARTIFICIAL_P parameter.
10746         (create_type_decl): Likewise.
10747         (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
10748
10749 2011-07-01  Eric Botcazou  <ebotcazou@adacore.com>
10750
10751         * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
10752         (gnatbind): Likewise.
10753
10754 2011-06-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10755
10756         * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
10757
10758 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
10759
10760         * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
10761         local variable throughout.  Remove useless call to Base_Type.
10762         (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
10763         Take it also into account for the volatileness of the field.  Set the
10764         TREE_SIDE_EFFECTS flag as well in this case.  Reorder some warnings.
10765
10766 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
10767
10768         * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
10769         on a dereference built for a by-ref object if it has an address clause.
10770
10771 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
10772
10773         * einfo.ads (Address_Taken): Document use for the second argument of
10774         Asm_Input and Asm_Output attributes.
10775         * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
10776         argument is an entity name, then set Address_Taken on it.
10777         <Attribute_Asm_Output>: Likewise.
10778         * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
10779         Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
10780         (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
10781         memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
10782
10783 2011-06-16  Joern Rennecke  <joern.rennecke@embecosm.com>
10784
10785         PR middle-end/46500
10786         * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
10787
10788 2011-06-14  Joseph Myers  <joseph@codesourcery.com>
10789
10790         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
10791         (ada/utils.o): Update dependencies.
10792         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
10793         ../../../libcpp/libcpp.a.
10794         * gcc-interface/utils.c: Include common/common-target.h.
10795         (process_attributes): Use targetm_common.have_named_sections.
10796
10797 2011-06-07  Richard Guenther  <rguenther@suse.de>
10798
10799         * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
10800         set_sizetype.
10801
10802 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
10803
10804         * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
10805         TREE_THIS_NOTRAP flag.
10806
10807 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
10808
10809         * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
10810         Fix thinko.
10811
10812 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
10813
10814         * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
10815         constants whose full view has discriminants specially.
10816
10817 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
10818
10819         * gcc-interface/utils.c: Include diagnostic.h.
10820         (gnat_write_global_declarations): Output debug information for all
10821         global type declarations before finalizing the compilation unit.
10822         * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
10823
10824 2011-05-25  Jakub Jelinek  <jakub@redhat.com>
10825
10826         * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
10827
10828 2011-05-25  Kai Tietz  <ktietz@redhat.com>
10829
10830         * adaint.c (__gnat_to_canonical_file_list_next): Use array
10831         initialization instead of const/none-const pointer assignment.
10832
10833 2011-05-24  Joseph Myers  <joseph@codesourcery.com>
10834
10835         * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
10836         $(EXTRA_GNAT1_OBJS).
10837         (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
10838         (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
10839         (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
10840         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
10841         libcommon-target.a instead of prefix.o.
10842
10843 2011-05-21  Joseph Myers  <joseph@codesourcery.com>
10844
10845         PR ada/49097
10846         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
10847
10848 2011-05-20  Joseph Myers  <joseph@codesourcery.com>
10849
10850         * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
10851         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
10852         instead of version.o.
10853
10854 2011-05-18  Kai Tietz <ktietz@redhat.com>
10855
10856         * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
10857         boolean_false_node instead of integer_zero_node.
10858         (convert_with_check): Likewise.
10859         * gcc-interface/decl.c (choices_to_gnu): Likewise.
10860
10861 2011-05-12  Eric Botcazou  <ebotcazou@adacore.com>
10862
10863         * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
10864         type of the parameter is an unconstrained array, convert the actual to
10865         the type of the formal in the In Out and Out cases as well.
10866
10867 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
10868
10869         * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
10870         call build_function_type_array or build_varargs_function_type_array
10871         instead.
10872         (create_subprog_type): Don't call build_function_type; call
10873         build_function_type_vec instead.
10874
10875 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
10876
10877         * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
10878         (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
10879         (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
10880
10881 2011-05-07  Eric Botcazou  <ebotcazou@adacore.com>
10882
10883         * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
10884
10885         * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
10886         * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
10887
10888 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
10889
10890         * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
10891
10892 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
10893
10894         * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
10895         instead of accessing TYPE_ARG_TYPES directly.
10896         * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
10897
10898 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
10899
10900         PR ada/48844
10901         * gcc-interface/gigi.h (get_variant_part): Declare.
10902         * gcc-interface/decl.c (get_variant_part): Make global.
10903         * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
10904         types have the same constant size, are record types and T1 has a
10905         variant part while T2 doesn't.
10906
10907 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
10908
10909         * gcc-interface/utils.c (begin_subprog_body): Do not call
10910         get_pending_sizes.
10911         (end_subprog_body): Likewise.
10912
10913 2011-05-04  Richard Guenther  <rguenther@suse.de>
10914
10915         * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
10916         int_const_binop.
10917         (pos_to_constructor): Likewise.
10918
10919 2011-05-03  Nathan Froyd  <froydnj@codesourcery.com>
10920             Eric Botcazou  <ebotcazou@adacore.com>
10921
10922         * gcc-interface/trans.c (gigi): Call build_function_type_list instead
10923         of build_function_type.  Adjust calls to...
10924         (build_raise_check): ...this.  Do not take a void_tree parameter.
10925         Call build_function_type_list instead of build_function_type.
10926         Fix head comment and swap couple of conditional blocks.
10927
10928 2011-04-30  Eric Botcazou  <ebotcazou@adacore.com>
10929
10930         * gnatvsn.ads (Library_Version): Bump to 4.7.
10931         (Current_Year): Bump to 2011.
10932
10933 2011-04-29  Michael Matz  <matz@suse.de>
10934
10935         * gcc-interface/misc.c (gnat_handle_option): Set
10936         warn_maybe_uninitialized.
10937
10938 2011-04-23  Gerald Pfeifer  <gerald@pfeifer.com>
10939
10940         * gnat_ugn.texi (Complexity Metrics Control): Update link to
10941         the Watson/McCabe paper.
10942
10943 2011-04-23  Jim Meyering  <meyering@redhat.com>
10944
10945         * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
10946
10947 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
10948
10949         * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
10950         onto the new type.
10951
10952 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
10953
10954         * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
10955         parameter.
10956         * gcc-interface/utils.c (create_subprog_decl): Likewise.  Set
10957         DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
10958         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
10959         ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
10960         <all>: Do not set flags on the reused DECL node coming from an alias.
10961         Set DECL_IGNORED_P on the DECL node built for subprograms if they
10962         don't need debug info here...
10963         * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
10964         (gigi): Adjust calls to create_subprog_decl.
10965         (build_raise_check): Likewise.
10966         (establish_gnat_vms_condition_handler): Likewise.
10967         (Compilation_Unit_to_gnu): Likewise.
10968         (gnat_to_gnu): Likewise.
10969
10970 2011-04-21  Eric Botcazou  <ebotcazou@adacore.com>
10971
10972         * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
10973         (NO_REORDER_ADAFLAGS): New variable.
10974         (EXTRA_GNATTOOLS): Always define.
10975         (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
10976         Clean up and adjust list of files compiled with special options.
10977         * gcc-interface/Make-lang.in: Likewise.
10978         (ada/decl.o): Cosmetical change.
10979         (ada/misc.o): Remove dependency on $(PLUGIN_H).
10980
10981 2011-04-20  Jim Meyering  <meyering@redhat.com>
10982
10983         * initialize.c (__gnat_initialize): Remove useless if-before-free.
10984
10985 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
10986
10987         * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
10988         $(CFLAGS) on the link line.
10989
10990 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
10991
10992         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
10993         padded type built for the return type if it is unconstrained.
10994
10995 2011-04-14  Nathan Froyd  <froydnj@codesourcery.com>
10996
10997         * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
10998
10999 2011-04-12  Nathan Froyd  <froydnj@codesourcery.com>
11000
11001         * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
11002         before calling TREE_CHAIN.
11003         * gcc-interface/misc.c (gnat_init_ts): New function.
11004         (LANG_HOOKS_INIT_TS): Define.
11005
11006 2011-04-12  Martin Jambor  <mjambor@suse.cz>
11007
11008         * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
11009         instead of cgraph_node.
11010
11011 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
11012
11013         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
11014         alignment on fields of the RETURN type built for the Copy-In Copy-Out
11015         mechanism.
11016
11017 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
11018
11019         * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
11020         of aggregate types that contain a placeholder.
11021
11022 2011-04-08  Nathan Froyd  <froydnj@codesourcery.com>
11023
11024         * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
11025         TYPE_ARG_TYPES.
11026         (handle_type_generic_attribute): Likewise.
11027
11028 2011-04-04  Eric Botcazou  <ebotcazou@adacore.com>
11029
11030         PR ada/47163
11031         * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
11032
11033 2011-04-04  Kai Tietz  <ktietz@redhat.com>
11034
11035         PR ada/47163
11036         * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
11037         to flag value.
11038
11039 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
11040
11041         * gcc-interface/utils2.c (build_allocator): In the unconstrained array
11042         type case, do not strip a padding type around the array type.
11043
11044 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
11045
11046         * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
11047         types.
11048
11049 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
11050
11051         * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
11052         * gcc-interface/misc.c (gnat_handle_option): Remove special handling
11053         code for -feliminate-unused-debug-types.
11054         (gnat_post_options): Likewise.
11055
11056 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
11057
11058         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
11059         declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
11060         distinct copy.
11061
11062 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
11063
11064         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
11065         DECL_ARTIFICIAL flag on enumeration types.
11066
11067 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
11068
11069         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
11070         fat pointer types artificial unconditionally.
11071         <E_Array_Subtype>: Attach the base array type as a parallel type if it
11072         isn't artificial.
11073
11074 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
11075
11076         * gcc-interface/gigi.h (get_dummy_type): Declare.
11077         (build_dummy_unc_pointer_types): Likewise.
11078         (finish_fat_pointer_type): Likewise.
11079         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
11080         fat pointer type has been built, complete it in place.
11081         <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
11082         and thin pointers.  Remove useless variable.
11083         (finish_fat_pointer_type): Make global and move to...
11084         * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
11085         (get_dummy_type): New function.
11086         (build_dummy_unc_pointer_types): Likewise.
11087         (gnat_pushdecl): Propage the name to the anonymous variants only.
11088         (update_pointer_to): Only adjust the pointer types in the unconstrained
11089         array case.
11090
11091 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
11092
11093         * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
11094         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
11095         if this is a Taft amendment type and the full declaration is available.
11096         * gcc-interface/trans.c (process_type): Likewise.
11097         If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
11098         (process_freeze_entity): Likewise.
11099         * gcc-interface/utils.c (dummy_global): New static variable.
11100         (gnat_write_global_declarations): If there are types declared as used
11101         at the global level, insert them in the global hash table.
11102
11103 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
11104
11105         * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
11106         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
11107         declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
11108         copy.
11109         (record_builtin_type): Add ARTIFICIAL_P parameter.  Set DECL_ARTIFICIAL
11110         flag of the type accordingly.
11111         * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
11112
11113 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
11114
11115         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
11116         finalizing types when updating the pointers to the designated type.
11117         <all>: Finalize the deferred types even if we didn't defer processing
11118         of incomplete types in this invocation.
11119
11120 2011-04-01  Olivier Hainque  <hainque@adacore.com>
11121             Nicolas Setton  <setton@adacore.com>
11122             Eric Botcazou  <ebotcazou@adacore.com>
11123
11124         * gcc-interface/misc.c (gnat_descriptive_type): New function.
11125         (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
11126
11127 2011-03-28  Kai Tietz  <ktietz@redhat.com>
11128
11129         * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
11130         Windows targets.
11131         (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
11132         * system-mingw.ads (System): Change ZCX_By_Default default to True.
11133
11134         * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
11135
11136 2011-03-28  Tristan Gingold  <gingold@adacore.com>
11137
11138         PR ada/44431
11139         * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
11140         Use ada output of gnatbind.
11141         (ada/b_gnatb.adb): Ditto.
11142         (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
11143         (ada.mostlyclean, ada.stage1)
11144         (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
11145         (ada.stagefeedback): Adjust.
11146         * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
11147         Use ada output of gnatbind.
11148         (b_gnatm.adb): Ditto.
11149         (b_gnatl.o, b_gnatm.o): New rules.
11150
11151 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
11152
11153         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
11154         for the padded type built to support a specified size or alignment.
11155
11156 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
11157
11158         * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
11159         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
11160         unconditionally to the end of the unit when the designated type is
11161         limited_with'ed.
11162         <all>: Rename local variable.  Attempt to un-defer types only and do it
11163         for limited_with'ed types as well.
11164         (finalize_from_with_types): Adjust comment.  Rename variable and tidy.
11165         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
11166         consistently and remove redundant call to finalize_from_with_types.
11167
11168 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
11169
11170         * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
11171         subprograms without a previous spec declared in the same unit.
11172         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
11173         subprograms at the end of the unit instead of at the beginning.
11174         * gcc-interface/utils.c (create_subprog_decl): Check that the entity
11175         isn't public for the special handling of non-inline functions nested
11176         inside inline external functions.
11177
11178 2011-03-25  Jeff Law  <law@redhat.com>
11179
11180         * gcc-interface/utils.c (def_fn_type): Add missing va_end.
11181
11182 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
11183
11184         * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
11185         * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
11186         to compute Set_Size_Depends_On_Discriminant.
11187         (Layout_Type): Call it on array types in back-end layout mode.
11188         * sem_util.adb (Requires_Transient_Scope): Return true for array
11189         types only if the size depends on the value of discriminants.
11190         * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
11191         type if the RHS is a call to a function that returns an unconstrained
11192         type with default discriminant.
11193
11194 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
11195
11196         * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
11197         non-conversion to the nominal result type at the end.
11198
11199 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
11200
11201         * gcc-interface/trans.c (create_temporary): New function taken from...
11202         (create_init_temporary): ...here.  Call it.
11203         (call_to_gnu): Create the temporary for the return value early, if any.
11204         Create it for a function with copy-in/copy-out parameters if there is
11205         no target; in other cases of copy-in/copy-out, use another temporary.
11206         Push the new binding level lazily.  Add and rename local variables.
11207
11208 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
11209
11210         * gcc-interface/decl.c (validate_size): Improve comments and tweak
11211         error message.
11212         (set_rm_size): Likewise.
11213
11214 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
11215
11216         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
11217         for the padded type built in order to support a specified alignment.
11218         Fix incorrect formatting.
11219
11220 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
11221
11222         PR bootstrap/48216
11223         * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
11224
11225 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
11226
11227         * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
11228         rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
11229         to the end of the list.  Adjust recursive call.  Rename local variable.
11230         If REORDER is true, reorder components of the record type.
11231         (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
11232         components_to_record and adjust the parameter list.
11233
11234 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
11235
11236         * gcc-interface/decl.c (elaborate_expression_1): When optimization is
11237         disabled, use the variable for bounds of loop iteration scheme.
11238
11239 2011-03-21  Kai Tietz  <ktietz@redhat.com>
11240
11241         PR target/12171
11242         * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
11243
11244 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
11245
11246         * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
11247         out whether the expression is read-only.  Short-circuit placeholder
11248         case and rename a couple of local variables.
11249
11250 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
11251
11252         * gcc-interface/gigi.h (smaller_form_type_p): Declare.
11253         * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
11254         * gcc-interface/utils.c (smaller_form_type_p): ...to here.
11255         (convert): Deal with conversions from a smaller form type specially.
11256
11257 2011-02-14  Eric Botcazou  <ebotcazou@adacore.com>
11258
11259         * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
11260         its argument, except for the special -I- switch.
11261
11262 2011-02-12  Gerald Pfeifer  <gerald@pfeifer.com>
11263
11264         * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
11265         "Ada Issues".
11266
11267 2011-02-08  Eric Botcazou  <ebotcazou@adacore.com>
11268
11269         * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
11270
11271 2011-02-03  Eric Botcazou  <ebotcazou@adacore.com>
11272
11273         * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
11274         GNAT_FORMAL.
11275         * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
11276         * gcc-interface/utils.c (fill_vms_descriptor): ...here.  Take GNU_TYPE
11277         instead of GNAT_FORMAL.  Protect the expression against multiple uses.
11278         Do not generate the check directly, instead instantiate the template
11279         check present in the descriptor.
11280         (make_descriptor_field): Move around.
11281         (build_vms_descriptor32): Build a template check in the POINTER field.
11282         (build_vms_descriptor): Remove useless suffixes.
11283         * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
11284
11285 2011-01-26  Eric Botcazou  <ebotcazou@adacore.com>
11286
11287         PR bootstrap/47467
11288         * targext.c: Include target files if IN_RTS is defined.
11289
11290 2011-01-26  Richard Guenther  <rguenther@suse.de>
11291
11292         PR bootstrap/47467
11293         * targext.c: Include config.h.
11294         * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
11295         dependency.
11296
11297 2011-01-04  Pascal Obry  <obry@adacore.com>
11298             Eric Botcazou  <ebotcazou@adacore.com>
11299
11300         * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
11301
11302 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
11303
11304         * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
11305         end-of-case on the end label and its associated gotos, if any.
11306
11307 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
11308
11309         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
11310         expressions of the parameter cache within the statement group of
11311         the CICO mechanism.
11312
11313 2011-01-04  Olivier Hainque  <hainque@adacore.com>
11314             Eric Botcazou  <ebotcazou@adacore.com>
11315
11316         * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
11317         (set_end_locus_from_node): New function.
11318         (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
11319         make and the function end_locus.
11320         (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
11321         for the elaboration subprogram.
11322         (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
11323         set the end_locus of the expression as well.
11324
11325 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
11326
11327         PR ada/47131
11328         * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
11329         variables that are referenced in exception handlers volatile.
11330
11331
11332 \f
11333 Copyright (C) 2011 Free Software Foundation, Inc.
11334
11335 Copying and distribution of this file, with or without modification,
11336 are permitted in any medium without royalty provided the copyright
11337 notice and this notice are preserved.