sem_ch9.adb (Collect_Interfaces): Initialize Direct_Primitive_Operations for a tagged...
[official-gcc.git] / gcc / ada / ChangeLog
blob87c3372e99788fea0895df60e2a5a4f1d4cacaa4
1 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
3         * sem_ch9.adb (Collect_Interfaces): Initialize
4         Direct_Primitive_Operations for a tagged synchronized type,
5         so it can used in ASIS mode.
6         * sem_disp.adb (Check_Dispatching_Operation): If expansion is
7         disabled, attach subprogram to list of Direct_Primitive_Operations
8         of synchronized type itself, for ASIS use, because in this case
9         Corresponding_Record_Type is not built.
10         * einfo.ads: Indicate use of Direct_Primitive_Operations on
11         synchronized type.
13 2015-05-12  Pierre-Marie de Rodat  <derodat@adacore.com>
15         * exp_pakd.adb: Make clearer the comment in exp_pakd.adb about
16         ___XP suffixes.
18 2015-05-12  Robert Dewar  <dewar@adacore.com>
20         * sem_ch3.adb, sem_util.adb, sem_ch6.adb: Minor reformatting.
22 2015-05-12  Robert Dewar  <dewar@adacore.com>
24         * exp_unst.adb (Visit_Node): Deal with subprogram and package stubs.
26 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
28         * exp_intr.adb (Expand_Dispatching_Constructor_Call): The
29         tag to be retrieved for the generated call is the first entry
30         in the dispatch table for the return type of the instantiated
31         constructor.
33 2015-05-12  Bob Duff  <duff@adacore.com>
35         * exp_ch7.adb, exp_ch7.ads, exp_intr.adb, exp_util.adb,
36         exp_util.ads: Update comments.
38 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
40         * sem_ch3.adb (Add_Internal_Interface_Entities): Do no generate
41         freeze nodes for these in ASIS mode, because they lead to
42         elaoration order issues in gigi.
44 2015-05-12  Hristian Kirtchev  <kirtchev@adacore.com>
46         * sem_ch6.adb (Analyze_Expression_Function): Code
47         cleanup. Use Copy_Subprogram_Spec to create a proper spec.
48         (Analyze_Subprogram_Body_Helper): Code cleanup. Do not
49         prepare a stand alone body for inlining in GNATprove mode
50         when inside a generic.  (Body_Has_Contract): Reimplemented.
51         (Build_Subprogram_Declaration): New routine.
52         * sem_ch10.adb (Analyze_Compilation_Unit): Capture global
53         references within generic bodies by loading them.
54         * sem_util.adb (Copy_Parameter_List): Code cleanup.
55         (Copy_Subprogram_Spec): New routine.
56         (Is_Contract_Annotation): New routine.
57         * sem_util.ads (Copy_Subprogram_Spec): New routine.
58         (Is_Contract_Annotation): New routine.
60 2015-05-12  Hristian Kirtchev  <kirtchev@adacore.com>
62         * sem_attr.adb (Resolve_Attribute): Do not analyze the generated
63         body of an expression function when the prefix of attribute
64         'Access is the body.
66 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
68         * sem_ch3.adb (Build_Derived_Enumeration_Type): The anonymous base
69         created for a derived enumeration type is not a first subtype,
70         even though it is defined through a full type declaration.
71         * sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): Do not process
72         aspects for the anonymous base type constructed for a derived
73         scalar type, because they will be set when the first subtype
74         is frozen.
75         (Inherit_Aspects_At_Freeze_Point): Fix typos on handling of
76         Default_Value and Default_Component_Value, that prevented the
77         proper inheritance of these aspects.
79 2015-05-12  Gary Dismukes  <dismukes@adacore.com>
81         * exp_ch6.adb, exp_unst.adb: Minor typo fixes.
83 2015-05-12  Robert Dewar  <dewar@adacore.com>
85         * sem_ch3.adb: Minor reformatting.
87 2015-05-12  Vincent Celier  <celier@adacore.com>
89         * gnatcmd.adb: If we want to invoke gnatmake (gnatclean) with
90         -P, then check if gprbuild (gprclean) is available; if it is,
91         use gprbuild (gprclean) instead of gnatmake (gnatclean).
93 2015-05-12  Robert Dewar  <dewar@adacore.com>
95         * debug.adb: Add flag -gnatd.3 to output diagnostic info from
96         Exp_Unst.
97         * einfo.ad, einfo.adb: Reorganize (and remove most of) flags used by
98         Exp_Unst.
99         * exp_ch6.adb (Unest_Bodies): Table for delayed calls to
100         Unnest_Subprogram (Expand_N_Subprogram_Body): Add entry to table
101         for later call instead of calling Unnest_Subprogram directly
102         (Initialize): New procedure (Unnest_Subprograms): New procedure
103         * exp_ch6.ads (Add_Extra_Actual_To_Call): Move into proper
104         alpha order.
105         (Initialize): New procedure.
106         (Unnest_Subprograms): New procedure.
107         * exp_unst.adb (Unnest_Subprogram): Major rewrite, moving
108         all processing to this routine which is now called late
109         after instantiating bodies. Fully handles the case of generic
110         instantiations now.
111         * exp_unst.ads: Major rewrite, moving all processing to
112         Unnest_Subprogram.
113         * frontend.adb (Frontend): Add call to Exp_Ch6.Initialize.
114         (Frontend): Add call to Unnest_Subprograms.
115         * sem_ch8.adb (Find_Direct_Name): Back to old calling sequence
116         for Check_Nested_Access.
117         * sem_util.adb (Build_Default_Subtype): Minor reformatting
118         (Check_Nested_Access): Back to original VM-only form (we
119         now do all the processing for Unnest_Subprogram at the time
120         it is called.
121         (Denotes_Same_Object): Minor reformatting
122         (Note_Possible_Modification): Old calling sequence for
123         Check_Nested_Access.
124         * sem_util.ads (Check_Nested_Access): Back to original VM-only
125         form (we now do all the processing for Unnest_Subprogram at the
126         time it is called.
128 2015-05-12  Robert Dewar  <dewar@adacore.com>
130         * sem_ch3.adb, freeze.adb, sem_ch6.adb: Minor reformatting.
132 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
134         * sem_ch3.adb (Analyze_Object_Declaration): New function
135         Has_Delayed_Aspect, used to defer resolution of an aggregate
136         expression when the object declaration carries aspects Address
137         and/or Alignment.
138         * freeze.adb (Freeze_Object_Declaration): New subsidiary procedure
139         to Freeze_Entity.  In addition to the previous processing steps
140         at the freeze point of an object, this procedure also handles
141         aggregates in object declarations, when the declaration carries
142         delayed aspects that require that the initialization of the
143         object be attached to its freeze actions.
145 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
147         * sem_ch6.adb (Analyze_Subprogram_Declaration): Following
148         AI12-0147, null procedures and expression functions are allowed
149         in protected bodies.
151 2015-05-12  Tristan Gingold  <gingold@adacore.com>
153         * i-cpoint.adb (Copy_Terminated_Array): Copy nothing if Length is 0.
155 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
157         * sem_ch3.adb (Complete_Private_Subtype): Propagate
158         Has_Delayed_Aspects flag from private to full view, to ensure
159         that predicate functions are constructed.
161 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
163         * sem_ch6.adb (Process_Formals): If a tagged formal is an
164         incomplete class-wide type, the subprogram must have a delayed
165         freeze even though the opertation is not a primitive of the
166         type. THis ensures that the backend can recover the full view
167         when elaborating the subprogram declaration.
169 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
171         * exp_util.adb (Get_Current_Value_Condition): Nothing to be
172         done if an elsif part has been rewritten so that it is not part
173         of an enclosing if_statement.
175 2015-05-12  Robert Dewar  <dewar@adacore.com>
177         * sem_type.adb, sem_ch10.adb, freeze.adb, sem_ch6.adb, exp_disp.adb:
178         Minor reformatting.
180 2015-05-12  Bob Duff  <duff@adacore.com>
182         * exp_attr.adb (Size): Remove unnecessary check for types with
183         unknown discriminants.  That was causing the compiler to build
184         a function call _size(T), where T is a type, not an object.
186 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
188         * sem_ch4.adb (Extended_Primitive_Ops): Exclude overriding
189         primitive operations of a type extension declared in the package
190         body, to prevent duplicates in extended list.
192 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
194         * sem_ch3.adb (Analyze_Component_Declaration): If the component is
195         an unconstrained synchronized type with discriminants, create a
196         constrained default subtype for it, so that the enclosing record
197         can be given the proper size.
198         * sem_util.adb (Build_Default_Subtype): If the subtype is created
199         for a record discriminant, do not analyze the declarztion at
200         once because it is added to the freezing actions of the enclosing
201         record type.
203 2015-05-12  Robert Dewar  <dewar@adacore.com>
205         * exp_prag.adb (Expand_N_Pragma): Rewrite ignored pragma as
206         Null statements.
207         * namet.ads (Boolean3): Document this flag used for Ignore_Pragma.
208         * par-prag.adb (Prag): Implement Ignore_Pragma.
209         * sem_prag.adb: Implement Ignore_Pragma.
210         * snames.ads-tmpl: Add entries for pragma Ignore_Pragma.
212 2015-05-12  Javier Miranda  <miranda@adacore.com>
214         * sem_ch10.adb (Build_Shadow_Entity): Link the class-wide shadow
215         entity with its corresponding real entity.
216         (Decorate_Type): Unconditionally build the class-wide shadow entity of
217         tagged types.
218         * einfo.ads, einfo.adb (Has_Non_Limited_View): New synthesized
219         attribute.
220         (Non_Limited_View): Moved from field 17 to field 19 be available
221         in class-wide entities.
222         * exp_attr.adb (Access_Cases): Code cleanup.
223         * exp_disp.adb (Expand_Interface_Actuals): Ditto.
224         * exp_util.adb (Non_Limited_Designated_Type): Ditto.
225         * freeze.adb (Build_Renamed_Bdody): Ditto.
226         * sem_aux.adb (Available_View): Ditto.
227         * sem_ch4.adb (Analyze_Selected_Component): Ditto.
228         (Try_One_Prefix_Interpretation): Ditto.
229         * sem_ch5.adb (Analyze_Assignment): Ditto.
230         * sem_ch6.adb (Detect_And_Exchange): Ditto.
231         * sem_ch8.adb (Find_Expanded_Name): Ditto.
232         * sem_disp.adb (Check_Controlling_Type): Ditto.
233         * sem_res.adb (Resolve_Type_Conversion): Ditto.
234         (Full_Designated_Type): Ditto.
235         * sem_type.adb (Covers): Ditto.
236         * sem_util.adb: Fix typo in comment.
238 2015-05-12  Robert Dewar  <dewar@adacore.com>
240         * exp_unst.adb (Get_Real_Subp): New subprogram.
241         (Unnest_Subprogram): Use Get_Real_Subp.
242         (Uplev_Refs_For_One_Subp): Skip if no ARECnU entity.
243         (Uplev_Refs_For_One_Subp): Use actual subtype in unconstrained case.
245 2015-05-12  Robert Dewar  <dewar@adacore.com>
247         * a-reatim.adb ("/"): Add explicit check for Time_Span_First / -1.
249 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
251         * sem_ch4.adb (Extended_Primitive_Ops): New subprogram,
252         auxiliary to Try_Primitive_Operation to handle properly prefixed
253         calls where the operation is not a primitive of the type, but
254         is declared in the package body that is in the immediate scope
255         of the type.
257 2015-05-12  Robert Dewar  <dewar@adacore.com>
259         * sem_util.adb (Is_Variable): Allow X'Deref(Y) as a variable.
261 2015-05-12  Ed Schonberg  <schonberg@adacore.com>
263         * sem_ch8.adb (Find_Expanded_Name): Handle properly a fully
264         qualified name for an instance of a generic grand-child unit in
265         the body its parent.
267 2015-05-12  Robert Dewar  <dewar@adacore.com>
269         * exp_unst.adb (Upref_Name): New subprogram.
270         (Unnest_Subprogram): Use Upref_Name.
271         (Unnest_Subprogram): Use new Deref attribute.
272         * exp_unst.ads: Doc updates.
274 2015-05-12  Thomas Quinot  <quinot@adacore.com>
276         * adaint.c: Enable Large File Support in adaint so that __gnat_readdir
277         can access files on filesystems mounted from servers that use large
278         NFS file handles.
280 2015-05-09  Eric Botcazou  <ebotcazou@adacore.com>
282         * gcc-interface/utils.c (gnat_write_global_declarations): Use type_decl
283         method instead of global_decl for TYPE_DECLs.
285 2015-04-27  Jim Wilson  <jim.wilson@linaro.org>
287         * gcc-interface/Makefile-lan.in (ada.mostlyclean): Remove gnatbind
288         and gnat1.
290 2015-04-13  Eric Botcazou  <ebotcazou@adacore.com>
292         * gnatvsn.ads (Library_Version): Bump to 6.
294 2015-04-09  Iain Sandoe  <iain@codesourcery.com>
296         * gcc-interface/Makefile.in (darwin, powerpc): Enable atomics.
298 2015-04-08  Eric Botcazou  <ebotcazou@adacore.com>
300         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Do not make
301         a function returning an unconstrained type 'const' for the middle-end.
303         * gcc-interface/trans.c (Pragma_to_gnu) <case Pragma_Warning>: Use
304         exact condition to detect Reason => "..." pattern.
306 2015-03-31  Tom de Vries  <tom@codesourcery.com>
308         PR ada/65490
309         * terminals.c (child_setup_tty): Fix warning 'argument to sizeof in
310         bzero call is the same expression as the destination'.
312 2015-03-26  Eric Botcazou  <ebotcazou@adacore.com>
314         * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Deref>: New case.
316 2015-03-24  Gary Dismukes  <dismukes@adacore.com>
318         * sem_ch3.adb: Minor typo fix (missing paren).
320 2015-03-24  Robert Dewar  <dewar@adacore.com>
322         * sinfo.ads: Update comment.
324 2015-03-24  Robert Dewar  <dewar@adacore.com>
326         * exp_attr.adb: Add entry for typ'Deref.
327         * sem_attr.adb (Deref): New GNAT attribute.
328         * sem_attr.ads: Add entry for new GNAT attribute Deref.
329         * snames.ads-tmpl: Add entries for new attribute Deref.
331 2015-03-24  Ed Schonberg  <schonberg@adacore.com>
333         * sem_ch13.adb (Rep_Item_Too_Early): allow pragma Convention
334         on generic type.
336 2015-03-24  Gary Dismukes  <dismukes@adacore.com>
338         * inline.adb: Minor typo fix.
340 2015-03-24  Arnaud Charlet  <charlet@adacore.com>
342         * doc/gnat_ugn/building_executable_programs_with_gnat.rst,
343         doc/gnat_ugn/gnat_utility_programs.rst
344         doc/gnat_rm/implementation_defined_attributes.rst
345         doc/gnat_rm/implementation_defined_pragmas.rst
346         doc/gnat_rm/representation_clauses_and_pragmas.rst
347         doc/gnat_rm/about_this_guide.rst
348         doc/gnat_rm/implementation_of_ada_2012_features.rst: Doc improvements.
349         * gnat_rm.texi, gnat_ugn.texi: Regenerate.
351 2015-03-23  Jakub Jelinek  <jakub@redhat.com>
353         PR bootstrap/65522
354         * adadecode.c (ada_demangle): Guard with IN_RTS instead of IN_GCC.
356 2015-03-20  Eric Botcazou  <ebotcazou@adacore.com>
358         PR ada/65451
359         * gcc-interface/utils.c (gnat_pushdecl): Tidy up and improve comment.
360         Make sure to chain only main variants through TYPE_NEXT_PTR_TO.
362         * gcc-interface/trans.c (Attribute_to_gnu): Revert latest change.
364 2015-03-16  Eric Botcazou  <ebotcazou@adacore.com>
366         * gcc-interface/utils2.c (gnat_invariant_expr): Return null if the type
367         of the expression ends up being composite.
369 2015-03-16  Eric Botcazou  <ebotcazou@adacore.com>
371         * gcc-interface/decl.c (is_from_limited_with_of_main): New predicate.
372         (gnat_to_gnu_entity) <E_Subprogram_Type>: Invoke it on return and
373         parameter types to detect circularities in ASIS mode.
374         * gcc-interface/trans.c (Attribute_to_gnu): Mention AI05-0151.
376 2015-03-16  Eric Botcazou  <ebotcazou@adacore.com>
378         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Abstract_State>: Do not
379         short-circuit the regular handling.
381 2015-03-13  Robert Dewar  <dewar@adacore.com>
383         * exp_unst.adb (Note_Uplevel_Reference): Eliminate duplicate
384         references.
385         (Actual_Ref): New function.
386         (AREC_String): Minor reformatting.
387         (Unnest_Subprogram): Use Actual_Ref.
388         * frontend.adb (Frontend): Turn off Unnest_Subprogram_Mode
389         before call to Instantiate_Bodies.
391 2015-03-13  Ed Schonberg  <schonberg@adacore.com>
393         * freeze.adb (Freeze_Profile): If the return type of a function
394         being frozen is an untagged limited view and the function is
395         abstract, mark the type as frozen because there is no later
396         point at which the profile of the subprogram will be elaborated.
398 2015-03-13  Robert Dewar  <dewar@adacore.com>
400         * einfo.adb, einfo.ads, atree.adb, atree.ads, atree.h: Add seventh
401         component to entities. Add new fields Field36-41 and Node36-41.
403 2015-03-13  Claire Dross  <dross@adacore.com>
405         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Rewrite after review.
407 2015-03-13  Robert Dewar  <dewar@adacore.com>
409         * exp_util.adb (Is_Volatile_Reference): Compile time known
410         value is never considered to be a volatile reference.
412 2015-03-13  Robert Dewar  <dewar@adacore.com>
414         * sem_ch3.adb (Analyze_Object_Contract): Suppress "constant
415         cannot be volatile" for internally generated object (such as
416         FIRST and LAST constants).
418 2015-03-13  Ed Schonberg  <schonberg@adacore.com>
420         * sem_ch12.adb (Validate_Access_Subprogram_Instance): If a
421         convention is specified for the formal parameter, verify that
422         the actual has the same convention.
423         * sem_prag.adb (Set_Convention_From_Pragma): Allow convention
424         pragma to be set on a generic formal type.
425         * sem_util.adb (Set_Convention): Ignore within an instance,
426         as it has already been verified in the generic unit.
428 2015-03-13  Claire Dross  <dross@adacore.com>
430         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do not inline
431         subprograms with unconstrained record parameters containing
432         Itype declarations.
433         * sinfo.ads Document GNATprove assumption that type should match
434         in the AST.
435         * sem_ch6.adb (Analyze_Subprogram_Body_Contract):
436         Do not check for Refined_Depends and Refined_Globals contracts
437         as they are optional.
439 2015-03-13  Ed Schonberg  <schonberg@adacore.com>
441         * sem_ch12.adb (Instantiate_Type): For a floating-point type,
442         capture dimension info if any, because the generated subtype
443         declaration does not come from source and will not process dimensions.
444         * sem_dim,adb (Analyze_Dimension_Extension_Or_Record_Aggregate):
445         Do not analyze expressions with an initialization procedure
446         because aggregates will have been checked at the point of record
447         declaration.
449 2015-03-13  Robert Dewar  <dewar@adacore.com>
451         * aspects.ads, aspects.adb: Add entries for aspect Unimplemented.
452         * einfo.ads, einfo.adb (Is_Unimplemented): New flag.
453         * sem_ch13.adb: Add dummy entry for aspect Unimplemented.
454         * snames.ads-tmpl: Add entry for Name_Unimplemented.
456 2015-03-13  Gary Dismukes  <dismukes@adacore.com>
458         * style.adb (Missing_Overriding): Apply the
459         Comes_From_Source test to the Original_Node of the subprogram
460         node, to handle the case of a null procedure declaration that
461         has been rewritten as an empty procedure body.
463 2015-03-13  Robert Dewar  <dewar@adacore.com>
465         * exp_util.ads: Minor fix to comment.
466         * sem_ch3.adb (Constrain_Index): Correct pasto from previous
467         change.
469 2015-03-13  Robert Dewar  <dewar@adacore.com>
471         * exp_util.ads, exp_util.adb (Force_Evaluation): Add Related_Id and
472         Is_Low/High_Bound params.
473         * sem_ch3.adb (Constrain_Index): Use new Force_Evaluation calling
474         sequence to simplify generation of FIRST/LAST temps for bounds.
476 2015-03-12  Olivier Hainque  <hainque@adacore.com>
478         * gcc-interface/trans.c (Attribute_to_gnu) <Code_Address case>:
479         On targets where a function symbol designates a function descriptor,
480         fetch the function code address from the descriptor.
481         (USE_RUNTIME_DESCRIPTORS): Provide a default definition.
483 2015-03-04  Robert Dewar  <dewar@adacore.com>
485         * sem_warn.adb: Minor reformatting.
486         * init.c: Minor tweaks.
488 2015-03-04  Dmitriy Anisimko  <anisimko@adacore.com>
490         * a-coinho-shared.adb: Fix clear of already empty holder.
492 2015-03-04  Robert Dewar  <dewar@adacore.com>
494         * exp_unst.adb (Check_Dynamic_Type): Ignore library level types.
495         (Check_Uplevel_Reference_To_Type): Ignore call inside generic.
496         (Note_Uplevel_Reference): Ignore call inside generic.
497         (Note_Uplevel_Reference): Fix check for no entity field.
498         (Unnest_Subprogram): Ignore call inside generic.
499         (Find_Current_Subprogram): Use Defining_Entity, not Defining_Unit_Name.
500         (Visit_Node): Ignore calls to Imported subprograms.
501         (Visit_Node): Fix problem in finding subprogram body in some cases.
502         (Add_Form_To_Spec): Use Defining_Entity, not Defining_Unit_Name.
504 2015-03-04  Robert Dewar  <dewar@adacore.com>
506         * einfo.adb (Is_ARECnF_Entity): Removed.
507         (Last_Formal): Remove special handling of Is_ARECnF_Entity.
508         (Next_Formal): Remove special handling of Is_ARECnF_Entity.
509         (Next_Formal_With_Extras): Remove special handling of Is_ARECnF_Entity.
510         (Number_Entries): Minor reformatting.
511         * einfo.ads (Is_ARECnF_Entity): Removed.
512         * exp_unst.adb (Unnest_Subprogram): Remove setting of
513         Is_ARECnF_Entity.
514         (Add_Extra_Formal): Use normal Extra_Formal circuit.
515         * sprint.adb (Write_Param_Specs): Properly handle case where
516         there are no source formals, but we have at least one Extra_Formal
517         present.
519 2015-03-04  Ed Schonberg  <schonberg@adacore.com>
521         * sem_aggr.adb (Resolve_Record_Aggregate,
522         Add_Discriminant_Values): If the value is a reference to the
523         current instance of an enclosing type, use its base type to check
524         against prefix of attribute reference, because the target type
525         may be otherwise constrained.
527 2015-03-04  Robert Dewar  <dewar@adacore.com>
529         * atree.h: Add entries for Flag287-Flag309.
530         * einfo.adb: Add (unused) flags Flag287-Flag309.
532 2015-03-04  Ed Schonberg  <schonberg@adacore.com>
534         * sem_util.adb (Collect_Interfaces, Collect): When gathering
535         interfaces of ancestors, handle properly a subtype of a private
536         extension.
538 2015-03-04  Robert Dewar  <dewar@adacore.com>
540         * einfo.adb (Is_ARECnF_Entity): New flag (ARECnF is an extra formal).
541         (Next_Formal): Don't return ARECnF formal.
542         (Last_Formal): Don't consider ARECnF formal.
543         (Next_Formal_With_Extras): Do consider ARECnF formal.
544         * einfo.ads (Is_ARECnF_Entity): New flag (ARECnF is an extra formal).
545         * exp_unst.adb (Create_Entities): Set Is_ARECnF_Entity flag.
547 2015-03-04  Javier Miranda  <miranda@adacore.com>
549         * exp_ch6.adb (Expand_Simple_Function_Return): When the returned
550         object is a class-wide interface object and we generate the
551         accessibility described in RM 6.5(8/3) then displace the pointer
552         to the object to reference the base of the object (to get access
553         to the TSD of the object).
555 2015-03-04  Hristian Kirtchev  <kirtchev@adacore.com>
557         * sem_prag.adb (Analyze_Abstract_State): Use routine
558         Malformed_State_Error to issue general errors.
559         (Analyze_Pragma): Diagnose a syntax error related to a state
560         declaration with a simple option.
561         (Malformed_State_Error): New routine.
563 2015-03-04  Robert Dewar  <dewar@adacore.com>
565         * a-strsup.adb (Super_Slice): Deal with super flat case.
566         * einfo.ads: Minor reformatting.
567         * s-imgdec.adb (Set_Decimal_Digits): Add comment about possibly
568         redundant code.
570 2015-03-04  Claire Dross  <dross@adacore.com>
572         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
573         a-cforse.ads, a-cofove.ads: Use Default_Initial_Condition on formal
574         containers.
576 2015-03-04  Ed Schonberg  <schonberg@adacore.com>
578         * sem_warn.adb (Check_References): When checking for an unused
579         in-out parameter of a class- wide type, use its type to determine
580         whether it is private, in order to avoid a spurious warning when
581         subprogram spec and body are in different units.
583 2015-03-04  Yannick Moy  <moy@adacore.com>
585         * sem_attr.adb: Improve warning messages.
587 2015-03-04  Robert Dewar  <dewar@adacore.com>
589         * exp_ch6.adb (Expand_N_Subprogram_Body): Avoid trying to unnest
590         generic subprograms.
591         * exp_unst.adb (Check_Dynamic_Type): Handle record types properly
592         (Note_Uplevel_Reference): Ignore uplevel references to non-types
593         (Get_Level): Consider only subprograms, not blocks.
594         (Visit_Node): Set proper condition for generating ARECnF entity.
595         Ignore indirect calls. Ignore calls to subprograms
596         outside our nest.
597         (Unnest_Subprogram): Minor changes in dealing with ARECnF entity.
598         (Add_Form_To_Spec): Properly set Last_Entity field.
599         (Unnest_Subprogram): Set current subprogram scope for analyze calls.
600         Handle case of no uplevel refs in outer subprogram
601         Don't mark uplevel entities as aliased.
602         Don't deal with calls with no ARECnF requirement.
604 2015-03-04  Robert Dewar  <dewar@adacore.com>
606         * s-valrea.adb (Scan_Real): Remove redundant tests from scaling loops.
607         * s-imgdec.adb (Set_Decimal_Digits): Remove redundant Max
608         operation in computing LZ.
609         * sem_attr.adb: Minor typo fix
611 2015-03-04  Robert Dewar  <dewar@adacore.com>
613         * exp_ch7.adb: Minor reformatting.
614         * exp_unst.adb (Build_Tables): Fix minor glitch for no separate
615         spec case.
616         * erroutc.adb (Delete_Msg): add missing decrement of info msg counter.
618 2015-03-04  Hristian Kirtchev  <kirtchev@adacore.com>
620         * exp_ch6.adb (Build_Pragma_Check_Equivalent): Suppress
621         references to formal parameters subject to pragma Unreferenced.
622         (Suppress_Reference): New routine.
623         * sem_attr.adb (Analyze_Attribute): Reimplement the analysis
624         of attribute 'Old. Attributes 'Old and 'Result now share
625         common processing.
626         (Analyze_Old_Result_Attribute): New routine.
627         (Check_Placement_In_Check): Removed.
628         (Check_Placement_In_Contract_Cases): Removed.
629         (Check_Placement_In_Test_Case): Removed.
630         (Check_Use_In_Contract_Cases): Removed.
631         (Check_Use_In_Test_Case): Removed.
632         (In_Refined_Post): Removed.
633         (Is_Within): Removed.
634         * sem_warn.adb (Check_Low_Bound_Tested): Code cleanup.
635         (Check_Low_Bound_Tested_For): New routine.
637 2015-03-04  Hristian Kirtchev  <kirtchev@adacore.com>
639         * exp_ch3.adb (Expand_N_Object_Declaration):
640         Generate a runtime check to test the expression of pragma
641         Default_Initial_Condition when the object is default initialized.
643 2015-03-02  Robert Dewar  <dewar@adacore.com>
645         * scng.adb (Scan): Ignore illegal character in relaxed
646         semantics mode.
648 2015-03-02  Ed Schonberg  <schonberg@adacore.com>
650         * sem_ch4.adb (Analyze_Set_Membership); Retain Overloaded flag
651         on left operand, so it can be properly resolved with type of
652         alternatives of right operand.
653         * sem_res.adb (Resolve_Set_Membership): Handle properly an
654         overloaded left-hand side when the alternatives on the right
655         hand side are literals of some universal type.  Use first
656         non-overloaded alternative to find expected type.
658 2015-03-02  Ed Schonberg  <schonberg@adacore.com>
660         * exp_ch7.adb (Make_Set_Finalize_Address_Call): Use underlying
661         type to retrieve designated type, because the purported access
662         type may be a partial (private) view, when it is declared in
663         the private part of a nested package, and finalization actions
664         are generated when completing compilation of enclosing unit.
666 2015-03-02  Robert Dewar  <dewar@adacore.com>
668         * back_end.adb (Call_Back_End): Remove previous patch,
669         the back end now gets to see the result of -gnatd.1
670         (Unnest_Subprogram_Mode) processing.
671         * elists.ads, elists.adb (List_Length): New function.
672         * exp_unst.ads, exp_unst.adb: Major changes, first complete version.
673         * sem_util.adb (Check_Nested_Access): Handle formals in
674         Unnest_Subprogram_Mode.
675         (Adjust_Named_Associations): Minor reformatting.
676         * sprint.adb (Sprint_Node_Actual): Fix failure to print aliased
677         for parameters.
679 2015-03-02  Robert Dewar  <dewar@adacore.com>
681         * atree.ads, atree.adb (Uint24): New function
682         (Set_Uint24): New procedure.
683         * atree.h (Uint24): New macro for field access.
684         * back_end.adb (Call_Back_End): For now, don't call back end
685         if unnesting subprogs.
686         * einfo.adb (Activation_Record_Component): New field
687         (Subps_Index): New field.
688         * einfo.ads (Activation_Record_Component): New field
689         (Subps_Index): New field Minor reordering of comments into alpha order.
690         * exp_unst.ads, exp_unst.adb: Continued development.
692 2015-03-02  Gary Dismukes  <dismukes@adacore.com>
694         * exp_disp.ads: Minor reformatting.
696 2015-03-02  Ed Schonberg  <schonberg@adacore.com>
698         * sem_ch8.adb (Chain_Use_Clause): Do not chain use clause from
699         ancestor to list of use clauses active in descendant unit if we
700         are within the private part of an intervening parent, to prevent
701         circularities in use clause list.
703 2015-03-02  Javier Miranda  <miranda@adacore.com>
705         * exp_ch9.adb (Build_Corresponding_Record): Propagate type
706         invariants to the corresponding record type.
707         * exp_disp.ad[sb] (Set_DT_Position_Value): New subprogram
708         which sets the value of the DTC_Entity associated with a given
709         primitive of a tagged type and propagates the value to the
710         wrapped subprogram.
711         (Set_DTC_Entity_Value): Propagate the DTC
712         value to the wrapped entity.
713         * sem_ch13.adb (Build_Invariant_Procedure): Append the code
714         associated with invariants of progenitors.
715         * sem_ch3.adb (Build_Derived_Record_Type): Inherit type invariants
716         of parents and progenitors.
717         (Process_Full_View): Check hidden inheritance of class-wide type
718         invariants.
719         * sem_ch7.adb (Analyze_Package_Specification): Do not generate
720         the invariant procedure for interface types; build the invariant
721         procedure for tagged types inheriting invariants from their
722         progenitors.
723         * sem_prag.adb (Pragma_Invariant) Allow invariants in interface
724         types but do not build their invariant procedure since their
725         invariants will be propagated to the invariant procedure of
726         types covering the interface.
727         * exp_ch6.adb, exp_disp.adb, sem_ch3.adb, sem_ch7.adb,
728         sem_ch8.adb, sem_disp.adb: Replace all calls to Set_DT_Position
729         by calls to Set_DT_Position_Value.
731 2015-03-02  Hristian Kirtchev  <kirtchev@adacore.com>
733         * sem_attr.adb (Analyze_Attribute): Factor out heavily indented
734         code in Denote_Same_Function.  Do not analyze attribute 'Result
735         when it is inside procedure _Postconditions.  Remove a misplaced
736         warning diagnostic. Code cleanup.
737         (Denote_Same_Function): New routine.
738         * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Code
739         cleanup. Warn on pre/postconditions on an inlined subprogram.
740         (Analyze_Pragma, Refined_Post case): Warn on pre/postconditions on
741         an inlined subprogram.
742         (Analyze_Pre_Post_Condition_In_Decl_Part): Code cleanup. Warn on
743         pre/post condition on an inlined subprogram.
744         (Analyze_Test_Case_In_Decl_Part): Code cleanup. Warn on
745         pre/postconditions on an inlined subprogram.
746         (Check_Postcondition_Use_In_Inlined_Subprogram): New routine.
748 2015-03-02  Hristian Kirtchev  <kirtchev@adacore.com>
750         * sem_prag.adb (Ensure_Aggregate_Form):
751         Ensure that the name denoted by the Chars of a pragma argument
752         association has the proper Sloc when converted into an aggregate.
754 2015-03-02  Bob Duff  <duff@adacore.com>
756         * sem_ch6.adb (Check_Private_Overriding): Capture
757         Incomplete_Or_Partial_View in a constant. This is cleaner and
758         more efficient.
760 2015-03-02  Gary Dismukes  <dismukes@adacore.com>
762         * einfo.ads, exp_unst.ads: Minor reformatting.
764 2015-03-02  Ed Schonberg  <schonberg@adacore.com>
766         * a-strsea.adb (Find_Token): Ensure that the range of iteration
767         does not perform any improper character access. This prevents
768         erroneous access in the unusual case of an empty string target
769         and a From parameter less than Source'First.
771 2015-03-02  Robert Dewar  <dewar@adacore.com>
773         * elists.adb (List_Length): Fix incorrect result.
775 2015-03-02  Bob Duff  <duff@adacore.com>
777         * sem_ch6.adb (Check_Private_Overriding): Refine the legality
778         checks here. It used to check that the function is merely
779         overriding SOMEthing. Now it checks that the function is
780         overriding a corresponding public operation. This is a correction
781         to the implementation of the rule in RM-3.9.3(10).
783 2015-03-02  Robert Dewar  <dewar@adacore.com>
785         * debug.adb: Document new debug flag -gnatd.1.
786         * einfo.ads, einfo.adb (Has_Nested_Subprogram): New flag.
787         (Has_Uplevel_Reference): New flag (Is_Static_Type): New flag.
788         (Uplevel_Reference_Noted):New flag (Uplevel_References): New field.
789         * elists.ads elists.adb (List_Length): New function.
790         * exp_ch6.adb (Expand_N_Subprogram_Body): Call Unnest_Subprogram
791         when appropriate (Process_Preconditions): Minor code
792         reorganization and reformatting
793         * exp_unst.ads, exp_unst.adb: New files.
794         * gnat1drv.adb (Adjust_Global_Switches): Set
795         Unnest_Subprogram_Mode if -gnatd.1
796         * namet.ads, namet.adb (Name_Find_Str): New version of Name_Find with
797         string argument.
798         * opt.ads (Unnest_Subprogram_Mode): New flag.
799         * par-ch3.adb (P_Identifier_Declarations): Fixes to -gnatd.2 handling.
800         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set
801         Has_Nested_Subprogram flag.
802         * sem_ch8.adb (Find_Direct_Name): New calling sequence for
803         Check_Nested_Access.
804         (Find_Selected_Component): Minor comment addition.
805         * sem_util.adb (Check_Nested_Access): New version for use with Exp_Unst.
806         (Note_Possible_Modification): New calling sequence for
807         Check_Nested_Access.
808         * sem_util.ads (Check_Nested_Access): New version for use with Exp_Unst.
809         * gcc-interface/Make-lang.in (GNAT1_OBJS): Add exp_unst.o
811 2015-03-02  Pierre-Marie de Rodat  <derodat@adacore.com>
813         * gcc-interface/utils.c (gnat_pushdecl): For non-artificial pointer
814         types, preserve the original type and create copies just like the C
815         front-end does.  For artificial ones, do not define a name for
816         the original type.
817         (create_type_decl): When gnat_pushdecl made the input type the
818         original type for the new declaration, do not define a stub
819         declaration for it.
820         * gcc-interface/utils2.c (build_binary_op): Accept two different
821         pointer types when they point to the same type.
823 2015-03-02  Hristian Kirtchev  <kirtchev@adacore.com>
825         * exp_util.adb (Possible_Bit_Aligned_Component): Do not process
826         an unanalyzed node.
827         * sem_util.adb (Kill_Current_Values): Do not invalidate and
828         de-null a constant.
830 2015-03-02  Robert Dewar  <dewar@adacore.com>
832         * sem_ch3.adb, exp_attr.adb, checks.adb, exp_aggr.adb: Minor
833         reformatting.
835 2015-03-02  Ed Schonberg  <schonberg@adacore.com>
837         * sem_ch8.adb: extend use of Available_Subtype.
839 2015-03-02  Hristian Kirtchev  <kirtchev@adacore.com>
841         * sem_prag.adb (Duplication_Error): Remove the special handling
842         of 'Class or _Class in the context of pre/postconditions.
843         (Process_Class_Wide_Condition): Remove the special handling of
844         'Class or _Class in the context of pre/postconditions.
845         * sem_util.adb (Original_Aspect_Pragma_Name): Names Pre_Class
846         and Post_Class no longer need to be converted to _Pre and _Post.
847         * sem_util.ads (Original_Aspect_Pragma_Name): Update the comment
848         on usage.
850 2015-03-02  Hristian Kirtchev  <kirtchev@adacore.com>
852         * exp_ch6.adb (Process_Preconditions): Modify the
853         mechanism that find the first source declaration to correct exit
854         the loop once it has been found.
856 2015-03-02  Gary Dismukes  <dismukes@adacore.com>
858         * a-strsea.adb: Minor typo fix.
860 2015-03-02  Bob Duff  <duff@adacore.com>
862         * einfo.ads: Minor comment fixes.
864 2015-03-02  Gary Dismukes  <dismukes@adacore.com>
866         * einfo.adb, checks.adb: Minor reformatting and typo fixes.
868 2015-03-02  Ed Schonberg  <schonberg@adacore.com>
870         * exp_aggr.adb (Get_Assoc_Expr): If the Default_Component_Value
871         is defined for the array type, use it instead of a Default_Value
872         specified for the component type itself.
874 2015-03-02  Thomas Quinot  <quinot@adacore.com>
876         * exp_attr.adb (Expand_N_Attribute_Reference, case Input): When
877         expanding a 'Input attribute reference for a class-wide type,
878         do not generate a separate object declaration for the controlling
879         tag dummy object; instead, generate the expression inline in the
880         dispatching call. Otherwise, the declaration (which involves a
881         call to String'Input, returning a dynamically sized value on the
882         secondary stack) will be expanded outside of proper secondary
883         stack mark/release operations, and will thus cause a secondary
884         stack leak.
886 2015-03-02  Hristian Kirtchev  <kirtchev@adacore.com>
888         * checks.adb (Add_Validity_Check): Change the names of all
889         formal parameters to better illustrate their purpose. Update
890         the subprogram documentation. Update all occurrences of the
891         formal parameters. Generate a pre/postcondition pragma by
892         calling Build_Pre_Post_Condition.
893         (Build_PPC_Pragma): Removed.
894         (Build_Pre_Post_Condition): New routine.
895         * einfo.adb Node8 is no longer used as Postcondition_Proc. Node14
896         is now used as Postconditions_Proc. Flag240 is now renamed to
897         Has_Expanded_Contract.  (First_Formal): The routine can now
898         operate on generic subprograms.
899         (First_Formal_With_Extras): The routine can now operate on generic
900         subprograms.
901         (Has_Expanded_Contract): New routine.
902         (Has_Postconditions): Removed.
903         (Postcondition_Proc): Removed.
904         (Postconditions_Proc): New routine.
905         (Set_Has_Expanded_Contract): New routine.
906         (Set_Has_Postconditions): Removed.
907         (Set_Postcondition_Proc): Removed.
908         (Set_Postconditions_Proc): New routine.
909         (Write_Entity_Flags): Remove the output of Has_Postconditions. Add
910         the output of Has_Expanded_Contract.
911         (Write_Field8_Name): Remove the output of Postcondition_Proc.
912         (Write_Field14_Name): Add the output of Postconditions_Proc.
913         * einfo.ads New attributes Has_Expanded_Contract and
914         Postconditions_Proc along with occurrences in entities.
915         Remove attributes Has_Postconditions and Postcondition_Proc
916         along with occurrences in entities.
917         (Has_Expanded_Contract): New routine along with pragma Inline.
918         (Has_Postconditions): Removed along with pragma Inline.
919         (Postcondition_Proc): Removed along with pragma Inline.
920         (Postconditions_Proc): New routine along with pragma Inline.
921         (Set_Has_Expanded_Contract): New routine along with pragma Inline.
922         (Set_Has_Postconditions): Removed along with pragma Inline.
923         (Set_Postcondition_Proc): Removed along with pragma Inline.
924         (Set_Postconditions_Proc): New routine along with pragma Inline.
925         * exp_ch6.adb (Add_Return): Code cleanup. Update the
926         generation of the call to the _Postconditions routine of
927         the procedure.  (Expand_Non_Function_Return): Reformat the
928         comment on usage. Code cleanup.  Update the generation of
929         the call to the _Postconditions routine of the procedure or
930         entry [family].
931         (Expand_Simple_Function_Return): Update the
932         generation of the _Postconditions routine of the function.
933         (Expand_Subprogram_Contract): Reimplemented.
934         * exp_ch6.ads (Expand_Subprogram_Contract): Update the parameter
935         profile along the comment on usage.
936         * exp_ch9.adb (Build_PPC_Wrapper): Code cleanup.
937         (Expand_N_Task_Type_Declaration): Generate pre/postconditions
938         wrapper when the entry [family] has a contract with
939         pre/postconditions.
940         * exp_prag.adb (Expand_Attributes_In_Consequence): New routine.
941         (Expand_Contract_Cases): This routine and its subsidiaries now
942         analyze all generated code.
943         (Expand_Old_In_Consequence): Removed.
944         * sem_attr.adb Add with and use clause for Sem_Prag.
945         (Analyze_Attribute): Reimplment the analysis of attribute 'Result.
946         (Check_Use_In_Test_Case): Use routine Test_Case_Arg to obtain
947         "Ensures".
948         * sem_ch3.adb (Analyze_Declarations): Analyze the contract of
949         a generic subprogram.
950         (Analyze_Object_Declaration): Do not create a contract node.
951         (Derive_Subprogram): Do not create a contract node.
952         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Do
953         not create a contract node.
954         (Analyze_Completion_Contract): New routine.
955         (Analyze_Function_Return): Alphabetize.
956         (Analyze_Generic_Subprogram_Body): Alphabetize. Do not create a
957         contract node.  Do not copy pre/postconditions to the original
958         generic template.
959         (Analyze_Null_Procedure): Do not create a contract node.
960         (Analyze_Subprogram_Body_Contract): Reimplemented.
961         (Analyze_Subprogram_Body_Helper): Do not mark the enclosing scope
962         as having postconditions. Do not create a contract node. Analyze
963         the subprogram body contract of a body that acts as a compilation
964         unit. Expand the subprogram contract after the declarations have
965         been analyzed.
966         (Analyze_Subprogram_Contract): Reimplemented.
967         (Analyze_Subprogram_Specification): Do not create a contract node.
968         (List_Inherited_Pre_Post_Aspects): Code cleanup.
969         * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Update the
970         comment on usage.
971         (Analyze_Subprogram_Contract): Update the
972         parameter profile and the comment on usage.
973         * sem_ch7.adb (Analyze_Package_Body_Helper): Do not create a
974         contract node.
975         (Analyze_Package_Declaration): Do not create a
976         contract node.
977         (Is_Subp_Or_Const_Ref): Ensure that the prefix has an entity.
978         * sem_ch8.adb (Analyze_Subprogram_Renaming): Do not create a
979         contract node.
980         * sem_ch9.adb (Analyze_Entry_Declaration): Do not create a
981         contract node.
982         * sem_ch10.adb (Analyze_Compilation_Unit): Move local variables to
983         their proper section and alphabetize them. Analyze the contract of
984         a [generic] subprogram after all Pragmas_After have been analyzed.
985         (Analyze_Subprogram_Body_Stub_Contract): Alphabetize.
986         * sem_ch12.adb (Analyze_Generic_Package_Declaration): Do not
987         create a contract node.
988         (Analyze_Generic_Subprogram_Declaration):
989         Alphabetize local variables. Do not create a contract
990         node. Do not generate aspects out of pragmas for ASIS.
991         (Analyze_Subprogram_Instantiation): Instantiate
992         the contract of the subprogram.  Do not create a
993         contract node.  (Instantiate_Contract): New routine.
994         (Instantiate_Subprogram_Body): Alphabetize local variables.
995         (Save_Global_References_In_Aspects): New routine.
996         (Save_References): Do not save the global references found within
997         the aspects of a generic subprogram.
998         * sem_ch12.ads (Save_Global_References_In_Aspects): New routine.
999         * sem_ch13.adb (Analyze_Aspect_Specifications): Do not use
1000         Original_Node for establishing linkages.
1001         (Insert_Pragma): Insertion in a subprogram body takes precedence over
1002         the case where the subprogram body is also a compilation unit.
1003         * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Use
1004         Get_Argument to obtain the proper expression. Install the generic
1005         formals when the related context is a generic subprogram.
1006         (Analyze_Depends_In_Decl_Part): Use Get_Argument to obtain
1007         the proper expression. Use Corresponding_Spec_Of to obtain
1008         the spec. Install the generic formal when the related context
1009         is a generic subprogram.
1010         (Analyze_Global_In_Decl_Part): Use Get_Argument to obtain the proper
1011         expression. Use Corresponding_Spec_Of to obtain the spec. Install the
1012         generic formal when the related context is a generic subprogram.
1013         (Analyze_Initial_Condition_In_Decl_Part): Use Get_Argument
1014         to obtain the proper expression. Remove the call to
1015         Check_SPARK_Aspect_For_ASIS as the analysis is now done
1016         automatically.
1017         (Analyze_Pragma): Update all occurrences
1018         to Original_Aspect_Name. Pragmas Contract_Cases, Depends,
1019         Extensions_Visible, Global, Postcondition, Precondition and
1020         Test_Case now carry generic templates when the related context
1021         is a generic subprogram. The same pragmas are no longer
1022         forcefully fully analyzed when the context is a subprogram
1023         that acts as a compilation unit. Pragmas Abstract_State,
1024         Initial_Condition, Initializes and Refined_State have been clean
1025         up. Pragmas Post, Post_Class, Postcondition, Pre, Pre_Class
1026         and Precondition now use the same routine for analysis. Pragma
1027         Refined_Post does not need to check the use of 'Result or
1028         the lack of a post-state in its expression. Reimplement the
1029         analysis of pragma Test_Case.
1030         (Analyze_Pre_Post_Condition): New routine.
1031         (Analyze_Pre_Post_Condition_In_Decl_Part):
1032         Reimplemented.
1033         (Analyze_Refined_Depends_In_Decl_Part): Use Get_Argument to obtain the
1034         proper expression.
1035         (Analyze_Refined_Global_In_Decl_Part): Use Get_Argument to obtain
1036         the proper expression.
1037         (Analyze_Test_Case_In_Decl_Part): Reimplemented.
1038         (Check_Pre_Post): Removed.
1039         (Check_Precondition_Postcondition): Removed.
1040         (Check_SPARK_Aspect_For_ASIS): Removed.
1041         (Check_Test_Case): Removed.
1042         (Collect_Subprogram_Inputs_Outputs): Use Get_Argument
1043         to obtain the proper expression. Use Corresponding_Spec_Of to
1044         find the proper spec.
1045         (Create_Generic_Template): New routine.
1046         (Duplication_Error): New routine.
1047         (Expression_Function_Error): New routine.
1048         (Find_Related_Subprogram_Or_Body): Moved to the spec
1049         of Sem_Prag. Emit precise error messages. Account for cases of
1050         rewritten expression functions, generic instantiations, handled
1051         sequence of statements and pragmas from aspects.
1052         (Get_Argument): New routine.
1053         (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Removed.
1054         (Preanalyze_CTC_Args): Removed.
1055         (Process_Class_Wide_Condition): New routine.
1056         * sem_prag.ads (Analyze_Test_Case_In_Decl_Part): Update
1057         the parameter profile along with the comment on usage.
1058         (Find_Related_Subprogram_Or_Body): Moved from the body of Sem_Prag.
1059         (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Removed.
1060         (Test_Case_Arg): New routine.
1061         * sem_util.adb Add with and use clauses for Sem_Ch6.
1062         (Add_Contract_Item): This routine now creates a contract
1063         node the first time an item is added. Remove the duplicate
1064         aspect/pragma checks.
1065         (Check_Result_And_Post_State): Reimplemented.
1066         (Corresponding_Spec_Of): New routine.
1067         (Get_Ensures_From_CTC_Pragma): Removed.
1068         (Get_Requires_From_CTC_Pragma): Removed.
1069         (Has_Significant_Contract): New routine.
1070         (Inherit_Subprogram_Contract): Inherit only if the source
1071         has a contract.
1072         (Install_Generic_Formals): New routine.
1073         (Original_Aspect_Name): Removed.
1074         (Original_Aspect_Pragma_Name): New routine.
1075         * sem_util.ads (Check_Result_And_Post_State): Reimplemented.
1076         (Corresponding_Spec_Of): New routine.
1077         (Get_Ensures_From_CTC_Pragma): Removed.
1078         (Get_Requires_From_CTC_Pragma): Removed.
1079         (Has_Significant_Contract): New routine.
1080         (Install_Generic_Formals): New routine.
1081         (Original_Aspect_Name): Removed.
1082         (Original_Aspect_Pragma_Name): New routine.
1083         * sem_warn.adb Add with and use clauses for Sem_Prag.
1084         (Within_Postcondition): Use Test_Case_Arg to extract "Ensures".
1086 2015-03-02  Ed Schonberg  <schonberg@adacore.com>
1088         * sem_ch8.adb (Available_Subtype): Optimization in
1089         Find_Selected_Component: when safe, use existing subtype of
1090         array component, possibly discriminant-dependent, rather than
1091         creating new subtype declaration for it. In this fashion different
1092         occurrences of the component have the same subtype, rather than
1093         just equivalent ones. Simplifies value tracing in GNATProve.
1095 2015-03-01  Arnaud Charlet  <charlet@adacore.com>
1097         PR ada/65259
1099         * doc/gnat_ugn/gnat_project_manager.rst,
1100         doc/gnat_ugn/platform_specific_information.rst: Remove reference to
1101         image, too troublesome with texi format.
1102         * gnat_ugn.texi: Regenerate.
1104 2015-02-24  Thomas Schwinge  <thomas@codesourcery.com>
1106         PR libgomp/64625
1107         * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8): Remove.
1108         (DEF_FUNCTION_TYPE_VAR_12): Likewise.
1109         (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
1111 2015-02-23  Thomas Schwinge  <thomas@codesourcery.com>
1113         * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8): Fix number of
1114         arguments parameter.
1115         (DEF_FUNCTION_TYPE_VAR_12): Likewise.
1117 2015-02-22  Arnaud Charlet  <charlet@adacore.com>
1119         * doc/Makefile: postprocess texinfo files to update @dircategory
1120         and update texi files under gcc/ada.
1121         * gnat_ugn.texi, gnat_rm.texi: Regenerated.
1123 2015-02-22  Arnaud Charlet  <charlet@adacore.com>
1125         * doc/gnat_ugn/project-manager-figure.png,
1126         doc/gnat_ugn/rtlibrary-structure.png: New.
1128 2015-02-22  Tom de Vries  <tom@codesourcery.com>
1130         PR ada/65100
1131         * gnat-style.texi (@subsection Loop Statements): Replace @noindent by
1132         @item, and fix warning '@itemize has text but no @item'.
1134 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
1136         * sem_prag.adb (Analyze_Pragma, case Obsolescent): Pragma
1137         legally applies to an abstract subprogram declaration.
1138         * freeze.adb: Minor comment addition.
1140 2015-02-20  Robert Dewar  <dewar@adacore.com>
1142         * errout.ads: Document replacement of Name_uPre/Post/Type_Invariant.
1143         * erroutc.adb (Set_Msg_Str): Replace _xxx.
1144         (Pre/Post/Type_Invariant) by xxx'Class.
1145         * erroutc.ads (Set_Msg_Str): Replace _xxx.
1146         (Pre/Post/Type_Invariant) by xxx'Class.
1147         * sem_prag.adb (Fix_Error): Remove special casing of
1148         Name_uType_Invariant.
1149         (Analyze_Pre_Post_Condition_In_Decl_Part): Remove special casing of
1150         Name_uPre and Name_uPost in aspect case (done in Errout now).
1152 2015-02-20  Robert Dewar  <dewar@adacore.com>
1154         * g-alveop.adb: Minor style fixes.
1156 2015-02-20  Robert Dewar  <dewar@adacore.com>
1158         * freeze.adb (Warn_Overlay): Guard against blow up with address
1159         clause.
1161 2015-02-20  Bob Duff  <duff@adacore.com>
1163         * exp_attr.adb (May_Be_External_Call): Remove this. There is no need
1164         for the compiler to guess whether the call is internal or external --
1165         it is always external.
1166         (Expand_Access_To_Protected_Op): For P'Access, where P
1167         is a protected subprogram, always create a pointer to the
1168         External_Subprogram.
1170 2015-02-20  Robert Dewar  <dewar@adacore.com>
1172         * a-dispat.adb, a-stcoed.ads: Minor reformatting.
1174 2015-02-20  Robert Dewar  <dewar@adacore.com>
1176         * sem_ch13.adb (Build_Discrete_Static_Predicate): Allow static
1177         predicate for non-static subtype.
1178         (Build_Predicate_Functions): Do not assume subtype associated with a
1179         static predicate must be static.
1181 2015-02-20  Robert Dewar  <dewar@adacore.com>
1183         * errout.adb (Set_Msg_Node): Better handling of internal names
1184         (Set_Msg_Node): Kill message when we cannot eliminate internal name.
1185         * errout.ads: Document additional case of message deletion.
1186         * namet.adb (Is_Internal_Name): Refined to consider wide
1187         strings in brackets notation and character literals not to be
1188         internal names.
1189         * sem_ch8.adb (Find_Selected_Component): Give additional error
1190         when selector name is a subprogram whose first parameter has
1191         the same type as the prefix, but that type is untagged.
1193 2015-02-20  Robert Dewar  <dewar@adacore.com>
1195         * g-allein.ads, g-alveop.adb, g-alveop.ads, opt.ads: Minor reformatting
1197 2015-02-20  Tristan Gingold  <gingold@adacore.com>
1199         * opt.ads (GNAT_Mode_Config): New variable.
1200         * opt.adb (Set_Opt_Config_Switches): Consider GNAT_Mode_Config
1201         to set Assertions_Enabled.
1202         * switch-c.adb (Scan_Front_End_Switches): Set GNAT_Mode_Config
1203         for -gnatg.
1205 2015-02-20  Robert Dewar  <dewar@adacore.com>
1207         * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Add an additional
1208         comment regarding the handling of unterminated fixed-point
1209         constants.
1210         * s-valuns.ads (Scan_Raw_Unsigned): Add comments
1211         corresponding to those previously added for
1212         System.Val_LLU.Scan_Raw_Long_Long_Unsigned.
1214 2015-02-20  Olivier Hainque  <hainque@adacore.com>
1216         * g-allein.ads, g-alveop.ads, g-alveop.adb: Code clean ups.
1218 2015-02-20  Robert Dewar  <dewar@adacore.com>
1220         * sem_prag.adb: Minor comment clarification.
1222 2015-02-20  Olivier Hainque  <hainque@adacore.com>
1224         * g-allein.ads (vec_ctf, vec_vcsfx, vec_vcfux): Remove.
1225         * g-alleve.ads, g-alleva.adb (vcfux): Likewise.
1226         * g-alveop.ads (vec_vcfsx, vec_vcfux): Just rename the ll versions.
1227         (vec_ctf): Now renamings as well.
1229 2015-02-20  Robert Dewar  <dewar@adacore.com>
1231         * switch-c.adb, bindgen.adb: Minor reformatting.
1233 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
1235         * sem_prag.adb (Analyze_Pragma, case Type_Invariant):
1236         Invariant'class is allowed on an abstract type.
1238 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
1240         * sem_ch3.adb (Access_Definition): If the access definition is
1241         for a protected component and defines an access to protected
1242         subprogram, do not create an itype reference for it because a
1243         full type declaration will be built in order to generate the
1244         proper equivalent type.
1245         (Analyze_Subtype_Declaration): Add information of incomplete
1246         subtypes, for Ada 2012 extended uses of incomplete types.
1248 2015-02-20  Gary Dismukes  <dismukes@adacore.com>
1250         * sem_res.adb: Minor reformatting.
1252 2015-02-20  Vincent Celier  <celier@adacore.com>
1254         * switch-c.adb (Scan_Front_End_Switches): When comparing runtime
1255         path name for several switches --RTS, use the normalized path
1256         names.
1258 2015-02-20  Vincent Celier  <celier@adacore.com>
1260         * bindgen.adb: Minor reformatting and code reorganization.
1262 2015-02-20  Jose Ruiz  <ruiz@adacore.com>
1264         * a-stcoed.ads: Add spec for this package (Unimplemented_Unit).
1265         * impunit.adb (Non_Imp_File_Names_12): Mark unit a-stcoed.ads as
1266         defined by Ada 2012.
1268 2015-02-20  Arnaud Charlet  <charlet@adacore.com>
1270         * sysdep.c, expect.c, s-oscons-tmplt.c, gsocket.h, adaint.c: Remove
1271         obsolete references to RTX, nucleus, VMS.
1273 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
1275         * sem_prag.adb (Fix_Error): For an illegal Type_Invariant'Class
1276         aspect, use name that mentions Class explicitly, rather than
1277         compiler-internal name.
1279 2015-02-20  Robert Dewar  <dewar@adacore.com>
1281         * debug.adb: Add documentation for -gnatd.2 (allow statements
1282         in decl sequences).
1283         * par-ch3.adb (P_Identifier_Declarations): Handle
1284         statement appearing where declaration expected more cleanly.
1285         (Statement_When_Declaration_Expected): Implement debug flag
1286         -gnatd.2.
1288 2015-02-20  Jose Ruiz  <ruiz@adacore.com>
1290         * a-dinopr.ads: Add spec for this package (Unimplemented_Unit).
1291         * a-dispat.ads (Yield): Include procedure added in Ada 2012.
1292         * a-dispat.adb (Yield): Implement procedure added in Ada 2012.
1293         * impunit.adb (Non_Imp_File_Names_05): Mark unit a-dinopr.ads as
1294         defined by Ada 2005.
1295         * snames.ads-tmpl (Name_Non_Preemptive_FIFO_Within_Priorities):
1296         This is the correct name for the dispatching policy (FIFO was
1297         missing).
1299 2015-02-20  Javier Miranda  <miranda@adacore.com>
1301         * sem_res.adb (Resolve_Type_Conversion): If the type of the
1302         operand is the limited-view of a class-wide type then recover
1303         the class-wide type of the non-limited view.
1305 2015-02-20  Arnaud Charlet  <charlet@adacore.com>
1307         * gcc-interface/Makefile.in: Remove references to nucleus.
1308         * gcc-interface/decl.c (gnat_to_gnu_entity, case E_Procedure): Set
1309         extern_flag to true for Inline_Always subprograms with
1310         Intrinsic convention.
1312 2015-02-20  Yannick Moy  <moy@adacore.com>
1314         * sem_prag.ads: Minor typo in comment.
1316 2015-02-20  Pascal Obry  <obry@adacore.com>
1318         * s-osprim-mingw.adb: Fix Get_Base_Time parameter mode.
1320 2015-02-20  Vincent Celier  <celier@adacore.com>
1322         * makeutl.adb (Get_Directories.Add_Dir): Add a directory only
1323         if it exists.
1325 2015-02-20  Robert Dewar  <dewar@adacore.com>
1327         * sem_eval.ads: Minor reformatting.
1329 2015-02-20  Eric Botcazou  <ebotcazou@adacore.com>
1331         * freeze.adb (Size_Known): Do not set the packed size for
1332         independent type or component.
1333         (Freeze_Array_Type): Check for Independent[_Components] with packing
1334         or explicit component size clause.
1335         * gnat1drv.adb (Post_Compilation_Validation_Checks): Do the validation
1336         of independence pragmas only for non-GCC back-ends.
1337         * sem_ch13.adb (Initialize): Likewise for the initialization.
1338         * sem_prag.adb (Record_Independence_Check): New procedure to record an
1339         independence check in the table.
1340         (Analyze_Pragma): Use it throughout instead of doing it manually.
1341         * gcc-interface/decl.c (gnat_to_gnu_field): Add support for
1342         independent type or component.
1344 2015-02-20  Thomas Quinot  <quinot@adacore.com>
1346         * adaint.c (__gnat_readdir): For Solaris, use 64 bit variants of
1347         struct direct and readdir. This is required for NFS filesystems
1348         mounted from servers that use 64-bit cookies.
1350 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
1352         * sem_ch12.adb (Analyze_Subprogram_Instantiaion): New subprogram
1353         Build_Subprogram_Renaming, to create renaming of subprogram
1354         instance in the the declaration of the wrapper package rather
1355         than in its body, so that it is available for analysis of aspects
1356         propagated from generic to instantiation.
1357         (Check_Mismatch): An actual for a formal package that is an
1358         incomplete type matches a formal type that is incomplete.
1359         (Instantiate_Package_Body): Move code that builds subprogram
1360         renaming to Analyze_Subprogram_Instantiation.
1361         (Instantiate_Type): The generated subtype is a limited view if
1362         the actual is a limited view.
1363         (Load_Parent_Of_Generic): Retrieve instance declaration from
1364         its new position within wrapper package.
1366 2015-02-20  Arnaud Charlet  <charlet@adacore.com>
1368         * s-parame-vxworks.adb, s-os_lib.ads: Update comments.
1370 2015-02-20  Robert Dewar  <dewar@adacore.com>
1372         * s-osinte-vxworks.ads (To_Timespec): Add comment about the
1373         issue of negative arguments.
1375 2015-02-20  Eric Botcazou  <ebotcazou@adacore.com>
1377         * gnat1drv.adb: Minor consistency fix.
1379 2015-02-20  Pascal Obry  <obry@adacore.com>
1381         * s-osprim-mingw.adb (Get_Base_Time): Properly release lock in all
1382         paths.
1384 2015-02-20  Eric Botcazou  <ebotcazou@adacore.com>
1386         * inline.adb (Expand_Inlined_Call): Skip again calls to subprogram
1387         renamings.
1388         * exp_ch6.adb (Expand_Call): Use back-end inlining
1389         instead of expansion for simple subprogram renamings.
1391 2015-02-20  Robert Dewar  <dewar@adacore.com>
1393         * exp_util.adb: Minor reformatting.
1395 2015-02-20  Vincent Celier  <celier@adacore.com>
1397         * switch-c.adb (Scan_Front_End_Switches): Do not fail when --RTS=
1398         is specified several times with different values that indicates
1399         the same runtime directory.
1401 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
1403         * sem_attr.adb (Check_Not_Incomplete_Type): Clean up code to
1404         handle properly illegal uses of attributes on prefixes on an
1405         incomplete type, both when the type of the prefix is locally
1406         incomplete, and when it is a limited view of a type whose
1407         non-limited view is not available.
1408         (Analyze_Attribute): Add calls to Check_Not_Incomplete_Type for
1409         'Address and others.
1411 2015-02-20  Eric Botcazou  <ebotcazou@adacore.com>
1413         * exp_ch6.adb: Fix minor typo in comment.
1415 2015-02-20  Eric Botcazou  <ebotcazou@adacore.com>
1417         * sinfo.ads: Add comment.
1419 2015-02-20  Olivier Hainque  <hainque@adacore.com>
1421         * opt.ads: Replace Opt.Suppress_All_Inlining by two separate
1422         flags controlling the actual FE inlining out of pragma Inline
1423         and pragma Inline_Always.
1424         * adabkend.adb (Scan_Compiler_Arguments): Set both flags to True
1425         on -fno-inline, which disables all inlining in compilers with
1426         an Ada back-end and without back-end inlining support.
1427         * back_end.adb (Scan_Back_End_Switches): Set the Inline related
1428         flag to True on -fno-inline and leave Inline_Always alone for
1429         gcc back-ends.
1430         * back_end.ads (Scan_Compiler_Arguments): Adjust spec wrt the
1431         names of the Opt flags it sets.
1432         * gnat1drv.adb (Adjust_Global_Switches): Remove test on
1433         Opt.Suppress_All_Inlining in the Back_End_Inlining computation.
1434         * sem_prag.adb (Make_Inline): Remove early return conditioned
1435         on Opt.Suppress_All_Inlining.
1436         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Use the flags to
1437         disable the calls to Build_Body_To_Inline otherwise triggered
1438         by pragma Inline or Inline_Always. This will prevent actual
1439         front-end inlining of the subprogram on calls.
1441 2015-02-20  Eric Botcazou  <ebotcazou@adacore.com>
1443         * exp_ch3.adb (Default_Initialize_Object): Call Add_Inlined_Body on the
1444         Abort_Undefer_Direct function.
1445         * exp_ch5.adb (Expand_N_Assignment_Statement): Likewise.
1446         * exp_intr.adb (Expand_Unc_Deallocation): Likewise.
1447         * exp_prag.adb (Expand_Pragma_Abort_Defer): Likewise.
1448         * exp_ch4.adb (Expand_N_Selected_Component): Adjust call to
1449         Add_Inlined_Body.
1450         * exp_ch6.adb (Expand_Call): Adjust calls to Add_Inlined_Body.
1451          Remove call to Register_Backend_Call and move code resetting
1452         Needs_Debug_Info on inlined subprograms to...
1453         * inline.ads (Add_Inlined_Body): Add N parameter.
1454         (Register_Backend_Call): Delete.
1455         * inline.adb (Add_Inlined_Body): ...here and simplify.
1456          Register the call with Backend_Calls directly.
1457         (Register_Backend_Call): Delete.
1458         * s-stalib.ads (Abort_Undefer_Direct): Restore pragma Inline.
1460 2015-02-20  Eric Botcazou  <ebotcazou@adacore.com>
1462         * s-stalib.ads: Fix typo.
1464 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
1466         * exp_ch3.adb (Default_Initialize_Object): If the object has a
1467         delayed freeze, the actions associated with default initialization
1468         must be part of the freeze actions, rather that being inserted
1469         directly after the object declaration.
1471 2015-02-20  Robert Dewar  <dewar@adacore.com>
1473         * lib-load.adb: Minor comment update.
1475 2015-02-20  Vincent Celier  <celier@adacore.com>
1477         * prj-proc.adb (Process_Case_Construction): When there are
1478         incomplete withed projects and the case variable is unknown,
1479         skip the case construction.
1481 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
1483         * exp_ch6.adb (Expand_Actuals): Add caller-side invariant checks
1484         when an actual is a view conversion, either because the call is
1485         to an inherited operation, or because the actual is an explicit
1486         type conversion to an ancestor type.  Fixes ACATS 4.0D: C732001
1488 2015-02-20  Robert Dewar  <dewar@adacore.com>
1490         * einfo.ads: Minor comment updates Fix missing pragma Inline
1491         for Set_Partial_View_Has_Unknown_Discr.
1492         * einfo.adb (Write_Entity_Flags): Add missing entry for
1493         Partial_View_Has_Unknown_Discr.
1494         * sem_ch3.adb: Minor reformatting.
1496 2015-02-20  Vincent Celier  <celier@adacore.com>
1498         * opt.ads: Minor cleanup: remove mention of gprmake.
1499         * s-stalib.ads (Abort_Undefer_Direct): Do not inline.
1500         * s-tataat.adb: Do not call System.Tasking.Self but directly
1501         System.Task_Primitives.Operations.Self.
1503 2015-02-20  Arnaud Charlet  <charlet@adacore.com>
1505         * gnat_rm.texi, gnat_ugn.texi: Now automatically generated from
1506         sphinx in the doc directory.
1507         * doc: New directory containing sphinx versions of gnat_rm and gnat_ugn
1509 2015-02-20  Robert Dewar  <dewar@adacore.com>
1511         * sem_res.adb: Minor reformatting.
1512         * exp_ch9.adb (Build_Protected_Spec): Copy Aliased setting when
1513         building spec.
1514         * sem_ch13.adb (Analyze_Aspect_Specifications): Exclude Boolean
1515         aspects from circuitry setting delay required to false if the
1516         argument is an integer literal.
1518 2015-02-20  Ed Schonberg  <schonberg@adacore.com>
1520         * einfo.ads. einfo.adb (Partial_View_Has_Unknown_Discr):  New flag
1521         on type entities, to enforce AI12-0133: default initialization
1522         of types whose partial view has unknown discriminants does not
1523         get an invariant check, because clients of the unit can never
1524         declare objects of such types.
1525         * sem_ch3.adb (Find_Type_Name); Set new flag
1526         Partial_View_Has_Unknown_Discr when needed.
1527         * exp_ch3.adb (Expand_N_Object_Declaration): Use flag to suppress
1528         generation of invariant call on default-initialized object.
1530 2015-02-08  Eric Botcazou  <ebotcazou@adacore.com>
1532         * gcc-interface/decl.c (gnat_to_gnu_param): Do not strip the padding
1533         if the parameter either is passed by reference or if the alignment
1534         would be lowered.
1536 2015-02-08  Eric Botcazou  <ebotcazou@adacore.com>
1538         * gcc-interface/decl.c (is_cplusplus_method): Use Is_Primitive flag to
1539         detect primitive operations of tagged and untagged types.
1541 2015-02-08  Eric Botcazou  <ebotcazou@adacore.com>
1543         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not bother about alias
1544         sets in presence of derivation for subprogram types.
1546 2015-02-08  Eric Botcazou  <ebotcazou@adacore.com>
1548         * gcc-interface/utils.c (begin_subprog_body): Assert that the body is
1549         present in the same context as the declaration.
1551 2015-02-07  Jakub Jelinek  <jakub@redhat.com>
1553         PR middle-end/64340
1554         * gcc-interface/trans.c (gigi): Recreate optimization_default_node
1555         and optimization_current_node after tweaking global_options.
1557 2015-02-05  Robert Dewar  <dewar@adacore.com>
1559         * prj-proc.adb, sem_aux.adb, exp_ch9.adb, errout.adb, prj-dect.adb,
1560         prj-nmsc.adb: Minor reformatting.
1562 2015-02-05  Ed Schonberg  <schonberg@adacore.com>
1564         * sem_type.adb (Covers): In ASIS_Mode the Corresponding_Record
1565         of a protected type may not be available, so to check conformance
1566         with an interface type, examine the interface list in the type
1567         declaration directly.
1568         (Write_Overloads): Improve information for indirect calls,
1569         for debugger use.
1571 2015-02-05  Ed Schonberg  <schonberg@adacore.com>
1573         * exp_ch3.adb (Make_Tag_Assignment): Do not perform this
1574         expansion activity in ASIS mode.
1576 2015-02-05  Javier Miranda  <miranda@adacore.com>
1578         * errout.adb (Error_Msg_PT): Add missing error.
1579         * sem_ch6.adb (Check_Synchronized_Overriding): Check the missing
1580         RM rule.  Code cleanup.
1581         * exp_ch9.adb (Build_Wrapper_Spec): Propagate "constant" in
1582         anonymous access types.  Found working on the tests. Code cleanup.
1584 2015-02-05  Vincent Celier  <celier@adacore.com>
1586         * prj-dect.adb (Parse_Attribute_Declaration): Continue scanning
1587         when there are incomplete withs.
1588         * prj-nmsc.adb (Process_Naming): Do not try to get the value
1589         of an element when it is nil.
1590         (Check_Naming): Do not check a nil suffix for illegality
1591         * prj-proc.adb (Expression): Do not process an empty term.
1592         * prj-strt.adb (Attribute_Reference): If attribute cannot be
1593         found, parse a possible index to avoid cascading errors.
1595 2015-02-05  Ed Schonberg  <schonberg@adacore.com>
1597         * sem_aux.adb (Is_Derived_Type): A subprogram_type generated
1598         for an access_to_subprogram declaration is not a derived type.
1600 2015-02-05  Robert Dewar  <dewar@adacore.com>
1602         * errout.adb (Error_Msg_Internal): For non-serious error set
1603         Fatal_Error to Ignored.
1604         * lib-load.adb (Load_Unit): Minor comment updates.
1605         * sem_ch10.adb (Analyze_With_Clause): Propagate Fatal_Error
1606         setting from with'ed unit to with'ing unit.
1607         * sem_prag.adb (Analyze_Pragma, case Warnings): Document handling
1608         of ambiguity.
1610 2015-02-05  Yannick Moy  <moy@adacore.com>
1612         * sem_prag.adb, par-prag.adb: Minor code clean up.
1614 2015-02-05  Yannick Moy  <moy@adacore.com>
1616         * par-prag.adb (Pragma_Warnings): Update for extended form
1617         of pragma Warnings. The "one" argument case may now have 2 or
1618         3 arguments.
1619         * sem_prag.adb (Analyze_Pragma/Pragma_Warnings): Update for
1620         extended form of pragma Warnings. Pragma with tool name is either
1621         rewritten as null or as an equivalent form without tool name,
1622         before reanalysis.
1623         * snames.ads-tmpl (Name_Gnatprove): New name.
1625 2015-02-05  Robert Dewar  <dewar@adacore.com>
1627         * sem_ch13.adb (Add_Invariants): Don't assume invariant is
1628         standard Boolean.
1629         * sem_prag.adb (Analyze_Pragma, case Check): Don't assume
1630         condition is standard Boolean, it can be non-standard derived
1631         Boolean.
1633 2015-02-05  Robert Dewar  <dewar@adacore.com>
1635         * checks.adb (Enable_Range_Check): Disconnect attempted
1636         optimization for the case of range check for subscript of
1637         unconstrained array.
1639 2015-02-05  Robert Dewar  <dewar@adacore.com>
1641         * par-ch13.adb (With_Present): New function
1642         (Aspect_Specifications_Present): Handle WHEN in place of WITH
1643         (Get_Aspect_Specifications): Comment update.
1644         * par.adb: Comment updates.
1646 2015-02-05  Robert Dewar  <dewar@adacore.com>
1648         * errout.adb (Handle_Serious_Error): New setting of Fatal_Error.
1649         * frontend.adb (Frontend): New setting of Fatal_Error.
1650         * lib-load.adb (Create_Dummy_Package_Unit): New setting of
1651         Fatal_Error.
1652         (Load_Main_Source): New setting of Fatal_Error
1653         (Load_Unit): New setting of Fatal_Error.
1654         * lib-writ.adb (Add_Preprocessing_Dependency): New setting of
1655         Fatal_Error.
1656         (Ensure_System_Dependency): New setting of Fatal_Error.
1657         * lib.adb (Fatal_Error): New setting of Fatal_Error
1658         (Set_Fatal_Error): New setting of Fatal_Error.
1659         * lib.ads: New definition of Fatal_Error and associated routines.
1660         * par-ch10.adb (P_Compilation_Unit): New setting of Fatal_Error.
1661         * par-load.adb (Load): New setting of Fatal_Error.
1662         * rtsfind.adb (Load_RTU): New setting of Fatal_Error.
1663         * sem_ch10.adb (Analyze_Compilation_Unit): New setting of
1664         Fatal_Error.
1665         (Optional_Subunit): New setting of Fatal_Error.
1666         (Analyze_Proper_Body): New setting of Fatal_Error.
1667         (Load_Needed_Body): New setting of Fatal_Error.
1669 2015-02-05  Ed Schonberg  <schonberg@adacore.com>
1671         * sem_res.adb (Resolve_Call): If the function being called has
1672         out parameters do not check for language version if the function
1673         comes from a predefined unit, as those are always compiled in
1674         Ada 2012 mode.
1676 2015-02-05  Ed Schonberg  <schonberg@adacore.com>
1678         * sem_ch3.adb (Process_Full_View): Verify that the full view
1679         of a type extension must carry an explicit limited keyword if
1680         the partial view does (RM 7.3 (10.1)).
1682 2015-02-05  Robert Dewar  <dewar@adacore.com>
1684         * g-rannum.adb, g-rannum.ads, s-rannum.adb, s-rannum.ads,
1685         sem_warn.ads: Minor reformatting.
1686         * exp_ch13.adb (Expand_N_Freeze_Entity): Add guard for aspect
1687         deleted by -gnatI.
1688         * sem_prag.adb (Analyze_Pragma, case Type_Invariant): Give
1689         error for abstract type.
1691 2015-02-05  Yannick Moy  <moy@adacore.com>
1693         * opt.ads (Warn_On_Suspicious_Contract): Update comment
1694         describing use.
1695         * sem_attr.adb (Analyze_Attribute/Attribute_Update): Warn on
1696         suspicious uses of 'Update.
1697         * sem_warn.adb, sem_warn.ads (Warn_On_Suspicious_Update): New
1698         function issues warning on suspicious uses of 'Update.
1699         * g-rannum.adb, g-rannum.ads, s-rannum.adb, s-rannum.ads: Mark
1700         package spec and body as SPARK_Mode Off.
1702 2015-02-05  Robert Dewar  <dewar@adacore.com>
1704         * sem_prag.adb (Set_Elab_Unit_Name): New name for Set_Unit_Name
1705         (Analyze_Pragma): Change Set_Unit_Name to Set_Elab_Unit_Name
1706         (Set_Elab_Unit_Name): Generate reference for Elaborate[_All]
1707         * sem_warn.adb (Warn_On_Unreferenced_Entity): Suppress warning
1708         for exported entity.
1710 2015-02-05  Hristian Kirtchev  <kirtchev@adacore.com>
1712         * sem_prag.adb (Check_Pragma_Conformance): Add
1713         local variable Arg. Ensure that all errors are associated with
1714         the pragma if it appears without an argument. Add comments on
1715         various cases.
1717 2015-02-05  Robert Dewar  <dewar@adacore.com>
1719         * lib-xref.adb: Minor reformatting.
1721 2015-02-05  Tristan Gingold  <gingold@adacore.com>
1723         PR ada/64349da/64349
1724         * env.c: Fix thinko: handle Darwin case before default one.
1726 2015-01-30  Robert Dewar  <dewar@adacore.com>
1728         * a-assert.adb: Minor reformatting.
1729         * sem_ch13.adb: Minor comment clarification.
1730         * types.ads: Minor comment update.
1731         * sem_eval.adb (Real_Or_String_Static_Predicate_Matches): Avoid blow up
1732         when we have a predicate that is nothing but an inherited dynamic
1733         predicate.
1735 2015-01-30  Jerome Guitton  <guitton@adacore.com>
1737         * gcc-interface/Makefile.in (x86-vxworks): Update GCC_SPEC_FILES to
1738         include cert link spec.
1740 2015-01-30  Robert Dewar  <dewar@adacore.com>
1742         * einfo.ads: Minor comment fix.
1743         * freeze.adb (Freeze_Profile): Add test for suspicious import
1744         in pure unit.
1745         * sem_prag.adb (Process_Import_Or_Interface): Test for suspicious
1746         use in Pure unit is now moved to Freeze (to properly catch
1747         Pure_Function exemption).
1749 2015-01-30  Bob Duff  <duff@adacore.com>
1751         * sem_res.ads: Minor comment fix.
1752         * sem_type.adb: sem_type.adb (Remove_Conversions): Need to
1753         check both operands of an operator.
1755 2015-01-30  Yannick Moy  <moy@adacore.com>
1757         * a-assert.ads, a-assert.adb: Mark package spec in SPARK. Set assertion
1758         policy for Pre to Ignore.
1759         (Assert): Add precondition.
1761 2015-01-30  Robert Dewar  <dewar@adacore.com>
1763         * sem_prag.adb (Process_Import_Or_Interface): Warn if used in
1764         Pure unit.
1765         * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Clarify
1766         documentation for some special cases of invalid attempts at
1767         based integers.
1769 2015-01-30  Gary Dismukes  <dismukes@adacore.com>
1771         * errout.ads: Minor reformatting.
1773 2015-01-30  Yannick Moy  <moy@adacore.com>
1775         * inline.adb (Process_Formals): Use the sloc of
1776         the inlined node instead of the sloc of the actual parameter,
1777         when replacing formal parameters by the actual one.
1779 2015-01-30  Arnaud Charlet  <charlet@adacore.com>
1781         * g-expect.adb (Get_Command_Output): Use infinite timeout when
1782         calling Expect.
1784 2015-01-30  Ed Schonberg  <schonberg@adacore.com>
1786         * sem_ch12.adb (Analyze_Associations): If an in-parameter is
1787         defaulted in an instantiation, add an entry in the list of actuals
1788         to indicate the default value of the formal (as is already done
1789         for defaulted subprograms).
1791 2015-01-30  Javier Miranda  <miranda@adacore.com>
1793         * errout.adb (Error_Msg_PT): Minor error phrasing update.
1795 2015-01-30  Robert Dewar  <dewar@adacore.com>
1797         * sem_warn.adb (Warn_On_Known_Condition): Improve error message
1798         for object case.
1800 2015-01-30  Pierre-Marie de Rodat  <derodat@adacore.com>
1802         * exp_dbug.adb (Get_Encoded_Name): When
1803         -fgnat-encodings=minimal, do not generate names for biased types.
1805 2015-01-30  Tristan Gingold  <gingold@adacore.com>
1807         PR ada/64349
1808         * env.c: Move vxworks and darwin includes out of #ifdef IN_RTS.
1810 2015-01-30  Gary Dismukes  <dismukes@adacore.com>
1812         * freeze.adb: Minor reformatting.
1814 2015-01-30  Javier Miranda  <miranda@adacore.com>
1816         * errout.ads (Error_Msg_PT): Replace Node_Id by Entity_Id and
1817         improve its documentation.
1818         * errout.adb (Error_Msg_PT): Improve the error message.
1819         * sem_ch6.adb (Check_Conformance): Update call to Error_Msg_PT.
1820         (Check_Synchronized_Overriding): Update call to Error_Msg_PT.
1821         * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup.
1823 2015-01-30  Robert Dewar  <dewar@adacore.com>
1825         * sem_warn.adb (Warn_On_Known_Condition): Do special casing of
1826         message for False case.
1828 2015-01-30  Doug Rupp  <rupp@adacore.com>
1830         * s-vxwext-kernel.ads (Task_Cont): Remove imported subprogram body.
1831         * s-vxwext-kernel.adb (Task_Cont): New subpprogram body specialized for
1832         kernel.
1834 2015-01-30  Gary Dismukes  <dismukes@adacore.com>
1836         * sem_attr.adb (Declared_Within_Generic_Unit):
1837         New function to test whether an entity is declared within the
1838         declarative region of a given generic unit.
1839         (Resolve_Attribute): For checking legality of subprogram'Access within
1840         a generic unit, call new Boolean function Declared_Within_Generic_Unit
1841         instead of simply comparing the results of Enclosing_Generic_Unit on
1842         the prefix and access type.  Correct minor comment typos.
1844 2015-01-30  Robert Dewar  <dewar@adacore.com>
1846         * freeze.adb, exp_util.ads: Update comment.
1847         * exp_util.adb, exp_ch3.adb: Minor code reorganization and reformatting.
1848         * sem_util.adb: Minor: fix typo.
1850 2015-01-30  Hristian Kirtchev  <kirtchev@adacore.com>
1852         * sem_attr.adb (Analyze_Attribute): Ensure that
1853         the check concerning Refined_Post takes precedence over the
1854         other cases.
1856 2015-01-30  Gary Dismukes  <dismukes@adacore.com>
1858         * sem_prag.adb: Minor typo fixes and reformatting.
1860 2015-01-30  Yannick Moy  <moy@adacore.com>
1862         * sem_attr.adb: Code clean up.
1864 2015-01-30  Robert Dewar  <dewar@adacore.com>
1866         * ali.adb (Scan_ALI): Set Serious_Errors flag in Unit record.
1867         * ali.ads (Unit_Record): Add new field Serious_Errors.
1868         * lib-writ.adb (Write_Unit_Information): Set SE (serious errors)
1869         attribute in U line.
1870         * lib-writ.ads: New attribute SE (serious erors) in unit line.
1872 2015-01-30  Hristian Kirtchev  <kirtchev@adacore.com>
1874         * einfo.adb Update the usage of attributes Entry_Bodies_Array,
1875         Lit_Indexes, Scale_Value, Storage_Size_Variable,
1876         String_Literal_Low_Bound along associated routines and
1877         Write_FieldX_Name.
1878         (Pending_Access_Types): New routine.
1879         (Set_Pending_Access_Types): New routine.
1880         (Write_Field15_Name): Add an entry for Pending_Access_Types.
1881         * einfo.ads Add new attribute Pending_Access_Types along
1882         with usage in nodes.  Update the usage of attributes
1883         Entry_Bodies_Array, Lit_Indexes, Scale_Value,
1884         Storage_Size_Variable, String_Literal_Low_Bound.
1885         (Pending_Access_Types): New routine along with pragma Inline.
1886         (Set_Pending_Access_Types): New routine along with pragma Inline.
1887         * exp_ch3.adb (Expand_Freeze_Array_Type): Add new local variable
1888         Ins_Node. Determine the insertion node for anonynous access type
1889         that acts as a component type of an array. Update the call to
1890         Build_Finalization_Master.
1891         (Expand_Freeze_Record_Type): Update
1892         the calls to Build_Finalization_Master.
1893         (Freeze_Type): Remove
1894         local variable RACW_Seen. Factor out the code that deals with
1895         remote access-to-class-wide types. Create a finalization master
1896         when the designated type contains a private component. Fully
1897         initialize all pending access types.
1898         (Process_RACW_Types): New routine.
1899         (Process_Pending_Access_Types): New routine.
1900         * exp_ch4.adb (Expand_Allocator_Expression): Allocation no longer
1901         needs to set primitive Finalize_Address.
1902         (Expand_N_Allocator): Allocation no longer sets primitive
1903         Finalize_Address.
1904         * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
1905         Update the call to Build_Finalization_Master.
1906         (Make_Build_In_Place_Call_In_Allocator): Allocation no longer
1907         needs to set primitive Finalize_Address.
1908         * exp_ch7.adb (Add_Pending_Access_Type): New routine.
1909         (Build_Finalization_Master): New parameter profile. Associate
1910         primitive Finalize_Address with the finalization master if the
1911         designated type has been frozen, otherwise treat the access
1912         type as pending. Simplify the insertion of the master and
1913         related initialization code.
1914         (Make_Finalize_Address_Body): Allow Finalize_Address for class-wide
1915         abstract types.
1916         (Make_Set_Finalize_Address_Call): Remove forlam parameter Typ.
1917         Simplify the implementation.
1918         * exp_ch7.ads (Build_Finalization_Master): New parameter profile
1919         along with comment on usage.
1920         (Make_Set_Finalize_Address_Call): Remove formal parameter Typ. Update
1921         the comment on usage.
1922         * exp_util.adb (Build_Allocate_Deallocate_Proc): Use routine
1923         Finalize_Address to retrieve the primitive.
1924         (Finalize_Address): New routine.
1925         (Find_Finalize_Address): Removed.
1926         * exp_util.ads (Finalize_Address): New routine.
1927         * freeze.adb (Freeze_All): Remove the generation of finalization
1928         masters.
1929         * sem_ch3.adb (Analyze_Full_Type_Declaration): Propagate any
1930         pending access types from the partial to the full view.
1932 2015-01-30  Robert Dewar  <dewar@adacore.com>
1934         * sem_disp.adb: Minor reformatting.
1935         * sem_disp.ads: Documentation update.
1937 2015-01-30  Ed Schonberg  <schonberg@adacore.com>
1939         * sem_disp.adb (Is_Dynamically_Tagged): when applied to an entity
1940         or a function call, return True if type is class-wide.
1941         * sem_res.adb (Resolve_Case_Expression, Resolve_If_Expression);
1942         Apply RM 4.5.7 (17/3): all or none of the dependent expression
1943         of a conditional expression must be dynamically tagged.
1945 2015-01-30  Ed Schonberg  <schonberg@adacore.com>
1947         * sem_ch6.adb (Analyze_Function_Return): In an extended return
1948         statement, apply accessibility check to result object when there
1949         is no initializing expression (Ada 2012 RM 6.5 (5.4/3))
1951 2015-01-30  Robert Dewar  <dewar@adacore.com>
1953         * sem_ch4.adb (Analyze_If_Expression): Allow for non-standard
1954         Boolean for case where ELSE is omitted.
1955         * sem_res.adb: Minor reformatting.
1957 2015-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1959         Fix build under cygwin/64.
1960         * adaint.h: Add check for __CYGWIN__.
1961         * mingw32.h: Prevent windows.h from including x86intrin.h in GCC.
1963 2015-01-19  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1965         PR ada/64640
1966         * adaint.c: Handle __CYGWIN__ like __MINGW32__ here.
1967         * mingw32.h: Don't include <tchar.h> under cygwin.
1968         (_O_U8TEXT, _O_U16TEXT, _O_WTEXT): Set to _O_TEXT if not yet defined.
1970 2015-01-15  Thomas Schwinge  <thomas@codesourcery.com>
1972         * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8)
1973         (DEF_FUNCTION_TYPE_VAR_12): New macros.
1975 2015-01-09  Michael Collison  <michael.collison@linaro.org>
1977         * gcc-interface/cuintp.c: Include hash-set.h, machmode.h,
1978         vec.h, double-int.h, input.h, alias.h, symtab.h,
1979         fold-const.h, wide-int.h, and inchash.h due to
1980         flattening of tree.h.
1981         * gcc-interface/decl.c: Ditto.
1982         * gcc-interface/misc.c: Ditto.
1983         * gcc-interface/targtyps.c: Include hash-set.h, machmode.h,
1984         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h,
1985         fold-const.h, wide-int.h, and inchash.h due to
1986         flattening of tree.h.
1987         * gcc-interface/trans.c: Include hash-set.h, machmode.h,
1988         vec.h, double-int.h, input.h, alias.h, symtab.h, real.h,
1989         fold-const.h, wide-int.h, inchash.h due to
1990         flattening of tree.h.
1991         * gcc-interface/utils.c: Include hash-set.h, machmode.h,
1992         vec.h, double-int.h, input.h, alias.h, symtab.h,
1993         fold-const.h, wide-int.h, and inchash.h due to
1994         flattening of tree.h.
1995         * gcc-interface/utils2.c: Ditto.
1997 2015-01-07  Robert Dewar  <dewar@adacore.com>
1999         * sem_warn.adb (Check_One_Unit): Don't give unused entities
2000         warning for a package which is used as a generic parameter.
2002 2015-01-07  Bob Duff  <duff@adacore.com>
2004         * usage.adb (Usage): Correct documentation of
2005         -gnatw.f switches.
2007 2015-01-07  Robert Dewar  <dewar@adacore.com>
2009         * s-fileio.adb: Minor reformatting.
2011 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
2013         * sem_ch12.adb (Instantiate_Object): If formal is an anonymous
2014         access to subprogram, replace its formals with new entities when
2015         building the object declaration, both if actual is present and
2016         when it is defaulted.
2018 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
2020         * sem_ch5.adb (Analyze_Assignment): If left-hand side is a view
2021         conversion and type of expression has invariant, apply invariant
2022         check on expression.
2024 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
2026         * sem_ch3.adb (Create_Constrained_Components): A call to
2027         Gather_Components may detect an error if an inherited discriminant
2028         that controls a variant is non-static.
2029         * sem_aggr.adb (Resolve_Record_Aggregate, Step 5): The call to
2030         Gather_Components may report an error if an inherited discriminant
2031         in a variant in non-static.
2032         * sem_util.adb (Gather_Components): If a non-static discriminant
2033         is inherited do not report error here, but let caller handle it.
2034         (Find_Actual): Small optimization.
2036 2015-01-07  Bob Duff  <duff@adacore.com>
2038         * usage.adb (Usage): Document -gnatw.f switch.
2040 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
2042         * sem_ch12.adb: Code clean up and minor reformatting.
2044 2015-01-07  Robert Dewar  <dewar@adacore.com>
2046         * exp_ch4.adb (Expand_N_Type_Conversion): Add guard for
2047         Raise_Accessibility_Error call.
2048         * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Add documentation
2049         on handling of invalid digits in based constants.
2050         * s-fatgen.ads: Minor reformatting.
2051         * sem_attr.adb (Analyze_Attribute, case Unrestricted_Access):
2052         Avoid noting bogus modification for Valid test.
2053         * snames.ads-tmpl (Name_Attr_Long_Float): New Name.
2054         * einfo.ads: Minor reformatting.
2055         * sem_warn.adb: Minor comment clarification.
2056         * sem_ch12.adb: Minor reformatting.
2058 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
2060         * exp_ch5.adb (Expand_Predicated_Loop): Handle properly loops
2061         over static predicates when the loop parameter specification
2062         carries a Reverse indicator.
2064 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
2066         * sem_ch12.adb (Instantiate_Object): If formal has a default,
2067         actual is missing and formal has an anonymous access type, copy
2068         access definition in full so that tree for instance is properly
2069         formatted for ASIS use.
2071 2015-01-07  Bob Duff  <duff@adacore.com>
2073         * sem_elab.adb (Check_Internal_Call_Continue): Give a warning
2074         for P'Access, where P is a subprogram in the same package as
2075         the P'Access, and the P'Access is evaluated at elaboration
2076         time, and occurs before the body of P. For example, "X : T :=
2077         P'Access;" would allow a subsequent call to X.all to be an
2078         access-before-elaboration error; hence the warning. This warning
2079         is enabled by the -gnatw.f switch.
2080         * opt.ads (Warn_On_Elab_Access): New flag for warning switch.
2081         * warnsw.adb (Set_Dot_Warning_Switch): Set Warn_On_Elab_Access.
2082         * gnat_ugn.texi: Document the new warning.
2084 2015-01-07  Johannes Kanig  <kanig@adacore.com>
2086         * lib-xref-spark_specific.adb (Collect_SPARK_Xrefs): Skip unneeded
2087         cross ref files.
2089 2015-01-07  Robert Dewar  <dewar@adacore.com>
2091         * s-taprop-linux.adb, clean.adb: Minor reformatting.
2093 2015-01-07  Arnaud Charlet  <charlet@adacore.com>
2095         * s-tassta.adb: Relax some overzealous assertions.
2097 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
2099         * sem_ch6.adb (Analyze_Return_Type): An call that returns a limited
2100         view of a type is legal when context is a thunk generated for
2101         operation inherited from an interface.
2102         * exp_ch6.adb (Expand_Simple_Function_Return): If context is
2103         a thunk and return type is an incomplete type do not continue
2104         expansion; thunk will be fully elaborated when generating code.
2106 2015-01-07  Doug Rupp  <rupp@adacore.com>
2108         * s-osinte-mingw.ads (LARGE_INTEGR): New subtype.
2109         (QueryPerformanceFrequency): New imported procedure.
2110         * s-taprop-mingw.adb (RT_Resolution): Call above and return
2111         resolution vice a hardcoded value.
2112         * s-taprop-solaris.adb (RT_Resolution): Call clock_getres and return
2113         resolution vice a hardcoded value.
2114         * s-linux-android.ads (clockid_t): New subtype.
2115         * s-osinte-aix.ads (clock_getres): New imported subprogram.
2116         * s-osinte-android.ads (clock_getres): Likewise.
2117         * s-osinte-freebsd.ads (clock_getres): Likewise.
2118         * s-osinte-solaris-posix.ads (clock_getres): Likewise.
2119         * s-osinte-darwin.ads (clock_getres): New subprogram.
2120         * s-osinte-darwin.adb (clock_getres): New subprogram.
2121         * thread.c (__gnat_clock_get_res) [__APPLE__]: New function.
2122         * s-taprop-posix.adb (RT_Resolution): Call clock_getres to
2123         calculate resolution vice hard coded value.
2125 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
2127         * exp_util.adb (Make_CW_Equivalent_Type): If root type is a
2128         limited view, use non-limited view when available to create
2129         equivalent record type.
2131 2015-01-07  Vincent Celier  <celier@adacore.com>
2133         * gnatcmd.adb: Remove command Sync and any data and processing
2134         related to this command. Remove project processing for gnatstack.
2135         * prj-attr.adb: Remove package Synchonize and its attributes.
2137 2015-01-07  Vincent Celier  <celier@adacore.com>
2139         * clean.adb: Minor error message change.
2141 2015-01-07  Tristan Gingold  <gingold@adacore.com>
2143         PR ada/64349  
2144         * env.c (__gnat_environ): Adjust for darwin9/darwin10.
2146 2015-01-07  Javier Miranda  <miranda@adacore.com>
2148         * sem_ch10.adb (Analyze_With_Clause): Compiling under -gnatq
2149         protect the frontend against never ending recursion caused by
2150         circularities in the sources.
2152 2015-01-07  Robert Dewar  <dewar@adacore.com>
2154         * a-reatim.adb, make.adb, exp_pakd.adb, i-cpoint.adb, sem_ch8.adb,
2155         exp_ch3.adb: Minor reformatting.
2157 2015-01-07  Doug Rupp  <rupp@adacore.com>
2159         * s-linux.ads (clockid_t): New subtype.
2160         * s-osinte-linux.ads (pragma Linker Options): Add -lrt.
2161         (clockid_t): New subtype.
2162         (clock_getres): Import system call.
2163         * s-taprop-linux.adb (System.OS_Constants): With and rename.
2164         (RT_Resolution): Remove
2165         hardcoded value and call clock_getres.
2166         * s-linux-sparc.ads, s-linux-mipsel.ads, s-linux-hppa.ads,
2167         s-linux-alpha.ads, s-linux-x32.ads (clockid_t): Add new subtype.
2169 2015-01-07  Robert Dewar  <dewar@adacore.com>
2171         * sem_warn.adb (Check_One_Unit): Guard against context item
2172         with no Entity field.
2174 2015-01-07  Vincent Celier  <celier@adacore.com>
2176         * clean.adb (Gnatclean): Warn that 'gnatclean -P' is obsolete.
2177         * make.adb (Initialize): Warn that 'gnatmake -P' is obsolete.
2179 2015-01-07  Vincent Celier  <celier@adacore.com>
2181         * prj-conf.adb (Parse_Project_And_Apply_Config): Always finalize
2182         errors/warnings in the first parsing of the project files,
2183         to display the warnings when there is no errors.
2185 2015-01-07  Tristan Gingold  <gingold@adacore.com>
2187         * i-cpoint.adb (Copy_Terminated_Array): Nicely handle null target.
2189 2015-01-07  Doug Rupp  <rupp@adacore.com>
2191         * s-taprop-vxworks.adb (Stop_All_Tasks): Pass return
2192         value from Int_Lock as parameter to Int_Unlock.
2193         * s-osinte-vxworks.ads (Int_Unlock): Add parameter.
2194         * s-vxwext.ads (Int_Unlock): Likewise.
2195         * s-vxwext-kernel.adb (intUnlock, Int_Unlock): Likewise.
2196         * s-vxwext-kernel.ads (Int_Unlock): Likewise.
2197         * s-vxwext-rtp.adb (Int_Unlock): Likewise.
2198         * s-vxwext-rtp.ads (Int_Unlock): Likewise.
2200 2015-01-07  Pierre-Marie de Rodat  <derodat@adacore.com>
2202         * exp_pakd.adb: Add a comment in exp_pakd.adb to explain why we
2203         keep ___XP suffixes
2205 2015-01-07  Tristan Gingold  <gingold@adacore.com>
2207         * i-cpoint.adb (Copy_Terminated_Array): Use Copy_Array to
2208         handle overlap.
2210 2015-01-07  Eric Botcazou  <ebotcazou@adacore.com>
2212         * sem_ch3.adb (Analyze_Full_Type_Declaration): Do not
2213         automatically set No_Strict_Aliasing on access types.
2214         * fe.h (No_Strict_Aliasing_CP): Declare.
2215         * gcc-interface/trans.c (gigi): Force flag_strict_aliasing to 0 if
2216         No_Strict_Aliasing_CP is set.
2218 2015-01-07  Johannes Kanig  <kanig@adacore.com>
2220         * sem_ch8.adb (Analyze_Subprogram_Renaming) do
2221         not build function wrapper in gnatprove mode when the package
2222         is externally axiomatized.
2224 2015-01-07  Jose Ruiz  <ruiz@adacore.com>
2226         * a-reatim.adb (Time_Of): Reduce the number of spurious overflows in
2227         intermediate computations when the parameters have different signs.
2229 2015-01-07  Javier Miranda  <miranda@adacore.com>
2231         * exp_ch3.adb (Build_Init_Procedure): For derived types,
2232         improve the code which takes care of identifying and moving to
2233         the beginning of the init-proc the call to the init-proc of the
2234         parent type.
2236 2015-01-07  Olivier Hainque  <hainque@adacore.com>
2238         * gcc-interface/trans.c (gnat_to_gnu, <N_Expression_With_Action>):
2239         Elaborate the expression as part of the same stmt group as the actions.
2241 2015-01-07  Robert Dewar  <dewar@adacore.com>
2243         * sem_ch3.adb: Minor error message change.
2245 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
2247         * sem_prag.adb (Analyze_Pragma, case Preelaborable_Initialization):
2248         Following AI05-028, the pragam applies legally to any composite type.
2250 2015-01-07  Arnaud Charlet  <charlet@adacore.com>
2252         * s-osinte-vxworks.adb, s-osinte-vxworks.ads
2253         (sigwait, sigwaitinfo): Removed, not needed after all on any
2254         VxWorks configurations.
2256 2015-01-07  Robert Dewar  <dewar@adacore.com>
2258         * sem_ch3.adb, freeze.adb, exp_disp.adb: Minor reformatting.
2260 2015-01-07  Javier Miranda  <miranda@adacore.com>
2262         * exp_disp.adb (Expand_Interface_Conversion): Adding missing
2263         generation of accessibility check.
2265 2015-01-07  Ed Schonberg  <schonberg@adacore.com>
2267         * sem_ch3.adb (Derived_Type_Declaration): In the case of an
2268         illegal completion from a class- wide type, set etype of the
2269         derived type properly to prevent cascaded errors.
2271 2015-01-07  Robert Dewar  <dewar@adacore.com>
2273         * prj.ads, i-cpoint.adb, freeze.adb, ghost.adb, prj-err.adb: Minor
2274         reformatting.
2276 2015-01-07  Robert Dewar  <dewar@adacore.com>
2278         * restrict.adb (Check_Restriction_No_Use_Of_Attribute):
2279         New procedure.
2280         (OK_No_Use_Of_Entity_Name): New function.
2281         (Set_Restriction_No_Use_Of_Entity): New procedure.
2282         * restrict.ads (Check_Restriction_No_Use_Of_Attribute):
2283         New procedure.
2284         (OK_No_Use_Of_Entity_Name): New function.
2285         (Set_Restriction_No_Use_Of_Entity): New procedure.
2286         * sem_ch8.adb (Find_Direct_Name): Add check for violation of
2287         No_Use_Of_Entity.
2288         * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
2289         Add processing for new restriction No_Use_Of_Entity.
2291 2015-01-07  Eric Botcazou  <ebotcazou@adacore.com>
2293         * freeze.adb (Freeze_Array_Type): Apply same handling to Is_Atomic
2294         component type as to Has_Atomic_Components type.  Remove useless
2295         test on Is_Aliased component type.
2297 2015-01-07  Hristian Kirtchev  <kirtchev@adacore.com>
2299         * alloc.ads Alphabetize several declarations. Add constants
2300         Ignored_Ghost_Units_Initial and Ignored_Ghost_Units_Increment.
2301         * atree.adb Add with and use clauses for Opt.
2302         (Allocate_Initialize_Node): Mark a node as ignored Ghost
2303         if it is created in an ignored Ghost region.
2304         (Ekind_In): New variant.
2305         (Is_Ignored_Ghost_Node): New routine.
2306         (Set_Is_Ignored_Ghost_Node): New routine.
2307         * atree.adb Aplhabetize several subprograms declarations. Flag
2308         Spare0 is now known as Is_Ignored_Ghost_Node.
2309         (Ekind_In): New variant.
2310         (Is_Ignored_Ghost_Node): New routine.
2311         (Set_Is_Ignored_Ghost_Node): New routine.
2312         * einfo.adb: Flag 279 is now known as Contains_Ignored_Ghost_Code.
2313         (Contains_Ignored_Ghost_Code): New routine.
2314         (Set_Contains_Ignored_Ghost_Code): New routine.
2315         (Set_Is_Checked_Ghost_Entity, Set_Is_Ignored_Ghost_Entity):
2316         It is now possible to set this property on an unanalyzed entity.
2317         (Write_Entity_Flags): Output the status of flag
2318         Contains_Ignored_Ghost_Code.
2319         * einfo.ads New attribute Contains_Ignored_Ghost_Code along with
2320         usage in nodes.
2321         (Contains_Ignored_Ghost_Code): New routine
2322         along with pragma Inline.
2323         (Set_Contains_Ignored_Ghost_Code): New routine along with pragma Inline.
2324         * exp_ch3.adb Add with and use clauses for Ghost.
2325         (Freeze_Type): Capture/restore the value of Ghost_Mode on entry/exit.
2326         Set the Ghost_Mode in effect.
2327         (Restore_Globals): New routine.
2328         * exp_ch7.adb (Process_Declarations): Do not process a context
2329         that invoves an ignored Ghost entity.
2330         * exp_dbug.adb (Qualify_All_Entity_Names): Skip an ignored Ghost
2331         construct that has been rewritten as a null statement.
2332         * exp_disp.adb Add with and use clauses for Ghost.
2333         (Make_DT): Capture/restore the value of Ghost_Mode on entry/exit. Set
2334         the Ghost_Mode in effect.
2335         (Restore_Globals): New routine.
2336         * exp_util.adb (Requires_Cleanup_Actions): An ignored Ghost entity
2337         does not require any clean up. Add two missing cases that deal
2338         with block statements.
2339         * freeze.adb Add with and use clauses for Ghost.
2340         (Freeze_Entity): Capture/restore the value of Ghost_Mode on entry/exit.
2341         Set the Ghost_Mode in effect.
2342         (Restore_Globals): New routine.
2343         * frontend.adb Add with and use clauses for Ghost. Remove any
2344         ignored Ghost code from all units that qualify.
2345         * ghost.adb New unit.
2346         * ghost.ads New unit.
2347         * gnat1drv.adb Add with clause for Ghost. Initialize and lock
2348         the table in package Ghost.
2349         * lib.ads: Alphabetize several subprogram declarations.
2350         * lib-xref.adb (Output_References): Do not generate reference
2351         information for ignored Ghost entities.
2352         * opt.ads Add new type Ghost_Mode_Type and new global variable
2353         Ghost_Mode.
2354         * rtsfind.adb (Load_RTU): Provide a clean environment when
2355         loading a runtime unit.
2356         * sem.adb (Analyze): Capture/restore the value of Ghost_Mode on
2357         entry/exit as the node may set a different mode.
2358         (Do_Analyze):
2359         Capture/restore the value of Ghost_Mode on entry/exit as the
2360         unit may be withed from a unit with a different Ghost mode.
2361         * sem_ch3.adb Add with and use clauses for Ghost.
2362         (Analyze_Full_Type_Declaration, Analyze_Incomplete_Type_Decl,
2363         Analyze_Number_Declaration, Analyze_Private_Extension_Declaration,
2364         Analyze_Subtype_Declaration): Set the Ghost_Mode in effect. Mark
2365         the entity as Ghost when there is a Ghost_Mode in effect.
2366         (Array_Type_Declaration): The implicit base type inherits the
2367         "ghostness" from the array type.
2368         (Derive_Subprogram): The
2369         alias inherits the "ghostness" from the parent subprogram.
2370         (Make_Implicit_Base): The implicit base type inherits the
2371         "ghostness" from the parent type.
2372         * sem_ch5.adb Add with and use clauses for Ghost.
2373         (Analyze_Assignment): Set the Ghost_Mode in effect.
2374         * sem_ch6.adb Add with and use clauses for Ghost.
2375         (Analyze_Abstract_Subprogram_Declaration, Analyze_Procedure_Call,
2376         Analyze_Subprogram_Body_Helper, Analyze_Subprogram_Declaration):
2377         Set the Ghost_Mode in effect. Mark the entity as Ghost when
2378         there is a Ghost_Mode in effect.
2379         * sem_ch7.adb Add with and use clauses for Ghost.
2380         (Analyze_Package_Body_Helper, Analyze_Package_Declaration,
2381         Analyze_Private_Type_Declaration): Set the Ghost_Mode in
2382         effect. Mark the entity as Ghost when there is a Ghost_Mode
2383         in effect.
2384         * sem_ch8.adb Add with and use clauses for Ghost.
2385         (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
2386         Analyze_Object_Renaming, Analyze_Package_Renaming,
2387         Analyze_Subprogram_Renaming): Set the Ghost_Mode in effect. Mark
2388         the entity as Ghost when there is a Ghost_Mode in effect.
2389         (Find_Type): Check the Ghost context of a type.
2390         * sem_ch11.adb Add with and use clauses for Ghost.
2391         (Analyze_Exception_Declaration): Set the Ghost_Mode in
2392         effect. Mark the entity as Ghost when there is a Ghost_Mode
2393         in effect.
2394         * sem_ch12.adb Add with and use clauses for Ghost.
2395         (Analyze_Generic_Package_Declaration,
2396         Analyze_Generic_Subprogram_Declaration): Set the Ghost_Mode in effect.
2397         Mark the entity as Ghost when there is a Ghost_Mode in effect.
2398         * sem_prag.adb Add with and use clauses for Ghost.
2399         (Analyze_Pragma): Ghost-related checks are triggered when there
2400         is a Ghost mode in effect.
2401         (Create_Abstract_State): Mark the
2402         entity as Ghost when there is a Ghost_Mode in effect.
2403         * sem_res.adb Add with and use clauses for Ghost.
2404         (Check_Ghost_Context): Removed.
2405         * sem_util.adb (Check_Ghost_Completion): Removed.
2406         (Check_Ghost_Derivation): Removed.
2407         (Incomplete_Or_Partial_View):
2408         Add a guard in case the entity has not been analyzed yet
2409         and does carry a scope.
2410         (Is_Declaration): New routine.
2411         (Is_Ghost_Entity): Removed.
2412         (Is_Ghost_Statement_Or_Pragma):
2413         Removed.
2414         (Is_Subject_To_Ghost): Removed.
2415         (Set_Is_Ghost_Entity):
2416         Removed.
2417         (Within_Ghost_Scope): Removed.
2418         * sem_util.adb (Check_Ghost_Completion): Removed.
2419         (Check_Ghost_Derivation): Removed.
2420         (Is_Declaration): New routine.
2421         (Is_Ghost_Entity): Removed.
2422         (Is_Ghost_Statement_Or_Pragma): Removed.
2423         (Is_Subject_To_Ghost): Removed.
2424         (Set_Is_Ghost_Entity): Removed.
2425         (Within_Ghost_Scope): Removed.
2426         * sinfo.ads Add a section on Ghost mode.
2427         * treepr.adb (Print_Header_Flag): New routine.
2428         (Print_Node_Header): Factor out code. Output flag
2429         Is_Ignored_Ghost_Node.
2430         * gcc-interface/Make-lang.in: Add dependency for unit Ghost.
2432 2015-01-06  Eric Botcazou  <ebotcazou@adacore.com>
2434         * freeze.adb (Freeze_Array_Type) <Complain_CS>: Remove always
2435         true test and unreachable 'else' arm.
2437 2015-01-06  Vincent Celier  <celier@adacore.com>
2439         * prj-conf.adb (Check_Target): Improve error message when
2440         there are mismatched targets between the on in the configuration
2441         project file and the specified one, either in the main project
2442         file or in the --target= switch.
2444 2015-01-06  Pascal Obry  <obry@adacore.com>
2446         * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Mode and
2447         Install_Name attribute definitions.
2449 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
2451         * freeze.adb (Wrap_Imported_Subprogram): Indicate that the
2452         generated Import pragma for the internal imported procedure does
2453         not come from an aspect, so that Is_Imported can be properly
2454         set for it.
2456 2015-01-06  Gary Dismukes  <dismukes@adacore.com>
2458         * sem_ch12.adb (Might_Inline_Subp): Record whether
2459         any subprograms in the generic package are marked with
2460         pragma Inline_Always (setting flag Has_Inline_Always).
2461         (Analyze_Package_Instantiation): Add test of Has_Inline_Always
2462         alongside existing test of Front_End_Inlining as alternative
2463         conditions for setting Inline_Now. Also add test of
2464         Has_Inline_Always along with Front_End_Inlining test as an
2465         alternative condition for setting Needs_Body to False.
2467 2015-01-06  Tristan Gingold  <gingold@adacore.com>
2469         * i-cpoint.adb (Copy_Array): Handle overlap.
2471 2015-01-06  Pascal Obry  <obry@adacore.com>
2473         * bindgen.adb: Minor style fix.
2475 2015-01-06  Robert Dewar  <dewar@adacore.com>
2477         * sem_util.ads, sem_util.adb: Minor reformatting.
2479 2015-01-06  Vincent Celier  <celier@adacore.com>
2481         * prj-conf.adb (Parse_Project_And_Apply_Config): Reset incomplete
2482         with flags before parsing the projects.
2483         * prj-err.adb (Error_Msg): Do nothing if there are incomplete withs.
2484         * prj-part.adb (Post_Parse_Context_Clause): Set Incomplete_Withs
2485         to True in the flags, when Ignore_Missing_With is True and an
2486         imported project cannot be found.
2487         * prj-proc.adb (Expression): When there are incomplete withs and
2488         a variable or attribute is not found, set the variable/attribute
2489         to unknown.
2490         * prj.ads (Processing_Flags): New flag Incomplete_Withs,
2491         defaulted to False.
2493 2015-01-06  Vasiliy Fofanov  <fofanov@adacore.com>
2495         * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-conf.adb,
2496         prj-err.adb: Add new switch --no-command-line.
2498 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
2500         * sem_ch12.adb: Sloc of wrapper is that of instantiation.
2502 2015-01-06  Robert Dewar  <dewar@adacore.com>
2504         * sem_ch11.adb: Minor reformatting.
2506 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
2508         * exp_aggr.adb (Get_Assoc_Expr): New routine internal to
2509         Build_Array_Aggr_Code, used to initialized components covered
2510         by a box association. If the component type is scalar and has
2511         a default aspect, use it to initialize such components.
2513 2015-01-06  Pascal Obry  <obry@adacore.com>
2515         * rtinit.c (__gnat_runtime_initialize): Add a parameter to
2516         control the setup of the exception handler.
2517         * initialize.c: Remove unused declaration.
2518         * bindgen.adb: Always call __gnat_runtime_initialize and pass
2519         whether the exeception handler must be set or not.
2521 2015-01-06  Thomas Quinot  <quinot@adacore.com>
2523         * freeze.adb (Set_SSO_From_Defaults): When setting scalar storage
2524         order to native from default, make sure to also adjust bit order.
2525         * exp_aggr.adb: Minor reformatting.
2527 2015-01-06  Robert Dewar  <dewar@adacore.com>
2529         * s-valllu.adb, s-valllu.ads, s-valuti.ads, s-valuns.adb, s-valuns.ads,
2530         s-valrea.adb, s-valrea.ads: Add some additional guards for
2531         Str'Last = Positive'Last.
2533 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
2535         * sem_ch12.adb, sem_ch8.adb: Ongoing work for wrappers for actual
2536         subprograms.
2538 2015-01-06  Javier Miranda  <miranda@adacore.com>
2540         * exp_disp.adb (Expand_Interface_Conversion): Reapply patch.
2542 2015-01-06  Thomas Quinot  <quinot@adacore.com>
2544         * sem_util.ads: Minor reformatting.
2545         * sem_cat.adb (In_RCI_Visible_Declarations): Change back to...
2546         (In_RCI_Declaration) Return to old name, as proper checking of
2547         entity being in the visible part depends on entity kind and must
2548         be done by the caller.
2550 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
2552         * sem_ch12.adb, sem_ch12.ads, sem_ch8.adb: Ongoing work for wrappers
2553         for operators in SPARK.
2555 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
2557         * sem_aggr.adb (Get_Value): In ASIS mode, preanalyze the
2558         expression in an others association before making copies for
2559         separate resolution and accessibility checks. This ensures that
2560         the type of the expression is available to ASIS in all cases,
2561         in particular if the expression is itself an aggregate.
2563 2015-01-06  Eric Botcazou  <ebotcazou@adacore.com>
2565         * einfo.ads (Has_Independent_Components): Document extended
2566         usage.
2567         * einfo.adb (Has_Independent_Components): Remove obsolete assertion.
2568         (Set_Has_Independent_Components): Adjust assertion.
2569         * sem_prag.adb (Analyze_Pragma): Also set Has_Independent_Components
2570         for pragma Atomic_Components.  Set Has_Independent_Components
2571         on the object instead of the type for an object declaration with
2572         pragma Independent_Components.
2574 2015-01-06  Olivier Hainque  <hainque@adacore.com>
2576         * set_targ.adb (Read_Target_Dependent_Values): Set
2577         Long_Double_Index when "long double" is read.
2578         (elaboration code): Register_Back_End_Types only when not reading from
2579         config files. Doing otherwise is pointless and error prone.
2581 2015-01-06  Robert Dewar  <dewar@adacore.com>
2583         * s-valrea.adb (Value_Real): Check for Str'Last = Positive'Last
2585 2015-01-06  Robert Dewar  <dewar@adacore.com>
2587         * a-wtgeau.adb, a-ztgeau.adb, a-tigeau.adb (String_Skip): Raise PE if
2588         Str'Last = Positive'Last.
2590 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
2592         * sem_ch6.adb (Matches_Limited_View): Handle properly the case
2593         where the non-limited type is a generic actual and appears as
2594         a subtype of the non-limited view of the other.
2595         * freeze.adb (Build_Renamed_Body): If the return type of the
2596         declaration that is being completed is a limited view and the
2597         non-limited view is available, use it in the specification of
2598         the generated body.
2600 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
2602         * sem_ch3.adb (Find_Type_Name): If there is a previous tagged
2603         incomplete view, the type of the classwide type common to both
2604         views is the type being declared.
2606 2015-01-06  Eric Botcazou  <ebotcazou@adacore.com>
2608         * einfo.ads (Is_Independent): Further document extended usage.
2610 2015-01-06  Eric Botcazou  <ebotcazou@adacore.com>
2612         * einfo.ads (Is_Independent): Document extended usage.
2613         * einfo.adb (Is_Independent): Remove obsolete assertion.
2614         (Set_Is_Independent): Likewise.
2615         * sem_prag.adb (Process_Atomic_Shared_Volatile): Rename into...
2616         (Process_Atomic_Independent_Shared_Volatile): ...this.
2617         Deal with pragma Independent here.
2618         (Analyze_Pragma): Adjust
2619         to above renaming and also invoke it for pragma Independent.
2620         Adjust comment for Independent_Components.
2622 2015-01-06  Robert Dewar  <dewar@adacore.com>
2624         * snames.ads-tmpl: Remove entries for attribute Enum_Image.
2625         * exp_attr.adb: Remove reference to Attribute_Enum_Image.
2627 2015-01-06  Robert Dewar  <dewar@adacore.com>
2629         * s-vallli.adb (Value_Long_Long_Integer): Handle case of Str'Last
2630         = Positive'Last.
2631         * s-valllu.adb (Value_Long_Long_Unsigned): Handle case of
2632         Str'Last = Positive'Last.
2634 2015-01-06  Robert Dewar  <dewar@adacore.com>
2636         * sem_prag.adb (Process_Inline): Remove redundant construct
2637         warning (-gnatw.r) for an ineffective pragma Inline.
2639 2015-01-06  Robert Dewar  <dewar@adacore.com>
2641         * s-valint.adb: Fix typo in last checkin.
2642         * s-valuns.adb (Value_Unsigned): More efficient fix for
2643         Positive'Last case.
2644         * sem_attr.adb (Analyze_Attribute): Minor reformatting
2645         (Eval_Attribute): Static ervaluation of 'Img for enumeration types.
2647 2015-01-06  Robert Dewar  <dewar@adacore.com>
2649         * s-valint.adb, s-valuns.adb (Value_Integer): Deal with case where
2650         Str'Last = Positive'Last
2652 2015-01-06  Thomas Quinot  <quinot@adacore.com>
2654         * xoscons.adb: Display exception information and return non-zero
2655         exit status in top level exception handler.
2657 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
2659         * sem_ch8.adb: Code clean up.
2661 2015-01-06  Tristan Gingold  <gingold@adacore.com>
2663         * targparm.ads: Remove obsolete comment.
2665 2015-01-06  Olivier Hainque  <hainque@adacore.com>
2667         * gcc-interface/decl.c (gnat_to_gnu_entity, case E_Variable): When
2668         constructing a ref to variable, update inner_const_flag from the
2669         variable TREE_READONLY attribute.
2670         * gcc-interface/targtyps.c (WIDEST_HARDWARE_FP_SIZE): Remove default
2671         definition.
2672         (get_target_float_size): Remove.
2673         (get_target_double_size): Remove.
2674         (get_target_long_double_size): Remove.
2676 2015-01-06  Pascal Obry  <obry@adacore.com>
2678         * adaint.c (ProcListEvt): Set to NULL.
2679         * rtinit.c: New file.
2680         (__gnat_rt_init_count): New reference counter set to 0.
2681         (__gnat_runtime_initialize): Move code here from __gnat_initialize when
2682         this code is actually needed for the runtime initialization. This
2683         routine returns immediately if the initialization has already been done.
2684         * final.c: Revert previous change.
2685         * rtfinal.c: New file.
2686         (__gnat_runtime_finalize)[Win32]: Add finalization of the critical
2687         section and event. The default version of this routine is empty (except
2688         for the reference counting code). This routine returns immediately if
2689         some others libraries are referencing the runtime.
2690         * bindgen.adb (Gen_Adainit): Generate call to Runtime_Initialize
2691         remove circuitry to initialize the signal handler as this is
2692         now done by the runtime initialization routine.
2693         (Gen_Adafinal): Generate call to Runtime_Finalize.
2694         * gnat_ugn.texi: Update documentation about concurrency and
2695         initialization/finalization of the run-time.
2696         * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Add
2697         references to rtfinal.o and rtinit.o
2699 2015-01-06  Robert Dewar  <dewar@adacore.com>
2701         * exp_attr.adb (Expand_N_Attribute_Reference): Add dummy entry
2702         for Enum_Image.
2703         * sem_attr.adb: Implement Enum_Image attribute.
2704         * snames.ads-tmpl: Add entries for Enum_Image attribute.
2706 2015-01-06  Robert Dewar  <dewar@adacore.com>
2708         * namet.ads: Document use of Boolean2 for No_Use_Of_Entity.
2709         * restrict.ads (No_Use_Of_Entity): New table.
2710         * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
2711         Ignore No_Use_Of_Entity (will be processed in parser).
2712         * snames.ads-tmpl: Add entry for Name_No_Use_Of_Entity.
2714 2015-01-06  Vincent Celier  <celier@adacore.com>
2716         * prj-tree.adb (Imported_Or_Extended_Project_Of): Do not try
2717         to check for an extended project, if a project does not have
2718         yet a project declaration.
2720 2015-01-06  Pierre-Marie Derodat  <derodat@adacore.com>
2722         * scos.ads: Update documentation about the SCO table build
2723         process and about table records format.
2724         * par_sco.ads (SCO_Record): Rename to SCO_Record_Raw.
2725         (SCO_Record_Filtered): New procedure.
2726         (Set_SCO_Logical_Operator): New procedure.
2727         (dsco): Update documentation.
2728         * par_sco.adb: Update library-level comments.
2729         (SCO_Generation_State_Type): New type.
2730         (SCO_Generation_State): New variable.
2731         (SCO_Raw_Table): New package instanciation.
2732         (Condition_Pragma_Hash_Table): Rename to SCO_Raw_Hash_Table.
2733         ("<"): New.
2734         (Tristate): New type.
2735         (Is_Logical_Operator): Return Tristate and update documentation.
2736         (Has_Decision): Update call to Is_Logical_Operator and complete
2737         documentation.
2738         (Set_Table_Entry): Rename to Set_Raw_Table_Entry, update
2739         comment, add an assertion for state checking and change
2740         references to SCO_Table into SCO_Raw_Table.
2741         (dsco): Refactor to dump the raw and the filtered tables.
2742         (Process_Decisions.Output_Decision_Operand): Handle putative
2743         short-circuit operators.
2744         (Process_Decisions.Output_Element): Update references
2745         to Set_Table_Entry and to Condition_Pragma_Hash_Table.
2746         (Process_Decisions.Process_Decision_Operand): Update call
2747         to Is_Logical_Operator.
2748         (Process_Decisions.Process_Node): Handle putative short-circuit
2749         operators and change references to
2750         SCO_Table into SCO_Raw_Table.
2751         (SCO_Output): Add an assertion
2752         for state checking and remove code that used to stamp out SCO entries.
2753         (SCO_Pragma_Disabled): Change reference to SCO_Table
2754         into SCO_Raw_Table.
2755         (SCO_Record): Rename to SCO_Record_Raw,
2756         add an assertion for state checking and change references
2757         to SCO_Table into SCO_Raw_Table.
2758         (Set_SCO_Condition): Add an assertion for state checking, update
2759         references to Condition_Pragma_Hash_Table and change references to
2760         SCO_Table into SCO_Raw_Table.
2761         (Set_SCO_Pragma_Enabled): Add an assertion for state checking and
2762         change references to SCO_Table into SCO_Raw_Table.
2763         (Set_SCO_Logical_Operator): New procedure.
2764         (Traverse_Declarations_Or_Statements.Set_Statement_Entry): Update
2765         references to Set_Table_Entry and to Condition_Pragma_Hash_Table.
2766         (SCO_Record_Fildered): New procedure.
2767         * gnat1drv.adb (Gnat1drv): Invoke the SCO filtering pass.
2768         * lib-writ.adb (Write_ALI): Invoke the SCO filtering pass and
2769         output SCOs.
2770         * par-load.adb (Load): Update reference to SCO_Record.
2771         * par.adb (Par): Update reference to SCO_Record.
2772         * put_scos.adb (Put_SCOs): Add an assertion to check that no
2773         putative SCO condition reaches this end.
2774         * sem_ch10.adb (Analyze_Proper_Body): Update reference to SCO_Record.
2775         * sem_res.adb (Resolve_Logical_Op): Validate putative SCOs
2776         when corresponding to an "and"/"or" operator affected by the
2777         Short_Circuit_And_Or pragma.
2779 2015-01-06  Robert Dewar  <dewar@adacore.com>
2781         * sem_ch8.adb (Analyze_Use_Package): Give more specific error
2782         msg for attempted USE of generic subprogram or subprogram.
2784 2015-01-06  Robert Dewar  <dewar@adacore.com>
2786         * s-valllu.adb, a-tiinau.adb, a-timoau.adb, a-ztinau.adb, a-ztmoau.adb,
2787         s-valuns.adb, s-valrea.adb, a-wtflau.adb, a-tiflau.adb, a-ztflau.adb,
2788         a-wtinau.adb, a-wtmoau.adb: Document recognition of : in place of #.
2790 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
2792         * sem_ch13.adb (Analyze_Aspect_Specifications): For aspects
2793         that specify stream subprograms, if the prefix is a class-wide
2794         type then the generated attribute definition clause must apply
2795         to the same class-wide type.
2796         (Default_Iterator): An iterator defined by an aspect of some
2797         container type T must have a first parameter of type T, T'class,
2798         or an access to such (from code reading RM 5.5.1 (2/3)).
2800 2015-01-06  Arnaud Charlet  <charlet@adacore.com>
2802         * gnat1drv.adb: Minor: complete previous change.
2804 2015-01-06  Olivier Hainque  <hainque@adacore.com>
2806         * set_targ.ads (C_Type_For): New function. Return the name of
2807         a C type supported by the back-end and suitable as a basis to
2808         construct the standard Ada floating point type identified by
2809         the T parameter. This is used as a common ground to feed both
2810         ttypes values and the GNAT tree nodes for the standard floating
2811         point types.
2812         * set_targ.adb (Long_Double_Index): The index at which "long
2813         double" gets registered in the FPT_Mode_Table. This is useful to
2814         know whether we have a "long double" available at all and get at
2815         it's characteristics without having to search the FPT_Mode_Table
2816         when we need to decide which C type should be used as the
2817         basis for Long_Long_Float in Ada.
2818         (Register_Float_Type): Fill Long_Double_Index.
2819         (FPT_Mode_Index_For): New function. Return the index in
2820         FPT_Mode_Table that designates the entry corresponding to the
2821         provided C type name.
2822         (FPT_Mode_Index_For): New function. Return the index in
2823         FPT_Mode_Table that designates the entry for a back-end type
2824         suitable as a basis to construct the standard Ada floating point
2825         type identified by the input T parameter.
2826         (elaboration code): Register_Back_End_Types unconditionally,
2827         so C_Type_For can operate regardless of -gnateT. Do it
2828         early so we can query it for the floating point sizes, via
2829         FPT_Mode_Index_For. Initialize Float_Size, Double_Size and
2830         Long_Double_Size from the FPT_Mode_Table, as cstand will do.
2831         * cstand.adb (Create_Float_Types): Use C_Type_For to determine
2832         which C type should be used as the basis for the construction
2833         of the Standard Ada floating point types.
2834         * get_targ.ads (Get_Float_Size, Get_Double_Size,
2835         Get_Long_Double_Size): Remove.
2836         * get_targ.adb: Likewise.
2838 2015-01-06  Thomas Quinot  <quinot@adacore.com>
2840         * sem_cat.adb (In_RCI_Declaration): Remove unnecessary
2841         parameter and rename to...
2842         (In_RCI_Visible_Declarations): Fix handling of private part of nested
2843         package.
2844         (Validate_RCI_Subprogram_Declaration): Reject illegal function
2845         returning anonymous access in RCI unit.
2847 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
2849         * sem_ch6.adb (New_Overloaded_Entity): In GNATprove mode, a
2850         function wrapper may be a homonym of another local declaration.
2851         * sem_ch8.adb (Analyze_Subprogram_Renaming): In GNATprove mode,
2852         build function and operator wrappers after the actual subprogram
2853         has been resolved, and replace the standard renaming declaration
2854         with the declaration of wrapper.
2855         * sem_ch12.ads (Build_Function_Wrapper, Build_Operator_Wraooer):
2856         make public for use elsewhere.
2857         * sem_ch12.adb (Build_Function_Wrapper, Build_Operator_Wraooer):
2858         rewrite, now that actual is fully resolved when wrapper is
2859         constructed.
2861 2015-01-06  Javier Miranda  <miranda@adacore.com>
2863         * exp_disp.adb: Revert previous change.
2865 2015-01-06  Robert Dewar  <dewar@adacore.com>
2867         * exp_util.adb: Change name Name_Table_Boolean to
2868         Name_Table_Boolean1.
2869         * namet.adb: Change name Name_Table_Boolean to Name_Table_Boolean1
2870         Introduce Name_Table_Boolean2/3.
2871         * namet.ads: Change name Name_Table_Boolean to Name_Table_Boolean1
2872         Introduce Name_Table_Boolean2/3.
2873         * par-ch13.adb: Change name Name_Table_Boolean to
2874         Name_Table_Boolean1.
2876 2015-01-06  Bob Duff  <duff@adacore.com>
2878         * gnat_rm.texi: Improve documentation regarding No_Task_Termination.
2880 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
2882         * sem_aggr.adb (Resolve_Record_Aggregte, Get_Value): For an
2883         others choice that covers multiple components, analyze each
2884         copy with the type of the component even in compile-only mode,
2885         to detect potential accessibility errors.
2887 2015-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
2889         * sem_res.adb (Is_Assignment_Or_Object_Expression): New routine.
2890         (Resolve_Actuals): An effectively volatile out
2891         parameter cannot act as an in or in out actual in a call.
2892         (Resolve_Entity_Name): An effectively volatile out parameter
2893         cannot be read.
2895 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
2897         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If the body is
2898         the expansion of an expression function it may be pre-analyzed
2899         if a 'access attribute is applied to the function, in which case
2900         last_entity may have been assigned already.
2902 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
2904         * sem_ch4.adb (Analyze_One_Call): If formal has an incomplete
2905         type and actual has the corresponding full view, there is no
2906         error, but a case of use of incomplete type in a predicate or
2907         invariant expression.
2909 2015-01-06  Vincent Celier  <celier@adacore.com>
2911         * makeutl.adb (Insert_No_Roots): Make sure that the same source
2912         in two different project tree is checked in both trees, if they
2913         are sources of two different projects, extended or not.
2915 2015-01-06  Arnaud Charlet  <charlet@adacore.com>
2917         * gnat1drv.adb: Minor code clean up.
2918         (Adjust_Global_Switches): Ignore gnatprove_mode in codepeer_mode.
2920 2015-01-06  Bob Duff  <duff@adacore.com>
2922         * osint.adb (Read_Source_File): Don't print out
2923         file name unless T = Source.
2925 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
2927         * sem_util.adb (Is_Variable, Is_OK_Variable_For_Out_Formal):
2928         recognize improper uses of constant_reference types as actuals
2929         for in-out parameters.
2930         (Check_Function_Call): Do not collect identifiers if function
2931         name is missing because of previous error.
2933 2015-01-06  Robert Dewar  <dewar@adacore.com>
2935         * ali-util.adb, sem_prag.adb, rtsfind.adb, sem_util.adb, sem_res.adb,
2936         ali.adb, binde.adb, namet.adb, namet.ads, gnatls.adb, bcheck.adb:
2937         Minor change of name Name_Table_Info => Name_Table_Int.
2939 2015-01-06  Robert Dewar  <dewar@adacore.com>
2941         * exp_strm.adb (Build_Elementary_Input_Call): Clarify comments
2942         in previous checkin.
2943         * freeze.adb (Freeze_Fixed_Point_Type): Add warning for shaving
2944         of bounds.
2945         * sem_prag.adb, sem_ch10.adb, sem_ch6.adb: Minor reformatting.
2947 2015-01-06  Vincent Celier  <celier@adacore.com>
2949         * a-strsup.adb (Times (Natural;String;Positive)): Raise
2950         Length_Error, not Index_Error, when the result is too long.
2952 2015-01-06  Thomas Quinot  <quinot@adacore.com>
2954         * a-direct.adb (Create_Path): Minor error handling and
2955         performance improvement.
2957 2015-01-06  Robert Dewar  <dewar@adacore.com>
2959         * checks.ads, sem_ch12.adb: Minor reformatting.
2960         * exp_ch4.adb (Expand_N_Op_Divide): Generate explicit divide by
2961         zero check for fixed-point case if Backend_Divide_Checks_On_Target
2962         is False.
2964 2015-01-06  Robert Dewar  <dewar@adacore.com>
2966         * sem_prag.adb (Analyze_Pragma, case No_Elaboration_Code_All):
2967         Do not set restriction No_Elaboration_Code unless the pragma
2968         appears in the main unit).
2970 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
2972         * sem_ch10.adb (Is_Regular_With_Clause): Add guard to verify
2973         that with clause has already been analyzed before checking kind
2974         of with_clause.
2976 2015-01-06  Robert Dewar  <dewar@adacore.com>
2978         * exp_strm.adb (Build_Elementary_Input_Call): Return base type
2979         (as required by RM).
2981 2015-01-06  Arnaud Charlet  <charlet@adacore.com>
2983         * a-reatim.adb ("/"): Add explicit pragma Unsuppress (Division_Check).
2985 2015-01-06  Robert Dewar  <dewar@adacore.com>
2987         * sem_prag.adb (Process_Suppress_Unsuppress): Add extra warning
2988         for ignoring pragma Suppress (Elaboration_Check) in SPARK mode.
2990 2015-01-06  Javier Miranda  <miranda@adacore.com>
2992         * exp_disp.adb (Expand_Interface_Conversion): No displacement
2993         of the pointer to the object needed when the type of the operand
2994         is not an interface type and the interface is one of its parent
2995         types (since they share the primary dispatch table).
2997 2015-01-06  Vincent Celier  <celier@adacore.com>
2999         * prj-env.adb: Minor comment update.
3001 2015-01-06  Javier Miranda  <miranda@adacore.com>
3003         * sem_res.adb (Valid_Conversion): Restrict the checks on anonymous
3004         access types whose target type is an interface type to operands
3005         that are access types; required to report an error when the
3006         operand is not an access type.
3008 2015-01-06  Bob Duff  <duff@adacore.com>
3010         * a-cfinve.adb (Copy): Set the discriminant to the Length when
3011         Capacity = 0.
3012         * a-cofove.ads (Capacity): Add a postcondition.
3013         * a-cfinve.ads (Capacity): Add a postcondition.
3014         (Reserve_Capacity): Correct the postcondition in the case where
3015         Capacity = 0; that means "Capacity => Length (Container)".
3016         * a-cofove.adb (Elems[c]): Add a comment
3017         explaining the dangers and how to avoid them.
3019 2015-01-06  Ed Schonberg  <schonberg@adacore.com>
3021         * sem_ch12.adb: Code clean up.
3023 2015-01-06  Arnaud Charlet  <charlet@adacore.com>
3025         * gnatvsn.ads: Bump copyright year.
3027 2015-01-06  Robert Dewar  <dewar@adacore.com>
3029         * s-taskin.ads, s-traces.ads: Minor reformatting.
3030         * exp_util.adb: Minor typo fix.
3032 2015-01-06  Vincent Celier  <celier@adacore.com>
3034         * gnatls.adb (Search_RTS): Invoke Initialize_Default_Project_Path
3035         with the runtime name.
3036         * prj-env.adb (Initialize_Default_Project_Path): When both
3037         Target_Name and Runtime_Name are not empty string, add to the
3038         project path the two directories .../lib/gnat and .../share/gpr
3039         related to the runtime.
3040         * prj-env.ads (Initialize_Default_Project_Path): New String
3041         parameter Runtime_Name, defaulted to the empty string.
3043 2015-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
3045         * frontend.adb: Guard against the case where a configuration
3046         pragma may be split into multiple pragmas and the original
3047         rewritten as a null statement.
3048         * sem_prag.adb (Analyze_Pragma): Insert a brand new Check_Policy
3049         pragma using Insert_Before rather than Insert_Action. This
3050         takes care of the configuration pragma case where Insert_Action
3051         would fail.
3053 2015-01-06  Bob Duff  <duff@adacore.com>
3055         * a-coboho.ads (Element_Access): Add "pragma
3056         No_Strict_Aliasing (Element_Access);". This is needed because
3057         we are unchecked-converting from Address to Element_Access.
3058         * a-cofove.ads, a-cofove.adb (Elems,Elemsc): Fix bounds of the
3059         result to be 1.
3061 2015-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
3063         * sem_res.adb (Resolve_Actuals): Remove the
3064         restriction which prohibits volatile actual parameters with
3065         enabled external propery Async_Writers to act appear in procedure
3066         calls where the corresponding formal is of mode OUT.
3068 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
3070         * gnat_ugn.texi: Bump @copying's copyright year.
3072 2015-01-05  Eric Botcazou  <ebotcazou@adacore.com>
3074         PR ada/64492
3075         * gcc-interface/Makefile.in (../stamp-tools): Reinstate dropped code.
3077 2015-01-04  Uros Bizjak  <ubizjak@gmail.com>
3079         * gcc-interface/misc.c (internal_error_function): Use xasprintf instead
3080         of unchecked asprintf.
3083 Copyright (C) 2015 Free Software Foundation, Inc.
3085 Copying and distribution of this file, with or without modification,
3086 are permitted in any medium without royalty provided the copyright
3087 notice and this notice are preserved.