OSDN Git Service

2011-08-29 Thomas Quinot <quinot@adacore.com>
[pf3gnuchains/gcc-fork.git] / gcc / ada / ChangeLog
1 2011-08-29  Thomas Quinot  <quinot@adacore.com>
2
3         * get_scos.adb: Ignore chaining indicators not currently supported
4         by Ada.
5
6 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
7
8         * system.ads: Minor editing.
9
10 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
11
12         * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
13         CodePeer mode.
14         * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
15         Attribute_Elab_Subp_Body.
16         * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
17         * sem_util.adb: Update comments.
18
19 2011-08-29  Thomas Quinot  <quinot@adacore.com>
20
21         * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
22         pragma name for each SCO statement corresponding to a pragma.
23
24 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
25
26         * opt.ads: Minor editing.
27
28 2011-08-29  Yannick Moy  <moy@adacore.com>
29
30         * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
31         that only made sense for CodePeer mode.
32
33 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
34
35         * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
36         which is no longer used.
37         * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
38         handling of the 64-bit division check.
39         * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
40         division available.
41         * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
42         longer used.
43
44 2011-08-29  Thomas Quinot  <quinot@adacore.com>
45
46         * get_scos.adb: Minor reformatting.
47
48 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
49
50         * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
51         statement list is wrapped in a block, the block is explicitly analyzed
52         in order to properly redecorate the entities and create a servicing
53         finalizer.
54
55 2011-08-29  Tristan Gingold  <gingold@adacore.com>
56
57         * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
58         (Set_Zero_Cost_Handling): Remove.
59
60 2011-08-29  Thomas Quinot  <quinot@adacore.com>
61
62         * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
63
64 2011-08-29  Geert Bosch  <bosch@adacore.com>
65
66         * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
67         instruction, as the latter may produce -0.0, which is not a valid VAX
68         F float number.
69         (Neg_G): Likewise for VAX F float.
70
71 2011-08-29  Robert Dewar  <dewar@adacore.com>
72
73         * exp_util.adb: Minor reformatting.
74
75 2011-08-29  Yannick Moy  <moy@adacore.com>
76
77         * sem_ch3.adb: Minor comment update.
78
79 2011-08-29  Thomas Quinot  <quinot@adacore.com>
80
81         * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
82         the operand type.
83
84 2011-08-29  Thomas Quinot  <quinot@adacore.com>
85
86         * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
87         current statement sequence on a generic instantiation or a subprogram
88         declaration.
89
90 2011-08-29  Robert Dewar  <dewar@adacore.com>
91
92         * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
93         Minor reformatting.
94
95 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
96
97         * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
98         Correct the check which involves the freeze node of a controlled or
99         access-to-controlled type.
100
101 2011-08-29  Geert Bosch  <bosch@adacore.com>
102
103         * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
104         statements.
105         * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
106         Asm statements.
107
108 2011-08-29  Yannick Moy  <moy@adacore.com>
109
110         * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
111         for every index type and component type that is not a subtype_mark.
112         (Process_Subtype): Set Etype of subtype.
113
114 2011-08-29  Robert Dewar  <dewar@adacore.com>
115
116         * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
117         reorganization.  Minor reformatting.
118
119 2011-08-29  Steve Baird  <baird@adacore.com>
120
121         * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
122         for CodePeer and ALFA modes.
123
124 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
125
126         * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
127         that comes from an enclosing scope if it is not the renaming of an
128         actual, to handle properly a spurious ambiguity in an instance.
129
130 2011-08-29  Eric Botcazou  <ebotcazou@adacore.com>
131
132         * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
133         (Alignment_Check_For_Size_Change): ...this.  Add SIZE parameter and
134         use it instead of the Esize of the first parameter.
135         (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
136         above change.
137         <Size>: Likewise.  Call it for composite types on the RM size.
138
139 2011-08-29  Yannick Moy  <moy@adacore.com>
140
141         * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
142         * sem_util.adb (Unique_Name): Correct behaviour for names of
143         compilation units.
144
145 2011-08-29  Yannick Moy  <moy@adacore.com>
146
147         * sem_prag.adb (Check_Precondition_Postcondition): In formal
148         verification mode, analyze pragma expression for correctness, for
149         pre/post on library-level subprogram, as it is not expanded later.
150
151 2011-08-29  Yannick Moy  <moy@adacore.com>
152
153         * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
154         in formal verification.
155
156 2011-08-29  Thomas Quinot  <quinot@adacore.com>
157
158         * sem_util.adb: Minor reformatting.
159         * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
160         there's no pragma.
161         * par_sco.ads, par_sco.adb: Update comments.
162
163 2011-08-29  Yannick Moy  <moy@adacore.com>
164
165         * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
166         associated getter/setter.
167         * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
168
169 2011-08-29  Vincent Celier  <celier@adacore.com>
170
171         * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
172         * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
173         with declarations for Language_Kind and Dependency_Kind for Ada.
174         * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
175         (Process_Compiler): Take into account the new attributes Dependency_Kind
176         and Language_Kind.
177         (Check_Configuration): Check if language kind is unit based, not if the
178         language name is Ada.
179         (Process_Exceptions_Unit_Based): Ditto
180         (Add_Language): Remove default additions of language and dependency kind
181         * prj.ads: Minor comment change
182         * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
183
184 2011-08-29  Johannes Kanig  <kanig@adacore.com>
185
186         * debug.adb: Update comments.
187
188 2011-08-24  Joseph Myers  <joseph@codesourcery.com>
189
190         * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
191         (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
192         (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
193         (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
194         (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
195
196 2011-08-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
197
198         * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
199         (GNATLIBCFLAGS_FOR_C): Replace
200         TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
201         (gnatlib-shared-default, gnatlib-shared-dual-win32)
202         (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
203         (gnatlib-sjlj, gnatlib-zcx): Likewise.
204
205 2011-08-07  Eric Botcazou  <ebotcazou@adacore.com>
206
207         * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
208
209         * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
210
211         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
212
213 2011-08-05  Nicolas Roche  <roche@adacore.com>
214
215         * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
216         libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
217         canadian cross.
218         * gcc-interface/Make-lang.in: Add support for canadian cross setting.
219
220 2011-08-05  Matthew Heaney  <heaney@adacore.com>
221
222         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
223         subprogram bodies declared out-of-order.
224
225 2011-08-05  Yannick Moy  <moy@adacore.com>
226
227         * sem_util.adb (Unique_Name): only prefix with "standard" the names of
228         entities directly in package Standard, otherwise skip the standard
229         prefix.
230
231 2011-08-05  Robert Dewar  <dewar@adacore.com>
232
233         * a-cbmutr.adb: Minor reformatting
234         (Allocate_Node): refactor node allocation algorithm
235
236 2011-08-05  Robert Dewar  <dewar@adacore.com>
237
238         * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
239         * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
240         mode.
241         (Analyze_Pragma, case Check_Policy): Ditto.
242         * sem_prag.ads (Check_Disabled): New function
243         * snames.ads-tmpl: Add Name_Disable.
244
245 2011-08-05  Robert Dewar  <dewar@adacore.com>
246
247         * gnat_rm.texi: Document implementation-defined policy DISABLE for
248         pragmas Assertion_Policy, Check_Policy, Debug_Policy.
249
250 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
251
252         * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
253         that appears in a generic formal part and applies to a formal
254         subprogram.
255
256 2011-08-05  Robert Dewar  <dewar@adacore.com>
257
258         * a-cbmutr.ads: Minor reformatting.
259
260 2011-08-05  Matthew Heaney  <heaney@adacore.com>
261
262         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
263         to check count, check sign of value instead.
264         * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
265         (Copy_Subtree): allocate copy of source element
266         (Equal_Subtree): compare elements, not access objects
267
268 2011-08-05  Vincent Celier  <celier@adacore.com>
269
270         * gnat_ugn.texi: Fix VMS alternative.
271
272 2011-08-05  Thomas Quinot  <quinot@adacore.com>
273
274         * sem_ch11.adb: Add comment.
275
276 2011-08-05  Robert Dewar  <dewar@adacore.com>
277
278         * exp_util.adb: Minor comment fix.
279
280 2011-08-05  Robert Dewar  <dewar@adacore.com>
281
282         * scng.adb (Error_Unterminated_String): Improve flag position when
283         comma present.
284
285 2011-08-05  Matthew Heaney  <heaney@adacore.com>
286
287         * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
288         tree containers).
289         * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
290         multiway tree containers.
291
292 2011-08-05  Robert Dewar  <dewar@adacore.com>
293
294         * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
295         * stylesw.adb: Implement -gnatyC to control comment spacing
296         * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
297         -gnatyc/C).
298         * usage.adb: Add line for -gnatyC.
299
300 2011-08-05  Robert Dewar  <dewar@adacore.com>
301
302         * gnat_ugn.texi: Document -gnatyC.
303         * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
304         synonym for COMMENTS2).
305
306 2011-08-05  Robert Dewar  <dewar@adacore.com>
307
308         * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
309         a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
310         sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
311         a-comutr.ads, lib-xref.adb: Minor reformatting.
312
313 2011-08-05  Robert Dewar  <dewar@adacore.com>
314
315         * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
316         warning if there is an exception handler present.
317
318 2011-08-05  Pascal Obry  <obry@adacore.com>
319
320         * a-iteint.ads: Fix copyright year.
321
322 2011-08-05  Thomas Quinot  <quinot@adacore.com>
323
324         * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
325         statement SCO for a USE clause or a representation clause.
326
327 2011-08-05  Yannick Moy  <moy@adacore.com>
328
329         * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
330         between body and spec for stub.
331         (Detect_And_Add_ALFA_Scope): take into account subprogram stub
332         * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
333         pragma precondition or postcondition, for which the enclosing
334         subprogram or package in the AST is not the desired one, return empty.
335
336 2011-08-05  Thomas Quinot  <quinot@adacore.com>
337
338         * g-expect.adb: Minor reformatting.
339
340 2011-08-05  Bob Duff  <duff@adacore.com>
341
342         * a-fihema.adb: Comment out OS_Lib.
343
344 2011-08-05  Matthew Heaney  <heaney@adacore.com>
345
346         * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
347         (unbounded multiway tree containers) and a-iteint.ads.
348         * a-comutr.ads, a-comutr.adb:
349         This is the new Ada 2012 unit for unbounded multiway tree containers
350         * a-cimutr.ads, a-cimutr.adb
351         This is the new Ada 2012 unit for indefinite multiway tree containers
352         * a-iteint.ads: New file.
353
354 2011-08-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
355
356         * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
357
358 2011-08-05  Bob Duff  <duff@adacore.com>
359
360         * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
361         subpools.
362         * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
363
364 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
365
366         * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
367         general indexing aspects of Ada2012. Called when analyzing indexed
368         components when other interpretations fail.
369         * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
370         in an expression context where overloading is meaningful. This excludes
371         the occurrence in an aspect specification (efficiency only).
372         * sem_attr.adb (Analyze_Attribute): indicate that the attributes
373         related to iterators can be set by an attribute specification, but
374         cannot be queried.
375         * sem_ch13.adb (Analyze_Aspect_Specifications): handle
376         Constant_Indexing and Variable_Indexing.
377         (Check_Indexing_Functions): New procedure to perform legality checks.
378         Additional semantic checks at end of declarations.
379
380 2011-08-05  Sergey Rybin  <rybin@adacore.com>
381
382         * tree_io.ads: Update ASIS_Version_Number because of the change of the
383         order of calling Tree_Write/Tree_Read routines made for aspects.
384
385 2011-08-05  Bob Duff  <duff@adacore.com>
386
387         * a-fihema.adb (Finalize): Fix race condition.
388
389 2011-08-05  Yannick Moy  <moy@adacore.com>
390
391         * sem_ch12.adb (Analyze_Package_Instantiation,
392         Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
393         mode.
394
395 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
396
397         * sem_type.adb (Specific_Type): in an instance, the type-specific
398         operand of an equality check that involves null may have a private
399         type. Use full view to determine legality of construct.
400
401 2011-08-05  Vincent Celier  <celier@adacore.com>
402
403         * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
404         delete or close the file when the call to gnatmake was successful.
405
406 2011-08-05  Yannick Moy  <moy@adacore.com>
407
408         * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
409         Global_Discard_Names.
410
411 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
412
413         * sinfo.ads: comments on use of entity field for aspect specifications.
414
415 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
416
417         * sem_ch12.adb (Reset_Entity): If the entity field of the associated
418         node is not itself an entity but a selected component, it is a
419         rewritten parameterless call to an en enclosing synchronized operation,
420         and this expansion will be performed again in the instance, so there is
421         no global information to preserve.
422
423 2011-08-05  Javier Miranda  <miranda@adacore.com>
424
425         * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
426         for renamings of predefined primitives.
427         (In_Predef_Prims_DT): New subprogram.
428
429 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
430
431         * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
432         possible interpretation of name is a reference type, add an
433         interpretation that is the designated type of the reference
434         discriminant of that type.
435         * sem_res.adb (resolve): If the interpretation imposed by context is an
436         implicit dereference, rewrite the node as the deference of the
437         reference discriminant.
438         * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
439         Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
440         parent type or base type.
441         * sem_ch4.adb (Process_Indexed_Component,
442         Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
443         Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
444         Check for implicit dereference.
445         (List_Operand_Interps): Indicate when an implicit dereference is
446         ambiguous.
447         * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
448
449 2011-08-05  Thomas Quinot  <quinot@adacore.com>
450
451         * scos.ads: Update documentation of SCO table. Pragma statements can now
452         be marked as disabled (using 'p' instead of 'P' as the statement kind).
453         * par_sco.ads, par_sco.adb: Implement the above change.
454         (Process_Decisions_Defer): Generate a P decision for the first parameter
455         of a dyadic pragma Debug.
456         * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
457         necessary.
458         * put_scos.adb: Code simplification based on above change.
459
460 2011-08-05  Robert Dewar  <dewar@adacore.com>
461
462         * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
463         bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
464         a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
465         prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
466
467 2011-08-05  Bob Duff  <duff@adacore.com>
468
469         * a-stunau.ads, g-spipat.adb: Update comments.
470
471 2011-08-05  Bob Duff  <duff@adacore.com>
472
473         * a-fihema.ads: Minor comment fix.
474         * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
475         correct.
476         (Attach, Detach): Remove some unnecessary code.
477         (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
478
479 2011-08-05  Bob Duff  <duff@adacore.com>
480
481         * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
482         allocation for Objects component. This simplifies the code somewhat. It
483         is also a little more efficient in the not-so-unusual case where there
484         are no controlled objects allocated.
485         Make Finalization_Started flag atomic.
486         (Finalize): Avoid unnecessary detachment of items from the list.
487         (pcol): Minor cleanup.
488
489 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
490
491         * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
492         package whose name is the same as that of the generic unit, or its
493         ultimate prefix.
494
495 2011-08-05  Bob Duff  <duff@adacore.com>
496
497         * a-fihema.adb, a-fihema.ads: Minor comment improvements.
498         * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
499         Minor comment fixes.
500
501 2011-08-05  Arnaud Charlet  <charlet@adacore.com>
502
503         * make.adb (Linking_Phase): No longer need to set source search path
504         before calling gnatlink in CodePeer mode.
505         * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
506         gcc in CodePeer mode, since the binder generated file no longer has a
507         'with Main'.
508         * switch.ads, switch.adb (Is_Language_Switch): Removed.
509         * switch-c.adb: Update comment.
510
511 2011-08-05  Thomas Quinot  <quinot@adacore.com>
512
513         * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
514
515 2011-08-05  Nicolas Roche  <roche@adacore.com>
516
517         * gnat_ugn.texi: Fix minor syntax error issue.
518
519 2011-08-05  Vincent Celier  <celier@adacore.com>
520
521         * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
522         delete or close the file when the call to gnatmake returns a non
523         successful return code.
524
525 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
526
527         * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
528         check, indicate that the copy of the original node does not come from
529         source, to prevent an infinite recursion of the expansion.
530
531 2011-08-05  Johannes Kanig  <kanig@adacore.com>
532
533         * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
534         VC generation for subprogram bodies.
535
536 2011-08-05  Yannick Moy  <moy@adacore.com>
537
538         * einfo.ads: Typo.
539         * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
540         the base type with the smallest allowed base type.
541
542 2011-08-05  Sergey Rybin  <rybin@adacore.com>
543
544         * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
545         aspects.
546
547 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
548
549         * sem_ch12.ads: minor comment updates.
550
551 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
552
553         * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
554         instantiation and a formal package the compiler generates a package
555         renaming declaration so that the generic name within the declaration
556         is interpreted as a renaming of the instance. At the end of a formal
557         package declaration, this renaming must become invisible.
558
559 2011-08-05  Hristian Kirtchev  <kirtchev@adacore.com>
560
561         * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
562         comparison and rely on concrete entities instead.
563
564 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
565
566         * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
567         and discriminants, to indicate that the type has an access discriminant
568         that supports implicit dereference.
569         * snames.ads-tmpl: Add names of aspects and attributes related to
570         Ada2012 iterators: constant_indexing, default_iterator,
571         iterator_element, implicit_dereference, variable_indexing.
572         * aspects.ads, aspects.adb: entries for iterator-related aspects.
573         * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
574         iterator-related aspects.
575         * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
576
577 2011-08-05  Sergey Rybin  <rybin@adacore.com>
578
579         * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
580         metrics in gnatmetric to cover new kinds of coupling mentrics.
581
582 2011-08-05  Steve Baird  <baird@adacore.com>
583
584         * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
585         of calling the user-defined main subprogram.
586         (Gen_Main):  Declare Ada_Main_Program and (if CodePeer_Mode
587         is set) Call_Main_Subprogram ahead of, as opposed to
588         inside of, Main.
589         (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
590         generation of a "with" of the user-defined main subprogram.
591         Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
592         (which is now called from Gen_Main instead).
593
594 2011-08-05  Emmanuel Briot  <briot@adacore.com>
595
596         * projects.texi: Added reference to the Makefile package.
597
598 2011-08-05  Thomas Quinot  <quinot@adacore.com>
599
600         * exp_ch7.adb: Minor comment rewording.
601
602 2011-08-05  Ed Falis  <falis@adacore.com>
603
604         * env.c: Fix comment.
605
606 2011-08-05  Hristian Kirtchev  <kirtchev@adacore.com>
607
608         * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
609         character comparison and rely on concrete entities instead.
610
611 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
612
613         * sem_ch3.adb: (Check_Private_Overriding): better error message,
614         suggested by AI95-0068.
615
616 2011-08-05  Hristian Kirtchev  <kirtchev@adacore.com>
617
618         * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
619         the two potential initialization calls. This accounts for any
620         access-before-elaboration checks which may precede the initialization
621         calls.
622         (Next_Suitable_Statement): New routine. Returns the next real statement
623         after the input node while skipping generated checks.
624         * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
625         with comment on usage.
626         Do not generate Elaborate_All when the trigger is a finalization call
627         coming from a type init proc.
628         (Check_Elab_Call): Propagate the initialization procedure context to
629         subsequent calls to Check_A_Call.
630         (Check_Internal_Call_Continue): Propagate the initialization procedure
631         context to subsequent calls to Check_Elab_Call.
632         (Is_Finalization_Procedure): New routine. Returns True if the input
633         entity denotes a [Deep_]Finalize routine.
634         * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
635         along with comment on usage.
636
637 2011-08-05  Vadim Godunko  <godunko@adacore.com>
638
639         * s-atocou.ads: Add list of supported platforms.
640
641 2011-08-05  Yannick Moy  <moy@adacore.com>
642
643         * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
644
645         * opt.ads (Disable_ALI_File): new Boolean flag
646         * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
647
648 2011-08-05  Ed Falis  <falis@adacore.com>
649
650         * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
651         environ is properly defined.
652
653 2011-08-05  Vincent Celier  <celier@adacore.com>
654
655         * make.adb (Compilation_Phase): Exit immediately when all objects have
656         been found up to date, to avoid multiple exit messages.
657         * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
658         same project for languages with no compiler.
659         * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
660         -eI.
661 2011-08-05  Robert Dewar  <dewar@adacore.com>
662
663         * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
664         sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
665         prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
666         s-atocou-builtin.adb: Minor reformatting.
667
668 2011-08-05  Yannick Moy  <moy@adacore.com>
669
670         * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
671         if the node to wrap is a pragma check, this node and enclosed
672         expression are not expanded, so do not apply any transformations here.
673         * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
674         introducing transient scopes.
675
676 2011-08-05  Jose Ruiz  <ruiz@adacore.com>
677
678         * adaint.c (__gnat_set_writable, __gnat_set_readable,
679         __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
680         __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
681         routine is available, so we use the default implementation of these
682         functions.
683         * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
684         support for copying attributes on VxWorks 6.
685
686 2011-08-05  Yannick Moy  <moy@adacore.com>
687
688         * debug.adb: Remove use of -gnatd.D.
689         * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
690         * opt.ads: Simplify variables for ALFA mode, to keep one only
691         * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
692         to ALFA mode.
693
694 2011-08-05  Vincent Celier  <celier@adacore.com>
695
696         * prj-conf.adb (Do_Autoconf): Look also for --RTS in
697         Builder'Default_Switches.
698
699 2011-08-05  Vincent Celier  <celier@adacore.com>
700
701         * makeusg.adb: Add lines for --create-map-file switches.
702
703 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
704
705         * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
706         profile is incomplete and the full view is available, replace it with
707         the full view.
708         * sem_ch6.adb (Possible_Freeze): if a type in the profile is
709         incomplete, freezing the subprogram is delayed until the full view is
710         frozen.
711         * sem_type.adb (Disambiguate): an ambiguity between a user-defined
712         fixed-point multiplication operator and the predefined operator is
713         resolved in favor of the user-defined one.
714
715 2011-08-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
716
717         * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
718         CONST_CAST.
719
720 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
721
722         * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
723         whether a type lacks user-defined Read or Write operations, or has a
724         component that lacks them.
725         * sem_attr.adb (Check_Stream_Attribute): if restriction
726         No_Default_Stream_Attributes is active, verify that all subcomponent
727         types of the target have user-defined stream operations, and report
728         error otherwise.
729         * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
730         * exp_strm.adb: Build_Elementary_Input_Call,
731         Build_Elementary_Write_Call): remove checks for restriction
732         No_Default_Stream_Attributes, now checked in semantics.
733
734 2011-08-04  Vincent Celier  <celier@adacore.com>
735
736         * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
737         switches on the command line, look for all valid --RTS switches in the
738         Builder switches and for each language use the first runtime name found
739         to invoke gprconfig.
740         (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
741         command line and there is no auto-configuration.
742         (Runtime_Name_Set_For): New function.
743
744 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
745
746         * exp_ch7.adb (Build_Object_Declarations): Do not generate the
747         elaborate initialization expression for variable Abort when processing
748         a package body or a declaration.
749         (Create_Finalizer): Propagate the package context when creating the
750         exception-related variables.
751         * exp_ch7.ads (Build_Object_Declarations): New formal parameter
752         For_Package along with usage comment.
753
754 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
755
756         * gcc-interface/Makefile.in: Clean up targets.
757         Enable new package for atomic counters and copy-on-write implementation
758         of unbounded strings on x86 platforms.
759         * gcc-interface/Make-lang.in: Update dependencies.
760
761 2011-08-04  Robert Dewar  <dewar@adacore.com>
762
763         * exp_ch7.adb: Minor reformatting.
764
765 2011-08-04  Robert Dewar  <dewar@adacore.com>
766
767         * exp_strm.adb: Minor reformatting.
768
769 2011-08-04  Vadim Godunko  <godunko@adacore.com>
770
771         * s-atocou.adb: Replace by dummy version and use on targets where atomic
772         operations are not supported.
773         * s-atocou-builtin.adb: Renamed from s-atocou.adb.
774         * s-atocou-x86.adb: New file.
775         * Makefile.rtl: Add s-atocou.o file
776
777 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
778
779         * make.adb (Compile): Move setting of CodePeer_Mode to ...
780         (Compilation_Phase): ... here.
781         (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
782
783 2011-08-04  Thomas Quinot  <quinot@adacore.com>
784
785         * Make-generated.in: Fix minor typo in comment.
786
787 2011-08-04  Thomas Quinot  <quinot@adacore.com>
788
789         * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
790         the project path.
791
792 2011-08-04  Robert Dewar  <dewar@adacore.com>
793
794         * a-coinho.adb: Minor reformatting.
795
796 2011-08-04  Robert Dewar  <dewar@adacore.com>
797
798         * a-coinho.ads: Minor reformatting.
799
800 2011-08-04  Vadim Godunko  <godunko@adacore.com>
801
802         * s-atocou.ads, s-atocou.adb: New files.
803         * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
804         a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
805         direct use of GCC's atomic builtins and replace them by use of new
806         atomic counter package.
807
808 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
809
810         * exp_strm.adb: better error message for No_Default_Stream_Attributes.
811
812 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
813
814         * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
815         with a call to Get_External_Tag.
816         * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
817         subprogram usage. Remove the guard against package declarations and
818         bodies since Build_Cleanup_Statements is no longer invoked in that
819         context.
820         (Build_Components): Initialize Tagged_Type_Stmts when the context
821         contains at least one library-level tagged type.
822         (Build_Finalizer): New local variables Has_Tagged_Types and
823         Tagged_Type_Stmts along with associated comments on usage. Update the
824         logic to include tagged type processing.
825         (Create_Finalizer): Insert all library-level tagged type unregistration
826         code before the jump block circuitry.
827         (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
828         (Expand_N_Package_Declaration): Remove the call to
829         Build_Cleanup_Statements.
830         (Process_Tagged_Type_Declaration): New routine. Generate a call to
831         unregister the external tag of a tagged type.
832         (Processing_Actions): Reimplemented to handle tagged types.
833         (Process_Declarations): Detect the declaration of a library-level
834         tagged type and carry out the appropriate actions.
835         (Unregister_Tagged_Types): Removed. The machinery has been directly
836         merged with Build_Finalizer.
837
838 2011-08-04  Robert Dewar  <dewar@adacore.com>
839
840         * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
841         gnatls.adb, exp_ch3.adb: Minor reformatting.
842
843 2011-08-04  Marc Sango  <sango@adacore.com>
844
845         * sem_attr.adb (Analyze_Attribute): Replace the message
846         "invisible attribute of}" of the spark restriction violation in
847         attribute reference by the simple message "invisible attribute of type".
848         Indeed, the node value Error_Msg_Node_1 used is in conflit with the
849         two insertion characters: '&' and '}'.
850
851 2011-08-04  Vadim Godunko  <godunko@adacore.com>
852
853         * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
854         * a-coinho.ads, a-coinho.adb: New file.
855         * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
856
857 2011-08-04  Nicolas Roche  <roche@adacore.com>
858
859         * alfa_test.adb: Not all ali files are containing alfa information even
860         if compiled with -gnatd.F. So suppress warning about missing ALFA
861         information.
862
863 2011-08-04  Yannick Moy  <moy@adacore.com>
864
865         * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
866         scope.
867         * put_alfa.adb: Check that scope name is not empty.
868
869 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
870
871         * exp_ch3.adb (Stream_Operation_Ok): new predicate
872         Needs_Elementary_Stream_Operation, to determine whether user-defined
873         Read and Write attributes are available for the elementary components
874         of the given type. If only the predefined attributes are available,
875         then when restriction No_Default_Stream_Attributes is active the
876         predefined stream attributes for the composite type cannot be created.
877
878 2011-08-04  Robert Dewar  <dewar@adacore.com>
879
880         * bindgen.adb: Fix obsolete comments and names from Ada/C days.
881         Put routines in alpha order
882
883 2011-08-04  Jose Ruiz  <ruiz@adacore.com>
884
885         * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
886         * gcc-interface/Make-lang.in: Update dependencies.
887
888 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
889
890         * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
891         * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
892         gnat1why).
893
894 2011-08-04  Robert Dewar  <dewar@adacore.com>
895
896         * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
897         lib-xref-alfa.adb: Minor reformatting.
898
899 2011-08-04  Marc Sango  <sango@adacore.com>
900
901         * sem_ch12.adb (Analyze_Generic_Package_Declaration,
902         Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
903         Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
904         mode.
905
906 2011-08-04  Tristan Gingold  <gingold@adacore.com>
907
908         * bindgen.adb (Gen_Adainit_C): Remove.
909         (Gen_Adafinal_C): Ditto.
910         (Gen_Elab_Externals_C): Ditto.
911         (Gen_Elab_Calls_C): Ditto.
912         (Gen_Elab_Order_C): Ditto.
913         (Gen_Elab_Defs_C): Ditto.
914         (Gen_Finalize_Library_C): Ditto.
915         (Gen_Finalize_Library_Defs_C): Ditto.
916         (Gen_Main_C): Ditto.
917         (Gen_Output_File_C): Ditto.
918         (Gen_Restrictions_C): Ditto.
919         (Gen_Versions_C): Ditto.
920         (Write_Info_Ada_C): Ditto.
921         (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
922         (Gen_Output_File): Do not force Ada_Bind_File anymore.
923         Always call Gen_Output_File_Ada.
924         * gnatlink.adb (Begin_Info): Now a constant.
925         (End_Info): Ditto.
926         (Ada_Bind_File): Remove
927         (Process_Args): Do not handle -A/-C.  Remove not Ada_Bind_File cases.
928         * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
929         * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
930         * opt.ads (Ada_Bind_File): Remove.
931
932 2011-08-04  Thomas Quinot  <quinot@adacore.com>
933
934         * projects.texi: Document target-specific directory in default project
935         path for gnatmake.
936
937 2011-08-04  Thomas Quinot  <quinot@adacore.com>
938
939         * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
940         path in all cases .
941
942 2011-08-04  Yannick Moy  <moy@adacore.com>
943
944         * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
945         opt.ads, lib-xref.ads: Code clean up.
946
947 2011-08-04  Yannick Moy  <moy@adacore.com>
948
949         * gnat_rm.texi: Update description of Test_Case
950         * gnat_ugn.texi: Typo.
951
952 2011-08-04  Ed Falis  <falis@adacore.com>
953
954         * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
955
956 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
957
958         * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
959         it is of type Root_Controlled. This action eliminates fields Prev and
960         Next from type equality.
961
962 2011-08-04  Yannick Moy  <moy@adacore.com>
963
964         * lib-xref-alfa.adb: Correct typo.
965
966 2011-08-04  Matthew Heaney  <heaney@adacore.com>
967
968         * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
969         component.
970
971 2011-08-04  Yannick Moy  <moy@adacore.com>
972
973         * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
974         (Analyze_Pragma): allow static string expression for name of Test_Case,
975         instead of simply string literals.
976         * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
977         expressions.
978
979 2011-08-04  Vincent Celier  <celier@adacore.com>
980
981         * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
982         case suffixes to find truncated main sources.
983
984 2011-08-04  Tristan Gingold  <gingold@adacore.com>
985
986         * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
987         s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
988         (Compute_Current_Task): Ditto.
989
990 2011-08-04  Tristan Gingold  <gingold@adacore.com>
991
992         * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
993
994 2011-08-04  Yannick Moy  <moy@adacore.com>
995
996         * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
997         library-level constant.
998         (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
999         * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
1000         used as selector of parameter association, in ALFA mode.
1001
1002 2011-08-04  Robert Dewar  <dewar@adacore.com>
1003
1004         * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
1005         s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
1006         reformatting.
1007
1008 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
1009
1010         * make.adb (Linking_Phase): Set source search path before calling
1011         gnatlink in CodePeer mode.
1012
1013 2011-08-04  Javier Miranda  <miranda@adacore.com>
1014
1015         * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
1016         Remove code which takes care of building TSDs.
1017         * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
1018         * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
1019         the accessibility check in VM targets.
1020         * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
1021         (Building_Static_DT): Now returns false for VM targets.
1022         (Build_VM_TSDs): Removed.
1023         (Expand_Interface_Conversion): Generate missing runtime check for
1024         conversions to interface types whose target type is unknown at compile
1025         time.
1026         (Make_VM_TSD): Add missing code to disable the generation of calls to
1027         Check_TSD if the tagged type is not defined at library level, or not
1028         has a representation clause specifying its external tag, or -gnatdQ is
1029         active.
1030         * exp_disp.ads (Build_VM_TSDs): Removed.
1031         (Make_VM_TSDs): Spec relocated from exp_disp.adb
1032         * sem_disp.adb (Check_Dispatching_Operation): No code required to
1033         register primitives in the dispatch tables in VM targets.
1034         * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
1035         initialization of class-wide interface objects in VM targets.
1036         (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
1037         of Make_DT).
1038
1039 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
1040
1041         * gnatlink.adb (Gnatlink): Correct missleading error message displayed
1042         when dotnet-ld cannot be found.
1043
1044 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
1045
1046         * bindgen.adb: Simplify significantly generation of binder body file in
1047         CodePeer mode.
1048         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
1049         when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
1050         not expanded).
1051
1052 2011-08-04  Yannick Moy  <moy@adacore.com>
1053
1054         * sem_prag.adb, sem.ads: Code cleanup.
1055
1056 2011-08-04  Tristan Gingold  <gingold@adacore.com>
1057
1058         * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
1059         * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
1060         results if possible.
1061         * s-stusta.adb (Print): Adjust after changes in s-stausa.
1062         * gnat_ugn.texi: Update dynamic stack usage section.
1063
1064 2011-08-04  Steve Baird  <baird@adacore.com>
1065
1066         * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
1067         Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
1068         contains only a call to the user-defined main subprogram.
1069         (Gen_Main_Ada) - If CodePeer_Mode is set, then
1070         call the "wrapper" subprogram instead of directly
1071         calling the user-defined main subprogram.
1072
1073 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1074
1075         * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
1076         alternatives of a case statement for controlled objects. Rename local
1077         variable A to Dead_Alt.
1078         (Expand_N_If_Statement): Check the then and else statements of an if
1079         statement for controlled objects. Check the then statements of all
1080         elsif parts of an if statement for controlled objects.
1081         (Expand_N_Loop_Statement): Check the statements of a loop for controlled
1082         objects.
1083         * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
1084         detects a loop associated with the expansion of an array object.
1085         Augment the processing of the loop statements to account for a possible
1086         wrap done by Process_Statements_For_Controlled_Objects.
1087         * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
1088         statements and abortable part of an asynchronous select for controlled
1089         objects.
1090         (Expand_N_Conditional_Entry_Call): Check the else statements of a
1091         conditional entry call for controlled objects.
1092         (Expand_N_Selective_Accept): Check the alternatives of a selective
1093         accept for controlled objects.
1094         (Expand_N_Timed_Entry_Call): Check the entry call and delay
1095         alternatives of a timed entry call for controlled objects.
1096         * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
1097         exception handler for controlled objects.
1098         * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
1099         Add formal parameter Nested_Constructs along with its associated
1100         comment.
1101         (Requires_Cleanup_Actions (Node_Id)): Update all calls to
1102         Requires_Cleanup_Actions.
1103         (Process_Statements_For_Controlled_Objects): New routine.
1104         * exp_util.ads (Process_Statements_For_Controlled_Objects): New
1105         routine. Inspect a node which contains a non-handled sequence of
1106         statements for controlled objects. If such an object is found, the
1107         statements are wrapped in a block.
1108
1109 2011-08-04  Bob Duff  <duff@adacore.com>
1110
1111         * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
1112         need to compare with Class_Wide_Type (T2), in order to get at the
1113         original class-wide type node.
1114         * sem_type.ads (Covers): Improve the comment.
1115         * einfo.ads (Class_Wide_Type): Improve the comment.
1116         * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
1117         the type of the Deref.
1118
1119 2011-08-04  Yannick Moy  <moy@adacore.com>
1120
1121         * gnat_rm.texi: Document that Test_Case pragma can only appear on
1122         separate declarations.
1123         * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
1124         check identifier of pragma argument.
1125         (Chain_TC): check that no other test case associated to the same entity
1126         share the same name.
1127         (Check_Test_Case): disallow test case inside subprogram body
1128         (Analyze_Pragma): correct call to check identifier and not argument
1129         * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
1130         function gets name from test case pragma.
1131
1132 2011-08-04  Yannick Moy  <moy@adacore.com>
1133
1134         * gnat_rm.texi: Document new pragma and aspect.
1135         * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
1136         (No_Duplicates_Allowed): new constant array defining whether duplicates
1137         aspects of each kind can appear on the same declaration.
1138         * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
1139         field, which points to a node holding the previous Spec_PPC_List.
1140         * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
1141         through the indirection with Contract.
1142         * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
1143         * par-prag.adb (Prag): do nothing on Test_Case pragma
1144         * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
1145         be called directly.
1146         * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
1147         component Ensures of Test_Case.
1148         * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
1149         (Analyze_Generic_Subprogram_Declaration,
1150         Analyze_Subprogram_Instantiation,
1151         Analyze_Abstract_Subprogram_Declaration,
1152         Analyze_Subprogram_Body_Helper,
1153         Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
1154         insert contract in subprogram node at point of definition
1155         * sem_ch13.adb
1156         (Aspect_Loop): do not raise error on duplicate Test_Case aspect
1157         (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
1158         corresponding pragma
1159         (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
1160         * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
1161         similar to the analysis of pre/post
1162         (Derive_Subprogram): insert contract in subprogram node at point of
1163         derivation.
1164         * sem_prag.adb, sem_prag.ads
1165         (Check_Arg_Is_String_Literal, Check_Identifier):
1166         new checking procedures to be called in treatment of pragmas
1167         (Check_Test_Case): new procedure to check that a Test_Case aspect or
1168         pragma is well-formed. This does not check currently that 'Result is
1169         used only in the Ensures component of a Test_Case.
1170         (Analyze_Pragma): add case for Test_Case
1171         (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
1172         components of a Test_Case.
1173         (Preanalyze_TC_Args): new procedure to preanalyze the boolean
1174         expressions in the 3rd (and 4th if present) arguments of a Test_Case
1175         pragma, treated as spec expressions.
1176         (Sig_Flags): add value -1 for Test_Case.
1177         * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
1178         Get_Requires_From_Test_Case_Pragma): getters for both expression
1179         components of a Test_Case.
1180         * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
1181         indirection between an entry or [generic] subprogram entity and its
1182         pre/post + test-cases.
1183         (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
1184         get/set for fields of an N_Contract node.
1185         * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
1186         Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
1187         names and pragma for Test_Case.
1188         * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
1189
1190 2011-08-04  Vincent Celier  <celier@adacore.com>
1191
1192         * gnat_ugn.texi: Improve documentation of gnatmake switch
1193         --source-info-file=.
1194
1195 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1196
1197         * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
1198         type). Initialize Atyp to the appropriate type which is later checked
1199         for completion. Rewrite the assertion associated with private type
1200         completion.
1201
1202 2011-08-04  Ed Falis  <falis@adacore.com>
1203
1204         * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
1205         initialize the number of CPUs.
1206
1207 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
1208
1209         * sem_type.adb (Disambiguate): New subsidiary routine
1210         In_Same_Declaration_List, to implement AI05-0020: a user-defined
1211         equality on an anonymous access type whose designated type is private
1212         does not lead to an ambiguity with the universal access equality
1213         operator in the body or child units of the defining package. The same
1214         is true for a multiplication operator on a private type completed with
1215         a fixed-point-type.
1216
1217 2011-08-04  Javier Miranda  <miranda@adacore.com>
1218
1219         * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
1220         (Normalize_Scalars_Config): Removed.
1221         * opt.adb
1222         (Register_Opt_Config_Switches): Remove registering config values of
1223         Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
1224         (Restore_Opt_Config_Switches): Remove code which restores the values of
1225         Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
1226         Init_Or_Norm_Scalars.
1227         (Save_Opt_Config_Switches): Remove code which saves values of
1228         Init_Or_Norm_Scalars and Normalize_Scalars.
1229         (Set_Opt_Config_Switches): Remove code which restores config values of
1230         Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
1231         Init_Or_Norm_Scalars.
1232
1233 2011-08-04  Yannick Moy  <moy@adacore.com>
1234
1235         * frontend.adb (Frontend): remove previous patch to avoid full
1236         qualification in ALFA mode.
1237         * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
1238         * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
1239         unique name for an entity, which could be used to identify the entity
1240         across compilation units.
1241
1242 2011-08-04  Thomas Quinot  <quinot@adacore.com>
1243
1244         * prj-env.adb
1245         (Initialize_Default_Project_Path): Add target specific directory
1246         ($prefix/$target/lib/gnat) in front of project path in all cases
1247         (making gnatmake's behaviour consistent with gprbuild).
1248         * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
1249         Pass target name from Sdefault to project subsystem.
1250         * gnatls.adb: Show new target specific default project directory.
1251
1252 2011-08-04  Johannes Kanig  <kanig@adacore.com>
1253
1254         * cstand.adb: Add Information to Identifier in Standard
1255         (Identifer_For): Set Entity to the corresponding entity
1256
1257 2011-08-04  Sergey Rybin  <rybin@adacore.com>
1258
1259         * gnat_ugn.texi: Update doc on gnatcheck.
1260
1261 2011-08-04  Yannick Moy  <moy@adacore.com>
1262
1263         * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
1264         xrefs in a scope.
1265
1266 2011-08-04  Yannick Moy  <moy@adacore.com>
1267
1268         * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
1269         performing expansion.
1270         * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
1271         Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
1272         it is not called in ALFA mode.
1273
1274 2011-08-04  Emmanuel Briot  <briot@adacore.com>
1275
1276         * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
1277         after all, so removed.
1278
1279 2011-08-04  Sergey Rybin  <rybin@adacore.com>
1280
1281         * vms_data.ads: Add missing VMS qualifiers.
1282
1283 2011-08-04  Emmanuel Briot  <briot@adacore.com>
1284
1285         * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
1286         the list of files on the command line after processing it through
1287         Complete_Mains.
1288
1289 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1290
1291         * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
1292         processing for .NET/JVM. These targets can now benefit from
1293         Raise_From_Controlled_Operation and they share the same processing with
1294         standard targets.
1295         (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
1296         These targets need transient scopes in order to properly finalize short
1297         lived controlled objects.
1298         (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
1299          NET/JVM. These targets can now benefit from
1300         Raise_From_Controlled_Operation and they share the same processing with
1301         standard targets.
1302
1303 2011-08-04  Geert Bosch  <bosch@adacore.com>
1304
1305         * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
1306
1307 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
1308
1309         * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
1310         Expand_Record_Aggregate, to determine whether aggregate must be
1311         expanded into assignments. This is the case if the ancestor part is
1312         private, regarless of the setting of the flag Has_Private_Ancestor.
1313
1314 2011-08-04  Ed Falis  <falis@adacore.com>
1315
1316         * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
1317
1318 2011-08-04  Bob Duff  <duff@adacore.com>
1319
1320         * sinfo.ads: Fix comment.
1321
1322 2011-08-04  Steve Baird  <baird@adacore.com>
1323
1324         * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
1325         choose a package name in much the same way as is
1326         done for JGNAT when VM_Target /= No_VM, except that
1327         a slightly more distinctive prefix string is used.
1328
1329 2011-08-04  Emmanuel Briot  <briot@adacore.com>
1330
1331         * makeutl.adb (Complete_Mains): no longer accept unit names on the
1332         gnatmake command line.
1333         This behavior was never documented (and was supported only because of
1334         an early bug in the code). This case might lead to ambiguous cases
1335         (between unit names and truncated base names without suffixes).
1336
1337 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1338
1339         * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
1340         Remove the external tag of a tagged type from the internal hash table.
1341         * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
1342         expanded usage of the routine. Strenghten the check for Is_Master. Add
1343         processing for tagged types.
1344         (Build_Finalizer): Create all the necessary lists used in finalizer
1345         creation when the processed context is a package that may contain
1346         tagged types.
1347         (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
1348         Requires_Cleanup_Actions.
1349         (Expand_N_Package_Body): Package bodies may need clean up code
1350         depending on whether they contain tagged types.
1351         (Expand_N_Package_Declaration): Package declarations may need clean up
1352         code depending on whether they contain tagged types.
1353         (Unregister_Tagged_Types): New routine. Search through a list of
1354         declarations or statements, looking for non-abstract Ada tagged types.
1355         For each such type, generate code to unregister the external tag.
1356         * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
1357         Requires_Cleanup_Actions.
1358         (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
1359         through a list of declarations or statements looking for non-abstract
1360         Ada tagged types or controlled objects.
1361         * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
1362         Requires_Cleanup_Actions.
1363         (Has_Controlled_Objects (List_Id, Boolean)): Removed.
1364         * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
1365         RE_Unit_Table.
1366
1367 2011-08-04  Vincent Celier  <celier@adacore.com>
1368
1369         * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
1370         has Ada sources, not project Project, because if the root project
1371         Project has no sources of its own, all projects will be deemed without
1372         sources.
1373
1374 2011-08-04  Gary Dismukes  <dismukes@adacore.com>
1375
1376         * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
1377         of the No_Param_Proc acc-to-subp type used for initialization of
1378         __gnat_finalize_library_objects so that it's declared at library level
1379         rather than nested inside of the adainit routine.
1380
1381 2011-08-04  Javier Miranda  <miranda@adacore.com>
1382
1383         * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
1384         if the tagged type has a representation clause which specifies its
1385         external tag.
1386
1387 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
1388
1389         * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
1390         Remove previous procedure with that name.
1391         * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
1392         when appropriate.
1393         * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
1394         subtype mark, the ancestor cannot have unknown discriminants.
1395         (Resolve_Record_Aggregate): if the type has invisible components
1396         because of a private ancestor, the aggregate is illegal.
1397
1398 2011-08-04  Vincent Celier  <celier@adacore.com>
1399
1400         * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
1401         account switches -gnat2005, -gnat12 and -gnat2012.
1402
1403 2011-08-04  Bob Duff  <duff@adacore.com>
1404
1405         * s-tasdeb.ads: Minor comment fix.
1406
1407 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
1408
1409         * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
1410         CodePeer mode.
1411         * switch.ads, switch.adb (Is_Language_Switch): New function.
1412
1413 2011-08-04  Vincent Celier  <celier@adacore.com>
1414
1415         * switch-c.adb: Minor comment addition.
1416
1417 2011-08-04  Vincent Celier  <celier@adacore.com>
1418
1419         * vms_conv.adb (Process_Argument): Fail graciously when qualifier
1420         ending with '=' is followed by a space (missing file name).
1421
1422 2011-08-04  Pascal Obry  <obry@adacore.com>
1423
1424         * g-regist.ads: Fix size of HKEY on x86_64-windows.
1425
1426 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
1427
1428         * sem_ch12.adb (Analyze_Associations): New routine
1429         Check_Overloaded_Formal_Subprogram to reject a formal package when
1430         there is a named association or a box initialisation for an overloaded
1431         formal subprogram of the corresponding generic.
1432
1433 2011-08-04  Yannick Moy  <moy@adacore.com>
1434
1435         * alfa.ads (ALFA_Xref_Record): add component for type of entity
1436         * get_alfa.adb, put_alfa.adb: Read and write new component of
1437         cross-reference.
1438         * lib-xref-alfa.adb (Collect_ALFA): generate new component.
1439
1440 2011-08-04  Pascal Obry  <obry@adacore.com>
1441
1442         * urealp.adb: Minor reformatting.
1443
1444 2011-08-04  Tristan Gingold  <gingold@adacore.com>
1445
1446         * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
1447         Handle the case when Cleanup_Protected_Object returns Empty.
1448
1449 2011-08-04  Yannick Moy  <moy@adacore.com>
1450
1451         * frontend.adb (Frontend): only qualify names in non-ALFA mode
1452
1453 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
1454
1455         * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
1456         call, ignore functions.
1457
1458 2011-08-04  Geert Bosch  <bosch@adacore.com>
1459
1460         * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
1461         point.
1462
1463 2011-08-04  Emmanuel Briot  <briot@adacore.com>
1464
1465         * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
1466         as an index for Builder'Switches. This conforms to the documentation.
1467         * make.adb (Insert_Project_Sources): avoid duplicate code
1468
1469 2011-08-04  Emmanuel Briot  <briot@adacore.com>
1470
1471         * makeutl.adb (Complete_Mains): if the user has passed a relative file
1472         name on the command line (for instance "../dummy"), never assume it can
1473         be a unit name.
1474
1475 2011-08-04  Tristan Gingold  <gingold@adacore.com>
1476
1477         * bindgen.adb: Remove code the reference or create the
1478         Break_Start/__gnat_break_start procedure.
1479         * s-stalib.adb (Break_Start): Removed.
1480
1481 2011-08-04  Emmanuel Briot  <briot@adacore.com>
1482
1483         * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
1484         shared with gprbuild.
1485
1486 2011-08-04  Yannick Moy  <moy@adacore.com>
1487
1488         * par-ch4.adb (P_Primary): preferentially issue an error message about
1489         a missing parenthesis arount a conditional or case expression in Ada
1490         2012 mode, if we detect that the alignment is not correct for a
1491         statement.
1492
1493 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1494
1495         * exp_ch7.adb (Process_Declarations): Do not consider the result of a
1496         tag-to-class-wide conversion as needing finalization actions.
1497         * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
1498         a tag-to-class-wide conversion as needing finalization actions.
1499         (Is_Finalizable_Transient): The result of a tag-to-class-wide
1500         conversion does not need finalization actions.
1501         (Is_Tag_To_CW_Conversion): New routine.
1502         * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
1503         whether an object is the result of a tag-to-class-wide conversion.
1504
1505 2011-08-04  Yannick Moy  <moy@adacore.com>
1506
1507         * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
1508         the left-hand-side and right-hand-side of a conjunct are inserted when
1509         translating a pre- or postcondition
1510         * sem_ch6.adb: Correct typo in comment
1511
1512 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
1513
1514         * gnat_rm.texi: Ravenscar does not prohibit dependence on
1515         Unchecked_Conversion and Unchecked_Deallocation.
1516
1517 2011-08-04  Thomas Quinot  <quinot@adacore.com>
1518
1519         * make.adb: Minor reformatting.
1520
1521 2011-08-04  Emmanuel Briot  <briot@adacore.com>
1522
1523         * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
1524         sources in the project and its imported projects, but not in the whole
1525         tree.
1526
1527 2011-08-04  Emmanuel Briot  <briot@adacore.com>
1528
1529         * make.adb: Remove debug trace.
1530
1531 2011-08-04  Vincent Celier  <celier@adacore.com>
1532
1533         * makeutl.adb (Do_Complete): Get the absolute path name of a relative
1534         path in canonical form, to be able to compare path names on platforms
1535         such as Windows or Darwin.
1536
1537 2011-08-04  Thomas Quinot  <quinot@adacore.com>
1538
1539         * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
1540         For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
1541         * scos.ads: Update documentation accordingly.
1542         * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
1543         pragmas.
1544
1545 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
1546
1547         * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
1548         attribute only if prefix type is scalar.
1549
1550 2011-08-04  Emmanuel Briot  <briot@adacore.com>
1551
1552         * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
1553         in gnatmake for specifying mains on the command line that do not belong
1554         to the main project. These mains must currently all belong to the same
1555         project, though.
1556         (Ultimate_Extension_Of): removed, since duplicated
1557         Ultimate_Extending_Project.
1558
1559 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
1560
1561         * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
1562         instead.
1563         (CodePeer_Mode_String): New.
1564         (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
1565         CodePeer mode.
1566         (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
1567         * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
1568         mode, since no useful elaboration subprogram is needed by CodePeer.
1569         * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
1570         In this mode, compile binder file with -gnatC and do stop after this
1571         step.
1572
1573 2011-08-04  Vincent Celier  <celier@adacore.com>
1574
1575         * exp_ch7.adb: Minor comment fix.
1576
1577 2011-08-04  Robert Dewar  <dewar@adacore.com>
1578
1579         * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
1580         exp_ch4.adb, makeutl.adb: Minor reformatting.
1581
1582 2011-08-04  Emmanuel Briot  <briot@adacore.com>
1583
1584         * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
1585         Create several new subprograms to move code out of Make. This makes the
1586         code more readable, removes code duplication, and is a preparation work
1587         for adding support for aggregate projects.
1588
1589 2011-08-04  Tristan Gingold  <gingold@adacore.com>
1590
1591         * s-po32gl.ads, s-po32gl.adb: New files.
1592         * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
1593         * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
1594         (Build_Finalization_Collection): Use it.
1595         * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
1596         * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
1597         literals.
1598         * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
1599         * gcc-interface/Make-lang.in: Update dependencies.
1600
1601 2011-08-04  Emmanuel Briot  <briot@adacore.com>
1602
1603         * makeutl.adb (Complete_Mains): add support for specs with no suffix on
1604         the command line.
1605
1606 2011-08-04  Emmanuel Briot  <briot@adacore.com>
1607
1608         * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
1609         command line is not a file name, also check whether it could be a unit
1610         name.
1611
1612 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
1613
1614         * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
1615         the header of the finalization routine.
1616         If the unit has no finalizer but is a body whose spec has one, then
1617         generate the decrement of the elaboration entity only.
1618         If the unit has a finalizer and is a spec, then do not generate the
1619         decrement of the elaboration entity.
1620         (Gen_Finalize_Library_C): Likewise.
1621
1622 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1623
1624         * exp_ch7.adb (Alignment_Of): New subsidiary routine.
1625         (Bounds_Size_Expression): Removed.
1626         (Double_Alignment_Of): New subsidiary routine.
1627         (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
1628         for a hole in the dope vector of unconstrained arrays due to different
1629         index and element alignments.
1630
1631 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
1632
1633         * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
1634         raise program_error because body has not been seen yet.
1635
1636 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
1637
1638         * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
1639         an unresolved name.
1640
1641 2011-08-04  Vincent Celier  <celier@adacore.com>
1642
1643         * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
1644
1645 2011-08-04  Yannick Moy  <moy@adacore.com>
1646
1647         * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
1648         * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
1649
1650 2011-08-04  Thomas Quinot  <quinot@adacore.com>
1651
1652         * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
1653         instantiation in RCI.
1654
1655 2011-08-04  Emmanuel Briot  <briot@adacore.com>
1656
1657         * make.adb: Share more code with gprbuild
1658
1659 2011-08-04  Emmanuel Briot  <briot@adacore.com>
1660
1661         * projects.texi: Added documentation for the IDE'Gnat project file
1662         attribute.
1663
1664 2011-08-04  Nicolas Roche  <roche@adacore.com>
1665
1666         * gnat_rm.texi: Minor editing.
1667
1668 2011-08-04  Javier Miranda  <miranda@adacore.com>
1669
1670         * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
1671         and the library case for VM targets.
1672         (Gen_Adainit_Ada): Likewise.
1673
1674 2011-08-04  Robert Dewar  <dewar@adacore.com>
1675
1676         * g-altive.ads: Minor comment updates.
1677         * prj-nmsc.adb: Minor reformatting.
1678
1679 2011-08-04  Javier Miranda  <miranda@adacore.com>
1680
1681         * opt.ads
1682         (Normalize_Scalars_Config): Value of the configuration switch set by
1683         pragma Normalize_Scalars when it appears in the gnat.adc file.
1684         (Normalize_Scalars): New field for record Config_Switches_Type. Used
1685         to save and restore settings of this pragma.
1686         * opt.adb
1687         (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
1688         Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
1689
1690 2011-08-04  Vincent Celier  <celier@adacore.com>
1691
1692         * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
1693
1694 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
1695
1696         * makeutl.adb: Minor reformatting.
1697
1698 2011-08-04  Olivier Hainque  <hainque@adacore.com>
1699
1700         * g-altive.ads: Update comments to reflect that only the soft
1701         binding is available today.
1702
1703 2011-08-04  Robert Dewar  <dewar@adacore.com>
1704
1705         * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
1706         makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
1707         * gcc-interface/Make-lang.in: Update dependencies.
1708
1709 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
1710
1711         * prj-env.adb: Remove local debug traces.
1712
1713 2011-08-04  Yannick Moy  <moy@adacore.com>
1714
1715         * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
1716         was used instead of Hi_OK, which could cause a read of an uninitialized
1717         value later on. Detected while working on the new warning.
1718         * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
1719         to local variable.
1720         * sem_ch5.adb (Analyze_Assignment): set the last assignment component
1721         in more cases, in order to detect more unreferenced values.
1722         * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
1723         object for expression, if any.
1724
1725 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
1726
1727         * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
1728         the operand types instead of the Esize.
1729
1730 2011-08-04  Steve Baird  <baird@adacore.com>
1731
1732         * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
1733         enable CodePeer_Mode.
1734         * bindusg.adb (Display): Add help message describing -P binder switch.
1735         * gnat_ugn.texi: Document -P binder switch.
1736         * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
1737         user-defined main program directly.
1738         (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
1739         user-defined main program in the context clause of the package body.
1740
1741 2011-08-04  Yannick Moy  <moy@adacore.com>
1742
1743         * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
1744         duplicate of Defining_Entity
1745         (Get_Unique_Entity_For_Decl): rename function into
1746         Unique_Defining_Entity
1747         * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
1748         (Formal_Proof_On): remove synthesized flag
1749         * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
1750         sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
1751         sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
1752         * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
1753         Annotate (Formal_Proof)
1754
1755 2011-08-04  Emmanuel Briot  <briot@adacore.com>
1756
1757         * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
1758         source files with non-standard naming schemes, in imported projects
1759
1760 2011-08-04  Emmanuel Briot  <briot@adacore.com>
1761
1762         * makeutl.adb (Complete_Mains): when a multi-unit source file is
1763         specified on the gprbuild command line, we need to compile all units
1764         within that file, not just the first one we find
1765         Fix error message for mains that are not found.
1766
1767 2011-08-04  Thomas Quinot  <quinot@adacore.com>
1768
1769         * sem_ch6.adb: Update comment.
1770         * sem_ch12.adb: Minor reformatting.
1771
1772 2011-08-04  Bob Duff  <duff@adacore.com>
1773
1774         * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
1775         Acceptor.Terminate_Alternative without locking Acceptor, which causes a
1776         race condition whose symptom is to fail to lock Parent. That, in turn,
1777         causes Parent.Awake_Count to be accessed without locking Parent, which
1778         causes another race condition whose symptom is that Parent.Awake_Count
1779         can be off by 1 (either too high or too low). The solution is to lock
1780         Parent unconditionally, and then lock Acceptor, before reading
1781         Acceptor.Terminate_Alternative.
1782
1783 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
1784
1785         * debug.adb: Update comment.
1786
1787 2011-08-04  Robert Dewar  <dewar@adacore.com>
1788
1789         * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
1790         sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
1791         exp_ch6.adb: Minor reformatting.
1792
1793 2011-08-04  Gary Dismukes  <dismukes@adacore.com>
1794
1795         * gnat_ugn.texi: Add sentence about the case of compile-time-detected
1796         checks for -gnateE.
1797
1798 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
1799
1800         * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
1801
1802 2011-08-04  Thomas Quinot  <quinot@adacore.com>
1803
1804         * sinfo.ads: Minor reformatting.
1805
1806 2011-08-04  Emmanuel Briot  <briot@adacore.com>
1807
1808         * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
1809         even if there is no location.
1810
1811 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
1812
1813         * sem_res.adb, sem_ch4.adb: move check for restriction
1814         No_Task_Hierarchy to resolve_allocator.
1815
1816 2011-08-04  Thomas Quinot  <quinot@adacore.com>
1817
1818         * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
1819         This flag of N_Pragma nodes is not used, remove it as well as all of
1820         the associated circuitry.
1821
1822 2011-08-04  Javier Miranda  <miranda@adacore.com>
1823
1824         * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
1825         runtime check on duplicated externa tags
1826         * debug.adb Document switch -gnatdQ.
1827
1828 2011-08-04  Gary Dismukes  <dismukes@adacore.com>
1829
1830         * a-fihema.ads: Minor typo fix.
1831
1832 2011-08-04  Yannick Moy  <moy@adacore.com>
1833
1834         * sem_ch10.adb: Minor comment update.
1835
1836 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1837
1838         * einfo.adb: Update the node field usage to reflect the renaming of
1839         Return_Flag to Return_ Flag_Or_Transient_Decl.
1840         (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
1841         (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
1842         (Write_Field15_Name): Change Return_Flag to
1843         Return_Flag_Or_Transient_Decl.
1844         * einfo.ads: Rename node field Return_Flag to
1845         Return_Flag_Or_Transient_Decl. Update the associated comment and all
1846         occurrences in entities.
1847         (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
1848         associated Inline pragma.
1849         (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
1850         associated Inline pragma.
1851         * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
1852         routine.
1853         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
1854         Return_Flag and Set_Return_Flag.
1855         * exp_ch7.adb (Process_Declarations): Add code to recognize hook
1856         objects generated for controlled transients declared inside an
1857         Exception_With_Actions. Update the calls to Return_Flag.
1858         (Process_Object_Declaration): Add code to add a null guard for hook
1859         objects generated for controlled transients declared inside an
1860         Exception_With_Actions. Update related comment.
1861         * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
1862         objects generated for controlled transients declared inside an
1863         Exception_With_Actions. Update the calls to Return_Flag.
1864         * expander.adb (Expand): Add new case for N_Expression_With_Actions.
1865
1866 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
1867
1868         * sem_util.adb:(Wrong_Type): Improve error message on a one-element
1869         positional aggregate.
1870
1871 2011-08-04  Vincent Celier  <celier@adacore.com>
1872
1873         * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
1874         SLOC only for pragmas.
1875
1876 2011-08-04  Emmanuel Briot  <briot@adacore.com>
1877
1878         * projects.texi: Minor typo fix.
1879
1880 2011-08-04  Emmanuel Briot  <briot@adacore.com>
1881
1882         * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
1883         on case-sensitive file systems.
1884
1885 2011-08-04  Thomas Quinot  <quinot@adacore.com>
1886
1887         * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
1888         nested in a disabled pragma.
1889         * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
1890         enclosing pragma, if any, for X decisions.
1891
1892 2011-08-04  Thomas Quinot  <quinot@adacore.com>
1893
1894         * sem_prag.adb: Minor reformatting.
1895
1896 2011-08-04  Vincent Celier  <celier@adacore.com>
1897
1898         * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
1899         allowed in no run time mode.
1900
1901 2011-08-04  Vincent Celier  <celier@adacore.com>
1902
1903         * make.adb (Check): When -gnatc is used, check for the source file
1904         inside the ALI file with a canonical case file name.
1905
1906 2011-08-04  Emmanuel Briot  <briot@adacore.com>
1907
1908         * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
1909         overriding the separator.
1910
1911 2011-08-04  Robert Dewar  <dewar@adacore.com>
1912
1913         * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
1914         prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
1915
1916 2011-08-04  Robert Dewar  <dewar@adacore.com>
1917
1918         * gnat_rm.texi: Minor documentation fix for pragma Annotate.
1919
1920 2011-08-04  Yannick Moy  <moy@adacore.com>
1921
1922         * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
1923         'Result only appears in postcondition of function.
1924
1925 2011-08-04  Thomas Quinot  <quinot@adacore.com>
1926
1927         * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
1928         external tag, include the value of the external tag in the exception
1929         message.
1930
1931 2011-08-04  Yannick Moy  <moy@adacore.com>
1932
1933         * sem_attr.adb (Result): modify error message for misplaced 'Result
1934
1935 2011-08-04  Sergey Rybin  <rybin@adacore.com>
1936
1937         * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
1938         clear that the second argument must be an identifier.
1939
1940 2011-08-04  Thomas Quinot  <quinot@adacore.com>
1941
1942         * exp_ch9.adb (Build_Barrier_Function): When compiling with
1943         -fpreserve-control-flow, insert an IF statement on the barrier
1944         condition to ensure that a conditional branch instruction is generated.
1945
1946 2011-08-04  Emmanuel Briot  <briot@adacore.com>
1947
1948         * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
1949         (Processing_Flags.Ignore_Missing_With): new flag.
1950
1951 2011-08-04  Emmanuel Briot  <briot@adacore.com>
1952
1953         * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
1954         Source_List_File on case-insensitive systems where the file is actually
1955         on a case-sensitive file system (NFS,...).
1956
1957 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1958
1959         * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
1960         function return contains a controlled [extension] aggregate and the
1961         return statement is not part of a handled sequence of statements, wrap
1962         the return in a block. This ensures that all controlled temporaries
1963         generated during aggregate resolution will be picked up by the
1964         finalization machinery.
1965
1966 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
1967
1968         * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
1969         components, freeze type before resolution, to ensure that default
1970         initializations are present for all components.
1971         * sem_res.adb (Resolve_Actuals): the designated object of an
1972         accces-to-constant type is a legal actual in a call to an
1973         initialization procedure.
1974
1975 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1976
1977         * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
1978         N_Unchecked_Type_Conversion to the possible containers of a renamed
1979         transient variable.
1980
1981 2011-08-04  Yannick Moy  <moy@adacore.com>
1982
1983         * par-ch13.adb (Aspect_Specifications_Present): recognize
1984         "with Identifier'Class =>" as an aspect, so that a meaningful warning
1985         is issued in Strict mode.
1986         * par.adb: Fix typos in comments.
1987
1988 2011-08-04  Yannick Moy  <moy@adacore.com>
1989
1990         * sem_attr.adb (Result): modify error message to take into account Post
1991         aspect when compiling Ada 2012 (or newer) code.
1992
1993 2011-08-04  Nicolas Roche  <roche@adacore.com>
1994
1995         * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
1996         remove need for GCC exceptions.
1997
1998 2011-08-04  Vincent Celier  <celier@adacore.com>
1999
2000         * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
2001         project, not the source file name.
2002         * prj.adb (Find_Sources.Look_For_Sources): If the source has been
2003         excluded, continue looking. This excluded source will only be returned
2004         if there is no other source with the same base name that is not locally
2005         removed.
2006
2007 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2008
2009         * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
2010         private and one of the operands is a real literal, use a qualified
2011         expression rather than a conversion which is not meaningful to the
2012         back-end.
2013
2014 2011-08-04  Yannick Moy  <moy@adacore.com>
2015
2016         * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
2017         corresponding aspect X'Class are allowed, proceed with analysis of the
2018         aspect instead of skipping it.
2019
2020 2011-08-04  Tristan Gingold  <gingold@adacore.com>
2021
2022         * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
2023         This will allow to have an Ada implementation for the subprogram.
2024
2025 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2026
2027         * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
2028         completion and aspects are present, apply them to the entity for the
2029         type which is currently the partial view, but which is the one that
2030         will be frozen.
2031         * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
2032         applies to a partial view, indicate that the full view has predicates
2033         and delayed aspects.
2034         (Replace_Type_Reference): Handle properly predicates that apply to the
2035         full view of a private completion.
2036
2037 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
2038
2039         * layout.adb (Layout_Type): For composite types, do not set Esize.
2040         * freeze.adb (Set_Small_Size): Remove test on alignment and do not
2041         set Esize.
2042         (Size_Known): Look at the RM size of components instead of the Esize.
2043         (Freeze_Record_Type): Look at the RM size instead of the Esize to
2044         issue warning and activate Implicit_Packing.
2045         (Freeze_Entity): Likewise.  Do not issue a warning for alias/atomic
2046         if the Esize is not known.
2047         * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
2048         for elementary types only.
2049         (Analyze_Record_Representation_Clause): Look at the RM size instead
2050         of the Esize to issue errors.
2051         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
2052         is not known.
2053         <E_Record_Type>: Look at the RM size instead of the Esize.  Remove
2054         obsolete block.
2055         Look at the RM size instead of the Esize for types if the latter is
2056         not known.
2057         (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
2058
2059 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2060
2061         * sem_type.adb: proper handling of equality not involving anonymous
2062         access types.
2063
2064 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2065
2066         * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
2067         Vis_Decls. When creating a library-level finalizer for a package spec,
2068         both the declaration and body of the finalizer are inserted either in
2069         the visible or private declarations of the package spec.
2070
2071 2011-08-04  Javier Miranda  <miranda@adacore.com>
2072
2073         * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
2074         use of the full-view of a type when invoking Is_Ancestor.
2075         * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
2076         the full-view of private parents is requested, then use also the
2077         full-view of the parent of the first derivation.
2078
2079 2011-08-04  Tristan Gingold  <gingold@adacore.com>
2080
2081         * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
2082         instead of the locally imported procedure.
2083         * s-taprop-mingw.adb (Enter_Task): Ditto.
2084         * s-valrea.adb (Scan_Real): Ditto.
2085         * s-imgrea.adb (Set_Image_Real): Ditto.
2086         * s-flocon.ads: Make the package pure.
2087
2088 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2089
2090         * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
2091         * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
2092         * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
2093         New subprogram, moved here from...
2094         * par.adb, par-ch5.adb (P_Statement_Name): ... here.
2095         * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
2096         rewriting of the last argument into a procedure call statement here...
2097         * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
2098         instead.
2099
2100 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2101
2102         * par_sco.adb: Minor reformatting.
2103
2104 2011-08-04  Robert Dewar  <dewar@adacore.com>
2105
2106         * erroutc.adb: Minor reformatting.
2107
2108 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2109
2110         * par_sco.adb: Comment update.
2111
2112 2011-08-04  Tristan Gingold  <gingold@adacore.com>
2113
2114         * s-flocon.ads: New file.
2115         * g-flocon.ads: Now a renaming of s-flocon.
2116         * Makefile.rtl: Add s-flocon.o
2117
2118 2011-08-04  Javier Miranda  <miranda@adacore.com>
2119
2120         * exp_strm.adb (Build_Array_Input_Function): if the array type is
2121         constrained, do not attempt to build a subtype of it.
2122
2123 2011-08-04  Yannick Moy  <moy@adacore.com>
2124
2125         * errout.ads Change comments: remove 'R'M as an example where quotes
2126         are needed; add ALFA as another case where quotes are not needed
2127         * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
2128         case where quotes are not needed.
2129         * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
2130         sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
2131         Remove all occurrences of 'A'L'F'A
2132
2133 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2134
2135         * sem_ch13.adb: check legality of invariant pragma.
2136
2137 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
2138
2139         * bindgen.adb: Add comments.
2140
2141 2011-08-04  Yannick Moy  <moy@adacore.com>
2142
2143         * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
2144         synthesized flag.
2145         * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
2146         (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
2147
2148 2011-08-04  Robert Dewar  <dewar@adacore.com>
2149
2150         * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
2151         osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
2152         sem_ch13.adb, s-pooloc.adb: Minor reformatting.
2153
2154 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2155
2156         * s-pooloc.ads, s-pooglo.ads: Minor reformatting
2157
2158 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2159
2160         PR ada/47880
2161         * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
2162         allocated object.
2163
2164 2011-08-04  Robert Dewar  <dewar@adacore.com>
2165
2166         * einfo.ads, exp_ch4.adb: Minor reformatting.
2167
2168 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
2169
2170         * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
2171
2172 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2173
2174         * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
2175         type in all cases to compute list of primitive operations, because full
2176         view may be an itype that is not attached to the list of declarations.
2177
2178 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
2179
2180         * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
2181         library has already been finalized.
2182         (Gen_Adafinal_C): Likewise.
2183         (Gen_Adainit_Ada): Generate an early return if the library has
2184         already been elaborated.
2185         (Gen_Adainit_C): Likewise.
2186         (Gen_Output_File_Ada): Generate an elaboration flag.
2187         (Gen_Output_File_C): Likewise.
2188
2189 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2190
2191         * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
2192         Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
2193         built in the first place.
2194         (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
2195         for CodePeer because Finalize_Address was not built to begin with.
2196         * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
2197
2198 2011-08-04  Pascal Obry  <obry@adacore.com>
2199
2200         * adaint.c (__gnat_tmp_name): Use current process id to create temp
2201         filenames, this ensures unicity of filenames across processes.
2202
2203 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2204
2205         * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
2206         Raise_Controlled to Raise_From_Controlled_Operation. Update the
2207         signature of Raise_From_Controlled_Operation by adding flag From_Abort.
2208         Add False as the actual to From_Abort in the generated call to
2209         Raise_From_Controlled_Operation.
2210
2211 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
2212
2213         * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
2214         so that the ali file name can be retrieved from outside of this package.
2215         * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
2216         doing nothing in the general case, but used to update the object file
2217         timestamp if directly generated by the backend.
2218         * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
2219         to a later time than the ali file one.
2220
2221 2011-08-04  Yannick Moy  <moy@adacore.com>
2222
2223         * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
2224         entities whose body contains an Annotate pragma which forces formal
2225         proof on this body.
2226         * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
2227         sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
2228         Mark_Non_ALFA_Subprogram to pass in a message and node.
2229         * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
2230         (Forma_Proof, On) which sets the flag Formal_Proof_On in the
2231         surrounding subprogram.
2232         * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
2233         Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
2234         as not in ALFA is annotated with Formal_Proof being On, then an error
2235         is issued based on the additional parameters for message and node.
2236         * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
2237         * gcc-interface/Make-lang.in: Update dependencies.
2238
2239 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2240
2241         * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
2242         Finalize_Address when CodePeer is enabled.
2243
2244 2011-08-04  Pascal Obry  <obry@adacore.com>
2245
2246         * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
2247         the latter returns a pointer to a static buffer which is deallocated
2248         at the end of the routine.
2249
2250 2011-08-04  Yannick Moy  <moy@adacore.com>
2251
2252         * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
2253         after index creation; mark unconstrained base array type generated as
2254         being in/not in ALFA as well
2255         (Make_Index): mark subtype created as in/not in ALFA
2256         * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
2257         over a loop as in/not in ALFA, depending on its type and form of loop
2258         iteration.
2259
2260 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2261
2262         * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
2263         directly to False on .NET and JVM.
2264
2265 2011-08-04  Yannick Moy  <moy@adacore.com>
2266
2267         * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
2268         constraint that subtype must come from source code to be in ALFA, so
2269         that anonymous subtypes can be in ALFA too.
2270
2271 2011-08-04  Yannick Moy  <moy@adacore.com>
2272
2273         * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
2274         reference for ALFA mode.
2275         * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
2276         procedure public so as to use it from formal verification back-end.
2277
2278 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
2279
2280         * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
2281         invalid checks of the Parameter, making Remove_Switch not working
2282         correctly.
2283
2284 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
2285
2286         * targparm.ads: Update header: no run-time exception is needed on this
2287         file.
2288
2289 2011-08-04  Vincent Celier  <celier@adacore.com>
2290
2291         * a-fihema.adb: Use System.IO instead of GNAT.IO
2292
2293 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2294
2295         * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
2296         are forbidden in Compiler_Unit mode.
2297
2298 2011-08-04  Robert Dewar  <dewar@adacore.com>
2299
2300         * sem_util.adb: Minor reformatting.
2301
2302 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2303
2304         * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
2305         library-level finalizers.
2306         (Gen_Finalize_Library_C): Update the import string for library-level
2307         finalizers.
2308         (Gen_Finalize_Library_Defs_C): Update the definition name of a
2309         library-level finalizer.
2310         * exp_ch7.adb: Remove with and use clauses for Stringt.
2311         (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
2312         Spec_Decl. Add local variable Body_Id. The names of library-level
2313         finalizers are now manually fully qualified and are no longer external.
2314         A single name is now capable of servicing .NET, JVM and non-VM targets.
2315         Pragma Export is no longer required to provide visibility for the name.
2316         (Create_Finalizer_String): Removed.
2317         (New_Finalizer_Name): New routine which mimics New_..._Name.
2318
2319 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
2320
2321         * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
2322         elaboration counter to Standard_Short_Integer.
2323         * sem_util.adb (Build_Elaboration_Entity): Likewise.
2324         * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
2325         (Gen_Elab_Externals_C): Likewise.
2326
2327 2011-08-04  Ed Falis  <falis@adacore.com>
2328
2329         * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
2330         system-vxworks-ppc.ads, system-vxworks-m68k.ads,
2331         system-vxworks-mips.ads, system-vxworks-x86.ads
2332         (Always_Compatible_Rep): set to False for all VxWorks targets.
2333
2334 2011-08-04  Robert Dewar  <dewar@adacore.com>
2335
2336         * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
2337         makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
2338         exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
2339         exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
2340         exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
2341         sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
2342         sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
2343         Minor reformatting and code reorganization.
2344
2345 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2346
2347         * projects.texi: Added doc for aggregate projects.
2348
2349 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2350
2351         * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
2352         Add support for overriding the Project_Path in aggregate projects.
2353
2354 2011-08-04  Robert Dewar  <dewar@adacore.com>
2355
2356         * a-cofove.ads: Minor reformatting.
2357
2358 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2359
2360         * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
2361         on the generated code.
2362         (Build_Finalize_Statements): Update the comment on the generated code.
2363         (Build_Initialize_Statements): Update the comment on the generated code.
2364         (Build_Object_Declarations): Add local variable Result. The object
2365         declarations are now built in sequence.
2366         * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
2367         RE_Unit_Table.
2368
2369 2011-08-04  Robert Dewar  <dewar@adacore.com>
2370
2371         * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
2372
2373 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
2374
2375         * einfo.ads (Elaboration_Entity): Document new definition and use.
2376         (Elaboration_Entity_Required): Adjust to above change.
2377         * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
2378         * exp_ch12.adb: And with and use for Snames.
2379         (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
2380         * exp_util.adb (Set_Elaboration_Flag): Likewise.
2381         * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
2382         <Check_Unit_Name>: Deal with N_Expanded_Name.
2383         <Attribute_Elaborated>: Extend to all unit names.
2384         * sem_elab.adb: And with and use for Uintp.
2385         (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
2386         * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
2387         * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
2388         * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
2389         from Gen_Adainit_Ada.
2390         (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
2391         (Gen_Adafinal_Ada): Remove redundant test.  In the non-main program
2392         case, do not call System.Standard_Library.Adafinal; instead call
2393         finalize_library if needed.
2394         (Gen_Adafinal_C): Likewise.
2395         (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
2396         non-main program case.
2397         (Gen_Adainit_C): Generate a couple of external declarations here.
2398         In the main program case, set SSL.Finalize_Library_Objects.
2399         (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
2400         (Gen_Elab_Calls_C): Likewise.
2401         (Gen_Finalize_Library_Ada): Likewise.  Skip SAL interface units.
2402         (Gen_Finalize_Library_C): Likewise.  Generate a full function.
2403         (Gen_Main_C): Put back call to Ada_Final and don't finalize library
2404         objects here.
2405         (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
2406         if -a is specified.  Call Gen_Elab_Externals_Ada.  Move around call to
2407         Gen_Adafinal_Ada.
2408         (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
2409         if -a is specified.  Call Gen_Elab_Externals_C.  Remove useless couple
2410         of external declarations.  Call Gen_Finalize_Library_C.
2411
2412 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2413
2414         * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
2415         Compute_Compilation_Phases): new subprogram.
2416         (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
2417         The number of mains as well as the various compilation phases that
2418         need to be run are now project tree specific, since various
2419         aggregated trees might have different requirements. In particular,
2420         they do not all require bind or link phases.
2421
2422 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2423
2424         * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
2425         (Project_Tree_Appdata): New type.
2426         It is now possible to associate application-specific data to a project
2427         tree. In particular, this is used in the gprbuild builder to avoid a
2428         number of global tables and htables, especially now that there can be
2429         several project trees loaded at once because of aggregate projects.
2430         (Debug_Name): new procedure.
2431         * projects.texi: Clarify syntax of "**" for Source_Dirs
2432
2433 2011-08-03  Emmanuel Briot  <briot@adacore.com>
2434
2435         * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
2436         the "roots" for a main.
2437         (Fill_From_Project): add support for aggregate projects. Main units
2438         in aggregated projects are now automatically added in the list of
2439         files to build (although this fails later on in gprbuild, because
2440         these files are not using the root proejct tree, so this needs
2441         further cleanup)
2442         * gcc-interface/Make-lang.in: Update dependencies.
2443
2444 2011-08-03  Yannick Moy  <moy@adacore.com>
2445
2446         * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
2447         conditional expression in ALFA.
2448         * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
2449         expressions as not in ALFA.
2450
2451 2011-08-03  Robert Dewar  <dewar@adacore.com>
2452
2453         * a-cofove.adb: Minor reformatting.
2454
2455 2011-08-03  Emmanuel Briot  <briot@adacore.com>
2456
2457         * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
2458         (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
2459         gprbuild sources.
2460         These packages are more logically placed in the Queue package, since
2461         they manipulate the queue. It is also likely that they can be adapted
2462         for gnatmake, thus sharing more code.
2463         (Finish_Program, Fail_Program): moved from the gprbuild sources, so
2464         that we could move the above.
2465
2466 2011-08-03  Emmanuel Briot  <briot@adacore.com>
2467
2468         * errutil.adb (Finalize): clean up the list of error messages on exit.
2469         Calling this subprogram multiple times will no longer show duplicate
2470         error messages on stderr.
2471
2472 2011-08-03  Emmanuel Briot  <briot@adacore.com>
2473
2474         * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
2475         Getopt_Switches when we have already define a command line
2476         configuration.
2477
2478 2011-08-03  Yannick Moy  <moy@adacore.com>
2479
2480         * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
2481         in ALFA. Instead, they are considered as assertions to prove.
2482         * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
2483         nodes as not in ALFA. Instead, include conditional expressions in ALFA
2484         if they have no ELSE part, or if they occur in pre- and postconditions,
2485         where the Condition cannot have side-effects in ALFA
2486         (Analyze_Membership_Op): do not mark such nodes as not in ALFA
2487         (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
2488         Instead, include type conversion between scalar types in ALFA.
2489         * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
2490         if-and-only-if its type is in ALFA.
2491
2492 2011-08-03  Thomas Quinot  <quinot@adacore.com>
2493
2494         * scos.adb, get_scos.adb, put_scos.adb
2495         New code letter for decisions: G (entry guard)
2496         * par_sco.adb
2497         (Traverse_Subprogram_Body): Rename to...
2498         (Traverse_Subprogram_Or_Task_Body): New subrpogram.
2499         (Traverse_Protected_Body): New subprogram
2500         (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
2501         protected bodies and entry bodies.
2502
2503 2011-08-03  Yannick Moy  <moy@adacore.com>
2504
2505         * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
2506         entities with get/set subprograms, which is set on procedure entities
2507         generated by the compiler for a postcondition.
2508         * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
2509         * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
2510         entity for a declaration
2511         (Get_Unique_Entity_For_Decl): new function returning an entity which
2512         represents a declaration, so that matching spec and body have the same
2513         entity.
2514
2515 2011-08-03  Robert Dewar  <dewar@adacore.com>
2516
2517         * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
2518         a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
2519
2520 2011-08-03  Yannick Moy  <moy@adacore.com>
2521
2522         * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
2523         library-level because retriction No_Implicit_Dynamic_Code in the
2524         front-end prevents its definition as a local subprogram
2525         (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
2526         for reuse in other contexts
2527         (Traverse_Declarations_Or_Statements,
2528         Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
2529         Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
2530         procedures take a callback parameter to be called on all declarations
2531         * lib-xref.ads
2532         (Traverse_All_Compilation_Units): new generic function to traverse a
2533         compilation unit and call a callback parameter on all declarations
2534
2535 2011-08-03  Javier Miranda  <miranda@adacore.com>
2536
2537         * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
2538         in Java since they are always enclosed in a namespace that
2539         differentiates them, and overloaded entities are supported by the VM.
2540
2541 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
2542
2543         * checks.adb (Determine_Range): If a computed bound of an operation is
2544         outside the range of the base type of the expression, and overflow
2545         checks are enabled, the result is unknown and cannot be used for any
2546         subsequent constant folding.
2547         * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
2548         unknown, so is the result of the comparison.
2549
2550 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
2551
2552         * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
2553         From_Abort. When finalization was triggered by an abort, propagate
2554         Standard'Abort_Signal rather than Program_Error.
2555         * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
2556         From_Abort.
2557         * a-except.adb (Raise_From_Controlled_Operation): Add new formal
2558         From_Abort. When finalization was triggered by an abort, propagate
2559         Standard'Abort_Signal rather than Program_Error.
2560         * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
2561         From_Abort.
2562         * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
2563         Abort_Id. Update the calls to Build_Object_Declarations and
2564         Build_Raise_Statement to include Abort_Id.
2565         (Build_Adjust_Statements): New local variable Abort_Id. Update the
2566         calls to Build_Object_Declarations and Build_Raise_Statement to include
2567         Abort_Id.
2568         (Build_Finalize_Statements): New local variable Abort_Id. Update the
2569         calls to Build_Object_Declarations and Build_Raise_Statement to include
2570         Abort_Id.
2571         (Build_Components): Create an entity for Abort_Id when exceptions are
2572         allowed on the target.
2573         (Build_Finalizer): New local variable Abort_Id.
2574         (Build_Initialize_Statements): New local variable Abort_Id. Update the
2575         calls to Build_Object_Declarations and Build_Raise_Statement to include
2576         Abort_Id.
2577         (Build_Object_Declarations): Add new formal Abort_Id. Create the
2578         declaration of flag Abort_Id to preserve the original abort status
2579         before finalization code is executed.
2580         (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
2581         runtime routine Raise_From_Controlled_Operation.
2582         (Create_Finalizer): Update the call to Build_Raise_Statement to include
2583         Abort_Id. Update the call to Build_Object_Declarations to include
2584         Abort_Id. Update the layout of the finalizer body.
2585         (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
2586         (Process_Transient_Objects): New local variable Abort_Id. Remove the
2587         clunky code to create all flags and objects related to
2588         exception propagation and replace it with a call to
2589         Build_Object_Declarations. Update the call to Build_Raise_Statement to
2590         include Abort_Id.
2591         * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
2592         Add new formal Abort_Id and associated comment on its use.
2593         (Build_Raise_Statement): Add new formal Abort_Id and associated comment
2594         on its use.
2595         * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
2596         Remove the clunky code to create all flags and objects related to
2597         exception propagation and replace it with a call to
2598         Build_Object_Declarations. Update the call to Build_Raise_Statement.
2599
2600 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
2601
2602         * s-tassta.adb: Fix minor typos.
2603
2604 2011-08-03  Robert Dewar  <dewar@adacore.com>
2605
2606         * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
2607         lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
2608
2609 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
2610
2611         * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
2612         to packages. This ensures that the finalizer body will not end up
2613         inside the freeze node.
2614         (Process_Declarations): Add code to detect whether a freeze node has a
2615         nested finalization collection.
2616
2617 2011-08-03  Pascal Obry  <obry@adacore.com>
2618
2619         * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
2620         (Current_Session): Return a not null access to Session_Type.
2621         (Default_Session): Likewise.
2622
2623 2011-08-03  Robert Dewar  <dewar@adacore.com>
2624
2625         * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
2626         exp_ch3.adb, exp_ch3.ads: Minor reformatting.
2627
2628 2011-08-03  Pascal Obry  <obry@adacore.com>
2629
2630         * g-awk.ads: Minor comment fix.
2631
2632 2011-08-03  Sergey Rybin  <rybin@adacore.com>
2633
2634         * tree_io.ads (ASIS_Version_Number): Update because of the changes in
2635         the tree structure related to discriminant constraints.
2636         Original_Discriminant cannot be used any more for computing the
2637         defining name for the reference to a discriminant.
2638
2639 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
2640
2641         * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
2642         function is not visibly tagged, this is not a dispatching call and
2643         therfore is not Tag_Indeterminate, even if the function is marked as
2644         dispatching on result.
2645
2646 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
2647
2648         * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
2649         (Expand_N_Free_Statement): Add a guard to protect against run-times
2650         which do not support controlled types.
2651         * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
2652         against run-times which do not support controlled types.
2653         * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
2654         against run-times which do not support controlled types.
2655         * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
2656         against run-times which do not support controlled types.
2657         * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
2658         protect against run-times which do not support controlled types.
2659
2660 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
2661
2662         * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
2663         (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
2664
2665 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
2666
2667         * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
2668         modified in the source, to prevent spurious warnings when compiling
2669         with -gnatg.
2670
2671 2011-08-03  Thomas Quinot  <quinot@adacore.com>
2672
2673         * a-except-2005.adb: Minor reformatting.
2674
2675 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
2676
2677         * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
2678         is a renaming declaration in the private part of a package, do not emit
2679         a warning that the with_clause could be moved because the renaming may
2680         be used in the body or in a child unit.
2681
2682 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
2683
2684         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
2685         Propagate the Comes_From_Source attribute from the original return
2686         object to the renaming.
2687
2688 2011-08-03  Jose Ruiz  <ruiz@adacore.com>
2689
2690         * exp_ch7.adb (Build_Raise_Statement): Do not call
2691         Raise_From_Controlled_Operation when this routine is not present in
2692         the run-time library.
2693         (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
2694         libraries (Ravenscar), tasks are non-terminating, and protected objects
2695         and tasks can only appear at library level, so we do not want
2696         finalization of protected objects nor tasks.
2697         * exp_intr.adb: Minor clarification in comment.
2698         bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
2699         Gen_Output_File_C): Remove references to finalization of library-level
2700         objects when using restricted run-time libraries.
2701
2702 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
2703
2704         * sem_ch3.adb (Build_Discriminant_Constraints): Set
2705         Original_Discriminant only if the parent type is a generic formal.
2706
2707 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
2708
2709         * exp_ch13.adb: Add with and use clause for Targparm;
2710         (Expand_N_Free_Statement): Prevent the generation of a custom
2711         Deallocate on .NET/JVM targets since this requires pools and address
2712         arithmetic.
2713         * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
2714         .NET/JVM targets, attach the newly allocated object to the access
2715         type's finalization collection. Do not generate a call to
2716         Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
2717         exist in the runtime.
2718         (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
2719         create a custom Allocate for object that do not require initialization.
2720         Attach a newly allocated object to the access type's finalization
2721         collection on .NET/JVM.
2722         * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
2723         assignment of controlled types on .NET/JVM. The two hidden pointers
2724         Prev and Next and stored and later restored after the assignment takes
2725         place.
2726         * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
2727         kludge for .NET/JVM to recognize a particular piece of code coming from
2728         Heap_Management and change the call to Finalize into Deep_Finalize.
2729         * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
2730         finalization collections on .NET/JVM only for types derived from
2731         Controlled. Separate the association of storage pools with a collection
2732         and only allow it on non-.NET/JVM targets.
2733         (Make_Attach_Call): New routine.
2734         (Make_Detach_Call): New routine.
2735         (Process_Object_Declarations): Suppress the generation of
2736         build-in-place return object clean up code on .NET/JVM since it uses
2737         pools.
2738         * exp_ch7.ads (Make_Attach_Call): New routine.
2739         (Make_Detach_Call): New routine.
2740         * exp_intr.adb Add with and use clause for Targparm.
2741         (Expand_Unc_Deallocation): Detach a controlled object from a collection
2742         on .NET/JVM targets.
2743         * rtsfind.ads: Add entries RE_Attach, RE_Detach and
2744         RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
2745         * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
2746         names used in finalization.
2747
2748 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
2749
2750         * a-fihema.adb: Add with and use clauses for System.Soft_Links.
2751         (Attach, Detach): Lock the current task when chaining an object onto a
2752         collection.
2753
2754 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
2755
2756         * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
2757         Rewritten to create the message strings when the exception is not
2758         raised by an abort during finalization.
2759         * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
2760         Raise_From_Controlled_Operation and update its associated comment.
2761         * a-fihema.ads, a-fihema.adb: New GNAT unit.
2762         Ada.Finalization.Heap_Management provides key functionality
2763         associated with controlled objects on the heap, their creation,
2764         finalization and reclamation. Type Finalization_Collection is
2765         effectively a wrapper which sits ontop of a storage pool and performs
2766         all necessary bookkeeping for all the objects it contains. Each
2767         access-to-controlled or access-to-class-wide type receives a collection
2768         as part of its expansion. The compiler generates buffer code and
2769         invokes Allocate / Deallocate to create and destroy allocated
2770         controlled objects.
2771         * a-finali.adb ("="): Removed.
2772         * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
2773         fields Prev and Next.
2774         * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
2775         A library unit with at least one controlled object on the library level
2776         has a special finalizer which is invoked by the binder. To signal this,
2777         ali files carry field PF.
2778         * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
2779         associated comment on field usage.
2780         * a-tags.adb (Get_RC_Offset): Removed.
2781         (Needs_Finalization): New routine.
2782         * a-tags.ads: Update the structure of the GNAT dispatch tables.
2783         Dispatch tables now carry field Needs_Finalization which provides
2784         runtime indication whether a type is controlled or has controlled
2785         components or both. Remove field RC_Offset.
2786         (Get_RC_Offset): Removed along with its associated pragma Export.
2787         Since tagged types with controlled components no longer carry hidden
2788         field _controller, the special mechanism to retrieve its location is no
2789         longer needed.
2790         (Needs_Finalization): New routine.
2791         * atree.ads, atree.adb (Elist24): New routine.
2792         (Set_Elist24): New routine.
2793         * atree.h: Add a define clause for Elist24.
2794         * bindgen.adb New library-level variable Lib_Final_Built.
2795         (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
2796         presence of a VM target, the routine generates calls to the proper
2797         library finalization routine.
2798         (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
2799         targets. Set the correct library finalization routine depending on
2800         whether the library has controlled objects or this is a VM compilation.
2801         (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
2802         to library-level finalizers of compiled units in reverse order of
2803         elaboration. It also produces exception management code and reraises a
2804         potential exception after all units have been finalized.
2805         (Gen_Finalize_Library_C): New routine. This procedure generates calls to
2806         library-level finalizers of compiled units in reverse order of
2807         elaboration.
2808         (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
2809         definitions of all library-level finalizers available to the compilation
2810         (Gen_Main_Ada): Directly call Adafinal which now contails all target
2811         dependent code.
2812         (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
2813         System.Standard_Library.Adafinal directly. If the library needs
2814         finalization actions, create the sequence of finalization calls.
2815         (Gen_Output_File_Ada): Alphabetize local variables and constants.
2816         Generate a with clause for System.Soft_Links when compiling for a VM.
2817         Remove the code which imports System.Standard_Library.Adafinal as
2818         Do_Finalize. Generate the library finalization routine.
2819         (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
2820         If the library needs finalization actions, create all the definitions
2821         of library- level finalizers.
2822         (Has_Finalizer): New routine. Determines whether at least one compiled
2823         unit has a library-level finalizer.
2824         Add type Qualification_Mode.
2825         (Set_Unit_Name): Add a formal which controls the replacement of a dot.
2826         * einfo.adb: New usage of field 15 as Return_Flag.
2827         Remove Finalization_Chain_Entity from the usages of field 19.
2828         Remove Associated_Final_Chain from the usages of field 23.
2829         New usage of field 23 as Associated_Collection.
2830         New usage of field 24 as Finalizer.
2831         New usage of flag 252 as Is_Processed_Transient.
2832         (Associated_Final_Chain): Removed.
2833         (Associated_Collection): New routine.
2834         (Finalization_Chain_Entity): Removed.
2835         (Finalizer): New routine.
2836         (Is_Finalizer): New routine.
2837         (Is_Processed_Transient): New routine.
2838         (Return_Flag): New routine.
2839         (Set_Associated_Final_Chain): Removed.
2840         (Set_Associated_Collection): New routine.
2841         (Set_Finalization_Chain_Entity): Removed.
2842         (Set_Finalizer): New routine.
2843         (Set_Is_Processed_Transient): New routine.
2844         (Set_Return_Flag): New routine.
2845         (Write_Entity_Flags): Include Is_Processed_Transient to the list of
2846         displayed flags.
2847         (Write_Field8_Name): Alphabetize the output.
2848         (Write_Field11_Name): Alphabetize the output.
2849         (Write_Field12_Name): Alphabetize the output.
2850         (Write_Field13_Name): Alphabetize the output.
2851         (Write_Field14_Name): Alphabetize the output.
2852         (Write_Field15_Name): Alphabetize the output.
2853         (Write_Field16_Name): Alphabetize the output.
2854         (Write_Field17_Name): Alphabetize the output.
2855         (Write_Field18_Name): Alphabetize the output.
2856         (Write_Field19_Name): Alphabetize the output. Remove the output of
2857         Finalization_Chain_Entity.
2858         (Write_Field20_Name): Alphabetize the output.
2859         (Write_Field21_Name): Alphabetize the output.
2860         (Write_Field22_Name): Alphabetize the output.
2861         (Write_Field23_Name): Alphabetize the output. Remove the output of
2862         Associated_Final_Chain. Add output for Associated_Collection.
2863         (Write_Field24_Name): Alphabetize the output.
2864         (Write_Field25_Name): Add output for Finalizer.
2865         (Write_Field26_Name): Alphabetize the output.
2866         (Write_Field27_Name): Alphabetize the output.
2867         (Write_Field28_Name): Alphabetize the output.
2868         * einfo.ads: Add new field description for Associated_Collection and
2869         its uses in nodes.
2870         Remove Associated_Final_Chain and its uses in nodes.
2871         Remove Finalization_Chain_Entity and its uses in nodes.
2872         Add new field description for Finalizer and its uses in nodes.
2873         Add new synthesized attribute Is_Finalizer.
2874         Add new flag description for Is_Processed_Transient and its uses in
2875         nodes.
2876         Add new field description for Return_Flag and its uses in nodes.
2877         (Associated_Final_Chain): Removed along with its pragma Inline.
2878         (Associated_Collection): New routine and pragma Inline.
2879         (Finalization_Chain_Entity): Removed along with its pragma Inline.
2880         (Finalizer): New routine and pragma Inline.
2881         (Is_Finalizer): New routine and pragma Inline.
2882         (Is_Processed_Transient): New routine and pragma Inline.
2883         (Return_Flag): New routine and pragma Inline.
2884         (Set_Associated_Final_Chain): Removed along with its pragma Inline.
2885         (Set_Associated_Collection): New routine and pragma Inline.
2886         (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
2887         (Set_Finalizer): New routine and pragma Inline.
2888         (Set_Is_Processed_Transient): New routine and pragma Inline.
2889         (Set_Return_Flag): New routine and pragma Inline.
2890         * exp_aggr.adb: Alphabetize subprograms.
2891         (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
2892         (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
2893         associated comments. Remove local variables External_Final_List and
2894         Attach.
2895         Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
2896         Ancestor. Remove the retrieval of finalization lists. Update the call to
2897         Make_Adjust_Call.
2898         (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
2899         lists. Update the call to Late_Expansion.
2900         (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
2901         (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
2902         (Gen_Assign): Remove the retrieval of the finalization list used to
2903         build the assignment. Update the calls to Make_Init_Call and
2904         Make_Adjust_Call.
2905         (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
2906         Remove the mechanism to determine attachment levels and finalization
2907         list retrieval. Remove the processing for coextensions.
2908         (Init_Controller): Removed. Controllers no longer exist.
2909         (Late_Expansion): Remove formals Flist and Obj along with their
2910         associated comments. Update the calls to Build_Record_Aggr_Code and
2911         Build_Array_Aggr_Code.
2912         * exp_ch13.adb (Expand_N_Free_Statement): New routine.
2913         (Expand_N_Freeze_Entity): Add special processing for finalizers which
2914         appear in entry bodies, protected subprograms and task bodies.
2915         * exp_ch13.ads (Expand_N_Free_Statement): New routine.
2916         * exp_ch3.adb (Add_Final_Chain): Removed.
2917         (Build_Array_Init_Proc): Alphabetize local variables.
2918         (Build_Assignment): Alphabetize local variables. Update the call to
2919         Maked_Adjust_Call.
2920         (Build_Class_Wide_Master): Rename local variables to better reflect
2921         their role.
2922         (Build_Discriminant_Assignments): Code reformatting.
2923         (Build_Init_Call_Thru): Code reformatting.
2924         (Build_Init_Procedure): Code reformatting. Generate a special version
2925         of Deep_Finalize which is capable of finalizing all initialized
2926         components and ignore the rest.
2927         (Build_Init_Statements): Rename local variables to better reflect their
2928         role.
2929         Reimplement the mechanism to include the creation and update of an index
2930         variable called a "counter". It is used as a bookmark for tracing
2931         initialized and non-initialized components.
2932         (Build_Initialization_Call): Remove local variable Controller_Typ.
2933         Alphabetize all local variables. Remove the initialization of the
2934         record controller and update the call to Make_Init_Call.
2935         (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
2936         New local variable Counter.
2937         (Constrain_Array): Alphabetize.
2938         (Expand_Freeze_Array_Type): Create a collection instead of a
2939         finalization list.
2940         (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
2941         Finalize_Address which is used in conjunction with allocated controlled
2942         objects.
2943         (Expand_N_Object_Declaration): Remove the creation of a finalization
2944         list for anonymous access types. Update the calls to Make_Init_Call and
2945         Make_Adjust_Call.
2946         (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
2947         retrieval of finalization lists. Remove the expansion of the record
2948         controller. Create TSS primitive Finalize_Address used in conjunction
2949         with controlled objects on the heap. Create finalization collections
2950         for access-to-controlled record components.
2951         (Expand_Record_Controller): Removed.
2952         (Freeze_Type): Remove the freezing of record controllers. Freezing of
2953         class-wide types now requires additional processing. Create
2954         finalization collections for access-to-controlled types.
2955         (Increment_Counter): New routine.
2956         (Make_Counter): New routine.
2957         (Make_Eq_If): Remove the mention of Name_uController.
2958         (Make_Predefined_Primitive_Specs): There is no longer need to skip
2959         types coming from System.Finalization_Root.
2960         (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
2961         (Predefined_Primitive_Bodies): There is no longer need to skip types
2962         coming from System.Finalization_Root.
2963         (Stream_Operation_OK): Do not generate stream routines for
2964         type Ada.Finalization.Heap_Management.Finalization_Collection.
2965         * exp_ch3.ads: Alphabetize subprograms.
2966         * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
2967         Add with and use clause for Lib.
2968         (Complete_Coextension_Finalization): Removed.
2969         (Complete_Controlled_Allocation): New routine. Create a finalization
2970         collection for anonymous access-to-controlled types. Create a custom
2971         Allocate which interfaces with the back end and the machinery in
2972         Heap_Management.
2973         (Expand_Allocator_Expression): Add necessary calls to
2974         Complete_Controlled_Allocation. Remove the retrieval of finalization
2975         lists. Update the calls to Make_Adjust_Call. Generate a call to
2976         Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
2977         the associated collection.
2978         (Expand_N_Allocator): Remove the processing for dynamic coextensions.
2979         Code clean up. Remove the retrieval of finalization lists and
2980         attachment levels.
2981         Update the call to Make_Init_Call. Generate a call to
2982         Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
2983         the associated collection.
2984         (Get_Allocator_Final_List): Removed. Finalization lists are not
2985         available.
2986         (Suitable_Element): Remove the mention of Name_uController.
2987         * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
2988         (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
2989         the left hand side, carry out the assignment and adjust the left hand
2990         side.
2991         * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
2992         (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
2993         (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
2994         BIP_Collection and BIPcollection.
2995         (Build_Heap_Allocator): New routine used to allocate the return object
2996         of a build-in-place function onto a collection.
2997         (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
2998         (Expand_Call): Do not replace direct calls to Deep routines with their
2999         aliases.
3000         (Expand_N_Extended_Return_Statement): Give all variables shorter names
3001         and update their occurrences. Add a special return flag to monitor the
3002         [ab]normal execution of the function. The flag is set right before the
3003         return statement.
3004         Rewrite the mechanism used to allocate a build-in-place return object
3005         on the heap or on a storage pool.
3006         (Is_Direct_Deep_Call): New routine.
3007         (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
3008         build-in-place function call instead of a final list. Build a call to
3009         Set_Finalize_Address_Ptr to decorate the associated collection.
3010         (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
3011         order to name the build-in-place function call's result for later
3012         finalization. Add a collection to a build-in-place function call
3013         instead of a final list.
3014         (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
3015         build-in-place function call instead of a final list. Remove the code
3016         which moves one final list and transforms it into the actual in a
3017         nested build-in-place call.
3018         (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
3019         build-in-place function call instead of a final list.
3020         (Move_Final_List): Removed.
3021         (Needs_BIP_Collection): New routine.
3022         (Needs_BIP_Final_List): Removed.
3023         * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
3024         enumeration type BIP_Formal_Kind.
3025         Update the related comment.
3026         (Needs_BIP_Collection): New routine.
3027         (Needs_BIP_Final_List): Removed.
3028         * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
3029         and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
3030         majority of subprograms in this unit. Add Name_Finalize_Address to
3031         array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
3032         (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
3033         statements for an array type.
3034         (Build_Adjust_Statements): Create the adjust statements for a record
3035         type.
3036         (Build_Cleanup_Statements): New routine. A procedure which given any
3037         construct containing asynchronous calls, references to _master, or is a
3038         task body, a task allocation or a protected body produces the necessary
3039         runtime calls to clean up these constructs.
3040         (Build_Exception_Handler): New routine.
3041         (Build_Final_List): Removed.
3042         (Build_Finalization_Collection): New routine. A core procedure which
3043         creates a collection to service heap allocated controlled objects
3044         associated with an access-to-controlled type.
3045         (Build_Finalize_Statements): Create the finalization statements for a
3046         record types.
3047         (Build_Finalizer): New routine. A core procedure which given any
3048         construct with declarations and/or statements detects all objects which
3049         need any type of clean up (controlled objects, protected objects) and
3050         generates all necessary code to clean up the said objects in the proper
3051         order.
3052         (Build_Finalizer_Call): New routine.
3053         (Build_Initialize_Statements): Create the initialization statements for
3054         an array type. The generated routine contains code to finalize partially
3055         initialized arrays.
3056         (Build_Object_Declarations): New routine.
3057         (Build_Raise_Statement): New routine.
3058         (Clean_Simple_Protected_Objects): Removed.
3059         (Controller_Component): Removed.
3060         (Enclosing_Function): New routine.
3061         (Expand_Cleanup_Actions): Create a finalizer for a construct which has
3062         either declarations or statements or both.
3063         (Expand_N_Package_Body): Create a finalizer for a non-generic package.
3064         (Expand_N_Package_Declaration): Create a finalizer for a non-generic
3065         package.
3066         (Find_Final_List): Removed.
3067         (Global_Flist_Ref): Removed.
3068         (In_Finalization_Root): Removed.
3069         (Insert_Actions_In_Scope_Around): Determine the range of the transient
3070         scope in terms of tree nodes. Process all transient variables within
3071         that range.
3072         (Make_Adjust_Call): Rewritten. There is no longer an attach call
3073         generated after the adjust.
3074         (Make_Attach_Call): Removed.
3075         (Make_Call): New routine.
3076         (Make_Clean): Removed.
3077         (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
3078         build routines.
3079         (Make_Deep_Proc): Rewritten to generate the new profile signature used
3080         in Deep routines.
3081         (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
3082         build routines.
3083         (Make_Final_Call): Modified to simply create a call to either
3084         Deep_Finalize or Finalize.
3085         (Make_Finalize_Address_Body): New routine.
3086         (Make_Finalize_Address_Stmts): New routine. A function which produces
3087         TSS primitive Finalize_Address used in conjunction with heap allocated
3088         controlled objects.
3089         (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
3090         (Make_Init_Call): Rewritten. There is no longer an attach call
3091         generated after initialization.
3092         (Make_Local_Deep_Finalize): New routine.
3093         (Make_Set_Finalize_Address_Ptr_Call): New routine.
3094         (Make_Transient_Block): Remove the finalization list retrieval and
3095         manipulation.
3096         (Needs_Finalization): Moved to Exp_Util.
3097         (Parent_Field_Type): New routine.
3098         (Preprocess_Components): New routine.
3099         (Process_Transient_Objects): New routine.
3100         (Wrap_HSS_In_Block): New routine.
3101         (Wrap_Transient_Declaration): Remove finalization list management and
3102         controller insertion.
3103         (Wrap_Transient_Expression): Code reformatting.
3104         (Wrap_Transient_Statement): Code reformatting.
3105         * exp_ch7.ads (Build_Final_List): Removed.
3106         (Build_Finalization_Collection): New routine.
3107         (Build_Raise_Statement): New routine.
3108         (Controller_Component): Removed.
3109         (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
3110         (Find_Final_List): Removed.
3111         (In_Finalization_Root): Removed.
3112         (Is_Simple_Protected_Type): Update related comment.
3113         (Make_Adjust_Call): New parameter profile and associated comments.
3114         (Make_Attach_Call): Removed.
3115         (Make_Final_Call): New parameter profile and associated comments.
3116         (Make_Finalize_Address_Body): New routine.
3117         (Make_Init_Call): New parameter profile and associated comments.
3118         (Make_Local_Deep_Finalize): New routine.
3119         (Make_Set_Finalize_Address_Ptr_Call): New routine.
3120         (Needs_Finalization): Moved to Exp_Util.
3121         * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
3122         (Expand_N_Protected_Body): Remove the handling of finalization lists.
3123         (Find_Protection_Type): Moved to Exp_Util.
3124         * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
3125         (Make_DT): Update sequence of dispatch table initialization. Remove the
3126         initialization of field RC_Offset. Add initialization of field Needs_
3127         Finalization.
3128         * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
3129         Reimplement how an object is first finalized, then deallocated.
3130         * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
3131         Code reformatting.
3132         * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
3133         Register TSS_Finalize_Address with type TSS_Names.
3134         * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
3135         procedure provides the interface between an allocation / deallocation
3136         and the support machinery in Ada.Finalization.Heap_Management.
3137         (Find_Init_Call): Code reformatting.
3138         (Find_Init_Call_In_List): Code reformatting.
3139         (Find_Protection_Type): Moved from Exp_Ch9.
3140         (Find_Prim_Op): Reimplement to add preference of recovered primitive.
3141         (Has_Controlled_Coextensions): Removed.
3142         (Has_Controlled_Objects): New routine.
3143         (In_Library_Level_Package_Body): New routine.
3144         (Insert_Action_After): New routine.
3145         (Is_Finalizable_Transient): New routine. This predicate determines
3146         whether an object declaration is one of the many variants of controlled
3147         transients.
3148         (Is_Null_Access_BIP_Func_Call): New routine.
3149         (Is_Non_BIP_Func_Call): New routine.
3150         (Is_Related_To_Func_Return): New routine.
3151         (Needs_Finalization): Moved from Exp_Ch7.
3152         * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
3153         (Find_Protection_Type): Moved from Exp_Ch9.
3154         (Has_Controlled_Coextensions): Removed.
3155         (Has_Controlled_Objects): New routine.
3156         (In_Library_Level_Package_Body): New routine.
3157         (Insert_Action_After): New routine.
3158         (Is_Finalizable_Transient): New routine.
3159         (Is_Null_Access_BIP_Func_Call): New routine.
3160         (Is_Non_BIP_Func_Call): New routine.
3161         (Is_Related_To_Func_Return): New routine.
3162         (Needs_Finalization): Moved from Exp_ch7.
3163         * expander.adb (Expand): Add a case for N_Free_Statement.
3164         * freeze.adb (Freeze_All): Replace the generation of a finalization
3165         list with a collection for access-to-controlled types.
3166         (Freeze_Entity): Code reformatting.
3167         (Freeze_Record_Type): Remove the freezing of a record controller
3168         component.
3169         (Freeze_Subprogram): Code reformatting.
3170         * inline.adb (Cleanup_Scopes): Remove the reset of the scope
3171         finalization list.
3172         * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
3173         has a library-level finalizer.
3174         * lib-writ.ads: Add "PF" to the sequence of unit attributes.
3175         * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
3176         * Makefile.rtl: Remove a-filico and s-finimp from the list of object
3177         files. Add a-fihema to the list of object files.
3178         * par-ch4.adb:
3179         Alphabetize the associations in type Is_Parameterless_Attribute.
3180         * rtsfind.ads: Ada.Finalization_List.Controller and
3181         System.Finalization_Implementation are no longer a GNAT unit.
3182         Update the range of type Ada_Finalization_Child. Remove the following
3183         recoverable entities:
3184
3185            RE_Attach_To_Final_List
3186            RE_Deep_Tag_Attach
3187            RE_Finalize_List
3188            RE_Finalize_One
3189            RE_Finalizable_Ptr_Ptr
3190            RE_Global_Final_List
3191            RE_Limited_Record_Controller
3192            RE_List_Controller
3193            RE_Move_Final_List
3194            RE_Record_Controller
3195            RE_Simple_List_Controller
3196
3197         Add the following recoverable entities:
3198
3199            RE_Add_Offset_To_Address
3200            RE_Allocate
3201            RE_Base_Pool
3202            RE_Deallocate
3203            RE_Exception_Identity
3204            RE_Finalization_Collection
3205            RE_Finalization_Collection_Ptr
3206            RE_Needs_Finalization
3207            RE_Save_Library_Occurrence
3208            RE_Set_Finalize_Address_Ptr
3209            RE_Set_Storage_Pool_Ptr
3210            RE_Storage_Count
3211         * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
3212         Name_uController.
3213         * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
3214         (First_Stored_Discriminant): Remove the mention of Name_uController.
3215         * sem_aux.ads: Comment reformatting.
3216         * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
3217         to redecorate an already existing class-wide type.
3218         (Decorate_Tagged_Type): New parameter profile and associated comment.
3219         Create a "shadow class-wide type" for a shadow entity.
3220         * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
3221         of the final chain along with the associated comment.
3222         * sem_ch3.adb (Access_Type_Declaration): Add new local variable
3223         Full_Desig and set it to the full view of the designated type.
3224         Initialize the finalization collection to empty.
3225         (Build_Derived_Record_Type): Alphabetize local variables. Code
3226         reformatting.
3227         (Collect_Fixed_Components): Remove the mention of Name_uController.
3228         (Create_Constrained_Components): Remove the mention of Name_uController.
3229         (Make_Class_Wide_Type): Add specialized code to redecorate an existing
3230         class-wide type of a shadow entity.
3231         (Process_Full_View): Update the machinery which marks type
3232         Limited_Controlled's entity as limited.
3233         * sem_ch4.adb (Analyze_One_Call): Code reformatting.
3234         * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
3235         list, instead make a collection build-in-place formal.
3236         * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
3237         a designated type in order to establish a match between the renaming
3238         and the renamed entity.
3239         (Find_Selected_Component): Add guard to prevent spurious exceptions
3240         from being raised on .NET/JVM.
3241         * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
3242         to the list of primitive that need special processing. Update arrays
3243         C_Names and D_Names.
3244         (Replace_Types): Handle class-wide types.
3245         * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
3246         different parameter profile, look at the first formal.
3247         * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
3248         use clauses for Exp_Util.
3249         * sem_res.adb: Remove with and use clauses for Elists.
3250         (Propagate_Coextensions): Removed.
3251         (Resolve_Allocator): Do not propagate the list of coextensions from one
3252         allocator to another.
3253         * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
3254         Deaccessed_T to Desig_Typ.
3255         (Enter_Name): Remove the mention of Name_uController.
3256         (Gather_Components): Remove the mention of Name_uController.
3257         (Incomplete_Or_Private_View): New routine.
3258         (Is_Coextension_Root): Removed.
3259         (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
3260         * sem_util.ads (Incomplete_Or_Private_View): New routine.
3261         (Is_Coextension_Root): Removed.
3262         * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
3263         Controlled types are now derived from a null tagged record. Remove
3264         types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
3265         * sinfo.adb (Coextensions): Removed.
3266         (Set_Coextensions): Removed.
3267         * sinfo.ads: Remove Coextensions from the explanation of node fields
3268         and its uses in nodes.
3269         Update the field usage of N_Allocator.
3270         (Coextensions): Removed along with its pragma Inline.
3271         (Set_Coextensions): Removed along with its pragma Inline.
3272         * snames.ads-tmpl: Remove names
3273
3274           Name_uClean
3275           Name_uController
3276           Name_uFinal_List
3277           Name_uLocal_Final_List
3278           Name_Finalization_Root
3279           Name_Next
3280           Name_Prev
3281
3282         Add names
3283
3284           Name_uFinalizer
3285           Name_Finalize_Address
3286         * s-pooglo.adb (Allocate): Add overriding indicator.
3287         (Deallocate): Add overriding indicator.
3288         (Storage_Size): Add overriding indicator.
3289         * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
3290         than Finalize_Global_List.
3291         (Null_Finalize_Global_List): Removed.
3292         (Save_Library_Occurrence): New routine.
3293         * s-soflin.ads: Remove variable Finalize_Global_List along with its
3294         initialization. Add variable Finalize_Library_Objects along with its
3295         pragma Export. Add variables Library_Exception and
3296         Library_Exception_Set along with their pragma Export.
3297         (Null_Finalize_Global_List): Removed.
3298         (Save_Library_Occurrence): New routine.
3299         * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
3300         rather than Finalize_Global_List.
3301         * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
3302         of the constructed node.
3303
3304 2011-08-03  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3305
3306         * link.c: Include "auto-host.h" before system headers.
3307
3308 2011-08-03  Vincent Celier  <celier@adacore.com>
3309
3310         * make.adb (Gnatmake): Add to table Library_Projs only library projects
3311         that are not extended. Do not check if a library project that is
3312         extended should be regenerated. Do not add to table Library_Paths the
3313         libraries that are in extended projects. Link only with libraries that
3314         are in libray projects that are not extended.
3315         * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
3316         for a library project that is extended.
3317
3318 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
3319
3320         * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
3321         conforming subprogram renamings that appear to be completions if they
3322         are not fully conformant.
3323         Such renamings are homographs but not completions.
3324         * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
3325         names in a subprogram renaming that appears in an instance.
3326
3327 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
3328
3329         * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
3330         not immutably limited, build actual subtype from expression to provide
3331         proper bounds to caller.
3332
3333 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
3334
3335         * sem_ch8.adb: Minor comment correction.
3336
3337 2011-08-03  Thomas Quinot  <quinot@adacore.com>
3338
3339         * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
3340         returning a limited array, use an extended return statement.
3341
3342 2011-08-03  Vincent Celier  <celier@adacore.com>
3343
3344         * make.adb (Initialize): If --subdirs= is used, but no project file is
3345         specified, attempt to create the specify subdir if it does not already
3346         exist and use it as the object directory as if -D had been specified.
3347
3348 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
3349
3350         * s-tpopsp-vms.adb: New file.
3351         * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
3352         * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
3353
3354 2011-08-03  Emmanuel Briot  <briot@adacore.com>
3355
3356         * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
3357         package.
3358
3359 2011-08-03  Yannick Moy  <moy@adacore.com>
3360
3361         * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
3362         * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
3363         * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
3364         detect that an array has static bounds.
3365
3366 2011-08-03  Thomas Quinot  <quinot@adacore.com>
3367
3368         * exp_dist.adb: Minor reformatting.
3369
3370 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
3371
3372         * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
3373         (ATCB_Key): Removed, not always used.
3374
3375 2011-08-03  Emmanuel Briot  <briot@adacore.com>
3376
3377         * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
3378         clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
3379         most remaining global variables.
3380
3381 2011-08-03  Robert Dewar  <dewar@adacore.com>
3382
3383         * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
3384         prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
3385         reformatting.
3386
3387 2011-08-03  Javier Miranda  <miranda@adacore.com>
3388
3389         * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
3390         that must be passed by copy in VM targets.
3391
3392 2011-08-03  Emmanuel Briot  <briot@adacore.com>
3393
3394         * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
3395         duplicates a similar htable now in the project tree.
3396
3397 2011-08-03  Claire Dross  <dross@adacore.com>
3398
3399         * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
3400         a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
3401         Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
3402         Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
3403         Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
3404         Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
3405         Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
3406         update.
3407
3408 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
3409
3410         * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
3411         (ATCB_Key): Removed, not always used.
3412         * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
3413         s-taprop-posix.adb.
3414         * s-tpopsp-tls.adb: New file.
3415         * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
3416         x86/x64/ia64/powerpc/sparc Linux.
3417
3418 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
3419
3420         * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
3421         * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
3422
3423 2011-08-03  Thomas Quinot  <quinot@adacore.com>
3424
3425         * rtsfind.ads, exp_dist.adb, exp_dist.ads
3426         (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
3427         Fix type selection for mapping integer types to PolyORB types.
3428
3429 2011-08-03  Bob Duff  <duff@adacore.com>
3430
3431         * sem_ch7.adb: Minor comment clarification.
3432
3433 2011-08-03  Bob Duff  <duff@adacore.com>
3434
3435         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
3436         an error analyzing a choice, skip further processing. Further
3437         processing could cause a crash or cascade errors.
3438
3439 2011-08-03  Emmanuel Briot  <briot@adacore.com>
3440
3441         * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
3442         prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
3443         prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
3444         prj-env.ads (Shared_Project_Tree_Data): new type
3445         An aggregate project and its aggregated trees need to share the common
3446         data structures used for lists of strings, packages,... This makes the
3447         code simpler since otherwise we have to pass the root tree (also used
3448         for the configuration file data) in addition to the current project
3449         tree. This also avoids ambiguities as to which tree should be used.
3450         And finally this saves a bit of memory.
3451         (For_Every_Project_Imported): new parameter Tree.
3452         Since aggregated projects are using a different tree, we need to let
3453         the caller know which tree to use to manipulate the returned project.
3454
3455 2011-08-03  Robert Dewar  <dewar@adacore.com>
3456
3457         * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
3458         prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
3459         lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
3460         prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
3461
3462 2011-08-03  Javier Miranda  <miranda@adacore.com>
3463
3464         * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
3465         Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
3466
3467 2011-08-03  Bob Duff  <duff@adacore.com>
3468
3469         * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
3470         the Base_Type.
3471
3472 2011-08-03  Joel Brobecker  <brobecker@adacore.com brobecker>
3473
3474         * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
3475         g-sehash.ads: Fix typo. Update header.
3476
3477 2011-08-03  Thomas Quinot  <quinot@adacore.com>
3478
3479         * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
3480         expansion.
3481
3482 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
3483
3484         * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
3485         prefixes of private types along with records, since the selector may be
3486         a discriminant.
3487         * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
3488         private types along with records, since the selector may be a
3489         discriminant.
3490
3491 2011-08-03  Emmanuel Briot  <briot@adacore.com>
3492
3493         * prj-pp.adb (Pretty_Print): Remove trailing blank line.
3494
3495 2011-08-03  Javier Miranda  <miranda@adacore.com>
3496
3497         * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
3498         Tagged_Type_Expansion.
3499
3500 2011-08-03  Yannick Moy  <moy@adacore.com>
3501
3502         * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
3503         violation when the argument of concatenation is the name of a
3504         constant.
3505
3506 2011-08-03  Emmanuel Briot  <briot@adacore.com>
3507
3508         * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
3509         prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
3510         (Process_Declarative_Items): new parameter Child_Env.
3511
3512 2011-08-03  Yannick Moy  <moy@adacore.com>
3513
3514         * alfa.ads: Update format of ALFA section in ALI file in order to
3515         add a mapping from bodies to specs when both are present.
3516         (ALFA_Scope_Record): Add components for spec file/scope.
3517         * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
3518         present.
3519         * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
3520         collected, fill in the spec information when relevant.
3521         * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
3522         present.
3523
3524 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
3525
3526         * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
3527         code unit to decide whether to add internally generated subprograms.
3528
3529 2011-08-03  Javier Miranda  <miranda@adacore.com>
3530
3531         * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
3532         * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
3533         be handled by copy in VM targets.
3534
3535 2011-08-03  Emmanuel Briot  <briot@adacore.com>
3536
3537         * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
3538         code with Makeutl.Get_Switches.
3539         * prj-tree.adb: Update comment.
3540
3541 2011-08-03  Thomas Quinot  <quinot@adacore.com>
3542
3543         * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
3544         subprogram with a limited formal that does not support external
3545         streaming.
3546
3547 2011-08-03  Yannick Moy  <moy@adacore.com>
3548
3549         * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
3550         continuation line
3551         * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
3552         not from current unit in two phases, because it is not possible to
3553         change the table while iterating over its content.
3554         * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
3555
3556 2011-08-03  Sergey Rybin  <rybin@adacore.com>
3557
3558         * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
3559         * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
3560
3561 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
3562
3563         * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
3564         and the component type is composite, this is ambiguous for predefined
3565         concatenation, but if the node is not overloaded and the entity is a use
3566         -defined function its profile can be used to resolve that aggregate.
3567
3568 2011-08-03  Robert Dewar  <dewar@adacore.com>
3569
3570         * exp_ch4.adb: Minor code cleanup.
3571
3572 2011-08-03  Thomas Quinot  <quinot@adacore.com>
3573
3574         * exp_dist.adb: Do not generate distribution stubs if serious errors
3575         have been diagnosed.
3576
3577 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
3578
3579         * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
3580         the first formal of a primitive operation, go to the base type to
3581         handle properly an access to a derived type with constrained
3582         discriminants.
3583         * sem_type.adb (Disambiguate): an immediately visible operator hides a
3584         user-defined function that is only use-visible.
3585
3586 2011-08-03  Robert Dewar  <dewar@adacore.com>
3587
3588         * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
3589         make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
3590         fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
3591         prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
3592         sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
3593         prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
3594         prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
3595         alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
3596
3597 2011-08-03  Robert Dewar  <dewar@adacore.com>
3598
3599         * repinfo.adb (List_Mechanism): Add handling of
3600         Convention_Ada_Pass_By_XXX.
3601         * sem_mech.adb (Set_Mechanism): Ditto.
3602         * sem_prag.adb (Process_Convention): Add entries for
3603         Convention_Ada_Pass_By_XXX.
3604         * snames.adb-tmpl, snames.ads-tmpl: Ditto.
3605
3606 2011-08-03  Pascal Obry  <obry@adacore.com>
3607
3608         * makeutl.adb: Minor reformatting.
3609
3610 2011-08-03  Vincent Celier  <celier@adacore.com>
3611
3612         * fname-uf.adb
3613         (Get_File_Name) If the file cannot be found when there are no config
3614         pragmas file and May_Fail is True, return No_File instead of the file
3615         name, to be consistent.
3616
3617 2011-08-03  Pascal Obry  <obry@adacore.com>
3618
3619         * adaint.c (__gnat_is_executable_file_attr): Avoid access
3620         to null pointer.
3621
3622 2011-08-03  Javier Miranda  <miranda@adacore.com>
3623
3624         * sem_ch13.adb
3625         (Same_Representation): In VM targets the representation of arrays with
3626         aliased components differs from arrays with non-aliased components.
3627
3628 2011-08-03  Emmanuel Briot  <briot@adacore.com>
3629
3630         * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
3631         not systematically lower case attribute indexes that contain no "."
3632         Fix definition of several Naming attributes, which take
3633         a unit name as index and therefore should be case insensitive.
3634         Minor refactoring (reduce length of variable names).
3635
3636 2011-08-03  Emmanuel Briot  <briot@adacore.com>
3637
3638         * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
3639
3640 2011-08-03  Emmanuel Briot  <briot@adacore.com>
3641
3642         * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
3643         prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
3644         prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
3645         prj-tree.ads (Prj.Tree.Environment): new type.
3646
3647 2011-08-03  Emmanuel Briot  <briot@adacore.com>
3648
3649         * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
3650         prj-tree.adb, prj-tree.ads (Environment): new type.
3651
3652 2011-08-03  Emmanuel Briot  <briot@adacore.com>
3653
3654         * prj-tree.ads: Remove unused variable.
3655
3656 2011-08-03  Yannick Moy  <moy@adacore.com>
3657
3658         * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
3659         issuing messages related to SPARK restriction violation.
3660
3661 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
3662
3663         * sem_ch6.adb: guard against error nodes in return statements.
3664
3665 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
3666
3667         * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
3668         a warning can only appear on a configuration file, so emit warning
3669         without further checks.
3670
3671 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
3672
3673         * s-interr.ads: add overriding keyword.
3674
3675 2011-08-03  Geert Bosch  <bosch@adacore.com>
3676
3677         * exp_attr.adb: Fix minor typo.
3678
3679 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
3680
3681         * par-ch4.adb: improve error recovery.
3682
3683 2011-08-03  Emmanuel Briot  <briot@adacore.com>
3684
3685         * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
3686         prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
3687         to Errout_Handling.
3688
3689 2011-08-03  Emmanuel Briot  <briot@adacore.com>
3690
3691         * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
3692         "external" as an attribute name in aggregate projects.
3693
3694 2011-08-03  Jose Ruiz  <ruiz@adacore.com>
3695
3696         * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
3697         uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
3698         from 0, so we need to adjust.
3699
3700 2011-08-03  Emmanuel Briot  <briot@adacore.com>
3701
3702         * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
3703         prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
3704
3705 2011-08-03  Yannick Moy  <moy@adacore.com>
3706
3707         * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
3708         restriction on overloaded entity if the entity is not an operator.
3709
3710 2011-08-03  Yannick Moy  <moy@adacore.com>
3711
3712         * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
3713         restrict.ads: Rename remaining Check_Formal_Restriction* into
3714         Check_SPARK_Restriction*.
3715
3716 2011-08-03  Emmanuel Briot  <briot@adacore.com>
3717
3718         * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
3719         prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
3720         qualifier.
3721         (Project_Empty): removed
3722         (Empty_Project): new parameter Qualifier
3723         This is used to have fields specific to aggregate projects, cleaner
3724         New field to store the list of aggregated projects.
3725         (Check_Aggregate_Project): removed
3726         (Process_Aggregated_Projects, Free): new subprograms.
3727
3728 2011-08-03  Olivier Hainque  <hainque@adacore.com>
3729
3730         * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
3731
3732 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
3733
3734         * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
3735         explicit dereference of an unconstrained type, create a constrained
3736         subtype for it, as is done for function calls that return an
3737         unconstrained type.
3738
3739 2011-08-03  Thomas Quinot  <quinot@adacore.com>
3740
3741         * g-pehage.adb (Finalize): Avoid possible double-free.
3742
3743 2011-08-03  Steve Baird  <baird@adacore.com>
3744
3745         * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
3746         Elab_Spec/Body attrs in CodePeer_Mode.
3747
3748 2011-08-03  Javier Miranda  <miranda@adacore.com>
3749
3750         * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
3751         low bound is not known at compile time but they have no others choice.
3752         Done because in this case the bounds can be obtained directly from the
3753         aggregate.
3754
3755 2011-08-03  Ed Falis  <falis@adacore.com>
3756
3757         * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
3758         on VxWorks SMP. Remove unusable constant ANY_CPU.
3759
3760 2011-08-03  Emmanuel Briot  <briot@adacore.com>
3761
3762         * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
3763         clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
3764         prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
3765         Prj.Env.Initialize_Empty): new subprograms
3766         (Get_Env, Find_Project): remove parameter Target_Name.
3767
3768 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
3769
3770         * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
3771         as a condition for the delayed call to Derived_Subprograms done for the
3772         case of the rewriting of a derived type that constrains the
3773         discriminants of its parent type.
3774         Avoids redundant subprogram derivations for private subtype derivations.
3775
3776 2011-08-03  Javier Miranda  <miranda@adacore.com>
3777
3778         * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
3779         Build_Record_Aggr_Code.
3780         (Build_Record_Aggr_Code): Add missing support to initialize hidden
3781         discriminants in extension aggregates.
3782
3783 2011-08-03  Emmanuel Briot  <briot@adacore.com>
3784
3785         * prj-pp.adb (Print): also output project qualifiers, since in
3786         particular "aggregate" is mandatory in an aggregate project.
3787
3788 2011-08-03  Emmanuel Briot  <briot@adacore.com>
3789
3790         * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
3791         (Debug_Output): new function.
3792
3793 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
3794
3795         * gnat_ugn.texi: Document -Wstack-usage.
3796         * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
3797
3798 2011-08-03  Thomas Quinot  <quinot@adacore.com>
3799
3800         * sem_prag.adb Issue an error (not a warning) when a C++ type does not
3801         have keyword LIMITED.
3802
3803 2011-08-03  Yannick Moy  <moy@adacore.com>
3804
3805         * alfa.adb, alfa.ads, alfa_test.adb: New files.
3806         * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
3807         (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
3808         section (does not happen in compiler, only if code directly calls
3809         Scan_ALI).
3810         * get_alfa.adb, get_alfa.ads: New files.
3811         * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
3812         needed.
3813         * lib-xref-alfa.adb: New file.
3814         * lib-xref.adb, lib-xref.ads
3815         (Xref_Entry): redefine information needed in cross-references for ALFA.
3816         Push ALFA treatments in separated local package.
3817         (Enclosing_Subpragram_Or_Package): treat specially subprogram
3818         identifiers. Return entity of package body instead of spec. Return
3819         Empty for a scope with no location.
3820         (Generate_Reference): adapt to new components for ALFA information.
3821         Remove the need for D references on definitions.
3822         (Is_Local_Reference): moved to ALFA local package
3823         (Output_References): extract subfunction as Extract_Source_Name
3824         (Output_Local_References): remove procedure, replaced by filtering of
3825         cross-references in package ALFA and printing in Put_ALFA.
3826         (Write_Entity_Name): remove procedure
3827         * lib.adb, lib.ads (Extract_Source_Name): extract here function to
3828         print exact name of entity as it appears in source file
3829         (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
3830         * put_alfa.adb, put_alfa.ads: New files.
3831         * xref_lib.adb (Search_Xref): protect read of cross-references against
3832         reading other sections of the ALI file, in gnatxref
3833         (Search): protect read of cross-references against reading other
3834         sections of the ALI file, in gnatfind.
3835         * gcc-interface/Make-lang.in: Update dependencies.
3836
3837 2011-08-03  Thomas Quinot  <quinot@adacore.com>
3838
3839         * sem_ch3.adb: Minor reformatting.
3840
3841 2011-08-03  Jose Ruiz  <ruiz@adacore.com>
3842
3843         * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
3844         raising an exception.
3845
3846 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
3847
3848         * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
3849         type, always use 1 as the lower bound or string, even if lower bound of
3850         context is not static, to handle properly null strings in a non-static
3851         context.
3852
3853 2011-08-03  Bob Duff  <duff@adacore.com>
3854
3855         * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
3856         always legal on the right-hand side of an assignment statement; there
3857         is always an applicable index constraint in this case. Therefore, the
3858         check for Pkind = N_Assignment_Statement is now unconditional -- it
3859         doesn't depend on whether Is_Constrained (Typ).
3860
3861 2011-08-03  Robert Dewar  <dewar@adacore.com>
3862
3863         * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
3864
3865 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
3866
3867         * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
3868         for an itype created within a generic unit.
3869
3870 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
3871
3872         * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
3873         suppresses all inlining.
3874
3875 2011-08-03  Robert Dewar  <dewar@adacore.com>
3876
3877         * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
3878         exp_aggr.adb: Minor reformatting.
3879
3880 2011-08-03  Thomas Quinot  <quinot@adacore.com>
3881
3882         * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
3883         tagged assignment when discriminant checks are suppressed. This is
3884         useless and extremely costly in terms of static stack usage.
3885
3886 2011-08-03  Bob Duff  <duff@adacore.com>
3887
3888         * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
3889         of generics, because this leads to the wrong entity in the wrong scope,
3890         causing (e.g.) pragma Export_Procedure to get an error if the entity is
3891         an instance.
3892         (Process_Interface_Name): Follow Alias for instances of generics, to
3893         correct for the above change.
3894
3895 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
3896
3897         * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
3898         is an integer literal it is always safe to replace the reference. In
3899         addition, if the reference appears in the generated code for an object
3900         declaration it is necessary to copy because otherwise the reference
3901         might be to the uninitilized value of the discriminant of the object
3902         itself.
3903
3904 2011-08-03  Pascal Obry  <obry@adacore.com>
3905
3906         * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
3907         ACL used, in this case we want to check for ending .exe, not .exe
3908         anywhere in the path.
3909
3910 2011-08-03  Sergey Rybin  <rybin@adacore.com>
3911
3912         * tree_io.ads (ASIS_Version_Number): Update because of the changes in
3913         the tree structure (semantic decoration of references to record
3914         discriminants).
3915
3916 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
3917
3918         * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
3919         choices of a named array aggregate, bail out when any choices are
3920         marked as Errors_Posted.
3921
3922 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
3923
3924         * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
3925         in which entity is frozen, to handle properly loop variables in
3926         iterators.
3927
3928 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
3929
3930         * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
3931         subtype is not static, compute the upper bound using attributes, to
3932         handle properly index types that are not integer types.
3933
3934 2011-08-03  Bob Duff  <duff@adacore.com>
3935
3936         * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
3937         Update copyright notice.
3938
3939 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
3940
3941         * sem_ch3.adb (Build_Discriminant_Constraints): Only use
3942         Original_Discriminant if within an instance.
3943         * sem_ch4.adb (Analyze_Selected_Component): Ditto.
3944
3945 2011-08-03  Thomas Quinot  <quinot@adacore.com>
3946
3947         * einfo.ads: Minor reformatting.
3948
3949 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
3950
3951         * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
3952         composite type with an unfrozen subcomponent, in the profile of a
3953         primitive operation.
3954
3955 2011-08-03  Robert Dewar  <dewar@adacore.com>
3956
3957         * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
3958
3959 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
3960
3961         * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
3962         unconstrained type with discriminants is initialized with an aggregate,
3963         use the constrained subtype of the aggregate as the type of the object,
3964         because it is immutable, and this allows the back-end to generate no
3965         code for the object declaration.
3966
3967 2011-08-03  Robert Dewar  <dewar@adacore.com>
3968
3969         * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
3970         comparison operand is variable, and turns out to be zero or negative.
3971
3972 2011-08-03  Javier Miranda  <miranda@adacore.com>
3973
3974         * exp_intr.adb
3975         (Expand_Dispatching_Constructor_Call): Disable expansion of
3976         code required for native targets. Done to avoid generating
3977         references to unavailable runtime entities in VM targets.
3978         * exp_ch3.adb
3979         (Expand_N_Object_Declaration): Add missing support to handle
3980         the explicit initialization of class-wide interface objects.
3981         Fix documentation.
3982
3983 2011-08-03  Matthew Heaney  <heaney@adacore.com>
3984
3985         * a-cobove.adb (Merge): Move source onto target, instead of using Assign
3986
3987 2011-08-03  Matthew Heaney  <heaney@adacore.com>
3988
3989         * a-cbdlli.adb (Splice): move source items from first to last
3990
3991 2011-08-03  Yannick Moy  <moy@adacore.com>
3992
3993         * sem_util.ads: comment added.
3994
3995 2011-08-03  Javier Miranda  <miranda@adacore.com>
3996
3997         * exp_aggr.adb
3998         (Expand_Record_Aggregate): In VM targets disable the expansion into
3999         assignments of aggregates whose type is not known at compile time.
4000
4001 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4002
4003         * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
4004         protected entries and task entries, to build the proper renaming
4005         declaration for entry formals, used in debugging.
4006         * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
4007         parameters in the same way.
4008
4009 2011-08-02  Robert Dewar  <dewar@adacore.com>
4010
4011         * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
4012         sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
4013         code reorganization.
4014
4015 2011-08-02  Robert Dewar  <dewar@adacore.com>
4016
4017         * debug.adb: Debug flag d.P to suppress length comparison optimization
4018         * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
4019         comparison of Length by comparing First/Last instead.
4020
4021 2011-08-02  Matthew Heaney  <heaney@adacore.com>
4022
4023         * a-cobove.ads: Code clean up.
4024
4025 2011-08-02  Vincent Celier  <celier@adacore.com>
4026
4027         * adaint.c (file_names_case_sensitive_cache): New static int.
4028         (__gnat_get_file_names_case_sensitive): Cache the return value in
4029         file_names_case_sensitive_cache at the first invocation, to avoid
4030         multiple calls to getenv.
4031
4032 2011-08-02  Bob Duff  <duff@adacore.com>
4033
4034         * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
4035
4036 2011-08-02  Yannick Moy  <moy@adacore.com>
4037
4038         * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
4039         sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
4040         sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
4041         indicate that we are in a precondition or postcondition. This is used in
4042         Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
4043         decide whether to flag the spec or body of the current subprogram as
4044         not in ALFA.
4045
4046 2011-08-02  Fabien Chouteau  <chouteau@adacore.com>
4047
4048         * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
4049         list.
4050         * a-extiin.ads: New file.
4051
4052 2011-08-02  Bob Duff  <duff@adacore.com>
4053
4054         * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
4055         now raises Name_Error instead of Use_Error in certain cases. The other
4056         parts of this AI were already implemented properly.
4057
4058 2011-08-02  Vincent Celier  <celier@adacore.com>
4059
4060         * link.c: Only import "auto-host.h" when building the gnattools.
4061
4062 2011-08-02  Yannick Moy  <moy@adacore.com>
4063
4064         * sem_util.adb: Inter-unit inlining does not work for a subprogram
4065         which calls a local subprogram, so extract subprogram
4066         from Mark_Non_ALFA_Subprogram_Body.
4067
4068 2011-08-02  Javier Miranda  <miranda@adacore.com>
4069
4070         * exp_ch9.adb
4071         (Extract_Dispatching_Call): If the type of the dispatching object is an
4072         access type then return an explicit dereference in the Object out-mode
4073         parameter.
4074
4075 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
4076
4077         * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
4078         compatibility checks for all indexes of an array subtype, not just the
4079         first. Reset Has_Dynamic_Range_Check on the subtype before each
4080         potential check to ensure that Insert_Range_Checks will not elide any
4081         of the dynamic checks.
4082
4083 2011-08-02  Yannick Moy  <moy@adacore.com>
4084
4085         * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
4086         SPARK restriction at parsing time.
4087         * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
4088         directive only if the SPARK restriction is set for this unit.
4089
4090 2011-08-02  Yannick Moy  <moy@adacore.com>
4091
4092         * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
4093         sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
4094         sem_ch11.adb: Protect call to Current_Subprogram which might be costly
4095         when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
4096         Mark_Non_ALFA_Subprogram_Body.
4097         Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
4098         inlined.
4099
4100 2011-08-02  Yannick Moy  <moy@adacore.com>
4101
4102         * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
4103         might be costly.
4104
4105 2011-08-02  Robert Dewar  <dewar@adacore.com>
4106
4107         * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
4108         exp_ch3.adb: Minor reformatting.
4109
4110 2011-08-02  Emmanuel Briot  <briot@adacore.com>
4111
4112         * adaint.c (__gnat_locate_exec_on_path): only returns executable
4113         files, not any regular file.
4114         (__gnat_locate_file_with_predicate): new subprogram.
4115
4116 2011-08-02  Yannick Moy  <moy@adacore.com>
4117
4118         * sinfo.adb, sinfo.ads: Restrict the use of flags
4119         Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
4120         nodes, plus N_Subtype_Declaration for the 2nd one.
4121
4122 2011-08-02  Sergey Rybin  <rybin@adacore.com>
4123
4124         * gnat_rm.texi: Ramification of pragma Eliminate documentation
4125          - fix bugs in the description of Source_Trace;
4126          - get rid of UNIT_NAME;
4127
4128 2011-08-02  Javier Miranda  <miranda@adacore.com>
4129
4130         * exp_ch9.adb
4131         (Build_Dispatching_Requeue): Adding support for VM targets
4132         since we cannot directly reference the Tag entity.
4133         * exp_sel.adb (Build_K): Adding support for VM targets.
4134         (Build_S_Assignment): Adding support for VM targets.
4135         * exp_disp.adb
4136         (Default_Prim_Op_Position): In VM targets do not restrict availability
4137         of predefined interface primitives to compiling in Ada 2005 mode.
4138         (Is_Predefined_Interface_Primitive): In VM targets this service is not
4139         restricted to compiling in Ada 2005 mode.
4140         (Make_VM_TSD): Generate code that declares and initializes the OSD
4141         record. Needed to support dispatching calls through synchronized
4142         interfaces.
4143         * exp_ch3.adb
4144         (Make_Predefined_Primitive_Specs): Enable generation of predefined
4145         primitives associated with synchronized interfaces.
4146         (Make_Predefined_Primitive_Bodies): Enable generation of predefined
4147         primitives associated with synchronized interfaces.
4148
4149 2011-08-02  Yannick Moy  <moy@adacore.com>
4150
4151         * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
4152         statements hidden in SPARK if preceded by the HIDE directive
4153         (Parse_Exception_Handlers): mark each exception handler in a sequence of
4154         exception handlers as hidden in SPARK if preceded by the HIDE directive
4155         * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
4156         if starting with the HIDE directive
4157         * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
4158         starting with the HIDE directive; mark the declarations in a private
4159         part as hidden in SPARK if the private part starts with the HIDE
4160         directive
4161         * restrict.adb, restrict.ads
4162         (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
4163         (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
4164         argument node belongs to a part which is hidden in SPARK
4165         (Check_SPARK_Restriction): do not issue violations on nodes in hidden
4166         parts in SPARK; protect the possibly costly call to
4167         Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
4168         * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
4169         * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
4170         Accumulate_Token_Checksum_GNAT_5_03): add case for new token
4171         Tok_SPARK_Hide.
4172         (Scan): recognize special comment starting with '#' and followed by
4173         SPARK keyword "hide" as a HIDE directive.
4174
4175 2011-08-02  Yannick Moy  <moy@adacore.com>
4176
4177         * types.ads, erroutc.ads: Minor reformatting.
4178
4179 2011-08-02  Vincent Celier  <celier@adacore.com>
4180
4181         * link.c: Add response file support for cross platforms.
4182
4183 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
4184
4185         * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
4186         in an association, set parent field of copy before partial analysis.
4187         * sem_res.adb (Resolve_Slice): create reference to itype only when
4188         expansion is enabled.
4189
4190 2011-08-02  Yannick Moy  <moy@adacore.com>
4191
4192         * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
4193         for new flag denoting which subprogram bodies are in ALFA
4194         * restrict.adb, sem_ch7.adb: Update comment
4195         * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
4196         sem_ch9.adb, sem_res.adb: Add calls to
4197         Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
4198         * sem_ch6.adb (Analyze_Function_Return): add calls to
4199         Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
4200         middle of the body, and extended return.
4201         (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
4202         False when missing return.
4203         (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
4204         to True for subprograms whose spec is in ALFA. Remove later on the flag
4205         on the entity used for a subprogram body when there exists a separate
4206         declaration.
4207         * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
4208         if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
4209         False, otherwise do nothing.
4210
4211 2011-08-02  Robert Dewar  <dewar@adacore.com>
4212
4213         * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
4214
4215 2011-08-02  Yannick Moy  <moy@adacore.com>
4216
4217         * sem_ch4.ads: minor formatting.
4218
4219 2011-08-02  Yannick Moy  <moy@adacore.com>
4220
4221         * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
4222         debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
4223         errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
4224         restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
4225         opt.ads: cleanup of SPARK mode
4226
4227 2011-08-02  Yannick Moy  <moy@adacore.com>
4228
4229         * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
4230         types.
4231         * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
4232         (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
4233         * sem_ch3.adb
4234         (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
4235         (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
4236         (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
4237         (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
4238         types.
4239         (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
4240         non-static range.
4241         * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
4242         functions whose return type is not in ALFA.
4243         (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
4244         specifications.
4245         (Process_Formals): unset Is_In_ALFA flag for subprograms if a
4246         parameter's type is not in ALFA.
4247         * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
4248         types are in ALFA.
4249
4250 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
4251
4252         * sem_ch6 (Analyze_Expression_Function): treat the function as
4253         Inline_Always, and introduce a subprogram declaration for it when it is
4254         not a completion.
4255         * inline.adb (Add_Inlined_Body): recognize bodies that come from
4256         expression functions, so that the back-end can determine whether they
4257         can in fact be inlined.
4258         * sem_util.adb (Is_Expression_Function): predicate to determine whether
4259         a function body comes from an expression function.
4260
4261 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
4262
4263         * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
4264         null exclusions to test Can_Never_Be_Null on the anonymous access types
4265         of the formals rather than testing the formals themselves. Exclude this
4266         check in cases where the Old_Formal is marked as a controlling formal,
4267         to avoid issuing spurious errors for bodies completing dispatching
4268         operations (due to the flag not getting set on controlling access
4269         formals in body specs).
4270         (Find_Corresponding_Spec): When checking full and subtype conformance of
4271         subprogram bodies in instances, pass Designated and E in that order, for
4272         consistency with the expected order of the formals (New_Id followed by
4273         Old_Id).
4274
4275 2011-08-02  Robert Dewar  <dewar@adacore.com>
4276
4277         * sem_ch8.adb: Minor reformatting.
4278
4279 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
4280
4281         * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
4282         Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
4283         primitive operations of class-wide actuals.
4284
4285 2011-08-02  Javier Miranda  <miranda@adacore.com>
4286
4287         * exp_atag.ads, exp_atag.adb
4288         (Build_Common_Dispatching_Select_Statements): Remove argument Loc
4289         since its value is implicitly passed in argument Typ.
4290         * exp_disp.adb (Make_Disp_Conditional_Select_Body,
4291         Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
4292         Build_Common_Dispatching_Select_Statements.
4293
4294 2011-08-02  Robert Dewar  <dewar@adacore.com>
4295
4296         * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
4297         exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
4298         Minor reformatting.
4299
4300 2011-08-02  Robert Dewar  <dewar@adacore.com>
4301
4302         * sem_res.adb: Minor reformatting.
4303         * sem_prag.adb: Minor reformatting.
4304
4305 2011-08-02  Javier Miranda  <miranda@adacore.com>
4306
4307         * exp_atag.adb, exp_atags.ads
4308         (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
4309         by the tagged type Entity. Required to use this routine in the VM
4310         targets since we do not have available the Tag entity in the VM
4311         platforms.
4312         * exp_ch6.adb
4313         (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
4314         Ada.Tags has not been previously loaded.
4315         * exp_ch7.adb
4316         (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
4317         Build_VM_TSDs if package Ada.Tags has not been previously loaded.
4318         * sem_aux.adb
4319         (Enclosing_Dynamic_Scope): Add missing support to handle the full
4320         view of enclosing scopes. Required to handle enclosing scopes that
4321         are synchronized types whose full view is a task type.
4322         * exp_disp.adb
4323         (Build_VM_TSDs): Minor code improvement to avoid generating and
4324         analyzing lists with empty nodes.
4325         (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
4326         (Make_Disp_Conditional_Select_Body): Add support for VM targets.
4327         (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
4328         (Make_Disp_Timed_Select_Body): Add support for VM targets.
4329         (Make_Select_Specific_Data_Table): Add support for VM targets.
4330         (Make_VM_TSD): Generate code to initialize the SSD structure of
4331         the TSD.
4332
4333 2011-08-02  Yannick Moy  <moy@adacore.com>
4334
4335         * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
4336         cross-references section in ALI.
4337         * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
4338         (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
4339         Sub).
4340         (Enclosing_Subprogram_Or_Package): new function to return the enclosing
4341         subprogram or package entity of a node
4342         (Is_Local_Reference_Type): new function returns True for references
4343         selected in local cross-references.
4344         (Lt): function extracted from Lt in Output_References
4345         (Write_Entity_Name): function extracted from Output_References
4346         (Generate_Definition): generate reference with type 'D' for definition
4347         of objects (object declaration and parameter specification), with
4348         appropriate locations and units, for use in local cross-references.
4349         (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
4350         references of type 'I' for initialization in object definition.
4351         (Output_References): move part of function Lt and procedure
4352         Write_Entity_Name outside of the body. Ignore references of types 'D'
4353         and 'I' introduced for local cross-references.
4354         (Output_Local_References): new procedure to output the local
4355         cross-references sections.
4356         (Lref_Entity_Status): new array defining whether an entity is a local
4357         * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
4358         with 'I' type when initialization expression is present.
4359         * get_scos.adb, get_scos.ads: Correct comments and typos
4360
4361 2011-08-02  Javier Miranda  <miranda@adacore.com>
4362
4363         * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
4364         the JVM target.
4365         * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
4366         the JVM target.
4367         * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
4368         TSD support.
4369
4370 2011-08-02  Vincent Celier  <celier@adacore.com>
4371
4372         * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
4373         (No_Space_Img): New function
4374         (Find_Excluded_Sources): When reading from a file, record the file name
4375         and the line number for each excluded source.
4376         (Mark_Excluded_Sources): When reporting an error, if the excluded
4377         sources were read from a file, include file name and line number in
4378         the error message.
4379
4380 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
4381
4382         * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
4383
4384 2011-08-02  Robert Dewar  <dewar@adacore.com>
4385
4386         * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
4387
4388 2011-08-02  Javier Miranda  <miranda@adacore.com>
4389
4390         * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
4391         generation of TSDs to the DOTNET compiler.
4392         * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
4393         generation of TSDs to the DOTNET compiler.
4394
4395 2011-08-02  Javier Miranda  <miranda@adacore.com>
4396
4397         * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
4398         record of all the tagged types declared inside library level package
4399         declarations, library level package bodies or library level subprograms.
4400         * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
4401         associated with a given tagged type.
4402         (Build_VM_TSDs): New subprogram.
4403         * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
4404         compilation units that are subprograms.
4405         * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
4406         compilation units that are package bodies.
4407         (Expand_N_Package_Declaration): Generate TSDs of the main compilation
4408         units that are a package declaration or a package instantiation.
4409         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
4410         reorganization to improve the error generated by the frontend when the
4411         function Ada.Tags.Secondary_Tag is not available.
4412         * rtsfind.ads (RE_Register_TSD): New runtime entity.
4413         * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
4414
4415 2011-08-02  Javier Miranda  <miranda@adacore.com>
4416
4417         * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
4418
4419 2011-08-02  Robert Dewar  <dewar@adacore.com>
4420
4421         * s-imenne.ads: Minor reformatting.
4422
4423 2011-08-02  Robert Dewar  <dewar@adacore.com>
4424
4425         * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
4426         * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
4427         * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
4428
4429 2011-08-02  Robert Dewar  <dewar@adacore.com>
4430
4431         * einfo.ads (Materialize_Entity): Document this is only for renamings
4432         * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
4433         required debug information in the case where we transform the object
4434         declaration into a renaming declaration.
4435         * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
4436         object
4437         * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
4438         Materialize_Entity.
4439
4440 2011-08-02  Robert Dewar  <dewar@adacore.com>
4441
4442         * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
4443         Suppress_Init_Procs.
4444         * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
4445         Suppress_Initialization/Initialization_Suppressed.
4446         * gnat_rm.texi: New documentation for pragma Suppress_Initialization
4447         * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
4448         * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
4449         * sem_prag.adb: New processing for pragma Suppress_Initialization.
4450
4451 2011-08-02  Robert Dewar  <dewar@adacore.com>
4452
4453         * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
4454         Minor reformatting.
4455
4456 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
4457
4458         * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
4459         only have inheritable classwide pre/postconditions.
4460
4461 2011-08-02  Javier Miranda  <miranda@adacore.com>
4462
4463         * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
4464         * rtsfind.ads (RE_Check_TSD): New runtime entity.
4465         * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
4466         checks if the external tag of a type is the same as the external tag
4467         of some other declaration.
4468
4469 2011-08-02  Thomas Quinot  <quinot@adacore.com>
4470
4471         * s-taskin.ads: Minor reformatting.
4472
4473 2011-08-02  Emmanuel Briot  <briot@adacore.com>
4474
4475         * g-comlin.adb (Display_Help): swap the order in which it prints the
4476         short help and the general usage.
4477
4478 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
4479
4480         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
4481         the aspect declarations and attach them to the generic copy for
4482         subsequent analysis.
4483         (Analyze_Subprogram_Instantiation): copy explicitly the aspect
4484         declarations of the generic tree to the new subprogram declarations.
4485         * sem_attr.adb (Check_Precondition_Postcondition): recognize
4486         conditions that apply to a subprogram instance.
4487
4488 2011-08-02  Robert Dewar  <dewar@adacore.com>
4489
4490         * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
4491
4492 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
4493
4494         * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
4495         private type with a tagged full view is not derived in the immediate
4496         scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
4497
4498 2011-08-02  Robert Dewar  <dewar@adacore.com>
4499
4500         * exp_ch4.adb: Minor reformatting.
4501
4502 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
4503
4504         * sem_ch5.adb (Analyze_Loop_Statement):  If the iteration scheme is an
4505         Ada2012 iterator, the loop will be rewritten during expansion into a
4506         while loop with a cursor and an element declaration. Do not analyze the
4507         body in this case, because if the container is for indefinite types the
4508         actual subtype of the elements will only be determined when the cursor
4509         declaration is analyzed.
4510
4511 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
4512
4513         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
4514         size/alignment related attributes in CodePeer_Mode.
4515
4516 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
4517
4518         * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
4519         Prepend_Element, since this can result in the operation getting the
4520         wrong slot in the full type's dispatch table if the full type has
4521         inherited operations. The incomplete type's operation will get added
4522         to the proper position in the full type's primitives
4523         list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
4524         (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
4525         dispatching operations, since there are cases where nonprimitive
4526         subprograms can get added to the list of incomplete dependents (such
4527         as subprograms in nested packages).
4528         * sem_ch6.adb (Process_Formals): First, remove test for being in a
4529         private part when determining whether to add a primitive with a
4530         parameter of a tagged incomplete type to the Private_Dependents list.
4531         Such primitives can also occur in the visible part, and should not have
4532         been excluded from being private dependents.
4533         * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
4534         RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
4535         list of a Taft-amendment incomplete type is a primitive before issuing
4536         an error that the full type must appear in the same unit. There are
4537         cases where nonprimitives can be in the list (such as subprograms in
4538         nested packages).
4539         * sem_disp.adb (Derives_From): Use correct condition for checking that
4540         a formal's type is derived from the type of the corresponding formal in
4541         the parent subprogram (the condition was completely wrong). Add
4542         checking that was missing for controlling result types being derived
4543         from the result type of the parent operation.
4544
4545 2011-08-02  Yannick Moy  <moy@adacore.com>
4546
4547         * errout.adb (First_Node): minor renaming
4548         * restrict.adb (Check_Formal_Restriction): put restriction warning on
4549         first node.
4550
4551 2011-08-02  Yannick Moy  <moy@adacore.com>
4552
4553         * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
4554         before accessing operands.
4555         * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
4556         decide whether an initialization expression respects SPARK rules, as
4557         the plain node is the expanded one. This allows for more valid warnings
4558         to be issued.
4559         * gnat_rm.texi: Minor update.
4560
4561 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
4562
4563         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
4564         previous change.
4565
4566 2011-08-02  Robert Dewar  <dewar@adacore.com>
4567
4568         * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
4569
4570 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
4571
4572         * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
4573         loop statements and the element renaming declaration with a block when
4574         the element type is controlled.
4575
4576 2011-08-02  Yannick Moy  <moy@adacore.com>
4577
4578         * sinfo.ads: Minor formatting.
4579
4580 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
4581
4582         * sem_aggr.adb (Add_Association): if the association has a box and no
4583         expression, use the Sloc of the aggregate itself for the new
4584         association.
4585         * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
4586         the Original_Node.
4587
4588 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
4589
4590         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
4591         When a container is provided via a function call, generate a renaming
4592         of the function result. This avoids the creation of a transient scope
4593         and the premature finalization of the container.
4594         * exp_ch7.adb (Is_Container_Cursor): Removed.
4595         (Wrap_Transient_Declaration): Remove the supression of the finalization
4596         of the list controller when the declaration denotes a container cursor,
4597         it is not needed.
4598
4599 2011-08-02  Yannick Moy  <moy@adacore.com>
4600
4601         * restrict.adb (Check_Formal_Restriction): only issue a warning if the
4602         node is from source, instead of the original node being from source.
4603         * sem_aggr.adb
4604         (Resolve_Array_Aggregate): refine the check for a static expression, to
4605         recognize also static ranges
4606         * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
4607         Array_Type_Declaration): postpone the test for the type being a subtype
4608         mark after the type has been resolved, so that component-selection and
4609         expanded-name are discriminated.
4610         (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
4611         to distinguish the case of an iteration scheme, so that an error is
4612         issed on a non-static range in SPARK except in an iteration scheme.
4613         * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
4614         In_Iter_Schm = True.
4615         * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
4616         user-defined operators so that they are allowed in renaming
4617         * sem_ch8.adb
4618         (Find_Selected_Component): refine the check for prefixing of operators
4619         so that they are allowed in renaming. Move the checks for restrictions
4620         on selector name after analysis discriminated between
4621         component-selection and expanded-name.
4622         * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
4623         concatenation argument of string type if it is static.
4624         * sem_util.adb, sem_util.ads
4625         (Check_Later_Vs_Basic_Declarations): add a new function
4626         Is_Later_Declarative_Item to decice which declarations are allowed as
4627         later items, in the two different modes Ada 83 and SPARK. In the SPARK
4628         mode, add that renamings are considered as later items.
4629         (Enclosing_Package): new function to return the enclosing package
4630         (Enter_Name): correct the rule for homonyms in SPARK
4631         (Is_SPARK_Initialization_Expr): default to returning True on nodes not
4632         from source (result of expansion) to avoid issuing wrong warnings.
4633
4634 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
4635
4636         * errout.adb: On anything but an expression First_Node returns its
4637         argument.
4638
4639 2011-08-02  Pascal Obry  <obry@adacore.com>
4640
4641         * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
4642
4643 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
4644
4645         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
4646         Set the associated loop as the related expression of internally
4647         generated cursors.
4648         * exp_ch7.adb (Is_Container_Cursor): New routine.
4649         (Wrap_Transient_Declaration): Supress the finalization of the list
4650         controller when the declaration denotes a container cursor.
4651
4652 2011-08-02  Yannick Moy  <moy@adacore.com>
4653
4654         * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
4655         command line now.
4656         * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
4657         expression is a simple expression. This check cannot be performed in
4658         the semantics, so just drop it.
4659         (P_Index_Or_Discriminant_Constraint): move check that the index or
4660         discriminant is a subtype mark to Analyze_Subtype_Declaration in the
4661         semantics. Other cases were previously checked in the semantics.
4662         * par-ch4.adb (P_Name): move checks that a selector name is not
4663         character literal or an operator symbol to Find_Selected_Component in
4664         the semantics
4665         * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
4666         declarations are not placed after later declarations in a separate
4667         procedure in Sem_Util (possibly not the best choice?), to be used both
4668         during parsing, for Ada 83 mode, and during semantic analysis, for
4669         SPARK mode.
4670         * par-endh.adb (Check_End): move check that end label is not missing
4671         to Process_End_Label in the semantics
4672         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
4673         the special case for SPARK restriction
4674         * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
4675         * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
4676         parameter Force to issue the error message even on internal node (used
4677         for generated end label). Call Check_Restriction to check when an error
4678         must be issued. In SPARK mode, issue an error message even if the
4679         restriction is not set.
4680         (Check_Restriction): new procedure with an additional out parameter to
4681         inform the caller that a message has been issued
4682         * sem_aggr.adb: Minor modification of message
4683         * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
4684         instead of issuing an error message directly
4685         * sem_ch3.adb (Analyze_Declarations): move here the check that basic
4686         declarations are not placed after later declarations, by calling
4687         Check_Later_Vs_Basic_Declarations
4688         (Analyze_Subtype_Declaration): move here the check that an index or
4689         discriminant constraint must be a subtype mark. Change the check that
4690         a subtype of String must start at one so that it works on subtype marks.
4691         * sem_ch4.adb (Analyze_Call): move here the check that a named
4692         association cannot follow a positional one in a call
4693         * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
4694         instead of issuing an error message directly
4695         * sem_ch8.adb (Find_Selected_Component): move here the check that a
4696         selector name is not a character literal or an operator symbol. Move
4697         here the check that the prefix of an expanded name cannot be a
4698         subprogram or a loop statement.
4699         * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
4700         procedure called from parsing and semantics to check that basic
4701         declarations are not placed after later declarations
4702         (Process_End_Label): move here the check that end label is not missing
4703
4704 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
4705
4706         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
4707         representation clause in codepeer mode, since it confuses CodePeer and
4708         does not bring useful info.
4709
4710 2011-08-02  Ed Falis  <falis@adacore.com>
4711
4712         * init.c: initialize fp hw on MILS.
4713
4714 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
4715
4716         * errout.adb (First_Node): for bodies, return the node itself (small
4717         optimization). For other nodes, do not check source_unit if the node
4718         comes from Standard.
4719
4720 2011-08-02  Robert Dewar  <dewar@adacore.com>
4721
4722         * exp_ch3.adb: Minor comment additions.
4723         * sem_ch13.adb: Minor reformatting.
4724
4725 2011-08-02  Pascal Obry  <obry@adacore.com>
4726
4727         * make.adb, makeutl.adb: Removes some superfluous directory separator.
4728
4729 2011-08-02  Robert Dewar  <dewar@adacore.com>
4730
4731         * sem_attr.adb: Minor reformatting.
4732
4733 2011-08-02  Robert Dewar  <dewar@adacore.com>
4734
4735         * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
4736         (Has_Default_Component_Value): Removed
4737         * einfo.ads Comment updates
4738         (Has_Default_Aspect): Replaces Has_Default_Value
4739         (Has_Default_Component_Value): Removed
4740         * exp_ch13.adb
4741         (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
4742         * exp_ch3.adb
4743         (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
4744         (Get_Simple_Init_Val): Handle Default_Value aspect
4745         (Needs_Simple_Initialization): Handle Default_Value aspect
4746         * exp_ch3.ads: Needs_Simple_Initialization
4747         * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
4748         * par-prag.adb (Pragma_Default[_Component]Value) Removed
4749         * sem_ch13.adb
4750         (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
4751         * sem_prag.adb (Pragma_Default[_Component]Value) Removed
4752         * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
4753
4754 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
4755
4756         * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
4757         package containing iteration primitives.
4758         exp_ch5.adb (Expand_Iterator_Loop): ditto.
4759
4760 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
4761
4762         * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
4763         "of", pre-analyze expression in case it is a function call with
4764         finalization actions that must be placed ahead of the loop.
4765         * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
4766         on an Ada2012 iterator, insert them ahead of the rewritten loop.
4767
4768 2011-08-02  Geert Bosch  <bosch@adacore.com>
4769
4770         * cstand.adb (Create_Float_Types): Only consider C's long double for
4771         Long_Long_Float, in addition to double.
4772
4773 2011-08-02  Robert Dewar  <dewar@adacore.com>
4774
4775         * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
4776         sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
4777         prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
4778         Minor reformatting.
4779
4780 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
4781
4782         * sem_attr.adb: handle properly 'Result when it is a prefix of an
4783         indexed component.
4784
4785 2011-08-02  Javier Miranda  <miranda@adacore.com>
4786
4787         * einfo.ads, einfo.adb
4788         (Original_Access_Type): Move this attribute to Node26 since there was
4789         an undocumented use of Node21 in E_Access_Subprogram_Type entities
4790         which causes conflicts and breaks the generation of the .NET compiler.
4791         (Interface_Name): Add missing documentation on JGNAT only uses of
4792         this attribute.
4793
4794 2011-08-02  Geert Bosch  <bosch@adacore.com>
4795
4796         * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
4797         (Find_Back_End_Float_Type): Likewise
4798         (Create_Back_End_Float_Types): Likewise
4799         (Create_Float_Types): Likewise
4800         (Register_Float_Type): Likewise
4801         * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
4802         Nlist and split out type selection in new local Find_Base_Type function.
4803         * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
4804         Nlist
4805         * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
4806
4807 2011-08-02  Robert Dewar  <dewar@adacore.com>
4808
4809         * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
4810         alpha order).
4811         * opt.ads: Minor comment change.
4812         * sem_ch12.adb: Minor code reorganization.
4813
4814 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
4815
4816         * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
4817         subtype's list of rep items to the list on the full subtype in the case
4818         where the lists are the same.
4819
4820 2011-08-02  Geert Bosch  <bosch@adacore.com>
4821
4822         * switch-c.adb (Free): New deallocation procedure to avoid implicitly
4823         using the one from System.Strings, which also deallocates all strings.
4824
4825 2011-08-02  Geert Bosch  <bosch@adacore.com>
4826
4827         * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
4828         function.
4829         * gcc-interface/Make-lang.in: Update dependencies.
4830
4831 2011-08-02  Olivier Hainque  <hainque@adacore.com>
4832
4833         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
4834         end_locus.
4835
4836 2011-08-02  Javier Miranda  <miranda@adacore.com>
4837
4838         * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
4839         associated with anonymous access to subprograms.
4840
4841 2011-08-02  Geert Bosch  <bosch@adacore.com>
4842
4843         * opt.ads
4844         (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
4845         (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
4846         * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
4847         (Add_Symbol_Definition): Move to switch-c.adb
4848         (Process_Command_Line_Symbol_Definitions): Adjust references to above.
4849         * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
4850         (Add_Symbol_Definition): Move to switch-c.adb.
4851         * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
4852         * sem_warn.adb
4853         (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
4854         Move to warnsw.adb.
4855         * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
4856         Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
4857         Move to warnsw.adb.
4858         * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
4859         (Add_Symbol_Definition): Moved from Prepcomp.
4860         * switch-c.ads: Update copyright notice. Use String_List instead of
4861         Argument_List, removing dependency on System.OS_Lib.
4862
4863 2011-08-02  Yannick Moy  <moy@adacore.com>
4864
4865         * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
4866         mode on initialization expression which does not respect SPARK
4867         restrictions.
4868         * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
4869         if the tree referenced by its argument represents an initialization
4870         expression in SPARK, suitable for initializing an object in an object
4871         declaration.
4872
4873 2011-08-02  Javier Miranda  <miranda@adacore.com>
4874
4875         * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
4876         internally generated access to subprogram with its associated protected
4877         subprogram type.
4878         * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
4879
4880 2011-08-02  Geert Bosch  <bosch@adacore.com>
4881
4882         * cstand.adb (Register_Float_Type): Print information about type to
4883         register, if the Debug_Flag_Dot_B is set.
4884         * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
4885         * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
4886         * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
4887         with a requested precision of more than Max_Digits digits and no more
4888         than Max_Base_Digits digits, if a range specification is present and the
4889         Predefined_Float_Types list has a suitable type to derive from.
4890         * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
4891         case of type completion with pragma Import
4892         * sem_prag.adb
4893         (Process_Import_Predefined_Type): Processing to complete a type
4894         with pragma Import. Currently supports floating point types only.
4895         (Set_Convention_From_Pragma): Do nothing without underlying type.
4896         (Process_Convention): Guard against absence of underlying type,
4897         which may happen when importing incomplete types.
4898         (Process_Import_Or_Interface): Handle case of importing predefined
4899         types. Tweak error message.
4900
4901 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
4902
4903         * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
4904         functions to previous change.  Reorganize code slightly.
4905
4906 2011-08-02  Geert Bosch  <bosch@adacore.com>
4907
4908         * back_end.ads (Register_Type_Proc): New call back procedure type for
4909         allowing the back end to provide information about available types.
4910         (Register_Back_End_Types): New procedure to register back end types.
4911         * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
4912         available types.
4913         * cstand.adb (Back_End_Float_Types): New list for floating point types
4914         supported by the back end.
4915         (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
4916         (Copy_Float_Type): New procedure to make new copies of predefined types.
4917         (Register_Float_Type): New call back procedure to populate the BEFT list
4918         (Find_Back_End_Float_Type): New procedure to find a BEFT by name
4919         (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
4920         (Create_Float_Types): New procedure to create entities for floating
4921         point types predefined in Standard, and put these and any remaining
4922         BEFTs on the Predefined_Float_Types list.
4923         * stand.ads (Predefined_Float_Types): New list for predefined floating
4924         point types that do not have declarations in package Standard.
4925
4926 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
4927
4928         * inline.adb (Get_Code_Unit_Entity): New local function.  Returns the
4929         entity node for the unit containing the parameter.
4930         (Add_Inlined_Body): Use it to find the unit containing the subprogram.
4931         (Add_Inlined_Subprogram): Likewise.
4932         * gcc-interface/Make-lang.in: Update dependencies.
4933
4934 2011-08-02  Thomas Quinot  <quinot@adacore.com>
4935
4936         * s-stusta.adb (Print): Make sure Pos is always initialized to a
4937         suitable value.
4938
4939 2011-08-02  Geert Bosch  <bosch@adacore.com>
4940
4941         * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
4942
4943 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
4944
4945         * sem_type.adb (Covers): Move trivial case to the top and reuse the
4946         computed value of Base_Type.
4947
4948 2011-08-02  Yannick Moy  <moy@adacore.com>
4949
4950         * restrict.adb (Check_Restriction): issue an error for any use of
4951         class-wide, even if the No_Dispatch restriction is not set.
4952         * sem_aggr.adb: Correct typos in comments and messages in formal mode
4953         * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
4954         when completing a private extension, the type named in the private part
4955         is not the same as that named in the visible part.
4956         * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
4957         of an inherited primitive operations of a tagged type or type extension
4958         that returns the tagged type.
4959         * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
4960         function which returns True for an implicit operation inherited by the
4961         derived type declaration for the argument type.
4962         (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
4963         order.
4964
4965 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
4966
4967         * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
4968         Process_Bounds, to perform analysis with expansion of a range or an
4969         expression that is the iteration scheme for a loop.
4970         (Analyze_Iterator_Specification): If domain of iteration is given by a
4971         function call with a controlled result, as is the case if call returns
4972         a predefined container, ensure that finalization actions are properly
4973         generated.
4974         * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
4975
4976 2011-08-02  Javier Miranda  <miranda@adacore.com>
4977
4978         * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
4979         * gcc-interface/Make-lang.in: Update dependencies.
4980
4981 2011-08-02  Javier Miranda  <miranda@adacore.com>
4982
4983         * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
4984         determine if the analysis is performed using N or Original_Node (N).
4985         * exp_util.adb (Side_Effect_Free): Code cleanup since the new
4986         functionality of routine Is_Variable avoids code duplication.
4987         * checks.adb (Determine_Range): Handle temporaries generated by
4988         Remove_Side_Effects.
4989
4990 2011-08-02  Javier Miranda  <miranda@adacore.com>
4991
4992         * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
4993         expansion of the condition. Required since the previous analysis was
4994         done with expansion disabled (see Resolve_Quantified_Expression) and
4995         hence checks were not inserted and record comparisons have not been
4996         expanded.
4997
4998 2011-08-02  Ed Falis  <falis@adacore.com>
4999
5000         * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
5001         Update header.
5002
5003 2011-08-02  Bob Duff  <duff@adacore.com>
5004
5005         * opt.ads: Minor comment fix.
5006
5007 2011-08-02  Bob Duff  <duff@adacore.com>
5008
5009         * sem_ch12.adb (Analyze_Package_Instantiation,
5010         Analyze_Subprogram_Instantiation): Turn off style checking while
5011         analyzing an instance. Whatever style checks that apply to the generic
5012         unit should apply, so it makes no sense to apply them in an instance.
5013         This was causing trouble when compiling an instance of a runtime
5014         unit that violates the -gnatyO switch.
5015         * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
5016         one of the two case statements, causing spurious errors.
5017
5018 2011-08-02  Robert Dewar  <dewar@adacore.com>
5019
5020         * uname.adb: Minor reformatting.
5021         * gnatcmd.adb: Minor reformatting.
5022         * exp_attr.adb: Minor reformatting.
5023
5024 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5025
5026         * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
5027         No_Dispatching_Calls, do not look for the Assign primitive, because
5028         predefined primitives are not created in this case.
5029
5030 2011-08-02  Bob Duff  <duff@adacore.com>
5031
5032         * stylesw.ads: Minor comment fixes.
5033
5034 2011-08-02  Robert Dewar  <dewar@adacore.com>
5035
5036         * freeze.adb (Add_To_Result): New procedure.
5037
5038 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
5039
5040         * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
5041         time, if the specific run-time routines for handling streams of strings
5042         are not available, use the default mechanism.
5043
5044 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
5045
5046         * s-regpat.ads: Fix typo.
5047
5048 2011-08-02  Vincent Celier  <celier@adacore.com>
5049
5050         * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
5051         not null, call it to create the in memory config project file without
5052         parsing an existing default config project file.
5053
5054 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
5055
5056         * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
5057
5058 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5059
5060         * sem_elim.adb: an abstract subprogram does not need an eliminate
5061         pragma for its descendant to be eliminable.
5062
5063 2011-08-02  Ed Falis  <falis@adacore.com>
5064
5065         * init.c: revert to handling before previous checkin for VxWorks
5066         * s-intman-vxworks.adb: delete unnecessary declarations related to
5067         using Ada interrupt facilities for handling signals.
5068         Delete Initialize_Interrupts. Use __gnat_install_handler instead.
5069         * s-intman-vxworks.ads: Import __gnat_install_handler as
5070         Initialize_Interrupts.
5071         * s-taprop-vxworks.adb: Delete Signal_Mask.
5072         (Abort_Handler): change construction of mask to unblock exception
5073         signals.
5074
5075 2011-08-02  Jerome Guitton  <guitton@adacore.com>
5076
5077         * a-except-2005.adb (Raise_From_Signal_Handler): Call
5078         Debug_Raise_Exception before propagation starts.
5079
5080 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
5081
5082         * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
5083         to Restriction_Check_Required.
5084         * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
5085         * sem_res.adb (Resolve_Call): Likewise.
5086         * sem_attr.adb (Check_Stream_Attribute): Likewise.
5087
5088 2011-08-02  Bob Duff  <duff@adacore.com>
5089
5090         * stylesw.ads: Update comment.
5091         * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
5092         * errout.ads: Remove obsolete comment.
5093
5094 2011-08-02  Javier Miranda  <miranda@adacore.com>
5095
5096         * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
5097         (Set_Is_Safe_To_Reevaluate): new procedure.
5098         * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
5099         assignment is allowed on safe-to-reevaluate variables.
5100         (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
5101         temporary created to remove side effects in expressions that use
5102         the secondary stack as safe-to-reevaluate.
5103         * exp_util.adb (Side_Effect_Free): Add missing code to handle well
5104         variables that are not true constants.
5105
5106 2011-08-02  Robert Dewar  <dewar@adacore.com>
5107
5108         * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
5109         sem_res.adb, sem_ch6.adb: Minor reformatting.
5110
5111 2011-08-02  Jerome Guitton  <guitton@adacore.com>
5112
5113         * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
5114
5115 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5116
5117         * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
5118         not set Overridden_Operation if subprogram is an initialization
5119         procedure.
5120
5121 2011-08-02  Yannick Moy  <moy@adacore.com>
5122
5123         * par-ch6.adb: Correct obsolete name in comments
5124         * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
5125         which takes two message arguments (existing function takes one), with
5126         second message used for continuation.
5127         * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
5128         block statements that originate from a source block statement, not
5129         generated block statements
5130         * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
5131         symmetry with procedure case
5132         * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
5133         function to issue an error in formal mode if a package specification
5134         contains more than one tagged type or type extension.
5135         * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
5136         parameters matching formals of tagged types are objects (or ancestor
5137         type conversions of objects), not general expressions. Issue an error
5138         on view conversions that are not involving ancestor conversion of an
5139         extended type.
5140         (Resolve_Type_Conversion): in formal mode, issue an error on the
5141         operand of an ancestor type conversion which is not an object
5142         * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
5143         procedure so that it works also for actuals of function calls
5144         (Is_Actual_Tagged_Parameter): new function which determines if its
5145         argument is an actual parameter of a formal of tagged type in a
5146         subprogram call
5147         (Is_SPARK_Object_Reference): new function which determines if the tree
5148         referenced by its argument represents an object in SPARK
5149
5150 2011-08-02  Robert Dewar  <dewar@adacore.com>
5151
5152         * sem_ch3.adb: Minor reformatting
5153         Minor comment addition
5154         Minor error msg text change
5155
5156 2011-08-02  Javier Miranda  <miranda@adacore.com>
5157
5158         * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
5159         function. Used to be more precise when we generate a variable plus one
5160         assignment to remove side effects in the evaluation of the Bound
5161         expressions.
5162         (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
5163         of the bound expression to force its re-analysis and thus expand the
5164         associated transient scope (if required). Code cleanup replacing the
5165         previous code that declared the constant entity by an invocation to
5166         routine Force_Evaluation which centralizes this work in the frontend.
5167
5168 2011-08-02  Robert Dewar  <dewar@adacore.com>
5169
5170         * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
5171         (Base_Type): Now uses improved Is_Base_Type function
5172         * einfo.ads (Base_Type): Inline this function
5173
5174 2011-08-02  Robert Dewar  <dewar@adacore.com>
5175
5176         * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
5177         (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
5178
5179 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
5180
5181         * gcc-interface/Make-lang.in: Update dependencies.
5182         * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
5183         targets.
5184
5185 2011-08-02  Yannick Moy  <moy@adacore.com>
5186
5187         * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
5188         non-simple expression used in delta constraint
5189         (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
5190         index constraint which is not a subtype mark
5191         * par.adb: With and use Restrict
5192         * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
5193         mode on component type which is not a subtype mark and default
5194         expression on component
5195         (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
5196         of string which does not have a lower index bound equal to 1
5197         (Array_Type_Declaration): issue an error in formal mode on index or
5198         component type which is not a subtype mark, and on aliased keyword on
5199         component
5200         (Derived_Type_Declaration): issue an error in formal mode on interface,
5201         limited or abstract type
5202         (Record_Type_Declaration): issue an error in formal mode on interface
5203         (Record_Type_Definition): issue an error in formal mode on tagged types
5204         and type extensions not declared in the specification of a library unit
5205         package; on null non-tagged record; on variant part
5206
5207 2011-08-02  Vincent Celier  <celier@adacore.com>
5208
5209         * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
5210         not declared for qualified library project when Library_Name is not
5211         declared, but Library_Dir is.
5212
5213 2011-08-02  Robert Dewar  <dewar@adacore.com>
5214
5215         * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
5216         pragmas (affects aspects [Component_]Default_Value
5217         (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
5218         component type for the resolution
5219
5220 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
5221
5222         * einfo.adb (Base_Type): Tune implementation for speed.
5223
5224 2011-08-02  Robert Dewar  <dewar@adacore.com>
5225
5226         * freeze.adb: Minor reformatting.
5227
5228 2011-08-02  Thomas Quinot  <quinot@adacore.com>
5229
5230         * scos.ads: Update comments.
5231
5232 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5233
5234         * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
5235         base type, because the parent may be a subtype of a private type whose
5236         convention is established in a private part.
5237
5238 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
5239
5240         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
5241         statement in a block when the expansion of the return expression has
5242         created a finalization chain.
5243         * freeze.adb (Freeze_Expression): Alphabetize all choices associated
5244         with the parent node.
5245         Add N_Extended_Return_Statement to handle the case where a transient
5246         object declaration appears in the Return_Object_Declarations list of
5247         an extended return statement.
5248
5249 2011-08-02  Matthew Gingell  <gingell@adacore.com>
5250
5251         * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
5252         unused parameter 'name'.
5253
5254 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5255
5256         * sem_elim.adb (Set_Eliminated): If the overridden operation is an
5257         inherited operation, check whether its alias, which is the source
5258         operastion that it renames, has been marked eliminated.
5259
5260 2011-08-02  Javier Miranda  <miranda@adacore.com>
5261
5262         * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
5263         in-mode parameter whose type is an access type since it can be used to
5264         modify its designated object. Enforce code that handles as safe an
5265         access type that is not access-to-constant but it is the result of a
5266         previous removal of side-effects.
5267         (Remove_Side_Effects): Minor code reorganization of cases which require
5268         no action. Done to incorporate documentation on new cases uncovered
5269         working in this ticket: no action needed if this routine was invoked
5270         too early and the nodes are not yet decorated.
5271         * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
5272         to routine Remove_Side_Effects by calls to Force_Evaluation since they
5273         were issued with actuals that are implicitly provided by
5274         Force_Evaluation.
5275
5276 2011-08-02  Robert Dewar  <dewar@adacore.com>
5277
5278         * sem_ch3.adb, sem_res.adb: Minor reformatting.
5279
5280 2011-08-02  Yannick Moy  <moy@adacore.com>
5281
5282         * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
5283         to issue an error in formal mode on attribute not supported in this mode
5284         (Analyze_Attribute): issue errors on standard attributes not supported
5285         in formal mode.
5286         * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
5287         comment, and issue error in formal mode on modulus which is not a power
5288         of 2.
5289         (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
5290         range.
5291         * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
5292         subtype mark.
5293         * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
5294         operator on modular type (except 'not').
5295
5296 2011-08-02  Robert Dewar  <dewar@adacore.com>
5297
5298         * gnat_rm.texi: Minor reformatting.
5299
5300 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
5301
5302         * s-osinte-linux.ads: Minor comment update and reformatting.
5303         * i-cexten.ads: Make this unit pure, as for its parent.
5304         Will allow its usage in more contexts if needed.
5305
5306 2011-08-02  Robert Dewar  <dewar@adacore.com>
5307
5308         * s-utf_32.ads: Minor comment fix.
5309
5310 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5311
5312         * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
5313         operation of a tagged synchronized type, handle the case where the
5314         controlling argument is overloaded.
5315
5316 2011-08-02  Yannick Moy  <moy@adacore.com>
5317
5318         * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
5319         Replace pragma SPARK_95 with pragma Restrictions (SPARK)
5320         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
5321         SPARK mode and formal verification mode on processing SPARK restriction
5322         * s-rident.ads (Restriction_Id): add SPARK restriction in those not
5323         requiring consistency checking.
5324
5325 2011-08-02  Robert Dewar  <dewar@adacore.com>
5326
5327         * sem_res.adb: Minor reformatting.
5328
5329 2011-08-02  Robert Dewar  <dewar@adacore.com>
5330
5331         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
5332         a-cforse.ads: Remove unneeded with of Ada.Containers
5333         Remove commented out pragma Inline's
5334         Move specifications of new subprograms to the actual specs
5335
5336 2011-08-02  Yannick Moy  <moy@adacore.com>
5337
5338         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
5339         a-cforse.ads: Update comments.
5340
5341 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5342
5343         * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
5344
5345 2011-08-02  Robert Dewar  <dewar@adacore.com>
5346
5347         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
5348         a-cforse.ads, a-cofove.ads: Minor reformatting.
5349
5350 2011-08-02  Claire Dross  <dross@adacore.com>
5351
5352         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
5353         a-cofove.ads: Add comments.
5354
5355 2011-08-02  Yannick Moy  <moy@adacore.com>
5356
5357         * gnat_rm.texi: Document formal containers.
5358
5359 2011-08-02  Emmanuel Briot  <briot@adacore.com>
5360
5361         * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
5362         are empty sections.
5363
5364 2011-08-02  Robert Dewar  <dewar@adacore.com>
5365
5366         * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
5367         reformatting.
5368
5369 2011-08-02  Robert Dewar  <dewar@adacore.com>
5370
5371         * aspects.adb: New aspects Default_Value and Default_Component_Value
5372         New format of Aspect_Names table checks for omitted entries
5373         * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
5374         handling of boolean aspects for derived types.
5375         New aspects Default_Value and Default_Component_Value
5376         New format of Aspect_Names table checks for omitted entries
5377         * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
5378         (Has_Default_Value): New flag
5379         (Has_Default_Component_Value): New flag
5380         (Has_Default_Value): New flag
5381         * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
5382         table.
5383         * par-prag.adb: New pragmas Default_Value and Default_Component_Value
5384         * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
5385         Default_Value and Default_Component_Value
5386         * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
5387         New aspects Default_Value and Default_Component_Value
5388         * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
5389         * sprint.adb: Print N_Aspect_Specification node when called from gdb
5390
5391 2011-08-02  Vincent Celier  <celier@adacore.com>
5392
5393         * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
5394         inherit library kind.
5395
5396 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5397
5398         * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
5399         Minor reformatting.
5400
5401 2011-08-02  Robert Dewar  <dewar@adacore.com>
5402
5403         * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
5404
5405 2011-08-02  Yannick Moy  <moy@adacore.com>
5406
5407         * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
5408
5409 2011-08-02  Robert Dewar  <dewar@adacore.com>
5410
5411         * impunit.adb: Add comment.
5412
5413 2011-08-02  Yannick Moy  <moy@adacore.com>
5414
5415         * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
5416         qualification of aggregates in formal mode
5417         (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
5418         another aggregate
5419         (Resolve_Aggregate): complete the test that an aggregate is adequately
5420         qualified in formal mode
5421
5422 2011-08-02  Pascal Obry  <obry@adacore.com>
5423
5424         * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
5425         * mlib-prj.adb: Supress warning when compiling binder generated file.
5426         (Build_Library): Supress all warnings when compiling the binder
5427         generated file.
5428
5429 2011-08-02  Yannick Moy  <moy@adacore.com>
5430
5431         * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
5432         from here...
5433         * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
5434         * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
5435         Add with/use clauses to make Check_Formal_Restriction visible
5436
5437 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5438
5439         * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
5440         in-parameters when type of the generic formal is private in the generic
5441         spec and non-private in the body.
5442
5443 2011-08-02  Claire Dross  <dross@adacore.com>
5444
5445         * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
5446         a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
5447         a-cofove.adb, a-cofove.ads: New files implementing formal containers.
5448         * impunit.adb, Makefile.rtl: Take new files into account.
5449
5450 2011-08-02  Robert Dewar  <dewar@adacore.com>
5451
5452         * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
5453         sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
5454
5455 2011-08-02  Yannick Moy  <moy@adacore.com>
5456
5457         * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
5458         formal mode
5459         * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
5460         matching static array bounds, taking into account the special case of
5461         string literals
5462         * sem_ch3.adb: Typo in comment.
5463
5464 2011-08-02  Yannick Moy  <moy@adacore.com>
5465
5466         * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
5467         which issues an error in formal mode if its argument node is originally
5468         from source
5469         * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
5470         has a discriminant specification so that it does not include the case
5471         of derived types
5472         (Derived_Type_Declaration): move here the test that a derived type has a
5473         discriminant specification
5474         * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
5475         first element of a component association before accessing its choices
5476         (presence of component association is not enough)
5477         * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
5478         declaration is a library item before accessing the next element in a
5479         list, as library items are not member of lists
5480         * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
5481         sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
5482         Check_Formal_Restriction whenever possible.
5483
5484 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5485
5486         * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
5487         reference when needed.
5488
5489 2011-08-02  Bob Duff  <duff@adacore.com>
5490
5491         * gnat_ugn.texi: Fix typo.
5492
5493 2011-08-02  Vincent Celier  <celier@adacore.com>
5494
5495         * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
5496         archive file name. Do not use the full path name of archives for Open
5497         VMS.
5498
5499 2011-08-02  Robert Dewar  <dewar@adacore.com>
5500
5501         * sem_ch12.adb, sem_ch11.adb: New calling sequence for
5502         Analyze_Aspect_Specifications
5503         * sem_ch13.adb
5504         (Analyze_Aspect_Specifications): New handling for boolean aspects
5505         * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
5506         * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
5507         sequence for Analyze_Aspect_Specifications
5508         * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
5509         * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
5510
5511 2011-08-02  Robert Dewar  <dewar@adacore.com>
5512
5513         * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
5514         aspects, since these no longer exist.
5515
5516 2011-08-02  Robert Dewar  <dewar@adacore.com>
5517
5518         * par-ch13.adb (Aspect_Specifications_Present): Always return false on
5519         semicolon, do not try to see if there are aspects following it.
5520         * par-ch3.adb (P_Declarative_Items): Better message for unexpected
5521         aspect spec.
5522
5523 2011-08-02  Robert Dewar  <dewar@adacore.com>
5524
5525         * sem_ch8.adb, aspects.ads: Minor reformatting.
5526
5527 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
5528
5529         * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
5530         * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
5531         extracted from...
5532         (Analyze_Aspect_Specifications): ...here.  Call above procedure.
5533
5534 2011-08-02  Yannick Moy  <moy@adacore.com>
5535
5536         * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
5537         mode on subprogram declaration outside of package specification, unless
5538         it is followed by a pragma Import
5539         * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
5540         Access_Type_Declaration): issue error in formal mode on access type
5541         (Analyze_Incomplete_Type_Decl): issue error in formal mode on
5542         incomplete type
5543         (Analyze_Object_Declaration): issue error in formal mode on object
5544         declaration which does not respect SPARK restrictions
5545         (Analyze_Subtype_Declaration): issue error in formal mode on subtype
5546         declaration which does not respect SPARK restrictions
5547         (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
5548         error in formal mode on digits or delta constraint
5549         (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
5550         decimal fixed point type
5551         (Derived_Type_Declaration): issue error in formal mode on derived type
5552         other than type extensions of tagged record types
5553         * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
5554         with check on access definition
5555         * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
5556         mode on protected definition.
5557         (Analyze_Task_Definition): issue error in formal mode on task definition
5558
5559 2011-08-02  Robert Dewar  <dewar@adacore.com>
5560
5561         * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
5562
5563 2011-08-02  Javier Miranda  <miranda@adacore.com>
5564
5565         * sem_ch6.adb (Can_Override_Operator): New function.
5566         (Verify_Overriding_Indicator): Add missing code to check overriding
5567         indicator in operators. Fixes regression.
5568         (Check_Overriding_Indicator): Minor reformating after replacing the
5569         code that evaluates if the subprogram can override an operator by
5570         invocations to the above new function.
5571         * einfo.adb
5572         (Write_Field26_Name): Add missing code to ensure that, following
5573         the documentation in einfo.ads, this field is not shown as attribute
5574         "Static_Initialization" on non-dispatching functions.
5575
5576 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
5577
5578         * sem_res.adb (Resolve_Call): A call to
5579         Ada.Real_Time.Timing_Events.Set_Handler violates restriction
5580         No_Relative_Delay (AI-0211) only when it sets a relative timing event,
5581         i.e., when the second parameter is of type Time_Span.
5582
5583 2011-08-02  Vincent Celier  <celier@adacore.com>
5584
5585         * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
5586         with an archive instead of -L<library dir> -l<library name>.
5587
5588 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5589
5590         * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
5591         mark the base types In_Use in addition to making the operations
5592         use_visible.
5593
5594 2011-08-02  Ed Falis  <falis@adacore.com>
5595
5596         * init.c: add and setup __gnat_signal_mask for the exception signals
5597         * s-inmaop-vxworks.adb: new file.
5598         * s-intman-vxworks.adb: remove unnecessary initializations and
5599         simplify remaining
5600         * s-intman-vxworks.ads: remove unnecessary variable
5601         * s-taprop-vxworks.adb: simplify signal initialization
5602
5603 2011-08-02  Robert Dewar  <dewar@adacore.com>
5604
5605         * sem_ch8.adb: Minor code reorganization, comment updates.
5606
5607 2011-08-02  Robert Dewar  <dewar@adacore.com>
5608
5609         * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
5610         * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
5611         here from Sem_Res.
5612         (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
5613         (Matching_Static_Array_Bounds): Moved here from Sem_Res
5614
5615 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5616
5617         * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
5618         * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
5619         * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
5620         use_type_clauses, to handle more efficiently use_type and use_all_type
5621         constructs.
5622         * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
5623         Ada2012 Use_All_Type clause.
5624         (Use_Class_Wide_Operations): new procedure.
5625
5626 2011-08-02  Robert Dewar  <dewar@adacore.com>
5627
5628         * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
5629         sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
5630         expression to expression function.
5631
5632 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5633
5634         * sem_ch4.adb: transform simple Ada2012 membership into equality only
5635         if types are compatible.
5636
5637 2011-08-02  Yannick Moy  <moy@adacore.com>
5638
5639         * sem_res.adb (Matching_Static_Array_Bounds): new function which
5640         returns True if its argument array types have same dimension and same
5641         static bounds at each index.
5642         (Resolve_Actuals): issue an error in formal mode on actuals passed as
5643         OUT or IN OUT paramaters which are not view conversions in SPARK.
5644         (Resolve_Arithmetic_Op): issue an error in formal mode on
5645         multiplication or division with operands of fixed point types which are
5646         not qualified or explicitly converted.
5647         (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
5648         Boolean or array type (except String) operands.
5649         (Resolve_Equality_Op): issue an error in formal mode on equality
5650         operators for array types other than String with non-matching static
5651         bounds.
5652         (Resolve_Logical_Op): issue an error in formal mode on logical operators
5653         for array types with non-matching static bounds. Factorize the code in
5654         Matching_Static_Array_Bounds.
5655         (Resolve_Qualified_Expression): issue an error in formal mode on
5656         qualified expressions for array types with non-matching static bounds.
5657         (Resolve_Type_Conversion): issue an error in formal mode on type
5658         conversion for array types with non-matching static bounds
5659
5660 2011-08-02  Robert Dewar  <dewar@adacore.com>
5661
5662         * par-ch10.adb: Minor code reorganization (use Nkind_In).
5663
5664 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5665
5666         * par-ch9.adb: save location of entry for proper error message.
5667
5668 2011-08-02  Javier Miranda  <miranda@adacore.com>
5669
5670         * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
5671         (Use_Full_View) which permits this routine to climb through the
5672         ancestors using the full-view of private parents.
5673         * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
5674         Use_Full_View to true in calls to Is_Ancestor.
5675         * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
5676         true in call to Is_Ancestor.
5677         * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
5678         Use_Full_View to true in call to Is_Ancestor.
5679         * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
5680         call to Is_Ancestor.
5681         * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
5682         Use_Full_View to true in calls to Is_Ancestor.
5683         * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
5684         Make_Select_Specific_Data_Table, Register_Primitive,
5685         Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
5686         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
5687         to true in call to Is_Ancestor.
5688         * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
5689         Use_Full_View to true in calls to Is_Ancestor.
5690         * exp_cg.adb
5691         (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
5692         (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
5693
5694 2011-08-02  Robert Dewar  <dewar@adacore.com>
5695
5696         * gnat_rm.texi: Minor reformatting.
5697         * sem_prag.adb: Minor reformatting.
5698
5699 2011-08-02  Tristan Gingold  <gingold@adacore.com>
5700
5701         * vms_data.ads: Add VMS qualifier for -gnateP.
5702
5703 2011-08-02  Robert Dewar  <dewar@adacore.com>
5704
5705         * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
5706         * par-ch7.adb (P_Package): Proper placement of aspects for package
5707         decl/instantiation.
5708         * par-endh.adb (Check_End): Ad Is_Sloc parameter
5709         (End_Statements): Add Is_Sloc parameterr
5710         * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
5711         (Check_End): Ad Is_Sloc parameter
5712         (End_Statements): Add Is_Sloc parameterr
5713
5714 2011-08-02  Vincent Celier  <celier@adacore.com>
5715
5716         * ug_words: Add VMS qualifier equivalent to -gnateP:
5717         /SYMBOL_PREPROCESSING.
5718
5719 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
5720
5721         * gnat-style.texi: For hexadecimal numeric literals the typical
5722         grouping of digits is 4 to represent 2 bytes.
5723         A procedure spec which is split into several lines is indented two
5724         characters.
5725
5726 2011-08-02  Yannick Moy  <moy@adacore.com>
5727
5728         * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
5729         * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
5730         (Resolve_Aggregate): issue errors in formal modes when aggregate is not
5731         properly qualified
5732         (Resolve_Array_Aggregate): issue errors in formal modes on non-static
5733         choice in array aggregate
5734         (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
5735         mark as ancestor
5736         (Resolve_Record_Aggregate): issue errors in formal modes on mixed
5737         positional and named aggregate for record, or others in record
5738         aggregate, or multiple choice in record aggregate
5739         * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
5740         array operands to logical operations AND, OR and XOR do not have the
5741         same static lower and higher bounds
5742         * sem_ch5.adb, sinfo.ads: Correct typos in comments
5743
5744 2011-08-01  Robert Dewar  <dewar@adacore.com>
5745
5746         * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
5747         Replaces Last_Source_Node_In_Sequence.
5748         * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
5749         * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
5750         parens and blank in string (this was inconsistently implemented).
5751         * errout.ads
5752         (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
5753         blank in string (this was inconsistently implemented).
5754         * gnat1drv.adb
5755         (Set_Global_Switches): Set formal mode switches appropriately
5756         * opt.ads, opt.adb: Formal mode is now global switches, more consistent
5757         * par-prag.adb
5758         (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
5759         call Set_Error_Msg_Lang to set "spark" as language name.
5760         * par.adb: Remove unnecessary call to set formal language for errout
5761         * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
5762         appropriately and call Set_Error_Msg_Lang to set "spark" as language
5763         name.
5764         * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
5765         calls to it, moved after resolution so that types are known
5766         * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
5767         result of concatenation is not of type String
5768         (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
5769         concatenation is not properly restricted
5770         * gnat_rm.texi: Add doc on pragma Spark_95.
5771         * gcc-interface/Makefile.in: Remove obsolete target pairs for
5772         Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
5773         * gcc-interface/Make-lang.in: Update dependencies.
5774
5775 2011-08-01  Javier Miranda  <miranda@adacore.com>
5776
5777         * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
5778         condition that detects if the overridden operation must replace an
5779         existing entity.
5780
5781 2011-08-01  Javier Miranda  <miranda@adacore.com>
5782
5783         * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
5784         code declarations inserted by Insert_Actions in each alternative of the
5785         N_Case_Expression node.
5786
5787 2011-08-01  Robert Dewar  <dewar@adacore.com>
5788
5789         * sem_ch6.adb: Minor code reorganization.
5790         * sem_util.adb: Minor reformatting.
5791
5792 2011-08-01  Pascal Obry  <obry@adacore.com>
5793
5794         * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
5795         * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
5796
5797 2011-08-01  Yannick Moy  <moy@adacore.com>
5798
5799         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
5800         literal or operator symbol which is prefixed
5801         * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
5802         mode on access attributes.
5803         * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
5804         that concatenation operands are properly restricted in formal mode
5805         (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
5806         Analyze_Concatenation_Operand. Issue an error in formal mode if the
5807         result of the concatenation has a type different from String.
5808         (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
5809         Analyze_Quantified_Expression, Analyze_Slice,
5810         Analyze_Null): issue an error in formal mode on unsupported constructs
5811         * sem_ch5.adb
5812         (Analyze_Block_Statement): only issue error on source block statement
5813         * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
5814         function which returns the last node in a list of nodes for which
5815         Comes_From_Source returns True, if any
5816         * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
5817         Last_Source_Node_In_Sequence
5818         * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
5819         Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
5820         mode on unsupported constructs
5821         * sem_ch9.adb Do not return after issuing error in formal mode, as the
5822         rest of the actions may be needed later on since the error is marked as
5823         not serious.
5824         * sinfo.ads: Typos in comments.
5825
5826 2011-08-01  Pascal Obry  <obry@adacore.com>
5827
5828         * projects.texi: Minor editing.
5829
5830 2011-08-01  Yannick Moy  <moy@adacore.com>
5831
5832         * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
5833         insertion character ~~
5834         * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
5835         (Set_Error_Msg_Lang): new procedure which fixes the language for use
5836         with insertion character ~~
5837         (Set_Msg_Text): treat insertion character ~~
5838         * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
5839         sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
5840         Formal_Error_Msg_... procedures by equivalent Error_Msg_...
5841         procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
5842         errors related to the formal language restriction not serious
5843         (insertion character |).
5844         * par.adb (Par): set formal language for error messages if needed
5845         * sem_ch6.adb (Check_Missing_Return): take into account possible
5846         generated statements at the end of the function
5847         * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
5848         enumeration value to define a new pragma SPARK_95
5849         * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
5850         SPARK_Version): new type and variables to store the SPARK version
5851         (none by default).
5852         (SPARK_Mode): return True when SPARK_Version is set
5853         * par-prag.adb: Correct indentation
5854         (Prag): take Pragma_SPARK_95 into account
5855         * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
5856         into account.
5857
5858 2011-08-01  Robert Dewar  <dewar@adacore.com>
5859
5860         * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
5861         sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
5862         sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
5863
5864 2011-08-01  Pascal Obry  <obry@adacore.com>
5865
5866         * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
5867         Target_Name to Get_Path call.
5868         (Parse_Single_Project): Likewise.
5869         (Post_Parse_Context_Clause): Likewise.
5870         * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
5871         Call Initialise_Project_Path with the proper Target_Name.
5872         (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
5873         search path.
5874         (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
5875         with the proper Target_Name.
5876         * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
5877         Part.Parse routine.
5878         (Parse_Project_And_Apply_Config): Likewise.
5879         * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
5880         This is fine as this part of the code is supporting only native
5881         compilation.
5882         * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
5883         is fine as this part of the code is supporting only native compilation.
5884
5885 2011-08-01  Yannick Moy  <moy@adacore.com>
5886
5887         * sem_util.adb (Enter_Name): issue error in formal mode on declaration
5888         of homonym, unless the homonym is one of the cases allowed in SPARK
5889         * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
5890         package declaration occurring after a body.
5891
5892 2011-08-01  Robert Dewar  <dewar@adacore.com>
5893
5894         * checks.adb, exp_ch4.adb: Minor reformatting.
5895
5896 2011-08-01  Javier Miranda  <miranda@adacore.com>
5897
5898         * einfo.ads (Access_Disp_Table): Fix documentation.
5899         (Dispatch_Table_Wrappers): Fix documentation.
5900
5901 2011-08-01  Pascal Obry  <obry@adacore.com>
5902
5903         * prj-env.adb, prj-env.ads: Minor reformatting.
5904
5905 2011-08-01  Yannick Moy  <moy@adacore.com>
5906
5907         * sem_util.ads, sem_util.adb, par.adb, par_util.adb
5908         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
5909         procedures out of these packages.
5910         * errout.ads, errout.adb
5911         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
5912         procedures in of this package
5913         (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
5914         * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
5915         on misplaced later vs initial declarations, like in Ada 83
5916         * sem_attr.adb (Processing for Analyze_Attribute): issue error in
5917         formal mode on attribute of private type whose full type declaration
5918         is not visible
5919         * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
5920         package declaration inside a package specification
5921         (Analyze_Full_Type_Declaration): issue error in formal mode on
5922         controlled type or discriminant type
5923         * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
5924         user-defined operator means that it should come from the source
5925         (New_Overloaded_Entity): issue error in formal mode on overloaded
5926         entity.
5927         * sem_ch6.ads, sem_ch13.ads: typos in comments.
5928
5929 2011-08-01  Thomas Quinot  <quinot@adacore.com>
5930
5931         * atree.adb: Minor reformatting.
5932         * checks.adb: Minor reformatting.
5933
5934 2011-08-01  Vincent Celier  <celier@adacore.com>
5935
5936         * s-parame-vms-ia64.ads: Fix typo in comment
5937         Minor reformatting
5938         * s-parame-vms-restrict.ads: Removed, unused.
5939
5940 2011-08-01  Javier Miranda  <miranda@adacore.com>
5941
5942         * exp_ch3.adb
5943         (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
5944         * sem_ch3.adb
5945         (Constrain_Index): Remove side effects in the evaluation of the bounds.
5946         * sem_ch3.ads, sem_ch3.adb
5947         (Is_Constant_Bound): New extended version of the subprogram that was
5948         previously located inside function Exp_Ch3.Is_Variable_Size_Array.
5949         Moved here since it is shared by routines of sem_ch3 and exp_ch3.
5950         * sem_aux.ads (Constant_Value): Fix typo in comment.
5951         * checks.adb (Generate_Index_Checks): New implementation which, for
5952         array objects with constant bounds, generates the runtime check
5953         referencing the bounds of the array type. For other cases this routine
5954         provides its previous behavior obtaining such values from the array
5955         object.
5956         * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
5957         parent type.
5958         * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
5959         we cannot have semantic interpretations of the new node.
5960
5961 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
5962
5963         * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
5964         expressions.
5965
5966 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
5967
5968         * sem_ch8.adb: Minor code editing.
5969         * s-vxwext.adb: Remove trailing space.
5970         * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
5971         consistency with other files.
5972
5973 2011-08-01  Thomas Quinot  <quinot@adacore.com>
5974
5975         * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
5976
5977 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
5978
5979         * par-ch10.adb: reject parameterized expressions as compilation unit.
5980         * sem_ch4.adb: handle properly conditional expression with overloaded
5981         then_clause and no else_clause.
5982
5983 2011-08-01  Tristan Gingold  <gingold@adacore.com>
5984
5985         * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
5986         like done by System.Aux_DEC.
5987         * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
5988
5989 2011-08-01  Yannick Moy  <moy@adacore.com>
5990
5991         * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
5992         missing label at end of declaration (subprogram or package)
5993         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
5994         of positional and named parameter association
5995         * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
5996         Error_Msg_SP which adds a prefix to the error message giving the name
5997         of the formal language analyzed
5998         * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
5999         access result type in subprogram, unconstrained array as result type,.
6000         (Analyze_Subprogram_Declaration): issue an error in formal mode for null
6001         procedure
6002         * sem_ch8.adb: Code clean up.
6003
6004 2011-08-01  Javier Miranda  <miranda@adacore.com>
6005
6006         * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
6007         * einfo.ads (Access_Disp_Table): Fix documentation.
6008         (Dispatch_Table_Wrappers): Fix documentation.
6009         * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
6010         Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
6011         to enforce the documentation of this attribute.
6012         (Set_Is_Interface): Cleanup the assertion.
6013         * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
6014         the Underlying_Type entity before reading attribute Access_Disp_Table.
6015         * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
6016         Locate the Underlying_Type before reading attribute Access_Disp_Table.
6017         * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
6018         the Underlying_Type entity before reading attribute Access_Disp_Table.
6019         * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
6020         Locate the Underlying_Type entity before reading attribute
6021         Access_Disp_Table.
6022
6023 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
6024
6025         * s-poosiz.ads: Additional overriding indicators.
6026
6027 2011-08-01  Yannick Moy  <moy@adacore.com>
6028
6029         * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
6030         formal mode.
6031         (Analyze_Iteration_Scheme): issue error in formal mode when loop
6032         parameter specification does not include a subtype mark.
6033         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
6034         formal mode on abstract subprogram.
6035         (Analyze_Subprogram_Specification): issue error in formal mode on
6036         user-defined operator.
6037         (Process_Formals): issue error in formal mode on access parameter and
6038         default expression.
6039         * sem_ch9.adb (Analyze_Abort_Statement,
6040         Analyze_Accept_Statement, Analyze_Asynchronous_Select,
6041         Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
6042         Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
6043         Analyze_Requeue, Analyze_Selective_Accept,
6044         Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
6045         * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
6046         issue error in formal mode on user-defined raise statement.
6047
6048 2011-08-01  Thomas Quinot  <quinot@adacore.com>
6049
6050         * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
6051         declaration being hidden when overriding an implicit inherited
6052         subprogram.
6053         * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
6054         (-gnats), do not complain about a source file that contains only a
6055         pragma No_Body.
6056
6057 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
6058
6059         * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
6060         variable if already set.
6061
6062 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
6063
6064         * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
6065         g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
6066         s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
6067         g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
6068         g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
6069         g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
6070         g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
6071         g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
6072         g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
6073         g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
6074         g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
6075         s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
6076         g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
6077         s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
6078         g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
6079         g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
6080         g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
6081         g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
6082         g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
6083         g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
6084         s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
6085         s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
6086         a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
6087         s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
6088         s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
6089         g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
6090         g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
6091         g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
6092         g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
6093         g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
6094         g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
6095         s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
6096         s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
6097         g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
6098         g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
6099         s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
6100         s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
6101         g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
6102         g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
6103         g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
6104         s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
6105         g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
6106         g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
6107         g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
6108         s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
6109         g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
6110         g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
6111         g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
6112         s-osinte-mingw.ads: Update to GPLv3 run-time license.
6113         Use GNAT instead of GNARL.
6114
6115 2011-08-01  Bob Duff  <duff@adacore.com>
6116
6117         * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
6118         a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
6119         a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
6120         reformatting.
6121
6122 2011-08-01  Yannick Moy  <moy@adacore.com>
6123
6124         * debug.adb (d.D) reverve flag for the SPARK mode
6125         (d.E) reverve flag for SPARK generation mode
6126         (d.F) reverve flag for Why generation mode
6127         * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
6128         ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode):  New
6129         functions which return True when the corresponding modes are set
6130         (Formal_Language): return "spark" or "alfa" when in formal verification
6131         mode.
6132         * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
6133         Error_Msg to prefix the error message with a tag giving the formal
6134         language
6135         (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
6136         message with a tag giving the formal language
6137         * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
6138         block statement
6139         (Analyze_Case_Statement): issue error in formal mode on case statement
6140         with a single "others" case alternative
6141         (Analyze_Exit_Statement): issue errors in formal mode on exit
6142         statements which do not respect SPARK restrictions
6143         (Analyze_Goto_Statement): issue error in formal mode on goto statement
6144         (Check_Unreachable_Code): always issue an error (not a warning) in
6145         formal mode on unreachable code (concerns both code after an infinite
6146         loop and after an unconditional jump, both not allowed in SPARK)
6147         * sem_ch6.adb (Analyze_Return_Statement): add call to
6148         Set_Return_Present for a procedure containing a return statement
6149         (already done for functions in Analyze_Function_Return)
6150         (Analyze_Function_Return): issue error in formal mode on extended
6151         return or if return is not last statement in function
6152         (Check_Missing_Return): issue error in formal mode if function does
6153         not end with return or if procedure contains a return
6154         * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
6155         function to detect if there is an inner scope of its parameter S which
6156         is a loop.
6157
6158 2011-08-01  Thomas Quinot  <quinot@adacore.com>
6159
6160         * sem_ch6.ads: Minor reformatting.
6161
6162 2011-08-01  Javier Miranda  <miranda@adacore.com>
6163
6164         * sem_util.adb (Abstract_Interface_List): Complete condition when
6165         processing private type declarations to avoid reading unavailable
6166         attribute.
6167         (Is_Synchronized_Tagged_Type): Complete condition when processing
6168         private extension declaration nodes to avoid reading unavailable
6169         attribute.
6170
6171 2011-08-01  Thomas Quinot  <quinot@adacore.com>
6172
6173         * sem_ch3.adb: Minor reformatting.
6174
6175 2011-08-01  Thomas Quinot  <quinot@adacore.com>
6176
6177         * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
6178         i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
6179         s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
6180         s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
6181         for VMS, instead parametrize the common implementation with
6182         System.Parameters declarations.
6183
6184 2011-08-01  Eric Botcazou  <ebotcazou@adacore.com>
6185
6186         * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
6187
6188 2011-08-01  Tristan Gingold  <gingold@adacore.com>
6189
6190         * seh_init.c: Fix SEH handler installation on win64.
6191
6192 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
6193
6194         * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
6195         double analysis of an anonymous access to subprogram, because it can
6196         lead to improper sharing of profiles and a back-end crash.
6197
6198 2011-08-01  Robert Dewar  <dewar@adacore.com>
6199
6200         * make.adb, sem_ch4.adb: Minor reformatting.
6201         * gcc-interface/Make-lang.in: Update dependencies.
6202         * sem_util.adb, exp_ch5.adb: Minor reformatting.
6203
6204 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
6205
6206         * gnat_rm.texi: Fix definition of Long_Integer.
6207
6208 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
6209
6210         * exp_aggr.adb: check limit size of static aggregate unconditionally,
6211         to prevent storage exhaustion.
6212         * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
6213         finalized is a function body, insert the cleanup code before the final
6214         return statement, to prevent spurious warnings.
6215         * s-pooglo.ads: add overriding indicator.
6216
6217 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
6218
6219         * sem_ch4.adb (Operator_Check): improve error message when both a
6220         with_clause and a use_clause are needed to make operator usage legal.
6221         * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
6222         determine whether a compilation unit is visible within an other,
6223         either through a with_clause in the current unit, or a with_clause in
6224         its library unit or one one of its parents.
6225
6226 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
6227
6228         * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
6229         over an arbitrary expression of an array or container type.
6230         * lib-xref.adb: clarify comment.
6231
6232 2011-08-01  Bob Duff  <duff@adacore.com>
6233
6234         * einfo.ads: Minor reformatting.
6235         * debug.adb: Minor comment improvement.
6236
6237 2011-08-01  Javier Miranda  <miranda@adacore.com>
6238
6239         * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
6240         consider hidden subprograms as valid candidates.
6241
6242 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
6243
6244         * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
6245
6246 2011-08-01  Vasiliy Fofanov  <fofanov@adacore.com>
6247
6248         * gnat_ugn.texi: Fix typo.
6249
6250 2011-08-01  Robert Dewar  <dewar@adacore.com>
6251
6252         * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
6253         lib-xref.adb: Minor reformatting
6254
6255 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
6256
6257         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
6258         when to generate a call to Move_Final_List.
6259         (Has_Controlled_Parts): Remove this function.
6260
6261 2011-08-01  Geert Bosch  <bosch@adacore.com>
6262
6263         * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
6264         "," in choice list.
6265
6266 2011-08-01  Thomas Quinot  <quinot@adacore.com>
6267
6268         * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
6269         explicit raise of a predefined exception as Comes_From_Source if the
6270         original N_Raise_Statement comes from source.
6271
6272 2011-08-01  Robert Dewar  <dewar@adacore.com>
6273
6274         * sinfo.ads: Add comment.
6275         * sem_ch6.adb: Minor reformatting.
6276
6277 2011-08-01  Robert Dewar  <dewar@adacore.com>
6278
6279         * freeze.adb (Freeze_Entity): Refine check for bad component size
6280         clause to avoid rejecting confirming clause when atomic/aliased present.
6281
6282 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
6283
6284         * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
6285         better determine whether an entity reference is a write.
6286         * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
6287         subcomponent.
6288         * lib-xref.adb (Output_References): Do no suppress a read reference at
6289         the same location as an immediately preceeding modify-reference, to
6290         handle properly in-out actuals.
6291
6292 2011-08-01  Tristan Gingold  <gingold@adacore.com>
6293
6294         * env.c (__gnat_setenv) [VMS]: Refine previous change.
6295
6296 2011-08-01  Quentin Ochem  <ochem@adacore.com>
6297
6298         * i-cstrin.adb (New_String): Changed implementation, now uses only the
6299         heap to compute the result.
6300
6301 2011-08-01  Robert Dewar  <dewar@adacore.com>
6302
6303         * atree.ads: Minor reformatting.
6304
6305 2011-08-01  Emmanuel Briot  <briot@adacore.com>
6306
6307         * g-expect.adb (Get_Command_Output): Fix memory leak.
6308
6309 2011-08-01  Geert Bosch  <bosch@adacore.com>
6310
6311         * cstand.adb (P_Float_Type): New procedure to print the definition of
6312         predefined fpt types.
6313         (P_Mixed_Name): New procedure to print a name using mixed case
6314         (Print_Standard): Use P_Float_Type for printing floating point types
6315         * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
6316         precision IEEE float.
6317
6318 2011-08-01  Thomas Quinot  <quinot@adacore.com>
6319
6320         * sem_ch3.adb: Minor reformatting.
6321
6322 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
6323
6324         * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
6325         the completion of a generic function, insert the new body rather than
6326         rewriting the original.
6327
6328 2011-08-01  Yannick Moy  <moy@adacore.com>
6329
6330         * sinfo.ads, errout.ads: Typos in comments.
6331
6332 2011-08-01  Robert Dewar  <dewar@adacore.com>
6333
6334         * par-endh.adb: Minor reformatting.
6335
6336 2011-08-01  Robert Dewar  <dewar@adacore.com>
6337
6338         * aspects.ads, aspects.adb: Add aspects for library unit pragmas
6339         (Pre_Post_Aspects): New subtype.
6340         * par-ch12.adb (P_Generic): New syntax for aspects in packages
6341         * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
6342         * par-ch7.adb (P_Package): Remove Decl parameter
6343         (P_Package): Handle new syntax for aspects (before IS)
6344         * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
6345         new aspect syntax
6346         (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
6347         * par.adb (P_Aspect_Specifications): Add Semicolon parameter
6348         (P_Package): Remove Decl parameter
6349         * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
6350         aspects
6351         * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
6352         specs
6353         * sem_util.ads, sem_util.adb (Static_Boolean): New function
6354         * sinfo.ads: Document new syntax for aspects in packages etc.
6355         * sprint.adb: Handle new syntax of aspects before IS in package
6356
6357 2011-08-01  Thomas Quinot  <quinot@adacore.com>
6358
6359         * atree.ads: Minor reformatting.
6360         * sem_prag.adb: Minor reformatting.
6361
6362 2011-08-01  Robert Dewar  <dewar@adacore.com>
6363
6364         * exp_util.adb (Insert_Actions): Fix error in handling Actions for
6365         case expr alternative.
6366
6367 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
6368
6369         * sem_ch12.adb: Fix typo.
6370
6371 2011-08-01  Geert Bosch  <bosch@adacore.com>
6372
6373         * sem_prag.adb (Check_No_Link_Name): New procedure.
6374         (Process_Import_Or_Interface): Use Check_No_Link_Name.
6375         * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
6376         instead of Standard_Long_Long_Float_Size global. Preparation for
6377         eventual removal of per type constants.
6378         * exp_util.ads (Get_Stream_Size): New function returning the stream
6379         size value of subtype E.
6380         * exp_util.adb (Get_Stream_Size): Implement new function.
6381         * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
6382         function.
6383         * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
6384         * einfo.adb:
6385         (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
6386
6387 2011-08-01  Geert Bosch  <bosch@adacore.com>
6388
6389         * cstand.adb: Fix comments.
6390         * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
6391         count of arguments.
6392
6393 2011-08-01  Robert Dewar  <dewar@adacore.com>
6394
6395         * exp_ch4.adb, sem_cat.adb: Minor reformatting.
6396
6397 2011-08-01  Geert Bosch  <bosch@adacore.com>
6398
6399         * atree.ads: Fix comment.
6400
6401 2011-08-01  Robert Dewar  <dewar@adacore.com>
6402
6403         * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
6404         * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
6405         * par.adb: Add with for Namet.Sp.
6406         * par-tchk.adb: Minor reformatting.
6407
6408 2011-08-01  Vincent Celier  <celier@adacore.com>
6409
6410         * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
6411         (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
6412         of the init procedure of a SAL.
6413         * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
6414         New procedure.
6415
6416 2011-08-01  Thomas Quinot  <quinot@adacore.com>
6417
6418         * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
6419         reformatting.
6420
6421 2011-08-01  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6422
6423         * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
6424
6425 2011-08-01  Thomas Quinot  <quinot@adacore.com>
6426
6427         * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
6428         conformant with its spec (return True only for types that have
6429         an overriding Initialize primitive operation that prevents them from
6430         having preelaborable initialization).
6431         * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
6432         initialization for controlled types in Ada 2005 or later mode.
6433
6434 2011-08-01  Robert Dewar  <dewar@adacore.com>
6435
6436         * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
6437         Postcondition.
6438         (Same_Aspect): New function.
6439         * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
6440         Type_Invariant, Precondition, Postcondition.
6441         * snames.ads-tmpl: Add Name_Type_Invariant.
6442
6443 2011-08-01  Robert Dewar  <dewar@adacore.com>
6444
6445         * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
6446         here.
6447         (Freeze_All_Ent): Fix error in handling inherited aspects.
6448         * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
6449         already analyzed, but don't skip entire processing of a declaration,
6450         that's wrong in some cases of declarations being rewritten.
6451         (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
6452         Don't delay for integer, string literals
6453         Treat predicates in usual manner for delay, remove special case code,
6454         not needed.
6455         (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
6456         (Build_Predicate_Function): Update saved expression in aspect
6457         (Build_Invariant_Procedure): Update saved expression in aspect
6458         * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
6459         of replacement of discriminant references if the reference is simple.
6460
6461 2011-08-01  Robert Dewar  <dewar@adacore.com>
6462
6463         * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
6464         * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
6465         Static_Predicate and Dynamic_Predicate.
6466         (Build_Predicate_Function): Add processing for Static_Predicate
6467         and Dynamic_Predicate.
6468         * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
6469         (From_Static_Predicate): New flag
6470         * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
6471
6472 2011-08-01  Robert Dewar  <dewar@adacore.com>
6473
6474         * usage.adb: Documentation cleanup for Ada version modes in usage.
6475         * expander.adb: Minor reformatting.
6476
6477 2011-08-01  Robert Dewar  <dewar@adacore.com>
6478
6479         * atree.ads: Minor comment fix.
6480         * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
6481         a-witeio.ads, sem_prag.adb: Minor reformatting.
6482
6483 2011-08-01  Doug Rupp  <rupp@adacore.com>
6484
6485         * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
6486         pointers. Use descrip.h header file for convenience. Add some
6487         comments.
6488
6489 2011-08-01  Robert Dewar  <dewar@adacore.com>
6490
6491         * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
6492         (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
6493         * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
6494         New procedure.
6495         (Check_Aspect_At_End_Of_Declarations): New procedure
6496         (Analye_Aspect_Specification): Minor changes for above procedures
6497         * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
6498         specification node as well.
6499
6500 2011-08-01  Pascal Obry  <obry@adacore.com>
6501
6502         * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
6503         Windows files. Use GetFilesAttributes() in this case to check for file
6504         existence instead of returning with an error code.
6505
6506 2011-08-01  Vincent Celier  <celier@adacore.com>
6507
6508         * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
6509         High is above Source length.
6510
6511 2011-08-01  Robert Dewar  <dewar@adacore.com>
6512
6513         * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
6514
6515 2011-08-01  Robert Dewar  <dewar@adacore.com>
6516
6517         * aspects.ads (Boolean_Aspects): New subtype.
6518         * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
6519         for derived types in cases where the parent type and derived type have
6520         aspects.
6521         * freeze.adb (Freeze_Entity): Fix problems in handling derived type
6522         with aspects when parent type also has aspects.
6523         (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
6524         boolean expression at this point).
6525         * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
6526         accordance with final decision on the Ada 2012 feature.
6527         * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
6528
6529 2011-08-01  Matthew Heaney  <heaney@adacore.com>
6530
6531         * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
6532
6533 2011-08-01  Pascal Obry  <obry@adacore.com>
6534
6535         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
6536         Fix Replace_Slice when High is above current string size.
6537         (Replace_Slice): Fix DL computation when High is above current
6538         string length.
6539
6540 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
6541
6542         * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
6543
6544 2011-08-01  Matthew Heaney  <heaney@adacore.com>
6545
6546         * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
6547         of node.
6548
6549 2011-08-01  Pascal Obry  <obry@adacore.com>
6550
6551         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
6552         reformatting.
6553
6554 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
6555
6556         * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
6557         access to protected subprograms in generic bodies.
6558         * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
6559         protected type, indicate that the convention of the subprogram is
6560         Convention_Protected, because it may be used in subsequent declarations
6561         within the protected declaration.
6562
6563 2011-08-01  Vincent Celier  <celier@adacore.com>
6564
6565         * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
6566         and "final" procedures when the name of the library is "ada", to avoid
6567         duplicate symbols "adainit" and "adafinal" in executables.
6568
6569 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
6570
6571         * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
6572         quantified expression that appears within a postcondition and uses the
6573         Ada2012 'Result attribute.
6574
6575 2011-07-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6576
6577         * init.c (__gnat_error_handler): Cast reason to int.
6578         (__gnat_install_handler): Explain sa_sigaction use.
6579
6580 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
6581
6582         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
6583         subprogram has copy-in copy-out parameters, try to promote the mode of
6584         the return type if it is passed in registers.
6585
6586 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
6587
6588         * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
6589         left operand as addressable.
6590
6591 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
6592
6593         * gcc-interface/gigi.h (build_function_stub): Remove.
6594         (build_return_expr): Likewise.
6595         (convert_vms_descriptor): Declare.
6596         * gcc-interface/utils.c (convert_vms_descriptor): Make global.
6597         (build_function_stub): Move to...
6598         * gcc-interface/utils2.c (build_return_expr): Move to...
6599         * gcc-interface/trans.c (build_function_stub): ...here.
6600         (build_return_expr): ...here.
6601         (Subprogram_Body_to_gnu): Add local variable for language_function.
6602         Disconnect the parameter attributes cache, if any, once done with it.
6603         Call end_subprog_body only after setting the end_locus.
6604         Build the stub associated with the function, if any, at the very end.
6605         (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
6606         variables and streamline control flow.
6607
6608 2011-07-23  Arnaud Charlet  <charlet@adacore.com>
6609
6610         PR ada/49819
6611         * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
6612         g-trasym-dwarf.adb.
6613
6614 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6615
6616         PR bootstrap/49794
6617         * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
6618         Assign to act.sa_sigaction.
6619         * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
6620         current->return_address to char * before arithmetic.
6621
6622 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6623
6624         * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
6625         Correct argument types.
6626         Extract code from reason.
6627         (__gnat_install_handler): Assign to act.sa_sigaction.
6628
6629 2011-07-21  Eric Botcazou  <ebotcazou@adacore.com>
6630
6631         * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
6632         (GNAT1_OBJS): ...here.
6633
6634 2011-07-15  Eric Botcazou  <ebotcazou@adacore.com>
6635
6636         PR ada/48711
6637         * g-socthi-mingw.adb (Fill): Fix formatting.
6638
6639         * gcc-interface/gigi.h: Move around comment.
6640
6641 2011-07-14  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
6642
6643         PR ada/46350
6644         * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
6645
6646 2011-07-14  Florian Weimer  <fw@deneb.enyo.de>
6647
6648         PR ada/48711
6649         * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
6650
6651 2011-07-13  Eric Botcazou  <ebotcazou@adacore.com>
6652
6653         * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
6654         range comparison if Pmode is SImode.
6655
6656 2011-07-12  Laurent GUERBY  <laurent@guerby.net>
6657             Eric Botcazou  <ebotcazou@adacore.com>
6658
6659         * adadecode.c: Wrap up in extern "C" block.
6660         * adadecode.h: Likewise.
6661         * adaint.c: Likewise.  Remove 'const' keyword.
6662         * adaint.h: Likewise.
6663         * argv.c: Likewise.
6664         * atree.h: Likewise.
6665         * cio.c: Likewise.
6666         * cstreams.c: Likewise.
6667         * env.c: Likewise.
6668         * exit.c: Likewise.
6669         * fe.h: Likewise.
6670         * final.c: Likewise.
6671         * init.c: Likewise.
6672         * initialize.c: Likewise.
6673         * link.c: Likewise.
6674         * namet.h: Likewise.
6675         * nlists.h: Likewise.
6676         * raise.c: Likewise.
6677         * raise.h: Likewise.
6678         * repinfo.h: Likewise.
6679         * seh_init.c: Likewise.
6680         * targext.c: Likewise.
6681         * tracebak.c: Likewise.
6682         * uintp.h: Likewise.
6683         * urealp.h: Likewise.
6684         * xeinfo.adb: Wrap up generated C code in extern "C" block.
6685         * xsinfo.adb: Likewise.
6686         * xsnamest.adb: Likewise.
6687         * gcc-interface/gadaint.h: Wrap up in extern "C" block.
6688         * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
6689         * gcc-interface/misc.c: Likewise.
6690         * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
6691         (GNAT1_C_OBJS): Remove ada/b_gnat1.o.  List ada/seh_init.o and
6692         ada/targext.o here...
6693         (GNAT_ADA_OBJS): ...and not here.
6694         (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
6695         (GNATBIND_OBJS): Reorder.
6696
6697 2011-07-07  Richard Henderson  <rth@redhat.com>
6698
6699         * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
6700         dwarf2out_frame_init.
6701
6702 2011-07-07  Eric Botcazou  <ebotcazou@adacore.com>
6703
6704         * gcc-interface/misc.c (gnat_init): Tweak previous change.
6705
6706 2011-07-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6707
6708         PR target/39150
6709         * gcc-interface/Makefile.in: Handle x86_64-solaris2.
6710
6711 2011-07-06  Richard Guenther  <rguenther@suse.de>
6712
6713         * gcc-interface/misc.c (gnat_init): Merge calls to
6714         build_common_tree_nodes and build_common_tree_nodes_2.
6715         Re-initialize boolean_false_node.
6716
6717 2011-07-02  Eric Botcazou  <ebotcazou@adacore.com>
6718             Olivier Hainque  <hainque@adacore.com>
6719             Nicolas Setton  <setton@adacore.com>
6720
6721         * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
6722         the type according to the ARTIFICIAL_P parameter.
6723         (create_type_decl): Likewise.
6724         (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
6725
6726 2011-07-01  Eric Botcazou  <ebotcazou@adacore.com>
6727
6728         * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
6729         (gnatbind): Likewise.
6730
6731 2011-06-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6732
6733         * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
6734
6735 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
6736
6737         * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
6738         local variable throughout.  Remove useless call to Base_Type.
6739         (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
6740         Take it also into account for the volatileness of the field.  Set the
6741         TREE_SIDE_EFFECTS flag as well in this case.  Reorder some warnings.
6742
6743 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
6744
6745         * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
6746         on a dereference built for a by-ref object if it has an address clause.
6747
6748 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
6749
6750         * einfo.ads (Address_Taken): Document use for the second argument of
6751         Asm_Input and Asm_Output attributes.
6752         * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
6753         argument is an entity name, then set Address_Taken on it.
6754         <Attribute_Asm_Output>: Likewise.
6755         * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
6756         Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
6757         (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
6758         memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
6759
6760 2011-06-16  Joern Rennecke  <joern.rennecke@embecosm.com>
6761
6762         PR middle-end/46500
6763         * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
6764
6765 2011-06-14  Joseph Myers  <joseph@codesourcery.com>
6766
6767         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
6768         (ada/utils.o): Update dependencies.
6769         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
6770         ../../../libcpp/libcpp.a.
6771         * gcc-interface/utils.c: Include common/common-target.h.
6772         (process_attributes): Use targetm_common.have_named_sections.
6773
6774 2011-06-07  Richard Guenther  <rguenther@suse.de>
6775
6776         * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
6777         set_sizetype.
6778
6779 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
6780
6781         * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
6782         TREE_THIS_NOTRAP flag.
6783
6784 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
6785
6786         * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
6787         Fix thinko.
6788
6789 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
6790
6791         * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
6792         constants whose full view has discriminants specially.
6793
6794 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
6795
6796         * gcc-interface/utils.c: Include diagnostic.h.
6797         (gnat_write_global_declarations): Output debug information for all
6798         global type declarations before finalizing the compilation unit.
6799         * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
6800
6801 2011-05-25  Jakub Jelinek  <jakub@redhat.com>
6802
6803         * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
6804
6805 2011-05-25  Kai Tietz  <ktietz@redhat.com>
6806
6807         * adaint.c (__gnat_to_canonical_file_list_next): Use array
6808         initialization instead of const/none-const pointer assignment.
6809
6810 2011-05-24  Joseph Myers  <joseph@codesourcery.com>
6811
6812         * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
6813         $(EXTRA_GNAT1_OBJS).
6814         (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
6815         (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
6816         (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
6817         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
6818         libcommon-target.a instead of prefix.o.
6819
6820 2011-05-21  Joseph Myers  <joseph@codesourcery.com>
6821
6822         PR ada/49097
6823         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
6824
6825 2011-05-20  Joseph Myers  <joseph@codesourcery.com>
6826
6827         * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
6828         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
6829         instead of version.o.
6830
6831 2011-05-18  Kai Tietz <ktietz@redhat.com>
6832
6833         * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
6834         boolean_false_node instead of integer_zero_node.
6835         (convert_with_check): Likewise.
6836         * gcc-interface/decl.c (choices_to_gnu): Likewise.
6837
6838 2011-05-12  Eric Botcazou  <ebotcazou@adacore.com>
6839
6840         * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
6841         type of the parameter is an unconstrained array, convert the actual to
6842         the type of the formal in the In Out and Out cases as well.
6843
6844 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
6845
6846         * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
6847         call build_function_type_array or build_varargs_function_type_array
6848         instead.
6849         (create_subprog_type): Don't call build_function_type; call
6850         build_function_type_vec instead.
6851
6852 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
6853
6854         * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
6855         (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
6856         (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
6857
6858 2011-05-07  Eric Botcazou  <ebotcazou@adacore.com>
6859
6860         * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
6861
6862         * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
6863         * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
6864
6865 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
6866
6867         * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
6868
6869 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
6870
6871         * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
6872         instead of accessing TYPE_ARG_TYPES directly.
6873         * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
6874
6875 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
6876
6877         PR ada/48844
6878         * gcc-interface/gigi.h (get_variant_part): Declare.
6879         * gcc-interface/decl.c (get_variant_part): Make global.
6880         * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
6881         types have the same constant size, are record types and T1 has a
6882         variant part while T2 doesn't.
6883
6884 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
6885
6886         * gcc-interface/utils.c (begin_subprog_body): Do not call
6887         get_pending_sizes.
6888         (end_subprog_body): Likewise.
6889
6890 2011-05-04  Richard Guenther  <rguenther@suse.de>
6891
6892         * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
6893         int_const_binop.
6894         (pos_to_constructor): Likewise.
6895
6896 2011-05-03  Nathan Froyd  <froydnj@codesourcery.com>
6897             Eric Botcazou  <ebotcazou@adacore.com>
6898
6899         * gcc-interface/trans.c (gigi): Call build_function_type_list instead
6900         of build_function_type.  Adjust calls to...
6901         (build_raise_check): ...this.  Do not take a void_tree parameter.
6902         Call build_function_type_list instead of build_function_type.
6903         Fix head comment and swap couple of conditional blocks.
6904
6905 2011-04-30  Eric Botcazou  <ebotcazou@adacore.com>
6906
6907         * gnatvsn.ads (Library_Version): Bump to 4.7.
6908         (Current_Year): Bump to 2011.
6909
6910 2011-04-29  Michael Matz  <matz@suse.de>
6911
6912         * gcc-interface/misc.c (gnat_handle_option): Set
6913         warn_maybe_uninitialized.
6914
6915 2011-04-23  Gerald Pfeifer  <gerald@pfeifer.com>
6916
6917         * gnat_ugn.texi (Complexity Metrics Control): Update link to
6918         the Watson/McCabe paper.
6919
6920 2011-04-23  Jim Meyering  <meyering@redhat.com>
6921
6922         * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
6923
6924 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
6925
6926         * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
6927         onto the new type.
6928
6929 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
6930
6931         * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
6932         parameter.
6933         * gcc-interface/utils.c (create_subprog_decl): Likewise.  Set
6934         DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
6935         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
6936         ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
6937         <all>: Do not set flags on the reused DECL node coming from an alias.
6938         Set DECL_IGNORED_P on the DECL node built for subprograms if they
6939         don't need debug info here...
6940         * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
6941         (gigi): Adjust calls to create_subprog_decl.
6942         (build_raise_check): Likewise.
6943         (establish_gnat_vms_condition_handler): Likewise.
6944         (Compilation_Unit_to_gnu): Likewise.
6945         (gnat_to_gnu): Likewise.
6946
6947 2011-04-21  Eric Botcazou  <ebotcazou@adacore.com>
6948
6949         * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
6950         (NO_REORDER_ADAFLAGS): New variable.
6951         (EXTRA_GNATTOOLS): Always define.
6952         (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
6953         Clean up and adjust list of files compiled with special options.
6954         * gcc-interface/Make-lang.in: Likewise.
6955         (ada/decl.o): Cosmetical change.
6956         (ada/misc.o): Remove dependency on $(PLUGIN_H).
6957
6958 2011-04-20  Jim Meyering  <meyering@redhat.com>
6959
6960         * initialize.c (__gnat_initialize): Remove useless if-before-free.
6961
6962 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
6963
6964         * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
6965         $(CFLAGS) on the link line.
6966
6967 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
6968
6969         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
6970         padded type built for the return type if it is unconstrained.
6971
6972 2011-04-14  Nathan Froyd  <froydnj@codesourcery.com>
6973
6974         * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
6975
6976 2011-04-12  Nathan Froyd  <froydnj@codesourcery.com>
6977
6978         * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
6979         before calling TREE_CHAIN.
6980         * gcc-interface/misc.c (gnat_init_ts): New function.
6981         (LANG_HOOKS_INIT_TS): Define.
6982
6983 2011-04-12  Martin Jambor  <mjambor@suse.cz>
6984
6985         * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
6986         instead of cgraph_node.
6987
6988 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
6989
6990         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
6991         alignment on fields of the RETURN type built for the Copy-In Copy-Out
6992         mechanism.
6993
6994 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
6995
6996         * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
6997         of aggregate types that contain a placeholder.
6998
6999 2011-04-08  Nathan Froyd  <froydnj@codesourcery.com>
7000
7001         * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
7002         TYPE_ARG_TYPES.
7003         (handle_type_generic_attribute): Likewise.
7004
7005 2011-04-04  Eric Botcazou  <ebotcazou@adacore.com>
7006
7007         PR ada/47163
7008         * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
7009
7010 2011-04-04  Kai Tietz  <ktietz@redhat.com>
7011
7012         PR ada/47163
7013         * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
7014         to flag value.
7015
7016 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
7017
7018         * gcc-interface/utils2.c (build_allocator): In the unconstrained array
7019         type case, do not strip a padding type around the array type.
7020
7021 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
7022
7023         * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
7024         types.
7025
7026 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
7027
7028         * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
7029         * gcc-interface/misc.c (gnat_handle_option): Remove special handling
7030         code for -feliminate-unused-debug-types.
7031         (gnat_post_options): Likewise.
7032
7033 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
7034
7035         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
7036         declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
7037         distinct copy.
7038
7039 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
7040
7041         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
7042         DECL_ARTIFICIAL flag on enumeration types.
7043
7044 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
7045
7046         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
7047         fat pointer types artificial unconditionally.
7048         <E_Array_Subtype>: Attach the base array type as a parallel type if it
7049         isn't artificial.
7050
7051 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
7052
7053         * gcc-interface/gigi.h (get_dummy_type): Declare.
7054         (build_dummy_unc_pointer_types): Likewise.
7055         (finish_fat_pointer_type): Likewise.
7056         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
7057         fat pointer type has been built, complete it in place.
7058         <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
7059         and thin pointers.  Remove useless variable.
7060         (finish_fat_pointer_type): Make global and move to...
7061         * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
7062         (get_dummy_type): New function.
7063         (build_dummy_unc_pointer_types): Likewise.
7064         (gnat_pushdecl): Propage the name to the anonymous variants only.
7065         (update_pointer_to): Only adjust the pointer types in the unconstrained
7066         array case.
7067
7068 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
7069
7070         * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
7071         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
7072         if this is a Taft amendment type and the full declaration is available.
7073         * gcc-interface/trans.c (process_type): Likewise.
7074         If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
7075         (process_freeze_entity): Likewise.
7076         * gcc-interface/utils.c (dummy_global): New static variable.
7077         (gnat_write_global_declarations): If there are types declared as used
7078         at the global level, insert them in the global hash table.
7079
7080 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
7081
7082         * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
7083         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
7084         declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
7085         copy.
7086         (record_builtin_type): Add ARTIFICIAL_P parameter.  Set DECL_ARTIFICIAL
7087         flag of the type accordingly.
7088         * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
7089
7090 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
7091
7092         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
7093         finalizing types when updating the pointers to the designated type.
7094         <all>: Finalize the deferred types even if we didn't defer processing
7095         of incomplete types in this invocation.
7096
7097 2011-04-01  Olivier Hainque  <hainque@adacore.com>
7098             Nicolas Setton  <setton@adacore.com>
7099             Eric Botcazou  <ebotcazou@adacore.com>
7100
7101         * gcc-interface/misc.c (gnat_descriptive_type): New function.
7102         (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
7103
7104 2011-03-28  Kai Tietz  <ktietz@redhat.com>
7105
7106         * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
7107         Windows targets.
7108         (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
7109         * system-mingw.ads (System): Change ZCX_By_Default default to True.
7110
7111         * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
7112
7113 2011-03-28  Tristan Gingold  <gingold@adacore.com>
7114
7115         PR ada/44431
7116         * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
7117         Use ada output of gnatbind.
7118         (ada/b_gnatb.adb): Ditto.
7119         (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
7120         (ada.mostlyclean, ada.stage1)
7121         (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
7122         (ada.stagefeedback): Adjust.
7123         * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
7124         Use ada output of gnatbind.
7125         (b_gnatm.adb): Ditto.
7126         (b_gnatl.o, b_gnatm.o): New rules.
7127
7128 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
7129
7130         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
7131         for the padded type built to support a specified size or alignment.
7132
7133 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
7134
7135         * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
7136         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
7137         unconditionally to the end of the unit when the designated type is
7138         limited_with'ed.
7139         <all>: Rename local variable.  Attempt to un-defer types only and do it
7140         for limited_with'ed types as well.
7141         (finalize_from_with_types): Adjust comment.  Rename variable and tidy.
7142         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
7143         consistently and remove redundant call to finalize_from_with_types.
7144
7145 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
7146
7147         * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
7148         subprograms without a previous spec declared in the same unit.
7149         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
7150         subprograms at the end of the unit instead of at the beginning.
7151         * gcc-interface/utils.c (create_subprog_decl): Check that the entity
7152         isn't public for the special handling of non-inline functions nested
7153         inside inline external functions.
7154
7155 2011-03-25  Jeff Law  <law@redhat.com>
7156
7157         * gcc-interface/utils.c (def_fn_type): Add missing va_end.
7158
7159 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
7160
7161         * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
7162         * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
7163         to compute Set_Size_Depends_On_Discriminant.
7164         (Layout_Type): Call it on array types in back-end layout mode.
7165         * sem_util.adb (Requires_Transient_Scope): Return true for array
7166         types only if the size depends on the value of discriminants.
7167         * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
7168         type if the RHS is a call to a function that returns an unconstrained
7169         type with default discriminant.
7170
7171 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
7172
7173         * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
7174         non-conversion to the nominal result type at the end.
7175
7176 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
7177
7178         * gcc-interface/trans.c (create_temporary): New function taken from...
7179         (create_init_temporary): ...here.  Call it.
7180         (call_to_gnu): Create the temporary for the return value early, if any.
7181         Create it for a function with copy-in/copy-out parameters if there is
7182         no target; in other cases of copy-in/copy-out, use another temporary.
7183         Push the new binding level lazily.  Add and rename local variables.
7184
7185 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
7186
7187         * gcc-interface/decl.c (validate_size): Improve comments and tweak
7188         error message.
7189         (set_rm_size): Likewise.
7190
7191 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
7192
7193         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
7194         for the padded type built in order to support a specified alignment.
7195         Fix incorrect formatting.
7196
7197 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
7198
7199         PR bootstrap/48216
7200         * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
7201
7202 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
7203
7204         * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
7205         rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
7206         to the end of the list.  Adjust recursive call.  Rename local variable.
7207         If REORDER is true, reorder components of the record type.
7208         (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
7209         components_to_record and adjust the parameter list.
7210
7211 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
7212
7213         * gcc-interface/decl.c (elaborate_expression_1): When optimization is
7214         disabled, use the variable for bounds of loop iteration scheme.
7215
7216 2011-03-21  Kai Tietz  <ktietz@redhat.com>
7217
7218         PR target/12171
7219         * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
7220
7221 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
7222
7223         * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
7224         out whether the expression is read-only.  Short-circuit placeholder
7225         case and rename a couple of local variables.
7226
7227 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
7228
7229         * gcc-interface/gigi.h (smaller_form_type_p): Declare.
7230         * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
7231         * gcc-interface/utils.c (smaller_form_type_p): ...to here.
7232         (convert): Deal with conversions from a smaller form type specially.
7233
7234 2011-02-14  Eric Botcazou  <ebotcazou@adacore.com>
7235
7236         * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
7237         its argument, except for the special -I- switch.
7238
7239 2011-02-12  Gerald Pfeifer  <gerald@pfeifer.com>
7240
7241         * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
7242         "Ada Issues".
7243
7244 2011-02-08  Eric Botcazou  <ebotcazou@adacore.com>
7245
7246         * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
7247
7248 2011-02-03  Eric Botcazou  <ebotcazou@adacore.com>
7249
7250         * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
7251         GNAT_FORMAL.
7252         * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
7253         * gcc-interface/utils.c (fill_vms_descriptor): ...here.  Take GNU_TYPE
7254         instead of GNAT_FORMAL.  Protect the expression against multiple uses.
7255         Do not generate the check directly, instead instantiate the template
7256         check present in the descriptor.
7257         (make_descriptor_field): Move around.
7258         (build_vms_descriptor32): Build a template check in the POINTER field.
7259         (build_vms_descriptor): Remove useless suffixes.
7260         * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
7261
7262 2011-01-26  Eric Botcazou  <ebotcazou@adacore.com>
7263
7264         PR bootstrap/47467
7265         * targext.c: Include target files if IN_RTS is defined.
7266
7267 2011-01-26  Richard Guenther  <rguenther@suse.de>
7268
7269         PR bootstrap/47467
7270         * targext.c: Include config.h.
7271         * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
7272         dependency.
7273
7274 2011-01-04  Pascal Obry  <obry@adacore.com>
7275             Eric Botcazou  <ebotcazou@adacore.com>
7276
7277         * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
7278
7279 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
7280
7281         * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
7282         end-of-case on the end label and its associated gotos, if any.
7283
7284 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
7285
7286         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
7287         expressions of the parameter cache within the statement group of
7288         the CICO mechanism.
7289
7290 2011-01-04  Olivier Hainque  <hainque@adacore.com>
7291             Eric Botcazou  <ebotcazou@adacore.com>
7292
7293         * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
7294         (set_end_locus_from_node): New function.
7295         (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
7296         make and the function end_locus.
7297         (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
7298         for the elaboration subprogram.
7299         (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
7300         set the end_locus of the expression as well.
7301
7302 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
7303
7304         PR ada/47131
7305         * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
7306         variables that are referenced in exception handlers volatile.
7307
7308
7309 \f
7310 Copyright (C) 2011 Free Software Foundation, Inc.
7311
7312 Copying and distribution of this file, with or without modification,
7313 are permitted in any medium without royalty provided the copyright
7314 notice and this notice are preserved.
7315
7316         * gnat_rm.texi: Ramification of pragma Eliminate documentation
7317          - fix bugs in the description of Source_Trace;
7318          - get rid of UNIT_NAME;
7319
7320 2011-08-02  Javier Miranda  <miranda@adacore.com>
7321
7322         * exp_ch9.adb
7323         (Build_Dispatching_Requeue): Adding support for VM targets
7324         since we cannot directly reference the Tag entity.
7325         * exp_sel.adb (Build_K): Adding support for VM targets.
7326         (Build_S_Assignment): Adding support for VM targets.
7327         * exp_disp.adb
7328         (Default_Prim_Op_Position): In VM targets do not restrict availability
7329         of predefined interface primitives to compiling in Ada 2005 mode.
7330         (Is_Predefined_Interface_Primitive): In VM targets this service is not
7331         restricted to compiling in Ada 2005 mode.
7332         (Make_VM_TSD): Generate code that declares and initializes the OSD
7333         record. Needed to support dispatching calls through synchronized
7334         interfaces.
7335         * exp_ch3.adb
7336         (Make_Predefined_Primitive_Specs): Enable generation of predefined
7337         primitives associated with synchronized interfaces.
7338         (Make_Predefined_Primitive_Bodies): Enable generation of predefined
7339         primitives associated with synchronized interfaces.
7340
7341 2011-08-02  Yannick Moy  <moy@adacore.com>
7342
7343         * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
7344         statements hidden in SPARK if preceded by the HIDE directive
7345         (Parse_Exception_Handlers): mark each exception handler in a sequence of
7346         exception handlers as hidden in SPARK if preceded by the HIDE directive
7347         * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
7348         if starting with the HIDE directive
7349         * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
7350         starting with the HIDE directive; mark the declarations in a private
7351         part as hidden in SPARK if the private part starts with the HIDE
7352         directive
7353         * restrict.adb, restrict.ads
7354         (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
7355         (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
7356         argument node belongs to a part which is hidden in SPARK
7357         (Check_SPARK_Restriction): do not issue violations on nodes in hidden
7358         parts in SPARK; protect the possibly costly call to
7359         Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
7360         * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
7361         * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
7362         Accumulate_Token_Checksum_GNAT_5_03): add case for new token
7363         Tok_SPARK_Hide.
7364         (Scan): recognize special comment starting with '#' and followed by
7365         SPARK keyword "hide" as a HIDE directive.
7366
7367 2011-08-02  Yannick Moy  <moy@adacore.com>
7368
7369         * types.ads, erroutc.ads: Minor reformatting.
7370
7371 2011-08-02  Vincent Celier  <celier@adacore.com>
7372
7373         * link.c: Add response file support for cross platforms.
7374
7375 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7376
7377         * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
7378         in an association, set parent field of copy before partial analysis.
7379         * sem_res.adb (Resolve_Slice): create reference to itype only when
7380         expansion is enabled.
7381
7382 2011-08-02  Yannick Moy  <moy@adacore.com>
7383
7384         * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
7385         for new flag denoting which subprogram bodies are in ALFA
7386         * restrict.adb, sem_ch7.adb: Update comment
7387         * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
7388         sem_ch9.adb, sem_res.adb: Add calls to
7389         Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
7390         * sem_ch6.adb (Analyze_Function_Return): add calls to
7391         Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
7392         middle of the body, and extended return.
7393         (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
7394         False when missing return.
7395         (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
7396         to True for subprograms whose spec is in ALFA. Remove later on the flag
7397         on the entity used for a subprogram body when there exists a separate
7398         declaration.
7399         * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
7400         if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
7401         False, otherwise do nothing.
7402
7403 2011-08-02  Robert Dewar  <dewar@adacore.com>
7404
7405         * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
7406
7407 2011-08-02  Yannick Moy  <moy@adacore.com>
7408
7409         * sem_ch4.ads: minor formatting.
7410
7411 2011-08-02  Yannick Moy  <moy@adacore.com>
7412
7413         * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
7414         debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
7415         errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
7416         restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
7417         opt.ads: cleanup of SPARK mode
7418
7419 2011-08-02  Yannick Moy  <moy@adacore.com>
7420
7421         * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
7422         types.
7423         * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
7424         (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
7425         * sem_ch3.adb
7426         (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
7427         (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
7428         (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
7429         (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
7430         types.
7431         (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
7432         non-static range.
7433         * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
7434         functions whose return type is not in ALFA.
7435         (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
7436         specifications.
7437         (Process_Formals): unset Is_In_ALFA flag for subprograms if a
7438         parameter's type is not in ALFA.
7439         * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
7440         types are in ALFA.
7441
7442 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7443
7444         * sem_ch6 (Analyze_Expression_Function): treat the function as
7445         Inline_Always, and introduce a subprogram declaration for it when it is
7446         not a completion.
7447         * inline.adb (Add_Inlined_Body): recognize bodies that come from
7448         expression functions, so that the back-end can determine whether they
7449         can in fact be inlined.
7450         * sem_util.adb (Is_Expression_Function): predicate to determine whether
7451         a function body comes from an expression function.
7452
7453 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
7454
7455         * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
7456         null exclusions to test Can_Never_Be_Null on the anonymous access types
7457         of the formals rather than testing the formals themselves. Exclude this
7458         check in cases where the Old_Formal is marked as a controlling formal,
7459         to avoid issuing spurious errors for bodies completing dispatching
7460         operations (due to the flag not getting set on controlling access
7461         formals in body specs).
7462         (Find_Corresponding_Spec): When checking full and subtype conformance of
7463         subprogram bodies in instances, pass Designated and E in that order, for
7464         consistency with the expected order of the formals (New_Id followed by
7465         Old_Id).
7466
7467 2011-08-02  Robert Dewar  <dewar@adacore.com>
7468
7469         * sem_ch8.adb: Minor reformatting.
7470
7471 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7472
7473         * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
7474         Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
7475         primitive operations of class-wide actuals.
7476
7477 2011-08-02  Javier Miranda  <miranda@adacore.com>
7478
7479         * exp_atag.ads, exp_atag.adb
7480         (Build_Common_Dispatching_Select_Statements): Remove argument Loc
7481         since its value is implicitly passed in argument Typ.
7482         * exp_disp.adb (Make_Disp_Conditional_Select_Body,
7483         Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
7484         Build_Common_Dispatching_Select_Statements.
7485
7486 2011-08-02  Robert Dewar  <dewar@adacore.com>
7487
7488         * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
7489         exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
7490         Minor reformatting.
7491
7492 2011-08-02  Robert Dewar  <dewar@adacore.com>
7493
7494         * sem_res.adb: Minor reformatting.
7495         * sem_prag.adb: Minor reformatting.
7496
7497 2011-08-02  Javier Miranda  <miranda@adacore.com>
7498
7499         * exp_atag.adb, exp_atags.ads
7500         (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
7501         by the tagged type Entity. Required to use this routine in the VM
7502         targets since we do not have available the Tag entity in the VM
7503         platforms.
7504         * exp_ch6.adb
7505         (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
7506         Ada.Tags has not been previously loaded.
7507         * exp_ch7.adb
7508         (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
7509         Build_VM_TSDs if package Ada.Tags has not been previously loaded.
7510         * sem_aux.adb
7511         (Enclosing_Dynamic_Scope): Add missing support to handle the full
7512         view of enclosing scopes. Required to handle enclosing scopes that
7513         are synchronized types whose full view is a task type.
7514         * exp_disp.adb
7515         (Build_VM_TSDs): Minor code improvement to avoid generating and
7516         analyzing lists with empty nodes.
7517         (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
7518         (Make_Disp_Conditional_Select_Body): Add support for VM targets.
7519         (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
7520         (Make_Disp_Timed_Select_Body): Add support for VM targets.
7521         (Make_Select_Specific_Data_Table): Add support for VM targets.
7522         (Make_VM_TSD): Generate code to initialize the SSD structure of
7523         the TSD.
7524
7525 2011-08-02  Yannick Moy  <moy@adacore.com>
7526
7527         * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
7528         cross-references section in ALI.
7529         * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
7530         (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
7531         Sub).
7532         (Enclosing_Subprogram_Or_Package): new function to return the enclosing
7533         subprogram or package entity of a node
7534         (Is_Local_Reference_Type): new function returns True for references
7535         selected in local cross-references.
7536         (Lt): function extracted from Lt in Output_References
7537         (Write_Entity_Name): function extracted from Output_References
7538         (Generate_Definition): generate reference with type 'D' for definition
7539         of objects (object declaration and parameter specification), with
7540         appropriate locations and units, for use in local cross-references.
7541         (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
7542         references of type 'I' for initialization in object definition.
7543         (Output_References): move part of function Lt and procedure
7544         Write_Entity_Name outside of the body. Ignore references of types 'D'
7545         and 'I' introduced for local cross-references.
7546         (Output_Local_References): new procedure to output the local
7547         cross-references sections.
7548         (Lref_Entity_Status): new array defining whether an entity is a local
7549         * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
7550         with 'I' type when initialization expression is present.
7551         * get_scos.adb, get_scos.ads: Correct comments and typos
7552
7553 2011-08-02  Javier Miranda  <miranda@adacore.com>
7554
7555         * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
7556         the JVM target.
7557         * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
7558         the JVM target.
7559         * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
7560         TSD support.
7561
7562 2011-08-02  Vincent Celier  <celier@adacore.com>
7563
7564         * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
7565         (No_Space_Img): New function
7566         (Find_Excluded_Sources): When reading from a file, record the file name
7567         and the line number for each excluded source.
7568         (Mark_Excluded_Sources): When reporting an error, if the excluded
7569         sources were read from a file, include file name and line number in
7570         the error message.
7571
7572 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7573
7574         * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
7575
7576 2011-08-02  Robert Dewar  <dewar@adacore.com>
7577
7578         * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
7579
7580 2011-08-02  Javier Miranda  <miranda@adacore.com>
7581
7582         * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
7583         generation of TSDs to the DOTNET compiler.
7584         * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
7585         generation of TSDs to the DOTNET compiler.
7586
7587 2011-08-02  Javier Miranda  <miranda@adacore.com>
7588
7589         * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
7590         record of all the tagged types declared inside library level package
7591         declarations, library level package bodies or library level subprograms.
7592         * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
7593         associated with a given tagged type.
7594         (Build_VM_TSDs): New subprogram.
7595         * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
7596         compilation units that are subprograms.
7597         * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
7598         compilation units that are package bodies.
7599         (Expand_N_Package_Declaration): Generate TSDs of the main compilation
7600         units that are a package declaration or a package instantiation.
7601         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
7602         reorganization to improve the error generated by the frontend when the
7603         function Ada.Tags.Secondary_Tag is not available.
7604         * rtsfind.ads (RE_Register_TSD): New runtime entity.
7605         * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
7606
7607 2011-08-02  Javier Miranda  <miranda@adacore.com>
7608
7609         * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
7610
7611 2011-08-02  Robert Dewar  <dewar@adacore.com>
7612
7613         * s-imenne.ads: Minor reformatting.
7614
7615 2011-08-02  Robert Dewar  <dewar@adacore.com>
7616
7617         * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
7618         * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
7619         * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
7620
7621 2011-08-02  Robert Dewar  <dewar@adacore.com>
7622
7623         * einfo.ads (Materialize_Entity): Document this is only for renamings
7624         * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
7625         required debug information in the case where we transform the object
7626         declaration into a renaming declaration.
7627         * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
7628         object
7629         * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
7630         Materialize_Entity.
7631
7632 2011-08-02  Robert Dewar  <dewar@adacore.com>
7633
7634         * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
7635         Suppress_Init_Procs.
7636         * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
7637         Suppress_Initialization/Initialization_Suppressed.
7638         * gnat_rm.texi: New documentation for pragma Suppress_Initialization
7639         * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
7640         * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
7641         * sem_prag.adb: New processing for pragma Suppress_Initialization.
7642
7643 2011-08-02  Robert Dewar  <dewar@adacore.com>
7644
7645         * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
7646         Minor reformatting.
7647
7648 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7649
7650         * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
7651         only have inheritable classwide pre/postconditions.
7652
7653 2011-08-02  Javier Miranda  <miranda@adacore.com>
7654
7655         * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
7656         * rtsfind.ads (RE_Check_TSD): New runtime entity.
7657         * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
7658         checks if the external tag of a type is the same as the external tag
7659         of some other declaration.
7660
7661 2011-08-02  Thomas Quinot  <quinot@adacore.com>
7662
7663         * s-taskin.ads: Minor reformatting.
7664
7665 2011-08-02  Emmanuel Briot  <briot@adacore.com>
7666
7667         * g-comlin.adb (Display_Help): swap the order in which it prints the
7668         short help and the general usage.
7669
7670 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7671
7672         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
7673         the aspect declarations and attach them to the generic copy for
7674         subsequent analysis.
7675         (Analyze_Subprogram_Instantiation): copy explicitly the aspect
7676         declarations of the generic tree to the new subprogram declarations.
7677         * sem_attr.adb (Check_Precondition_Postcondition): recognize
7678         conditions that apply to a subprogram instance.
7679
7680 2011-08-02  Robert Dewar  <dewar@adacore.com>
7681
7682         * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
7683
7684 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7685
7686         * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
7687         private type with a tagged full view is not derived in the immediate
7688         scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
7689
7690 2011-08-02  Robert Dewar  <dewar@adacore.com>
7691
7692         * exp_ch4.adb: Minor reformatting.
7693
7694 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7695
7696         * sem_ch5.adb (Analyze_Loop_Statement):  If the iteration scheme is an
7697         Ada2012 iterator, the loop will be rewritten during expansion into a
7698         while loop with a cursor and an element declaration. Do not analyze the
7699         body in this case, because if the container is for indefinite types the
7700         actual subtype of the elements will only be determined when the cursor
7701         declaration is analyzed.
7702
7703 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
7704
7705         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
7706         size/alignment related attributes in CodePeer_Mode.
7707
7708 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
7709
7710         * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
7711         Prepend_Element, since this can result in the operation getting the
7712         wrong slot in the full type's dispatch table if the full type has
7713         inherited operations. The incomplete type's operation will get added
7714         to the proper position in the full type's primitives
7715         list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
7716         (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
7717         dispatching operations, since there are cases where nonprimitive
7718         subprograms can get added to the list of incomplete dependents (such
7719         as subprograms in nested packages).
7720         * sem_ch6.adb (Process_Formals): First, remove test for being in a
7721         private part when determining whether to add a primitive with a
7722         parameter of a tagged incomplete type to the Private_Dependents list.
7723         Such primitives can also occur in the visible part, and should not have
7724         been excluded from being private dependents.
7725         * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
7726         RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
7727         list of a Taft-amendment incomplete type is a primitive before issuing
7728         an error that the full type must appear in the same unit. There are
7729         cases where nonprimitives can be in the list (such as subprograms in
7730         nested packages).
7731         * sem_disp.adb (Derives_From): Use correct condition for checking that
7732         a formal's type is derived from the type of the corresponding formal in
7733         the parent subprogram (the condition was completely wrong). Add
7734         checking that was missing for controlling result types being derived
7735         from the result type of the parent operation.
7736
7737 2011-08-02  Yannick Moy  <moy@adacore.com>
7738
7739         * errout.adb (First_Node): minor renaming
7740         * restrict.adb (Check_Formal_Restriction): put restriction warning on
7741         first node.
7742
7743 2011-08-02  Yannick Moy  <moy@adacore.com>
7744
7745         * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
7746         before accessing operands.
7747         * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
7748         decide whether an initialization expression respects SPARK rules, as
7749         the plain node is the expanded one. This allows for more valid warnings
7750         to be issued.
7751         * gnat_rm.texi: Minor update.
7752
7753 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
7754
7755         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
7756         previous change.
7757
7758 2011-08-02  Robert Dewar  <dewar@adacore.com>
7759
7760         * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
7761
7762 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
7763
7764         * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
7765         loop statements and the element renaming declaration with a block when
7766         the element type is controlled.
7767
7768 2011-08-02  Yannick Moy  <moy@adacore.com>
7769
7770         * sinfo.ads: Minor formatting.
7771
7772 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7773
7774         * sem_aggr.adb (Add_Association): if the association has a box and no
7775         expression, use the Sloc of the aggregate itself for the new
7776         association.
7777         * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
7778         the Original_Node.
7779
7780 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
7781
7782         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
7783         When a container is provided via a function call, generate a renaming
7784         of the function result. This avoids the creation of a transient scope
7785         and the premature finalization of the container.
7786         * exp_ch7.adb (Is_Container_Cursor): Removed.
7787         (Wrap_Transient_Declaration): Remove the supression of the finalization
7788         of the list controller when the declaration denotes a container cursor,
7789         it is not needed.
7790
7791 2011-08-02  Yannick Moy  <moy@adacore.com>
7792
7793         * restrict.adb (Check_Formal_Restriction): only issue a warning if the
7794         node is from source, instead of the original node being from source.
7795         * sem_aggr.adb
7796         (Resolve_Array_Aggregate): refine the check for a static expression, to
7797         recognize also static ranges
7798         * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
7799         Array_Type_Declaration): postpone the test for the type being a subtype
7800         mark after the type has been resolved, so that component-selection and
7801         expanded-name are discriminated.
7802         (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
7803         to distinguish the case of an iteration scheme, so that an error is
7804         issed on a non-static range in SPARK except in an iteration scheme.
7805         * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
7806         In_Iter_Schm = True.
7807         * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
7808         user-defined operators so that they are allowed in renaming
7809         * sem_ch8.adb
7810         (Find_Selected_Component): refine the check for prefixing of operators
7811         so that they are allowed in renaming. Move the checks for restrictions
7812         on selector name after analysis discriminated between
7813         component-selection and expanded-name.
7814         * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
7815         concatenation argument of string type if it is static.
7816         * sem_util.adb, sem_util.ads
7817         (Check_Later_Vs_Basic_Declarations): add a new function
7818         Is_Later_Declarative_Item to decice which declarations are allowed as
7819         later items, in the two different modes Ada 83 and SPARK. In the SPARK
7820         mode, add that renamings are considered as later items.
7821         (Enclosing_Package): new function to return the enclosing package
7822         (Enter_Name): correct the rule for homonyms in SPARK
7823         (Is_SPARK_Initialization_Expr): default to returning True on nodes not
7824         from source (result of expansion) to avoid issuing wrong warnings.
7825
7826 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7827
7828         * errout.adb: On anything but an expression First_Node returns its
7829         argument.
7830
7831 2011-08-02  Pascal Obry  <obry@adacore.com>
7832
7833         * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
7834
7835 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
7836
7837         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
7838         Set the associated loop as the related expression of internally
7839         generated cursors.
7840         * exp_ch7.adb (Is_Container_Cursor): New routine.
7841         (Wrap_Transient_Declaration): Supress the finalization of the list
7842         controller when the declaration denotes a container cursor.
7843
7844 2011-08-02  Yannick Moy  <moy@adacore.com>
7845
7846         * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
7847         command line now.
7848         * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
7849         expression is a simple expression. This check cannot be performed in
7850         the semantics, so just drop it.
7851         (P_Index_Or_Discriminant_Constraint): move check that the index or
7852         discriminant is a subtype mark to Analyze_Subtype_Declaration in the
7853         semantics. Other cases were previously checked in the semantics.
7854         * par-ch4.adb (P_Name): move checks that a selector name is not
7855         character literal or an operator symbol to Find_Selected_Component in
7856         the semantics
7857         * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
7858         declarations are not placed after later declarations in a separate
7859         procedure in Sem_Util (possibly not the best choice?), to be used both
7860         during parsing, for Ada 83 mode, and during semantic analysis, for
7861         SPARK mode.
7862         * par-endh.adb (Check_End): move check that end label is not missing
7863         to Process_End_Label in the semantics
7864         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
7865         the special case for SPARK restriction
7866         * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
7867         * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
7868         parameter Force to issue the error message even on internal node (used
7869         for generated end label). Call Check_Restriction to check when an error
7870         must be issued. In SPARK mode, issue an error message even if the
7871         restriction is not set.
7872         (Check_Restriction): new procedure with an additional out parameter to
7873         inform the caller that a message has been issued
7874         * sem_aggr.adb: Minor modification of message
7875         * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
7876         instead of issuing an error message directly
7877         * sem_ch3.adb (Analyze_Declarations): move here the check that basic
7878         declarations are not placed after later declarations, by calling
7879         Check_Later_Vs_Basic_Declarations
7880         (Analyze_Subtype_Declaration): move here the check that an index or
7881         discriminant constraint must be a subtype mark. Change the check that
7882         a subtype of String must start at one so that it works on subtype marks.
7883         * sem_ch4.adb (Analyze_Call): move here the check that a named
7884         association cannot follow a positional one in a call
7885         * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
7886         instead of issuing an error message directly
7887         * sem_ch8.adb (Find_Selected_Component): move here the check that a
7888         selector name is not a character literal or an operator symbol. Move
7889         here the check that the prefix of an expanded name cannot be a
7890         subprogram or a loop statement.
7891         * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
7892         procedure called from parsing and semantics to check that basic
7893         declarations are not placed after later declarations
7894         (Process_End_Label): move here the check that end label is not missing
7895
7896 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
7897
7898         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
7899         representation clause in codepeer mode, since it confuses CodePeer and
7900         does not bring useful info.
7901
7902 2011-08-02  Ed Falis  <falis@adacore.com>
7903
7904         * init.c: initialize fp hw on MILS.
7905
7906 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7907
7908         * errout.adb (First_Node): for bodies, return the node itself (small
7909         optimization). For other nodes, do not check source_unit if the node
7910         comes from Standard.
7911
7912 2011-08-02  Robert Dewar  <dewar@adacore.com>
7913
7914         * exp_ch3.adb: Minor comment additions.
7915         * sem_ch13.adb: Minor reformatting.
7916
7917 2011-08-02  Pascal Obry  <obry@adacore.com>
7918
7919         * make.adb, makeutl.adb: Removes some superfluous directory separator.
7920
7921 2011-08-02  Robert Dewar  <dewar@adacore.com>
7922
7923         * sem_attr.adb: Minor reformatting.
7924
7925 2011-08-02  Robert Dewar  <dewar@adacore.com>
7926
7927         * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
7928         (Has_Default_Component_Value): Removed
7929         * einfo.ads Comment updates
7930         (Has_Default_Aspect): Replaces Has_Default_Value
7931         (Has_Default_Component_Value): Removed
7932         * exp_ch13.adb
7933         (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
7934         * exp_ch3.adb
7935         (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
7936         (Get_Simple_Init_Val): Handle Default_Value aspect
7937         (Needs_Simple_Initialization): Handle Default_Value aspect
7938         * exp_ch3.ads: Needs_Simple_Initialization
7939         * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
7940         * par-prag.adb (Pragma_Default[_Component]Value) Removed
7941         * sem_ch13.adb
7942         (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
7943         * sem_prag.adb (Pragma_Default[_Component]Value) Removed
7944         * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
7945
7946 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7947
7948         * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
7949         package containing iteration primitives.
7950         exp_ch5.adb (Expand_Iterator_Loop): ditto.
7951
7952 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7953
7954         * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
7955         "of", pre-analyze expression in case it is a function call with
7956         finalization actions that must be placed ahead of the loop.
7957         * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
7958         on an Ada2012 iterator, insert them ahead of the rewritten loop.
7959
7960 2011-08-02  Geert Bosch  <bosch@adacore.com>
7961
7962         * cstand.adb (Create_Float_Types): Only consider C's long double for
7963         Long_Long_Float, in addition to double.
7964
7965 2011-08-02  Robert Dewar  <dewar@adacore.com>
7966
7967         * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
7968         sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
7969         prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
7970         Minor reformatting.
7971
7972 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7973
7974         * sem_attr.adb: handle properly 'Result when it is a prefix of an
7975         indexed component.
7976
7977 2011-08-02  Javier Miranda  <miranda@adacore.com>
7978
7979         * einfo.ads, einfo.adb
7980         (Original_Access_Type): Move this attribute to Node26 since there was
7981         an undocumented use of Node21 in E_Access_Subprogram_Type entities
7982         which causes conflicts and breaks the generation of the .NET compiler.
7983         (Interface_Name): Add missing documentation on JGNAT only uses of
7984         this attribute.
7985
7986 2011-08-02  Geert Bosch  <bosch@adacore.com>
7987
7988         * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
7989         (Find_Back_End_Float_Type): Likewise
7990         (Create_Back_End_Float_Types): Likewise
7991         (Create_Float_Types): Likewise
7992         (Register_Float_Type): Likewise
7993         * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
7994         Nlist and split out type selection in new local Find_Base_Type function.
7995         * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
7996         Nlist
7997         * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
7998
7999 2011-08-02  Robert Dewar  <dewar@adacore.com>
8000
8001         * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
8002         alpha order).
8003         * opt.ads: Minor comment change.
8004         * sem_ch12.adb: Minor code reorganization.
8005
8006 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
8007
8008         * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
8009         subtype's list of rep items to the list on the full subtype in the case
8010         where the lists are the same.
8011
8012 2011-08-02  Geert Bosch  <bosch@adacore.com>
8013
8014         * switch-c.adb (Free): New deallocation procedure to avoid implicitly
8015         using the one from System.Strings, which also deallocates all strings.
8016
8017 2011-08-02  Geert Bosch  <bosch@adacore.com>
8018
8019         * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
8020         function.
8021         * gcc-interface/Make-lang.in: Update dependencies.
8022
8023 2011-08-02  Olivier Hainque  <hainque@adacore.com>
8024
8025         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
8026         end_locus.
8027
8028 2011-08-02  Javier Miranda  <miranda@adacore.com>
8029
8030         * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
8031         associated with anonymous access to subprograms.
8032
8033 2011-08-02  Geert Bosch  <bosch@adacore.com>
8034
8035         * opt.ads
8036         (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
8037         (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
8038         * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
8039         (Add_Symbol_Definition): Move to switch-c.adb
8040         (Process_Command_Line_Symbol_Definitions): Adjust references to above.
8041         * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
8042         (Add_Symbol_Definition): Move to switch-c.adb.
8043         * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
8044         * sem_warn.adb
8045         (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
8046         Move to warnsw.adb.
8047         * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
8048         Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
8049         Move to warnsw.adb.
8050         * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
8051         (Add_Symbol_Definition): Moved from Prepcomp.
8052         * switch-c.ads: Update copyright notice. Use String_List instead of
8053         Argument_List, removing dependency on System.OS_Lib.
8054
8055 2011-08-02  Yannick Moy  <moy@adacore.com>
8056
8057         * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
8058         mode on initialization expression which does not respect SPARK
8059         restrictions.
8060         * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
8061         if the tree referenced by its argument represents an initialization
8062         expression in SPARK, suitable for initializing an object in an object
8063         declaration.
8064
8065 2011-08-02  Javier Miranda  <miranda@adacore.com>
8066
8067         * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
8068         internally generated access to subprogram with its associated protected
8069         subprogram type.
8070         * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
8071
8072 2011-08-02  Geert Bosch  <bosch@adacore.com>
8073
8074         * cstand.adb (Register_Float_Type): Print information about type to
8075         register, if the Debug_Flag_Dot_B is set.
8076         * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
8077         * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
8078         * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
8079         with a requested precision of more than Max_Digits digits and no more
8080         than Max_Base_Digits digits, if a range specification is present and the
8081         Predefined_Float_Types list has a suitable type to derive from.
8082         * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
8083         case of type completion with pragma Import
8084         * sem_prag.adb
8085         (Process_Import_Predefined_Type): Processing to complete a type
8086         with pragma Import. Currently supports floating point types only.
8087         (Set_Convention_From_Pragma): Do nothing without underlying type.
8088         (Process_Convention): Guard against absence of underlying type,
8089         which may happen when importing incomplete types.
8090         (Process_Import_Or_Interface): Handle case of importing predefined
8091         types. Tweak error message.
8092
8093 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
8094
8095         * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
8096         functions to previous change.  Reorganize code slightly.
8097
8098 2011-08-02  Geert Bosch  <bosch@adacore.com>
8099
8100         * back_end.ads (Register_Type_Proc): New call back procedure type for
8101         allowing the back end to provide information about available types.
8102         (Register_Back_End_Types): New procedure to register back end types.
8103         * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
8104         available types.
8105         * cstand.adb (Back_End_Float_Types): New list for floating point types
8106         supported by the back end.
8107         (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
8108         (Copy_Float_Type): New procedure to make new copies of predefined types.
8109         (Register_Float_Type): New call back procedure to populate the BEFT list
8110         (Find_Back_End_Float_Type): New procedure to find a BEFT by name
8111         (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
8112         (Create_Float_Types): New procedure to create entities for floating
8113         point types predefined in Standard, and put these and any remaining
8114         BEFTs on the Predefined_Float_Types list.
8115         * stand.ads (Predefined_Float_Types): New list for predefined floating
8116         point types that do not have declarations in package Standard.
8117
8118 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
8119
8120         * inline.adb (Get_Code_Unit_Entity): New local function.  Returns the
8121         entity node for the unit containing the parameter.
8122         (Add_Inlined_Body): Use it to find the unit containing the subprogram.
8123         (Add_Inlined_Subprogram): Likewise.
8124         * gcc-interface/Make-lang.in: Update dependencies.
8125
8126 2011-08-02  Thomas Quinot  <quinot@adacore.com>
8127
8128         * s-stusta.adb (Print): Make sure Pos is always initialized to a
8129         suitable value.
8130
8131 2011-08-02  Geert Bosch  <bosch@adacore.com>
8132
8133         * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
8134
8135 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
8136
8137         * sem_type.adb (Covers): Move trivial case to the top and reuse the
8138         computed value of Base_Type.
8139
8140 2011-08-02  Yannick Moy  <moy@adacore.com>
8141
8142         * restrict.adb (Check_Restriction): issue an error for any use of
8143         class-wide, even if the No_Dispatch restriction is not set.
8144         * sem_aggr.adb: Correct typos in comments and messages in formal mode
8145         * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
8146         when completing a private extension, the type named in the private part
8147         is not the same as that named in the visible part.
8148         * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
8149         of an inherited primitive operations of a tagged type or type extension
8150         that returns the tagged type.
8151         * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
8152         function which returns True for an implicit operation inherited by the
8153         derived type declaration for the argument type.
8154         (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
8155         order.
8156
8157 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8158
8159         * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
8160         Process_Bounds, to perform analysis with expansion of a range or an
8161         expression that is the iteration scheme for a loop.
8162         (Analyze_Iterator_Specification): If domain of iteration is given by a
8163         function call with a controlled result, as is the case if call returns
8164         a predefined container, ensure that finalization actions are properly
8165         generated.
8166         * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
8167
8168 2011-08-02  Javier Miranda  <miranda@adacore.com>
8169
8170         * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
8171         * gcc-interface/Make-lang.in: Update dependencies.
8172
8173 2011-08-02  Javier Miranda  <miranda@adacore.com>
8174
8175         * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
8176         determine if the analysis is performed using N or Original_Node (N).
8177         * exp_util.adb (Side_Effect_Free): Code cleanup since the new
8178         functionality of routine Is_Variable avoids code duplication.
8179         * checks.adb (Determine_Range): Handle temporaries generated by
8180         Remove_Side_Effects.
8181
8182 2011-08-02  Javier Miranda  <miranda@adacore.com>
8183
8184         * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
8185         expansion of the condition. Required since the previous analysis was
8186         done with expansion disabled (see Resolve_Quantified_Expression) and
8187         hence checks were not inserted and record comparisons have not been
8188         expanded.
8189
8190 2011-08-02  Ed Falis  <falis@adacore.com>
8191
8192         * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
8193         Update header.
8194
8195 2011-08-02  Bob Duff  <duff@adacore.com>
8196
8197         * opt.ads: Minor comment fix.
8198
8199 2011-08-02  Bob Duff  <duff@adacore.com>
8200
8201         * sem_ch12.adb (Analyze_Package_Instantiation,
8202         Analyze_Subprogram_Instantiation): Turn off style checking while
8203         analyzing an instance. Whatever style checks that apply to the generic
8204         unit should apply, so it makes no sense to apply them in an instance.
8205         This was causing trouble when compiling an instance of a runtime
8206         unit that violates the -gnatyO switch.
8207         * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
8208         one of the two case statements, causing spurious errors.
8209
8210 2011-08-02  Robert Dewar  <dewar@adacore.com>
8211
8212         * uname.adb: Minor reformatting.
8213         * gnatcmd.adb: Minor reformatting.
8214         * exp_attr.adb: Minor reformatting.
8215
8216 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8217
8218         * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
8219         No_Dispatching_Calls, do not look for the Assign primitive, because
8220         predefined primitives are not created in this case.
8221
8222 2011-08-02  Bob Duff  <duff@adacore.com>
8223
8224         * stylesw.ads: Minor comment fixes.
8225
8226 2011-08-02  Robert Dewar  <dewar@adacore.com>
8227
8228         * freeze.adb (Add_To_Result): New procedure.
8229
8230 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
8231
8232         * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
8233         time, if the specific run-time routines for handling streams of strings
8234         are not available, use the default mechanism.
8235
8236 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
8237
8238         * s-regpat.ads: Fix typo.
8239
8240 2011-08-02  Vincent Celier  <celier@adacore.com>
8241
8242         * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
8243         not null, call it to create the in memory config project file without
8244         parsing an existing default config project file.
8245
8246 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
8247
8248         * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
8249
8250 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8251
8252         * sem_elim.adb: an abstract subprogram does not need an eliminate
8253         pragma for its descendant to be eliminable.
8254
8255 2011-08-02  Ed Falis  <falis@adacore.com>
8256
8257         * init.c: revert to handling before previous checkin for VxWorks
8258         * s-intman-vxworks.adb: delete unnecessary declarations related to
8259         using Ada interrupt facilities for handling signals.
8260         Delete Initialize_Interrupts. Use __gnat_install_handler instead.
8261         * s-intman-vxworks.ads: Import __gnat_install_handler as
8262         Initialize_Interrupts.
8263         * s-taprop-vxworks.adb: Delete Signal_Mask.
8264         (Abort_Handler): change construction of mask to unblock exception
8265         signals.
8266
8267 2011-08-02  Jerome Guitton  <guitton@adacore.com>
8268
8269         * a-except-2005.adb (Raise_From_Signal_Handler): Call
8270         Debug_Raise_Exception before propagation starts.
8271
8272 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
8273
8274         * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
8275         to Restriction_Check_Required.
8276         * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
8277         * sem_res.adb (Resolve_Call): Likewise.
8278         * sem_attr.adb (Check_Stream_Attribute): Likewise.
8279
8280 2011-08-02  Bob Duff  <duff@adacore.com>
8281
8282         * stylesw.ads: Update comment.
8283         * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
8284         * errout.ads: Remove obsolete comment.
8285
8286 2011-08-02  Javier Miranda  <miranda@adacore.com>
8287
8288         * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
8289         (Set_Is_Safe_To_Reevaluate): new procedure.
8290         * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
8291         assignment is allowed on safe-to-reevaluate variables.
8292         (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
8293         temporary created to remove side effects in expressions that use
8294         the secondary stack as safe-to-reevaluate.
8295         * exp_util.adb (Side_Effect_Free): Add missing code to handle well
8296         variables that are not true constants.
8297
8298 2011-08-02  Robert Dewar  <dewar@adacore.com>
8299
8300         * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
8301         sem_res.adb, sem_ch6.adb: Minor reformatting.
8302
8303 2011-08-02  Jerome Guitton  <guitton@adacore.com>
8304
8305         * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
8306
8307 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8308
8309         * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
8310         not set Overridden_Operation if subprogram is an initialization
8311         procedure.
8312
8313 2011-08-02  Yannick Moy  <moy@adacore.com>
8314
8315         * par-ch6.adb: Correct obsolete name in comments
8316         * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
8317         which takes two message arguments (existing function takes one), with
8318         second message used for continuation.
8319         * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
8320         block statements that originate from a source block statement, not
8321         generated block statements
8322         * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
8323         symmetry with procedure case
8324         * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
8325         function to issue an error in formal mode if a package specification
8326         contains more than one tagged type or type extension.
8327         * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
8328         parameters matching formals of tagged types are objects (or ancestor
8329         type conversions of objects), not general expressions. Issue an error
8330         on view conversions that are not involving ancestor conversion of an
8331         extended type.
8332         (Resolve_Type_Conversion): in formal mode, issue an error on the
8333         operand of an ancestor type conversion which is not an object
8334         * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
8335         procedure so that it works also for actuals of function calls
8336         (Is_Actual_Tagged_Parameter): new function which determines if its
8337         argument is an actual parameter of a formal of tagged type in a
8338         subprogram call
8339         (Is_SPARK_Object_Reference): new function which determines if the tree
8340         referenced by its argument represents an object in SPARK
8341
8342 2011-08-02  Robert Dewar  <dewar@adacore.com>
8343
8344         * sem_ch3.adb: Minor reformatting
8345         Minor comment addition
8346         Minor error msg text change
8347
8348 2011-08-02  Javier Miranda  <miranda@adacore.com>
8349
8350         * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
8351         function. Used to be more precise when we generate a variable plus one
8352         assignment to remove side effects in the evaluation of the Bound
8353         expressions.
8354         (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
8355         of the bound expression to force its re-analysis and thus expand the
8356         associated transient scope (if required). Code cleanup replacing the
8357         previous code that declared the constant entity by an invocation to
8358         routine Force_Evaluation which centralizes this work in the frontend.
8359
8360 2011-08-02  Robert Dewar  <dewar@adacore.com>
8361
8362         * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
8363         (Base_Type): Now uses improved Is_Base_Type function
8364         * einfo.ads (Base_Type): Inline this function
8365
8366 2011-08-02  Robert Dewar  <dewar@adacore.com>
8367
8368         * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
8369         (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
8370
8371 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
8372
8373         * gcc-interface/Make-lang.in: Update dependencies.
8374         * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
8375         targets.
8376
8377 2011-08-02  Yannick Moy  <moy@adacore.com>
8378
8379         * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
8380         non-simple expression used in delta constraint
8381         (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
8382         index constraint which is not a subtype mark
8383         * par.adb: With and use Restrict
8384         * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
8385         mode on component type which is not a subtype mark and default
8386         expression on component
8387         (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
8388         of string which does not have a lower index bound equal to 1
8389         (Array_Type_Declaration): issue an error in formal mode on index or
8390         component type which is not a subtype mark, and on aliased keyword on
8391         component
8392         (Derived_Type_Declaration): issue an error in formal mode on interface,
8393         limited or abstract type
8394         (Record_Type_Declaration): issue an error in formal mode on interface
8395         (Record_Type_Definition): issue an error in formal mode on tagged types
8396         and type extensions not declared in the specification of a library unit
8397         package; on null non-tagged record; on variant part
8398
8399 2011-08-02  Vincent Celier  <celier@adacore.com>
8400
8401         * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
8402         not declared for qualified library project when Library_Name is not
8403         declared, but Library_Dir is.
8404
8405 2011-08-02  Robert Dewar  <dewar@adacore.com>
8406
8407         * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
8408         pragmas (affects aspects [Component_]Default_Value
8409         (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
8410         component type for the resolution
8411
8412 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
8413
8414         * einfo.adb (Base_Type): Tune implementation for speed.
8415
8416 2011-08-02  Robert Dewar  <dewar@adacore.com>
8417
8418         * freeze.adb: Minor reformatting.
8419
8420 2011-08-02  Thomas Quinot  <quinot@adacore.com>
8421
8422         * scos.ads: Update comments.
8423
8424 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8425
8426         * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
8427         base type, because the parent may be a subtype of a private type whose
8428         convention is established in a private part.
8429
8430 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
8431
8432         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
8433         statement in a block when the expansion of the return expression has
8434         created a finalization chain.
8435         * freeze.adb (Freeze_Expression): Alphabetize all choices associated
8436         with the parent node.
8437         Add N_Extended_Return_Statement to handle the case where a transient
8438         object declaration appears in the Return_Object_Declarations list of
8439         an extended return statement.
8440
8441 2011-08-02  Matthew Gingell  <gingell@adacore.com>
8442
8443         * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
8444         unused parameter 'name'.
8445
8446 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8447
8448         * sem_elim.adb (Set_Eliminated): If the overridden operation is an
8449         inherited operation, check whether its alias, which is the source
8450         operastion that it renames, has been marked eliminated.
8451
8452 2011-08-02  Javier Miranda  <miranda@adacore.com>
8453
8454         * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
8455         in-mode parameter whose type is an access type since it can be used to
8456         modify its designated object. Enforce code that handles as safe an
8457         access type that is not access-to-constant but it is the result of a
8458         previous removal of side-effects.
8459         (Remove_Side_Effects): Minor code reorganization of cases which require
8460         no action. Done to incorporate documentation on new cases uncovered
8461         working in this ticket: no action needed if this routine was invoked
8462         too early and the nodes are not yet decorated.
8463         * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
8464         to routine Remove_Side_Effects by calls to Force_Evaluation since they
8465         were issued with actuals that are implicitly provided by
8466         Force_Evaluation.
8467
8468 2011-08-02  Robert Dewar  <dewar@adacore.com>
8469
8470         * sem_ch3.adb, sem_res.adb: Minor reformatting.
8471
8472 2011-08-02  Yannick Moy  <moy@adacore.com>
8473
8474         * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
8475         to issue an error in formal mode on attribute not supported in this mode
8476         (Analyze_Attribute): issue errors on standard attributes not supported
8477         in formal mode.
8478         * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
8479         comment, and issue error in formal mode on modulus which is not a power
8480         of 2.
8481         (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
8482         range.
8483         * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
8484         subtype mark.
8485         * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
8486         operator on modular type (except 'not').
8487
8488 2011-08-02  Robert Dewar  <dewar@adacore.com>
8489
8490         * gnat_rm.texi: Minor reformatting.
8491
8492 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
8493
8494         * s-osinte-linux.ads: Minor comment update and reformatting.
8495         * i-cexten.ads: Make this unit pure, as for its parent.
8496         Will allow its usage in more contexts if needed.
8497
8498 2011-08-02  Robert Dewar  <dewar@adacore.com>
8499
8500         * s-utf_32.ads: Minor comment fix.
8501
8502 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8503
8504         * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
8505         operation of a tagged synchronized type, handle the case where the
8506         controlling argument is overloaded.
8507
8508 2011-08-02  Yannick Moy  <moy@adacore.com>
8509
8510         * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
8511         Replace pragma SPARK_95 with pragma Restrictions (SPARK)
8512         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
8513         SPARK mode and formal verification mode on processing SPARK restriction
8514         * s-rident.ads (Restriction_Id): add SPARK restriction in those not
8515         requiring consistency checking.
8516
8517 2011-08-02  Robert Dewar  <dewar@adacore.com>
8518
8519         * sem_res.adb: Minor reformatting.
8520
8521 2011-08-02  Robert Dewar  <dewar@adacore.com>
8522
8523         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8524         a-cforse.ads: Remove unneeded with of Ada.Containers
8525         Remove commented out pragma Inline's
8526         Move specifications of new subprograms to the actual specs
8527
8528 2011-08-02  Yannick Moy  <moy@adacore.com>
8529
8530         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8531         a-cforse.ads: Update comments.
8532
8533 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8534
8535         * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
8536
8537 2011-08-02  Robert Dewar  <dewar@adacore.com>
8538
8539         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8540         a-cforse.ads, a-cofove.ads: Minor reformatting.
8541
8542 2011-08-02  Claire Dross  <dross@adacore.com>
8543
8544         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
8545         a-cofove.ads: Add comments.
8546
8547 2011-08-02  Yannick Moy  <moy@adacore.com>
8548
8549         * gnat_rm.texi: Document formal containers.
8550
8551 2011-08-02  Emmanuel Briot  <briot@adacore.com>
8552
8553         * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
8554         are empty sections.
8555
8556 2011-08-02  Robert Dewar  <dewar@adacore.com>
8557
8558         * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
8559         reformatting.
8560
8561 2011-08-02  Robert Dewar  <dewar@adacore.com>
8562
8563         * aspects.adb: New aspects Default_Value and Default_Component_Value
8564         New format of Aspect_Names table checks for omitted entries
8565         * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
8566         handling of boolean aspects for derived types.
8567         New aspects Default_Value and Default_Component_Value
8568         New format of Aspect_Names table checks for omitted entries
8569         * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
8570         (Has_Default_Value): New flag
8571         (Has_Default_Component_Value): New flag
8572         (Has_Default_Value): New flag
8573         * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
8574         table.
8575         * par-prag.adb: New pragmas Default_Value and Default_Component_Value
8576         * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
8577         Default_Value and Default_Component_Value
8578         * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
8579         New aspects Default_Value and Default_Component_Value
8580         * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
8581         * sprint.adb: Print N_Aspect_Specification node when called from gdb
8582
8583 2011-08-02  Vincent Celier  <celier@adacore.com>
8584
8585         * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
8586         inherit library kind.
8587
8588 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8589
8590         * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
8591         Minor reformatting.
8592
8593 2011-08-02  Robert Dewar  <dewar@adacore.com>
8594
8595         * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
8596
8597 2011-08-02  Yannick Moy  <moy@adacore.com>
8598
8599         * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
8600
8601 2011-08-02  Robert Dewar  <dewar@adacore.com>
8602
8603         * impunit.adb: Add comment.
8604
8605 2011-08-02  Yannick Moy  <moy@adacore.com>
8606
8607         * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
8608         qualification of aggregates in formal mode
8609         (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
8610         another aggregate
8611         (Resolve_Aggregate): complete the test that an aggregate is adequately
8612         qualified in formal mode
8613
8614 2011-08-02  Pascal Obry  <obry@adacore.com>
8615
8616         * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
8617         * mlib-prj.adb: Supress warning when compiling binder generated file.
8618         (Build_Library): Supress all warnings when compiling the binder
8619         generated file.
8620
8621 2011-08-02  Yannick Moy  <moy@adacore.com>
8622
8623         * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
8624         from here...
8625         * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
8626         * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
8627         Add with/use clauses to make Check_Formal_Restriction visible
8628
8629 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8630
8631         * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
8632         in-parameters when type of the generic formal is private in the generic
8633         spec and non-private in the body.
8634
8635 2011-08-02  Claire Dross  <dross@adacore.com>
8636
8637         * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
8638         a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
8639         a-cofove.adb, a-cofove.ads: New files implementing formal containers.
8640         * impunit.adb, Makefile.rtl: Take new files into account.
8641
8642 2011-08-02  Robert Dewar  <dewar@adacore.com>
8643
8644         * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
8645         sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
8646
8647 2011-08-02  Yannick Moy  <moy@adacore.com>
8648
8649         * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
8650         formal mode
8651         * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
8652         matching static array bounds, taking into account the special case of
8653         string literals
8654         * sem_ch3.adb: Typo in comment.
8655
8656 2011-08-02  Yannick Moy  <moy@adacore.com>
8657
8658         * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
8659         which issues an error in formal mode if its argument node is originally
8660         from source
8661         * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
8662         has a discriminant specification so that it does not include the case
8663         of derived types
8664         (Derived_Type_Declaration): move here the test that a derived type has a
8665         discriminant specification
8666         * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
8667         first element of a component association before accessing its choices
8668         (presence of component association is not enough)
8669         * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
8670         declaration is a library item before accessing the next element in a
8671         list, as library items are not member of lists
8672         * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
8673         sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
8674         Check_Formal_Restriction whenever possible.
8675
8676 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8677
8678         * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
8679         reference when needed.
8680
8681 2011-08-02  Bob Duff  <duff@adacore.com>
8682
8683         * gnat_ugn.texi: Fix typo.
8684
8685 2011-08-02  Vincent Celier  <celier@adacore.com>
8686
8687         * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
8688         archive file name. Do not use the full path name of archives for Open
8689         VMS.
8690
8691 2011-08-02  Robert Dewar  <dewar@adacore.com>
8692
8693         * sem_ch12.adb, sem_ch11.adb: New calling sequence for
8694         Analyze_Aspect_Specifications
8695         * sem_ch13.adb
8696         (Analyze_Aspect_Specifications): New handling for boolean aspects
8697         * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
8698         * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
8699         sequence for Analyze_Aspect_Specifications
8700         * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
8701         * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
8702
8703 2011-08-02  Robert Dewar  <dewar@adacore.com>
8704
8705         * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
8706         aspects, since these no longer exist.
8707
8708 2011-08-02  Robert Dewar  <dewar@adacore.com>
8709
8710         * par-ch13.adb (Aspect_Specifications_Present): Always return false on
8711         semicolon, do not try to see if there are aspects following it.
8712         * par-ch3.adb (P_Declarative_Items): Better message for unexpected
8713         aspect spec.
8714
8715 2011-08-02  Robert Dewar  <dewar@adacore.com>
8716
8717         * sem_ch8.adb, aspects.ads: Minor reformatting.
8718
8719 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
8720
8721         * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
8722         * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
8723         extracted from...
8724         (Analyze_Aspect_Specifications): ...here.  Call above procedure.
8725
8726 2011-08-02  Yannick Moy  <moy@adacore.com>
8727
8728         * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
8729         mode on subprogram declaration outside of package specification, unless
8730         it is followed by a pragma Import
8731         * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
8732         Access_Type_Declaration): issue error in formal mode on access type
8733         (Analyze_Incomplete_Type_Decl): issue error in formal mode on
8734         incomplete type
8735         (Analyze_Object_Declaration): issue error in formal mode on object
8736         declaration which does not respect SPARK restrictions
8737         (Analyze_Subtype_Declaration): issue error in formal mode on subtype
8738         declaration which does not respect SPARK restrictions
8739         (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
8740         error in formal mode on digits or delta constraint
8741         (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
8742         decimal fixed point type
8743         (Derived_Type_Declaration): issue error in formal mode on derived type
8744         other than type extensions of tagged record types
8745         * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
8746         with check on access definition
8747         * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
8748         mode on protected definition.
8749         (Analyze_Task_Definition): issue error in formal mode on task definition
8750
8751 2011-08-02  Robert Dewar  <dewar@adacore.com>
8752
8753         * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
8754
8755 2011-08-02  Javier Miranda  <miranda@adacore.com>
8756
8757         * sem_ch6.adb (Can_Override_Operator): New function.
8758         (Verify_Overriding_Indicator): Add missing code to check overriding
8759         indicator in operators. Fixes regression.
8760         (Check_Overriding_Indicator): Minor reformating after replacing the
8761         code that evaluates if the subprogram can override an operator by
8762         invocations to the above new function.
8763         * einfo.adb
8764         (Write_Field26_Name): Add missing code to ensure that, following
8765         the documentation in einfo.ads, this field is not shown as attribute
8766         "Static_Initialization" on non-dispatching functions.
8767
8768 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
8769
8770         * sem_res.adb (Resolve_Call): A call to
8771         Ada.Real_Time.Timing_Events.Set_Handler violates restriction
8772         No_Relative_Delay (AI-0211) only when it sets a relative timing event,
8773         i.e., when the second parameter is of type Time_Span.
8774
8775 2011-08-02  Vincent Celier  <celier@adacore.com>
8776
8777         * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
8778         with an archive instead of -L<library dir> -l<library name>.
8779
8780 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8781
8782         * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
8783         mark the base types In_Use in addition to making the operations
8784         use_visible.
8785
8786 2011-08-02  Ed Falis  <falis@adacore.com>
8787
8788         * init.c: add and setup __gnat_signal_mask for the exception signals
8789         * s-inmaop-vxworks.adb: new file.
8790         * s-intman-vxworks.adb: remove unnecessary initializations and
8791         simplify remaining
8792         * s-intman-vxworks.ads: remove unnecessary variable
8793         * s-taprop-vxworks.adb: simplify signal initialization
8794
8795 2011-08-02  Robert Dewar  <dewar@adacore.com>
8796
8797         * sem_ch8.adb: Minor code reorganization, comment updates.
8798
8799 2011-08-02  Robert Dewar  <dewar@adacore.com>
8800
8801         * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
8802         * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
8803         here from Sem_Res.
8804         (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
8805         (Matching_Static_Array_Bounds): Moved here from Sem_Res
8806
8807 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8808
8809         * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
8810         * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
8811         * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
8812         use_type_clauses, to handle more efficiently use_type and use_all_type
8813         constructs.
8814         * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
8815         Ada2012 Use_All_Type clause.
8816         (Use_Class_Wide_Operations): new procedure.
8817
8818 2011-08-02  Robert Dewar  <dewar@adacore.com>
8819
8820         * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
8821         sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
8822         expression to expression function.
8823
8824 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8825
8826         * sem_ch4.adb: transform simple Ada2012 membership into equality only
8827         if types are compatible.
8828
8829 2011-08-02  Yannick Moy  <moy@adacore.com>
8830
8831         * sem_res.adb (Matching_Static_Array_Bounds): new function which
8832         returns True if its argument array types have same dimension and same
8833         static bounds at each index.
8834         (Resolve_Actuals): issue an error in formal mode on actuals passed as
8835         OUT or IN OUT paramaters which are not view conversions in SPARK.
8836         (Resolve_Arithmetic_Op): issue an error in formal mode on
8837         multiplication or division with operands of fixed point types which are
8838         not qualified or explicitly converted.
8839         (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
8840         Boolean or array type (except String) operands.
8841         (Resolve_Equality_Op): issue an error in formal mode on equality
8842         operators for array types other than String with non-matching static
8843         bounds.
8844         (Resolve_Logical_Op): issue an error in formal mode on logical operators
8845         for array types with non-matching static bounds. Factorize the code in
8846         Matching_Static_Array_Bounds.
8847         (Resolve_Qualified_Expression): issue an error in formal mode on
8848         qualified expressions for array types with non-matching static bounds.
8849         (Resolve_Type_Conversion): issue an error in formal mode on type
8850         conversion for array types with non-matching static bounds
8851
8852 2011-08-02  Robert Dewar  <dewar@adacore.com>
8853
8854         * par-ch10.adb: Minor code reorganization (use Nkind_In).
8855
8856 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8857
8858         * par-ch9.adb: save location of entry for proper error message.
8859
8860 2011-08-02  Javier Miranda  <miranda@adacore.com>
8861
8862         * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
8863         (Use_Full_View) which permits this routine to climb through the
8864         ancestors using the full-view of private parents.
8865         * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
8866         Use_Full_View to true in calls to Is_Ancestor.
8867         * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
8868         true in call to Is_Ancestor.
8869         * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
8870         Use_Full_View to true in call to Is_Ancestor.
8871         * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
8872         call to Is_Ancestor.
8873         * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
8874         Use_Full_View to true in calls to Is_Ancestor.
8875         * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
8876         Make_Select_Specific_Data_Table, Register_Primitive,
8877         Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
8878         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
8879         to true in call to Is_Ancestor.
8880         * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
8881         Use_Full_View to true in calls to Is_Ancestor.
8882         * exp_cg.adb
8883         (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
8884         (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
8885
8886 2011-08-02  Robert Dewar  <dewar@adacore.com>
8887
8888         * gnat_rm.texi: Minor reformatting.
8889         * sem_prag.adb: Minor reformatting.
8890
8891 2011-08-02  Tristan Gingold  <gingold@adacore.com>
8892
8893         * vms_data.ads: Add VMS qualifier for -gnateP.
8894
8895 2011-08-02  Robert Dewar  <dewar@adacore.com>
8896
8897         * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
8898         * par-ch7.adb (P_Package): Proper placement of aspects for package
8899         decl/instantiation.
8900         * par-endh.adb (Check_End): Ad Is_Sloc parameter
8901         (End_Statements): Add Is_Sloc parameterr
8902         * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
8903         (Check_End): Ad Is_Sloc parameter
8904         (End_Statements): Add Is_Sloc parameterr
8905
8906 2011-08-02  Vincent Celier  <celier@adacore.com>
8907
8908         * ug_words: Add VMS qualifier equivalent to -gnateP:
8909         /SYMBOL_PREPROCESSING.
8910
8911 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
8912
8913         * gnat-style.texi: For hexadecimal numeric literals the typical
8914         grouping of digits is 4 to represent 2 bytes.
8915         A procedure spec which is split into several lines is indented two
8916         characters.
8917
8918 2011-08-02  Yannick Moy  <moy@adacore.com>
8919
8920         * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
8921         * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
8922         (Resolve_Aggregate): issue errors in formal modes when aggregate is not
8923         properly qualified
8924         (Resolve_Array_Aggregate): issue errors in formal modes on non-static
8925         choice in array aggregate
8926         (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
8927         mark as ancestor
8928         (Resolve_Record_Aggregate): issue errors in formal modes on mixed
8929         positional and named aggregate for record, or others in record
8930         aggregate, or multiple choice in record aggregate
8931         * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
8932         array operands to logical operations AND, OR and XOR do not have the
8933         same static lower and higher bounds
8934         * sem_ch5.adb, sinfo.ads: Correct typos in comments
8935
8936 2011-08-01  Robert Dewar  <dewar@adacore.com>
8937
8938         * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
8939         Replaces Last_Source_Node_In_Sequence.
8940         * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
8941         * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
8942         parens and blank in string (this was inconsistently implemented).
8943         * errout.ads
8944         (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
8945         blank in string (this was inconsistently implemented).
8946         * gnat1drv.adb
8947         (Set_Global_Switches): Set formal mode switches appropriately
8948         * opt.ads, opt.adb: Formal mode is now global switches, more consistent
8949         * par-prag.adb
8950         (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
8951         call Set_Error_Msg_Lang to set "spark" as language name.
8952         * par.adb: Remove unnecessary call to set formal language for errout
8953         * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
8954         appropriately and call Set_Error_Msg_Lang to set "spark" as language
8955         name.
8956         * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
8957         calls to it, moved after resolution so that types are known
8958         * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
8959         result of concatenation is not of type String
8960         (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
8961         concatenation is not properly restricted
8962         * gnat_rm.texi: Add doc on pragma Spark_95.
8963         * gcc-interface/Makefile.in: Remove obsolete target pairs for
8964         Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
8965         * gcc-interface/Make-lang.in: Update dependencies.
8966
8967 2011-08-01  Javier Miranda  <miranda@adacore.com>
8968
8969         * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
8970         condition that detects if the overridden operation must replace an
8971         existing entity.
8972
8973 2011-08-01  Javier Miranda  <miranda@adacore.com>
8974
8975         * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
8976         code declarations inserted by Insert_Actions in each alternative of the
8977         N_Case_Expression node.
8978
8979 2011-08-01  Robert Dewar  <dewar@adacore.com>
8980
8981         * sem_ch6.adb: Minor code reorganization.
8982         * sem_util.adb: Minor reformatting.
8983
8984 2011-08-01  Pascal Obry  <obry@adacore.com>
8985
8986         * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
8987         * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
8988
8989 2011-08-01  Yannick Moy  <moy@adacore.com>
8990
8991         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
8992         literal or operator symbol which is prefixed
8993         * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
8994         mode on access attributes.
8995         * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
8996         that concatenation operands are properly restricted in formal mode
8997         (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
8998         Analyze_Concatenation_Operand. Issue an error in formal mode if the
8999         result of the concatenation has a type different from String.
9000         (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
9001         Analyze_Quantified_Expression, Analyze_Slice,
9002         Analyze_Null): issue an error in formal mode on unsupported constructs
9003         * sem_ch5.adb
9004         (Analyze_Block_Statement): only issue error on source block statement
9005         * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
9006         function which returns the last node in a list of nodes for which
9007         Comes_From_Source returns True, if any
9008         * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
9009         Last_Source_Node_In_Sequence
9010         * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
9011         Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
9012         mode on unsupported constructs
9013         * sem_ch9.adb Do not return after issuing error in formal mode, as the
9014         rest of the actions may be needed later on since the error is marked as
9015         not serious.
9016         * sinfo.ads: Typos in comments.
9017
9018 2011-08-01  Pascal Obry  <obry@adacore.com>
9019
9020         * projects.texi: Minor editing.
9021
9022 2011-08-01  Yannick Moy  <moy@adacore.com>
9023
9024         * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
9025         insertion character ~~
9026         * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
9027         (Set_Error_Msg_Lang): new procedure which fixes the language for use
9028         with insertion character ~~
9029         (Set_Msg_Text): treat insertion character ~~
9030         * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
9031         sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
9032         Formal_Error_Msg_... procedures by equivalent Error_Msg_...
9033         procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
9034         errors related to the formal language restriction not serious
9035         (insertion character |).
9036         * par.adb (Par): set formal language for error messages if needed
9037         * sem_ch6.adb (Check_Missing_Return): take into account possible
9038         generated statements at the end of the function
9039         * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
9040         enumeration value to define a new pragma SPARK_95
9041         * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
9042         SPARK_Version): new type and variables to store the SPARK version
9043         (none by default).
9044         (SPARK_Mode): return True when SPARK_Version is set
9045         * par-prag.adb: Correct indentation
9046         (Prag): take Pragma_SPARK_95 into account
9047         * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
9048         into account.
9049
9050 2011-08-01  Robert Dewar  <dewar@adacore.com>
9051
9052         * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
9053         sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
9054         sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
9055
9056 2011-08-01  Pascal Obry  <obry@adacore.com>
9057
9058         * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
9059         Target_Name to Get_Path call.
9060         (Parse_Single_Project): Likewise.
9061         (Post_Parse_Context_Clause): Likewise.
9062         * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
9063         Call Initialise_Project_Path with the proper Target_Name.
9064         (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
9065         search path.
9066         (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
9067         with the proper Target_Name.
9068         * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
9069         Part.Parse routine.
9070         (Parse_Project_And_Apply_Config): Likewise.
9071         * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
9072         This is fine as this part of the code is supporting only native
9073         compilation.
9074         * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
9075         is fine as this part of the code is supporting only native compilation.
9076
9077 2011-08-01  Yannick Moy  <moy@adacore.com>
9078
9079         * sem_util.adb (Enter_Name): issue error in formal mode on declaration
9080         of homonym, unless the homonym is one of the cases allowed in SPARK
9081         * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
9082         package declaration occurring after a body.
9083
9084 2011-08-01  Robert Dewar  <dewar@adacore.com>
9085
9086         * checks.adb, exp_ch4.adb: Minor reformatting.
9087
9088 2011-08-01  Javier Miranda  <miranda@adacore.com>
9089
9090         * einfo.ads (Access_Disp_Table): Fix documentation.
9091         (Dispatch_Table_Wrappers): Fix documentation.
9092
9093 2011-08-01  Pascal Obry  <obry@adacore.com>
9094
9095         * prj-env.adb, prj-env.ads: Minor reformatting.
9096
9097 2011-08-01  Yannick Moy  <moy@adacore.com>
9098
9099         * sem_util.ads, sem_util.adb, par.adb, par_util.adb
9100         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
9101         procedures out of these packages.
9102         * errout.ads, errout.adb
9103         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
9104         procedures in of this package
9105         (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
9106         * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
9107         on misplaced later vs initial declarations, like in Ada 83
9108         * sem_attr.adb (Processing for Analyze_Attribute): issue error in
9109         formal mode on attribute of private type whose full type declaration
9110         is not visible
9111         * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
9112         package declaration inside a package specification
9113         (Analyze_Full_Type_Declaration): issue error in formal mode on
9114         controlled type or discriminant type
9115         * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
9116         user-defined operator means that it should come from the source
9117         (New_Overloaded_Entity): issue error in formal mode on overloaded
9118         entity.
9119         * sem_ch6.ads, sem_ch13.ads: typos in comments.
9120
9121 2011-08-01  Thomas Quinot  <quinot@adacore.com>
9122
9123         * atree.adb: Minor reformatting.
9124         * checks.adb: Minor reformatting.
9125
9126 2011-08-01  Vincent Celier  <celier@adacore.com>
9127
9128         * s-parame-vms-ia64.ads: Fix typo in comment
9129         Minor reformatting
9130         * s-parame-vms-restrict.ads: Removed, unused.
9131
9132 2011-08-01  Javier Miranda  <miranda@adacore.com>
9133
9134         * exp_ch3.adb
9135         (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
9136         * sem_ch3.adb
9137         (Constrain_Index): Remove side effects in the evaluation of the bounds.
9138         * sem_ch3.ads, sem_ch3.adb
9139         (Is_Constant_Bound): New extended version of the subprogram that was
9140         previously located inside function Exp_Ch3.Is_Variable_Size_Array.
9141         Moved here since it is shared by routines of sem_ch3 and exp_ch3.
9142         * sem_aux.ads (Constant_Value): Fix typo in comment.
9143         * checks.adb (Generate_Index_Checks): New implementation which, for
9144         array objects with constant bounds, generates the runtime check
9145         referencing the bounds of the array type. For other cases this routine
9146         provides its previous behavior obtaining such values from the array
9147         object.
9148         * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
9149         parent type.
9150         * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
9151         we cannot have semantic interpretations of the new node.
9152
9153 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
9154
9155         * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
9156         expressions.
9157
9158 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
9159
9160         * sem_ch8.adb: Minor code editing.
9161         * s-vxwext.adb: Remove trailing space.
9162         * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
9163         consistency with other files.
9164
9165 2011-08-01  Thomas Quinot  <quinot@adacore.com>
9166
9167         * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
9168
9169 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
9170
9171         * par-ch10.adb: reject parameterized expressions as compilation unit.
9172         * sem_ch4.adb: handle properly conditional expression with overloaded
9173         then_clause and no else_clause.
9174
9175 2011-08-01  Tristan Gingold  <gingold@adacore.com>
9176
9177         * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
9178         like done by System.Aux_DEC.
9179         * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
9180
9181 2011-08-01  Yannick Moy  <moy@adacore.com>
9182
9183         * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
9184         missing label at end of declaration (subprogram or package)
9185         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
9186         of positional and named parameter association
9187         * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
9188         Error_Msg_SP which adds a prefix to the error message giving the name
9189         of the formal language analyzed
9190         * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
9191         access result type in subprogram, unconstrained array as result type,.
9192         (Analyze_Subprogram_Declaration): issue an error in formal mode for null
9193         procedure
9194         * sem_ch8.adb: Code clean up.
9195
9196 2011-08-01  Javier Miranda  <miranda@adacore.com>
9197
9198         * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
9199         * einfo.ads (Access_Disp_Table): Fix documentation.
9200         (Dispatch_Table_Wrappers): Fix documentation.
9201         * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
9202         Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
9203         to enforce the documentation of this attribute.
9204         (Set_Is_Interface): Cleanup the assertion.
9205         * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
9206         the Underlying_Type entity before reading attribute Access_Disp_Table.
9207         * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
9208         Locate the Underlying_Type before reading attribute Access_Disp_Table.
9209         * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
9210         the Underlying_Type entity before reading attribute Access_Disp_Table.
9211         * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
9212         Locate the Underlying_Type entity before reading attribute
9213         Access_Disp_Table.
9214
9215 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
9216
9217         * s-poosiz.ads: Additional overriding indicators.
9218
9219 2011-08-01  Yannick Moy  <moy@adacore.com>
9220
9221         * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
9222         formal mode.
9223         (Analyze_Iteration_Scheme): issue error in formal mode when loop
9224         parameter specification does not include a subtype mark.
9225         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
9226         formal mode on abstract subprogram.
9227         (Analyze_Subprogram_Specification): issue error in formal mode on
9228         user-defined operator.
9229         (Process_Formals): issue error in formal mode on access parameter and
9230         default expression.
9231         * sem_ch9.adb (Analyze_Abort_Statement,
9232         Analyze_Accept_Statement, Analyze_Asynchronous_Select,
9233         Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
9234         Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
9235         Analyze_Requeue, Analyze_Selective_Accept,
9236         Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
9237         * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
9238         issue error in formal mode on user-defined raise statement.
9239
9240 2011-08-01  Thomas Quinot  <quinot@adacore.com>
9241
9242         * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
9243         declaration being hidden when overriding an implicit inherited
9244         subprogram.
9245         * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
9246         (-gnats), do not complain about a source file that contains only a
9247         pragma No_Body.
9248
9249 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
9250
9251         * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
9252         variable if already set.
9253
9254 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
9255
9256         * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
9257         g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
9258         s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
9259         g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
9260         g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
9261         g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
9262         g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
9263         g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
9264         g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
9265         g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
9266         g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
9267         s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
9268         g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
9269         s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
9270         g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
9271         g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
9272         g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
9273         g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
9274         g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
9275         g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
9276         s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
9277         s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
9278         a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
9279         s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
9280         s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
9281         g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
9282         g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
9283         g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
9284         g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
9285         g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
9286         g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
9287         s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
9288         s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
9289         g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
9290         g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
9291         s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
9292         s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
9293         g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
9294         g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
9295         g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
9296         s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
9297         g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
9298         g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
9299         g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
9300         s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
9301         g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
9302         g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
9303         g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
9304         s-osinte-mingw.ads: Update to GPLv3 run-time license.
9305         Use GNAT instead of GNARL.
9306
9307 2011-08-01  Bob Duff  <duff@adacore.com>
9308
9309         * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
9310         a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
9311         a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
9312         reformatting.
9313
9314 2011-08-01  Yannick Moy  <moy@adacore.com>
9315
9316         * debug.adb (d.D) reverve flag for the SPARK mode
9317         (d.E) reverve flag for SPARK generation mode
9318         (d.F) reverve flag for Why generation mode
9319         * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
9320         ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode):  New
9321         functions which return True when the corresponding modes are set
9322         (Formal_Language): return "spark" or "alfa" when in formal verification
9323         mode.
9324         * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
9325         Error_Msg to prefix the error message with a tag giving the formal
9326         language
9327         (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
9328         message with a tag giving the formal language
9329         * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
9330         block statement
9331         (Analyze_Case_Statement): issue error in formal mode on case statement
9332         with a single "others" case alternative
9333         (Analyze_Exit_Statement): issue errors in formal mode on exit
9334         statements which do not respect SPARK restrictions
9335         (Analyze_Goto_Statement): issue error in formal mode on goto statement
9336         (Check_Unreachable_Code): always issue an error (not a warning) in
9337         formal mode on unreachable code (concerns both code after an infinite
9338         loop and after an unconditional jump, both not allowed in SPARK)
9339         * sem_ch6.adb (Analyze_Return_Statement): add call to
9340         Set_Return_Present for a procedure containing a return statement
9341         (already done for functions in Analyze_Function_Return)
9342         (Analyze_Function_Return): issue error in formal mode on extended
9343         return or if return is not last statement in function
9344         (Check_Missing_Return): issue error in formal mode if function does
9345         not end with return or if procedure contains a return
9346         * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
9347         function to detect if there is an inner scope of its parameter S which
9348         is a loop.
9349
9350 2011-08-01  Thomas Quinot  <quinot@adacore.com>
9351
9352         * sem_ch6.ads: Minor reformatting.
9353
9354 2011-08-01  Javier Miranda  <miranda@adacore.com>
9355
9356         * sem_util.adb (Abstract_Interface_List): Complete condition when
9357         processing private type declarations to avoid reading unavailable
9358         attribute.
9359         (Is_Synchronized_Tagged_Type): Complete condition when processing
9360         private extension declaration nodes to avoid reading unavailable
9361         attribute.
9362
9363 2011-08-01  Thomas Quinot  <quinot@adacore.com>
9364
9365         * sem_ch3.adb: Minor reformatting.
9366
9367 2011-08-01  Thomas Quinot  <quinot@adacore.com>
9368
9369         * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
9370         i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
9371         s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
9372         s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
9373         for VMS, instead parametrize the common implementation with
9374         System.Parameters declarations.
9375
9376 2011-08-01  Eric Botcazou  <ebotcazou@adacore.com>
9377
9378         * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
9379
9380 2011-08-01  Tristan Gingold  <gingold@adacore.com>
9381
9382         * seh_init.c: Fix SEH handler installation on win64.
9383
9384 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
9385
9386         * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
9387         double analysis of an anonymous access to subprogram, because it can
9388         lead to improper sharing of profiles and a back-end crash.
9389
9390 2011-08-01  Robert Dewar  <dewar@adacore.com>
9391
9392         * make.adb, sem_ch4.adb: Minor reformatting.
9393         * gcc-interface/Make-lang.in: Update dependencies.
9394         * sem_util.adb, exp_ch5.adb: Minor reformatting.
9395
9396 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
9397
9398         * gnat_rm.texi: Fix definition of Long_Integer.
9399
9400 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
9401
9402         * exp_aggr.adb: check limit size of static aggregate unconditionally,
9403         to prevent storage exhaustion.
9404         * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
9405         finalized is a function body, insert the cleanup code before the final
9406         return statement, to prevent spurious warnings.
9407         * s-pooglo.ads: add overriding indicator.
9408
9409 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
9410
9411         * sem_ch4.adb (Operator_Check): improve error message when both a
9412         with_clause and a use_clause are needed to make operator usage legal.
9413         * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
9414         determine whether a compilation unit is visible within an other,
9415         either through a with_clause in the current unit, or a with_clause in
9416         its library unit or one one of its parents.
9417
9418 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
9419
9420         * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
9421         over an arbitrary expression of an array or container type.
9422         * lib-xref.adb: clarify comment.
9423
9424 2011-08-01  Bob Duff  <duff@adacore.com>
9425
9426         * einfo.ads: Minor reformatting.
9427         * debug.adb: Minor comment improvement.
9428
9429 2011-08-01  Javier Miranda  <miranda@adacore.com>
9430
9431         * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
9432         consider hidden subprograms as valid candidates.
9433
9434 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
9435
9436         * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
9437
9438 2011-08-01  Vasiliy Fofanov  <fofanov@adacore.com>
9439
9440         * gnat_ugn.texi: Fix typo.
9441
9442 2011-08-01  Robert Dewar  <dewar@adacore.com>
9443
9444         * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
9445         lib-xref.adb: Minor reformatting
9446
9447 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
9448
9449         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
9450         when to generate a call to Move_Final_List.
9451         (Has_Controlled_Parts): Remove this function.
9452
9453 2011-08-01  Geert Bosch  <bosch@adacore.com>
9454
9455         * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
9456         "," in choice list.
9457
9458 2011-08-01  Thomas Quinot  <quinot@adacore.com>
9459
9460         * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
9461         explicit raise of a predefined exception as Comes_From_Source if the
9462         original N_Raise_Statement comes from source.
9463
9464 2011-08-01  Robert Dewar  <dewar@adacore.com>
9465
9466         * sinfo.ads: Add comment.
9467         * sem_ch6.adb: Minor reformatting.
9468
9469 2011-08-01  Robert Dewar  <dewar@adacore.com>
9470
9471         * freeze.adb (Freeze_Entity): Refine check for bad component size
9472         clause to avoid rejecting confirming clause when atomic/aliased present.
9473
9474 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
9475
9476         * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
9477         better determine whether an entity reference is a write.
9478         * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
9479         subcomponent.
9480         * lib-xref.adb (Output_References): Do no suppress a read reference at
9481         the same location as an immediately preceeding modify-reference, to
9482         handle properly in-out actuals.
9483
9484 2011-08-01  Tristan Gingold  <gingold@adacore.com>
9485
9486         * env.c (__gnat_setenv) [VMS]: Refine previous change.
9487
9488 2011-08-01  Quentin Ochem  <ochem@adacore.com>
9489
9490         * i-cstrin.adb (New_String): Changed implementation, now uses only the
9491         heap to compute the result.
9492
9493 2011-08-01  Robert Dewar  <dewar@adacore.com>
9494
9495         * atree.ads: Minor reformatting.
9496
9497 2011-08-01  Emmanuel Briot  <briot@adacore.com>
9498
9499         * g-expect.adb (Get_Command_Output): Fix memory leak.
9500
9501 2011-08-01  Geert Bosch  <bosch@adacore.com>
9502
9503         * cstand.adb (P_Float_Type): New procedure to print the definition of
9504         predefined fpt types.
9505         (P_Mixed_Name): New procedure to print a name using mixed case
9506         (Print_Standard): Use P_Float_Type for printing floating point types
9507         * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
9508         precision IEEE float.
9509
9510 2011-08-01  Thomas Quinot  <quinot@adacore.com>
9511
9512         * sem_ch3.adb: Minor reformatting.
9513
9514 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
9515
9516         * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
9517         the completion of a generic function, insert the new body rather than
9518         rewriting the original.
9519
9520 2011-08-01  Yannick Moy  <moy@adacore.com>
9521
9522         * sinfo.ads, errout.ads: Typos in comments.
9523
9524 2011-08-01  Robert Dewar  <dewar@adacore.com>
9525
9526         * par-endh.adb: Minor reformatting.
9527
9528 2011-08-01  Robert Dewar  <dewar@adacore.com>
9529
9530         * aspects.ads, aspects.adb: Add aspects for library unit pragmas
9531         (Pre_Post_Aspects): New subtype.
9532         * par-ch12.adb (P_Generic): New syntax for aspects in packages
9533         * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
9534         * par-ch7.adb (P_Package): Remove Decl parameter
9535         (P_Package): Handle new syntax for aspects (before IS)
9536         * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
9537         new aspect syntax
9538         (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
9539         * par.adb (P_Aspect_Specifications): Add Semicolon parameter
9540         (P_Package): Remove Decl parameter
9541         * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
9542         aspects
9543         * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
9544         specs
9545         * sem_util.ads, sem_util.adb (Static_Boolean): New function
9546         * sinfo.ads: Document new syntax for aspects in packages etc.
9547         * sprint.adb: Handle new syntax of aspects before IS in package
9548
9549 2011-08-01  Thomas Quinot  <quinot@adacore.com>
9550
9551         * atree.ads: Minor reformatting.
9552         * sem_prag.adb: Minor reformatting.
9553
9554 2011-08-01  Robert Dewar  <dewar@adacore.com>
9555
9556         * exp_util.adb (Insert_Actions): Fix error in handling Actions for
9557         case expr alternative.
9558
9559 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
9560
9561         * sem_ch12.adb: Fix typo.
9562
9563 2011-08-01  Geert Bosch  <bosch@adacore.com>
9564
9565         * sem_prag.adb (Check_No_Link_Name): New procedure.
9566         (Process_Import_Or_Interface): Use Check_No_Link_Name.
9567         * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
9568         instead of Standard_Long_Long_Float_Size global. Preparation for
9569         eventual removal of per type constants.
9570         * exp_util.ads (Get_Stream_Size): New function returning the stream
9571         size value of subtype E.
9572         * exp_util.adb (Get_Stream_Size): Implement new function.
9573         * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
9574         function.
9575         * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
9576         * einfo.adb:
9577         (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
9578
9579 2011-08-01  Geert Bosch  <bosch@adacore.com>
9580
9581         * cstand.adb: Fix comments.
9582         * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
9583         count of arguments.
9584
9585 2011-08-01  Robert Dewar  <dewar@adacore.com>
9586
9587         * exp_ch4.adb, sem_cat.adb: Minor reformatting.
9588
9589 2011-08-01  Geert Bosch  <bosch@adacore.com>
9590
9591         * atree.ads: Fix comment.
9592
9593 2011-08-01  Robert Dewar  <dewar@adacore.com>
9594
9595         * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
9596         * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
9597         * par.adb: Add with for Namet.Sp.
9598         * par-tchk.adb: Minor reformatting.
9599
9600 2011-08-01  Vincent Celier  <celier@adacore.com>
9601
9602         * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
9603         (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
9604         of the init procedure of a SAL.
9605         * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
9606         New procedure.
9607
9608 2011-08-01  Thomas Quinot  <quinot@adacore.com>
9609
9610         * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
9611         reformatting.
9612
9613 2011-08-01  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9614
9615         * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
9616
9617 2011-08-01  Thomas Quinot  <quinot@adacore.com>
9618
9619         * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
9620         conformant with its spec (return True only for types that have
9621         an overriding Initialize primitive operation that prevents them from
9622         having preelaborable initialization).
9623         * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
9624         initialization for controlled types in Ada 2005 or later mode.
9625
9626 2011-08-01  Robert Dewar  <dewar@adacore.com>
9627
9628         * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
9629         Postcondition.
9630         (Same_Aspect): New function.
9631         * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
9632         Type_Invariant, Precondition, Postcondition.
9633         * snames.ads-tmpl: Add Name_Type_Invariant.
9634
9635 2011-08-01  Robert Dewar  <dewar@adacore.com>
9636
9637         * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
9638         here.
9639         (Freeze_All_Ent): Fix error in handling inherited aspects.
9640         * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
9641         already analyzed, but don't skip entire processing of a declaration,
9642         that's wrong in some cases of declarations being rewritten.
9643         (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
9644         Don't delay for integer, string literals
9645         Treat predicates in usual manner for delay, remove special case code,
9646         not needed.
9647         (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
9648         (Build_Predicate_Function): Update saved expression in aspect
9649         (Build_Invariant_Procedure): Update saved expression in aspect
9650         * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
9651         of replacement of discriminant references if the reference is simple.
9652
9653 2011-08-01  Robert Dewar  <dewar@adacore.com>
9654
9655         * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
9656         * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
9657         Static_Predicate and Dynamic_Predicate.
9658         (Build_Predicate_Function): Add processing for Static_Predicate
9659         and Dynamic_Predicate.
9660         * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
9661         (From_Static_Predicate): New flag
9662         * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
9663
9664 2011-08-01  Robert Dewar  <dewar@adacore.com>
9665
9666         * usage.adb: Documentation cleanup for Ada version modes in usage.
9667         * expander.adb: Minor reformatting.
9668
9669 2011-08-01  Robert Dewar  <dewar@adacore.com>
9670
9671         * atree.ads: Minor comment fix.
9672         * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
9673         a-witeio.ads, sem_prag.adb: Minor reformatting.
9674
9675 2011-08-01  Doug Rupp  <rupp@adacore.com>
9676
9677         * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
9678         pointers. Use descrip.h header file for convenience. Add some
9679         comments.
9680
9681 2011-08-01  Robert Dewar  <dewar@adacore.com>
9682
9683         * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
9684         (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
9685         * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
9686         New procedure.
9687         (Check_Aspect_At_End_Of_Declarations): New procedure
9688         (Analye_Aspect_Specification): Minor changes for above procedures
9689         * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
9690         specification node as well.
9691
9692 2011-08-01  Pascal Obry  <obry@adacore.com>
9693
9694         * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
9695         Windows files. Use GetFilesAttributes() in this case to check for file
9696         existence instead of returning with an error code.
9697
9698 2011-08-01  Vincent Celier  <celier@adacore.com>
9699
9700         * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
9701         High is above Source length.
9702
9703 2011-08-01  Robert Dewar  <dewar@adacore.com>
9704
9705         * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
9706
9707 2011-08-01  Robert Dewar  <dewar@adacore.com>
9708
9709         * aspects.ads (Boolean_Aspects): New subtype.
9710         * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
9711         for derived types in cases where the parent type and derived type have
9712         aspects.
9713         * freeze.adb (Freeze_Entity): Fix problems in handling derived type
9714         with aspects when parent type also has aspects.
9715         (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
9716         boolean expression at this point).
9717         * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
9718         accordance with final decision on the Ada 2012 feature.
9719         * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
9720
9721 2011-08-01  Matthew Heaney  <heaney@adacore.com>
9722
9723         * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
9724
9725 2011-08-01  Pascal Obry  <obry@adacore.com>
9726
9727         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
9728         Fix Replace_Slice when High is above current string size.
9729         (Replace_Slice): Fix DL computation when High is above current
9730         string length.
9731
9732 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
9733
9734         * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
9735
9736 2011-08-01  Matthew Heaney  <heaney@adacore.com>
9737
9738         * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
9739         of node.
9740
9741 2011-08-01  Pascal Obry  <obry@adacore.com>
9742
9743         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
9744         reformatting.
9745
9746 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
9747
9748         * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
9749         access to protected subprograms in generic bodies.
9750         * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
9751         protected type, indicate that the convention of the subprogram is
9752         Convention_Protected, because it may be used in subsequent declarations
9753         within the protected declaration.
9754
9755 2011-08-01  Vincent Celier  <celier@adacore.com>
9756
9757         * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
9758         and "final" procedures when the name of the library is "ada", to avoid
9759         duplicate symbols "adainit" and "adafinal" in executables.
9760
9761 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
9762
9763         * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
9764         quantified expression that appears within a postcondition and uses the
9765         Ada2012 'Result attribute.
9766
9767 2011-07-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9768
9769         * init.c (__gnat_error_handler): Cast reason to int.
9770         (__gnat_install_handler): Explain sa_sigaction use.
9771
9772 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
9773
9774         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
9775         subprogram has copy-in copy-out parameters, try to promote the mode of
9776         the return type if it is passed in registers.
9777
9778 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
9779
9780         * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
9781         left operand as addressable.
9782
9783 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
9784
9785         * gcc-interface/gigi.h (build_function_stub): Remove.
9786         (build_return_expr): Likewise.
9787         (convert_vms_descriptor): Declare.
9788         * gcc-interface/utils.c (convert_vms_descriptor): Make global.
9789         (build_function_stub): Move to...
9790         * gcc-interface/utils2.c (build_return_expr): Move to...
9791         * gcc-interface/trans.c (build_function_stub): ...here.
9792         (build_return_expr): ...here.
9793         (Subprogram_Body_to_gnu): Add local variable for language_function.
9794         Disconnect the parameter attributes cache, if any, once done with it.
9795         Call end_subprog_body only after setting the end_locus.
9796         Build the stub associated with the function, if any, at the very end.
9797         (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
9798         variables and streamline control flow.
9799
9800 2011-07-23  Arnaud Charlet  <charlet@adacore.com>
9801
9802         PR ada/49819
9803         * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
9804         g-trasym-dwarf.adb.
9805
9806 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9807
9808         PR bootstrap/49794
9809         * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
9810         Assign to act.sa_sigaction.
9811         * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
9812         current->return_address to char * before arithmetic.
9813
9814 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9815
9816         * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
9817         Correct argument types.
9818         Extract code from reason.
9819         (__gnat_install_handler): Assign to act.sa_sigaction.
9820
9821 2011-07-21  Eric Botcazou  <ebotcazou@adacore.com>
9822
9823         * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
9824         (GNAT1_OBJS): ...here.
9825
9826 2011-07-15  Eric Botcazou  <ebotcazou@adacore.com>
9827
9828         PR ada/48711
9829         * g-socthi-mingw.adb (Fill): Fix formatting.
9830
9831         * gcc-interface/gigi.h: Move around comment.
9832
9833 2011-07-14  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
9834
9835         PR ada/46350
9836         * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
9837
9838 2011-07-14  Florian Weimer  <fw@deneb.enyo.de>
9839
9840         PR ada/48711
9841         * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
9842
9843 2011-07-13  Eric Botcazou  <ebotcazou@adacore.com>
9844
9845         * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
9846         range comparison if Pmode is SImode.
9847
9848 2011-07-12  Laurent GUERBY  <laurent@guerby.net>
9849             Eric Botcazou  <ebotcazou@adacore.com>
9850
9851         * adadecode.c: Wrap up in extern "C" block.
9852         * adadecode.h: Likewise.
9853         * adaint.c: Likewise.  Remove 'const' keyword.
9854         * adaint.h: Likewise.
9855         * argv.c: Likewise.
9856         * atree.h: Likewise.
9857         * cio.c: Likewise.
9858         * cstreams.c: Likewise.
9859         * env.c: Likewise.
9860         * exit.c: Likewise.
9861         * fe.h: Likewise.
9862         * final.c: Likewise.
9863         * init.c: Likewise.
9864         * initialize.c: Likewise.
9865         * link.c: Likewise.
9866         * namet.h: Likewise.
9867         * nlists.h: Likewise.
9868         * raise.c: Likewise.
9869         * raise.h: Likewise.
9870         * repinfo.h: Likewise.
9871         * seh_init.c: Likewise.
9872         * targext.c: Likewise.
9873         * tracebak.c: Likewise.
9874         * uintp.h: Likewise.
9875         * urealp.h: Likewise.
9876         * xeinfo.adb: Wrap up generated C code in extern "C" block.
9877         * xsinfo.adb: Likewise.
9878         * xsnamest.adb: Likewise.
9879         * gcc-interface/gadaint.h: Wrap up in extern "C" block.
9880         * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
9881         * gcc-interface/misc.c: Likewise.
9882         * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
9883         (GNAT1_C_OBJS): Remove ada/b_gnat1.o.  List ada/seh_init.o and
9884         ada/targext.o here...
9885         (GNAT_ADA_OBJS): ...and not here.
9886         (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
9887         (GNATBIND_OBJS): Reorder.
9888
9889 2011-07-07  Richard Henderson  <rth@redhat.com>
9890
9891         * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
9892         dwarf2out_frame_init.
9893
9894 2011-07-07  Eric Botcazou  <ebotcazou@adacore.com>
9895
9896         * gcc-interface/misc.c (gnat_init): Tweak previous change.
9897
9898 2011-07-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9899
9900         PR target/39150
9901         * gcc-interface/Makefile.in: Handle x86_64-solaris2.
9902
9903 2011-07-06  Richard Guenther  <rguenther@suse.de>
9904
9905         * gcc-interface/misc.c (gnat_init): Merge calls to
9906         build_common_tree_nodes and build_common_tree_nodes_2.
9907         Re-initialize boolean_false_node.
9908
9909 2011-07-02  Eric Botcazou  <ebotcazou@adacore.com>
9910             Olivier Hainque  <hainque@adacore.com>
9911             Nicolas Setton  <setton@adacore.com>
9912
9913         * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
9914         the type according to the ARTIFICIAL_P parameter.
9915         (create_type_decl): Likewise.
9916         (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
9917
9918 2011-07-01  Eric Botcazou  <ebotcazou@adacore.com>
9919
9920         * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
9921         (gnatbind): Likewise.
9922
9923 2011-06-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9924
9925         * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
9926
9927 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
9928
9929         * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
9930         local variable throughout.  Remove useless call to Base_Type.
9931         (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
9932         Take it also into account for the volatileness of the field.  Set the
9933         TREE_SIDE_EFFECTS flag as well in this case.  Reorder some warnings.
9934
9935 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
9936
9937         * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
9938         on a dereference built for a by-ref object if it has an address clause.
9939
9940 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
9941
9942         * einfo.ads (Address_Taken): Document use for the second argument of
9943         Asm_Input and Asm_Output attributes.
9944         * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
9945         argument is an entity name, then set Address_Taken on it.
9946         <Attribute_Asm_Output>: Likewise.
9947         * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
9948         Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
9949         (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
9950         memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
9951
9952 2011-06-16  Joern Rennecke  <joern.rennecke@embecosm.com>
9953
9954         PR middle-end/46500
9955         * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
9956
9957 2011-06-14  Joseph Myers  <joseph@codesourcery.com>
9958
9959         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
9960         (ada/utils.o): Update dependencies.
9961         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
9962         ../../../libcpp/libcpp.a.
9963         * gcc-interface/utils.c: Include common/common-target.h.
9964         (process_attributes): Use targetm_common.have_named_sections.
9965
9966 2011-06-07  Richard Guenther  <rguenther@suse.de>
9967
9968         * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
9969         set_sizetype.
9970
9971 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
9972
9973         * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
9974         TREE_THIS_NOTRAP flag.
9975
9976 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
9977
9978         * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
9979         Fix thinko.
9980
9981 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
9982
9983         * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
9984         constants whose full view has discriminants specially.
9985
9986 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
9987
9988         * gcc-interface/utils.c: Include diagnostic.h.
9989         (gnat_write_global_declarations): Output debug information for all
9990         global type declarations before finalizing the compilation unit.
9991         * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
9992
9993 2011-05-25  Jakub Jelinek  <jakub@redhat.com>
9994
9995         * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
9996
9997 2011-05-25  Kai Tietz  <ktietz@redhat.com>
9998
9999         * adaint.c (__gnat_to_canonical_file_list_next): Use array
10000         initialization instead of const/none-const pointer assignment.
10001
10002 2011-05-24  Joseph Myers  <joseph@codesourcery.com>
10003
10004         * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
10005         $(EXTRA_GNAT1_OBJS).
10006         (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
10007         (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
10008         (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
10009         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
10010         libcommon-target.a instead of prefix.o.
10011
10012 2011-05-21  Joseph Myers  <joseph@codesourcery.com>
10013
10014         PR ada/49097
10015         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
10016
10017 2011-05-20  Joseph Myers  <joseph@codesourcery.com>
10018
10019         * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
10020         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
10021         instead of version.o.
10022
10023 2011-05-18  Kai Tietz <ktietz@redhat.com>
10024
10025         * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
10026         boolean_false_node instead of integer_zero_node.
10027         (convert_with_check): Likewise.
10028         * gcc-interface/decl.c (choices_to_gnu): Likewise.
10029
10030 2011-05-12  Eric Botcazou  <ebotcazou@adacore.com>
10031
10032         * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
10033         type of the parameter is an unconstrained array, convert the actual to
10034         the type of the formal in the In Out and Out cases as well.
10035
10036 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
10037
10038         * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
10039         call build_function_type_array or build_varargs_function_type_array
10040         instead.
10041         (create_subprog_type): Don't call build_function_type; call
10042         build_function_type_vec instead.
10043
10044 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
10045
10046         * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
10047         (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
10048         (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
10049
10050 2011-05-07  Eric Botcazou  <ebotcazou@adacore.com>
10051
10052         * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
10053
10054         * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
10055         * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
10056
10057 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
10058
10059         * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
10060
10061 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
10062
10063         * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
10064         instead of accessing TYPE_ARG_TYPES directly.
10065         * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
10066
10067 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
10068
10069         PR ada/48844
10070         * gcc-interface/gigi.h (get_variant_part): Declare.
10071         * gcc-interface/decl.c (get_variant_part): Make global.
10072         * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
10073         types have the same constant size, are record types and T1 has a
10074         variant part while T2 doesn't.
10075
10076 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
10077
10078         * gcc-interface/utils.c (begin_subprog_body): Do not call
10079         get_pending_sizes.
10080         (end_subprog_body): Likewise.
10081
10082 2011-05-04  Richard Guenther  <rguenther@suse.de>
10083
10084         * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
10085         int_const_binop.
10086         (pos_to_constructor): Likewise.
10087
10088 2011-05-03  Nathan Froyd  <froydnj@codesourcery.com>
10089             Eric Botcazou  <ebotcazou@adacore.com>
10090
10091         * gcc-interface/trans.c (gigi): Call build_function_type_list instead
10092         of build_function_type.  Adjust calls to...
10093         (build_raise_check): ...this.  Do not take a void_tree parameter.
10094         Call build_function_type_list instead of build_function_type.
10095         Fix head comment and swap couple of conditional blocks.
10096
10097 2011-04-30  Eric Botcazou  <ebotcazou@adacore.com>
10098
10099         * gnatvsn.ads (Library_Version): Bump to 4.7.
10100         (Current_Year): Bump to 2011.
10101
10102 2011-04-29  Michael Matz  <matz@suse.de>
10103
10104         * gcc-interface/misc.c (gnat_handle_option): Set
10105         warn_maybe_uninitialized.
10106
10107 2011-04-23  Gerald Pfeifer  <gerald@pfeifer.com>
10108
10109         * gnat_ugn.texi (Complexity Metrics Control): Update link to
10110         the Watson/McCabe paper.
10111
10112 2011-04-23  Jim Meyering  <meyering@redhat.com>
10113
10114         * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
10115
10116 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
10117
10118         * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
10119         onto the new type.
10120
10121 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
10122
10123         * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
10124         parameter.
10125         * gcc-interface/utils.c (create_subprog_decl): Likewise.  Set
10126         DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
10127         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
10128         ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
10129         <all>: Do not set flags on the reused DECL node coming from an alias.
10130         Set DECL_IGNORED_P on the DECL node built for subprograms if they
10131         don't need debug info here...
10132         * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
10133         (gigi): Adjust calls to create_subprog_decl.
10134         (build_raise_check): Likewise.
10135         (establish_gnat_vms_condition_handler): Likewise.
10136         (Compilation_Unit_to_gnu): Likewise.
10137         (gnat_to_gnu): Likewise.
10138
10139 2011-04-21  Eric Botcazou  <ebotcazou@adacore.com>
10140
10141         * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
10142         (NO_REORDER_ADAFLAGS): New variable.
10143         (EXTRA_GNATTOOLS): Always define.
10144         (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
10145         Clean up and adjust list of files compiled with special options.
10146         * gcc-interface/Make-lang.in: Likewise.
10147         (ada/decl.o): Cosmetical change.
10148         (ada/misc.o): Remove dependency on $(PLUGIN_H).
10149
10150 2011-04-20  Jim Meyering  <meyering@redhat.com>
10151
10152         * initialize.c (__gnat_initialize): Remove useless if-before-free.
10153
10154 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
10155
10156         * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
10157         $(CFLAGS) on the link line.
10158
10159 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
10160
10161         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
10162         padded type built for the return type if it is unconstrained.
10163
10164 2011-04-14  Nathan Froyd  <froydnj@codesourcery.com>
10165
10166         * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
10167
10168 2011-04-12  Nathan Froyd  <froydnj@codesourcery.com>
10169
10170         * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
10171         before calling TREE_CHAIN.
10172         * gcc-interface/misc.c (gnat_init_ts): New function.
10173         (LANG_HOOKS_INIT_TS): Define.
10174
10175 2011-04-12  Martin Jambor  <mjambor@suse.cz>
10176
10177         * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
10178         instead of cgraph_node.
10179
10180 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
10181
10182         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
10183         alignment on fields of the RETURN type built for the Copy-In Copy-Out
10184         mechanism.
10185
10186 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
10187
10188         * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
10189         of aggregate types that contain a placeholder.
10190
10191 2011-04-08  Nathan Froyd  <froydnj@codesourcery.com>
10192
10193         * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
10194         TYPE_ARG_TYPES.
10195         (handle_type_generic_attribute): Likewise.
10196
10197 2011-04-04  Eric Botcazou  <ebotcazou@adacore.com>
10198
10199         PR ada/47163
10200         * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
10201
10202 2011-04-04  Kai Tietz  <ktietz@redhat.com>
10203
10204         PR ada/47163
10205         * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
10206         to flag value.
10207
10208 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
10209
10210         * gcc-interface/utils2.c (build_allocator): In the unconstrained array
10211         type case, do not strip a padding type around the array type.
10212
10213 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
10214
10215         * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
10216         types.
10217
10218 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
10219
10220         * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
10221         * gcc-interface/misc.c (gnat_handle_option): Remove special handling
10222         code for -feliminate-unused-debug-types.
10223         (gnat_post_options): Likewise.
10224
10225 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
10226
10227         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
10228         declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
10229         distinct copy.
10230
10231 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
10232
10233         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
10234         DECL_ARTIFICIAL flag on enumeration types.
10235
10236 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
10237
10238         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
10239         fat pointer types artificial unconditionally.
10240         <E_Array_Subtype>: Attach the base array type as a parallel type if it
10241         isn't artificial.
10242
10243 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
10244
10245         * gcc-interface/gigi.h (get_dummy_type): Declare.
10246         (build_dummy_unc_pointer_types): Likewise.
10247         (finish_fat_pointer_type): Likewise.
10248         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
10249         fat pointer type has been built, complete it in place.
10250         <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
10251         and thin pointers.  Remove useless variable.
10252         (finish_fat_pointer_type): Make global and move to...
10253         * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
10254         (get_dummy_type): New function.
10255         (build_dummy_unc_pointer_types): Likewise.
10256         (gnat_pushdecl): Propage the name to the anonymous variants only.
10257         (update_pointer_to): Only adjust the pointer types in the unconstrained
10258         array case.
10259
10260 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
10261
10262         * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
10263         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
10264         if this is a Taft amendment type and the full declaration is available.
10265         * gcc-interface/trans.c (process_type): Likewise.
10266         If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
10267         (process_freeze_entity): Likewise.
10268         * gcc-interface/utils.c (dummy_global): New static variable.
10269         (gnat_write_global_declarations): If there are types declared as used
10270         at the global level, insert them in the global hash table.
10271
10272 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
10273
10274         * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
10275         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
10276         declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
10277         copy.
10278         (record_builtin_type): Add ARTIFICIAL_P parameter.  Set DECL_ARTIFICIAL
10279         flag of the type accordingly.
10280         * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
10281
10282 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
10283
10284         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
10285         finalizing types when updating the pointers to the designated type.
10286         <all>: Finalize the deferred types even if we didn't defer processing
10287         of incomplete types in this invocation.
10288
10289 2011-04-01  Olivier Hainque  <hainque@adacore.com>
10290             Nicolas Setton  <setton@adacore.com>
10291             Eric Botcazou  <ebotcazou@adacore.com>
10292
10293         * gcc-interface/misc.c (gnat_descriptive_type): New function.
10294         (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
10295
10296 2011-03-28  Kai Tietz  <ktietz@redhat.com>
10297
10298         * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
10299         Windows targets.
10300         (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
10301         * system-mingw.ads (System): Change ZCX_By_Default default to True.
10302
10303         * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
10304
10305 2011-03-28  Tristan Gingold  <gingold@adacore.com>
10306
10307         PR ada/44431
10308         * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
10309         Use ada output of gnatbind.
10310         (ada/b_gnatb.adb): Ditto.
10311         (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
10312         (ada.mostlyclean, ada.stage1)
10313         (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
10314         (ada.stagefeedback): Adjust.
10315         * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
10316         Use ada output of gnatbind.
10317         (b_gnatm.adb): Ditto.
10318         (b_gnatl.o, b_gnatm.o): New rules.
10319
10320 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
10321
10322         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
10323         for the padded type built to support a specified size or alignment.
10324
10325 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
10326
10327         * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
10328         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
10329         unconditionally to the end of the unit when the designated type is
10330         limited_with'ed.
10331         <all>: Rename local variable.  Attempt to un-defer types only and do it
10332         for limited_with'ed types as well.
10333         (finalize_from_with_types): Adjust comment.  Rename variable and tidy.
10334         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
10335         consistently and remove redundant call to finalize_from_with_types.
10336
10337 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
10338
10339         * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
10340         subprograms without a previous spec declared in the same unit.
10341         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
10342         subprograms at the end of the unit instead of at the beginning.
10343         * gcc-interface/utils.c (create_subprog_decl): Check that the entity
10344         isn't public for the special handling of non-inline functions nested
10345         inside inline external functions.
10346
10347 2011-03-25  Jeff Law  <law@redhat.com>
10348
10349         * gcc-interface/utils.c (def_fn_type): Add missing va_end.
10350
10351 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
10352
10353         * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
10354         * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
10355         to compute Set_Size_Depends_On_Discriminant.
10356         (Layout_Type): Call it on array types in back-end layout mode.
10357         * sem_util.adb (Requires_Transient_Scope): Return true for array
10358         types only if the size depends on the value of discriminants.
10359         * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
10360         type if the RHS is a call to a function that returns an unconstrained
10361         type with default discriminant.
10362
10363 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
10364
10365         * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
10366         non-conversion to the nominal result type at the end.
10367
10368 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
10369
10370         * gcc-interface/trans.c (create_temporary): New function taken from...
10371         (create_init_temporary): ...here.  Call it.
10372         (call_to_gnu): Create the temporary for the return value early, if any.
10373         Create it for a function with copy-in/copy-out parameters if there is
10374         no target; in other cases of copy-in/copy-out, use another temporary.
10375         Push the new binding level lazily.  Add and rename local variables.
10376
10377 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
10378
10379         * gcc-interface/decl.c (validate_size): Improve comments and tweak
10380         error message.
10381         (set_rm_size): Likewise.
10382
10383 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
10384
10385         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
10386         for the padded type built in order to support a specified alignment.
10387         Fix incorrect formatting.
10388
10389 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
10390
10391         PR bootstrap/48216
10392         * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
10393
10394 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
10395
10396         * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
10397         rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
10398         to the end of the list.  Adjust recursive call.  Rename local variable.
10399         If REORDER is true, reorder components of the record type.
10400         (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
10401         components_to_record and adjust the parameter list.
10402
10403 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
10404
10405         * gcc-interface/decl.c (elaborate_expression_1): When optimization is
10406         disabled, use the variable for bounds of loop iteration scheme.
10407
10408 2011-03-21  Kai Tietz  <ktietz@redhat.com>
10409
10410         PR target/12171
10411         * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
10412
10413 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
10414
10415         * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
10416         out whether the expression is read-only.  Short-circuit placeholder
10417         case and rename a couple of local variables.
10418
10419 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
10420
10421         * gcc-interface/gigi.h (smaller_form_type_p): Declare.
10422         * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
10423         * gcc-interface/utils.c (smaller_form_type_p): ...to here.
10424         (convert): Deal with conversions from a smaller form type specially.
10425
10426 2011-02-14  Eric Botcazou  <ebotcazou@adacore.com>
10427
10428         * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
10429         its argument, except for the special -I- switch.
10430
10431 2011-02-12  Gerald Pfeifer  <gerald@pfeifer.com>
10432
10433         * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
10434         "Ada Issues".
10435
10436 2011-02-08  Eric Botcazou  <ebotcazou@adacore.com>
10437
10438         * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
10439
10440 2011-02-03  Eric Botcazou  <ebotcazou@adacore.com>
10441
10442         * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
10443         GNAT_FORMAL.
10444         * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
10445         * gcc-interface/utils.c (fill_vms_descriptor): ...here.  Take GNU_TYPE
10446         instead of GNAT_FORMAL.  Protect the expression against multiple uses.
10447         Do not generate the check directly, instead instantiate the template
10448         check present in the descriptor.
10449         (make_descriptor_field): Move around.
10450         (build_vms_descriptor32): Build a template check in the POINTER field.
10451         (build_vms_descriptor): Remove useless suffixes.
10452         * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
10453
10454 2011-01-26  Eric Botcazou  <ebotcazou@adacore.com>
10455
10456         PR bootstrap/47467
10457         * targext.c: Include target files if IN_RTS is defined.
10458
10459 2011-01-26  Richard Guenther  <rguenther@suse.de>
10460
10461         PR bootstrap/47467
10462         * targext.c: Include config.h.
10463         * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
10464         dependency.
10465
10466 2011-01-04  Pascal Obry  <obry@adacore.com>
10467             Eric Botcazou  <ebotcazou@adacore.com>
10468
10469         * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
10470
10471 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
10472
10473         * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
10474         end-of-case on the end label and its associated gotos, if any.
10475
10476 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
10477
10478         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
10479         expressions of the parameter cache within the statement group of
10480         the CICO mechanism.
10481
10482 2011-01-04  Olivier Hainque  <hainque@adacore.com>
10483             Eric Botcazou  <ebotcazou@adacore.com>
10484
10485         * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
10486         (set_end_locus_from_node): New function.
10487         (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
10488         make and the function end_locus.
10489         (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
10490         for the elaboration subprogram.
10491         (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
10492         set the end_locus of the expression as well.
10493
10494 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
10495
10496         PR ada/47131
10497         * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
10498         variables that are referenced in exception handlers volatile.
10499
10500
10501 \f
10502 Copyright (C) 2011 Free Software Foundation, Inc.
10503
10504 Copying and distribution of this file, with or without modification,
10505 are permitted in any medium without royalty provided the copyright
10506 notice and this notice are preserved.