f3e3d66344b867606c4df9428c8922c15b63867a
[platform/upstream/gcc.git] / gcc / ada / ChangeLog
1 2015-10-20  Thomas Quinot  <quinot@adacore.com>
2
3         * Makefile.rtl: add the following...
4         * g-binenv.ads, g-binenv.adb: New unit providing runtime access
5         to bind time captured values ("bind environment")
6         * init.c: declare new global variable __gl_bind_env_addr.
7         * bindgen.ads, bindgen.adb (Set_Bind_Env): record a bind
8         environment key=value pair.
9         (Gen_Bind_Env_String): helper to produce the bind environment data
10         called  in the binder generated file.
11         (Gen_Output_File_Ada): Call the above (Gen_Adainit): Set
12         __gl_bind_env_addr accordingly.
13         * switch-b.adb: Support for command line switch -V (user interface
14         to set a build environment key=value pair)
15         * bindusg.adb: Document the above
16
17 2015-10-20  Vincent Celier  <celier@adacore.com>
18
19         * sem_prag.adb (Analyse_Pragma: Pragma Pure): Do not set the
20         entity as Pure if Debug_Flag_U is set.
21
22 2015-10-20  Bob Duff  <duff@adacore.com>
23
24         * output.adb (Write_Int): Work with negative numbers in order to avoid
25         negating Int'First and thereby causing overflow.
26         * sem_util.adb: Minor comment fix.
27
28 2015-10-20  Eric Botcazou  <ebotcazou@adacore.com>
29
30         * make.adb (Check): Skip multilib switches reinstated by the
31         compiler when doing the comparison with switches passed to
32         gnatmake.
33
34 2015-10-20  Yannick Moy  <moy@adacore.com>
35
36         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Return
37         False for procedures marked No_Return.
38         * sem_util.ads (Enclosing_Declaration): Improve comment.
39         * einfo.adb (Is_Completely_Hidden): Remove spurious assertion.
40
41 2015-10-20  Thomas Quinot  <quinot@adacore.com>
42
43         * types.ads: Minor reformatting.
44
45 2015-10-20  Hristian Kirtchev  <kirtchev@adacore.com>
46
47         * einfo.adb (Get_Pragma): Minor reformatting. Rename local constant
48         Is_CDG to Is_CLS. Add pragma Constant_After_Elaboration to the list of
49         classification pragmas.
50
51 2015-10-20  Ed Schonberg  <schonberg@adacore.com>
52
53         * sem_ch3.adb (Analyze_Declarations); At the of the visible part,
54         perform name resolution on the expressions in aspects of visible
55         entities.
56         * sem_ch13.ads, sem_ch13.adb (Resolve_Aspect_Expressions): Resolve
57         expressions in aspects independently of whether corresponding
58         entity is frozen. Used to complete name resolution of aspect
59         expressions for entities declared in the visible part of a
60         package or generic package declaration.
61
62 2015-10-20  Vincent Celier  <celier@adacore.com>
63
64         * prj-attr.adb: Add package Codepeer and its attributes.
65
66 2015-10-20  Thomas Quinot  <quinot@adacore.com>
67
68         * sem_ch3.adb, sem_ch13.adb: Minor reformatting.
69
70 2015-10-20  Eric Botcazou  <ebotcazou@adacore.com>
71
72         * gnatlink.adb (Gnatlink): Do not translate --RTS switch
73         for the linker and instead pass the switches that were
74         reinstated by the compiler.
75
76 2015-10-20  Bob Duff  <duff@adacore.com>
77
78         * a-contai.ads, a-convec.ads: Move Count_Type_Last from
79         a-convec.ads to a-contai.ads, so other containers can refer to it.
80
81 2015-10-20  Ed Schonberg  <schonberg@adacore.com>
82
83         * sem_ch3.adb (Check_Nonoverridable_Aspects): New procedure within
84         Analyze_Full_Type_ Declaration, used to apply legality rules in
85         13,1,1 (18.3.3) concerning aspects that cannot be overridden in
86         a type extension.
87         (Check_Duplicate_Aspects): It is not legal to specify the
88         Implicit_Dereference aspect on a full view if partial view has
89         known discriminants.
90         * sem_ch13.adb (Analyze_Aspect_Implicit_Dereference): Verify that
91         the specification of the aspect on a derived type confirms the
92         value of the inherited one.
93         * sem_util.adb (Reference_Discriminant): Return empty if none
94         specified.
95
96 2015-10-20  Thomas Quinot  <quinot@adacore.com>
97
98         * exp_ch5.adb, sem_ch3.adb: Minor reformatting.
99
100 2015-10-20  Vincent Celier  <celier@adacore.com>
101
102         * a-strsup.adb (Super_Trim): Remove statements that put NUL
103         characters in unused portion of the Data string.
104
105 2015-10-16  Hristian Kirtchev  <kirtchev@adacore.com>
106
107         * aspects.adb Add an entry for Constant_After_Elaboration in
108         table Canonical_Aspect.
109         * aspects.ads Add entries for Constant_After_Elaboration in
110         tables Aspect_Argument, Aspect_Delay, Aspect_Id, Aspect_Names
111         and Implementation_Defined_Aspect.
112         * par-prag.adb Pragma Constant_After_Elaboration does not require
113         special processing by the parser.
114         * sem_ch13.adb Add an entry for Constant_After_Elaboration
115         in table Sig_Flags.
116         (Analyze_Aspect_Specifications):
117         Add processing for aspect Constant_After_Elaboration.
118         (Check_Aspect_At_Freeze_Point): Aspect Constant_After_Elaboration
119         does not require special processing at freeze time.
120         * sem_prag.adb (Analyze_Pragma): Add processing for pragma
121         Constant_After_Elaboration. Use routine Find_Related_Context to
122         retrieve the context of pragma Part_Of.
123         (Duplication_Error): Update comment on usage.
124         (Find_Related_Context): New routine.
125         * sem_prag.ads Add an entry for Constant_After_Elaboration
126         in table Aspect_Specifying_Pragma.
127         (Analyze_Contract_Cases_In_Decl_Part): Update the comment on usage.
128         * sem_util.adb (Add_Contract_Item): Add processing for pragma
129         Constant_After_Elaboration.
130         * sem_util.ads (Add_Contract_Item): Update the comment on usage.
131         * snames.ads-tmpl Add new predefined name and aspect id for
132         Constant_After_Elaboration.
133
134 2015-10-16  Vincent Celier  <celier@adacore.com>
135
136         * prj-pp.adb (Pretty_Print.Print): Correctly display extending
137         packages, instead of making them renamed packages.
138
139 2015-10-16  Hristian Kirtchev  <kirtchev@adacore.com>
140
141         * sem_ch12.adb (Analyze_Package_Instantiation):
142         Treat a missing SPARK_Mode annotation as having mode "Off".
143         (Analyze_Subprogram_Instantiation): Treat a missing SPARK_Mode
144         annotation as having mode "Off".
145         (Instantiate_Package_Body): Code
146         reformatting. Treat a missing SPARK_Mode annotation as having mode
147         "Off".
148         (Instantiate_Subprogram_Body): Code reformatting. Treat
149         a missing SPARK_Mode annotation as having mode "Off".
150
151 2015-10-16  Ed Schonberg  <schonberg@adacore.com>
152
153         * exp_ch5.adb: Code clean up.
154         * sem_ch13.adb: Minor fix in comment.
155
156 2015-10-16  Bob Duff  <duff@adacore.com>
157
158         * a-exexda.adb: Change format of Exception_Information to be
159         more like what we print for unhandled exceptions.
160         * a-exstat.adb: Parse new format.
161         * a-except-2005.adb, a-except.adb: Document new format.
162
163 2015-10-16  Javier Miranda  <miranda@adacore.com>
164
165         * sem_ch5.adb (Analyze_Iterator_Specification): Associate a
166         transient scope with the renaming object declararation.
167         * exp_util.adb (Insert_Actions): if the enclosing interator
168         loop is marked as requiring the secondary stack then attach the
169         actions to the transient scope.
170
171 2015-10-16  Bob Duff  <duff@adacore.com>
172
173         * exp_ch7.adb: Minor spelling fixes.
174
175 2015-10-16  Ed Schonberg  <schonberg@adacore.com>
176
177         * sem_ch3.adb (Replace_Anonymous_Access_To_Protected_Subprogram):
178         If anonymous type is component type of array type declaration,
179         analyze its declaration in the current scope, not the enclosing
180         one.
181
182 2015-10-16  Gary Dismukes  <dismukes@adacore.com>
183
184         * prj.adb, sem_util.adb, exp_ch6.adb: Minor reformatting.
185
186 2015-10-16  Ed Schonberg  <schonberg@adacore.com>
187
188         * exp_ch5.adb (Expand_Formal_Container_Element_Loop): Modify
189         expansion to allow element iteration over formal containers
190         whose elements are indefinite types.
191
192 2015-10-16  Doug Rupp  <rupp@adacore.com>
193
194         * s-taprop-linux.adb (Monotonic_Clock): Call clock_gettime
195         instead of gettimeofday.
196         * s-osinte-android.ads, s-osinte-android.adb, s-osinte-linux.ads
197         (clock_gettime): New imported subprogram.
198
199 2015-10-16  Hristian Kirtchev  <kirtchev@adacore.com>
200
201         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
202         Indefinite or limited library level objects are now returned on
203         the heap.
204         * exp_ch7.adb (Build_Finalization_Master): Add formal
205         parameter For_Lib_Level. Add context specific insertion for a
206         finalization master created for an access result type related
207         to a build-in-place function call used to initialize a library
208         level object.
209         * exp_ch7.ads (Build_Finalization_Master): Add formal parameter
210         For_Lib_Level. Update the comment on usage.
211         * sem_util.adb (Mark_Coextensions): Code cleanup.
212
213 2015-10-16  Emmanuel Briot  <briot@adacore.com>
214
215         * prj.adb (For_Every_Project_Imported_Context): Fix handling
216         of aggregated projects with duplicate names.
217         * a-ngelfu.ads: Minor whitespace fix.
218
219 2015-10-16  Ed Schonberg  <schonberg@adacore.com>
220
221         * sem_ch13.adb (Build_Predicate_Functions): The expression for
222         the predicate is side-effect free if it does not contain any
223         variable references.
224
225 2015-10-16  Bob Duff  <duff@adacore.com>
226
227         * a-convec.adb ("="): Previous version depended
228         on "=" composing, but that doesn't quite work -- we want the "="
229         operator passed in to the generic. So we need a loop after all.
230
231 2015-10-16  Yannick Moy  <moy@adacore.com>
232
233         * sem_util.adb (Is_Object_Reference): Attribute 'Loop_Entry produces
234         an object.
235         * sem_ch6.adb: Minor fix in comment.
236
237 2015-10-16  Bob Duff  <duff@adacore.com>
238
239         * a-contai.ads: Add two check names: Container_Checks and
240         Tampering_Check.  Move the tampering check machinery from
241         Ada.Containers.Vectors to Ada.Containers. Later we can share it
242         with other containers.
243         Disable the tampering machinery in the presence of
244         Suppress(Tampering_Check).
245         Simplify the implementation of tampering checks. E.g. use RAII
246         to make incrementing/decrementing of the counts more concise.
247         * a-contai.adb: New package body, implementing the above.
248         * a-convec.ads, a-convec.adb: Use tampering check machinery
249         in Ada.Containers.
250         Disable all checking code when checks are suppressed.
251         Simplify many of the operations. Implement "&" in terms of Append,
252         rather than "by hand".
253         Remove: function "=" (L, R : Elements_Array) return Boolean is
254         abstract; so we can call the predefined "=" on Elements_Array.
255         For "=" on Vectors: Previously, we returned True immediately if
256         Left'Address = Right'Address.  That seems like a non-optimization
257         ("if X = X" is unusual), so removed that.  Simplify by using
258         slice comparison ("=" on Element_Array will automatically call
259         "=" on the components, even if user defined).
260
261 2015-10-16  Ed Schonberg  <schonberg@adacore.com>
262
263         * sem_ch13.adb (Chek_Record_Representation_Clause): When
264         iterating over components, skip anonymous subtypes created for
265         constrained array components.
266
267 2015-10-16  Eric Botcazou  <ebotcazou@adacore.com>
268
269         * a-tags.ads (Parent_Size): Remove obsolete pragma Export.
270         * s-finmas.ads (Header_Offset): Delete.
271         * s-finmas.adb (Header_Offset): Likewise.
272         (Finalize): Call Header_Size instead of Header_Offset.
273         * s-stposu.adb (Allocate_Any_Controlled): Likewise.
274         (Deallocate_Any_Controlled): Likewise.
275
276 2015-10-16  Arnaud Charlet  <charlet@adacore.com>
277
278         * a-exetim.ads, a-exetim-mingw.ads, a-exetim-default.ads: Whitespace
279         cleanup.
280         * s-osprim-mingw.adb, einfo.ads, sem_util.adb, sem_util.ads,
281         sem_ch4.adb, sem_ch13.adb, s-trasym.adb, s-trasym.ads,
282         s-taprop-posix.adb: Minor reformatting.
283
284 2015-10-16  Bob Duff  <duff@adacore.com>
285
286         * adadecode.h, adadecode.c (ada_demangle): Remove
287         ada_demangle, no longer used.
288         * a-except-2005.adb: Bring System.Traceback.Symbolic into the
289         closure.
290
291 2015-10-16  Ed Schonberg  <schonberg@adacore.com>
292
293         * sem_util.adb, sem_util.ads (Get_Reference_Discriminant): Utility to
294         locate the access discriminant that supports implicit dereference on a
295         record type.
296         (Is_OK_Variable_For_Out_Parameter): Reject other illegal uses
297         of Implicit_Dereference on an access_to_constant when actual
298         parameter is a rewritten variable or function call.
299
300 2015-10-16  Bob Duff  <duff@adacore.com>
301
302         * a-tags.adb, s-trasym.adb, s-trasym.ads: Make sure we don't get
303         elaboration circularities when polling is turned on.
304
305 2015-10-16  Ed Schonberg  <schonberg@adacore.com>
306
307         * sem_ch3.adb (Replace_Anonymous_Access_To_Protected_Subprogram):
308         When creating a full declaration for a formal parameter, the
309         entity is labelled as an Itype, so set Associated_Node_For_Itype
310         accordingly.
311         * einfo.ads: Clarify use of Associated_Node_For_Itype.
312
313 2015-10-16  Bob Duff  <duff@adacore.com>
314
315         * bindgen: Move pragmas Warnings earlier, otherwise
316         we can get warnings on with_clauses.
317
318 2015-10-16  Arnaud Charlet  <charlet@adacore.com>
319
320         * s-osprim-mingw.adb, s-osprim-x32.adb, s-taprop-mingw.adb,
321         s-taprop-posix.adb (Monotonic_Clock): Removed, not used.
322         Remove remaining references to OS_Primitives.Monotonic_Clock.
323         Keep it only on windows which is a special case.
324
325 2015-10-16  Javier Miranda  <miranda@adacore.com>
326
327         * a-textio.adb (Get_Line): Fix documentation.
328         * einfo.ads (Interface_Name): Fix documentation.
329         * exp_aggr.adb (Backend_Processing_Possible): Fix documentation.
330         * exp_ch4.adb (Expand_N_In): Fix documentation.
331
332 2015-10-16  Eric Botcazou  <ebotcazou@adacore.com>
333
334         * inline.adb (Subp_Info): Remove Listed component.
335         (Add_Inlined_Subprogram): Take an entity instead of an index.
336         Do not set Listed component to True.
337         (New_Entry): Do not initialize Listed component to False.
338         (Analyze_Inlined_Bodies): Do not test Listed component
339         (Must_Inline): Add calls not in the main unit only
340         if they are in a subprogram that can be inlined outside its unit.
341         (Add_Inlined_Body): Move test around and add comment.
342
343 2015-10-16  Arnaud Charlet  <charlet@adacore.com>
344
345         * sinfo.ads, einfo.ads: monir clean ups.
346
347 2015-10-16  Arnaud Charlet  <charlet@adacore.com>
348
349         * usage.adb, debug.adb, a-except.adb, a-except.ads, a-except-2005.adb,
350         a-except-2005.ads, s-imgrea.adb: Minor code clean ups related to
351         jgnat/dotnet removal.
352
353 2015-10-16  Arnaud Charlet  <charlet@adacore.com>
354
355         * s-osprim-vxworks.adb, s-osprim-darwin.adb, s-tadeca.adb,
356         s-osprim-unix.adb, s-osprim-solaris.adb, s-osprim-posix.adb,
357         s-osprim.ads (Monotonic_Clock): Removed, unused.
358
359 2015-10-16  Ed Schonberg  <schonberg@adacore.com>
360
361         * sem_ch4.adb (Try_Object_Operation, Try_One_Interpretation):
362         Do not reset the Obj_Type of the prefix if an interpretation
363         involves an untagged type, to prevent a crash when analyzing an
364         illegal program in All_Errors mode.
365
366 2015-10-16  Hristian Kirtchev  <kirtchev@adacore.com>
367
368         * exp_ch4.adb (Expand_N_Expression_With_Actions):
369         Force the evaluation of the expression when its type is Boolean.
370         (Force_Boolean_Evaluation): New routine.
371
372 2015-10-16  Bob Duff  <duff@adacore.com>
373
374         * sem_util.adb (Has_Discrim_Dep_Array): Remove
375         this function, and the call. No longer needed now that the back
376         end can handle such things. Should result in further speedups
377         in some cases.
378
379 2015-10-16  Ed Schonberg  <schonberg@adacore.com>
380
381         * sem_ch13.adb (Build_Predicate_Functions): If expression for
382         predicate is side-effect free, indicate that the predicate
383         function is pure, to allow for optimization of redundant
384         predicate checks.
385
386 2015-10-16  Arnaud Charlet  <charlet@adacore.com>
387
388         * checks.adb: Fix typo.
389         * s-osinte-linux.ads: Add header.
390         * projects.texi: Removed, no longer used.
391         * gcc-interface/Make-lang.in: Update dependencies
392         * s-multip.adb: Minor: fix header.
393         * sem_ch3.adb, exp_ch7.adb, g-dirope.ads, sinfo.ads, types.ads,
394         a-textio.adb, s-exctra.adb, ali.adb, back_end.ads, exp_intr.adb,
395         a-tigeli.adb, exp_ch3.adb, s-os_lib.ads: Remove further references to
396         .NET.
397         * gnatlink.adb, opt.ads, exp_aggr.adb, s-solita.adb: Minor comment
398         updates.
399
400 2015-10-16  Gary Dismukes  <dismukes@adacore.com>
401
402         * exp_ch9.adb (Build_Simple_Entry_Call): Set_Is_Internal on
403         the temporary object used for a by-copy entry parameter, to
404         ensure that the object doesn't get its No_Initialization flag
405         reset later in Default_Initialize_Object. Also, generate the
406         assignment of the actual to the temporary in the additional case
407         of a scalar out parameter whose type has a Default_Value aspect.
408         * exp_ch3.adb: Fix minor typo in comment.
409
410 2015-10-16  Hristian Kirtchev  <kirtchev@adacore.com>
411
412         * exp_util.adb, sem_util.ads, sem_ch6.adb, sem_ch7.adb, sem_ch8.adb:
413         Minor reformatting.
414         * sem_ch12.adb (Analyze_Formal_Package_Declaration): Set the
415         SPARK_Mode from the context.
416
417 2015-10-16  Bob Duff  <duff@adacore.com>
418
419         * sem_util.adb (Requires_Transient_Scope):
420         If Typ is a generic formal incomplete type, look at the actual
421         type. Otherwise, we don't notice that the actual type is tagged,
422         has a variant part, etc, causing a mismatch of calling conventions
423         between caller and callee.
424
425 2015-10-16  Hristian Kirtchev  <kirtchev@adacore.com>
426
427         * einfo.ads: Move the declaration of enumeration
428         literal E_Abstract_State above E_Entry.  Update the upper bound
429         of subtype Overloadable_Kind.
430
431 2015-10-16  Gary Dismukes  <dismukes@adacore.com>
432
433         * exp_attr.adb: Minor editorial changes.
434
435 2015-10-16  Arnaud Charlet  <charlet@adacore.com>
436
437         * exp_ch5.adb, sem_ch3.adb, frontend.adb, exp_ch7.adb, exp_ch7.ads,
438         sem_ch5.adb, sem_type.adb, exp_util.adb, exp_util.ads, comperr.adb,
439         exp_attr.adb, sinfo.ads, exp_ch9.adb, make.adb, usage.adb,
440         lib-writ.adb, sem_ch9.adb, bindgen.adb, debug.adb, einfo.adb,
441         einfo.ads, types.ads, checks.adb, sem_prag.adb, s-tasini.adb,
442         rtsfind.ads, freeze.adb, sem_util.adb, sem_util.ads, exp_dbug.adb,
443         gnatlink.adb, gnat1drv.adb, targparm.adb, targparm.ads, exp_ch4.adb,
444         exp_ch11.adb, repinfo.adb, s-soflin.adb, s-soflin.ads, exp_ch6.adb,
445         exp_ch13.adb, sem_mech.adb, sem_ch6.adb, par-prag.adb, exp_disp.adb,
446         sem_ch8.adb, exp_disp.ads, snames.adb-tmpl, exp_aggr.adb, sem_eval.adb,
447         exp_intr.adb, sem_ch13.adb, snames.ads-tmpl, sem_disp.adb, exp_ch3.adb:
448         Code clean up: remove special handling for .NET and JVM.
449
450 2015-10-16  Arnaud Charlet  <charlet@adacore.com>
451
452         * sem_ch12.adb: Minor punctuation fix in comment
453         * s-rident.ads: Minor consistency fix in comment
454         * exp_attr.adb, g-spipat.ads: punctuation fixes in comments.
455         * restrict.ads: Style fix in comments.
456         * sem_prag.adb: Minor grammar fix in comment
457
458 2015-10-16  Gary Dismukes  <dismukes@adacore.com>
459
460         * sem_ch12.adb: Minor reformatting/rewording.
461
462 2015-10-16  Arnaud Charlet  <charlet@adacore.com>
463
464         * einfo.ads: Minor fix of duplicate words
465         * rident.ads: Minor style fix in comment
466
467 2015-10-16  Hristian Kirtchev  <kirtchev@adacore.com>
468
469         * exp_ch3.adb (Expand_N_Full_Type_Declaration): Do not capture,
470         set and restore the Ghost mode.
471         (Expand_N_Object_Declaration): Do not capture, set and restore the
472         Ghost mode.
473         (Freeze_Type): Redo the capture and restore of the Ghost mode.
474         (Restore_Globals): Removed.
475         * exp_ch5.adb (Expand_N_Assignment_Statement): Redo the capture
476         and restore of the Ghost mode.
477         (Restore_Globals): Removed.
478         * exp_ch6.adb (Expand_N_Procedure_Call_Statement):
479         Redo the capture and restore of the Ghost mode.
480         (Expand_N_Subprogram_Body): Redo the capture, set and restore
481         of the Ghost mode.
482         (Expand_N_Subprogram_Declaration): Do not
483         capture, set and restore the Ghost mode.
484         (Restore_Globals): Removed.
485         * exp_ch7.adb (Expand_N_Package_Body): Redo the capture, set
486         and restore of the Ghost mode.
487         (Expand_N_Package_Declaration): Do not capture, set and restore the
488         Ghost mode.
489         * exp_ch8.adb (Expand_N_Exception_Renaming_Declaration):
490         Redo the capture and restore of the Ghost mode.
491         (Expand_N_Object_Renaming_Declaration): Redo
492         the capture and restore of the Ghost mode.
493         (Expand_N_Package_Renaming_Declaration):
494         Redo the capture and restore of the Ghost mode.
495         (Expand_N_Subprogram_Renaming_Declaration): Redo the capture
496         and restore of the Ghost mode.
497         * exp_ch11.adb Remove with and use clauses for Ghost.
498         (Expand_N_Exception_Declaration): Do not capture, set and restore
499         the Ghost mode.
500         * exp_disp.adb (Make_DT): Redo the capture and restore of the
501         Ghost mode.
502         (Restore_Globals): Removed.
503         * exp_prag.adb (Expand_Pragma_Check): Do not capture, set
504         and restore the Ghost mode.
505         (Expand_Pragma_Contract_Cases):
506         Redo the capture and restore of the Ghost mode.  Preserve the
507         original context of contract cases by setting / resetting the
508         In_Assertion_Expr counter.
509         (Expand_Pragma_Initial_Condition):
510         Redo the capture and restore of the Ghost mode.
511         (Expand_Pragma_Loop_Variant): Redo the capture and restore of
512         the Ghost mode.
513         (Restore_Globals): Removed.
514         * exp_util.adb (Make_Predicate_Call): Redo the capture and
515         restore of the Ghost mode.
516         (Restore_Globals): Removed.
517         * freeze.adb (Freeze_Entity): Redo the capture and restore of
518         the Ghost mode.
519         (Restore_Globals): Removed.
520         * ghost.adb (Check_Ghost_Context): Remove the RM reference from
521         the error message.
522         (Is_OK_Statement): Account for statements
523         that appear in assertion expressions.
524         (Is_Subject_To_Ghost):
525         Moved from spec.
526         * ghost.ads (Is_Subject_To_Ghost): Moved to body.
527         * rtsfind.ads (Load_RTU): Redo the capture and restore of the
528         Ghost mode.
529         * sem.adb Add with and use clauses for Ghost.
530         (Analyze): Redo
531         the capture and restore of the Ghost mode. Set the Ghost mode
532         when analyzing a declaration.
533         (Do_Analyze): Redo the capture
534         and restore of the Ghost mode.
535         * sem_ch3.adb (Analyze_Full_Type_Declaration): Do not capture, set
536         and restore the Ghost mode.
537         (Analyze_Incomplete_Type_Decl):
538         Do not capture, set and restore the Ghost mode.
539         (Analyze_Number_Declaration): Do not capture, set and restore the
540         Ghost mode.
541         (Analyze_Object_Declaration): Do not capture, set and
542         restore the Ghost mode.
543         (Analyze_Private_Extension_Declaration):
544         Do not capture, set and restore the Ghost mode.
545         (Analyze_Subtype_Declaration): Do not capture, set and restore
546         the Ghost mode.
547         (Restore_Globals): Removed.
548         * sem_ch5.adb (Analyze_Assignment): Redo the capture and restore
549         of the Ghost mode.
550         (Restore_Globals): Removed.
551         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration):
552         Do not capture, set and restore the Ghost mode.
553         (Analyze_Procedure_Call): Redo the capture and restore of the
554         Ghost mode.
555         (Analyze_Subprogram_Body_Helper): Redo the capture
556         and restore of the Ghost mode.  (Analyze_Subprogram_Declaration):
557         Do not capture, set and restore the Ghost mode.
558         (Restore_Globals): Removed.
559         * sem_ch7.adb (Analyze_Package_Body_Helper): Redo the capture and
560         restore of the Ghost mode.
561         (Analyze_Package_Declaration):
562         Do not capture, set and restore the Ghost mode.
563         (Analyze_Private_Type_Declaration): Do not capture, set and
564         restore the Ghost mode.
565         (Restore_Globals): Removed.
566         * sem_ch8.adb (Analyze_Exception_Renaming): Do not capture,
567         set and restore the Ghost mode.
568         (Analyze_Generic_Renaming): Do not capture, set and restore the Ghost
569         mode.
570         (Analyze_Object_Renaming): Do not capture, set and restore the
571         Ghost mode.
572         (Analyze_Package_Renaming): Do not capture, set and restore the Ghost
573         mode.
574         (Analyze_Subprogram_Renaming): Do not capture, set and restore the
575         Ghost mode.
576         (Restore_Globals): Removed.
577         * sem_ch11.adb (Analyze_Exception_Declaration): Do not capture,
578         set and restore the Ghost mode.
579         * sem_ch12.adb (Analyze_Generic_Package_Declaration):
580         Do not capture, set and restore the Ghost mode.
581         (Analyze_Generic_Subprogram_Declaration): Do not capture, set
582         and restore the Ghost mode.
583         * sem_ch13.adb (Build_Invariant_Procedure_Declaration): Redo
584         the capture and restore of the Ghost mode.
585         * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
586         Redo the capture and restore of the Ghost mode.
587         (Analyze_External_Property_In_Decl_Part):
588         Redo the capture and restore of the Ghost mode.
589         (Analyze_Initial_Condition_In_Decl_Part): Redo the
590         capture and restore of the Ghost mode.  (Analyze_Pragma):
591         Do not capture, set and restore the Ghost mode for Assert.
592         Redo the capture and restore of the Ghost mode for Check. Do
593         not capture and restore the Ghost mode for Invariant.
594         (Analyze_Pre_Post_Condition_In_Decl_Part): Redo the capture and
595         restore of the Ghost mode.
596         * sem_res.adb (Resolve): Capture, set and restore the Ghost mode
597         when resolving a declaration.
598         * sem_util.adb (Build_Default_Init_Cond_Procedure_Body):
599         Redo the capture and restore of the Ghost mode.
600         (Build_Default_Init_Cond_Procedure_Declaration): Redo the capture
601         and restore of the Ghost mode.
602
603 2015-10-16  Bob Duff  <duff@adacore.com>
604
605         * debug.adb: Document -gnatdQ switch.
606
607 2015-10-16  Ed Schonberg  <schonberg@adacore.com>
608
609         * sem_ch12.adb (Analyze_Formal_Subprogram): Implement rule that
610         a formal abstract subprogram cannot have a null default: RM 12.6
611         (4 1.2).
612
613 2015-10-16  Bob Duff  <duff@adacore.com>
614
615         * sem_util.ads, sinput.ads, bcheck.adb: Minor comment fixes.
616
617 2015-10-16  Javier Miranda  <miranda@adacore.com>
618
619         * inline.adb (Add_Inlined_Body): Ensure that
620         Analyze_Inlined_Bodies will be invoked after completing the
621         analysis of the current unit.
622
623 2015-10-16  Arnaud Charlet  <charlet@adacore.com>
624
625         * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order): Fix error
626         message for bad last bit position.
627         * sem_ch3.adb, sem_util.adb, sem_util.ads: Minor reformatting.
628
629 2015-10-16  Ed Schonberg  <schonberg@adacore.com>
630
631         * exp_ch5.adb (Expand_N_Case_Statement): If expression is
632         compile-time known but does not obey a static predicate on
633         its type, replace the case statement with a raise statement,
634         as with other statically detected constraint violations.
635
636 2015-10-16  Bob Duff  <duff@adacore.com>
637
638         * s-traceb.adb, s-traceb.ads, s-traceb-hpux.adb, s-traceb-mastop.adb:
639         Reinstate code.
640         * opt.ads: Minor typo.
641
642 2015-10-16  Ed Schonberg  <schonberg@adacore.com>
643
644         * sem_util.adb (Gather_Components): When gathering components
645         of a nested variant, the record type used in legality checks is
646         the enclosing record type.
647
648 2015-10-13  Jakub Jelinek  <jakub@redhat.com>
649
650         * gcc-interface/utils.c (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10,
651         DEF_FUNCTION_TYPE_11): Define.
652
653 2015-10-09  Eric Botcazou  <ebotcazou@adacore.com>
654
655         * gcc-interface/Make-lang.in: Make sure that GNAT1_OBJS and not just
656         GNAT1_ADA_OBJS are compiled only after generated files are created.
657
658 2015-10-05  Richard Sandiford  <richard.sandiford@arm.com>
659
660         * gcc-interface/trans.c (convert_with_check): Use real_arithmetic
661         instead of REAL_ARITHMETIC.
662
663 2015-10-05  Richard Sandiford  <richard.sandiford@arm.com>
664
665         * gcc-interface/trans.c (convert_with_check): Use real_less instead
666         of REAL_VALUES_LESS.
667
668 2015-10-02  Doug Rupp  <rupp@adacore.com>
669             Olivier Hainque  <hainque@adacore.com>
670
671         * gcc-interface/lang.opt (fbuiltin-printf): Accept.
672         * gcc-interface/misc.c (gnat_handle_option): Ignore it.
673         * gcc-interface/lang-specs.h (@ada, @adawhy, @adascil): Propagate -f*
674         flags as -g* and -m* flags past -gnatez.
675
676 2015-10-02  Eric Botcazou  <ebotcazou@adacore.com>
677
678         * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Warnings>: Replace
679         linear search with call to find_opt and issue warnings if the -W
680         switch is not appropriate.
681
682 2015-10-02  Eric Botcazou  <ebotcazou@adacore.com>
683
684         * gcc-interface/ada-tree.h (DECL_RESTRICTED_ALIASING_P): New flag.
685         * gcc-interface/decl.c (gnat_to_gnu_param): For parameters passed by
686         reference but whose type isn't by-ref and whose mechanism hasn't been
687         forced to by-ref, set the DECL_RESTRICTED_ALIASING_P flag directly on
688         them instead of changing their type.
689         * gcc-interface/trans.c (scan_rhs_r): New helper function.
690         (independent_iterations_p): New predicate.
691         (Loop_Statement_to_gnu): For a loop with an iteration scheme, set an
692         ivdep pragma if the iterations are independent.
693
694 2015-10-02  Eric Botcazou  <ebotcazou@adacore.com>
695
696         * gcc-interface/trans.c (find_loop_for): Use FOR_EACH_VEC_ELT_REVERSE.
697         (Loop_Statement_to_gnu): Use FOR_EACH_VEC_ELT.
698         (finalize_nrv): Use FOR_EACH_VEC_SAFE_ELT and initialize field.
699         (build_stmt_group): Add blank lines.
700
701 2015-09-30  Thomas Schwinge  <thomas@codesourcery.com>
702
703         * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_11): Don't define.
704
705 2015-09-28  Tom de Vries  <tom@codesourcery.com>
706
707         * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_6): Define.
708
709 2015-09-17  Eric Botcazou  <ebotcazou@adacore.com>
710
711         * gcc-interface/trans.c (emit_check): Do not touch TREE_SIDE_EFFECTS.
712
713 2015-09-14  Pierre-Marie de Rodat  <derodat@adacore.com>
714
715         * gcc-interface/misc.c (gnat_post_options): Issue a warning if
716         generating STABS debugging information when not the default.
717
718 2015-09-14  Eric Botcazou  <ebotcazou@adacore.com>
719
720         * gcc-interface/gigi.h (ref_filename): Delete.
721         (Sloc_to_locus): Add clean_column parameter defaulting to false.
722         (build_call_raise): Adjust comment.
723         (build_call_raise_range): Move around.
724         * gcc-interface/trans.c (ref_filename): Delete.
725         (gigi): Fix formatting.
726         (block_end_locus_sink): Delete.
727         (Sloc_to_locus1): Tidy up and reformat.  Rename into...
728         (Sloc_to_locus): ...this.  Add default for clean_colmun parameter.
729         (set_expr_location_from_node1): Rename into...
730         (set_expr_location_from_node): ...this.
731         (set_end_locus_from_node): Move around.  Adjust for renaming.
732         (Handled_Sequence_Of_Statements_to_gnu): Likewise.
733         (add_cleanup): Likewise.
734         * gcc-interface/utils2.c (expand_sloc): New static function.
735         (build_call_raise): Call it.
736         (build_call_raise_column): Likewise.
737         (build_call_raise_range): Likewise.  Move around.
738
739 2015-09-14  Eric Botcazou  <ebotcazou@adacore.com>
740
741         * gcc-interface/utils2.c (gnat_rewrite_reference) <COMPOUND_EXPR>: Add
742         another acceptable pattern for the RHS.
743
744 2015-07-24  Micahel Darling  <darlingm@gmail.com>
745
746         PR other/66259
747         * prj-nmsc.adb: Reflects renaming of configure.in to configure.ac
748         * gcc-interface/Makefile.in: Likewise
749
750 2015-07-12  Aldy Hernandez  <aldyh@redhat.com>
751
752         * gcc-interface/utils.c: Fix double word typos.
753         * gnat_ugn.texi: Same.
754         * init.c: Same.
755         * par.adb: Same.
756         * projects.texi: Same.
757         * sem_ch4.adb: Same.
758         * sem_ch6.adb: Same.
759         * sem_dim.adb: Same.
760         * sem_eval.adb: Same.
761         * sem_prag.adb: Same.
762         * sem_warn.adb: Same.
763
764 2015-07-07  Andrew MacLeod  <amacleod@redhat.com>
765
766         * gcc-interface/cuintp.c: Adjust includes.
767         * gcc-interface/decl.c: Likewise.
768         * gcc-interface/misc.c: Likewise.
769         * gcc-interface/targtyps.c: Likewise.
770         * gcc-interface/trans.c: Likewise.
771         * gcc-interface/utils.c: Likewise.
772         * gcc-interface/utils2.c: Likewise.
773
774 2015-07-06  John Marino  <gnugcc@marino.st>
775
776         * s-oscons-tmplt.c: Add support for DragonFly alongside FreeBSD.
777
778 2015-06-29  Eric Botcazou  <ebotcazou@adacore.com>
779
780         PR ada/63310
781         * gcc-interface/utils.c (gnat_write_global_declarations): Always
782         build the dummy global variable if code was generated.
783
784 2015-06-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>
785
786         PR fortran/66605
787         * gcc-interface/misc.c (gnat_post_options): No need to disable
788         warn_unused_parameter anymore.
789
790 2015-06-26  Eric Botcazou  <ebotcazou@adacore.com>
791
792         * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): When
793         not optimizing the CFG, clear the DECL_DECLARED_INLINE_P flag on the
794         at-end procedures.
795
796 2015-06-26  Eric Botcazou  <ebotcazou@adacore.com>
797
798         * gcc-interface/gigi.h (note_types_used_by_globals): Delete.
799         (gnat_write_global_declarations): New prototype.
800         * gcc-interface/utils.c (type_decls): Rename back to...
801         (global_decls): ...this.
802         (gnat_pushdecls): Revert previous change.
803         (create_var_decl): Do not output global variables.
804         (note_types_used_by_globals): Rename back to...
805         (gnat_write_global_declarations): ...this.  Output variables on the
806         global_decls vector.
807         * gcc-interface/misc.c (gnat_parse_file): Adjust to above renaming.
808
809 2015-06-26  Eric Botcazou  <ebotcazou@adacore.com>
810
811         * gcc-interface/gigi.h (create_var_decl_1): Rename into...
812         (create_var_decl): ...this.  Add default value for last parameter.
813         (create_type_stub_decl): Adjust.
814         (create_type_decl): Likewise.
815         (create_field_decl): Likewise.
816         (create_param_decl): Likewise.
817         (create_label_decl): Likewise.
818         (create_subprog_decl): Likewise.
819         * gcc-interface/utils.c (create_var_decl_1): Rename into...
820         (create_var_decl): ...this.  Rename var_name into name and var_init
821         into init, move const_decl_allowed_p last and adjust accordingly.
822         (create_type_stub_decl): Rename type_name into name and adjust.
823         (create_type_decl): Likewise.
824         (create_field_decl): Likewise for field_name and field_type.
825         (create_param_decl): Likewise for param_name and param_type.
826         (create_label_decl): Likewise for label_name.
827         (create_subprog_decl): Likewise for subprog_name and subprog_type.
828         * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust couple of calls
829         to create_var_decl_1.
830
831 2015-06-26  Eric Botcazou  <ebotcazou@adacore.com>
832
833         * gcc-interface/trans.c (loop_info_d): Add low_bound, high_bound,
834         artificial, has_checks and warned_aggressive_loop_optimizations.
835         (gigi): Set warn_aggressive_loop_optimizations to 0.
836         (inside_loop_p): New inline predicate.
837         (push_range_check_info): Rename into...
838         (find_loop_for): ...this and do not push range_check_info_d object.
839         (Loop_Statement_to_gnu): Set artificial, low_bound and high_bound
840         fields of gnu_loop_info.  Adjust detection of checks enabled by
841         -funswitch-loops and adds one for -faggressive-loop-optimizations.
842         (gnat_to_gnu) <N_Indexed_Component>: If aggressive loop optimizations
843         are enabled, warn for loops overrunning an array of size 1 not at the
844         end of a record.
845
846 2015-06-25  Andrew MacLeod  <amacleod@redhat.com>
847
848         * gcc-interface/trans.c: Remove ipa-ref.h and plugin-api.h from include
849         list.
850         * gcc-interface/utils.c: Likewise.
851
852 2015-06-25  Richard Sandiford  <richard.sandiford@arm.com>
853
854         * gcc-interface/decl.c (value_annotation_hasher): Inherit from
855         ggc_cache_ptr_hash rather than ggc_cache_hasher.
856         * gcc-interface/utils.c (pad_type_hasher): Likewise.
857
858 2015-06-25  Richard Sandiford  <richard.sandiford@arm.com>
859
860         * gcc-interface/decl.c (value_annotation_hasher::handle_cache_entry):
861         Delete.
862         (value_annotation_hasher::keep_cache_entry): New function.
863         * gcc-interface/utils.c (pad_type_hasher::handle_cache_entry):
864         Delete.
865         (pad_type_hasher::keep_cache_entry): New function.
866
867 2015-06-25  Andrew MacLeod  <amacleod@redhat.com>
868
869         * gcc-interface/misc.c: Include calls.h not function.h.
870
871 2015-06-19  Eric Botcazou  <ebotcazou@adacore.com>
872
873         * gcc-interface/gigi.h (record_builtin_type): Adjust comment.
874         (tree create_type_decl): Likewise.
875         (create_var_decl_1): Add artificial_p and debug_info_p parameters.
876         (create_var_decl): Likewise.
877         (create_true_var_decl): Delete.
878         (create_subprog_decl): Add debug_info_p parameter.
879         * gcc-interface/decl.c (gnat_to_gnu_entity): Add artificial_p local
880         variable and use it throughout.  Remove DECL_ARTIFICIAL settings.
881         <E_Variable>: Adjust calls to create_var_decl and create_var_decl_1.
882         Remove DECL_IGNORED_P settings.
883         <E_Enumeration_Type>: Likewise.
884         <E_Record_Type>: Likewise.
885         <E_Subprogram_Type>: Likewise.  Remove artificial_flag local variable.
886         Adjust call to create_subprog_decl.
887         (get_minimal_subprog_decl): Likewise.
888         (elaborate_expression_1): Adjust call to create_var_decl.
889         * gcc-interface/trans.c (gigi): Adjust calls to create_var_decl and
890         create_subprog_decl.  Remove DECL_ARTIFICIAL & DECL_IGNORED_P settings.
891         * gcc-interface/utils.c (maybe_pad_type): Likewise.
892         (record_builtin_type): Adjust comment.
893         (create_type_stub_decl): Remove obsolete comment.
894         (create_var_decl_1): Add artificial_p and debug_info_p parameters.
895         Set DECL_ARTIFICIAL and DECL_IGNORED_P accordingly.
896         (create_subprog_decl): Add debug_info_p parameter.  Set DECL_IGNORED_P
897         accordingly.
898
899 2015-06-19  Eric Botcazou  <ebotcazou@adacore.com>
900
901         * gcc-interface/misc.c (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): Define.
902
903 2015-06-19  Eric Botcazou  <ebotcazou@adacore.com>
904
905         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Make sure
906         the size of a padding type built around the return type is positive.
907         * gcc-interface/trans.c (gnat_to_gnu) <N_Simple_Return_Statement>:
908         Use INIT_EXPR instead of MODIFY_EXPR to assign to the return object.
909
910 2015-06-17  Andrew MacLeod  <amacleod@redhat.com>
911
912         * gcc-interface/cuintp.c: Do not include input.h, line-map.h or is-a.h.
913         * gcc-interface/decl.c: Likewise.
914         * gcc-interface/misc.c: Likewise.
915         * gcc-interface/targtyps.c: Likewise.
916         * gcc-interface/trans.c: Likewise.
917         * gcc-interface/utils.c: Likewise.
918         * gcc-interface/utils2.c: Likewise.
919
920 2015-06-11  Pierre-Marie de Rodat  <derodat@adacore.com>
921
922         * gcc-interface/utils.c (get_global_context): Register the main
923         translation unit through the new debug hook.
924
925 2015-06-09  Eric Botcazou  <ebotcazou@adacore.com>
926
927         * gcc-interface/misc.c: Remove duplicate include directives.
928         * gcc-interface/trans.c: Likewise.
929         * gcc-interface/utils.c: Likewise.
930
931 2015-06-08  Andrew MacLeod  <amacleod@redhat.com>
932
933         * gcc-interface/cuintp.c : Adjust include files.
934         * gcc-interface/decl.c : Likewise.
935         * gcc-interface/misc.c : Likewise.
936         * gcc-interface/targtyps.c : Likewise.
937         * gcc-interface/trans.c : Likewise.
938         * gcc-interface/utils.c : Likewise.
939         * gcc-interface/utils2.c : Likewise.
940         
941 2015-06-08  John Marino  <gnugcc@marino.st>
942
943         * a-intnam-dragonfly.ads: New.
944         * s-osinte-dragonfly.adb: Likewise.
945         * s-osinte-dragonfly.ads: Likewise.
946         * system-dragonfly-x86_64.ads: Likewise.
947         * adaint.c: Add BSD macros.
948         * cstreams.c: Likewise.
949         * gsocket.h: Likewise.
950         * link.c: Likewise.
951         * socket.c: Likewise.
952         * env.c: Add __DragonFly__, remove __FreeBSD__ macro.
953         * init.c: Add __DragonFly__, change __gnat_install_handler
954         prototype from empty to void.
955         * initialize.c: Add __DragonFly__.
956         * sysdep.c: Likewise.
957         * s-osinte-freebsd.adb: Use __get_errno instead of __error.
958         * tracebak.c: Set unwinder for i386 BSD.
959         * gcc-interface/Makefile.in: Add x86_64 DragonFly, tweak
960         x86_64 FreeBSD and x86 FreeBSD.
961
962 2015-06-06  Eric Botcazou  <ebotcazou@adacore.com>
963
964         * gcc-interface/utils.c (note_types_used_by_globals): Tweak comment.
965         * gcc-interface/decl.c (gnat_to_gnu_entity): Likewise.
966
967 2015-06-05  Aldy Hernandez  <aldyh@redhat.com>
968
969         * gcc-interface/gigi.h (note_types_used_by_globals): Rename from
970         gnat_write_global_declarations.
971         * gcc-interface/misc.c (gnat_parse_file): Call
972         note_types_used_by_globals.
973         Remove LANG_HOOKS_WRITE_GLOBALS.
974         * gcc-interface/utils.c: Rename global_decls to type_decls.
975         (gnat_write_global_declarations): Rename
976         to note_types_used_by_globals.
977         Remove call to finalize_compilation_unit.
978         Remove call to debug_hooks->global_decl for globals.
979         (gnat_pushdecls): Only insert into type_decls if TYPE_DECL.
980
981 2015-06-04  Andrew MacLeod  <amacleod@redhat.com>
982
983         * gcc-interface/cuintp.c: Adjust includes for restructured coretypes.h.
984         * gcc-interface/decl.c: Likewise.
985         * gcc-interface/misc.c: Likewise.
986         * gcc-interface/targtyps.c: Likewise.
987         * gcc-interface/trans.c: Likewise.
988         * gcc-interface/utils.c: Likewise.
989         * gcc-interface/utils2.c: Likewise.
990
991 2015-06-04  Pierre-Marie de Rodat  <derodat@adacore.com>
992
993         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: If
994         processing a definition, create definitions for padding types
995         around return types.
996
997 2015-06-03  Eric Botcazou  <ebotcazou@adacore.com>
998
999         * gcc-interface/utils.c (copy_type): Also set TYPE_CANONICAL.
1000
1001 2015-06-03  Eric Botcazou  <ebotcazou@adacore.com>
1002
1003         * gcc-interface/trans.c (gnat_to_gnu) <N_Simple_Return_Statement>: Fix
1004         typo in latest change.
1005
1006 2015-06-01  Eric Botcazou  <ebotcazou@adacore.com>
1007
1008         * gcc-interface/Makefile.in: Fix ARM/Darwin configuration.
1009
1010 2015-06-01  Pierre-Marie de Rodat  <derodat@adacore.com>
1011
1012         * gcc-interface/utils.c (scale_by_factor_of): When handling a function
1013         call expression, process the corresponding function body.  Also handle
1014         potential addends.
1015
1016 2015-06-01  Pierre-Marie de Rodat  <derodat@adacore.com>
1017
1018         * gcc-interface/decl.c (gnat_to_gnu_entity): Replace pointer types with
1019         references ones for functions that return references.
1020
1021 2015-06-01  Eric Botcazou  <ebotcazou@adacore.com>
1022
1023         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: For a
1024         definition of a type coming from a limited_with, get to the full view
1025         if it is not in the main code unit.
1026
1027 2015-06-01  Eric Botcazou  <ebotcazou@adacore.com>
1028
1029         * gcc-interface/utils.c (create_var_decl_1): If an assembler name is
1030         specified, let the target mangle it before settting.
1031         (create_subprog_decl): Likewise and move this treatment last.
1032
1033 2015-06-01  Eric Botcazou  <ebotcazou@adacore.com>
1034
1035         * gcc-interface/lang-specs.h (TARGET_VXWORKS_RTP): Move substitution to
1036         before first -gnatez switch.  Simplify and add trailing space.
1037
1038 2015-06-01  Eric Botcazou  <ebotcazou@adacore.com>
1039
1040         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: If the
1041         record has a parent field and a representation clause, make sure that
1042         it is properly aligned.
1043
1044 2015-06-01  Eric Botcazou  <ebotcazou@adacore.com>
1045
1046         * gcc-interface/trans.c (lvalue_required_p) <N_Indexed_Component>: Deal
1047         with character and enumeration literals as index values.
1048
1049 2015-06-01  Eric Botcazou  <ebotcazou@adacore.com>
1050
1051         * gcc-interface/gigi.h (build_simple_component_ref): Declare.
1052         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Deal with
1053         address clause on aliased object with unconstrained nominal subtype.
1054         Mark the aligning variable as artificial, do not convert the address
1055         expression immediately but mark it as constant instead.
1056         * gcc-interface/utils.c (convert): If the target type contains a
1057         template, be prepared for an empty array.
1058         (maybe_unconstrained_array): Likewise.
1059         * gcc-interface/utils2.c (known_alignment) <POINTER_PLUS_EXPR>: Deal
1060         with the pattern built for aligning types.
1061         <INTEGER_CST>: Do not cap the value at BIGGEST_ALIGNMENT.
1062         (build_simple_component_ref): Make public.
1063         If the base object is a constructor that contains a template, fold the
1064         result field by field.
1065
1066 2015-05-31  Eric Botcazou  <ebotcazou@adacore.com>
1067
1068         * s-oscons-tmplt.c: Add explicit tests for Android alongside Linux.
1069
1070 2015-05-30  Eric Botcazou  <ebotcazou@adacore.com>
1071
1072         * adaint.c: Test for __linux__ instead of linux and __sun__ instead
1073         of sun.  Add missing leading underscore to AIX.  Remove #elif 0.
1074         * adaint.h: Likewise.
1075         * cio.c: Likewise.
1076         * cstreams.c: Likewise.
1077         * env.c: Likewise.
1078         * gsocket.h: Likewise.
1079         * init.c: Likewise.  Test for __i386__ instead of i386.
1080         * link.c: Likewise.
1081         * s-oscons-tmplt.c: Likewise.
1082         * sysdep.c: Likewise.
1083         * terminals.c: Likewise.  Use BSD symbol instead of FREEBSD.
1084         * tracebak.c: Likewise.  Test for __sparc__ instead of sparc.
1085
1086 2015-05-28  Eric Botcazou  <ebotcazou@adacore.com>
1087
1088         * gcc-interface/utils.c (max_size) <tcc_binary>: Add special code to
1089         deal with the subtraction of a "negative" value in an unsigned type.
1090
1091 2015-05-28  Eric Botcazou  <ebotcazou@adacore.com>
1092
1093         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Do
1094         not error out on a return type which has a size that overflows if the
1095         return is done by invisible reference.
1096
1097 2015-05-28  Eric Botcazou  <ebotcazou@adacore.com>
1098
1099         * gcc-interface/utils.c (gnat_pushdecl): Reunify the handling of array
1100         and pointer types wrt DECL_ORIGINAL_TYPE and adjust left and right.
1101
1102 2015-05-28  Eric Botcazou  <ebotcazou@adacore.com>
1103
1104         * gcc-interface/gigi.h (gnat_stabilize_reference): Adjust.
1105         (rewrite_fn): Remove third parameter.
1106         (type_is_padding_self_referential): New inline predicate.
1107         (return_type_with_variable_size_p): Likewise.
1108         * gcc-interface/decl.c (allocatable_size_p): More around.
1109         (cannot_be_superflat_p): Rename into...
1110         (cannot_be_superflat ): ...this.
1111         (initial_value_needs_conversion): New predicate.
1112         (gnat_to_gnu_entity): Invoke type_is_padding_self_referential,
1113         initial_value_needs_conversion and adjust to above renaming.
1114         For a renaming, force the materialization if the inner expression
1115         is compound.  Adjust calls to elaborate_reference and build a
1116         compound expression if needed.
1117         (struct er_dat): Add N field.
1118         (elaborate_reference_1): Remove N parameter and adjust.
1119         (elaborate_reference): Add INIT parameter and pass it in the call to
1120         gnat_rewrite_reference.  Adjust initial expression.
1121         * gcc-interface/trans.c (Call_to_gnu): Treat renamings the same way as
1122         regular object declarations when it comes to creating a temporary.
1123         Adjust call to gnat_stabilize_reference and build a compound expression
1124         if needed.  Invoke return_type_with_variable_size_p.
1125         (gnat_to_gnu): Invoke type_is_padding_self_referential.  In case #4,
1126         return a call to a function unmodified if it returns with variable size
1127         and is also the initial expression in an object declaration.
1128         * gcc-interface/utils2.c (build_binary_op) <INIT_EXPR>: Use the RHS'
1129         type if it is a call to a function that returns with variable size.
1130         (build_unary_op): Invoke type_is_padding_self_referential.
1131         (gnat_stabilize_reference_1): Remove N parameter and adjust.
1132         (gnat_stabilize_reference): Add INIT parameter and pass it in the call
1133         to gnat_rewrite_reference.
1134         (gnat_rewrite_reference):  Remove N, add INIT parameter and adjust.
1135         <COMPOUND_EXPR>: New case.
1136
1137 2015-05-28  Ed Schonberg  <schonberg@adacore.com>
1138
1139         * sem_ch3.adb (Is_Visible_Component): Component is visible
1140         in a derived type if inherited through an ancestor that has a
1141         partial view of the original type holding the component, if the
1142         full view of that original type is in scope.
1143         * sem_util.ads (Get_Body_From_Stub): Works for all kinds of stubs.
1144
1145 2015-05-28  Bob Duff  <duff@adacore.com>
1146
1147         * sem_util.adb (Requires_Transient_Scope): For definite untagged
1148         subtypes, we should never have to use the secondary stack. This moves
1149         toward that goal. But there are still cases that don't work.
1150         Here, we move the check for Is_Definite first, but add a
1151         special-purpose check for Has_Discrim_Dep_Array.
1152
1153 2015-05-28  Bob Duff  <duff@adacore.com>
1154
1155         * sem_util.adb (Requires_Transient_Scope): Avoid returning
1156         function results on the secondary stack in so many cases.
1157
1158 2015-05-28  Ed Schonberg  <schonberg@adacore.com>
1159
1160         * sem_util.adb (Wrong_Type): In any instance, do not emit error
1161         if type of expression is the partial view of the expected type.
1162
1163 2015-05-28  Ed Schonberg  <schonberg@adacore.com>
1164
1165         * sem_res.adb (Resolve_Actuals): a)  The replacement of formal
1166         names in named associations only needs to be done within an
1167         instance, on a call to a primitive of a formal derived type,
1168         where the actual subprogram may have different formal names than
1169         those of the primitive operation of the formal type.
1170         b) Defaulted parameters must be taken into account when obtaining
1171         the names of the formals of the actual subprogram being called.
1172
1173 2015-05-28  Robert Dewar  <dewar@adacore.com>
1174
1175         * sem_ch13.adb, sem_disp.ads: Minor reformatting.
1176
1177 2015-05-28  Ed Schonberg  <schonberg@adacore.com>
1178
1179         * sem_util.adb (Set_Debug_Info_Needed): For a private type
1180         whose full view is itself a derived private type, set flag on
1181         underlying full view as well, for proper gdb display.
1182
1183 2015-05-28  Bob Duff  <duff@adacore.com>
1184
1185         * exp_tss.ads: Minor comment fix.
1186         * exp_ch3.adb (Build_Array_Init_Proc, Build_Record_Init_Proc):
1187         Inline init_procs when the type has controlled parts. Remove
1188         obsolete comments about those init_procs -- init_procs for
1189         such types are no longer complex. A typical init_proc just
1190         initializes the 'Tag field, and calls the parent init_proc
1191         (e.g. for Limited_Controlled), which calls the grandparent
1192         (for Root_Controlled), which does nothing. This all boils down
1193         to one instruction when inlined.
1194         * exp_ch7.adb (Create_Finalizer): Inline the finalizer.
1195
1196 2015-05-28  Ed Schonberg  <schonberg@adacore.com>
1197
1198         * sem_ch4.adb (Analyze_Selected_Component): If the type to use
1199         is a derived type and is a generic actual, the selected component
1200         appears within an instance body, and the check over the type
1201         has failed, examine ancestor types for the desired component.
1202         (Find_Component_In_Instance): If record type is a derived type,
1203         examine all ancestors in order to locate desired component.
1204
1205 2015-05-27  H.J. Lu  <hongjiu.lu@intel.com>
1206
1207         * gcc-interface/Makefile.in (TOOLS_LIBS): Add @NO_PIE_FLAG@.
1208
1209 2015-05-27  Eric Botcazou  <ebotcazou@adacore.com>
1210
1211         * gcc-interface/trans.c (elaborate_all_entities): Do not elaborate an
1212         incomplete type coming from a limited_with and whose non-limited view
1213         comes from the main unit.
1214
1215 2015-05-27  Eric Botcazou  <ebotcazou@adacore.com>
1216
1217         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Move down
1218         code applying atomic checks to the object.
1219
1220 2015-05-27  Robert Dewar  <dewar@adacore.com>
1221
1222         * sem_aux.adb: Minor rewording.
1223
1224 2015-05-27  Bob Duff  <duff@adacore.com>
1225
1226         * exp_prag.adb (Expand_Pragma_Abort_Defer): Make
1227         pragma Abort_Defer do nothing if Abort_Allowed is False.
1228
1229 2015-05-27  Arnaud Charlet  <charlet@adacore.com>
1230
1231         * exp_ch9.adb, sem_util.adb, sem_util.ads, s-stposu.adb, s-spsufi.ads,
1232         sem_elab.ads, g-comlin.ads, errout.ads, exp_ch6.adb, sem_ch4.adb,
1233         opt.ads, s-bignum.adb, output.ads, sem_ch13.adb, erroutc.ads,
1234         sem_disp.ads, exp_ch3.adb: Minor fixes of duplicate words in comments.
1235
1236 2015-05-27  Doug Rupp  <rupp@adacore.com>
1237
1238         * adaint.c (__gnat_tmp_name) [vxworks]: Robustify and use for rtp as
1239         well as kernel.
1240
1241 2015-05-27  Pierre-Marie de Rodat  <derodat@adacore.com>
1242
1243         * par_sco.adb (Process_Decision): Store sloc to
1244         condition/pragmas SCOs associations into a temporary table before
1245         moving them to the SCO_Raw_Hash_Table so that we can back them
1246         out just like we do for SCO entries that are simple decisions
1247         in an expression context.
1248
1249 2015-05-27  Ed Schonberg  <schonberg@adacore.com>
1250
1251         * sem_ch6.adb (Process_Formals): A non-private formal type that
1252         is a limited view does not have a list of private dependents.
1253
1254 2015-05-27  Ed Schonberg  <schonberg@adacore.com>
1255
1256         * exp_ch5.adb (Expand_N_Case_Statement): If the expression in
1257         the case statement is a compile-time known value, we look for a
1258         corresponding alternative to optimize the case statement into a
1259         single case. If the type has a static predicate and the expression
1260         does not satisfy the predicate, there is no legal alternative and
1261         this optimization is not applicable.  Excecution is erroneous,
1262         or else if assertions are enabled, an exception will be raised
1263         earlier, at the point the expression is elaborated.
1264
1265 2015-05-27  Robert Dewar  <dewar@adacore.com>
1266
1267         * sem_elab.adb (Check_Internal_Call_Continue): Suppress
1268         warning on Finalize, Adjust, or Initialize if type involved has
1269         Warnings_Off set.
1270
1271 2015-05-27  Ed Schonberg  <schonberg@adacore.com>
1272
1273         * sem_aux.adb, sem_aux.ads (First_Discriminant): Return empty when
1274         applied to a type with no known discriminants.
1275
1276 2015-05-26  Robert Dewar  <dewar@adacore.com>
1277
1278         * errout.ads, sem_ch4.adb, sem_ch6.adb: Minor reformatting.
1279
1280 2015-05-26  Bob Duff  <duff@adacore.com>
1281
1282         * sem_elab.adb (Check_A_Call): In the case where we're
1283         calling something in an instance of a generic package that is
1284         within this same unit (as the call), make sure we treat it
1285         as a call to an entity within the same unit. That is, call
1286         Check_Internal_Call, rather than putting "Elaborate_All(X)"
1287         on X, which would necessarily result in an elaboration cycle in
1288         static-elaboration mode.
1289
1290 2015-05-26  Eric Botcazou  <ebotcazou@adacore.com>
1291
1292         * freeze.ads (Is_Atomic_VFA_Aggregate): Adjust profile.
1293         * freeze.adb (Is_Atomic_VFA_Aggregate): Change Entity
1294         parameter into Node parameter and remove Type parameter.
1295         Look at Is_Atomic_Or_VFA both on the type and on the object.
1296         (Freeze_Entity): Adjust call to Is_Atomic_VFA_Aggregate.
1297         * exp_aggr.adb (Expand_Record_Aggregate): Likewise.
1298         (Process_Atomic_Independent_Shared_Volatile): Remove code
1299         propagating Atomic or VFA from object to locally-defined type.
1300
1301 2015-05-26  Bob Duff  <duff@adacore.com>
1302
1303         * exp_ch7.adb: Minor comment fix.
1304
1305 2015-05-26  Eric Botcazou  <ebotcazou@adacore.com>
1306
1307         * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Min/Attr_Max>: Do not
1308         bother about NaN's if Machine_Overflows is true.
1309
1310 2015-05-26  Eric Botcazou  <ebotcazou@adacore.com>
1311
1312         * gcc-interface/trans.c (gnat_to_gnu) <N_Object_Declaration>: Really
1313         force evaluation of the expression, if any, when the object has its
1314         elaboration delayed.  Do not create a variable at global level.
1315
1316 2015-05-26  Eric Botcazou  <ebotcazou@adacore.com>
1317
1318         * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Machine>: Do not apply
1319         extra-precision trick to literals.  Build SAVE_EXPR manually.
1320
1321         * gcc-interface/misc.c (enumerate_modes): Add bypass for x86/x86-64.
1322
1323 2015-05-26  Eric Botcazou  <ebotcazou@adacore.com>
1324
1325         * gcc-interface/ada-tree.h (DECL_GLOBAL_NONCONSTANT_RENAMING_P): Delete
1326         (DECL_RENAMED_OBJECT): Adjust comment.
1327         * gcc-interface/gigi.h (record_global_nonconstant_renaming): Delete.
1328         (invalidate_global_nonconstant_renamings): Likewise.
1329         (gnat_constant_reference_p): Likewise.
1330         (rewrite_fn): New function type.
1331         (gnat_rewrite_reference): Declare.
1332         (call_is_atomic_load): New inline predicate.
1333         * gcc-interface/decl.c (elaborate_reference_1): New function.
1334         (elaborate_reference): Likewise.
1335         (gnat_to_gnu_entity): Call elaborate_reference to elaborate renamings
1336         and simplify associated code.  Set const_flag to true consistently in
1337         conjunction with used_by_ref.
1338         * gcc-interface/trans.c (Identifier_to_gnu): Always replace renaming
1339         pointers by renamed objects.
1340         (outer_atomic_access_required_p): Deal with renamings.
1341         (Compilation_Unit_to_gnu): Do not call
1342         invalidate_global_nonconstant_renamings.
1343         (gnat_to_gnu) <N_Object_Renaming_Declaration>: Adjust comment.
1344         (gnat_gimplify_expr): Deal with atomic loads.
1345         * gcc-interface/utils.c (global_nonconstant_renamings): Delete.
1346         (destroy_gnat_utils): Do not call
1347         invalidate_global_nonconstant_renamings.
1348         (record_global_nonconstant_renaming): Delete.
1349         (invalidate_global_nonconstant_renamings): Likewise.
1350         * gcc-interface/utils2.c (call_is_atomic_load): Move to gigi.h.
1351         (build_load_modify_store): Build a copy of the destination.
1352         (gnat_stabilize_reference_1): Adjust.
1353         (gnat_stabilize_reference): Call gnat_stabilize_reference_1 through
1354         gnat_rewrite_reference and move bulk of code to...
1355         (gnat_rewrite_reference): ...here.  New global function.
1356         (gnat_constant_reference_p): Delete.
1357
1358 2015-05-26  Eric Botcazou  <ebotcazou@adacore.com>
1359
1360         * gcc-interface/gigi.h (gnat_stabilize_reference): Adjust prototype.
1361         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not rely on const_flag
1362         to detect constant renamings.  Be prepared for specific pattern of
1363         renamed object based on function calls.  Create a constant object
1364         for the renaming of a NULL_EXPR or of a CONSTRUCTOR.  Adjust calls
1365         to gnat_stabilize_reference and tidy up.  Remove redundant tests.
1366         (elaborate_expression_1): Remove obsolete test and tidy up.
1367         * gcc-interface/trans.c (Call_to_gnu): Do not stabilize In/Out or Out
1368         parameters passed by reference.
1369         (gnat_to_gnu) <N_Selected_Component>: Remove redundant protection again
1370         side-effects.
1371         Use gnat_protect_expr instead of gnat_stabilize_reference for general
1372         protection against side-effects.
1373         * gcc-interface/utils2.c (gnat_stable_expr_p): New predicate.
1374         (gnat_save_expr): Invoke it.
1375         (gnat_protect_expr): Likewise.
1376         (gnat_stabilize_reference_1): Likewise.  Remove useless propagation
1377         of TREE_THIS_NOTRAP.
1378         (gnat_stabilize_reference): Remove parameter and adjust throughout.
1379         Delete ADDR_EXDR, COMPOUND_EXPR and CONSTRUCTOR cases.
1380         Restrict CALL_EXPR case to atomic loads and tweak ERROR_MARK case.
1381
1382 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
1383
1384         * sinfo.ads: Minor reformatting.
1385         * sem_aux.ads: Clarify use of First_Discriminant.
1386         * sem_ch4.adb (Analyze_Explicit_Dereference): The use of a limited
1387         view is replaced with the non-limited view in an instance body,
1388         where the enclosing unit must have a regular with_clause on the
1389         relevant unit.
1390         * sem_ch12.adb (Install_Body): Freeze instantation after its
1391         body. Remove useless freeze nodes for incomplete actuals to
1392         prevent multiple generation of internal operations.
1393         (Instantiate_Package_Body): Set sloc of body appropriately when
1394         there are incomplete actuals and the instance body is placed in
1395         the body of the enclosing unit.
1396         * errout.ads: Consistent punctuation, better alignment and trivial
1397         typos in comments.
1398         * err_vars.ads: Fix typo.
1399
1400 2015-05-26  Eric Botcazou  <ebotcazou@adacore.com>
1401
1402         * sem_ch8.adb (Analyze_Object_Renaming): Lift restriction on
1403         components of Volatile_Full_Access objects.
1404
1405 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
1406
1407         * sem_ch6.adb (Is_Non_Overriding_Operation,
1408         Get_Generic_Parent_Type): Handle properly the case of a derived
1409         scalar type by using the first subtype rather than its generated
1410         anonymous base type.
1411
1412 2015-05-26  Eric Botcazou  <ebotcazou@adacore.com>
1413
1414         * einfo.adb (Write_Field17_Name): Move E_Incomplete_Subtype
1415         case to...
1416         (Write_Field19_Name): ...here.
1417
1418 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
1419
1420         * sem_ch13.adb: sem_ch13.adb (Add_Predicates): Undo analysis
1421         of original expression in ASIS mode: does not solve the ASIS
1422         problem of a usable type information, and crashes the back-end
1423         when performing type annotations.
1424
1425 2015-05-26  Robert Dewar  <dewar@adacore.com>
1426
1427         * sem_disp.adb (Inherited_Subprograms): Add One_Only parameter.
1428         (Is_Overriding_Subprogram): Use One_Only_Parameter.
1429         * sem_disp.ads (Inherited_Subprograms): Add One_Only parameter.
1430
1431 2015-05-26  Robert Dewar  <dewar@adacore.com>
1432
1433         * exp_prag.adb, sem_ch3.adb, sem_ch5.adb, exp_ch11.adb, ghost.adb,
1434         exp_ch6.adb, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb, sem_ch13.adb,
1435         exp_ch3.adb: Minor reformatting.
1436
1437 2015-05-26  Bob Duff  <duff@adacore.com>
1438
1439         * treepr.adb: Minor improvement to debugging routines (pp, pn)
1440         robustness.  Rearrange the code so passing a nonexistent Node_Id
1441         prints "No such node" rather than crashing, and causing gdb to
1442         generate confusing messages.
1443
1444 2015-05-26  Gary Dismukes  <dismukes@adacore.com>
1445
1446         * sem_util.adb: Minor typo fix.
1447
1448 2015-05-26  Yannick Moy  <moy@adacore.com>
1449
1450         * sem_aux.adb (Subprogram_Body_Entity): Deal with subprogram stubs.
1451
1452 2015-05-26  Hristian Kirtchev  <kirtchev@adacore.com>
1453
1454         * exp_ch3.adb (Expand_N_Full_Type_Declaration): Capture, set and
1455         restore the Ghost mode.
1456         (Expand_N_Object_Declaration): Capture, set and restore the Ghost mode.
1457         (Freeze_Type): Update the call to Set_Ghost_Mode.
1458         (Restore_Globals): New routine.
1459         * exp_ch5.adb Add with and use clauses for Ghost.
1460         (Expand_N_Assignment_Statement): Capture, set and restore the
1461         Ghost mode.
1462         (Restore_Globals): New routine.
1463         * exp_ch6.adb Add with and use clauses for Ghost.
1464         (Expand_N_Procedure_Call_Statement): Capture, set and
1465         restore the Ghost mode.
1466         (Expand_N_Subprogram_Body):
1467         Code cleanup. Capture, set and restore the Ghost mode.
1468         (Expand_N_Subprogram_Declaration): Capture, set and restore the
1469         Ghost mode.
1470         (Restore_Globals): New routine.
1471         * exp_ch7.adb Add with and use clauses for Ghost.
1472         (Expand_N_Package_Body): Capture, set and restore the Ghost mode.
1473         (Expand_N_Package_Declaration): Capture, set and restore the
1474         Ghost mode.
1475         (Wrap_HSS_In_Block): Create a proper identifier for the block.
1476         * exp_ch8.adb Add with and use clauses for Ghost.
1477         (Expand_N_Exception_Renaming_Declaration): Code
1478         cleanup. Capture, set and restore the Ghost mode.
1479         (Expand_N_Object_Renaming_Declaration): Capture, set and restore
1480         the Ghost mode.
1481         (Expand_N_Package_Renaming_Declaration): Capture, set and restore the
1482         Ghost mode.
1483         (Expand_N_Subprogram_Renaming_Declaration): Capture, set and
1484         restore the Ghost mode.
1485         * exp_ch11.adb (Expand_N_Exception_Declaration): Code
1486         cleanup. Capture, set and restore the Ghost mode.
1487         * exp_disp.adb (Make_DT): Update the call to Set_Ghost_Mode. Do
1488         not initialize the dispatch table slot of a Ghost subprogram.
1489         * exp_prag.adb Add with and use clauses for Ghost.
1490         (Expand_Pragma_Check): Capture, set and restore the Ghost mode.
1491         (Expand_Pragma_Contract_Cases): Capture, set and restore the
1492         Ghost mode.
1493         (Expand_Pragma_Initial_Condition): Capture, set and
1494         restore the Ghost mode.
1495         (Expand_Pragma_Loop_Variant): Capture,
1496         set and restore the Ghost mode.
1497         (Restore_Globals): New routine.
1498         * exp_util.adb Add with and use clauses for Ghost.
1499         (Make_Predicate_Call): Code cleanup. Capture, set and restore
1500         the Ghost mode.
1501         (Restore_Globals): New routine.
1502         * freeze.adb (Freeze_Entity): Code cleanup. Update the call
1503         to Set_Ghost_Mode.
1504         * ghost.adb Add with and use clause for Sem_Prag.
1505         (Check_Ghost_Completion): Code cleanup.
1506         (Check_Ghost_Overriding): New routine.
1507         (Check_Ghost_Policy): Code cleanup.
1508         (Ghost_Entity): New routine.
1509         (Is_Ghost_Declaration): Removed.
1510         (Is_Ghost_Statement_Or_Pragma): Removed.
1511         (Is_OK_Context): Reimplemented.
1512         (Is_OK_Declaration): New routine.
1513         (Is_OK_Pragma): New routine.
1514         (Is_OK_Statement): New routine.
1515         (Mark_Full_View_As_Ghost): New routine.
1516         (Mark_Pragma_As_Ghost): New routine.
1517         (Mark_Renaming_As_Ghost): New routine.
1518         (Propagate_Ignored_Ghost_Code): Update the comment on usage.
1519         (Set_From_Entity): New routine.
1520         (Set_From_Policy): New routine.
1521         (Set_Ghost_Mode): This routine now handles pragmas and freeze nodes.
1522         (Set_Ghost_Mode_For_Freeze): Removed.
1523         (Set_Ghost_Mode_From_Entity): New routine.
1524         (Set_Ghost_Mode_From_Policy): Removed.
1525         * ghost.ads (Check_Ghost_Overriding): New routine.
1526         (Mark_Full_View_As_Ghost): New routine.
1527         (Mark_Pragma_As_Ghost): New routine.
1528         (Mark_Renaming_As_Ghost): New routine.
1529         (Set_Ghost_Mode): Update the parameter profile. Update the
1530         comment on usage.
1531         (Set_Ghost_Mode_For_Freeze): Removed.
1532         (Set_Ghost_Mode_From_Entity): New routine.
1533         * sem_ch3.adb (Analyze_Full_Type_Declaration):
1534         Capture and restore the Ghost mode. Mark a type
1535         as Ghost regardless of whether it comes from source.
1536         (Analyze_Incomplete_Type_Decl): Capture, set and restore the
1537         Ghost mode.
1538         (Analyze_Number_Declaration): Capture and restore the Ghost mode.
1539         (Analyze_Object_Declaration): Capture and restore the Ghost mode.
1540         (Analyze_Private_Extension_Declaration): Capture and
1541         restore the Ghost mode.
1542         (Analyze_Subtype_Declaration): Capture and restore the Ghost mode.
1543         (Process_Full_View): The full view inherits all Ghost-related
1544         attributes from the private view.
1545         (Restore_Globals): New routine.
1546         * sem_ch5.adb (Analyze_Assignment): Capture and restore the
1547         Ghost mode.
1548         (Restore_Globals): New routine.
1549         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration):
1550         Code cleanup. Capture and restore the Ghost mode. Mark a
1551         subprogram as Ghost regarless of whether it comes from source.
1552         (Analyze_Procedure_Call): Capture and restore the Ghost mode.
1553         (Analyze_Subprogram_Body_Helper): Capture and restore the Ghost mode.
1554         (Analyze_Subprogram_Declaration): Capture and restore the Ghost mode.
1555         (New_Overloaded_Entity): Ensure that a
1556         parent subprogram and an overriding subprogram have compatible
1557         Ghost policies.
1558         * sem_ch7.adb (Analyze_Package_Body_Helper): Capture and restore
1559         the Ghost mode.
1560         (Analyze_Package_Declaration): Capture and
1561         restore the Ghost mode. Mark a package as Ghost when it is
1562         declared in a Ghost region.
1563         (Analyze_Private_Type_Declaration): Capture and restore the Ghost mode.
1564         (Restore_Globals): New routine.
1565         * sem_ch8.adb (Analyze_Exception_Renaming): Code
1566         reformatting. Capture and restore the Ghost mode. A renaming
1567         becomes Ghost when its name references a Ghost entity.
1568         (Analyze_Generic_Renaming): Capture and restore the Ghost mode. A
1569         renaming becomes Ghost when its name references a Ghost entity.
1570         (Analyze_Object_Renaming): Capture and restore the Ghost mode. A
1571         renaming becomes Ghost when its name references a Ghost entity.
1572         (Analyze_Package_Renaming): Capture and restore the Ghost mode. A
1573         renaming becomes Ghost when its name references a Ghost entity.
1574         (Analyze_Subprogram_Renaming): Capture and restore the Ghost
1575         mode. A renaming becomes Ghost when its name references a
1576         Ghost entity.
1577         * sem_ch11.adb (Analyze_Exception_Declaration): Capture, set
1578         and restore the Ghost mode.
1579         * sem_ch12.adb (Analyze_Generic_Package_Declaration): Capture and
1580         restore the Ghost mode.
1581         (Analyze_Generic_Subprogram_Declaration):
1582         Capture and restore the Ghost mode.
1583         * sem_ch13.adb Add with and use clauses for Ghost.
1584         (Add_Invariant): New routine.
1585         (Add_Invariants): Factor out code.
1586         (Add_Predicate): New routine.
1587         (Add_Predicates): Factor out code.
1588         (Build_Invariant_Procedure_Declaration): Code cleanup. Capture,
1589         set and restore the Ghost mode.
1590         (Build_Invariant_Procedure): Code cleanup.
1591         (Build_Predicate_Functions): Capture, set and
1592         restore the Ghost mode. Mark the generated functions as Ghost.
1593         * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
1594         Capture, set and restore the Ghost mode.
1595         (Analyze_External_Property_In_Decl_Part): Capture, set and restore
1596         the Ghost mode.
1597         (Analyze_Initial_Condition_In_Decl_Part):
1598         Capture, set and restore the Ghost mode.
1599         (Analyze_Pragma):
1600         Code cleanup. Capture, set and restore the Ghost mode. Flag
1601         pragmas Linker_Section, No_Return, Unmodified, Unreferenced and
1602         Unreferenced_Objects as illegal when it applies to both Ghost
1603         and living arguments. Pragma Ghost cannot apply to synchronized
1604         objects.
1605         (Check_Kind): Moved to the spec of Sem_Prag.
1606         (Process_Inline): Flag the pragma as illegal when it applies to
1607         both Ghost and living arguments.
1608         (Restore_Globals): New routine.
1609         * sem_prag.ads Add pragma Default_Initial_Condition
1610         to table Assertion_Expression_Pragma. Add new table
1611         Is_Aspect_Specifying_Pragma.
1612         (Check_Kind): Moved from body of Sem_Prag.
1613         * sem_util.adb Add with and use clauses for Ghost.
1614         (Build_Default_Init_Cond_Procedure_Body): Capture, set and restore
1615         the Ghost mode.
1616         (Build_Default_Init_Cond_Procedure_Declaration):
1617         Capture, set and restore the Ghost mode. Mark the default
1618         initial condition procedure as Ghost when it is declared
1619         in a Ghost region.
1620         (Is_Renaming_Declaration): New routine.
1621         (Policy_In_List): Account for the single argument version of
1622         Check_Pragma.
1623         * sem_util.ads (Is_Renaming_Declaration): New routine.
1624         * sinfo.adb (Is_Ghost_Pragma): New routine.
1625         (Set_Is_Ghost_Pragma): New routine.
1626         * sinfo.ads New attribute Is_Ghost_Pragma.
1627         (Is_Ghost_Pragma): New routine along with pragma Inline.
1628         (Set_Is_Ghost_Pragma): New routine along with pragma Inline.
1629
1630 2015-05-26  Robert Dewar  <dewar@adacore.com>
1631
1632         * sem_ch3.adb, sem_aux.adb, sem_aux.ads, exp_ch6.adb, sprint.adb:
1633         Minor reformatting.
1634
1635 2015-05-26  Gary Dismukes  <dismukes@adacore.com>
1636
1637         * gnat1drv.adb, targparm.adb, targparm.ads, restrict.adb: Minor
1638         reformatting and typo fixes in comments.
1639
1640 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
1641
1642         * sem_ch7.adb (Swap_Private_Dependets): Set visibility of
1643         the two views of a private dependent in two separate steps,
1644         to ensure proper visibility in parent units analyzed for inlining.
1645
1646 2015-05-26  Yannick Moy  <moy@adacore.com>
1647
1648         * sem_aux.adb, sem_aux.ads (Get_Low_Bound): Use Type_Low_Bound.
1649         (Package_Body, Package_Spec): New queries moved
1650         here from GNATprove.
1651         (Package_Specification): Simplify query to remove use of loop.
1652         * sem_util.adb, sem_util.ads (Enclosing_Declaration,
1653         Enclosing_Package_Or_Subprogram, Is_Attribute_Update): New
1654         queries moved here from GNATprove.
1655
1656 2015-05-26  Bob Duff  <duff@adacore.com>
1657
1658         * einfo.adb, einfo.ads, sprint.adb, lib-xref.ads: Minor cleanup: Remove
1659         obsolete Entity_Kinds E_String_Type and E_String_Subtype. Update
1660         redundant assertions.
1661
1662 2015-05-26  Gary Dismukes  <dismukes@adacore.com>
1663
1664         * sem_util.adb, sem_util.ads, sem_ch13.adb: Minor typo fixes.
1665
1666 2015-05-26  Doug Rupp  <rupp@adacore.com>
1667
1668         * init.c [vxworks]: Refine previous checkin.
1669
1670 2015-05-26  Robert Dewar  <dewar@adacore.com>
1671
1672         * exp_ch4.adb (Wrap_MA): New function.
1673         (Expand_N_Op_Expon): Use Wrap_MA.
1674
1675 2015-05-26  Bob Duff  <duff@adacore.com>
1676
1677         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
1678         Do not use secondary stack to return limited records with
1679         defaulted discriminants. This is an efficiency improvement.
1680         * exp_ch6.adb, exp_dist.adb, sem_attr.adb, sem_aux.adb, sem_aux.ads,
1681         sem_ch12.adb, sem_ch3.adb, sem_ch4.adb, sem_ch6.adb, sem_ch7.adb,
1682         sem_util.adb: Change the sense of Is_Indefinite_Subtype to be
1683         Is_Definite_Subtype. This is an improvement to readability (the double
1684         negative in "not Is_Indefinite_Subtype" was slightly confusing). Also
1685         disallow passing non-[sub]type entities, an unnecessary and slightly
1686         bug-prone flexibility.
1687
1688 2015-05-26  Robert Dewar  <dewar@adacore.com>
1689
1690         * sem_aggr.adb (Resolve_Array_Aggregate): Defend against
1691         bad bounds.
1692         * debug.adb: Document -gnatd.k.
1693         * erroutc.adb (Set_Msg_Insertion_Line_Number): Implement -gnatd.k.
1694
1695 2015-05-26  Robert Dewar  <dewar@adacore.com>
1696
1697         * gnat1drv.adb (Gnat1drv): Provide new arguments for
1698         Get_Target_Parameters.
1699         * restrict.adb (Set_Restriction_No_Specification_Of_Aspect):
1700         new procedure.
1701         (Set_Restriction_No_Use_Of_Attribute): new procedure.
1702         * restrict.ads (Set_Restriction_No_Specification_Of_Aspect):
1703         new procedure.
1704         (Set_Restriction_No_Use_Of_Attribute): new procedure.
1705         * s-rident.ads (Integer_Parameter_Restrictions): New subtype.
1706         * targparm.adb (Get_Target_Parameters): Allow new restriction
1707         pragmas No_Specification_Of_Aspect No_Use_Of_Attribute
1708         No_Use_Of_Pragma.
1709         * targparm.ads: New parameters for Get_Target_Parameters.
1710         * tbuild.adb (Set_NOD): New name for Set_RND.
1711         (Set_NSA): New procedure.
1712         (Set_NUA): New procedure.
1713         (Set_NUP): New procedure.
1714         * tbuild.ads (Make_SC): Minor reformatting.
1715         (Set_NOD): New name for Set_RND.
1716         (Set_NSA, Set_NUA, Set_NUP): New procedure.
1717
1718 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
1719
1720         * a-stwise.adb (Find_Token): If source'first is not positive,
1721         an exception must be raised, as specified by RM 2005 A.4.3
1722         (68/1). This must be checked explicitly, given that run-time
1723         files are normally compiled without constraint checks.
1724         * a-stzsea.adb (Find_Token): Ditto.
1725
1726 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
1727
1728         * sem_util.ads sem_util.adb (Is_Current_Instance):  New predicate
1729         to fully implement RM 8.6 (17/3). which earlier only applied
1730         to synchronized types. Used to preanalyze aspects that include
1731         current instances of types, such as Predicate and Invariant.
1732         * sem_res.adb (Resolve_Entity_Name): Use Is_Current_Instance.
1733         * sem_ch13.adb (Add_Predicates): In ASIS mode, preserve original
1734         expression of aspect and analyze it to provide proper type
1735         information.
1736
1737 2015-05-26  Robert Dewar  <dewar@adacore.com>
1738
1739         * rtsfind.ads: Add entries for RE_Exn[_Long]_Float.
1740         * s-exnllf.adb (Exn_Float): New function.
1741         (Exn_Long_Float): New function.
1742         (Exn_Long_Long_Float): Rewritten interface.
1743         (Exp): New name for what used to be Exn_Long_Long_Float.
1744         * s-exnllf.ads (Exn_Float): New function.
1745         (Exn_Long_Float): New function.
1746
1747 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
1748
1749         * sem_ch8.adb (Find_Selected_Component): Do not emit an error
1750         on a selected component when the prefix is a type name that is
1751         a Current_Instance.
1752         * einfo.ads: Minor grammar fix.
1753
1754 2015-05-26  Doug Rupp  <rupp@adacore.com>
1755
1756         * init.c [vxworks] (sysLib.h): Only for x86.
1757
1758 2015-05-26  Doug Rupp  <rupp@adacore.com>
1759
1760         * init-vxsim.c (CPU): define as __VXSIM_CPU__
1761         * sigtramp-vxworks-vxsim.c (CPU): Likewise.
1762         sigtramp-vxworks-target.inc: Add check for SIMLINUX.
1763         * sigtramp.h: Likewise.
1764
1765 2015-05-26  Robert Dewar  <dewar@adacore.com>
1766
1767         * sem_aux.adb, sem_disp.adb, sem_util.ads: Add comment.
1768         * sem_util.adb: Minor reformatting
1769
1770 2015-05-26  Yannick Moy  <moy@adacore.com>
1771
1772         * inline.adb (Has_Initialized_Type): Adapt to new names.
1773         * sem_aux.adb, sem_aux.ads (Get_Low_Bound, Number_Components,
1774         Subprogram_Body, Subprogram_Body_Entity, Subprogram_Spec,
1775         Subprogram_Specification): New query functions used in GNATprove.
1776         * sem_disp.adb, sem_disp.ads (Is_Overriding_Subprogram): New
1777         query functions used in GNATprove.
1778         * sem_util.adb, sem_util.adso (Enclosing_Lib_Unit_Node,
1779         Get_Cursor_Type, Get_Return_Object, Get_User_Defined_Eq,
1780         Is_Double_Precision_Floating_Point_Type,
1781         Is_Single_Precision_Floating_Point_Type): New query functions
1782         used in GNATprove.
1783
1784 2015-05-26  Bob Duff  <duff@adacore.com>
1785
1786         * s-rpc.ads (Partition_ID): Increase maximum Partition_ID to
1787         some huge number.
1788         * a-except-2005.adb, a-except-2005.ads, a-except.adb,
1789         a-except.ads, a-exexda.adb, a-exstat.adb: Minor comment fixes.
1790
1791 2015-05-26  Robert Dewar  <dewar@adacore.com>
1792
1793         * sinfo.adb: Minor comment addition.
1794         * einfo.adb: Minor whitespace and punctuation fix.
1795         * sem_util.adb: Minor editing of comments.
1796
1797 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
1798
1799         * sem_ch7.adb (Install_Private_Declarations,
1800         Swap_Private_Dependents): Ensure that both views of the dependent
1801         subtype are immediately visible if we are within their scope. This
1802         may be needed when a procedure body is both the parent of an
1803         instantiated child unit, and is itself used to inline a local
1804         function.
1805
1806 2015-05-26  Gary Dismukes  <dismukes@adacore.com>
1807
1808         * exp_prag.adb, gnat1drv.adb: Minor reformatting.
1809
1810 2015-05-26  Eric Botcazou  <ebotcazou@adacore.com>
1811
1812         * exp_ch4.adb (Expand_N_Indexed_Component): In the circuit
1813         detecting exceptions to the rewriting, deal with implicit
1814         dereferences in the selected component case.
1815
1816 2015-05-26  Bob Duff  <duff@adacore.com>
1817
1818         * sem_ch13.adb (Analyze_One_Aspect): Do not
1819         require the expression of the Disable_Controlled aspect to be
1820         static in a generic template, because 'Enabled is not known
1821         until the instance.
1822
1823 2015-05-26  Doug Rupp  <rupp@adacore.com>
1824
1825         * init-vxsim.c: New file for vxsim ZCX
1826         * sigtramp-vxworks-vxsim.c: Likewise.
1827         * sigtramp-vxworks.c: Factor out target dependent bits into ...
1828         * sigtramp-vxworks-target.inc: ... here.
1829         * sigtramp.h: Add vxsim zcx protos.
1830         * init.c [vxworks...] (sysLib.h): Include.
1831         (__gnat_map_signal): Make global.
1832          [...i386] (__gnat_error_handler): Call __gnat_vxsim_error_handler if
1833         on vxsim.
1834         [...i386] (__gnat_install_handler): Test if on vxsim.
1835
1836 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
1837
1838         * sem_ch5.adb (Analyze_Iterator_Specification): For an element
1839         iterator over an array, if the component is aliased, the loop
1840         variable is aliased as well.
1841
1842 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
1843
1844         * exp_ch6.adb (Expand_Actuals): For a function call with in-out
1845         parameters that is rewritten as an expression_with_actions,
1846         we preserve the original function call node for further use by
1847         the caller (typically Expand_Call). In the presence of validity
1848         checks, that function call, though it is labelled Analyzed to
1849         prevent an infinite recursion, may be rewritten as a temporary
1850         by Remove_Side_Effects.  Ensure that the caller has access to
1851         the original function call to continue expansion.
1852         * atree.ads: Minor typo in comment.
1853
1854 2015-05-26  Javier Miranda  <miranda@adacore.com>
1855
1856         * sem_util.adb (Check_Function_Writable_Actuals):
1857         Add missing support to check the violation of writable actuals
1858         in array aggregates that have a nonstatic range.
1859
1860 2015-05-26  Hristian Kirtchev  <kirtchev@adacore.com>
1861
1862         * exp_ch6.adb (Process_Contract_Cases_For): Update the call to
1863         Expand_Pragma_Contract_Cases.
1864         * exp_prag.ads, exp_prag.adb (Expand_Contract_Cases): Rename to
1865         Expand_Pragma_Contract_Cases.
1866         * sem_ch13.adb (Add_Invariants): Use the original aspect name
1867         when creating the arguments of pragma Check. This ensures that
1868         'Class is properly recognized and handled.
1869
1870 2015-05-26  Arnaud Charlet  <charlet@adacore.com>
1871
1872         * gnat1drv.adb: Minor adjustments.
1873         (Adjust_Global_Switches): Disable some related flags in CodePeer mode.
1874         * sem_ch4.adb (Has_Arbitrary_Evaluation_Order,
1875         Stop_Subtree_Climbind): Code cleanup.
1876         * einfo.ads: Minor comment change.
1877
1878 2015-05-26  Javier Miranda  <miranda@adacore.com>
1879
1880         * sem_aggr.adb (Resolve_Aggregate, Resolve_Extension_Aggregate):
1881         Code cleanup.
1882         * sem_ch3.adb (Build_Derived_Record_Type,
1883         Record_Type_Declaration): Code cleanup.
1884         * sem_ch4.adb (Has_Arbitrary_Evaluation_Order,
1885         Stop_Subtree_Climbind): Tables which speed up the identification
1886         of dangerous calls to Ada 2012 functions with writable actuals
1887         (AI05-0144).
1888         (Analyze_Arithmetic_Op, Analyze_Call, Analyze_Comparison_Op,
1889         Analyze_Equality_Op, Analyze_Logical_Op, Analyze_Membership_Op,
1890         Analyze_Range): Code cleanup.
1891         (Is_Arbitrary_Evaluation_Order_Construct): Removed.
1892         (Check_Writable_Actuals): Code cleanup using the added tables.
1893         * sem_util.adb (Check_Function_Writable_Actuals): Return
1894         immediately if the node does not have the flag Check_Actuals
1895         set to True.
1896
1897 2015-05-26  Eric Botcazou  <ebotcazou@adacore.com>
1898
1899         * exp_ch6.adb (Add_Call_By_Copy_Code): Remove restrictive
1900         condition in the detection of the effects of Remove_Side_Effects.
1901         * exp_util.ads (Remove_Side_Effects): Add general and historical note.
1902         * exp_util.adb (Is_Name_Reference): New predicate.
1903         (Remove_Side_Effects): Use it in lieu of Is_Object_Reference
1904         in order to decide whether to use the renaming to capture the
1905         side effects of the subexpression.
1906         (Side_Effect_Free): Remove obsolete test.
1907
1908 2015-05-26  Robert Dewar  <dewar@adacore.com>
1909
1910         * aspects.ads, aspects.adb: Add aspect Disable_Controlled.
1911         * einfo.ads, einfo.adb (Disable_Controlled): New flag.
1912         (Is_Controlled_Active): New function.
1913         * exp_ch3.adb (Expand_Freeze_Record_Type): Use
1914         Is_Controlled_Active.
1915         * exp_util.adb (Needs_Finalization): Finalization not needed
1916         if Disable_Controlled set.
1917         * freeze.adb (Freeze_Array_Type): Do not set
1918         Has_Controlled_Component if the component has Disable_Controlled.
1919         (Freeze_Record_Type): ditto.
1920         * sem_ch13.adb (Decorate): Minor reformatting.
1921         (Analyze_Aspect_Specifications): Implement Disable_Controlled.
1922         * sem_ch3.adb (Analyze_Object_Declaration): Handle
1923         Disable_Controlled.
1924         (Array_Type_Declaration): ditto.
1925         (Build_Derived_Private_Type): ditto.
1926         (Build_Derived_Type): ditto.
1927         (Record_Type_Definition): ditto.
1928         * snames.ads-tmpl: Add Name_Disable_Controlled.
1929
1930 2015-05-26  Eric Botcazou  <ebotcazou@adacore.com>
1931
1932         * exp_ch6.adb (Expand_Actuals): Use a constant declaration instead
1933         of a renaming to capture the return value of a function call.
1934         (Expand_Simple_Function_Return): Call Remove_Side_Effects
1935         instead of removing side effects manually before the call to
1936         _Postconditions.
1937
1938 2015-05-26  Robert Dewar  <dewar@adacore.com>
1939
1940         * exp_ch4.adb (Expand_N_Op_Expon): Deal with problem of wrong
1941         order in calling Duplicate_Subexpr.
1942         * einfo.ads: Fix documentation of Object/Value size for scalar types.
1943
1944 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
1945
1946         * exp_aggr.adb (Build_Array_Aggr_Code, Gen_Assign):
1947         If a component is default-initialized and its type has an
1948         invariant procedure, insert an invariant test after code for
1949         default-initialization of the component.
1950
1951 2015-05-26  Gary Dismukes  <dismukes@adacore.com>
1952
1953         * einfo.ads, sem_util.adb, sem_ch4.adb: Minor reformatting.
1954
1955 2015-05-26  Robert Dewar  <dewar@adacore.com>
1956
1957         * exp_unst.adb, exp_unst.ads: Change to using Subps table index for
1958         making AREC entity names unique.
1959
1960 2015-05-26  Ed Schonberg  <schonberg@adacore.com>
1961
1962         * sem_cat.adb (Has_Stream_Attribute_Definition): If the type
1963         has aspect specifications, examine the corresponding list of
1964         representation items to determine whether there is a visible
1965         stream operation. The attribute definition clause generated from
1966         the aspect will be inserted at the freeze point of the type,
1967         which may be in the private part and not directly visible,
1968         but the aspect makes the operation available to a client.
1969
1970 2015-05-26  Robert Dewar  <dewar@adacore.com>
1971
1972         * sem_util.adb: Minor code reorganization.
1973         * sem_ch6.adb: Minor reformatting.
1974
1975 2015-05-25  Eric Botcazou  <ebotcazou@adacore.com>
1976
1977         * gcc-interface/utils.c (maybe_pad_type): Do not apply adjustment to
1978         original size for elementary types before issuing the size warning.
1979
1980 2015-05-25  Eric Botcazou  <ebotcazou@adacore.com>
1981
1982         * get_targ.adb (C_Get_Float_Words_BE): Adjust import name.
1983         (C_Get_Words_BE): Likewise.
1984         (C_Get_Bytes_BE): Likewise.
1985         (C_Get_Bits_BE): Likewise.
1986         (Width_From_Size): Remove superfluous space.
1987         * gcc-interface/targtyps.c (get_float_words_be): Rename into...
1988         (get_target_float_words_be): ...this.
1989         (get_words_be): Rename into...
1990         (get_target_words_be): ...this.
1991         (get_bytes_be): Rename into...
1992         (get_target_bytes_be): ...this.
1993         (get_bits_be): Rename into...
1994         (get_target_bits_be): ...this.
1995         * gcc-interface/gigi.h (standard_datatypes): Remove ADT_ptr_void_type.
1996         (ptr_void_type_node): Delete.
1997         (get_target_float_size): Likewise.
1998         (get_target_double_size): Likewise.
1999         (get_target_long_double_size): Likewise.
2000         (get_float_words_be): Likewise.
2001         (get_words_be): Likewise.
2002         (get_bytes_be): Likewise.
2003         (get_bits_be): Likewise.
2004         (get_target_float_words_be): Declare.
2005         (get_target_words_be): Likewise.
2006         (get_target_bytes_be): Likewise.
2007         (get_target_bits_be): Likewise.
2008         * gcc-interface/decl.c (gnat_to_gnu_entity): Replace ptr_void_type_node
2009         with ptr_type_node.
2010         (intrin_return_compatible_p): Likewise.
2011         * gcc-interface/trans.c (gigi): Likewise.
2012         * gcc-interface/utils2.c (maybe_wrap_malloc): Likewise.
2013         (maybe_wrap_free): Likewise.
2014         * gcc-interface/utils.c (maybe_pad_type): Remove superfluous space.
2015         * gcc-interface/misc.c (gnat_init): Do not set ptr_void_type_node.
2016
2017 2015-05-25  Eric Botcazou  <ebotcazou@adacore.com>
2018
2019         * gcc-interface/decl.c (elaborate_expression): Take a const string
2020         suffix instead of a tree.
2021         (elaborate_expression_1): Likewise.
2022         (elaborate_expression_2): Likewise.
2023         (gnat_to_gnu_entity): Adjust to above changes.
2024         (build_subst_list): Likewise.
2025         (get_entity_char): New static function.
2026
2027 2015-05-25  Eric Botcazou  <ebotcazou@adacore.com>
2028
2029         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: Move around.
2030         <E_Exception>: Merge with E_Variable case.
2031         <E_Variable>: Remove 'object' label.
2032
2033 2015-05-25  Eric Botcazou  <ebotcazou@adacore.com>
2034
2035         * gcc-interface/decl.c (gnat_to_gnu_entity): Minor tweak.
2036         * gcc-interface/trans.c (finalize_nrv_unc_r): Use CONSTRUCTOR_ELT.
2037         * gcc-interface/utils.c (convert): Likewise and simplify.
2038         (remove_conversions): Likewise.
2039         * gcc-interface/utils2.c (compare_fat_pointers): Likewise.
2040         (build_unary_op): Likewise and simplify.
2041
2042 2015-05-25  Eric Botcazou  <ebotcazou@adacore.com>
2043
2044         * gcc-interface/gigi.h (build_atomic_load): Adjust prototype.
2045         (build_atomic_store): Likewise.
2046         (build_load_modify_store): Declare.
2047         (VECTOR_TYPE_P): Delete.
2048         * gcc-interface/decl.c (gnat_to_gnu_entity): Replace Is_Atomic with
2049         Is_Atomic_Or_VFA throughout.
2050         <E_Array_Type>: Build a variant of the XUA type instead of forcing
2051         TYPE_VOLATILE on it.
2052         <E_Array_Subtype>: Use the main variant of the base type.
2053         Do not force TYPE_VOLATILE on the type being built.
2054         <E_Record_Type>: Likewise.
2055         <E_Array_Subtype>: Likewise.
2056         <E_Subprogram_Type>: Rename local variable.
2057         Add Atomic qualifier in conjunction with Volatile on types if needed.
2058         Force BLKmode for by-ref types only at the end of the processing.
2059         Change qualifiers only after changing the mode of the type.  Set
2060         TYPE_UNIVERSAL_ALIASING_P on the type directly.
2061         (check_ok_for_atomic_type): Issue specific error message for VFA.
2062         (gnat_to_gnu_component_type): Replace Is_Atomic with
2063         Is_Atomic_Or_VFA throughout.
2064         * gcc-interface/misc.c (gnat_get_alias_set): Test
2065         TYPE_UNIVERSAL_ALIASING_P on the type directly.
2066         * gcc-interface/trans.c (lvalue_required_p): Replace Is_Atomic with
2067         Is_Atomic_Or_VFA throughout.  Add missing guard.
2068         (node_is_atomic): New predicate.
2069         (node_has_volatile_full_access): Likewise.
2070         (gnat_strip_type_conversion): New function.
2071         (outer_atomic_access_required_p): New predicate.
2072         (atomic_sync_required_p): Rename into...
2073         (atomic_access_required_p): ...this.  Add SYNC parameter, scan the
2074         parent node first and then look for the atomic setting.  Add support
2075         for Volatile_Full_Access.
2076         (Call_to_gnu): Add atomic_access and outer_atomic_access parameters
2077         and adjusts calls to above functions.  Use load-modify-store sequence
2078         for updates of In/Out and Out parameters if required, as well as for
2079         moving the result to the target if required.  Add couple of missing
2080         guards.
2081         (gnat_to_gnu): Adjust calls to above functions.
2082         <N_Object_Renaming_Declaration>: If the renamed object has side-effects
2083         evaluate only its address.
2084         <N_Assignment_Statement>: Adjust call to Call_to_gnu.  Use load-modify
2085         store sequence if required.
2086         <N_Function_Call>: Adjust call to Call_to_gnu.
2087         (extract_values): Adjust comment.
2088         * gcc-interface/utils2.c (build_atomic_load): Add SYNC parameter and
2089         use relaxed memory model if it is not set.
2090         (build_atomic_store): Likewise.
2091         (call_is_atomic_load): New predicate.
2092         (build_load_modify_store): New function.
2093         (build_binary_op) <MODIFY_EXPR>: Accept SAVE_EXPR on the LHS.
2094         (gnat_stabilize_reference) <CALL_EXPR>: Deal with atomic loads.
2095
2096 2015-05-25  Eric Botcazou  <ebotcazou@adacore.com>
2097
2098         * gcc-interface/ada-tree.h (DECL_RENAMING_GLOBAL_P): Rename into...
2099         (DECL_GLOBAL_NONCONSTANT_RENAMING_P): ...this.
2100         * gcc-interface/gigi.h (record_global_renaming_pointer): Delete.
2101         (invalidate_global_renaming_pointers): Likewise.
2102         (record_global_nonconstant_renaming): New.
2103         (invalidate_global_nonconstant_renamings): Likewise.
2104         (get_inner_constant_reference): Likewise.
2105         (gnat_constant_reference_p): Likewise.
2106         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Adjust to above
2107         and register the renaming pointer only if the object is non-constant.
2108         (elaborate_expression_1): Call get_inner_constant_reference instead
2109         of get_inner_reference.
2110         * gcc-interface/trans.c (fold_constant_decl_in_expr): Minor tweak.
2111         (Identifier_to_gnu): Adjust to above and do not recheck the renamed
2112         object before substituting it.
2113         (Compilation_Unit_to_gnu): Adjust to above renaming.  Minor tweaks.
2114         (gnat_to_gnu) <N_Object_Renaming_Declaration>: Do not return the
2115         result at the global level.
2116         (N_Exception_Renaming_Declaration): Likewise.
2117         * gcc-interface/utils.c (global_renaming_pointers): Rename into...
2118         (global_nonconstant_renamings): ...this.
2119         (destroy_gnat_utils): Adjust to above renaming.
2120         (record_global_renaming_pointer): Rename into...
2121         (record_global_nonconstant_renaming): ...this.
2122         (invalidate_global_renaming_pointers): Rename into...
2123         (invalidate_global_nonconstant_renamings): ...this and do not recheck
2124         the renamed object before invalidating.
2125         * gcc-interface/utils2.c (gnat_stabilize_reference): Minor tweak.
2126         (get_inner_constant_reference): New public function.
2127         (gnat_constant_reference_p): New predicate.
2128
2129 2015-05-25  Javier Miranda  <miranda@adacore.com>
2130
2131         * einfo.ads, einfo.adb (Has_Out_Or_In_Out_Parameter): This attribute
2132         is now present in subprograms, generic subprograms, entries and
2133         entry families.
2134         * sem_ch6.adb (Set_Formal_Mode): Set As_Out_Or_In_Out_Parameter
2135         on entries, entry families, subprograms and generic subprograms.
2136         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration):
2137         Minor code reorganization to ensure that the Ekind attribute
2138         of the subprogram entity is set before its formals are
2139         processed. Required to allow the use of the attribute
2140         Has_Out_Or_In_Out_Parameter on the subprogram entity.
2141         * sem_aggr.adb (Resolve_Aggregate, Resolve_Extension_Aggregate):
2142         Perform the check on writable actuals only if the value of some
2143         component of the aggregate involves calling a function with
2144         out-mode parameters.
2145         (Resolve_Record_Aggregate): Propagate the Check_Actuals flag to the
2146         internally built aggregate.
2147         * sem_ch3.adb (Build_Derived_Record_Type, Record_Type_Declaration):
2148         Perform the check on writable actuals only if the initialization of
2149         some component involves calling a function with out-mode parameters.
2150         * sem_ch4.adb (Analyze_Arithmetic_Op, Analyze_Comparison_Op,
2151         Analyze_Equality_Op, Analyze_Logical_Op, Analyze_Membership_Op,
2152         Analyze_Range): Check writable actuals only if the
2153         subtrees have a call to a function with out-mode parameters
2154         (Analyze_Call.Check_Writable_Actuals): New subprogram. If the call
2155         has out or in-out parameters then mark its outermost enclosing
2156         construct as a node on which the writable actuals check must
2157         be performed.
2158         (Analyze_Call): Check if the flag must be set and if the outermost
2159         enclosing construct.
2160         * sem_util.adb (Check_Function_Writable_Actuals): Code cleanup
2161         and reorganization. We skip processing aggregate discriminants
2162         since their precise analysis involves two phases traversal.
2163         * sem_res.adb (Resolve_Actuals, Resolve_Arithmetic_Op,
2164         Resolve_Logical_Op, Resolve_Membership_Op): Remove call to
2165         check_writable_actuals.
2166
2167 2015-05-22  Ed Schonberg  <schonberg@adacore.com>
2168
2169         * sem_ch3.adb (Constrain_Concurrent): If the context is a
2170         type declaration, generate an Itype_Reference for the anonymous
2171         subtype, to force elaboration at this point in gigi.
2172
2173 2015-05-22  Gary Dismukes  <dismukes@adacore.com>
2174
2175         * layout.adb, einfo.ads, sem_ch12.adb, freeze.adb, sem_util.ads,
2176         exp_ch4.adb, sem_ch6.adb: Minor reformatting and typo fixes.
2177
2178 2015-05-22  Ed Schonberg  <schonberg@adacore.com>
2179
2180         * sem_res.adb (Resolve_Actuals): If the call is to an overridden
2181         operation, replace the names of the actuals in named associations
2182         with the names of the actuals of the subprogram that is eventually
2183         executed. The names of the formals and the defaults can differ
2184         between the two operations when they are operations of a formal
2185         derived type.
2186
2187 2015-05-22  Bob Duff  <duff@adacore.com>
2188
2189         * a-convec.ads, a-convec.adb (Append): Check for fast path. Split
2190         out slow path into separate procedure. Inline Append. Fast path
2191         now avoids calling Insert.
2192         (Finalize): Do the busy checking last, so the container gets emptied.
2193         (Insert, Insert_Space): Remove redundancy.
2194
2195 2015-05-22  Robert Dewar  <dewar@adacore.com>
2196
2197         * switch-c.adb (Scan_Front_End_Switches): Insist on -gnatc
2198         for -gnatd.V.
2199
2200 2015-05-22  Arnaud Charlet  <charlet@adacore.com>
2201
2202         * gnatvsn.ads: Minor code reorg to remember more easily to update
2203         variables.
2204
2205 2015-05-22  Ed Schonberg  <schonberg@adacore.com>
2206
2207         * sem_ch10.adb (Analyze_With_Clause): In ASIS_Mode, a
2208         limited_with clause on a predefined unit is not transformed into
2209         a regular with_clause, to preserve the original tree structure.
2210         * sinfo.ads (N_With_Clause): Add comment on handling of
2211         Limited_With.
2212         * sem_ch10.adb: Minor reformatting.
2213
2214 2015-05-22  Ed Schonberg  <schonberg@adacore.com>
2215
2216         * sem_ch8.adb (Freeze_Profile): A limited view of a type in
2217         the profile of a subprogram renaming does not require freezing,
2218         because it is declared in a different unit.
2219
2220 2015-05-22  Ed Schonberg  <schonberg@adacore.com>
2221
2222         * exp_aggr.adb (Get_Constraint_Association): If type (of ancestor
2223         composite type) is private, go to full view. This was previously
2224         done only in an instance context, but is happen whenever a chain
2225         of private extensions includes one inherited discriminant.
2226
2227 2015-05-22  Robert Dewar  <dewar@adacore.com>
2228
2229         * einfo.ads: Minor comment updates.
2230         * exp_unst.adb: Move Subps table to spec Don't remove old entries
2231         from table Add Last field to record last entry used.
2232         * exp_unst.ads: Move Subps table here from body So that Cprint
2233         can access saved values.
2234
2235 2015-05-22  Bob Duff  <duff@adacore.com>
2236
2237         * a-cdlili.adb, a-cdlili.ads, a-cohama.adb, a-cohama.ads,
2238         * a-cohase.adb, a-cohase.ads, a-convec.adb, a-convec.ads,
2239         * a-coorma.adb, a-coorma.ads, a-coorse.adb, a-coorse.ads:
2240         (Pseudo_Reference, Element_Access, Get_Element_Access): New
2241         declarations added for use by performance improvements in exp_ch5.adb.
2242         * snames.ads-tmpl: New names referenced by exp_ch5.adb.
2243         * exp_ch5.adb: Speed up "for ... of" loops for predefined containers.
2244         Instead of doing literally what the RM calls for, we do something
2245         equivalent that avoids expensive operations inside the loop. If the
2246         container package has appropriate Next, Pseudo_Reference,
2247         Element_Access, Get_Element_Access declarations, we invoke the
2248         optimization.
2249         * snames.ads-tmpl: Note speed improvement.
2250
2251 2015-05-22  Eric Botcazou  <ebotcazou@adacore.com>
2252
2253         * einfo.ads (Is_Atomic_Or_VFA): Move to XEINFO INLINES section.
2254         * xeinfo.adb: Replace a-einfo.h with einfo.h throughout.
2255         Add pattern to translate "or else" into "||".
2256
2257 2015-05-22  Eric Botcazou  <ebotcazou@adacore.com>
2258
2259         * einfo.ads (Has_Volatile_Full_Access): Rename into...
2260         (Is_Volatile_Full_Access): ...this.
2261         (Set_Has_Volatile_Full_Access): Rename into...
2262         (Set_Is_Volatile_Full_Access): ...this.
2263         * einfo.adb (Has_Volatile_Full_Access): Rename into...
2264         (Is_Volatile_Full_Access): ...this.
2265         (Set_Has_Volatile_Full_Access): Rename into...
2266         (Set_Is_Volatile_Full_Access): ...this.
2267         (Is_Atomic_Or_VFA): Adjust to above renaming.
2268         * errout.adb (Special_Msg_Delete): Likewise.
2269         * exp_pakd.adb (Install_PAT): Likewise.
2270         * freeze.adb (Freeze_Array_Type): Likewise.
2271         * sem_ch8.adb (Analyze_Object_Renaming): Likewise.
2272         * sem_ch13.adb (Inherit_Delayed_Rep_Aspects): Likewise.
2273         (Inherit_Aspects_At_Freeze_Point): Likewise.
2274         * sem_prag.adb (Set_Atomic_VFA): Likewise.
2275         (Process_Atomic_Independent_Shared_Volatile): Likewise.
2276         * sem_util.adb (Is_Atomic_Or_VFA_Object): Likewise.
2277
2278 2015-05-22  Robert Dewar  <dewar@adacore.com>
2279
2280         * exp_ch5.adb, layout.adb, einfo.adb, einfo.ads, sem_prag.adb,
2281         freeze.adb, freeze.ads, sem_util.adb, sem_util.ads, exp_ch2.adb,
2282         exp_ch4.adb, errout.adb, exp_aggr.adb, sem_ch13.adb: This is a general
2283         change that deals with the fact that most of the special coding for
2284         Atomic should also apply to the case of Volatile_Full_Access.
2285         A new attribute Is_Atomic_Or_VFA is introduced, and many of the
2286         references to Is_Atomic now use this new attribute.
2287
2288 2015-05-22  Robert Dewar  <dewar@adacore.com>
2289
2290         * exp_ch4.adb (Expand_N_Op_Eq): Introduce 'Machine for 'Result
2291         comparison.
2292
2293 2015-05-22  Eric Botcazou  <ebotcazou@adacore.com>
2294
2295         * sprint.adb (Source_Dump): When generating debug files, deal
2296         with the case of a stand-alone package instantiation by dumping
2297         together the spec and the body in the common debug file.
2298
2299 2015-05-22  Robert Dewar  <dewar@adacore.com>
2300
2301         * sem_ch13.adb (Minimum_Size): Size is zero for null range
2302         discrete subtype.
2303
2304 2015-05-22  Hristian Kirtchev  <kirtchev@adacore.com>
2305
2306         * einfo.adb (Anonymous_Master): This attribute now applies
2307         to package and subprogram bodies.
2308         (Set_Anonymous_Master): This attribute now applies to package and
2309         subprogram bodies.
2310         (Write_Field36_Name): Add output for package and subprogram bodies.
2311         * einfo.ads Update the documentation on attribute Anonymous_Master
2312         along with occurrences in entities.
2313         * exp_ch4.adb (Create_Anonymous_Master): Reimplemented to
2314         handle spec and body anonymous masters of the same unit.
2315         (Current_Anonymous_Master): Reimplemented. Handle a
2316         package instantiation that acts as a compilation unit.
2317         (Insert_And_Analyze): Reimplemented.
2318
2319 2015-05-22  Ed Schonberg  <schonberg@adacore.com>
2320
2321         * sem_ch10.adb (Analyze_With_Clause): A limited_with_clause on a
2322         predefined unit is treated as a regular with_clause.
2323
2324 2015-05-22  Robert Dewar  <dewar@adacore.com>
2325
2326         * sem_ch12.adb, prj.ads, makeutl.ads, sem_ch6.adb, prj-nmsc.adb,
2327         prj-conf.adb, sem_disp.adb: Minor reformatting.
2328
2329 2015-05-22  Vincent Celier  <celier@adacore.com>
2330
2331         * clean.adb (Parse_Cmd_Line): For native gnatclean, check
2332         for switch -P and, if found and gprclean is available, invoke
2333         silently gprclean.
2334         * make.adb (Initialize): For native gnatmake, check for switch -P
2335         and, if found and gprbuild is available, invoke silently gprbuild.
2336
2337 2015-05-22  Eric Botcazou  <ebotcazou@adacore.com>
2338
2339         * sem_ch13.adb (Validate_Unchecked_Conversions): Also issue
2340         specific warning for discrete types when the source is larger
2341         than the target.
2342
2343 2015-05-22  Ed Schonberg  <schonberg@adacore.com>
2344
2345         * einfo.ads, einfo.adb (Incomplete_Actuals): New attribute of
2346         package instantiations. Holds the list of actuals in the instance
2347         that are incomplete types, to determine where the corresponding
2348         instance body must be placed.
2349         * sem_ch6.adb (Conforming_Types): An incomplete type used as an
2350         actual in an instance matches an incomplete formal.
2351         * sem_disp.adb (Check_Dispatching_Call): Handle missing case of
2352         explicit dereference.
2353         (Inherited_Subprograms): In the presence of a limited view there
2354         are no subprograms to inherit.
2355         * sem_ch12.adb (Preanalyze_Actuals): Build list of incomplete
2356         actuals of instance, for later placement of instance body and
2357         freeze nodes for actuals.
2358         (Install_Body): In the presence of actuals that incomplete types
2359         from a limited view, the instance body cannot be placed after
2360         the declaration because full views have not been seen yet. Any
2361         use of the non-limited views in the instance body requires
2362         the presence of a regular with_clause in the enclosing unit,
2363         and will fail if this with_clause is missing.  We place the
2364         instance body at the beginning of the enclosing body, which is
2365         the unit being compiled, and ensure that freeze nodes for the
2366         full views of the incomplete types appear before the instance.
2367
2368 2015-05-22  Pascal Obry  <obry@adacore.com>
2369
2370         * makeutl.ads, prj-conf.adb, prj-nmsc.adb, prj.ads
2371         (In_Place_Option): Removed.
2372         (Relocate_Build_Tree_Option): New constant.
2373         (Root_Dir_Option): New constant.
2374         (Obj_Root_Dir): Removed.
2375         (Build_Tree_Dir): New variable.
2376         (Root_Src_Tree): Removed.
2377         (Root_Dir): New variable.
2378         * prj-conf.adb (Get_Or_Create_Configuration_File): Add check
2379         for improper relocation.
2380         * prj-nmsc.adb (Locate_Directory): Add check for improper
2381         relocation.
2382
2383 2015-05-22  Hristian Kirtchev  <kirtchev@adacore.com>
2384
2385         * einfo.adb (Default_Init_Cond_Procedure): Code cleanup. The
2386         attribute now applies to the base type.
2387         (Has_Default_Init_Cond): Now applies to the base type.
2388         (Has_Inherited_Default_Init_Cond): Now applies to the base type.
2389         (Set_Default_Init_Cond_Procedure): Code cleanup. The attribute now
2390         applies to the base type.
2391         (Set_Has_Default_Init_Cond): Now applies to the base type.
2392         (Set_Has_Inherited_Default_Init_Cond): Now applies to the base type.
2393         * exp_ch3.adb (Expand_N_Object_Declaration): No need to use the
2394         base type when adding a call to the Default_Initial_Condition.
2395
2396 2015-05-22  Hristian Kirtchev  <kirtchev@adacore.com>
2397
2398         * einfo.adb: Node36 is now used as Anonymous_Master. Flag253
2399         is now unused.
2400         (Anonymous_Master): New routine.
2401         (Has_Anonymous_Master): Removed.
2402         (Set_Anonymous_Master): New routine.
2403         (Set_Has_Anonymous_Master): Removed.
2404         (Write_Entity_Flags): Remove the output for Has_Anonymous_Maser.
2405         (Write_Field36_Name): Add output for Anonymous_Master.
2406         * einfo.ads Add new attribute Anonymous_Master along with
2407         occurrences in nodes. Remove attribute Has_Anonymous_Master along
2408         with occurrences in nodes.
2409         (Anonymous_Master): New routine along with pragma Inline.
2410         (Has_Anonymous_Master): Removed along with pragma Inline.
2411         (Set_Anonymous_Master): New routine along with pragma Inline.
2412         (Set_Has_Anonymous_Master): Removed along with pragma Inline.
2413         * exp_ch4.adb (Create_Anonymous_Master): New routine.
2414         (Current_Anonymous_Master): Reimplemented.
2415
2416 2015-05-22  Bob Duff  <duff@adacore.com>
2417
2418         * freeze.adb (Freeze_Profile): Suppress warning if imported
2419         subprogram is not at library level.
2420
2421 2015-05-22  Robert Dewar  <dewar@adacore.com>
2422
2423         * sem_ch8.adb (Analyze_Object_Renaming): Check for renaming
2424         component of an object to which Volatile_Full_Access applies.
2425
2426 2015-05-22  Jerome Guitton  <guitton@adacore.com>
2427
2428         * exp_dbug.ads: Add note about non bit-packed arrays.
2429
2430 2015-05-22  Eric Botcazou  <ebotcazou@adacore.com>
2431
2432         * sem_prag.adb: Fix typo.
2433         * einfo.ads: Grammar fixes in comments.
2434
2435 2015-05-22  Bob Duff  <duff@adacore.com>
2436
2437         * a-cborma.ads, a-cidlli.ads, a-cimutr.ads, a-ciormu.ads,
2438         * a-cihase.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
2439         * a-cborse.ads, a-comutr.ads, a-ciorma.ads, a-cobove.ads,
2440         * a-coormu.ads, a-convec.ads, a-cohase.ads, a-coinho.ads,
2441         * a-cbdlli.ads, a-cbmutr.ads, a-cbhase.ads, a-cdlili.ads,
2442         * a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
2443         * a-coinho-shared.ads (Constant_Reference_Type, Reference_Type):
2444         Add an initialization expression "raise Program_Error". See,
2445         for example, RM-A.18.2(148.4).
2446
2447 2015-05-22  Robert Dewar  <dewar@adacore.com>
2448
2449         * debug.adb: Update documentation.
2450         * einfo.ads, einfo.adb (Needs_Typedef): New flag
2451         * exp_unst.adb (Unnest_Subprogram): Mark AREC types as needing
2452         typedef's in C.
2453         * frontend.adb: Update comments.
2454         * gnat1drv.adb (Adjust_Global_Switches): Set all needed flags
2455         for -gnatd.V
2456         * opt.ads (Generate_C_Code): New switch.
2457         * osint-c.adb (Write_C_File_Info): Removed, not used
2458         (Write_H_File_Info): Removed, not used
2459         * osint-c.ads (Write_C_File_Info): Removed, not used
2460         (Write_H_File_Info): Removed, not used
2461         * osint.ads (Write_Info): Minor comment updates.
2462         (Output_FD): Moved from private part to public part of spec.
2463         * sem.adb (Semantics): Force expansion on if in Generate_C_Code
2464         mode.
2465         * atree.ads: minor typo in comment.
2466         * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
2467         Do not allow VFA on composite object with aliased component.
2468
2469 2015-05-22  Arnaud Charlet  <charlet@adacore.com>
2470
2471         * osint-c.adb, osint-c.ads (Set_File_Name): Move back to spec.
2472
2473 2015-05-22  Pascal Obry  <obry@adacore.com>
2474
2475         * prj-util.adb: Minor comment editing.
2476
2477 2015-05-22  Pascal Obry  <obry@adacore.com>
2478
2479         * makeutl.ads (In_Place_Option): New constant.
2480         * prj.ads (Obj_Root_Dir): New variable (absolute path to relocate
2481         objects).
2482         (Root_Src_Tree): New variable (absolute path of root source tree).
2483         * prj-conf.adb (Do_Autoconf): Take into account the object root
2484         directory (if defined) to generate configuration project.
2485         * prj-nmsc.adb (Get_Directories): Handle case where Obj_Root_Dir
2486         is defined.
2487         (Locate_Directory): Likewise.
2488
2489 2015-05-22  Pascal Obry  <obry@adacore.com>
2490
2491         * prj-util.ads, prj-util.adb (Relative_Path): New routine.
2492
2493 2015-05-22  Bob Duff  <duff@adacore.com>
2494
2495         * exp_utils.ads, exp_utils.adb (Find_Optional_Prim_Op): New
2496         interface to return Empty when not found, so we can avoid handling
2497         Program_Error in that case.
2498         (Find_Prim_Op): Fix latent bug: raise Program_Error when there are no
2499         primitives.
2500         * exp_ch7.adb, sem_util.adb: Use Find_Optional_Prim_Op when the
2501         code is expecting Empty.
2502         * sem_ch8.adb: Use Find_Optional_Prim_Op to avoid handling
2503         Program_Error.
2504
2505 2015-05-22  Robert Dewar  <dewar@adacore.com>
2506
2507         * sem_ch3.adb, sem_intr.adb, exp_ch4.adb, s-rannum.adb,
2508         sem_eval.adb, s-fatgen.adb, s-expmod.ads: Remove incorrect hyphen in
2509         non-binary.
2510         * exp_util.adb: Add comment.
2511         * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move from spec to
2512         body.
2513         (Set_File_Name): New name for the above.
2514         (Create_C_File, Create_H_File, Write_C_File_Info, Write_H_File_Info,
2515         Close_C_File, Close_H_File): New procedure.
2516         * osint.adb: Minor reformatting.
2517         * osint.ads: Minor comment updates.
2518
2519 2015-05-22  Robert Dewar  <dewar@adacore.com>
2520
2521         * exp_ch4.adb: Minor rewording.
2522         * exp_util.ads: Clarify that Find_Prim_Op is only for
2523         tagged types.
2524
2525 2015-05-22  Robert Dewar  <dewar@adacore.com>
2526
2527         * atree.adb, atree.ads, treepr.adb: Change name Needs_Actuals_Check to
2528         Check_Actuals.
2529         * exp_ch4.adb (Expand_N_Op_Expon): Optimize 2**x in modular
2530         and overflow cases.
2531
2532 2015-05-22  Eric Botcazou  <ebotcazou@adacore.com>
2533
2534         * exp_pakd.adb (Install_PAT): Propagate representation aspects
2535         from the original array type to the PAT.
2536
2537 2015-05-22  Robert Dewar  <dewar@adacore.com>
2538
2539         * treepr.adb (Print_Node_Header): Add output of Needs_Actuals_Check.
2540
2541 2015-05-22  Robert Dewar  <dewar@adacore.com>
2542
2543         * atree.adb, atree.ads (Needs_Actuals_Check): New flag.
2544
2545 2015-05-22  Hristian Kirtchev  <kirtchev@adacore.com>
2546
2547         * sem_prag.adb (Analyze_Pragma): Remove the detection
2548         of a useless Part_Of indicator when the related item is a constant.
2549         (Check_Matching_Constituent): Do not emit an error on a constant.
2550         (Check_Missing_Part_Of): Do not check for a missing Part_Of indicator
2551         when the related item is a constant.
2552         (Collect_Body_States): Code cleanup.
2553         (Collect_Visible_States): Code cleanup.
2554         (Report_Unused_States): Do not emit an error on a constant.
2555         * sem_util.ads, sem_util.adb (Has_Variable_Input): Removed.
2556
2557 2015-05-22  Eric Botcazou  <ebotcazou@adacore.com>
2558
2559         * sem_ch8.adb (Analyze_Object_Renaming): Copy
2560         Has_Volatile_Full_Access from renamed to renaming entities.
2561         * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
2562         Tidy up and remove redundant setting of Has_Volatile_Full_Access.
2563
2564 2015-05-22  Hristian Kirtchev  <kirtchev@adacore.com>
2565
2566         * ghost.adb (Check_Ghost_Completion): Update references to SPARK
2567         RM 6.9 rules.
2568         (Check_Ghost_Policy): Update references to SPARK RM 6.9 rules.
2569         * sem_ch3.adb (Analyze_Object_Declaration): Update references
2570         to SPARK RM 6.9 rules.
2571         (Check_Completion): Ghost entities do not require a special form of
2572         completion.
2573         * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Update references
2574         to SPARK RM 6.9 rules.
2575         (Analyze_Subprogram_Body_Helper): Update references to SPARK RM 6.9
2576         rules.
2577         * sem_ch7.adb (Analyze_Package_Body_Helper): Update references
2578         to SPARK RM 6.9 rules.
2579         (Requires_Completion_In_Body): Ghost entities do not require a special
2580         form of completion.
2581
2582 2015-05-22  Robert Dewar  <dewar@adacore.com>
2583
2584         * a-csquin.ads: Use Ada 2012 notation.
2585         * sem_ch8.adb: Minor reformatting.
2586
2587 2015-05-22  Hristian Kirtchev  <kirtchev@adacore.com>
2588
2589         * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect Import
2590         acts as a completion.
2591
2592 2015-05-22  Ed Schonberg  <schonberg@adacore.com>
2593
2594         * sem_ch13.adb: Minor reformatting.
2595
2596 2015-05-22  Jose Ruiz  <ruiz@adacore.com>
2597
2598         * a-reatim.adb: Minor change, fix typo.
2599
2600 2015-05-22  Robert Dewar  <dewar@adacore.com>
2601
2602         * sem_util.ads: Minor addition of ??? comment.
2603         * sem_prag.adb, sem_util.adb: Minor reformatting.
2604         * sem_ch13.adb: minor reformatting.
2605
2606 2015-05-22  Robert Dewar  <dewar@adacore.com>
2607
2608         * a-reatim.ads: Add Compile_Time_Error to ensure Duration
2609         is 64-bits.
2610         * sem_ch13.adb: Improve error message.
2611         * exp_ch4.adb: Minor reformatting.
2612
2613 2015-05-22  Hristian Kirtchev  <kirtchev@adacore.com>
2614
2615         * sem_prag.adb (Analyze_Pragma): Constants without variable
2616         input do not require indicator Part_Of.
2617         (Check_Missing_Part_Of): Constants without variable input do not
2618         requrie indicator Part_Of.
2619         (Collect_Visible_States): Constants without variable input are
2620         not part of the hidden state of a package.
2621         * sem_util.ads, sem_util.adb (Has_Variable_Input): New routine.
2622
2623 2015-05-22  Robert Dewar  <dewar@adacore.com>
2624
2625         * exp_util.adb (Activate_Atomic_Synchronization): Do not set
2626         Atomic_Sync_Required for an object renaming declaration.
2627         * sem_ch8.adb (Analyze_Object_Renaming): Copy Is_Atomic and
2628         Is_Independent to renaming object.
2629
2630 2015-05-22  Ed Schonberg  <schonberg@adacore.com>
2631
2632         * sem_ch5.adb (Analyze_Iterator_Specification): Diagnose
2633         various illegalities in iterators over arrays and containers:
2634         a) New function Get_Cursor_Type, to verify that the cursor is
2635         not a limited type at the point of iteration.
2636         b) If the container is a constant, an element_iterator is illegal
2637         if the container type does not have a Constant_Indexing aspect.
2638         c) If the iterate function has an in-out controlling parameter,
2639         the container cannot be a constant object.
2640         d) Reject additional cases of iterators over a
2641         discriminant-dependent component of a mutable object.
2642
2643 2015-05-21  Hristian Kirtchev  <kirtchev@adacore.com>
2644
2645         * einfo.adb (Contract): This attribute now applies to constants.
2646         (Set_Contract): This attribute now applies to constants.
2647         (Write_Field34_Name): Add output for constants.
2648         * einfo.ads Attribute Contract now applies to constants.
2649         * sem_ch3.adb (Analyze_Object_Contract): Constants now have
2650         their Part_Of indicator verified.
2651         * sem_prag.adb (Analyze_Constituent): A constant is now a valid
2652         constituent.
2653         (Analyze_Global_Item): A constant cannot act as an output.
2654         (Analyze_Initialization_Item): Constants are now a valid
2655         initialization item.
2656         (Analyze_Initializes_In_Decl_Part): Rename
2657         global variable States_And_Vars to States_And_Objs and update
2658         all its occurrences.
2659         (Analyze_Input_Item): Constants are now a
2660         valid initialization item. Remove SPARM RM references from error
2661         messages.
2662         (Analyze_Pragma): Indicator Part_Of can now apply to a constant.
2663         (Collect_Body_States): Collect both source constants
2664         and variables.
2665         (Collect_States_And_Objects): Collect both source constants and
2666         variables.
2667         (Collect_States_And_Variables): Rename
2668         to Collect_States_And_Objects and update all its occurrences.
2669         (Collect_Visible_States): Do not collect constants and variables
2670         used to map generic formals to actuals.
2671         (Find_Role): The role of a constant is that of an input. Separate the
2672         role of a variable from that of a constant.
2673         (Report_Unused_Constituents): Add specialized wording for constants.
2674         (Report_Unused_States): Add specialized wording for constants.
2675         * sem_util.adb (Add_Contract_Item): Add processing for constants.
2676         * sem_util.ads (Add_Contract_Item): Update the comment on usage.
2677         (Find_Placement_In_State_Space): Update the comment on usage.
2678
2679 2015-05-21  Ed Schonberg  <schonberg@adacore.com>
2680
2681         * sem_ch5.adb: minor reformatting.
2682
2683 2015-05-21  Robert Dewar  <dewar@adacore.com>
2684
2685         * freeze.adb (Freeze_Entity): Properly tag -gnatw.z messages.
2686
2687 2015-05-21  Robert Dewar  <dewar@adacore.com>
2688
2689         * freeze.adb: Minor reformatting.
2690         * cstand.adb (Print_Standard): Fix bad printing of Duration
2691         low bound.
2692         * a-reatim.adb (Time_Of): Complete rewrite to properly detect
2693         out of range args.
2694
2695 2015-05-21  Ed Schonberg  <schonberg@adacore.com>
2696
2697         * sem_ch5.adb: add (useless) initial value.
2698         * sem_ch3.adb (Replace_Anonymous_Access_To_Protected_Subprogram):
2699         Check whether the procedure has parameters before processing
2700         formals in ASIS mode.
2701
2702 2015-05-21  Ed Schonberg  <schonberg@adacore.com>
2703
2704         * sem_ch13.adb (Check_Iterator_Functions): Emit error on Iterator
2705         aspect as well when indexing function is illegal.
2706         (Valid_Default_Iterator): Handle properly somme illegal cases
2707         to prevent compilation abandoned messages.
2708         (Check_Primitive_Function): Verify that type and indexing function
2709         are in the same scope.
2710         * freeze.adb (Freeze_Record): Extend patch on the presence of
2711         indexing aspects to aspect Default_Iterator.
2712
2713 2015-05-19  David Malcolm  <dmalcolm@redhat.com>
2714
2715         * gcc-interface/trans.c (Sloc_to_locus1): Strenghthen local "map"
2716         from line_map * to line_map_ordinary *.
2717
2718 2015-05-12  Jason Merrill  <jason@redhat.com>
2719
2720         * sigtramp-vxworks.c: Add space between string literal and macro
2721         name.
2722
2723 2015-05-12  Arnaud Charlet  <charlet@adacore.com>
2724
2725         * gnat_rm.texi, gnat_ugn.texi, doc: Documentation updates and clean ups
2726
2727 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
2728
2729         * sem_ch5.adb (Analyze_Iterator_Specifications): Additional
2730         legality checks for array and container iterators:
2731         a) The domain of iteration cannot be a component that depends
2732         on discriminants of a mutable object. The check was recently
2733         added for element iterators.
2734         b) The cursor type cannot be a limited type at the point of the
2735         iteration, because the cursor will be assigned to in the body
2736         of the loop.
2737
2738 2015-05-12  Robert Dewar  <dewar@adacore.com>
2739
2740         * freeze.adb (Freeze_Record_Type): Make sure that if we have
2741         aspect Iterator_Element, then we have either Constant_Indexing
2742         or Variable_Indexing.
2743
2744 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
2745
2746         * a-coormu.ads, a-coormu.adb: Add Indexing aspect, Reference_Type,
2747         and Reference_Control_Type to support element iterators over
2748         ordered multisets.
2749         * a-ciormu.ads, a-ciormu.adb: Ditto for
2750         indefinite_ordered_multisets.
2751
2752 2015-05-12  Hristian Kirtchev  <kirtchev@adacore.com>
2753
2754         * exp_ch4.adb (Expand_N_Expression_With_Actions): Force
2755         the evaluation of the EWA expression.  Code cleanup.
2756         (Process_Transient_Object): Code cleanup.
2757         * exp_util.adb (Is_Aliased): Controlled transient objects found
2758         within EWA nodes are not aliased.
2759         (Is_Finalizable_Transient): Iterators are not finalizable transients.
2760
2761 2015-05-12  Robert Dewar  <dewar@adacore.com>
2762
2763         * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
2764         Don't allow Atomic and Volatile_Full_Access for the same entity.
2765
2766 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
2767
2768         * sem_ch5.adb (Analyze_Iterator_Specification): Implement new
2769         semantics and safety checks specified in AI12-0151.
2770
2771 2015-05-12  Pierre-Marie de Rodat  <derodat@adacore.com>
2772
2773         * sem_ch10.adb (Sem_Ch10.Analyze_Proper_Body): Generate SCOs
2774         for subunit in generic units.
2775
2776 2015-05-12  Robert Dewar  <dewar@adacore.com>
2777
2778         * sem_elab.adb (Check_A_Call): Avoid checking internal call
2779         from Valid_Scalars
2780
2781 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
2782
2783         * sem_ch6.adb (Process_Formals): An untagged incomplete type
2784         is legal in the profile of a null procedure.
2785
2786 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
2787
2788         * sem_ch12.adb (Validate_Derived_Type_Instance): Handle properly
2789         the checks on a derived formal whose parent type is a previous
2790         formal that is not a derived type.
2791
2792 2015-05-12  Robert Dewar  <dewar@adacore.com>
2793
2794         * aspects.ads, aspects.adb: Add entries for aspect Volatile_Full_Access
2795         * einfo.adb (Has_Volatile_Full_Access): New flag.
2796         (Has_Volatile_Full_Access): New flag.
2797         * einfo.ads (Has_Volatile_Full_Access): New flag.
2798         * par-prag.adb: Add dummy entry for Volatile_Full_Access.
2799         * sem_prag.adb (Analyze_Pragma, case Volatile_Full_Access):
2800         Implement new pragma.
2801         * snames.ads-tmpl: Add entries for pragma Volatile_Full_Access.
2802
2803 2015-05-12  Robert Dewar  <dewar@adacore.com>
2804
2805         * targparm.ads: Minor reformatting.
2806
2807 2015-05-12  Robert Dewar  <dewar@adacore.com>
2808
2809         * a-reatim.adb (Time_Of): Properly detect overflow when TS = 0.0.
2810         * a-reatim.ads: Minor reformatting.
2811
2812 2015-05-12  Hristian Kirtchev  <kirtchev@adacore.com>
2813
2814         * einfo.ads: Update the documentation of flags
2815         Has_Inherited_Default_Init_Cond and Has_Default_Init_Cond.
2816
2817 2015-05-12  Robert Dewar  <dewar@adacore.com>
2818
2819         * impunit.adb: Add entry for a-dhfina.ads
2820         * a-dhfina.ads: New file.
2821
2822 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
2823
2824         * exp_ch5.adb (Expand_Iterator_Loop_Over_Array): if the array
2825         type has convention Fortran, a multidimensional iterator varies
2826         the first dimension fastest.
2827
2828 2015-05-12  Hristian Kirtchev  <kirtchev@adacore.com>
2829
2830         * einfo.adb: Node32 is now used as Encapsulating_State.
2831         Node37 is now used as Associated_Entity.
2832         (Associated_Entity): New routine.
2833         (Encapsulating_State): Update the assertion guard to include constants.
2834         (Set_Associated_Entity): New routine.
2835         (Set_Encapsulating_State): Update the assertion guard to
2836         include constants.
2837         (Write_Field10_Name): Remove the output for Encapsulating_State.
2838         (Write_Field32_Name): Add output for Encapsulating_State.
2839         (Write_Field37_Name): Add output for Associated_Entity.
2840         * einfo.ads New attribute Associated_Entity along with placement
2841         in entities. Attribute Encapsulating_State now uses Node32.
2842         (Associated_Entity): New routine along with pragma Inline.
2843         (Set_Associated_Entity): New routine along with pragma Inline.
2844         * inline.ads Code reformatting.
2845         * sem_attr.adb (Analyze_Attribute): Correct the prefix of
2846         attribute 'Result when the context is a generic instantiation.
2847         (Analyze_Attribute_Old_Result): Pragmas Depends and
2848         Refined_Depends are a valid context for attribute 'Result.
2849         (Denote_Same_Function): Allow attribute 'Result to denote
2850         generic functions.
2851         * sem_ch3.adb Add with and use clauses for Sem_Ch12.
2852         (Analyze_Declarations): Capture global references within the
2853         contracts of packages, subprograms and their respective bodies.
2854         * sem_ch6.adb (Analyze_Aspects_On_Body_Or_Stub): Removed.
2855         (Analyze_Completion_Contract): Removed.
2856         (Analyze_Generic_Subprogram_Body): Enchange the aspects after
2857         creating the generic copy. Create a generic contract for the
2858         template. Analyze the aspects of the generic body. Analyze the
2859         contract of the generic body when it is a compilation unit and
2860         capture global references.
2861         (Analyze_Subprogram_Body_Contract): Code cleanup.
2862         (Analyze_Subprogram_Contract): Do not save global references here.
2863         (Save_Global_References_In_List): Removed.
2864         * sem_ch7.adb (Analyze_Package_Body_Contract): Code cleanup.
2865         (Analyze_Package_Body_Helper): Create a generic contract for
2866         the template.
2867         (Analyze_Package_Contract): Code cleanup.
2868         * sem_ch10.adb Add with and use clauses for Sem_Ch12.
2869         (Analyze_Compilation_Unit): Capture global references in a
2870         generic subprogram declaration that acts as a compilation unit.
2871         * sem_ch12.adb Add with and use clauses for Sem_Prag. Illustrate
2872         the implementation of generic contracts. Alphabetize various
2873         subprograms.
2874         (Analyze_Generic_Package_Declaration):
2875         Create a generic contract for the template.
2876         (Analyze_Generic_Subprogram_Declaration): Create a generic
2877         contract for the template.
2878         (Analyze_Subprogram_Instantiation): Instantiate the contract of the
2879         subprogram.
2880         (Copy_Generic_Node): Link defining entities of the generic template
2881         with the corresponding defining entities of the generic copy. Update
2882         the processing of pragmas.
2883         (Instantiate_Contract): Removed.
2884         (Instantiate_Subprogram_Contract): New routine.
2885         (Requires_Delayed_Save): New routine.
2886         (Save_Global_References): Rename formal parameter N to Templ. Various
2887         cleanups.
2888         (Save_Global_References_In_Aspects): Moved from the spec.
2889         (Save_Global_References_In_Contract): New routine.
2890         (Save_References_In_Aggregate): New routine.
2891         (Save_References_In_Char_Lit_Or_Op_Symbol): New routine.
2892         (Save_References_In_Descendants): New routine.
2893         (Save_References_In_Identifier): New routine.
2894         (Save_References_In_Operator): New routine.
2895         (Save_References_In_Pragma): New routine.
2896         * sem_ch12.ads (Save_Global_References): Rename formal
2897         parameter N to Templ. Update the comment on usage.
2898         (Save_Global_References_In_Aspects): Moved to the body.
2899         (Save_Global_References_In_Contract): New routine.
2900         * sem_ch13.adb (Analyze_Aspect_Specifications_On_Body_Or_Stub):
2901         New routine.
2902         * sem_ch13.ads (Analyze_Aspect_Specifications_On_Body_Or_Stub):
2903         New routine.
2904         * sem_prag.adb (Add_Item_To_Name_Buffer): Add support for
2905         generic parameters.
2906         (Analyze_Contract_Cases_In_Decl_Part): Code cleanup.
2907         (Analyze_Depends_Global): New routine.
2908         (Analyze_Depends_In_Decl_Part): Code cleanup.
2909         (Analyze_Global_In_Decl_Part): Code cleanup.
2910         (Analyze_Global_Item): Constants are now valid global items. Do
2911         not perform state-related checks in an instance. Change the way
2912         renamings are handled.  (Analyze_Initial_Condition_In_Decl_Part):
2913         Code cleanup.
2914         (Analyze_Initializes_In_Decl_Part): Code cleanup.
2915         (Analyze_Input_Output): The analysis of attribute 'Result in
2916         the context of pragmas Depends or Refined_Depends now reuses
2917         the existing attribute analysis machinery. Constants and
2918         generic parameters are now valid dependency items. Do not
2919         perform state-related checks in an instance. Change the way
2920         renamings are handled.  (Analyze_Pragma): Add a "characteristics"
2921         section for pragmas Abstract_State, Contract_Cases, Depends,
2922         Extensions_Visible, Global, Initial_Condition, Initializes,
2923         Post, Post_Class, Postcondition, Pre, Pre_Class, Precondition,
2924         Refined_Depends, Refined_Global, Refined_Post, Refined_State, Test_Case.
2925         (Analyze_Pre_Post_Condition): Do not create a generic
2926         template here.
2927         (Analyze_Pre_Post_Condition_In_Decl_Part): Code cleanup.
2928         (Analyze_Refined_Depends_Global_Post): New routine.
2929         (Analyze_Refined_Depends_In_Decl_Part): Code cleanup.
2930         (Analyze_Refined_Global_In_Decl_Part): Code cleanup.
2931         (Analyze_Refined_Pragma): Removed.
2932         (Analyze_Refined_State_In_Decl_Part): Code cleanup.
2933         (Analyze_Test_Case_In_Decl_Part): Code cleanup.
2934         (Check_Dependency_Clause): Do not perform this check in an instance.
2935         (Check_Function_Return): Add support for generic functions.
2936         (Check_In_Out_States): Do not perform this check in an instance.
2937         (Check_Input_States): Do not perform this check in an instance.
2938         (Check_Mode_Restriction_In_Function): Add support for generic functions.
2939         (Check_Output_States): Do not perform this check in an instance.
2940         (Check_Postcondition_Use_In_Inlined_Subprogram): Rename
2941         parameter Subp_Id to Spec_Id and update comment on usage.
2942         (Check_Proof_In_States): Do not perform this check in an instance.
2943         (Check_Refined_Global_Item): Add support for constants.
2944         (Check_Refined_Global_List): Do not perform this check in an instance.
2945         (Collect_Global_Items): Reimplemented.
2946         (Collect_Subprogram_Inputs_Outputs): Add support for generic parameters.
2947         (Create_Generic_Template): Removed.
2948         (Find_Related_Package_Or_Body): Moved to spec.
2949         (Find_Role): Add support for generic parameters and constants.
2950         (Get_Argument): Moved to spec. Rename parameter Spec_Id to Context_Id.
2951         (Match_Item): Add support for constants.
2952         (Preanalyze_Test_Case_Arg): Reimplemented.
2953         (Report_Extra_Clauses): Do not perform this check in an instance.
2954         (Report_Extra_Constituents): Do not perform this check in an instance.
2955         * sem_prag.ads (Collect_Subprogram_Inputs_Outputs): Update
2956         the comment on usage.
2957         (Find_Related_Package_Or_Body): Moved from body.
2958         (Get_Argument): Moved from body.
2959         * sem_util.adb Add with and use clauses for Sem_Ch12.
2960         (Corresponding_Spec_Of): Add support for packages and package bodies.
2961         (Create_Generic_Contract): New routine.
2962         (Is_Contract_Annotation): Reimplemented.
2963         (Is_Generic_Declaration_Or_Body): New routine.
2964         (Is_Package_Contract_Annotation): New routine.
2965         (Is_Subprogram_Contract_Annotation): New routine.
2966         * sem_util.ads (Corresponding_Spec_Of): Update the comment on usage.
2967         (Create_Generic_Contract): New routine.
2968         (Is_Generic_Declaration_Or_Body): New routine.
2969         (Is_Package_Contract_Annotation): New routine.
2970         (Is_Subprogram_Contract_Annotation): New routine.
2971         * sinfo.adb (Is_Generic_Contract_Pragma): New routine.
2972         (Set_Is_Generic_Contract_Pragma): New routine.
2973         * sinfo.ads Add new attribute Is_Generic_Contract_Pragma along
2974         with occurrences in nodes.
2975         (Is_Generic_Contract_Pragma): New routine along with pragma Inline.
2976         (Set_Is_Generic_Contract_Pragma): New routine along with pragma Inline.
2977         * treepr.adb (Print_Entity_Info): Output fields 36 to 41.
2978
2979 2015-05-12  Robert Dewar  <dewar@adacore.com>
2980
2981         * a-taster.ads: Minor comment fix: fix bad header, this is a
2982         pure RM unit.
2983
2984 2015-05-12  Robert Dewar  <dewar@adacore.com>
2985
2986         * sem_intr.adb: (Check_Shift): Diagnose bad modulus value.
2987
2988 2015-05-12  Robert Dewar  <dewar@adacore.com>
2989
2990         * gnat1drv.adb (Adjust_Global_Switches): Default to suppressing
2991         Alignment_Checks on non-strict alignment machine.
2992         * sem_ch13.adb (Validate_Address_Clauses): Don't give
2993         compile-time alignment warnings if run time Alignment_Check
2994         is suppressed.
2995
2996 2015-05-12  Thomas Quinot  <quinot@adacore.com>
2997
2998         * g-sercom.ads, g-sercom-linux.adb (GNAT.Serial_Communications.
2999         Data_Rate): New literals B75, B110, B150, B300, B600.
3000
3001 2015-05-12  Doug Rupp  <rupp@adacore.com>
3002
3003         * init.c (__gnat_init_float) [vxworks]: For e500v2,
3004         do nothing and leave the responsibility to install the handler
3005         and enable the exceptions to the BSP.
3006
3007 2015-05-12  Robert Dewar  <dewar@adacore.com>
3008
3009         * sem_ch9.adb, einfo.ads, exp_intr.adb: Minor reformatting.
3010         * sem_disp.adb: Minor code reorganization (remove junk redundant
3011         null statement).
3012         * exp_unst.adb (Unnest_Subprogram.Uplev_Refs): Ignore uplevel
3013         references to bounds of types coming from original type reference.
3014         * checks.ads: Minor reformatting.
3015         * checks.adb: Minor reformatting.
3016         * sem_prag.adb (Analyze_Pragma, case Check): If in ignored
3017         assertion, then make sure we do not drag in bignum stuff.
3018
3019 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
3020
3021         * sem_ch9.adb (Collect_Interfaces): Initialize
3022         Direct_Primitive_Operations for a tagged synchronized type,
3023         so it can used in ASIS mode.
3024         * sem_disp.adb (Check_Dispatching_Operation): If expansion is
3025         disabled, attach subprogram to list of Direct_Primitive_Operations
3026         of synchronized type itself, for ASIS use, because in this case
3027         Corresponding_Record_Type is not built.
3028         * einfo.ads: Indicate use of Direct_Primitive_Operations on
3029         synchronized type.
3030
3031 2015-05-12  Pierre-Marie de Rodat  <derodat@adacore.com>
3032
3033         * exp_pakd.adb: Make clearer the comment in exp_pakd.adb about
3034         ___XP suffixes.
3035
3036 2015-05-12  Robert Dewar  <dewar@adacore.com>
3037
3038         * sem_ch3.adb, sem_util.adb, sem_ch6.adb: Minor reformatting.
3039
3040 2015-05-12  Robert Dewar  <dewar@adacore.com>
3041
3042         * exp_unst.adb (Visit_Node): Deal with subprogram and package stubs.
3043
3044 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
3045
3046         * exp_intr.adb (Expand_Dispatching_Constructor_Call): The
3047         tag to be retrieved for the generated call is the first entry
3048         in the dispatch table for the return type of the instantiated
3049         constructor.
3050
3051 2015-05-12  Bob Duff  <duff@adacore.com>
3052
3053         * exp_ch7.adb, exp_ch7.ads, exp_intr.adb, exp_util.adb,
3054         exp_util.ads: Update comments.
3055
3056 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
3057
3058         * sem_ch3.adb (Add_Internal_Interface_Entities): Do no generate
3059         freeze nodes for these in ASIS mode, because they lead to
3060         elaoration order issues in gigi.
3061
3062 2015-05-12  Hristian Kirtchev  <kirtchev@adacore.com>
3063
3064         * sem_ch6.adb (Analyze_Expression_Function): Code
3065         cleanup. Use Copy_Subprogram_Spec to create a proper spec.
3066         (Analyze_Subprogram_Body_Helper): Code cleanup. Do not
3067         prepare a stand alone body for inlining in GNATprove mode
3068         when inside a generic.  (Body_Has_Contract): Reimplemented.
3069         (Build_Subprogram_Declaration): New routine.
3070         * sem_ch10.adb (Analyze_Compilation_Unit): Capture global
3071         references within generic bodies by loading them.
3072         * sem_util.adb (Copy_Parameter_List): Code cleanup.
3073         (Copy_Subprogram_Spec): New routine.
3074         (Is_Contract_Annotation): New routine.
3075         * sem_util.ads (Copy_Subprogram_Spec): New routine.
3076         (Is_Contract_Annotation): New routine.
3077
3078 2015-05-12  Hristian Kirtchev  <kirtchev@adacore.com>
3079
3080         * sem_attr.adb (Resolve_Attribute): Do not analyze the generated
3081         body of an expression function when the prefix of attribute
3082         'Access is the body.
3083
3084 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
3085
3086         * sem_ch3.adb (Build_Derived_Enumeration_Type): The anonymous base
3087         created for a derived enumeration type is not a first subtype,
3088         even though it is defined through a full type declaration.
3089         * sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): Do not process
3090         aspects for the anonymous base type constructed for a derived
3091         scalar type, because they will be set when the first subtype
3092         is frozen.
3093         (Inherit_Aspects_At_Freeze_Point): Fix typos on handling of
3094         Default_Value and Default_Component_Value, that prevented the
3095         proper inheritance of these aspects.
3096
3097 2015-05-12  Gary Dismukes  <dismukes@adacore.com>
3098
3099         * exp_ch6.adb, exp_unst.adb: Minor typo fixes.
3100
3101 2015-05-12  Robert Dewar  <dewar@adacore.com>
3102
3103         * sem_ch3.adb: Minor reformatting.
3104
3105 2015-05-12  Vincent Celier  <celier@adacore.com>
3106
3107         * gnatcmd.adb: If we want to invoke gnatmake (gnatclean) with
3108         -P, then check if gprbuild (gprclean) is available; if it is,
3109         use gprbuild (gprclean) instead of gnatmake (gnatclean).
3110
3111 2015-05-12  Robert Dewar  <dewar@adacore.com>
3112
3113         * debug.adb: Add flag -gnatd.3 to output diagnostic info from
3114         Exp_Unst.
3115         * einfo.ad, einfo.adb: Reorganize (and remove most of) flags used by
3116         Exp_Unst.
3117         * exp_ch6.adb (Unest_Bodies): Table for delayed calls to
3118         Unnest_Subprogram (Expand_N_Subprogram_Body): Add entry to table
3119         for later call instead of calling Unnest_Subprogram directly
3120         (Initialize): New procedure (Unnest_Subprograms): New procedure
3121         * exp_ch6.ads (Add_Extra_Actual_To_Call): Move into proper
3122         alpha order.
3123         (Initialize): New procedure.
3124         (Unnest_Subprograms): New procedure.
3125         * exp_unst.adb (Unnest_Subprogram): Major rewrite, moving
3126         all processing to this routine which is now called late
3127         after instantiating bodies. Fully handles the case of generic
3128         instantiations now.
3129         * exp_unst.ads: Major rewrite, moving all processing to
3130         Unnest_Subprogram.
3131         * frontend.adb (Frontend): Add call to Exp_Ch6.Initialize.
3132         (Frontend): Add call to Unnest_Subprograms.
3133         * sem_ch8.adb (Find_Direct_Name): Back to old calling sequence
3134         for Check_Nested_Access.
3135         * sem_util.adb (Build_Default_Subtype): Minor reformatting
3136         (Check_Nested_Access): Back to original VM-only form (we
3137         now do all the processing for Unnest_Subprogram at the time
3138         it is called.
3139         (Denotes_Same_Object): Minor reformatting
3140         (Note_Possible_Modification): Old calling sequence for
3141         Check_Nested_Access.
3142         * sem_util.ads (Check_Nested_Access): Back to original VM-only
3143         form (we now do all the processing for Unnest_Subprogram at the
3144         time it is called.
3145
3146 2015-05-12  Robert Dewar  <dewar@adacore.com>
3147
3148         * sem_ch3.adb, freeze.adb, sem_ch6.adb: Minor reformatting.
3149
3150 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
3151
3152         * sem_ch3.adb (Analyze_Object_Declaration): New function
3153         Has_Delayed_Aspect, used to defer resolution of an aggregate
3154         expression when the object declaration carries aspects Address
3155         and/or Alignment.
3156         * freeze.adb (Freeze_Object_Declaration): New subsidiary procedure
3157         to Freeze_Entity.  In addition to the previous processing steps
3158         at the freeze point of an object, this procedure also handles
3159         aggregates in object declarations, when the declaration carries
3160         delayed aspects that require that the initialization of the
3161         object be attached to its freeze actions.
3162
3163 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
3164
3165         * sem_ch6.adb (Analyze_Subprogram_Declaration): Following
3166         AI12-0147, null procedures and expression functions are allowed
3167         in protected bodies.
3168
3169 2015-05-12  Tristan Gingold  <gingold@adacore.com>
3170
3171         * i-cpoint.adb (Copy_Terminated_Array): Copy nothing if Length is 0.
3172
3173 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
3174
3175         * sem_ch3.adb (Complete_Private_Subtype): Propagate
3176         Has_Delayed_Aspects flag from private to full view, to ensure
3177         that predicate functions are constructed.
3178
3179 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
3180
3181         * sem_ch6.adb (Process_Formals): If a tagged formal is an
3182         incomplete class-wide type, the subprogram must have a delayed
3183         freeze even though the opertation is not a primitive of the
3184         type. THis ensures that the backend can recover the full view
3185         when elaborating the subprogram declaration.
3186
3187 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
3188
3189         * exp_util.adb (Get_Current_Value_Condition): Nothing to be
3190         done if an elsif part has been rewritten so that it is not part
3191         of an enclosing if_statement.
3192
3193 2015-05-12  Robert Dewar  <dewar@adacore.com>
3194
3195         * sem_type.adb, sem_ch10.adb, freeze.adb, sem_ch6.adb, exp_disp.adb:
3196         Minor reformatting.
3197
3198 2015-05-12  Bob Duff  <duff@adacore.com>
3199
3200         * exp_attr.adb (Size): Remove unnecessary check for types with
3201         unknown discriminants.  That was causing the compiler to build
3202         a function call _size(T), where T is a type, not an object.
3203
3204 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
3205
3206         * sem_ch4.adb (Extended_Primitive_Ops): Exclude overriding
3207         primitive operations of a type extension declared in the package
3208         body, to prevent duplicates in extended list.
3209
3210 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
3211
3212         * sem_ch3.adb (Analyze_Component_Declaration): If the component is
3213         an unconstrained synchronized type with discriminants, create a
3214         constrained default subtype for it, so that the enclosing record
3215         can be given the proper size.
3216         * sem_util.adb (Build_Default_Subtype): If the subtype is created
3217         for a record discriminant, do not analyze the declarztion at
3218         once because it is added to the freezing actions of the enclosing
3219         record type.
3220
3221 2015-05-12  Robert Dewar  <dewar@adacore.com>
3222
3223         * exp_prag.adb (Expand_N_Pragma): Rewrite ignored pragma as
3224         Null statements.
3225         * namet.ads (Boolean3): Document this flag used for Ignore_Pragma.
3226         * par-prag.adb (Prag): Implement Ignore_Pragma.
3227         * sem_prag.adb: Implement Ignore_Pragma.
3228         * snames.ads-tmpl: Add entries for pragma Ignore_Pragma.
3229
3230 2015-05-12  Javier Miranda  <miranda@adacore.com>
3231
3232         * sem_ch10.adb (Build_Shadow_Entity): Link the class-wide shadow
3233         entity with its corresponding real entity.
3234         (Decorate_Type): Unconditionally build the class-wide shadow entity of
3235         tagged types.
3236         * einfo.ads, einfo.adb (Has_Non_Limited_View): New synthesized
3237         attribute.
3238         (Non_Limited_View): Moved from field 17 to field 19 be available
3239         in class-wide entities.
3240         * exp_attr.adb (Access_Cases): Code cleanup.
3241         * exp_disp.adb (Expand_Interface_Actuals): Ditto.
3242         * exp_util.adb (Non_Limited_Designated_Type): Ditto.
3243         * freeze.adb (Build_Renamed_Bdody): Ditto.
3244         * sem_aux.adb (Available_View): Ditto.
3245         * sem_ch4.adb (Analyze_Selected_Component): Ditto.
3246         (Try_One_Prefix_Interpretation): Ditto.
3247         * sem_ch5.adb (Analyze_Assignment): Ditto.
3248         * sem_ch6.adb (Detect_And_Exchange): Ditto.
3249         * sem_ch8.adb (Find_Expanded_Name): Ditto.
3250         * sem_disp.adb (Check_Controlling_Type): Ditto.
3251         * sem_res.adb (Resolve_Type_Conversion): Ditto.
3252         (Full_Designated_Type): Ditto.
3253         * sem_type.adb (Covers): Ditto.
3254         * sem_util.adb: Fix typo in comment.
3255
3256 2015-05-12  Robert Dewar  <dewar@adacore.com>
3257
3258         * exp_unst.adb (Get_Real_Subp): New subprogram.
3259         (Unnest_Subprogram): Use Get_Real_Subp.
3260         (Uplev_Refs_For_One_Subp): Skip if no ARECnU entity.
3261         (Uplev_Refs_For_One_Subp): Use actual subtype in unconstrained case.
3262
3263 2015-05-12  Robert Dewar  <dewar@adacore.com>
3264
3265         * a-reatim.adb ("/"): Add explicit check for Time_Span_First / -1.
3266
3267 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
3268
3269         * sem_ch4.adb (Extended_Primitive_Ops): New subprogram,
3270         auxiliary to Try_Primitive_Operation to handle properly prefixed
3271         calls where the operation is not a primitive of the type, but
3272         is declared in the package body that is in the immediate scope
3273         of the type.
3274
3275 2015-05-12  Robert Dewar  <dewar@adacore.com>
3276
3277         * sem_util.adb (Is_Variable): Allow X'Deref(Y) as a variable.
3278
3279 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
3280
3281         * sem_ch8.adb (Find_Expanded_Name): Handle properly a fully
3282         qualified name for an instance of a generic grand-child unit in
3283         the body its parent.
3284
3285 2015-05-12  Robert Dewar  <dewar@adacore.com>
3286
3287         * exp_unst.adb (Upref_Name): New subprogram.
3288         (Unnest_Subprogram): Use Upref_Name.
3289         (Unnest_Subprogram): Use new Deref attribute.
3290         * exp_unst.ads: Doc updates.
3291
3292 2015-05-12  Thomas Quinot  <quinot@adacore.com>
3293
3294         * adaint.c: Enable Large File Support in adaint so that __gnat_readdir
3295         can access files on filesystems mounted from servers that use large
3296         NFS file handles.
3297
3298 2015-05-09  Eric Botcazou  <ebotcazou@adacore.com>
3299
3300         * gcc-interface/utils.c (gnat_write_global_declarations): Use type_decl
3301         method instead of global_decl for TYPE_DECLs.
3302
3303 2015-04-27  Jim Wilson  <jim.wilson@linaro.org>
3304
3305         * gcc-interface/Makefile-lan.in (ada.mostlyclean): Remove gnatbind
3306         and gnat1.
3307
3308 2015-04-13  Eric Botcazou  <ebotcazou@adacore.com>
3309
3310         * gnatvsn.ads (Library_Version): Bump to 6.
3311
3312 2015-04-09  Iain Sandoe  <iain@codesourcery.com>
3313
3314         * gcc-interface/Makefile.in (darwin, powerpc): Enable atomics.
3315
3316 2015-04-08  Eric Botcazou  <ebotcazou@adacore.com>
3317
3318         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Do not make
3319         a function returning an unconstrained type 'const' for the middle-end.
3320
3321         * gcc-interface/trans.c (Pragma_to_gnu) <case Pragma_Warning>: Use
3322         exact condition to detect Reason => "..." pattern.
3323
3324 2015-03-31  Tom de Vries  <tom@codesourcery.com>
3325
3326         PR ada/65490
3327         * terminals.c (child_setup_tty): Fix warning 'argument to sizeof in
3328         bzero call is the same expression as the destination'.
3329
3330 2015-03-26  Eric Botcazou  <ebotcazou@adacore.com>
3331
3332         * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Deref>: New case.
3333
3334 2015-03-24  Gary Dismukes  <dismukes@adacore.com>
3335
3336         * sem_ch3.adb: Minor typo fix (missing paren).
3337
3338 2015-03-24  Robert Dewar  <dewar@adacore.com>
3339
3340         * sinfo.ads: Update comment.
3341
3342 2015-03-24  Robert Dewar  <dewar@adacore.com>
3343
3344         * exp_attr.adb: Add entry for typ'Deref.
3345         * sem_attr.adb (Deref): New GNAT attribute.
3346         * sem_attr.ads: Add entry for new GNAT attribute Deref.
3347         * snames.ads-tmpl: Add entries for new attribute Deref.
3348
3349 2015-03-24  Ed Schonberg  <schonberg@adacore.com>
3350
3351         * sem_ch13.adb (Rep_Item_Too_Early): allow pragma Convention
3352         on generic type.
3353
3354 2015-03-24  Gary Dismukes  <dismukes@adacore.com>
3355
3356         * inline.adb: Minor typo fix.
3357
3358 2015-03-24  Arnaud Charlet  <charlet@adacore.com>
3359
3360         * doc/gnat_ugn/building_executable_programs_with_gnat.rst,
3361         doc/gnat_ugn/gnat_utility_programs.rst
3362         doc/gnat_rm/implementation_defined_attributes.rst
3363         doc/gnat_rm/implementation_defined_pragmas.rst
3364         doc/gnat_rm/representation_clauses_and_pragmas.rst
3365         doc/gnat_rm/about_this_guide.rst
3366         doc/gnat_rm/implementation_of_ada_2012_features.rst: Doc improvements.
3367         * gnat_rm.texi, gnat_ugn.texi: Regenerate.
3368
3369 2015-03-23  Jakub Jelinek  <jakub@redhat.com>
3370
3371         PR bootstrap/65522
3372         * adadecode.c (ada_demangle): Guard with IN_RTS instead of IN_GCC.
3373
3374 2015-03-20  Eric Botcazou  <ebotcazou@adacore.com>
3375
3376         PR ada/65451
3377         * gcc-interface/utils.c (gnat_pushdecl): Tidy up and improve comment.
3378         Make sure to chain only main variants through TYPE_NEXT_PTR_TO.
3379
3380         * gcc-interface/trans.c (Attribute_to_gnu): Revert latest change.
3381
3382 2015-03-16  Eric Botcazou  <ebotcazou@adacore.com>
3383
3384         * gcc-interface/utils2.c (gnat_invariant_expr): Return null if the type
3385         of the expression ends up being composite.
3386
3387 2015-03-16  Eric Botcazou  <ebotcazou@adacore.com>
3388
3389         * gcc-interface/decl.c (is_from_limited_with_of_main): New predicate.
3390         (gnat_to_gnu_entity) <E_Subprogram_Type>: Invoke it on return and
3391         parameter types to detect circularities in ASIS mode.
3392         * gcc-interface/trans.c (Attribute_to_gnu): Mention AI05-0151.
3393
3394 2015-03-16  Eric Botcazou  <ebotcazou@adacore.com>
3395
3396         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Abstract_State>: Do not
3397         short-circuit the regular handling.
3398
3399 2015-03-13  Robert Dewar  <dewar@adacore.com>
3400
3401         * exp_unst.adb (Note_Uplevel_Reference): Eliminate duplicate
3402         references.
3403         (Actual_Ref): New function.
3404         (AREC_String): Minor reformatting.
3405         (Unnest_Subprogram): Use Actual_Ref.
3406         * frontend.adb (Frontend): Turn off Unnest_Subprogram_Mode
3407         before call to Instantiate_Bodies.
3408
3409 2015-03-13  Ed Schonberg  <schonberg@adacore.com>
3410
3411         * freeze.adb (Freeze_Profile): If the return type of a function
3412         being frozen is an untagged limited view and the function is
3413         abstract, mark the type as frozen because there is no later
3414         point at which the profile of the subprogram will be elaborated.
3415
3416 2015-03-13  Robert Dewar  <dewar@adacore.com>
3417
3418         * einfo.adb, einfo.ads, atree.adb, atree.ads, atree.h: Add seventh
3419         component to entities. Add new fields Field36-41 and Node36-41.
3420
3421 2015-03-13  Claire Dross  <dross@adacore.com>
3422
3423         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Rewrite after review.
3424
3425 2015-03-13  Robert Dewar  <dewar@adacore.com>
3426
3427         * exp_util.adb (Is_Volatile_Reference): Compile time known
3428         value is never considered to be a volatile reference.
3429
3430 2015-03-13  Robert Dewar  <dewar@adacore.com>
3431
3432         * sem_ch3.adb (Analyze_Object_Contract): Suppress "constant
3433         cannot be volatile" for internally generated object (such as
3434         FIRST and LAST constants).
3435
3436 2015-03-13  Ed Schonberg  <schonberg@adacore.com>
3437
3438         * sem_ch12.adb (Validate_Access_Subprogram_Instance): If a
3439         convention is specified for the formal parameter, verify that
3440         the actual has the same convention.
3441         * sem_prag.adb (Set_Convention_From_Pragma): Allow convention
3442         pragma to be set on a generic formal type.
3443         * sem_util.adb (Set_Convention): Ignore within an instance,
3444         as it has already been verified in the generic unit.
3445
3446 2015-03-13  Claire Dross  <dross@adacore.com>
3447
3448         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do not inline
3449         subprograms with unconstrained record parameters containing
3450         Itype declarations.
3451         * sinfo.ads Document GNATprove assumption that type should match
3452         in the AST.
3453         * sem_ch6.adb (Analyze_Subprogram_Body_Contract):
3454         Do not check for Refined_Depends and Refined_Globals contracts
3455         as they are optional.
3456
3457 2015-03-13  Ed Schonberg  <schonberg@adacore.com>
3458
3459         * sem_ch12.adb (Instantiate_Type): For a floating-point type,
3460         capture dimension info if any, because the generated subtype
3461         declaration does not come from source and will not process dimensions.
3462         * sem_dim,adb (Analyze_Dimension_Extension_Or_Record_Aggregate):
3463         Do not analyze expressions with an initialization procedure
3464         because aggregates will have been checked at the point of record
3465         declaration.
3466
3467 2015-03-13  Robert Dewar  <dewar@adacore.com>
3468
3469         * aspects.ads, aspects.adb: Add entries for aspect Unimplemented.
3470         * einfo.ads, einfo.adb (Is_Unimplemented): New flag.
3471         * sem_ch13.adb: Add dummy entry for aspect Unimplemented.
3472         * snames.ads-tmpl: Add entry for Name_Unimplemented.
3473
3474 2015-03-13  Gary Dismukes  <dismukes@adacore.com>
3475
3476         * style.adb (Missing_Overriding): Apply the
3477         Comes_From_Source test to the Original_Node of the subprogram
3478         node, to handle the case of a null procedure declaration that
3479         has been rewritten as an empty procedure body.
3480
3481 2015-03-13  Robert Dewar  <dewar@adacore.com>
3482
3483         * exp_util.ads: Minor fix to comment.
3484         * sem_ch3.adb (Constrain_Index): Correct pasto from previous
3485         change.
3486
3487 2015-03-13  Robert Dewar  <dewar@adacore.com>
3488
3489         * exp_util.ads, exp_util.adb (Force_Evaluation): Add Related_Id and
3490         Is_Low/High_Bound params.
3491         * sem_ch3.adb (Constrain_Index): Use new Force_Evaluation calling
3492         sequence to simplify generation of FIRST/LAST temps for bounds.
3493
3494 2015-03-12  Olivier Hainque  <hainque@adacore.com>
3495
3496         * gcc-interface/trans.c (Attribute_to_gnu) <Code_Address case>:
3497         On targets where a function symbol designates a function descriptor,
3498         fetch the function code address from the descriptor.
3499         (USE_RUNTIME_DESCRIPTORS): Provide a default definition.
3500
3501 2015-03-04  Robert Dewar  <dewar@adacore.com>
3502
3503         * sem_warn.adb: Minor reformatting.
3504         * init.c: Minor tweaks.
3505
3506 2015-03-04  Dmitriy Anisimko  <anisimko@adacore.com>
3507
3508         * a-coinho-shared.adb: Fix clear of already empty holder.
3509
3510 2015-03-04  Robert Dewar  <dewar@adacore.com>
3511
3512         * exp_unst.adb (Check_Dynamic_Type): Ignore library level types.
3513         (Check_Uplevel_Reference_To_Type): Ignore call inside generic.
3514         (Note_Uplevel_Reference): Ignore call inside generic.
3515         (Note_Uplevel_Reference): Fix check for no entity field.
3516         (Unnest_Subprogram): Ignore call inside generic.
3517         (Find_Current_Subprogram): Use Defining_Entity, not Defining_Unit_Name.
3518         (Visit_Node): Ignore calls to Imported subprograms.
3519         (Visit_Node): Fix problem in finding subprogram body in some cases.
3520         (Add_Form_To_Spec): Use Defining_Entity, not Defining_Unit_Name.
3521
3522 2015-03-04  Robert Dewar  <dewar@adacore.com>
3523
3524         * einfo.adb (Is_ARECnF_Entity): Removed.
3525         (Last_Formal): Remove special handling of Is_ARECnF_Entity.
3526         (Next_Formal): Remove special handling of Is_ARECnF_Entity.
3527         (Next_Formal_With_Extras): Remove special handling of Is_ARECnF_Entity.
3528         (Number_Entries): Minor reformatting.
3529         * einfo.ads (Is_ARECnF_Entity): Removed.
3530         * exp_unst.adb (Unnest_Subprogram): Remove setting of
3531         Is_ARECnF_Entity.
3532         (Add_Extra_Formal): Use normal Extra_Formal circuit.
3533         * sprint.adb (Write_Param_Specs): Properly handle case where
3534         there are no source formals, but we have at least one Extra_Formal
3535         present.
3536
3537 2015-03-04  Ed Schonberg  <schonberg@adacore.com>
3538
3539         * sem_aggr.adb (Resolve_Record_Aggregate,
3540         Add_Discriminant_Values): If the value is a reference to the
3541         current instance of an enclosing type, use its base type to check
3542         against prefix of attribute reference, because the target type
3543         may be otherwise constrained.
3544
3545 2015-03-04  Robert Dewar  <dewar@adacore.com>
3546
3547         * atree.h: Add entries for Flag287-Flag309.
3548         * einfo.adb: Add (unused) flags Flag287-Flag309.
3549
3550 2015-03-04  Ed Schonberg  <schonberg@adacore.com>
3551
3552         * sem_util.adb (Collect_Interfaces, Collect): When gathering
3553         interfaces of ancestors, handle properly a subtype of a private
3554         extension.
3555
3556 2015-03-04  Robert Dewar  <dewar@adacore.com>
3557
3558         * einfo.adb (Is_ARECnF_Entity): New flag (ARECnF is an extra formal).
3559         (Next_Formal): Don't return ARECnF formal.
3560         (Last_Formal): Don't consider ARECnF formal.
3561         (Next_Formal_With_Extras): Do consider ARECnF formal.
3562         * einfo.ads (Is_ARECnF_Entity): New flag (ARECnF is an extra formal).
3563         * exp_unst.adb (Create_Entities): Set Is_ARECnF_Entity flag.
3564
3565 2015-03-04  Javier Miranda  <miranda@adacore.com>
3566
3567         * exp_ch6.adb (Expand_Simple_Function_Return): When the returned
3568         object is a class-wide interface object and we generate the
3569         accessibility described in RM 6.5(8/3) then displace the pointer
3570         to the object to reference the base of the object (to get access
3571         to the TSD of the object).
3572
3573 2015-03-04  Hristian Kirtchev  <kirtchev@adacore.com>
3574
3575         * sem_prag.adb (Analyze_Abstract_State): Use routine
3576         Malformed_State_Error to issue general errors.
3577         (Analyze_Pragma): Diagnose a syntax error related to a state
3578         declaration with a simple option.
3579         (Malformed_State_Error): New routine.
3580
3581 2015-03-04  Robert Dewar  <dewar@adacore.com>
3582
3583         * a-strsup.adb (Super_Slice): Deal with super flat case.
3584         * einfo.ads: Minor reformatting.
3585         * s-imgdec.adb (Set_Decimal_Digits): Add comment about possibly
3586         redundant code.
3587
3588 2015-03-04  Claire Dross  <dross@adacore.com>
3589
3590         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
3591         a-cforse.ads, a-cofove.ads: Use Default_Initial_Condition on formal
3592         containers.
3593
3594 2015-03-04  Ed Schonberg  <schonberg@adacore.com>
3595
3596         * sem_warn.adb (Check_References): When checking for an unused
3597         in-out parameter of a class- wide type, use its type to determine
3598         whether it is private, in order to avoid a spurious warning when
3599         subprogram spec and body are in different units.
3600
3601 2015-03-04  Yannick Moy  <moy@adacore.com>
3602
3603         * sem_attr.adb: Improve warning messages.
3604
3605 2015-03-04  Robert Dewar  <dewar@adacore.com>
3606
3607         * exp_ch6.adb (Expand_N_Subprogram_Body): Avoid trying to unnest
3608         generic subprograms.
3609         * exp_unst.adb (Check_Dynamic_Type): Handle record types properly
3610         (Note_Uplevel_Reference): Ignore uplevel references to non-types
3611         (Get_Level): Consider only subprograms, not blocks.
3612         (Visit_Node): Set proper condition for generating ARECnF entity.
3613         Ignore indirect calls. Ignore calls to subprograms
3614         outside our nest.
3615         (Unnest_Subprogram): Minor changes in dealing with ARECnF entity.
3616         (Add_Form_To_Spec): Properly set Last_Entity field.
3617         (Unnest_Subprogram): Set current subprogram scope for analyze calls.
3618         Handle case of no uplevel refs in outer subprogram
3619         Don't mark uplevel entities as aliased.
3620         Don't deal with calls with no ARECnF requirement.
3621
3622 2015-03-04  Robert Dewar  <dewar@adacore.com>
3623
3624         * s-valrea.adb (Scan_Real): Remove redundant tests from scaling loops.
3625         * s-imgdec.adb (Set_Decimal_Digits): Remove redundant Max
3626         operation in computing LZ.
3627         * sem_attr.adb: Minor typo fix
3628
3629 2015-03-04  Robert Dewar  <dewar@adacore.com>
3630
3631         * exp_ch7.adb: Minor reformatting.
3632         * exp_unst.adb (Build_Tables): Fix minor glitch for no separate
3633         spec case.
3634         * erroutc.adb (Delete_Msg): add missing decrement of info msg counter.
3635
3636 2015-03-04  Hristian Kirtchev  <kirtchev@adacore.com>
3637
3638         * exp_ch6.adb (Build_Pragma_Check_Equivalent): Suppress
3639         references to formal parameters subject to pragma Unreferenced.
3640         (Suppress_Reference): New routine.
3641         * sem_attr.adb (Analyze_Attribute): Reimplement the analysis
3642         of attribute 'Old. Attributes 'Old and 'Result now share
3643         common processing.
3644         (Analyze_Old_Result_Attribute): New routine.
3645         (Check_Placement_In_Check): Removed.
3646         (Check_Placement_In_Contract_Cases): Removed.
3647         (Check_Placement_In_Test_Case): Removed.
3648         (Check_Use_In_Contract_Cases): Removed.
3649         (Check_Use_In_Test_Case): Removed.
3650         (In_Refined_Post): Removed.
3651         (Is_Within): Removed.
3652         * sem_warn.adb (Check_Low_Bound_Tested): Code cleanup.
3653         (Check_Low_Bound_Tested_For): New routine.
3654
3655 2015-03-04  Hristian Kirtchev  <kirtchev@adacore.com>
3656
3657         * exp_ch3.adb (Expand_N_Object_Declaration):
3658         Generate a runtime check to test the expression of pragma
3659         Default_Initial_Condition when the object is default initialized.
3660
3661 2015-03-02  Robert Dewar  <dewar@adacore.com>
3662
3663         * scng.adb (Scan): Ignore illegal character in relaxed
3664         semantics mode.
3665
3666 2015-03-02  Ed Schonberg  <schonberg@adacore.com>
3667
3668         * sem_ch4.adb (Analyze_Set_Membership); Retain Overloaded flag
3669         on left operand, so it can be properly resolved with type of
3670         alternatives of right operand.
3671         * sem_res.adb (Resolve_Set_Membership): Handle properly an
3672         overloaded left-hand side when the alternatives on the right
3673         hand side are literals of some universal type.  Use first
3674         non-overloaded alternative to find expected type.
3675
3676 2015-03-02  Ed Schonberg  <schonberg@adacore.com>
3677
3678         * exp_ch7.adb (Make_Set_Finalize_Address_Call): Use underlying
3679         type to retrieve designated type, because the purported access
3680         type may be a partial (private) view, when it is declared in
3681         the private part of a nested package, and finalization actions
3682         are generated when completing compilation of enclosing unit.
3683
3684 2015-03-02  Robert Dewar  <dewar@adacore.com>
3685
3686         * back_end.adb (Call_Back_End): Remove previous patch,
3687         the back end now gets to see the result of -gnatd.1
3688         (Unnest_Subprogram_Mode) processing.
3689         * elists.ads, elists.adb (List_Length): New function.
3690         * exp_unst.ads, exp_unst.adb: Major changes, first complete version.
3691         * sem_util.adb (Check_Nested_Access): Handle formals in
3692         Unnest_Subprogram_Mode.
3693         (Adjust_Named_Associations): Minor reformatting.
3694         * sprint.adb (Sprint_Node_Actual): Fix failure to print aliased
3695         for parameters.
3696
3697 2015-03-02  Robert Dewar  <dewar@adacore.com>
3698
3699         * atree.ads, atree.adb (Uint24): New function
3700         (Set_Uint24): New procedure.
3701         * atree.h (Uint24): New macro for field access.
3702         * back_end.adb (Call_Back_End): For now, don't call back end
3703         if unnesting subprogs.
3704         * einfo.adb (Activation_Record_Component): New field
3705         (Subps_Index): New field.
3706         * einfo.ads (Activation_Record_Component): New field
3707         (Subps_Index): New field Minor reordering of comments into alpha order.
3708         * exp_unst.ads, exp_unst.adb: Continued development.
3709
3710 2015-03-02  Gary Dismukes  <dismukes@adacore.com>
3711
3712         * exp_disp.ads: Minor reformatting.
3713
3714 2015-03-02  Ed Schonberg  <schonberg@adacore.com>
3715
3716         * sem_ch8.adb (Chain_Use_Clause): Do not chain use clause from
3717         ancestor to list of use clauses active in descendant unit if we
3718         are within the private part of an intervening parent, to prevent
3719         circularities in use clause list.
3720
3721 2015-03-02  Javier Miranda  <miranda@adacore.com>
3722
3723         * exp_ch9.adb (Build_Corresponding_Record): Propagate type
3724         invariants to the corresponding record type.
3725         * exp_disp.ad[sb] (Set_DT_Position_Value): New subprogram
3726         which sets the value of the DTC_Entity associated with a given
3727         primitive of a tagged type and propagates the value to the
3728         wrapped subprogram.
3729         (Set_DTC_Entity_Value): Propagate the DTC
3730         value to the wrapped entity.
3731         * sem_ch13.adb (Build_Invariant_Procedure): Append the code
3732         associated with invariants of progenitors.
3733         * sem_ch3.adb (Build_Derived_Record_Type): Inherit type invariants
3734         of parents and progenitors.
3735         (Process_Full_View): Check hidden inheritance of class-wide type
3736         invariants.
3737         * sem_ch7.adb (Analyze_Package_Specification): Do not generate
3738         the invariant procedure for interface types; build the invariant
3739         procedure for tagged types inheriting invariants from their
3740         progenitors.
3741         * sem_prag.adb (Pragma_Invariant) Allow invariants in interface
3742         types but do not build their invariant procedure since their
3743         invariants will be propagated to the invariant procedure of
3744         types covering the interface.
3745         * exp_ch6.adb, exp_disp.adb, sem_ch3.adb, sem_ch7.adb,
3746         sem_ch8.adb, sem_disp.adb: Replace all calls to Set_DT_Position
3747         by calls to Set_DT_Position_Value.
3748
3749 2015-03-02  Hristian Kirtchev  <kirtchev@adacore.com>
3750
3751         * sem_attr.adb (Analyze_Attribute): Factor out heavily indented
3752         code in Denote_Same_Function.  Do not analyze attribute 'Result
3753         when it is inside procedure _Postconditions.  Remove a misplaced
3754         warning diagnostic. Code cleanup.
3755         (Denote_Same_Function): New routine.
3756         * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Code
3757         cleanup. Warn on pre/postconditions on an inlined subprogram.
3758         (Analyze_Pragma, Refined_Post case): Warn on pre/postconditions on
3759         an inlined subprogram.
3760         (Analyze_Pre_Post_Condition_In_Decl_Part): Code cleanup. Warn on
3761         pre/post condition on an inlined subprogram.
3762         (Analyze_Test_Case_In_Decl_Part): Code cleanup. Warn on
3763         pre/postconditions on an inlined subprogram.
3764         (Check_Postcondition_Use_In_Inlined_Subprogram): New routine.
3765
3766 2015-03-02  Hristian Kirtchev  <kirtchev@adacore.com>
3767
3768         * sem_prag.adb (Ensure_Aggregate_Form):
3769         Ensure that the name denoted by the Chars of a pragma argument
3770         association has the proper Sloc when converted into an aggregate.
3771
3772 2015-03-02  Bob Duff  <duff@adacore.com>
3773
3774         * sem_ch6.adb (Check_Private_Overriding): Capture
3775         Incomplete_Or_Partial_View in a constant. This is cleaner and
3776         more efficient.
3777
3778 2015-03-02  Gary Dismukes  <dismukes@adacore.com>
3779
3780         * einfo.ads, exp_unst.ads: Minor reformatting.
3781
3782 2015-03-02  Ed Schonberg  <schonberg@adacore.com>
3783
3784         * a-strsea.adb (Find_Token): Ensure that the range of iteration
3785         does not perform any improper character access. This prevents
3786         erroneous access in the unusual case of an empty string target
3787         and a From parameter less than Source'First.
3788
3789 2015-03-02  Robert Dewar  <dewar@adacore.com>
3790
3791         * elists.adb (List_Length): Fix incorrect result.
3792
3793 2015-03-02  Bob Duff  <duff@adacore.com>
3794
3795         * sem_ch6.adb (Check_Private_Overriding): Refine the legality
3796         checks here. It used to check that the function is merely
3797         overriding SOMEthing. Now it checks that the function is
3798         overriding a corresponding public operation. This is a correction
3799         to the implementation of the rule in RM-3.9.3(10).
3800
3801 2015-03-02  Robert Dewar  <dewar@adacore.com>
3802
3803         * debug.adb: Document new debug flag -gnatd.1.
3804         * einfo.ads, einfo.adb (Has_Nested_Subprogram): New flag.
3805         (Has_Uplevel_Reference): New flag (Is_Static_Type): New flag.
3806         (Uplevel_Reference_Noted):New flag (Uplevel_References): New field.
3807         * elists.ads elists.adb (List_Length): New function.
3808         * exp_ch6.adb (Expand_N_Subprogram_Body): Call Unnest_Subprogram
3809         when appropriate (Process_Preconditions): Minor code
3810         reorganization and reformatting
3811         * exp_unst.ads, exp_unst.adb: New files.
3812         * gnat1drv.adb (Adjust_Global_Switches): Set
3813         Unnest_Subprogram_Mode if -gnatd.1
3814         * namet.ads, namet.adb (Name_Find_Str): New version of Name_Find with
3815         string argument.
3816         * opt.ads (Unnest_Subprogram_Mode): New flag.
3817         * par-ch3.adb (P_Identifier_Declarations): Fixes to -gnatd.2 handling.
3818         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set
3819         Has_Nested_Subprogram flag.
3820         * sem_ch8.adb (Find_Direct_Name): New calling sequence for
3821         Check_Nested_Access.
3822         (Find_Selected_Component): Minor comment addition.
3823         * sem_util.adb (Check_Nested_Access): New version for use with Exp_Unst.
3824         (Note_Possible_Modification): New calling sequence for
3825         Check_Nested_Access.
3826         * sem_util.ads (Check_Nested_Access): New version for use with Exp_Unst.
3827         * gcc-interface/Make-lang.in (GNAT1_OBJS): Add exp_unst.o
3828
3829 2015-03-02  Pierre-Marie de Rodat  <derodat@adacore.com>
3830
3831         * gcc-interface/utils.c (gnat_pushdecl): For non-artificial pointer
3832         types, preserve the original type and create copies just like the C
3833         front-end does.  For artificial ones, do not define a name for
3834         the original type.
3835         (create_type_decl): When gnat_pushdecl made the input type the
3836         original type for the new declaration, do not define a stub
3837         declaration for it.
3838         * gcc-interface/utils2.c (build_binary_op): Accept two different
3839         pointer types when they point to the same type.
3840
3841 2015-03-02  Hristian Kirtchev  <kirtchev@adacore.com>
3842
3843         * exp_util.adb (Possible_Bit_Aligned_Component): Do not process
3844         an unanalyzed node.
3845         * sem_util.adb (Kill_Current_Values): Do not invalidate and
3846         de-null a constant.
3847
3848 2015-03-02  Robert Dewar  <dewar@adacore.com>
3849
3850         * sem_ch3.adb, exp_attr.adb, checks.adb, exp_aggr.adb: Minor
3851         reformatting.
3852
3853 2015-03-02  Ed Schonberg  <schonberg@adacore.com>
3854
3855         * sem_ch8.adb: extend use of Available_Subtype.
3856
3857 2015-03-02  Hristian Kirtchev  <kirtchev@adacore.com>
3858
3859         * sem_prag.adb (Duplication_Error): Remove the special handling
3860         of 'Class or _Class in the context of pre/postconditions.
3861         (Process_Class_Wide_Condition): Remove the special handling of
3862         'Class or _Class in the context of pre/postconditions.
3863         * sem_util.adb (Original_Aspect_Pragma_Name): Names Pre_Class
3864         and Post_Class no longer need to be converted to _Pre and _Post.
3865         * sem_util.ads (Original_Aspect_Pragma_Name): Update the comment
3866         on usage.
3867
3868 2015-03-02  Hristian Kirtchev  <kirtchev@adacore.com>
3869
3870         * exp_ch6.adb (Process_Preconditions): Modify the
3871         mechanism that find the first source declaration to correct exit
3872         the loop once it has been found.
3873
3874 2015-03-02  Gary Dismukes  <dismukes@adacore.com>
3875
3876         * a-strsea.adb: Minor typo fix.
3877
3878 2015-03-02  Bob Duff  <duff@adacore.com>
3879
3880         * einfo.ads: Minor comment fixes.
3881
3882 2015-03-02  Gary Dismukes  <dismukes@adacore.com>
3883
3884         * einfo.adb, checks.adb: Minor reformatting and typo fixes.
3885
3886 2015-03-02  Ed Schonberg  <schonberg@adacore.com>
3887
3888         * exp_aggr.adb (Get_Assoc_Expr): If the Default_Component_Value
3889         is defined for the array type, use it instead of a Default_Value
3890         specified for the component type itself.
3891
3892 2015-03-02  Thomas Quinot  <quinot@adacore.com>
3893
3894         * exp_attr.adb (Expand_N_Attribute_Reference, case Input): When
3895         expanding a 'Input attribute reference for a class-wide type,
3896         do not generate a separate object declaration for the controlling
3897         tag dummy object; instead, generate the expression inline in the
3898         dispatching call. Otherwise, the declaration (which involves a
3899         call to String'Input, returning a dynamically sized value on the
3900         secondary stack) will be expanded outside of proper secondary
3901         stack mark/release operations, and will thus cause a secondary
3902         stack leak.
3903
3904 2015-03-02  Hristian Kirtchev  <kirtchev@adacore.com>
3905
3906         * checks.adb (Add_Validity_Check): Change the names of all
3907         formal parameters to better illustrate their purpose. Update
3908         the subprogram documentation. Update all occurrences of the
3909         formal parameters. Generate a pre/postcondition pragma by
3910         calling Build_Pre_Post_Condition.
3911         (Build_PPC_Pragma): Removed.
3912         (Build_Pre_Post_Condition): New routine.
3913         * einfo.adb Node8 is no longer used as Postcondition_Proc. Node14
3914         is now used as Postconditions_Proc. Flag240 is now renamed to
3915         Has_Expanded_Contract.  (First_Formal): The routine can now
3916         operate on generic subprograms.
3917         (First_Formal_With_Extras): The routine can now operate on generic
3918         subprograms.
3919         (Has_Expanded_Contract): New routine.
3920         (Has_Postconditions): Removed.
3921         (Postcondition_Proc): Removed.
3922         (Postconditions_Proc): New routine.
3923         (Set_Has_Expanded_Contract): New routine.
3924         (Set_Has_Postconditions): Removed.
3925         (Set_Postcondition_Proc): Removed.
3926         (Set_Postconditions_Proc): New routine.
3927         (Write_Entity_Flags): Remove the output of Has_Postconditions. Add
3928         the output of Has_Expanded_Contract.
3929         (Write_Field8_Name): Remove the output of Postcondition_Proc.
3930         (Write_Field14_Name): Add the output of Postconditions_Proc.
3931         * einfo.ads New attributes Has_Expanded_Contract and
3932         Postconditions_Proc along with occurrences in entities.
3933         Remove attributes Has_Postconditions and Postcondition_Proc
3934         along with occurrences in entities.
3935         (Has_Expanded_Contract): New routine along with pragma Inline.
3936         (Has_Postconditions): Removed along with pragma Inline.
3937         (Postcondition_Proc): Removed along with pragma Inline.
3938         (Postconditions_Proc): New routine along with pragma Inline.
3939         (Set_Has_Expanded_Contract): New routine along with pragma Inline.
3940         (Set_Has_Postconditions): Removed along with pragma Inline.
3941         (Set_Postcondition_Proc): Removed along with pragma Inline.
3942         (Set_Postconditions_Proc): New routine along with pragma Inline.
3943         * exp_ch6.adb (Add_Return): Code cleanup. Update the
3944         generation of the call to the _Postconditions routine of
3945         the procedure.  (Expand_Non_Function_Return): Reformat the
3946         comment on usage. Code cleanup.  Update the generation of
3947         the call to the _Postconditions routine of the procedure or
3948         entry [family].
3949         (Expand_Simple_Function_Return): Update the
3950         generation of the _Postconditions routine of the function.
3951         (Expand_Subprogram_Contract): Reimplemented.
3952         * exp_ch6.ads (Expand_Subprogram_Contract): Update the parameter
3953         profile along the comment on usage.
3954         * exp_ch9.adb (Build_PPC_Wrapper): Code cleanup.
3955         (Expand_N_Task_Type_Declaration): Generate pre/postconditions
3956         wrapper when the entry [family] has a contract with
3957         pre/postconditions.
3958         * exp_prag.adb (Expand_Attributes_In_Consequence): New routine.
3959         (Expand_Contract_Cases): This routine and its subsidiaries now
3960         analyze all generated code.
3961         (Expand_Old_In_Consequence): Removed.
3962         * sem_attr.adb Add with and use clause for Sem_Prag.
3963         (Analyze_Attribute): Reimplment the analysis of attribute 'Result.
3964         (Check_Use_In_Test_Case): Use routine Test_Case_Arg to obtain
3965         "Ensures".
3966         * sem_ch3.adb (Analyze_Declarations): Analyze the contract of
3967         a generic subprogram.
3968         (Analyze_Object_Declaration): Do not create a contract node.
3969         (Derive_Subprogram): Do not create a contract node.
3970         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Do
3971         not create a contract node.
3972         (Analyze_Completion_Contract): New routine.
3973         (Analyze_Function_Return): Alphabetize.
3974         (Analyze_Generic_Subprogram_Body): Alphabetize. Do not create a
3975         contract node.  Do not copy pre/postconditions to the original
3976         generic template.
3977         (Analyze_Null_Procedure): Do not create a contract node.
3978         (Analyze_Subprogram_Body_Contract): Reimplemented.
3979         (Analyze_Subprogram_Body_Helper): Do not mark the enclosing scope
3980         as having postconditions. Do not create a contract node. Analyze
3981         the subprogram body contract of a body that acts as a compilation
3982         unit. Expand the subprogram contract after the declarations have
3983         been analyzed.
3984         (Analyze_Subprogram_Contract): Reimplemented.
3985         (Analyze_Subprogram_Specification): Do not create a contract node.
3986         (List_Inherited_Pre_Post_Aspects): Code cleanup.
3987         * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Update the
3988         comment on usage.
3989         (Analyze_Subprogram_Contract): Update the
3990         parameter profile and the comment on usage.
3991         * sem_ch7.adb (Analyze_Package_Body_Helper): Do not create a
3992         contract node.
3993         (Analyze_Package_Declaration): Do not create a
3994         contract node.
3995         (Is_Subp_Or_Const_Ref): Ensure that the prefix has an entity.
3996         * sem_ch8.adb (Analyze_Subprogram_Renaming): Do not create a
3997         contract node.
3998         * sem_ch9.adb (Analyze_Entry_Declaration): Do not create a
3999         contract node.
4000         * sem_ch10.adb (Analyze_Compilation_Unit): Move local variables to
4001         their proper section and alphabetize them. Analyze the contract of
4002         a [generic] subprogram after all Pragmas_After have been analyzed.
4003         (Analyze_Subprogram_Body_Stub_Contract): Alphabetize.
4004         * sem_ch12.adb (Analyze_Generic_Package_Declaration): Do not
4005         create a contract node.
4006         (Analyze_Generic_Subprogram_Declaration):
4007         Alphabetize local variables. Do not create a contract
4008         node. Do not generate aspects out of pragmas for ASIS.
4009         (Analyze_Subprogram_Instantiation): Instantiate
4010         the contract of the subprogram.  Do not create a
4011         contract node.  (Instantiate_Contract): New routine.
4012         (Instantiate_Subprogram_Body): Alphabetize local variables.
4013         (Save_Global_References_In_Aspects): New routine.
4014         (Save_References): Do not save the global references found within
4015         the aspects of a generic subprogram.
4016         * sem_ch12.ads (Save_Global_References_In_Aspects): New routine.
4017         * sem_ch13.adb (Analyze_Aspect_Specifications): Do not use
4018         Original_Node for establishing linkages.
4019         (Insert_Pragma): Insertion in a subprogram body takes precedence over
4020         the case where the subprogram body is also a compilation unit.
4021         * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Use
4022         Get_Argument to obtain the proper expression. Install the generic
4023         formals when the related context is a generic subprogram.
4024         (Analyze_Depends_In_Decl_Part): Use Get_Argument to obtain
4025         the proper expression. Use Corresponding_Spec_Of to obtain
4026         the spec. Install the generic formal when the related context
4027         is a generic subprogram.
4028         (Analyze_Global_In_Decl_Part): Use Get_Argument to obtain the proper
4029         expression. Use Corresponding_Spec_Of to obtain the spec. Install the
4030         generic formal when the related context is a generic subprogram.
4031         (Analyze_Initial_Condition_In_Decl_Part): Use Get_Argument
4032         to obtain the proper expression. Remove the call to
4033         Check_SPARK_Aspect_For_ASIS as the analysis is now done
4034         automatically.
4035         (Analyze_Pragma): Update all occurrences
4036         to Original_Aspect_Name. Pragmas Contract_Cases, Depends,
4037         Extensions_Visible, Global, Postcondition, Precondition and
4038         Test_Case now carry generic templates when the related context
4039         is a generic subprogram. The same pragmas are no longer
4040         forcefully fully analyzed when the context is a subprogram
4041         that acts as a compilation unit. Pragmas Abstract_State,
4042         Initial_Condition, Initializes and Refined_State have been clean
4043         up. Pragmas Post, Post_Class, Postcondition, Pre, Pre_Class
4044         and Precondition now use the same routine for analysis. Pragma
4045         Refined_Post does not need to check the use of 'Result or
4046         the lack of a post-state in its expression. Reimplement the
4047         analysis of pragma Test_Case.
4048         (Analyze_Pre_Post_Condition): New routine.
4049         (Analyze_Pre_Post_Condition_In_Decl_Part):
4050         Reimplemented.
4051         (Analyze_Refined_Depends_In_Decl_Part): Use Get_Argument to obtain the
4052         proper expression.
4053         (Analyze_Refined_Global_In_Decl_Part): Use Get_Argument to obtain
4054         the proper expression.
4055         (Analyze_Test_Case_In_Decl_Part): Reimplemented.
4056         (Check_Pre_Post): Removed.
4057         (Check_Precondition_Postcondition): Removed.
4058         (Check_SPARK_Aspect_For_ASIS): Removed.
4059         (Check_Test_Case): Removed.
4060         (Collect_Subprogram_Inputs_Outputs): Use Get_Argument
4061         to obtain the proper expression. Use Corresponding_Spec_Of to
4062         find the proper spec.
4063         (Create_Generic_Template): New routine.
4064         (Duplication_Error): New routine.
4065         (Expression_Function_Error): New routine.
4066         (Find_Related_Subprogram_Or_Body): Moved to the spec
4067         of Sem_Prag. Emit precise error messages. Account for cases of
4068         rewritten expression functions, generic instantiations, handled
4069         sequence of statements and pragmas from aspects.
4070         (Get_Argument): New routine.
4071         (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Removed.
4072         (Preanalyze_CTC_Args): Removed.
4073         (Process_Class_Wide_Condition): New routine.
4074         * sem_prag.ads (Analyze_Test_Case_In_Decl_Part): Update
4075         the parameter profile along with the comment on usage.
4076         (Find_Related_Subprogram_Or_Body): Moved from the body of Sem_Prag.
4077         (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Removed.
4078         (Test_Case_Arg): New routine.
4079         * sem_util.adb Add with and use clauses for Sem_Ch6.
4080         (Add_Contract_Item): This routine now creates a contract
4081         node the first time an item is added. Remove the duplicate
4082         aspect/pragma checks.
4083         (Check_Result_And_Post_State): Reimplemented.
4084         (Corresponding_Spec_Of): New routine.
4085         (Get_Ensures_From_CTC_Pragma): Removed.
4086         (Get_Requires_From_CTC_Pragma): Removed.
4087         (Has_Significant_Contract): New routine.
4088         (Inherit_Subprogram_Contract): Inherit only if the source
4089         has a contract.
4090         (Install_Generic_Formals): New routine.
4091         (Original_Aspect_Name): Removed.
4092         (Original_Aspect_Pragma_Name): New routine.
4093         * sem_util.ads (Check_Result_And_Post_State): Reimplemented.
4094         (Corresponding_Spec_Of): New routine.
4095         (Get_Ensures_From_CTC_Pragma): Removed.
4096         (Get_Requires_From_CTC_Pragma): Removed.
4097         (Has_Significant_Contract): New routine.
4098         (Install_Generic_Formals): New routine.
4099         (Original_Aspect_Name): Removed.
4100         (Original_Aspect_Pragma_Name): New routine.
4101         * sem_warn.adb Add with and use clauses for Sem_Prag.
4102         (Within_Postcondition): Use Test_Case_Arg to extract "Ensures".
4103
4104 2015-03-02  Ed Schonberg  <schonberg@adacore.com>
4105
4106         * sem_ch8.adb (Available_Subtype): Optimization in
4107         Find_Selected_Component: when safe, use existing subtype of
4108         array component, possibly discriminant-dependent, rather than
4109         creating new subtype declaration for it. In this fashion different
4110         occurrences of the component have the same subtype, rather than
4111         just equivalent ones. Simplifies value tracing in GNATProve.
4112
4113 2015-03-01  Arnaud Charlet  <charlet@adacore.com>
4114
4115         PR ada/65259
4116
4117         * doc/gnat_ugn/gnat_project_manager.rst,
4118         doc/gnat_ugn/platform_specific_information.rst: Remove reference to
4119         image, too troublesome with texi format.
4120         * gnat_ugn.texi: Regenerate.
4121
4122 2015-02-24  Thomas Schwinge  <thomas@codesourcery.com>
4123
4124         PR libgomp/64625
4125         * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8): Remove.
4126         (DEF_FUNCTION_TYPE_VAR_12): Likewise.
4127         (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
4128
4129 2015-02-23  Thomas Schwinge  <thomas@codesourcery.com>
4130
4131         * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8): Fix number of
4132         arguments parameter.
4133         (DEF_FUNCTION_TYPE_VAR_12): Likewise.
4134
4135 2015-02-22  Arnaud Charlet  <charlet@adacore.com>
4136
4137         * doc/Makefile: postprocess texinfo files to update @dircategory
4138         and update texi files under gcc/ada.
4139         * gnat_ugn.texi, gnat_rm.texi: Regenerated.
4140
4141 2015-02-22  Arnaud Charlet  <charlet@adacore.com>
4142
4143         * doc/gnat_ugn/project-manager-figure.png,
4144         doc/gnat_ugn/rtlibrary-structure.png: New.
4145
4146 2015-02-22  Tom de Vries  <tom@codesourcery.com>
4147
4148         PR ada/65100
4149         * gnat-style.texi (@subsection Loop Statements): Replace @noindent by
4150         @item, and fix warning '@itemize has text but no @item'.
4151
4152 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
4153
4154         * sem_prag.adb (Analyze_Pragma, case Obsolescent): Pragma
4155         legally applies to an abstract subprogram declaration.
4156         * freeze.adb: Minor comment addition.
4157
4158 2015-02-20  Robert Dewar  <dewar@adacore.com>
4159
4160         * errout.ads: Document replacement of Name_uPre/Post/Type_Invariant.
4161         * erroutc.adb (Set_Msg_Str): Replace _xxx.
4162         (Pre/Post/Type_Invariant) by xxx'Class.
4163         * erroutc.ads (Set_Msg_Str): Replace _xxx.
4164         (Pre/Post/Type_Invariant) by xxx'Class.
4165         * sem_prag.adb (Fix_Error): Remove special casing of
4166         Name_uType_Invariant.
4167         (Analyze_Pre_Post_Condition_In_Decl_Part): Remove special casing of
4168         Name_uPre and Name_uPost in aspect case (done in Errout now).
4169
4170 2015-02-20  Robert Dewar  <dewar@adacore.com>
4171
4172         * g-alveop.adb: Minor style fixes.
4173
4174 2015-02-20  Robert Dewar  <dewar@adacore.com>
4175
4176         * freeze.adb (Warn_Overlay): Guard against blow up with address
4177         clause.
4178
4179 2015-02-20  Bob Duff  <duff@adacore.com>
4180
4181         * exp_attr.adb (May_Be_External_Call): Remove this. There is no need
4182         for the compiler to guess whether the call is internal or external --
4183         it is always external.
4184         (Expand_Access_To_Protected_Op): For P'Access, where P
4185         is a protected subprogram, always create a pointer to the
4186         External_Subprogram.
4187
4188 2015-02-20  Robert Dewar  <dewar@adacore.com>
4189
4190         * a-dispat.adb, a-stcoed.ads: Minor reformatting.
4191
4192 2015-02-20  Robert Dewar  <dewar@adacore.com>
4193
4194         * sem_ch13.adb (Build_Discrete_Static_Predicate): Allow static
4195         predicate for non-static subtype.
4196         (Build_Predicate_Functions): Do not assume subtype associated with a
4197         static predicate must be static.
4198
4199 2015-02-20  Robert Dewar  <dewar@adacore.com>
4200
4201         * errout.adb (Set_Msg_Node): Better handling of internal names
4202         (Set_Msg_Node): Kill message when we cannot eliminate internal name.
4203         * errout.ads: Document additional case of message deletion.
4204         * namet.adb (Is_Internal_Name): Refined to consider wide
4205         strings in brackets notation and character literals not to be
4206         internal names.
4207         * sem_ch8.adb (Find_Selected_Component): Give additional error
4208         when selector name is a subprogram whose first parameter has
4209         the same type as the prefix, but that type is untagged.
4210
4211 2015-02-20  Robert Dewar  <dewar@adacore.com>
4212
4213         * g-allein.ads, g-alveop.adb, g-alveop.ads, opt.ads: Minor reformatting
4214
4215 2015-02-20  Tristan Gingold  <gingold@adacore.com>
4216
4217         * opt.ads (GNAT_Mode_Config): New variable.
4218         * opt.adb (Set_Opt_Config_Switches): Consider GNAT_Mode_Config
4219         to set Assertions_Enabled.
4220         * switch-c.adb (Scan_Front_End_Switches): Set GNAT_Mode_Config
4221         for -gnatg.
4222
4223 2015-02-20  Robert Dewar  <dewar@adacore.com>
4224
4225         * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Add an additional
4226         comment regarding the handling of unterminated fixed-point
4227         constants.
4228         * s-valuns.ads (Scan_Raw_Unsigned): Add comments
4229         corresponding to those previously added for
4230         System.Val_LLU.Scan_Raw_Long_Long_Unsigned.
4231
4232 2015-02-20  Olivier Hainque  <hainque@adacore.com>
4233
4234         * g-allein.ads, g-alveop.ads, g-alveop.adb: Code clean ups.
4235
4236 2015-02-20  Robert Dewar  <dewar@adacore.com>
4237
4238         * sem_prag.adb: Minor comment clarification.
4239
4240 2015-02-20  Olivier Hainque  <hainque@adacore.com>
4241
4242         * g-allein.ads (vec_ctf, vec_vcsfx, vec_vcfux): Remove.
4243         * g-alleve.ads, g-alleva.adb (vcfux): Likewise.
4244         * g-alveop.ads (vec_vcfsx, vec_vcfux): Just rename the ll versions.
4245         (vec_ctf): Now renamings as well.
4246
4247 2015-02-20  Robert Dewar  <dewar@adacore.com>
4248
4249         * switch-c.adb, bindgen.adb: Minor reformatting.
4250
4251 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
4252
4253         * sem_prag.adb (Analyze_Pragma, case Type_Invariant):
4254         Invariant'class is allowed on an abstract type.
4255
4256 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
4257
4258         * sem_ch3.adb (Access_Definition): If the access definition is
4259         for a protected component and defines an access to protected
4260         subprogram, do not create an itype reference for it because a
4261         full type declaration will be built in order to generate the
4262         proper equivalent type.
4263         (Analyze_Subtype_Declaration): Add information of incomplete
4264         subtypes, for Ada 2012 extended uses of incomplete types.
4265
4266 2015-02-20  Gary Dismukes  <dismukes@adacore.com>
4267
4268         * sem_res.adb: Minor reformatting.
4269
4270 2015-02-20  Vincent Celier  <celier@adacore.com>
4271
4272         * switch-c.adb (Scan_Front_End_Switches): When comparing runtime
4273         path name for several switches --RTS, use the normalized path
4274         names.
4275
4276 2015-02-20  Vincent Celier  <celier@adacore.com>
4277
4278         * bindgen.adb: Minor reformatting and code reorganization.
4279
4280 2015-02-20  Jose Ruiz  <ruiz@adacore.com>
4281
4282         * a-stcoed.ads: Add spec for this package (Unimplemented_Unit).
4283         * impunit.adb (Non_Imp_File_Names_12): Mark unit a-stcoed.ads as
4284         defined by Ada 2012.
4285
4286 2015-02-20  Arnaud Charlet  <charlet@adacore.com>
4287
4288         * sysdep.c, expect.c, s-oscons-tmplt.c, gsocket.h, adaint.c: Remove
4289         obsolete references to RTX, nucleus, VMS.
4290
4291 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
4292
4293         * sem_prag.adb (Fix_Error): For an illegal Type_Invariant'Class
4294         aspect, use name that mentions Class explicitly, rather than
4295         compiler-internal name.
4296
4297 2015-02-20  Robert Dewar  <dewar@adacore.com>
4298
4299         * debug.adb: Add documentation for -gnatd.2 (allow statements
4300         in decl sequences).
4301         * par-ch3.adb (P_Identifier_Declarations): Handle
4302         statement appearing where declaration expected more cleanly.
4303         (Statement_When_Declaration_Expected): Implement debug flag
4304         -gnatd.2.
4305
4306 2015-02-20  Jose Ruiz  <ruiz@adacore.com>
4307
4308         * a-dinopr.ads: Add spec for this package (Unimplemented_Unit).
4309         * a-dispat.ads (Yield): Include procedure added in Ada 2012.
4310         * a-dispat.adb (Yield): Implement procedure added in Ada 2012.
4311         * impunit.adb (Non_Imp_File_Names_05): Mark unit a-dinopr.ads as
4312         defined by Ada 2005.
4313         * snames.ads-tmpl (Name_Non_Preemptive_FIFO_Within_Priorities):
4314         This is the correct name for the dispatching policy (FIFO was
4315         missing).
4316
4317 2015-02-20  Javier Miranda  <miranda@adacore.com>
4318
4319         * sem_res.adb (Resolve_Type_Conversion): If the type of the
4320         operand is the limited-view of a class-wide type then recover
4321         the class-wide type of the non-limited view.
4322
4323 2015-02-20  Arnaud Charlet  <charlet@adacore.com>
4324
4325         * gcc-interface/Makefile.in: Remove references to nucleus.
4326         * gcc-interface/decl.c (gnat_to_gnu_entity, case E_Procedure): Set
4327         extern_flag to true for Inline_Always subprograms with
4328         Intrinsic convention.
4329
4330 2015-02-20  Yannick Moy  <moy@adacore.com>
4331
4332         * sem_prag.ads: Minor typo in comment.
4333
4334 2015-02-20  Pascal Obry  <obry@adacore.com>
4335
4336         * s-osprim-mingw.adb: Fix Get_Base_Time parameter mode.
4337
4338 2015-02-20  Vincent Celier  <celier@adacore.com>
4339
4340         * makeutl.adb (Get_Directories.Add_Dir): Add a directory only
4341         if it exists.
4342
4343 2015-02-20  Robert Dewar  <dewar@adacore.com>
4344
4345         * sem_eval.ads: Minor reformatting.
4346
4347 2015-02-20  Eric Botcazou  <ebotcazou@adacore.com>
4348
4349         * freeze.adb (Size_Known): Do not set the packed size for
4350         independent type or component.
4351         (Freeze_Array_Type): Check for Independent[_Components] with packing
4352         or explicit component size clause.
4353         * gnat1drv.adb (Post_Compilation_Validation_Checks): Do the validation
4354         of independence pragmas only for non-GCC back-ends.
4355         * sem_ch13.adb (Initialize): Likewise for the initialization.
4356         * sem_prag.adb (Record_Independence_Check): New procedure to record an
4357         independence check in the table.
4358         (Analyze_Pragma): Use it throughout instead of doing it manually.
4359         * gcc-interface/decl.c (gnat_to_gnu_field): Add support for
4360         independent type or component.
4361
4362 2015-02-20  Thomas Quinot  <quinot@adacore.com>
4363
4364         * adaint.c (__gnat_readdir): For Solaris, use 64 bit variants of
4365         struct direct and readdir. This is required for NFS filesystems
4366         mounted from servers that use 64-bit cookies.
4367
4368 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
4369
4370         * sem_ch12.adb (Analyze_Subprogram_Instantiaion): New subprogram
4371         Build_Subprogram_Renaming, to create renaming of subprogram
4372         instance in the the declaration of the wrapper package rather
4373         than in its body, so that it is available for analysis of aspects
4374         propagated from generic to instantiation.
4375         (Check_Mismatch): An actual for a formal package that is an
4376         incomplete type matches a formal type that is incomplete.
4377         (Instantiate_Package_Body): Move code that builds subprogram
4378         renaming to Analyze_Subprogram_Instantiation.
4379         (Instantiate_Type): The generated subtype is a limited view if
4380         the actual is a limited view.
4381         (Load_Parent_Of_Generic): Retrieve instance declaration from
4382         its new position within wrapper package.
4383
4384 2015-02-20  Arnaud Charlet  <charlet@adacore.com>
4385
4386         * s-parame-vxworks.adb, s-os_lib.ads: Update comments.
4387
4388 2015-02-20  Robert Dewar  <dewar@adacore.com>
4389
4390         * s-osinte-vxworks.ads (To_Timespec): Add comment about the
4391         issue of negative arguments.
4392
4393 2015-02-20  Eric Botcazou  <ebotcazou@adacore.com>
4394
4395         * gnat1drv.adb: Minor consistency fix.
4396
4397 2015-02-20  Pascal Obry  <obry@adacore.com>
4398
4399         * s-osprim-mingw.adb (Get_Base_Time): Properly release lock in all
4400         paths.
4401
4402 2015-02-20  Eric Botcazou  <ebotcazou@adacore.com>
4403
4404         * inline.adb (Expand_Inlined_Call): Skip again calls to subprogram
4405         renamings.
4406         * exp_ch6.adb (Expand_Call): Use back-end inlining
4407         instead of expansion for simple subprogram renamings.
4408
4409 2015-02-20  Robert Dewar  <dewar@adacore.com>
4410
4411         * exp_util.adb: Minor reformatting.
4412
4413 2015-02-20  Vincent Celier  <celier@adacore.com>
4414
4415         * switch-c.adb (Scan_Front_End_Switches): Do not fail when --RTS=
4416         is specified several times with different values that indicates
4417         the same runtime directory.
4418
4419 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
4420
4421         * sem_attr.adb (Check_Not_Incomplete_Type): Clean up code to
4422         handle properly illegal uses of attributes on prefixes on an
4423         incomplete type, both when the type of the prefix is locally
4424         incomplete, and when it is a limited view of a type whose
4425         non-limited view is not available.
4426         (Analyze_Attribute): Add calls to Check_Not_Incomplete_Type for
4427         'Address and others.
4428
4429 2015-02-20  Eric Botcazou  <ebotcazou@adacore.com>
4430
4431         * exp_ch6.adb: Fix minor typo in comment.
4432
4433 2015-02-20  Eric Botcazou  <ebotcazou@adacore.com>
4434
4435         * sinfo.ads: Add comment.
4436
4437 2015-02-20  Olivier Hainque  <hainque@adacore.com>
4438
4439         * opt.ads: Replace Opt.Suppress_All_Inlining by two separate
4440         flags controlling the actual FE inlining out of pragma Inline
4441         and pragma Inline_Always.
4442         * adabkend.adb (Scan_Compiler_Arguments): Set both flags to True
4443         on -fno-inline, which disables all inlining in compilers with
4444         an Ada back-end and without back-end inlining support.
4445         * back_end.adb (Scan_Back_End_Switches): Set the Inline related
4446         flag to True on -fno-inline and leave Inline_Always alone for
4447         gcc back-ends.
4448         * back_end.ads (Scan_Compiler_Arguments): Adjust spec wrt the
4449         names of the Opt flags it sets.
4450         * gnat1drv.adb (Adjust_Global_Switches): Remove test on
4451         Opt.Suppress_All_Inlining in the Back_End_Inlining computation.
4452         * sem_prag.adb (Make_Inline): Remove early return conditioned
4453         on Opt.Suppress_All_Inlining.
4454         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Use the flags to
4455         disable the calls to Build_Body_To_Inline otherwise triggered
4456         by pragma Inline or Inline_Always. This will prevent actual
4457         front-end inlining of the subprogram on calls.
4458
4459 2015-02-20  Eric Botcazou  <ebotcazou@adacore.com>
4460
4461         * exp_ch3.adb (Default_Initialize_Object): Call Add_Inlined_Body on the
4462         Abort_Undefer_Direct function.
4463         * exp_ch5.adb (Expand_N_Assignment_Statement): Likewise.
4464         * exp_intr.adb (Expand_Unc_Deallocation): Likewise.
4465         * exp_prag.adb (Expand_Pragma_Abort_Defer): Likewise.
4466         * exp_ch4.adb (Expand_N_Selected_Component): Adjust call to
4467         Add_Inlined_Body.
4468         * exp_ch6.adb (Expand_Call): Adjust calls to Add_Inlined_Body.
4469          Remove call to Register_Backend_Call and move code resetting
4470         Needs_Debug_Info on inlined subprograms to...
4471         * inline.ads (Add_Inlined_Body): Add N parameter.
4472         (Register_Backend_Call): Delete.
4473         * inline.adb (Add_Inlined_Body): ...here and simplify.
4474          Register the call with Backend_Calls directly.
4475         (Register_Backend_Call): Delete.
4476         * s-stalib.ads (Abort_Undefer_Direct): Restore pragma Inline.
4477
4478 2015-02-20  Eric Botcazou  <ebotcazou@adacore.com>
4479
4480         * s-stalib.ads: Fix typo.
4481
4482 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
4483
4484         * exp_ch3.adb (Default_Initialize_Object): If the object has a
4485         delayed freeze, the actions associated with default initialization
4486         must be part of the freeze actions, rather that being inserted
4487         directly after the object declaration.
4488
4489 2015-02-20  Robert Dewar  <dewar@adacore.com>
4490
4491         * lib-load.adb: Minor comment update.
4492
4493 2015-02-20  Vincent Celier  <celier@adacore.com>
4494
4495         * prj-proc.adb (Process_Case_Construction): When there are
4496         incomplete withed projects and the case variable is unknown,
4497         skip the case construction.
4498
4499 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
4500
4501         * exp_ch6.adb (Expand_Actuals): Add caller-side invariant checks
4502         when an actual is a view conversion, either because the call is
4503         to an inherited operation, or because the actual is an explicit
4504         type conversion to an ancestor type.  Fixes ACATS 4.0D: C732001
4505
4506 2015-02-20  Robert Dewar  <dewar@adacore.com>
4507
4508         * einfo.ads: Minor comment updates Fix missing pragma Inline
4509         for Set_Partial_View_Has_Unknown_Discr.
4510         * einfo.adb (Write_Entity_Flags): Add missing entry for
4511         Partial_View_Has_Unknown_Discr.
4512         * sem_ch3.adb: Minor reformatting.
4513
4514 2015-02-20  Vincent Celier  <celier@adacore.com>
4515
4516         * opt.ads: Minor cleanup: remove mention of gprmake.
4517         * s-stalib.ads (Abort_Undefer_Direct): Do not inline.
4518         * s-tataat.adb: Do not call System.Tasking.Self but directly
4519         System.Task_Primitives.Operations.Self.
4520
4521 2015-02-20  Arnaud Charlet  <charlet@adacore.com>
4522
4523         * gnat_rm.texi, gnat_ugn.texi: Now automatically generated from
4524         sphinx in the doc directory.
4525         * doc: New directory containing sphinx versions of gnat_rm and gnat_ugn
4526
4527 2015-02-20  Robert Dewar  <dewar@adacore.com>
4528
4529         * sem_res.adb: Minor reformatting.
4530         * exp_ch9.adb (Build_Protected_Spec): Copy Aliased setting when
4531         building spec.
4532         * sem_ch13.adb (Analyze_Aspect_Specifications): Exclude Boolean
4533         aspects from circuitry setting delay required to false if the
4534         argument is an integer literal.
4535
4536 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
4537
4538         * einfo.ads. einfo.adb (Partial_View_Has_Unknown_Discr):  New flag
4539         on type entities, to enforce AI12-0133: default initialization
4540         of types whose partial view has unknown discriminants does not
4541         get an invariant check, because clients of the unit can never
4542         declare objects of such types.
4543         * sem_ch3.adb (Find_Type_Name); Set new flag
4544         Partial_View_Has_Unknown_Discr when needed.
4545         * exp_ch3.adb (Expand_N_Object_Declaration): Use flag to suppress
4546         generation of invariant call on default-initialized object.
4547
4548 2015-02-08  Eric Botcazou  <ebotcazou@adacore.com>
4549
4550         * gcc-interface/decl.c (gnat_to_gnu_param): Do not strip the padding
4551         if the parameter either is passed by reference or if the alignment
4552         would be lowered.
4553
4554 2015-02-08  Eric Botcazou  <ebotcazou@adacore.com>
4555
4556         * gcc-interface/decl.c (is_cplusplus_method): Use Is_Primitive flag to
4557         detect primitive operations of tagged and untagged types.
4558
4559 2015-02-08  Eric Botcazou  <ebotcazou@adacore.com>
4560
4561         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not bother about alias
4562         sets in presence of derivation for subprogram types.
4563
4564 2015-02-08  Eric Botcazou  <ebotcazou@adacore.com>
4565
4566         * gcc-interface/utils.c (begin_subprog_body): Assert that the body is
4567         present in the same context as the declaration.
4568
4569 2015-02-07  Jakub Jelinek  <jakub@redhat.com>
4570
4571         PR middle-end/64340
4572         * gcc-interface/trans.c (gigi): Recreate optimization_default_node
4573         and optimization_current_node after tweaking global_options.
4574
4575 2015-02-05  Robert Dewar  <dewar@adacore.com>
4576
4577         * prj-proc.adb, sem_aux.adb, exp_ch9.adb, errout.adb, prj-dect.adb,
4578         prj-nmsc.adb: Minor reformatting.
4579
4580 2015-02-05  Ed Schonberg  <schonberg@adacore.com>
4581
4582         * sem_type.adb (Covers): In ASIS_Mode the Corresponding_Record
4583         of a protected type may not be available, so to check conformance
4584         with an interface type, examine the interface list in the type
4585         declaration directly.
4586         (Write_Overloads): Improve information for indirect calls,
4587         for debugger use.
4588
4589 2015-02-05  Ed Schonberg  <schonberg@adacore.com>
4590
4591         * exp_ch3.adb (Make_Tag_Assignment): Do not perform this
4592         expansion activity in ASIS mode.
4593
4594 2015-02-05  Javier Miranda  <miranda@adacore.com>
4595
4596         * errout.adb (Error_Msg_PT): Add missing error.
4597         * sem_ch6.adb (Check_Synchronized_Overriding): Check the missing
4598         RM rule.  Code cleanup.
4599         * exp_ch9.adb (Build_Wrapper_Spec): Propagate "constant" in
4600         anonymous access types.  Found working on the tests. Code cleanup.
4601
4602 2015-02-05  Vincent Celier  <celier@adacore.com>
4603
4604         * prj-dect.adb (Parse_Attribute_Declaration): Continue scanning
4605         when there are incomplete withs.
4606         * prj-nmsc.adb (Process_Naming): Do not try to get the value
4607         of an element when it is nil.
4608         (Check_Naming): Do not check a nil suffix for illegality
4609         * prj-proc.adb (Expression): Do not process an empty term.
4610         * prj-strt.adb (Attribute_Reference): If attribute cannot be
4611         found, parse a possible index to avoid cascading errors.
4612
4613 2015-02-05  Ed Schonberg  <schonberg@adacore.com>
4614
4615         * sem_aux.adb (Is_Derived_Type): A subprogram_type generated
4616         for an access_to_subprogram declaration is not a derived type.
4617
4618 2015-02-05  Robert Dewar  <dewar@adacore.com>
4619
4620         * errout.adb (Error_Msg_Internal): For non-serious error set
4621         Fatal_Error to Ignored.
4622         * lib-load.adb (Load_Unit): Minor comment updates.
4623         * sem_ch10.adb (Analyze_With_Clause): Propagate Fatal_Error
4624         setting from with'ed unit to with'ing unit.
4625         * sem_prag.adb (Analyze_Pragma, case Warnings): Document handling
4626         of ambiguity.
4627
4628 2015-02-05  Yannick Moy  <moy@adacore.com>
4629
4630         * sem_prag.adb, par-prag.adb: Minor code clean up.
4631
4632 2015-02-05  Yannick Moy  <moy@adacore.com>
4633
4634         * par-prag.adb (Pragma_Warnings): Update for extended form
4635         of pragma Warnings. The "one" argument case may now have 2 or
4636         3 arguments.
4637         * sem_prag.adb (Analyze_Pragma/Pragma_Warnings): Update for
4638         extended form of pragma Warnings. Pragma with tool name is either
4639         rewritten as null or as an equivalent form without tool name,
4640         before reanalysis.
4641         * snames.ads-tmpl (Name_Gnatprove): New name.
4642
4643 2015-02-05  Robert Dewar  <dewar@adacore.com>
4644
4645         * sem_ch13.adb (Add_Invariants): Don't assume invariant is
4646         standard Boolean.
4647         * sem_prag.adb (Analyze_Pragma, case Check): Don't assume
4648         condition is standard Boolean, it can be non-standard derived
4649         Boolean.
4650
4651 2015-02-05  Robert Dewar  <dewar@adacore.com>
4652
4653         * checks.adb (Enable_Range_Check): Disconnect attempted
4654         optimization for the case of range check for subscript of
4655         unconstrained array.
4656
4657 2015-02-05  Robert Dewar  <dewar@adacore.com>
4658
4659         * par-ch13.adb (With_Present): New function
4660         (Aspect_Specifications_Present): Handle WHEN in place of WITH
4661         (Get_Aspect_Specifications): Comment update.
4662         * par.adb: Comment updates.
4663
4664 2015-02-05  Robert Dewar  <dewar@adacore.com>
4665
4666         * errout.adb (Handle_Serious_Error): New setting of Fatal_Error.
4667         * frontend.adb (Frontend): New setting of Fatal_Error.
4668         * lib-load.adb (Create_Dummy_Package_Unit): New setting of
4669         Fatal_Error.
4670         (Load_Main_Source): New setting of Fatal_Error
4671         (Load_Unit): New setting of Fatal_Error.
4672         * lib-writ.adb (Add_Preprocessing_Dependency): New setting of
4673         Fatal_Error.
4674         (Ensure_System_Dependency): New setting of Fatal_Error.
4675         * lib.adb (Fatal_Error): New setting of Fatal_Error
4676         (Set_Fatal_Error): New setting of Fatal_Error.
4677         * lib.ads: New definition of Fatal_Error and associated routines.
4678         * par-ch10.adb (P_Compilation_Unit): New setting of Fatal_Error.
4679         * par-load.adb (Load): New setting of Fatal_Error.
4680         * rtsfind.adb (Load_RTU): New setting of Fatal_Error.
4681         * sem_ch10.adb (Analyze_Compilation_Unit): New setting of
4682         Fatal_Error.
4683         (Optional_Subunit): New setting of Fatal_Error.
4684         (Analyze_Proper_Body): New setting of Fatal_Error.
4685         (Load_Needed_Body): New setting of Fatal_Error.
4686
4687 2015-02-05  Ed Schonberg  <schonberg@adacore.com>
4688
4689         * sem_res.adb (Resolve_Call): If the function being called has
4690         out parameters do not check for language version if the function
4691         comes from a predefined unit, as those are always compiled in
4692         Ada 2012 mode.
4693
4694 2015-02-05  Ed Schonberg  <schonberg@adacore.com>
4695
4696         * sem_ch3.adb (Process_Full_View): Verify that the full view
4697         of a type extension must carry an explicit limited keyword if
4698         the partial view does (RM 7.3 (10.1)).
4699
4700 2015-02-05  Robert Dewar  <dewar@adacore.com>
4701
4702         * g-rannum.adb, g-rannum.ads, s-rannum.adb, s-rannum.ads,
4703         sem_warn.ads: Minor reformatting.
4704         * exp_ch13.adb (Expand_N_Freeze_Entity): Add guard for aspect
4705         deleted by -gnatI.
4706         * sem_prag.adb (Analyze_Pragma, case Type_Invariant): Give
4707         error for abstract type.
4708
4709 2015-02-05  Yannick Moy  <moy@adacore.com>
4710
4711         * opt.ads (Warn_On_Suspicious_Contract): Update comment
4712         describing use.
4713         * sem_attr.adb (Analyze_Attribute/Attribute_Update): Warn on
4714         suspicious uses of 'Update.
4715         * sem_warn.adb, sem_warn.ads (Warn_On_Suspicious_Update): New
4716         function issues warning on suspicious uses of 'Update.
4717         * g-rannum.adb, g-rannum.ads, s-rannum.adb, s-rannum.ads: Mark
4718         package spec and body as SPARK_Mode Off.
4719
4720 2015-02-05  Robert Dewar  <dewar@adacore.com>
4721
4722         * sem_prag.adb (Set_Elab_Unit_Name): New name for Set_Unit_Name
4723         (Analyze_Pragma): Change Set_Unit_Name to Set_Elab_Unit_Name
4724         (Set_Elab_Unit_Name): Generate reference for Elaborate[_All]
4725         * sem_warn.adb (Warn_On_Unreferenced_Entity): Suppress warning
4726         for exported entity.
4727
4728 2015-02-05  Hristian Kirtchev  <kirtchev@adacore.com>
4729
4730         * sem_prag.adb (Check_Pragma_Conformance): Add
4731         local variable Arg. Ensure that all errors are associated with
4732         the pragma if it appears without an argument. Add comments on
4733         various cases.
4734
4735 2015-02-05  Robert Dewar  <dewar@adacore.com>
4736
4737         * lib-xref.adb: Minor reformatting.
4738
4739 2015-02-05  Tristan Gingold  <gingold@adacore.com>
4740
4741         PR ada/64349
4742         * env.c: Fix thinko: handle Darwin case before default one.
4743
4744 2015-01-30  Robert Dewar  <dewar@adacore.com>
4745
4746         * a-assert.adb: Minor reformatting.
4747         * sem_ch13.adb: Minor comment clarification.
4748         * types.ads: Minor comment update.
4749         * sem_eval.adb (Real_Or_String_Static_Predicate_Matches): Avoid blow up
4750         when we have a predicate that is nothing but an inherited dynamic
4751         predicate.
4752
4753 2015-01-30  Jerome Guitton  <guitton@adacore.com>
4754
4755         * gcc-interface/Makefile.in (x86-vxworks): Update GCC_SPEC_FILES to
4756         include cert link spec.
4757
4758 2015-01-30  Robert Dewar  <dewar@adacore.com>
4759
4760         * einfo.ads: Minor comment fix.
4761         * freeze.adb (Freeze_Profile): Add test for suspicious import
4762         in pure unit.
4763         * sem_prag.adb (Process_Import_Or_Interface): Test for suspicious
4764         use in Pure unit is now moved to Freeze (to properly catch
4765         Pure_Function exemption).
4766
4767 2015-01-30  Bob Duff  <duff@adacore.com>
4768
4769         * sem_res.ads: Minor comment fix.
4770         * sem_type.adb: sem_type.adb (Remove_Conversions): Need to
4771         check both operands of an operator.
4772
4773 2015-01-30  Yannick Moy  <moy@adacore.com>
4774
4775         * a-assert.ads, a-assert.adb: Mark package spec in SPARK. Set assertion
4776         policy for Pre to Ignore.
4777         (Assert): Add precondition.
4778
4779 2015-01-30  Robert Dewar  <dewar@adacore.com>
4780
4781         * sem_prag.adb (Process_Import_Or_Interface): Warn if used in
4782         Pure unit.
4783         * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Clarify
4784         documentation for some special cases of invalid attempts at
4785         based integers.
4786
4787 2015-01-30  Gary Dismukes  <dismukes@adacore.com>
4788
4789         * errout.ads: Minor reformatting.
4790
4791 2015-01-30  Yannick Moy  <moy@adacore.com>
4792
4793         * inline.adb (Process_Formals): Use the sloc of
4794         the inlined node instead of the sloc of the actual parameter,
4795         when replacing formal parameters by the actual one.
4796
4797 2015-01-30  Arnaud Charlet  <charlet@adacore.com>
4798
4799         * g-expect.adb (Get_Command_Output): Use infinite timeout when
4800         calling Expect.
4801
4802 2015-01-30  Ed Schonberg  <schonberg@adacore.com>
4803
4804         * sem_ch12.adb (Analyze_Associations): If an in-parameter is
4805         defaulted in an instantiation, add an entry in the list of actuals
4806         to indicate the default value of the formal (as is already done
4807         for defaulted subprograms).
4808
4809 2015-01-30  Javier Miranda  <miranda@adacore.com>
4810
4811         * errout.adb (Error_Msg_PT): Minor error phrasing update.
4812
4813 2015-01-30  Robert Dewar  <dewar@adacore.com>
4814
4815         * sem_warn.adb (Warn_On_Known_Condition): Improve error message
4816         for object case.
4817
4818 2015-01-30  Pierre-Marie de Rodat  <derodat@adacore.com>
4819
4820         * exp_dbug.adb (Get_Encoded_Name): When
4821         -fgnat-encodings=minimal, do not generate names for biased types.
4822
4823 2015-01-30  Tristan Gingold  <gingold@adacore.com>
4824
4825         PR ada/64349
4826         * env.c: Move vxworks and darwin includes out of #ifdef IN_RTS.
4827
4828 2015-01-30  Gary Dismukes  <dismukes@adacore.com>
4829
4830         * freeze.adb: Minor reformatting.
4831
4832 2015-01-30  Javier Miranda  <miranda@adacore.com>
4833
4834         * errout.ads (Error_Msg_PT): Replace Node_Id by Entity_Id and
4835         improve its documentation.
4836         * errout.adb (Error_Msg_PT): Improve the error message.
4837         * sem_ch6.adb (Check_Conformance): Update call to Error_Msg_PT.
4838         (Check_Synchronized_Overriding): Update call to Error_Msg_PT.
4839         * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup.
4840
4841 2015-01-30  Robert Dewar  <dewar@adacore.com>
4842
4843         * sem_warn.adb (Warn_On_Known_Condition): Do special casing of
4844         message for False case.
4845
4846 2015-01-30  Doug Rupp  <rupp@adacore.com>
4847
4848         * s-vxwext-kernel.ads (Task_Cont): Remove imported subprogram body.
4849         * s-vxwext-kernel.adb (Task_Cont): New subpprogram body specialized for
4850         kernel.
4851
4852 2015-01-30  Gary Dismukes  <dismukes@adacore.com>
4853
4854         * sem_attr.adb (Declared_Within_Generic_Unit):
4855         New function to test whether an entity is declared within the
4856         declarative region of a given generic unit.
4857         (Resolve_Attribute): For checking legality of subprogram'Access within
4858         a generic unit, call new Boolean function Declared_Within_Generic_Unit
4859         instead of simply comparing the results of Enclosing_Generic_Unit on
4860         the prefix and access type.  Correct minor comment typos.
4861
4862 2015-01-30  Robert Dewar  <dewar@adacore.com>
4863
4864         * freeze.adb, exp_util.ads: Update comment.
4865         * exp_util.adb, exp_ch3.adb: Minor code reorganization and reformatting.
4866         * sem_util.adb: Minor: fix typo.
4867
4868 2015-01-30  Hristian Kirtchev  <kirtchev@adacore.com>
4869
4870         * sem_attr.adb (Analyze_Attribute): Ensure that
4871         the check concerning Refined_Post takes precedence over the
4872         other cases.
4873
4874 2015-01-30  Gary Dismukes  <dismukes@adacore.com>
4875
4876         * sem_prag.adb: Minor typo fixes and reformatting.
4877
4878 2015-01-30  Yannick Moy  <moy@adacore.com>
4879
4880         * sem_attr.adb: Code clean up.
4881
4882 2015-01-30  Robert Dewar  <dewar@adacore.com>
4883
4884         * ali.adb (Scan_ALI): Set Serious_Errors flag in Unit record.
4885         * ali.ads (Unit_Record): Add new field Serious_Errors.
4886         * lib-writ.adb (Write_Unit_Information): Set SE (serious errors)
4887         attribute in U line.
4888         * lib-writ.ads: New attribute SE (serious erors) in unit line.
4889
4890 2015-01-30  Hristian Kirtchev  <kirtchev@adacore.com>
4891
4892         * einfo.adb Update the usage of attributes Entry_Bodies_Array,
4893         Lit_Indexes, Scale_Value, Storage_Size_Variable,
4894         String_Literal_Low_Bound along associated routines and
4895         Write_FieldX_Name.
4896         (Pending_Access_Types): New routine.
4897         (Set_Pending_Access_Types): New routine.
4898         (Write_Field15_Name): Add an entry for Pending_Access_Types.
4899         * einfo.ads Add new attribute Pending_Access_Types along
4900         with usage in nodes.  Update the usage of attributes
4901         Entry_Bodies_Array, Lit_Indexes, Scale_Value,
4902         Storage_Size_Variable, String_Literal_Low_Bound.
4903         (Pending_Access_Types): New routine along with pragma Inline.
4904         (Set_Pending_Access_Types): New routine along with pragma Inline.
4905         * exp_ch3.adb (Expand_Freeze_Array_Type): Add new local variable
4906         Ins_Node. Determine the insertion node for anonynous access type
4907         that acts as a component type of an array. Update the call to
4908         Build_Finalization_Master.
4909         (Expand_Freeze_Record_Type): Update
4910         the calls to Build_Finalization_Master.
4911         (Freeze_Type): Remove
4912         local variable RACW_Seen. Factor out the code that deals with
4913         remote access-to-class-wide types. Create a finalization master
4914         when the designated type contains a private component. Fully
4915         initialize all pending access types.
4916         (Process_RACW_Types): New routine.
4917         (Process_Pending_Access_Types): New routine.
4918         * exp_ch4.adb (Expand_Allocator_Expression): Allocation no longer
4919         needs to set primitive Finalize_Address.
4920         (Expand_N_Allocator): Allocation no longer sets primitive
4921         Finalize_Address.
4922         * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
4923         Update the call to Build_Finalization_Master.
4924         (Make_Build_In_Place_Call_In_Allocator): Allocation no longer
4925         needs to set primitive Finalize_Address.
4926         * exp_ch7.adb (Add_Pending_Access_Type): New routine.
4927         (Build_Finalization_Master): New parameter profile. Associate
4928         primitive Finalize_Address with the finalization master if the
4929         designated type has been frozen, otherwise treat the access
4930         type as pending. Simplify the insertion of the master and
4931         related initialization code.
4932         (Make_Finalize_Address_Body): Allow Finalize_Address for class-wide
4933         abstract types.
4934         (Make_Set_Finalize_Address_Call): Remove forlam parameter Typ.
4935         Simplify the implementation.
4936         * exp_ch7.ads (Build_Finalization_Master): New parameter profile
4937         along with comment on usage.
4938         (Make_Set_Finalize_Address_Call): Remove formal parameter Typ. Update
4939         the comment on usage.
4940         * exp_util.adb (Build_Allocate_Deallocate_Proc): Use routine
4941         Finalize_Address to retrieve the primitive.
4942         (Finalize_Address): New routine.
4943         (Find_Finalize_Address): Removed.
4944         * exp_util.ads (Finalize_Address): New routine.
4945         * freeze.adb (Freeze_All): Remove the generation of finalization
4946         masters.
4947         * sem_ch3.adb (Analyze_Full_Type_Declaration): Propagate any
4948         pending access types from the partial to the full view.
4949
4950 2015-01-30  Robert Dewar  <dewar@adacore.com>
4951
4952         * sem_disp.adb: Minor reformatting.
4953         * sem_disp.ads: Documentation update.
4954
4955 2015-01-30  Ed Schonberg  <schonberg@adacore.com>
4956
4957         * sem_disp.adb (Is_Dynamically_Tagged): when applied to an entity
4958         or a function call, return True if type is class-wide.
4959         * sem_res.adb (Resolve_Case_Expression, Resolve_If_Expression);
4960         Apply RM 4.5.7 (17/3): all or none of the dependent expression
4961         of a conditional expression must be dynamically tagged.
4962
4963 2015-01-30  Ed Schonberg  <schonberg@adacore.com>
4964
4965         * sem_ch6.adb (Analyze_Function_Return): In an extended return
4966         statement, apply accessibility check to result object when there
4967         is no initializing expression (Ada 2012 RM 6.5 (5.4/3))
4968
4969 2015-01-30  Robert Dewar  <dewar@adacore.com>
4970
4971         * sem_ch4.adb (Analyze_If_Expression): Allow for non-standard
4972         Boolean for case where ELSE is omitted.
4973         * sem_res.adb: Minor reformatting.
4974
4975 2015-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4976
4977         Fix build under cygwin/64.
4978         * adaint.h: Add check for __CYGWIN__.
4979         * mingw32.h: Prevent windows.h from including x86intrin.h in GCC.
4980
4981 2015-01-19  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4982
4983         PR ada/64640
4984         * adaint.c: Handle __CYGWIN__ like __MINGW32__ here.
4985         * mingw32.h: Don't include <tchar.h> under cygwin.
4986         (_O_U8TEXT, _O_U16TEXT, _O_WTEXT): Set to _O_TEXT if not yet defined.
4987
4988 2015-01-15  Thomas Schwinge  <thomas@codesourcery.com>
4989
4990         * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8)
4991         (DEF_FUNCTION_TYPE_VAR_12): New macros.
4992
4993 2015-01-09  Michael Collison  <michael.collison@linaro.org>
4994
4995         * gcc-interface/cuintp.c: Include hash-set.h, machmode.h,
4996         vec.h, double-int.h, input.h, alias.h, symtab.h,
4997         fold-const.h, wide-int.h, and inchash.h due to
4998         flattening of tree.h.
4999         * gcc-interface/decl.c: Ditto.
5000         * gcc-interface/misc.c: Ditto.
5001         * gcc-interface/targtyps.c: Include hash-set.h, machmode.h,
5002         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h,
5003         fold-const.h, wide-int.h, and inchash.h due to
5004         flattening of tree.h.
5005         * gcc-interface/trans.c: Include hash-set.h, machmode.h,
5006         vec.h, double-int.h, input.h, alias.h, symtab.h, real.h,
5007         fold-const.h, wide-int.h, inchash.h due to
5008         flattening of tree.h.
5009         * gcc-interface/utils.c: Include hash-set.h, machmode.h,
5010         vec.h, double-int.h, input.h, alias.h, symtab.h,
5011         fold-const.h, wide-int.h, and inchash.h due to
5012         flattening of tree.h.
5013         * gcc-interface/utils2.c: Ditto.
5014
5015 2015-01-07  Robert Dewar  <dewar@adacore.com>
5016
5017         * sem_warn.adb (Check_One_Unit): Don't give unused entities
5018         warning for a package which is used as a generic parameter.
5019
5020 2015-01-07  Bob Duff  <duff@adacore.com>
5021
5022         * usage.adb (Usage): Correct documentation of
5023         -gnatw.f switches.
5024
5025 2015-01-07  Robert Dewar  <dewar@adacore.com>
5026
5027         * s-fileio.adb: Minor reformatting.
5028
5029 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
5030
5031         * sem_ch12.adb (Instantiate_Object): If formal is an anonymous
5032         access to subprogram, replace its formals with new entities when
5033         building the object declaration, both if actual is present and
5034         when it is defaulted.
5035
5036 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
5037
5038         * sem_ch5.adb (Analyze_Assignment): If left-hand side is a view
5039         conversion and type of expression has invariant, apply invariant
5040         check on expression.
5041
5042 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
5043
5044         * sem_ch3.adb (Create_Constrained_Components): A call to
5045         Gather_Components may detect an error if an inherited discriminant
5046         that controls a variant is non-static.
5047         * sem_aggr.adb (Resolve_Record_Aggregate, Step 5): The call to
5048         Gather_Components may report an error if an inherited discriminant
5049         in a variant in non-static.
5050         * sem_util.adb (Gather_Components): If a non-static discriminant
5051         is inherited do not report error here, but let caller handle it.
5052         (Find_Actual): Small optimization.
5053
5054 2015-01-07  Bob Duff  <duff@adacore.com>
5055
5056         * usage.adb (Usage): Document -gnatw.f switch.
5057
5058 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
5059
5060         * sem_ch12.adb: Code clean up and minor reformatting.
5061
5062 2015-01-07  Robert Dewar  <dewar@adacore.com>
5063
5064         * exp_ch4.adb (Expand_N_Type_Conversion): Add guard for
5065         Raise_Accessibility_Error call.
5066         * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Add documentation
5067         on handling of invalid digits in based constants.
5068         * s-fatgen.ads: Minor reformatting.
5069         * sem_attr.adb (Analyze_Attribute, case Unrestricted_Access):
5070         Avoid noting bogus modification for Valid test.
5071         * snames.ads-tmpl (Name_Attr_Long_Float): New Name.
5072         * einfo.ads: Minor reformatting.
5073         * sem_warn.adb: Minor comment clarification.
5074         * sem_ch12.adb: Minor reformatting.
5075
5076 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
5077
5078         * exp_ch5.adb (Expand_Predicated_Loop): Handle properly loops
5079         over static predicates when the loop parameter specification
5080         carries a Reverse indicator.
5081
5082 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
5083
5084         * sem_ch12.adb (Instantiate_Object): If formal has a default,
5085         actual is missing and formal has an anonymous access type, copy
5086         access definition in full so that tree for instance is properly
5087         formatted for ASIS use.
5088
5089 2015-01-07  Bob Duff  <duff@adacore.com>
5090
5091         * sem_elab.adb (Check_Internal_Call_Continue): Give a warning
5092         for P'Access, where P is a subprogram in the same package as
5093         the P'Access, and the P'Access is evaluated at elaboration
5094         time, and occurs before the body of P. For example, "X : T :=
5095         P'Access;" would allow a subsequent call to X.all to be an
5096         access-before-elaboration error; hence the warning. This warning
5097         is enabled by the -gnatw.f switch.
5098         * opt.ads (Warn_On_Elab_Access): New flag for warning switch.
5099         * warnsw.adb (Set_Dot_Warning_Switch): Set Warn_On_Elab_Access.
5100         * gnat_ugn.texi: Document the new warning.
5101
5102 2015-01-07  Johannes Kanig  <kanig@adacore.com>
5103
5104         * lib-xref-spark_specific.adb (Collect_SPARK_Xrefs): Skip unneeded
5105         cross ref files.
5106
5107 2015-01-07  Robert Dewar  <dewar@adacore.com>
5108
5109         * s-taprop-linux.adb, clean.adb: Minor reformatting.
5110
5111 2015-01-07  Arnaud Charlet  <charlet@adacore.com>
5112
5113         * s-tassta.adb: Relax some overzealous assertions.
5114
5115 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
5116
5117         * sem_ch6.adb (Analyze_Return_Type): An call that returns a limited
5118         view of a type is legal when context is a thunk generated for
5119         operation inherited from an interface.
5120         * exp_ch6.adb (Expand_Simple_Function_Return): If context is
5121         a thunk and return type is an incomplete type do not continue
5122         expansion; thunk will be fully elaborated when generating code.
5123
5124 2015-01-07  Doug Rupp  <rupp@adacore.com>
5125
5126         * s-osinte-mingw.ads (LARGE_INTEGR): New subtype.
5127         (QueryPerformanceFrequency): New imported procedure.
5128         * s-taprop-mingw.adb (RT_Resolution): Call above and return
5129         resolution vice a hardcoded value.
5130         * s-taprop-solaris.adb (RT_Resolution): Call clock_getres and return
5131         resolution vice a hardcoded value.
5132         * s-linux-android.ads (clockid_t): New subtype.
5133         * s-osinte-aix.ads (clock_getres): New imported subprogram.
5134         * s-osinte-android.ads (clock_getres): Likewise.
5135         * s-osinte-freebsd.ads (clock_getres): Likewise.
5136         * s-osinte-solaris-posix.ads (clock_getres): Likewise.
5137         * s-osinte-darwin.ads (clock_getres): New subprogram.
5138         * s-osinte-darwin.adb (clock_getres): New subprogram.
5139         * thread.c (__gnat_clock_get_res) [__APPLE__]: New function.
5140         * s-taprop-posix.adb (RT_Resolution): Call clock_getres to
5141         calculate resolution vice hard coded value.
5142
5143 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
5144
5145         * exp_util.adb (Make_CW_Equivalent_Type): If root type is a
5146         limited view, use non-limited view when available to create
5147         equivalent record type.
5148
5149 2015-01-07  Vincent Celier  <celier@adacore.com>
5150
5151         * gnatcmd.adb: Remove command Sync and any data and processing
5152         related to this command. Remove project processing for gnatstack.
5153         * prj-attr.adb: Remove package Synchonize and its attributes.
5154
5155 2015-01-07  Vincent Celier  <celier@adacore.com>
5156
5157         * clean.adb: Minor error message change.
5158
5159 2015-01-07  Tristan Gingold  <gingold@adacore.com>
5160
5161         PR ada/64349  
5162         * env.c (__gnat_environ): Adjust for darwin9/darwin10.
5163
5164 2015-01-07  Javier Miranda  <miranda@adacore.com>
5165
5166         * sem_ch10.adb (Analyze_With_Clause): Compiling under -gnatq
5167         protect the frontend against never ending recursion caused by
5168         circularities in the sources.
5169
5170 2015-01-07  Robert Dewar  <dewar@adacore.com>
5171
5172         * a-reatim.adb, make.adb, exp_pakd.adb, i-cpoint.adb, sem_ch8.adb,
5173         exp_ch3.adb: Minor reformatting.
5174
5175 2015-01-07  Doug Rupp  <rupp@adacore.com>
5176
5177         * s-linux.ads (clockid_t): New subtype.
5178         * s-osinte-linux.ads (pragma Linker Options): Add -lrt.
5179         (clockid_t): New subtype.
5180         (clock_getres): Import system call.
5181         * s-taprop-linux.adb (System.OS_Constants): With and rename.
5182         (RT_Resolution): Remove
5183         hardcoded value and call clock_getres.
5184         * s-linux-sparc.ads, s-linux-mipsel.ads, s-linux-hppa.ads,
5185         s-linux-alpha.ads, s-linux-x32.ads (clockid_t): Add new subtype.
5186
5187 2015-01-07  Robert Dewar  <dewar@adacore.com>
5188
5189         * sem_warn.adb (Check_One_Unit): Guard against context item
5190         with no Entity field.
5191
5192 2015-01-07  Vincent Celier  <celier@adacore.com>
5193
5194         * clean.adb (Gnatclean): Warn that 'gnatclean -P' is obsolete.
5195         * make.adb (Initialize): Warn that 'gnatmake -P' is obsolete.
5196
5197 2015-01-07  Vincent Celier  <celier@adacore.com>
5198
5199         * prj-conf.adb (Parse_Project_And_Apply_Config): Always finalize
5200         errors/warnings in the first parsing of the project files,
5201         to display the warnings when there is no errors.
5202
5203 2015-01-07  Tristan Gingold  <gingold@adacore.com>
5204
5205         * i-cpoint.adb (Copy_Terminated_Array): Nicely handle null target.
5206
5207 2015-01-07  Doug Rupp  <rupp@adacore.com>
5208
5209         * s-taprop-vxworks.adb (Stop_All_Tasks): Pass return
5210         value from Int_Lock as parameter to Int_Unlock.
5211         * s-osinte-vxworks.ads (Int_Unlock): Add parameter.
5212         * s-vxwext.ads (Int_Unlock): Likewise.
5213         * s-vxwext-kernel.adb (intUnlock, Int_Unlock): Likewise.
5214         * s-vxwext-kernel.ads (Int_Unlock): Likewise.
5215         * s-vxwext-rtp.adb (Int_Unlock): Likewise.
5216         * s-vxwext-rtp.ads (Int_Unlock): Likewise.
5217
5218 2015-01-07  Pierre-Marie de Rodat  <derodat@adacore.com>
5219
5220         * exp_pakd.adb: Add a comment in exp_pakd.adb to explain why we
5221         keep ___XP suffixes
5222
5223 2015-01-07  Tristan Gingold  <gingold@adacore.com>
5224
5225         * i-cpoint.adb (Copy_Terminated_Array): Use Copy_Array to
5226         handle overlap.
5227
5228 2015-01-07  Eric Botcazou  <ebotcazou@adacore.com>
5229
5230         * sem_ch3.adb (Analyze_Full_Type_Declaration): Do not
5231         automatically set No_Strict_Aliasing on access types.
5232         * fe.h (No_Strict_Aliasing_CP): Declare.
5233         * gcc-interface/trans.c (gigi): Force flag_strict_aliasing to 0 if
5234         No_Strict_Aliasing_CP is set.
5235
5236 2015-01-07  Johannes Kanig  <kanig@adacore.com>
5237
5238         * sem_ch8.adb (Analyze_Subprogram_Renaming) do
5239         not build function wrapper in gnatprove mode when the package
5240         is externally axiomatized.
5241
5242 2015-01-07  Jose Ruiz  <ruiz@adacore.com>
5243
5244         * a-reatim.adb (Time_Of): Reduce the number of spurious overflows in
5245         intermediate computations when the parameters have different signs.
5246
5247 2015-01-07  Javier Miranda  <miranda@adacore.com>
5248
5249         * exp_ch3.adb (Build_Init_Procedure): For derived types,
5250         improve the code which takes care of identifying and moving to
5251         the beginning of the init-proc the call to the init-proc of the
5252         parent type.
5253
5254 2015-01-07  Olivier Hainque  <hainque@adacore.com>
5255
5256         * gcc-interface/trans.c (gnat_to_gnu, <N_Expression_With_Action>):
5257         Elaborate the expression as part of the same stmt group as the actions.
5258
5259 2015-01-07  Robert Dewar  <dewar@adacore.com>
5260
5261         * sem_ch3.adb: Minor error message change.
5262
5263 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
5264
5265         * sem_prag.adb (Analyze_Pragma, case Preelaborable_Initialization):
5266         Following AI05-028, the pragam applies legally to any composite type.
5267
5268 2015-01-07  Arnaud Charlet  <charlet@adacore.com>
5269
5270         * s-osinte-vxworks.adb, s-osinte-vxworks.ads
5271         (sigwait, sigwaitinfo): Removed, not needed after all on any
5272         VxWorks configurations.
5273
5274 2015-01-07  Robert Dewar  <dewar@adacore.com>
5275
5276         * sem_ch3.adb, freeze.adb, exp_disp.adb: Minor reformatting.
5277
5278 2015-01-07  Javier Miranda  <miranda@adacore.com>
5279
5280         * exp_disp.adb (Expand_Interface_Conversion): Adding missing
5281         generation of accessibility check.
5282
5283 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
5284
5285         * sem_ch3.adb (Derived_Type_Declaration): In the case of an
5286         illegal completion from a class- wide type, set etype of the
5287         derived type properly to prevent cascaded errors.
5288
5289 2015-01-07  Robert Dewar  <dewar@adacore.com>
5290
5291         * prj.ads, i-cpoint.adb, freeze.adb, ghost.adb, prj-err.adb: Minor
5292         reformatting.
5293
5294 2015-01-07  Robert Dewar  <dewar@adacore.com>
5295
5296         * restrict.adb (Check_Restriction_No_Use_Of_Attribute):
5297         New procedure.
5298         (OK_No_Use_Of_Entity_Name): New function.
5299         (Set_Restriction_No_Use_Of_Entity): New procedure.
5300         * restrict.ads (Check_Restriction_No_Use_Of_Attribute):
5301         New procedure.
5302         (OK_No_Use_Of_Entity_Name): New function.
5303         (Set_Restriction_No_Use_Of_Entity): New procedure.
5304         * sem_ch8.adb (Find_Direct_Name): Add check for violation of
5305         No_Use_Of_Entity.
5306         * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
5307         Add processing for new restriction No_Use_Of_Entity.
5308
5309 2015-01-07  Eric Botcazou  <ebotcazou@adacore.com>
5310
5311         * freeze.adb (Freeze_Array_Type): Apply same handling to Is_Atomic
5312         component type as to Has_Atomic_Components type.  Remove useless
5313         test on Is_Aliased component type.
5314
5315 2015-01-07  Hristian Kirtchev  <kirtchev@adacore.com>
5316
5317         * alloc.ads Alphabetize several declarations. Add constants
5318         Ignored_Ghost_Units_Initial and Ignored_Ghost_Units_Increment.
5319         * atree.adb Add with and use clauses for Opt.
5320         (Allocate_Initialize_Node): Mark a node as ignored Ghost
5321         if it is created in an ignored Ghost region.
5322         (Ekind_In): New variant.
5323         (Is_Ignored_Ghost_Node): New routine.
5324         (Set_Is_Ignored_Ghost_Node): New routine.
5325         * atree.adb Aplhabetize several subprograms declarations. Flag
5326         Spare0 is now known as Is_Ignored_Ghost_Node.
5327         (Ekind_In): New variant.
5328         (Is_Ignored_Ghost_Node): New routine.
5329         (Set_Is_Ignored_Ghost_Node): New routine.
5330         * einfo.adb: Flag 279 is now known as Contains_Ignored_Ghost_Code.
5331         (Contains_Ignored_Ghost_Code): New routine.
5332         (Set_Contains_Ignored_Ghost_Code): New routine.
5333         (Set_Is_Checked_Ghost_Entity, Set_Is_Ignored_Ghost_Entity):
5334         It is now possible to set this property on an unanalyzed entity.
5335         (Write_Entity_Flags): Output the status of flag
5336         Contains_Ignored_Ghost_Code.
5337         * einfo.ads New attribute Contains_Ignored_Ghost_Code along with
5338         usage in nodes.
5339         (Contains_Ignored_Ghost_Code): New routine
5340         along with pragma Inline.
5341         (Set_Contains_Ignored_Ghost_Code): New routine along with pragma Inline.
5342         * exp_ch3.adb Add with and use clauses for Ghost.
5343         (Freeze_Type): Capture/restore the value of Ghost_Mode on entry/exit.
5344         Set the Ghost_Mode in effect.
5345         (Restore_Globals): New routine.
5346         * exp_ch7.adb (Process_Declarations): Do not process a context
5347         that invoves an ignored Ghost entity.
5348         * exp_dbug.adb (Qualify_All_Entity_Names): Skip an ignored Ghost
5349         construct that has been rewritten as a null statement.
5350         * exp_disp.adb Add with and use clauses for Ghost.
5351         (Make_DT): Capture/restore the value of Ghost_Mode on entry/exit. Set
5352         the Ghost_Mode in effect.
5353         (Restore_Globals): New routine.
5354         * exp_util.adb (Requires_Cleanup_Actions): An ignored Ghost entity
5355         does not require any clean up. Add two missing cases that deal
5356         with block statements.
5357         * freeze.adb Add with and use clauses for Ghost.
5358         (Freeze_Entity): Capture/restore the value of Ghost_Mode on entry/exit.
5359         Set the Ghost_Mode in effect.
5360         (Restore_Globals): New routine.
5361         * frontend.adb Add with and use clauses for Ghost. Remove any
5362         ignored Ghost code from all units that qualify.
5363         * ghost.adb New unit.
5364         * ghost.ads New unit.
5365         * gnat1drv.adb Add with clause for Ghost. Initialize and lock
5366         the table in package Ghost.
5367         * lib.ads: Alphabetize several subprogram declarations.
5368         * lib-xref.adb (Output_References): Do not generate reference
5369         information for ignored Ghost entities.
5370         * opt.ads Add new type Ghost_Mode_Type and new global variable
5371         Ghost_Mode.
5372         * rtsfind.adb (Load_RTU): Provide a clean environment when
5373         loading a runtime unit.
5374         * sem.adb (Analyze): Capture/restore the value of Ghost_Mode on
5375         entry/exit as the node may set a different mode.
5376         (Do_Analyze):
5377         Capture/restore the value of Ghost_Mode on entry/exit as the
5378         unit may be withed from a unit with a different Ghost mode.
5379         * sem_ch3.adb Add with and use clauses for Ghost.
5380         (Analyze_Full_Type_Declaration, Analyze_Incomplete_Type_Decl,
5381         Analyze_Number_Declaration, Analyze_Private_Extension_Declaration,
5382         Analyze_Subtype_Declaration): Set the Ghost_Mode in effect. Mark
5383         the entity as Ghost when there is a Ghost_Mode in effect.
5384         (Array_Type_Declaration): The implicit base type inherits the
5385         "ghostness" from the array type.
5386         (Derive_Subprogram): The
5387         alias inherits the "ghostness" from the parent subprogram.
5388         (Make_Implicit_Base): The implicit base type inherits the
5389         "ghostness" from the parent type.
5390         * sem_ch5.adb Add with and use clauses for Ghost.
5391         (Analyze_Assignment): Set the Ghost_Mode in effect.
5392         * sem_ch6.adb Add with and use clauses for Ghost.
5393         (Analyze_Abstract_Subprogram_Declaration, Analyze_Procedure_Call,
5394         Analyze_Subprogram_Body_Helper, Analyze_Subprogram_Declaration):
5395         Set the Ghost_Mode in effect. Mark the entity as Ghost when
5396         there is a Ghost_Mode in effect.
5397         * sem_ch7.adb Add with and use clauses for Ghost.
5398         (Analyze_Package_Body_Helper, Analyze_Package_Declaration,
5399         Analyze_Private_Type_Declaration): Set the Ghost_Mode in
5400         effect. Mark the entity as Ghost when there is a Ghost_Mode
5401         in effect.
5402         * sem_ch8.adb Add with and use clauses for Ghost.
5403         (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
5404         Analyze_Object_Renaming, Analyze_Package_Renaming,
5405         Analyze_Subprogram_Renaming): Set the Ghost_Mode in effect. Mark
5406         the entity as Ghost when there is a Ghost_Mode in effect.
5407         (Find_Type): Check the Ghost context of a type.
5408         * sem_ch11.adb Add with and use clauses for Ghost.
5409         (Analyze_Exception_Declaration): Set the Ghost_Mode in
5410         effect. Mark the entity as Ghost when there is a Ghost_Mode
5411         in effect.
5412         * sem_ch12.adb Add with and use clauses for Ghost.
5413         (Analyze_Generic_Package_Declaration,
5414         Analyze_Generic_Subprogram_Declaration): Set the Ghost_Mode in effect.
5415         Mark the entity as Ghost when there is a Ghost_Mode in effect.
5416         * sem_prag.adb Add with and use clauses for Ghost.
5417         (Analyze_Pragma): Ghost-related checks are triggered when there
5418         is a Ghost mode in effect.
5419         (Create_Abstract_State): Mark the
5420         entity as Ghost when there is a Ghost_Mode in effect.
5421         * sem_res.adb Add with and use clauses for Ghost.
5422         (Check_Ghost_Context): Removed.
5423         * sem_util.adb (Check_Ghost_Completion): Removed.
5424         (Check_Ghost_Derivation): Removed.
5425         (Incomplete_Or_Partial_View):
5426         Add a guard in case the entity has not been analyzed yet
5427         and does carry a scope.
5428         (Is_Declaration): New routine.
5429         (Is_Ghost_Entity): Removed.
5430         (Is_Ghost_Statement_Or_Pragma):
5431         Removed.
5432         (Is_Subject_To_Ghost): Removed.
5433         (Set_Is_Ghost_Entity):
5434         Removed.
5435         (Within_Ghost_Scope): Removed.
5436         * sem_util.adb (Check_Ghost_Completion): Removed.
5437         (Check_Ghost_Derivation): Removed.
5438         (Is_Declaration): New routine.
5439         (Is_Ghost_Entity): Removed.
5440         (Is_Ghost_Statement_Or_Pragma): Removed.
5441         (Is_Subject_To_Ghost): Removed.
5442         (Set_Is_Ghost_Entity): Removed.
5443         (Within_Ghost_Scope): Removed.
5444         * sinfo.ads Add a section on Ghost mode.
5445         * treepr.adb (Print_Header_Flag): New routine.
5446         (Print_Node_Header): Factor out code. Output flag
5447         Is_Ignored_Ghost_Node.
5448         * gcc-interface/Make-lang.in: Add dependency for unit Ghost.
5449
5450 2015-01-06  Eric Botcazou  <ebotcazou@adacore.com>
5451
5452         * freeze.adb (Freeze_Array_Type) <Complain_CS>: Remove always
5453         true test and unreachable 'else' arm.
5454
5455 2015-01-06  Vincent Celier  <celier@adacore.com>
5456
5457         * prj-conf.adb (Check_Target): Improve error message when
5458         there are mismatched targets between the on in the configuration
5459         project file and the specified one, either in the main project
5460         file or in the --target= switch.
5461
5462 2015-01-06  Pascal Obry  <obry@adacore.com>
5463
5464         * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Mode and
5465         Install_Name attribute definitions.
5466
5467 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
5468
5469         * freeze.adb (Wrap_Imported_Subprogram): Indicate that the
5470         generated Import pragma for the internal imported procedure does
5471         not come from an aspect, so that Is_Imported can be properly
5472         set for it.
5473
5474 2015-01-06  Gary Dismukes  <dismukes@adacore.com>
5475
5476         * sem_ch12.adb (Might_Inline_Subp): Record whether
5477         any subprograms in the generic package are marked with
5478         pragma Inline_Always (setting flag Has_Inline_Always).
5479         (Analyze_Package_Instantiation): Add test of Has_Inline_Always
5480         alongside existing test of Front_End_Inlining as alternative
5481         conditions for setting Inline_Now. Also add test of
5482         Has_Inline_Always along with Front_End_Inlining test as an
5483         alternative condition for setting Needs_Body to False.
5484
5485 2015-01-06  Tristan Gingold  <gingold@adacore.com>
5486
5487         * i-cpoint.adb (Copy_Array): Handle overlap.
5488
5489 2015-01-06  Pascal Obry  <obry@adacore.com>
5490
5491         * bindgen.adb: Minor style fix.
5492
5493 2015-01-06  Robert Dewar  <dewar@adacore.com>
5494
5495         * sem_util.ads, sem_util.adb: Minor reformatting.
5496
5497 2015-01-06  Vincent Celier  <celier@adacore.com>
5498
5499         * prj-conf.adb (Parse_Project_And_Apply_Config): Reset incomplete
5500         with flags before parsing the projects.
5501         * prj-err.adb (Error_Msg): Do nothing if there are incomplete withs.
5502         * prj-part.adb (Post_Parse_Context_Clause): Set Incomplete_Withs
5503         to True in the flags, when Ignore_Missing_With is True and an
5504         imported project cannot be found.
5505         * prj-proc.adb (Expression): When there are incomplete withs and
5506         a variable or attribute is not found, set the variable/attribute
5507         to unknown.
5508         * prj.ads (Processing_Flags): New flag Incomplete_Withs,
5509         defaulted to False.
5510
5511 2015-01-06  Vasiliy Fofanov  <fofanov@adacore.com>
5512
5513         * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-conf.adb,
5514         prj-err.adb: Add new switch --no-command-line.
5515
5516 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
5517
5518         * sem_ch12.adb: Sloc of wrapper is that of instantiation.
5519
5520 2015-01-06  Robert Dewar  <dewar@adacore.com>
5521
5522         * sem_ch11.adb: Minor reformatting.
5523
5524 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
5525
5526         * exp_aggr.adb (Get_Assoc_Expr): New routine internal to
5527         Build_Array_Aggr_Code, used to initialized components covered
5528         by a box association. If the component type is scalar and has
5529         a default aspect, use it to initialize such components.
5530
5531 2015-01-06  Pascal Obry  <obry@adacore.com>
5532
5533         * rtinit.c (__gnat_runtime_initialize): Add a parameter to
5534         control the setup of the exception handler.
5535         * initialize.c: Remove unused declaration.
5536         * bindgen.adb: Always call __gnat_runtime_initialize and pass
5537         whether the exeception handler must be set or not.
5538
5539 2015-01-06  Thomas Quinot  <quinot@adacore.com>
5540
5541         * freeze.adb (Set_SSO_From_Defaults): When setting scalar storage
5542         order to native from default, make sure to also adjust bit order.
5543         * exp_aggr.adb: Minor reformatting.
5544
5545 2015-01-06  Robert Dewar  <dewar@adacore.com>
5546
5547         * s-valllu.adb, s-valllu.ads, s-valuti.ads, s-valuns.adb, s-valuns.ads,
5548         s-valrea.adb, s-valrea.ads: Add some additional guards for
5549         Str'Last = Positive'Last.
5550
5551 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
5552
5553         * sem_ch12.adb, sem_ch8.adb: Ongoing work for wrappers for actual
5554         subprograms.
5555
5556 2015-01-06  Javier Miranda  <miranda@adacore.com>
5557
5558         * exp_disp.adb (Expand_Interface_Conversion): Reapply patch.
5559
5560 2015-01-06  Thomas Quinot  <quinot@adacore.com>
5561
5562         * sem_util.ads: Minor reformatting.
5563         * sem_cat.adb (In_RCI_Visible_Declarations): Change back to...
5564         (In_RCI_Declaration) Return to old name, as proper checking of
5565         entity being in the visible part depends on entity kind and must
5566         be done by the caller.
5567
5568 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
5569
5570         * sem_ch12.adb, sem_ch12.ads, sem_ch8.adb: Ongoing work for wrappers
5571         for operators in SPARK.
5572
5573 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
5574
5575         * sem_aggr.adb (Get_Value): In ASIS mode, preanalyze the
5576         expression in an others association before making copies for
5577         separate resolution and accessibility checks. This ensures that
5578         the type of the expression is available to ASIS in all cases,
5579         in particular if the expression is itself an aggregate.
5580
5581 2015-01-06  Eric Botcazou  <ebotcazou@adacore.com>
5582
5583         * einfo.ads (Has_Independent_Components): Document extended
5584         usage.
5585         * einfo.adb (Has_Independent_Components): Remove obsolete assertion.
5586         (Set_Has_Independent_Components): Adjust assertion.
5587         * sem_prag.adb (Analyze_Pragma): Also set Has_Independent_Components
5588         for pragma Atomic_Components.  Set Has_Independent_Components
5589         on the object instead of the type for an object declaration with
5590         pragma Independent_Components.
5591
5592 2015-01-06  Olivier Hainque  <hainque@adacore.com>
5593
5594         * set_targ.adb (Read_Target_Dependent_Values): Set
5595         Long_Double_Index when "long double" is read.
5596         (elaboration code): Register_Back_End_Types only when not reading from
5597         config files. Doing otherwise is pointless and error prone.
5598
5599 2015-01-06  Robert Dewar  <dewar@adacore.com>
5600
5601         * s-valrea.adb (Value_Real): Check for Str'Last = Positive'Last
5602
5603 2015-01-06  Robert Dewar  <dewar@adacore.com>
5604
5605         * a-wtgeau.adb, a-ztgeau.adb, a-tigeau.adb (String_Skip): Raise PE if
5606         Str'Last = Positive'Last.
5607
5608 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
5609
5610         * sem_ch6.adb (Matches_Limited_View): Handle properly the case
5611         where the non-limited type is a generic actual and appears as
5612         a subtype of the non-limited view of the other.
5613         * freeze.adb (Build_Renamed_Body): If the return type of the
5614         declaration that is being completed is a limited view and the
5615         non-limited view is available, use it in the specification of
5616         the generated body.
5617
5618 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
5619
5620         * sem_ch3.adb (Find_Type_Name): If there is a previous tagged
5621         incomplete view, the type of the classwide type common to both
5622         views is the type being declared.
5623
5624 2015-01-06  Eric Botcazou  <ebotcazou@adacore.com>
5625
5626         * einfo.ads (Is_Independent): Further document extended usage.
5627
5628 2015-01-06  Eric Botcazou  <ebotcazou@adacore.com>
5629
5630         * einfo.ads (Is_Independent): Document extended usage.
5631         * einfo.adb (Is_Independent): Remove obsolete assertion.
5632         (Set_Is_Independent): Likewise.
5633         * sem_prag.adb (Process_Atomic_Shared_Volatile): Rename into...
5634         (Process_Atomic_Independent_Shared_Volatile): ...this.
5635         Deal with pragma Independent here.
5636         (Analyze_Pragma): Adjust
5637         to above renaming and also invoke it for pragma Independent.
5638         Adjust comment for Independent_Components.
5639
5640 2015-01-06  Robert Dewar  <dewar@adacore.com>
5641
5642         * snames.ads-tmpl: Remove entries for attribute Enum_Image.
5643         * exp_attr.adb: Remove reference to Attribute_Enum_Image.
5644
5645 2015-01-06  Robert Dewar  <dewar@adacore.com>
5646
5647         * s-vallli.adb (Value_Long_Long_Integer): Handle case of Str'Last
5648         = Positive'Last.
5649         * s-valllu.adb (Value_Long_Long_Unsigned): Handle case of
5650         Str'Last = Positive'Last.
5651
5652 2015-01-06  Robert Dewar  <dewar@adacore.com>
5653
5654         * sem_prag.adb (Process_Inline): Remove redundant construct
5655         warning (-gnatw.r) for an ineffective pragma Inline.
5656
5657 2015-01-06  Robert Dewar  <dewar@adacore.com>
5658
5659         * s-valint.adb: Fix typo in last checkin.
5660         * s-valuns.adb (Value_Unsigned): More efficient fix for
5661         Positive'Last case.
5662         * sem_attr.adb (Analyze_Attribute): Minor reformatting
5663         (Eval_Attribute): Static ervaluation of 'Img for enumeration types.
5664
5665 2015-01-06  Robert Dewar  <dewar@adacore.com>
5666
5667         * s-valint.adb, s-valuns.adb (Value_Integer): Deal with case where
5668         Str'Last = Positive'Last
5669
5670 2015-01-06  Thomas Quinot  <quinot@adacore.com>
5671
5672         * xoscons.adb: Display exception information and return non-zero
5673         exit status in top level exception handler.
5674
5675 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
5676
5677         * sem_ch8.adb: Code clean up.
5678
5679 2015-01-06  Tristan Gingold  <gingold@adacore.com>
5680
5681         * targparm.ads: Remove obsolete comment.
5682
5683 2015-01-06  Olivier Hainque  <hainque@adacore.com>
5684
5685         * gcc-interface/decl.c (gnat_to_gnu_entity, case E_Variable): When
5686         constructing a ref to variable, update inner_const_flag from the
5687         variable TREE_READONLY attribute.
5688         * gcc-interface/targtyps.c (WIDEST_HARDWARE_FP_SIZE): Remove default
5689         definition.
5690         (get_target_float_size): Remove.
5691         (get_target_double_size): Remove.
5692         (get_target_long_double_size): Remove.
5693
5694 2015-01-06  Pascal Obry  <obry@adacore.com>
5695
5696         * adaint.c (ProcListEvt): Set to NULL.
5697         * rtinit.c: New file.
5698         (__gnat_rt_init_count): New reference counter set to 0.
5699         (__gnat_runtime_initialize): Move code here from __gnat_initialize when
5700         this code is actually needed for the runtime initialization. This
5701         routine returns immediately if the initialization has already been done.
5702         * final.c: Revert previous change.
5703         * rtfinal.c: New file.
5704         (__gnat_runtime_finalize)[Win32]: Add finalization of the critical
5705         section and event. The default version of this routine is empty (except
5706         for the reference counting code). This routine returns immediately if
5707         some others libraries are referencing the runtime.
5708         * bindgen.adb (Gen_Adainit): Generate call to Runtime_Initialize
5709         remove circuitry to initialize the signal handler as this is
5710         now done by the runtime initialization routine.
5711         (Gen_Adafinal): Generate call to Runtime_Finalize.
5712         * gnat_ugn.texi: Update documentation about concurrency and
5713         initialization/finalization of the run-time.
5714         * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Add
5715         references to rtfinal.o and rtinit.o
5716
5717 2015-01-06  Robert Dewar  <dewar@adacore.com>
5718
5719         * exp_attr.adb (Expand_N_Attribute_Reference): Add dummy entry
5720         for Enum_Image.
5721         * sem_attr.adb: Implement Enum_Image attribute.
5722         * snames.ads-tmpl: Add entries for Enum_Image attribute.
5723
5724 2015-01-06  Robert Dewar  <dewar@adacore.com>
5725
5726         * namet.ads: Document use of Boolean2 for No_Use_Of_Entity.
5727         * restrict.ads (No_Use_Of_Entity): New table.
5728         * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
5729         Ignore No_Use_Of_Entity (will be processed in parser).
5730         * snames.ads-tmpl: Add entry for Name_No_Use_Of_Entity.
5731
5732 2015-01-06  Vincent Celier  <celier@adacore.com>
5733
5734         * prj-tree.adb (Imported_Or_Extended_Project_Of): Do not try
5735         to check for an extended project, if a project does not have
5736         yet a project declaration.
5737
5738 2015-01-06  Pierre-Marie Derodat  <derodat@adacore.com>
5739
5740         * scos.ads: Update documentation about the SCO table build
5741         process and about table records format.
5742         * par_sco.ads (SCO_Record): Rename to SCO_Record_Raw.
5743         (SCO_Record_Filtered): New procedure.
5744         (Set_SCO_Logical_Operator): New procedure.
5745         (dsco): Update documentation.
5746         * par_sco.adb: Update library-level comments.
5747         (SCO_Generation_State_Type): New type.
5748         (SCO_Generation_State): New variable.
5749         (SCO_Raw_Table): New package instanciation.
5750         (Condition_Pragma_Hash_Table): Rename to SCO_Raw_Hash_Table.
5751         ("<"): New.
5752         (Tristate): New type.
5753         (Is_Logical_Operator): Return Tristate and update documentation.
5754         (Has_Decision): Update call to Is_Logical_Operator and complete
5755         documentation.
5756         (Set_Table_Entry): Rename to Set_Raw_Table_Entry, update
5757         comment, add an assertion for state checking and change
5758         references to SCO_Table into SCO_Raw_Table.
5759         (dsco): Refactor to dump the raw and the filtered tables.
5760         (Process_Decisions.Output_Decision_Operand): Handle putative
5761         short-circuit operators.
5762         (Process_Decisions.Output_Element): Update references
5763         to Set_Table_Entry and to Condition_Pragma_Hash_Table.
5764         (Process_Decisions.Process_Decision_Operand): Update call
5765         to Is_Logical_Operator.
5766         (Process_Decisions.Process_Node): Handle putative short-circuit
5767         operators and change references to
5768         SCO_Table into SCO_Raw_Table.
5769         (SCO_Output): Add an assertion
5770         for state checking and remove code that used to stamp out SCO entries.
5771         (SCO_Pragma_Disabled): Change reference to SCO_Table
5772         into SCO_Raw_Table.
5773         (SCO_Record): Rename to SCO_Record_Raw,
5774         add an assertion for state checking and change references
5775         to SCO_Table into SCO_Raw_Table.
5776         (Set_SCO_Condition): Add an assertion for state checking, update
5777         references to Condition_Pragma_Hash_Table and change references to
5778         SCO_Table into SCO_Raw_Table.
5779         (Set_SCO_Pragma_Enabled): Add an assertion for state checking and
5780         change references to SCO_Table into SCO_Raw_Table.
5781         (Set_SCO_Logical_Operator): New procedure.
5782         (Traverse_Declarations_Or_Statements.Set_Statement_Entry): Update
5783         references to Set_Table_Entry and to Condition_Pragma_Hash_Table.
5784         (SCO_Record_Fildered): New procedure.
5785         * gnat1drv.adb (Gnat1drv): Invoke the SCO filtering pass.
5786         * lib-writ.adb (Write_ALI): Invoke the SCO filtering pass and
5787         output SCOs.
5788         * par-load.adb (Load): Update reference to SCO_Record.
5789         * par.adb (Par): Update reference to SCO_Record.
5790         * put_scos.adb (Put_SCOs): Add an assertion to check that no
5791         putative SCO condition reaches this end.
5792         * sem_ch10.adb (Analyze_Proper_Body): Update reference to SCO_Record.
5793         * sem_res.adb (Resolve_Logical_Op): Validate putative SCOs
5794         when corresponding to an "and"/"or" operator affected by the
5795         Short_Circuit_And_Or pragma.
5796
5797 2015-01-06  Robert Dewar  <dewar@adacore.com>
5798
5799         * sem_ch8.adb (Analyze_Use_Package): Give more specific error
5800         msg for attempted USE of generic subprogram or subprogram.
5801
5802 2015-01-06  Robert Dewar  <dewar@adacore.com>
5803
5804         * s-valllu.adb, a-tiinau.adb, a-timoau.adb, a-ztinau.adb, a-ztmoau.adb,
5805         s-valuns.adb, s-valrea.adb, a-wtflau.adb, a-tiflau.adb, a-ztflau.adb,
5806         a-wtinau.adb, a-wtmoau.adb: Document recognition of : in place of #.
5807
5808 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
5809
5810         * sem_ch13.adb (Analyze_Aspect_Specifications): For aspects
5811         that specify stream subprograms, if the prefix is a class-wide
5812         type then the generated attribute definition clause must apply
5813         to the same class-wide type.
5814         (Default_Iterator): An iterator defined by an aspect of some
5815         container type T must have a first parameter of type T, T'class,
5816         or an access to such (from code reading RM 5.5.1 (2/3)).
5817
5818 2015-01-06  Arnaud Charlet  <charlet@adacore.com>
5819
5820         * gnat1drv.adb: Minor: complete previous change.
5821
5822 2015-01-06  Olivier Hainque  <hainque@adacore.com>
5823
5824         * set_targ.ads (C_Type_For): New function. Return the name of
5825         a C type supported by the back-end and suitable as a basis to
5826         construct the standard Ada floating point type identified by
5827         the T parameter. This is used as a common ground to feed both
5828         ttypes values and the GNAT tree nodes for the standard floating
5829         point types.
5830         * set_targ.adb (Long_Double_Index): The index at which "long
5831         double" gets registered in the FPT_Mode_Table. This is useful to
5832         know whether we have a "long double" available at all and get at
5833         it's characteristics without having to search the FPT_Mode_Table
5834         when we need to decide which C type should be used as the
5835         basis for Long_Long_Float in Ada.
5836         (Register_Float_Type): Fill Long_Double_Index.
5837         (FPT_Mode_Index_For): New function. Return the index in
5838         FPT_Mode_Table that designates the entry corresponding to the
5839         provided C type name.
5840         (FPT_Mode_Index_For): New function. Return the index in
5841         FPT_Mode_Table that designates the entry for a back-end type
5842         suitable as a basis to construct the standard Ada floating point
5843         type identified by the input T parameter.
5844         (elaboration code): Register_Back_End_Types unconditionally,
5845         so C_Type_For can operate regardless of -gnateT. Do it
5846         early so we can query it for the floating point sizes, via
5847         FPT_Mode_Index_For. Initialize Float_Size, Double_Size and
5848         Long_Double_Size from the FPT_Mode_Table, as cstand will do.
5849         * cstand.adb (Create_Float_Types): Use C_Type_For to determine
5850         which C type should be used as the basis for the construction
5851         of the Standard Ada floating point types.
5852         * get_targ.ads (Get_Float_Size, Get_Double_Size,
5853         Get_Long_Double_Size): Remove.
5854         * get_targ.adb: Likewise.
5855
5856 2015-01-06  Thomas Quinot  <quinot@adacore.com>
5857
5858         * sem_cat.adb (In_RCI_Declaration): Remove unnecessary
5859         parameter and rename to...
5860         (In_RCI_Visible_Declarations): Fix handling of private part of nested
5861         package.
5862         (Validate_RCI_Subprogram_Declaration): Reject illegal function
5863         returning anonymous access in RCI unit.
5864
5865 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
5866
5867         * sem_ch6.adb (New_Overloaded_Entity): In GNATprove mode, a
5868         function wrapper may be a homonym of another local declaration.
5869         * sem_ch8.adb (Analyze_Subprogram_Renaming): In GNATprove mode,
5870         build function and operator wrappers after the actual subprogram
5871         has been resolved, and replace the standard renaming declaration
5872         with the declaration of wrapper.
5873         * sem_ch12.ads (Build_Function_Wrapper, Build_Operator_Wraooer):
5874         make public for use elsewhere.
5875         * sem_ch12.adb (Build_Function_Wrapper, Build_Operator_Wraooer):
5876         rewrite, now that actual is fully resolved when wrapper is
5877         constructed.
5878
5879 2015-01-06  Javier Miranda  <miranda@adacore.com>
5880
5881         * exp_disp.adb: Revert previous change.
5882
5883 2015-01-06  Robert Dewar  <dewar@adacore.com>
5884
5885         * exp_util.adb: Change name Name_Table_Boolean to
5886         Name_Table_Boolean1.
5887         * namet.adb: Change name Name_Table_Boolean to Name_Table_Boolean1
5888         Introduce Name_Table_Boolean2/3.
5889         * namet.ads: Change name Name_Table_Boolean to Name_Table_Boolean1
5890         Introduce Name_Table_Boolean2/3.
5891         * par-ch13.adb: Change name Name_Table_Boolean to
5892         Name_Table_Boolean1.
5893
5894 2015-01-06  Bob Duff  <duff@adacore.com>
5895
5896         * gnat_rm.texi: Improve documentation regarding No_Task_Termination.
5897
5898 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
5899
5900         * sem_aggr.adb (Resolve_Record_Aggregte, Get_Value): For an
5901         others choice that covers multiple components, analyze each
5902         copy with the type of the component even in compile-only mode,
5903         to detect potential accessibility errors.
5904
5905 2015-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
5906
5907         * sem_res.adb (Is_Assignment_Or_Object_Expression): New routine.
5908         (Resolve_Actuals): An effectively volatile out
5909         parameter cannot act as an in or in out actual in a call.
5910         (Resolve_Entity_Name): An effectively volatile out parameter
5911         cannot be read.
5912
5913 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
5914
5915         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If the body is
5916         the expansion of an expression function it may be pre-analyzed
5917         if a 'access attribute is applied to the function, in which case
5918         last_entity may have been assigned already.
5919
5920 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
5921
5922         * sem_ch4.adb (Analyze_One_Call): If formal has an incomplete
5923         type and actual has the corresponding full view, there is no
5924         error, but a case of use of incomplete type in a predicate or
5925         invariant expression.
5926
5927 2015-01-06  Vincent Celier  <celier@adacore.com>
5928
5929         * makeutl.adb (Insert_No_Roots): Make sure that the same source
5930         in two different project tree is checked in both trees, if they
5931         are sources of two different projects, extended or not.
5932
5933 2015-01-06  Arnaud Charlet  <charlet@adacore.com>
5934
5935         * gnat1drv.adb: Minor code clean up.
5936         (Adjust_Global_Switches): Ignore gnatprove_mode in codepeer_mode.
5937
5938 2015-01-06  Bob Duff  <duff@adacore.com>
5939
5940         * osint.adb (Read_Source_File): Don't print out
5941         file name unless T = Source.
5942
5943 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
5944
5945         * sem_util.adb (Is_Variable, Is_OK_Variable_For_Out_Formal):
5946         recognize improper uses of constant_reference types as actuals
5947         for in-out parameters.
5948         (Check_Function_Call): Do not collect identifiers if function
5949         name is missing because of previous error.
5950
5951 2015-01-06  Robert Dewar  <dewar@adacore.com>
5952
5953         * ali-util.adb, sem_prag.adb, rtsfind.adb, sem_util.adb, sem_res.adb,
5954         ali.adb, binde.adb, namet.adb, namet.ads, gnatls.adb, bcheck.adb:
5955         Minor change of name Name_Table_Info => Name_Table_Int.
5956
5957 2015-01-06  Robert Dewar  <dewar@adacore.com>
5958
5959         * exp_strm.adb (Build_Elementary_Input_Call): Clarify comments
5960         in previous checkin.
5961         * freeze.adb (Freeze_Fixed_Point_Type): Add warning for shaving
5962         of bounds.
5963         * sem_prag.adb, sem_ch10.adb, sem_ch6.adb: Minor reformatting.
5964
5965 2015-01-06  Vincent Celier  <celier@adacore.com>
5966
5967         * a-strsup.adb (Times (Natural;String;Positive)): Raise
5968         Length_Error, not Index_Error, when the result is too long.
5969
5970 2015-01-06  Thomas Quinot  <quinot@adacore.com>
5971
5972         * a-direct.adb (Create_Path): Minor error handling and
5973         performance improvement.
5974
5975 2015-01-06  Robert Dewar  <dewar@adacore.com>
5976
5977         * checks.ads, sem_ch12.adb: Minor reformatting.
5978         * exp_ch4.adb (Expand_N_Op_Divide): Generate explicit divide by
5979         zero check for fixed-point case if Backend_Divide_Checks_On_Target
5980         is False.
5981
5982 2015-01-06  Robert Dewar  <dewar@adacore.com>
5983
5984         * sem_prag.adb (Analyze_Pragma, case No_Elaboration_Code_All):
5985         Do not set restriction No_Elaboration_Code unless the pragma
5986         appears in the main unit).
5987
5988 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
5989
5990         * sem_ch10.adb (Is_Regular_With_Clause): Add guard to verify
5991         that with clause has already been analyzed before checking kind
5992         of with_clause.
5993
5994 2015-01-06  Robert Dewar  <dewar@adacore.com>
5995
5996         * exp_strm.adb (Build_Elementary_Input_Call): Return base type
5997         (as required by RM).
5998
5999 2015-01-06  Arnaud Charlet  <charlet@adacore.com>
6000
6001         * a-reatim.adb ("/"): Add explicit pragma Unsuppress (Division_Check).
6002
6003 2015-01-06  Robert Dewar  <dewar@adacore.com>
6004
6005         * sem_prag.adb (Process_Suppress_Unsuppress): Add extra warning
6006         for ignoring pragma Suppress (Elaboration_Check) in SPARK mode.
6007
6008 2015-01-06  Javier Miranda  <miranda@adacore.com>
6009
6010         * exp_disp.adb (Expand_Interface_Conversion): No displacement
6011         of the pointer to the object needed when the type of the operand
6012         is not an interface type and the interface is one of its parent
6013         types (since they share the primary dispatch table).
6014
6015 2015-01-06  Vincent Celier  <celier@adacore.com>
6016
6017         * prj-env.adb: Minor comment update.
6018
6019 2015-01-06  Javier Miranda  <miranda@adacore.com>
6020
6021         * sem_res.adb (Valid_Conversion): Restrict the checks on anonymous
6022         access types whose target type is an interface type to operands
6023         that are access types; required to report an error when the
6024         operand is not an access type.
6025
6026 2015-01-06  Bob Duff  <duff@adacore.com>
6027
6028         * a-cfinve.adb (Copy): Set the discriminant to the Length when
6029         Capacity = 0.
6030         * a-cofove.ads (Capacity): Add a postcondition.
6031         * a-cfinve.ads (Capacity): Add a postcondition.
6032         (Reserve_Capacity): Correct the postcondition in the case where
6033         Capacity = 0; that means "Capacity => Length (Container)".
6034         * a-cofove.adb (Elems[c]): Add a comment
6035         explaining the dangers and how to avoid them.
6036
6037 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
6038
6039         * sem_ch12.adb: Code clean up.
6040
6041 2015-01-06  Arnaud Charlet  <charlet@adacore.com>
6042
6043         * gnatvsn.ads: Bump copyright year.
6044
6045 2015-01-06  Robert Dewar  <dewar@adacore.com>
6046
6047         * s-taskin.ads, s-traces.ads: Minor reformatting.
6048         * exp_util.adb: Minor typo fix.
6049
6050 2015-01-06  Vincent Celier  <celier@adacore.com>
6051
6052         * gnatls.adb (Search_RTS): Invoke Initialize_Default_Project_Path
6053         with the runtime name.
6054         * prj-env.adb (Initialize_Default_Project_Path): When both
6055         Target_Name and Runtime_Name are not empty string, add to the
6056         project path the two directories .../lib/gnat and .../share/gpr
6057         related to the runtime.
6058         * prj-env.ads (Initialize_Default_Project_Path): New String
6059         parameter Runtime_Name, defaulted to the empty string.
6060
6061 2015-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
6062
6063         * frontend.adb: Guard against the case where a configuration
6064         pragma may be split into multiple pragmas and the original
6065         rewritten as a null statement.
6066         * sem_prag.adb (Analyze_Pragma): Insert a brand new Check_Policy
6067         pragma using Insert_Before rather than Insert_Action. This
6068         takes care of the configuration pragma case where Insert_Action
6069         would fail.
6070
6071 2015-01-06  Bob Duff  <duff@adacore.com>
6072
6073         * a-coboho.ads (Element_Access): Add "pragma
6074         No_Strict_Aliasing (Element_Access);". This is needed because
6075         we are unchecked-converting from Address to Element_Access.
6076         * a-cofove.ads, a-cofove.adb (Elems,Elemsc): Fix bounds of the
6077         result to be 1.
6078
6079 2015-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
6080
6081         * sem_res.adb (Resolve_Actuals): Remove the
6082         restriction which prohibits volatile actual parameters with
6083         enabled external propery Async_Writers to act appear in procedure
6084         calls where the corresponding formal is of mode OUT.
6085
6086 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
6087
6088         * gnat_ugn.texi: Bump @copying's copyright year.
6089
6090 2015-01-05  Eric Botcazou  <ebotcazou@adacore.com>
6091
6092         PR ada/64492
6093         * gcc-interface/Makefile.in (../stamp-tools): Reinstate dropped code.
6094
6095 2015-01-04  Uros Bizjak  <ubizjak@gmail.com>
6096
6097         * gcc-interface/misc.c (internal_error_function): Use xasprintf instead
6098         of unchecked asprintf.
6099
6100 \f
6101 Copyright (C) 2015 Free Software Foundation, Inc.
6102
6103 Copying and distribution of this file, with or without modification,
6104 are permitted in any medium without royalty provided the copyright
6105 notice and this notice are preserved.