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