[NDS32] Implement bswapsi2 and bswaphi2 patterns.
[official-gcc.git] / gcc / ada / ChangeLog
blob39deb156fc2ecbdd2cfa5f9d204ccdec567745c3
1 2018-05-25  Nicolas Roche  <roche@adacore.com>
3         * libgnat/s-valrea.adb (Scan_Real): Abort computation once it is sure
4         that the result will be either -infinite or +infinite.
6 2018-05-25  Patrick Bernardi  <bernardi@adacore.com>
8         * libgnat/s-parame.ads, libgnat/s-parame__vxworks.ads,
9         libgnat/s-parame__ae653.ads, libgnat/s-parame__hpux.ads (Size_Type):
10         Expand range of type to match the address space of the target.
11         (Task_Storage_Size): Remove unused type.
13 2018-05-25  Ed Schonberg  <schonberg@adacore.com>
15         * sem_res.adb (Set_Mixed_Mode_Operand): If the operand is an expression
16         of a fixed point type and the parent is a multiplying operation,
17         resolve the operand with its own type because the context will impose a
18         resulting type on the result of the multiplication by means of
19         approriate conversion.
21 2018-05-25  Hristian Kirtchev  <kirtchev@adacore.com>
23         * exp_ch3.adb (Default_Initialize_Object): Ensure that the analysis of
24         the in-place initialization aggregate created for pragmas
25         Initialize_Scalars or Normalize_Scalars is performed with checks
26         suppressed.
28 2018-05-25  Arnaud Charlet  <charlet@adacore.com>
30         * exp_aggr.adb (Convert_To_Positional): Bump default for
31         Max_Others_Replicate to 32. Update comments.
32         * osint.ads (Unknown_Attributes): No longer pretend this is a constant.
33         (No_File_Info_Cache): Initialize separately.
34         * osint.adb (No_File_Info_Cache): Update initializer.
36 2018-05-25  Javier Miranda  <miranda@adacore.com>
38         * sem_res.adb (Resolve_Membership_Op): Allow the use of the membership
39         test when the left operand is a class-wide interface and the right
40         operand is not a class-wide type.
41         * exp_ch4.adb (Tagged_Membership): Adding support for interface as the
42         left operand.
44 2018-05-25  Ed Schonberg  <schonberg@adacore.com>
46         * exp_aggr.adb (Flatten): A quantified expression cannot be duplicated
47         in an others clause to prevent visibility issues with the generated
48         loop variable.
49         (Component_OK_For_Backend): Return false for a quantified expression.
50         (Check_Static_Component): Ditto.
52 2018-05-25  Hristian Kirtchev  <kirtchev@adacore.com>
54         * libgnat/s-secsta.adb (SS_Allocate): Reimplemented.
55         (SS_Allocate_Dynamic): New routine. The allocation logic is now split
56         into three distring cases rather than in one loop which attempts to
57         handle all three cases. This rewrite eliminates an issue where the last
58         frame of the stack cannot be freed, thus causing the memory range of a
59         new frame to approach the overflow point of the memory index type.
60         Since the overflow is logically treated as a
61         too-much-memory-on-the-stack scenario, it causes a bogus Storage_Error.
62         (SS_Allocate_Static): New routine. The routine factorizes the static
63         secondary stack-related code from the former SS_Allocate.
65 2018-05-25  Sergey Rybin  <rybin@adacore.com>
67         * doc/gnat_ugn/gnat_and_program_execution.rst: Add description of '-U'
68         option for gnatelim.
70 2018-05-25  Ed Schonberg  <schonberg@adacore.com>
72         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not create
73         Class_Wide_Clone_Body when analyzing a subprogram_body_stub: the clone
74         is created when the proper body of the stub is analyzed.
75         * sem_util.adb (ZBuild_Class_Wide_Clone_Body): If the subprogram body
76         is the proper body of a subunit, the cloned body must be inserted in
77         the declarative list that contains the stub.
79 2018-05-25  Justin Squirek  <squirek@adacore.com>
81         * exp_ch6.adb (Expand_Simple_Function_Return): Add guard in check to
82         generate code for 6.5(8-10) so that we don't get an assertion error
83         when dealing with an incomplete return type.
85 2018-05-25  Arnaud Charlet  <charlet@adacore.com>
87         * pprint.adb (Expression_Name): Strip too long expressions to avoid
88         carrying very large strings.
90 2018-05-25  Patrick Bernardi  <bernardi@adacore.com>
92         * switch-b.adb (Scan_Binder_Switches): binder switch -Q accepts Natural
93         numbers.
95 2018-05-25  Doug Rupp  <rupp@adacore.com>
97         * tracebak.c (aarch64-linux): Implement.
99 2018-05-25  Justin Squirek  <squirek@adacore.com>
101         * sem_ch8.adb: Minor reformatting.
103 2018-05-25  Piotr Trojanek  <trojanek@adacore.com>
105         * sem_util.adb (Iterate_Call_Parameters): Fix code convention and
106         assertions.
108 2018-05-25  Hristian Kirtchev  <kirtchev@adacore.com>
110         * einfo.adb, einfo.ads, exp_ch3.adb, exp_ch8.adb, exp_unst.adb,
111         pprint.adb, sem_ch12.adb, sem_ch3.adb, sem_prag.adb, sem_util.adb:
112         Minor reformatting.
114 2018-05-25  Ed Schonberg  <schonberg@adacore.com>
116         * sem_ch12.adb (Instance_Exists): New function, subsidiary of
117         Validate_Derived_Type_Instance, to verify that all interfaces
118         implemented by the formal type are also implemented by the actual. The
119         verification is complicated when an interface of the formal is declared
120         in a generic unit and the actual is declared in an instance of it.
121         There is currently no mechanism to relate an interface declared within
122         a generic to the corresponding interface in an instance, so we must
123         traverse the list of interfaces of the actual, looking for a name
124         match, and verifying that that interface is declared in an instance.
126 2018-05-25  Piotr Trojanek  <trojanek@adacore.com>
128         * sem_util.adb (Iterate_Call_Parameters): Rewrite with extra
129         assertions; replace function versions of Next_Formal/Next_Actual with
130         their procedural versions (which are more concise).
132 2018-05-25  Doug Rupp  <rupp@adacore.com>
134         * libgnarl/s-osinte__aix.ads, libgnarl/s-osinte__android.ads,
135         libgnarl/s-osinte__darwin.ads, libgnarl/s-osinte__freebsd.ads,
136         libgnarl/s-osinte__hpux.ads, libgnarl/s-osinte__kfreebsd-gnu.ads,
137         libgnarl/s-osinte__linux.ads, libgnarl/s-osinte__lynxos178e.ads,
138         libgnarl/s-osinte__qnx.ads, libgnarl/s-osinte__rtems.ads
139         (Relative_Timed_Wait): Remove.
140         * libgnarl/s-tpopmo.adb (Timed_Sleep, Timed_Delay): Rewrite to allow
141         for incremental looping. Remove references to Rel_Time and
142         Relative_Timed_Wait.
143         * libgnat/s-osprim__posix.adb, libgnat/s-osprim__posix2008.adb
144         (Timed_Delay): Make separate.
145         * libgnat/s-optide.adb: New separate procedure.
146         * libgnat/s-osprim.ads (Max_System_Delay): New constant.
147         * libgnat/s-osprim__lynxos.ads (Max_Sensible_Delay): Set to 6 months.
148         (Max_System_Delay): New constant.
150 2018-05-25  Ed Schonberg  <schonberg@adacore.com>
152         * sem_ch12.adb (Validate_Derived_Type_Instance): Verify that the actual
153         for a formal derived type implements all the interfaces declared for
154         the formal.
156 2018-05-25  Yannick Moy  <moy@adacore.com>
158         * sem_prag.adb (Check_Applicable_Policy): Deal specially with CodePeer
159         and GNATprove modes when applicable policy is Ignore.
161 2018-05-25  Eric Botcazou  <ebotcazou@adacore.com>
163         * freeze.adb (Freeze_Enumeration_Type): Do not give integer size to a
164         boolean type with convention C.
165         * libgnat/i-cexten.ads (bool): Change to boolean with convention C.
166         * gcc-interface/decl.c (gnat_to_gnu_entity): Add new local variable
167         FOREIGN and use it throughout the function.
168         <E_Enumeration_Type>: Set precision 1 on boolean types with foreign
169         convention.
170         <E_Enumeration_Subtype>: Likewise for subtypes.
171         <E_Record_Type>: Force the size of a storage unit on empty classes.
172         * gcc-interface/utils.c (make_type_from_size) <BOOLEAN_TYPE>: Skip
173         boolean types with precision 1 if the size is the expected one.
175 2018-05-25  Arnaud Charlet  <charlet@adacore.com>
177         * pprint.adb (Expression_Name): Do not print non ASCII characters.
179 2018-05-25  Bob Duff  <duff@adacore.com>
181         * libgnat/a-strunb__shared.ads, libgnat/a-stwiun__shared.ads,
182         libgnat/a-stzunb__shared.ads: (Initialize, Adjust): Add pragma Inline.
184 2018-05-25  Bob Duff  <duff@adacore.com>
186         * sem_util.ads: Minor comment fix.
188 2018-05-25  Ed Schonberg  <schonberg@adacore.com>
190         * exp_unst.adb (Visit_Node): Restrict check for uplevel references in
191         prefixes of array attributes, to prefixes that are entity names whose
192         type is constrained.
193         (Note_Uplevel_Bound): Verify that the bound is declared in an enclosing
194         subprogram, as itype created for loops in pre/postcondition may appear
195         in loops at the library level.
197 2018-05-25  Ed Schonberg  <schonberg@adacore.com>
199         * sem_ch13.adb (Build_Predicate_Functions): The predicate function
200         declaration is inserted into the tree and analyzed at that point, so
201         should not be reinserted when the body is constructed. Inside a
202         generic, ensure that the body is not inserted twice in the tree.
204 2018-05-25  Yannick Moy  <moy@adacore.com>
206         * sem_prag.adb (Check_Grouping): Modify test to ignore statements and
207         declarations not coming from source.
209 2018-05-25  Fedor Rybin  <frybin@adacore.com>
211         * doc/gnat_ugn/gnat_utility_programs.rst: Document new switch
212         --copy-environment for gnattest.
214 2018-05-24  Piotr Trojanek  <trojanek@adacore.com>
216         * sem_elab.adb (Non_Private_View): Simplify by removing a local Result
217         variable.
218         * sem_prag.adb (Get_Base_Subprogram): Same as above.
220 2018-05-24  Eric Botcazou  <ebotcazou@adacore.com>
222         * fe.h (Set_Normalized_First_Bit): Declare.
223         (Set_Normalized_Position): Likewise.
224         * repinfo.adb (List_Record_Layout): Do not use irregular output for a
225         variable position.  Fix minor spacing issue.
226         * gcc-interface/decl.c (annotate_rep): If a field has a variable
227         offset, compute the normalized position and annotate it in addition to
228         the bit offset.
230 2018-05-24  Eric Botcazou  <ebotcazou@adacore.com>
232         * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu):
233         Constify and rename variables.  Fix formatting.
234         (gnat_to_gnu) <N_Exception_Handler>: Minor tweak.
235         <N_Raise_Statement>: Likewise.
237 2018-05-24  Javier Miranda  <miranda@adacore.com>
239         * exp_ch8.adb (Build_Body_For_Renaming): Adding support to build the
240         body of a variant record equality renaming.
241         (Expand_N_Subprogram_Renaming_Declaration): Adapt the code to the new
242         implementation of Build_Body_For_Renaming.
243         * exp_ch3.ads (Build_Variant_Record_Equality): New library level
244         function that factorizes the functionality needed by
245         Build_Body_For_Renaming and Expand_Freeze_Record_Type to build the body
246         of a variant record equality subprogram.
247         * exp_ch3.adb (Build_Variant_Record_Equality): New subprogram.
248         (Build_Variant_Record_Equality): New local procedure of
249         Expand_Freeze_Record_Type containing all the code specific for freezing
250         the record type that cannot be place in the new library level function.
252 2018-05-24  Ed Schonberg  <schonberg@adacore.com>
254         * einfo.ads, einfo.adb (Is_Activation_Record): New flag on
255         in_parameters, used when unesting subprograms for LLVM, to indicate
256         that a generated parameter carries the activation record from the
257         enclosing subprogram.
258         * exp_unst.adb (Check_Static_Type): Handle array attributes of types
259         whose bounds may contain up-level references that need to be added to
260         an activation recoord.
261         (Add_Extra_Formal): Set Is_Activation_Record on new formal.
263 2018-05-24  Yannick Moy  <moy@adacore.com>
265         * pprint.adb (Expression_Image): Improve the printing of expressions,
266         by taking more cases into account, in particular qualified expressions
267         and aggregates.  Also count more the number of parentheses to close
268         after the expression.
270 2018-05-24  Javier Miranda  <miranda@adacore.com>
272         * sem_ch3.adb (Is_Visible_Component): For untagged types add missing
273         check for renamed discriminants.
274         * sem_ch4.adb (Analyze_Overloaded_Selected_Component,
275         Analyze_Selected_Component, Check_Misspelled_Selector): For calls to
276         Is_Visible_Component pass the associated selector node to allow
277         checking renamed discriminants on untagged types.
279 2018-05-24  Ed Schonberg  <schonberg@adacore.com>
281         * sem_ch8.adb (Analyze_Use_Type): Do not assign the Prev_Use_Clause
282         link to a use_type clause if this would cause an infinite loop in the
283         machinery that detects redundant use clauses. This may happen when the
284         redundant clauses appear in the context of a child unit and the context
285         of its parent.
287 2018-05-24  Piotr Trojanek  <trojanek@adacore.com>
289         * sinfo.ads: Fix grammar in comment.
291 2018-05-24  Justin Squirek  <squirek@adacore.com>
293         * einfo.ads, einfo.adb (Append_Entity): Modified to use Link_Entities
294         and manage doubly-linked entity chain.
295         (Nested_Scenarios): Removed entity field used for optimization during
296          elaboration to make room for the new field Prev_Entity.
297         (Link_Entities): Added to replace redundant calls to Set_Next_Entity
298         and Set_Prev_Entity as well as centralize changes to the entity chain.
299         (Predicated_Parent): Modified to use Node38.
300         (Prev_Entity): Added to fetch new node field Prev_Entity in all entity
301         types.
302         (Remove_Entity): Moved from sem_util.
303         (Set_Nested_Scenarios): Deleted.
304         (Set_Predicated_Parent): Modified to use Node38.
305         (Set_Prev_Entity): Added to set Prev_Entity field.
306         (Set_Validated_Object): Modified to use Node38.
307         (Unlink_Next_Entity): Added to process Prev_Entity when an unlinking
308         action is required.
309         (Validated_Object): Modified to use Node38.
310         (Write_Field36_Name): Remove Nested_Scenarios, Validated_Object, and
311         predicated parent cases.
312         (Write_Field38_Name): Add predicated parent and Validated_Object cases.
313         * sem_ch3.adb (Process_Subtype): Add guard to protect against
314         inappropriate marking of Predicated_Parent to non-itype subtypes.
315         (Make_Class_Wide_Type): Preserve Prev_Entity field and set in new type.
316         (Copy_And_Swap): Add setting of Prev_Entity.
317         (Build_derived_Record_Type): Replace Set_Next_Entity w/ Link_Entities.
318         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Replace Set_Next_Entity
319         w/ Link_Entities.
320         (New_Overloaded_Entity): Remove block created to search for previous
321         entities in the entity chain with relevant calls to Prev_Entity as well
322         as replace duplicated code from Remove_Entity_And_Homonym with a call
323         to that subprogram.
324         * sem_ch7.adb (Exchange_Declarations): Replace Set_Next_Entity w/
325         Link_Entities.
326         * sem_elab.adb (Find_And_Process_Nested_Scenarios): Remove global and
327         initial subprogram declarations related to Nested_Scenarios.
328         (Process_Nested_Scenarios): Deleted.
329         (Save_Scenario): Deleted.
330         (Traverse_Body): Remove optimization for Nested_Scenarios so as to free
331         node space in the entity tree.
332         * sem_util.adb, sem_util.ads (Remove_Entity): Moved to einfo.
333         (Remove_Entity_And_Homonym): Added to separate functionality of
334         Remove_Entity from the homonym chain directly.
335         * exp_attr.adb (Expand_N_Attribute_Reference): Replace Set_Next_Entity
336         w/ Link_Entities and Unlink_Next_Entity.
337         * exp_ch3.adb (Expand_N_Object_Declaration): Replace Set_Next_Entity w/
338         Link_Entities.
339         * exp_ch6.adb (Replace_Renaming_Declaration_Id): Replace
340         Set_Next_Entity w/ Link_Entities.
341         * exp_disp.adb (Expand_Dispatching_Call): Replace Set_Next_Entity w/
342         Link_Entities and Unlink_Next_Entity.
343         * exp_spark.adb (Expand_SPARK_N_Object_Renaming_Declaration): Replace
344         call to Remove_Entity with its new incarnation.
345         * exp_util.adb (New_Class_Wide_Subtype): Add setting of Prev_Entity.
346         * freeze.adb (Freeze_Record_Type): Replace Set_Next_Entity w/
347         Link_Entities.
349 2018-05-24  Hristian Kirtchev  <kirtchev@adacore.com>
351         * sem_ch10.adb (Expand_Limited_With_Clause): Update the call to
352         Install_Limited_Withed_Unit.
353         (Expand_With_Clause): Update the call to Install_Withed_Unit.
354         (Implicit_With_On_Parent): Update the call to Install_Withed_Unit.
355         (Install_Context_Clauses): Update the call to Install_Withed_Unit.
356         (Install_Limited_Context_Clauses): Update the calls to
357          Install_Limited_Withed_Unit.
358         (Install_Limited_Withed_Unit): Renamed to better illustrate its
359         purpose.
360         (Install_Private_With_Clauses): Update the calls to Install_Withed_Unit
361         and Install_Limited_Withed_Unit.
362         (Install_With_Clause): Uninstall a limited with clause if a [private]
363         with clause is given for the same package.
364         (Install_Withed_Unit): Renamed to better illustrate its purpose.
365         (Remove_Limited_With_Unit): New routine.
367 2018-05-24  Eric Botcazou  <ebotcazou@adacore.com>
369         * raise-gcc.c (__gnat_SEH_error_handler): Remove prototype.
370         (__gnat_personality_seh0): Adjust and beef up comments, and
371         fix formatting throughout.
372         (__gnat_adjust_context): Deal minimally with version 2.
373         * seh_init.c (__gnat_map_SEH): Fix formatting.
374         (_gnat_SEH_error_handler): Adjust comments.
375         (__gnat_install_SEH_handler): Fix formatting.
377 2018-05-24  Hristian Kirtchev  <kirtchev@adacore.com>
379         * exp_ch7.adb, sem_ch3.adb, sem_res.adb: Minor reformatting.
381 2018-05-24  Ed Schonberg  <schonberg@adacore.com>
383         * exp_aggr.adb (Flatten): Add a warning on an others clause in an array
384         aggregate with static bounds when named associations cover all index
385         positions and the others clause is redundant.
387 2018-05-24  Raphael Amiard  <amiard@adacore.com>
389         * libgnat/a-cohama.ads: Add documentation.
391 2018-05-24  Raphael Amiard  <amiard@adacore.com>
393         * libgnat/a-convec.ads: Add documentation.
395 2018-05-24  Justin Squirek  <squirek@adacore.com>
397         * exp_ch3.adb (Expand_N_Object_Declaration): Ignore raising an error in
398         expansion for limited tagged types when the node to be expanded is a
399         raise expression due to it not representing a valid object.
400         * exp_ch5.adb (Expand_N_Assignment_Statement): Add exception to error
401         message regarding assignments to limited types to ignore genereated
402         code.
404 2018-05-24  Hristian Kirtchev  <kirtchev@adacore.com>
406         * exp_util.adb (New_Class_Wide_Subtype): Capture and restore relevant
407         Ghost-related attributes of the class-wide subtype because the copy
408         clobbers them.
410 2018-05-24  Justin Squirek  <squirek@adacore.com>
412         * sem_res.adb (Resolve_Entity_Name): Add guard to protect against
413         marking use clauses as effective when the reference appears within
414         generated code.
416 2018-05-24  Cyrille Comar  <comar@adacore.com>
418         * doc/gnat_rm/the_gnat_library.rst: Fix typos.
419         * gnat_rm.texi: Regenerate.
421 2018-05-24  Bob Duff  <duff@adacore.com>
423         * exp_ch7.adb (Expand_Cleanup_Actions): Create a mark unconditionally
424         for build-in-place functions with a caller-unknown-size result.
425         (Create_Finalizer): For build-in-place functions with a
426         caller-unknown-size result, check at run time whether we need to
427         release the secondary stack.
429 2018-05-24  Hristian Kirtchev  <kirtchev@adacore.com>
431         * sem_prag.adb (Analyze_Pragma): Use the full view of an internally
432         generated incomplete type.
434 2018-05-24  Hristian Kirtchev  <kirtchev@adacore.com>
436         * expander.adb (Expand): Update the save and restore of the Ghost
437         region.
438         * exp_ch3.adb (Freeze_Type): Likewise.
439         * exp_disp.adb (Make_DT): Likewise.
440         * exp_util.adb (Build_DIC_Procedure_Body): Likewise.
441         (Build_DIC_Procedure_Declaration): Likewise.
442         (Build_Invariant_Procedure_Body): Likewise.
443         (Build_Invariant_Procedure_Declaration): Likewise.
444         (Make_Predicate_Call): Likewise.
445         * freeze.adb (Add_To_Result): Insert the freeze action of a living
446         entity prior to the start of the enclosing ignored Ghost region.
447         (Freeze_Entity): Update the save and restore of the Ghost region.
448         * ghost.adb (Install_Ghost_Mode): Reimplemented.
449         (Install_Ghost_Region): New routine.
450         (Mark_And_Set_Ghost_Assignment): Install a region rather than a mode.
451         (Mark_And_Set_Ghost_Body): Likewise.
452         (Mark_And_Set_Ghost_Completion): Likewise.
453         (Mark_And_Set_Ghost_Declaration): Likewise.
454         (Mark_And_Set_Ghost_Instantiation): Likewise.
455         (Mark_And_Set_Ghost_Procedure_Call): Likewise.
456         (Name_To_Ghost_Mode): New routine.
457         (Restore_Ghost_Region): New routine.
458         * ghost.ads (Install_Ghost_Region): New routine.
459         (Restore_Ghost_Region): New routine.
460         * opt.ads: Add new global variable Ignored_Ghost_Region.
461         * rtsfind.adb (Load_RTU): Update the save and restore of the Ghost
462         region. Install a clean region.
463         * sem.adb (Analyze): Likewise.
464         (Do_Analyze): Likewise.
465         * sem_ch3.adb (Analyze_Object_Declaration): Likewise
466         (Derive_Progenitor_Subprograms): Use local variable Iface_Alias to
467         capture the ultimate alias of the current primitive.
468         (Process_Full_View): Update the save and restore of the Ghost region.
469         Do not inherit DIC and invariant procedures.
470         * sem_ch5.adb (Analyze_Assignment): Update the save and restore of the
471         Ghost region.
472         * sem_ch6.adb (Analyze_Procedure_Call): Likewise.
473         (Analyze_Subprogram_Body_Helper): Likewise.
474         * sem_ch7.adb (Analyze_Package_Body_Helper): Likewise.
475         * sem_ch12.adb (Analyze_Package_Instantiation): Likewise.
476         (Analyze_Subprogram_Instantiation): Likewise.
477         (Instantiate_Package_Body): Likewise.
478         (Instantiate_Subprogram_Body): Likewise.
479         * sem_ch13.adb (Build_Predicate_Functions): Likewise.
480         (Build_Predicate_Function_Declaration): Likewise.
481         * sem_disp.adb
482         (Add_Dispatching_Operation): Do not consider DIC and invariant
483         procedures.
484         (Check_Dispatching_Operation): Use Add_Dispatching_Operation to collect
485         a dispatching subprogram.
486         (Check_Operation_From_Private_View): Likewise.
487         (Override_Dispatching_Operation): Likewise.
488         * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Update the save
489         and restore of the Ghost region.
490         (Analyze_Initial_Condition_In_Decl_Part): Likewise.
491         (Analyze_Pragma): Update the save and restore of the Ghost region.
492         (Analyze_Pre_Post_Condition_In_Decl_Part): Likewise.
493         * sem_util.adb (Is_Suitable_Primitive): New routine.
494         * sem_util.ads (Is_Suitable_Primitive): New routine.
495         * sinfo.ads: Update the section of Ghost regions.
497 2018-05-24  Piotr Trojanek  <trojanek@adacore.com>
499         * doc/gnat_rm/implementation_defined_pragmas.rst (Contract_Cases):
500         Change "condition" to "case guard" after renaming in the contract
501         grammar.
502         * gnat_rm.texi: Regenerate.
504 2018-05-24  Hristian Kirtchev  <kirtchev@adacore.com>
506         * exp_util.adb (Expand_Static_Predicates_In_Choices): Indicate that the
507         construct with discrete choices no longer contains a subtype with
508         predicates since the expansion already handled this case.
510 2018-05-24  Hristian Kirtchev  <kirtchev@adacore.com>
512         * freeze.adb (Wrap_Imported_Subprogram): Generate an unchecked
513         conversion to the return type to avoid a side effect where an imported
514         relocated function generates a new anonymous access type, whose
515         accessibility level does not agree with with that of the wrapper.
517 2018-05-24  Javier Miranda  <miranda@adacore.com>
519         * sem_util.adb (Abstract_Interface_List): Add missing support for
520         private types whose full view is a synchronized type.
521         * sem_ch3.adb (Build_Derived_Private_Type): Skip building the full
522         derivation of a private type parent type is a task type with
523         discriminants as gigi does not use such type directly.
525 2018-05-24  Hristian Kirtchev  <kirtchev@adacore.com>
527         * sem_elab.adb (Build_Variable_Reference_Marker): Do not create a
528         variable marker when the reference appears in the formal part of a
529         compilation unit instance because there is no place to insert it.
530         (In_Compilation_Instance_Formal_Part): New routine.
532 2018-05-24  Piotr Trojanek  <trojanek@adacore.com>
534         * layout.ads, repinfo.ads: Fix references to renamed Backend_Layout
535         configuration parameter.
537 2018-05-24  Doug Rupp  <rupp@adacore.com>
539         * argv-lynxos178-raven-cert.c: New file.
540         * libgnat/system-lynxos178-x86.ads: New file.
542 2018-05-23  Hristian Kirtchev  <kirtchev@adacore.com>
544         * exp_disp.adb, freeze.adb, gnat1drv.adb, sem_ch5.adb, sem_spark.adb:
545         Minor reformattings.
547 2018-05-23  Pascal Obry  <obry@adacore.com>
549         * adaint.c (win32_wait): Properly free the handle/pid lists when
550         WaitForMultipleObjects fails (return WAIT_FAILED).
552 2018-05-23  Pascal Obry  <obry@adacore.com>
554         * adaint.c (win32_wait): Add missing parentheses.
556 2018-05-23  Hristian Kirtchev  <kirtchev@adacore.com>
558         * exp_ch3.adb (Check_Large_Modular_Array): Moved to Freeze.
559         (Expand_N_Object_Declaration): Do not check for a large modular array
560         here.
561         * freeze.adb (Check_Large_Modular_Array): Moved from Exp_Ch3.
562         (Freeze_Object_Declaration): Code cleanup. Check for a large modular
563         array.
564         * sem_ch3.adb: Minor reformatting.
566 2018-05-23  Ed Schonberg  <schonberg@adacore.com>
568         * einfo.ads: New attribute on types: Predicated_Parent, to simplify the
569         retrieval of the applicable predicate function to an itype created for
570         a constrained array component.
571         * einfo.adb: Subprograms for Predicated_Parent.
572         (Predicate_Function): Use new attribute.
573         * exp_util.adb (Make_Predicate_Call): If the predicate function is not
574         available for a subtype, retrieve it from the base type, which may have
575         been frozen after the subtype declaration and not captured by the
576         subtype declaration.
577         * sem_aggr.adb (Resolve_Array_Aggregate): An Others association is
578         legal within a generated initiqlization procedure, as may happen with a
579         predicate check on a component, when the predicate function applies to
580         the base type of the component.
581         * sem_ch3.adb (Analyze_Subtype_Declaration): Clean up inheritance of
582         predicates for subtype declarations and for subtype indications in
583         other contexts.
584         (Process_Subtype): Likewise. Handle properly the case of a private type
585         with unknown discriminants whose full view is an unconstrained array.
586         Use Predicated_Parent to indicate source of predicate function on an
587         itype whose parent is itself an itype.
588         (Complete_Private_Subtype): If the private view has unknown
589         discriminants and the full view is an unconstrained array, set base
590         type of completion to the full view of parent.
591         (Inherit_Predicate_Flags): Prevent double assignment of predicate
592         function and flags.
593         (Build_Subtype): For a constrained array component, propagate predicate
594         information from original component type declaration.
596 2018-05-23  Boris Yakobowski  <yakobowski@adacore.com>
598         * libgnat/a-ngelfu.ads (Arctanh, Arccoth): Fix faulty preconditions.
600 2018-05-23  Arnaud Charlet  <charlet@adacore.com>
602         * checks.adb (Minimize_Eliminate_Overflows): Default initialize Lo and
603         Hi.
604         * sem_elab.adb: Make "out" parameters instead of "in out" when
605         relevant.
607 2018-05-23  Bob Duff  <duff@adacore.com>
609         * gnatbind.adb (List_Applicable_Restrictions): Add
610         No_Implementation_Restrictions to the list of restrictions not to list.
611         Remove double negative "not No_Restriction_List".  Comment the
612         commentary that is output, so it won't cause errors if used directly in
613         a gnat.adc.
615 2018-05-23  Ed Schonberg  <schonberg@adacore.com>
617         * sem_prag.adb (Inherit_Class_Wide_Pre): Refine legality check on
618         class-wide precondition on a type extension when ancestor does not have
619         a class-wide precondition.  Previously the compiler accepted such a
620         precondition when the ancestor had a class-wide postcondition.
622 2018-05-23  Javier Miranda  <miranda@adacore.com>
624         * sem_attr.adb (Valid_Scalars): Do not invoke Error_Attr_P to report
625         the warning on occurrences of this attribute whose evaluation is always
626         true (since that subprogram aborts processing the attribute). In
627         addition, replace the node by its boolean result 'True' (required
628         because the backend has no knowledge of this attribute).
630 2018-05-23  Bob Duff  <duff@adacore.com>
632         * libgnat/a-convec.adb: (Insert, Insert_Space): Suppress warnings. The
633         code in question is not reachable in the case where Count_Type'Last is
634         out of range.
636 2018-05-23  Yannick Moy  <moy@adacore.com>
638         * doc/gnat_rm/implementation_defined_pragmas.rst: Clarify meaning of
639         local pragma Warnings Off without On.
640         * gnat_rm.texi: Regenerate.
642 2018-05-23  Olivier Hainque  <hainque@adacore.com>
644         * libgnat/g-excact.ads (Is_Foreign_Exception): New predicate.
645         * libgnat/g-excact.adb: Implement.
647 2018-05-23  Ed Schonberg  <schonberg@adacore.com>
649         * sem_ch5.adb (Analyze_Iterator_Specification): If a subtype indication
650         is present, verify its legality when the domain of iteration is a
651         GNAT-specific formal container, as is already done for arrays and
652         predefined containers.
654 2018-05-23  Yannick Moy  <moy@adacore.com>
656         * sem_util.adb (Enclosing_Declaration): Fix the case of a named number
657         declaration, which was not taken into account.
659 2018-05-23  Hristian Kirtchev  <kirtchev@adacore.com>
661         * debug.adb: Switch -gnatd_s is now used to stop elaboration checks on
662         synchronized suspension.
663         * rtsfind.ads: Add entries for units Ada.Synchronous_Barriers and
664         Ada.Synchronous_Task_Control and routines Suspend_Until_True and
665         Wait_For_Release.
666         * sem_elab.adb: Document switch -gnatd_s.
667         (In_Task_Body): New routine.
668         (Is_Potential_Scenario): Code cleanup. Stop the traversal of a task
669         body when the current construct denotes a synchronous suspension call,
670         and restriction No_Entry_Calls_In_Elaboration_Code or switch -gnatd_s
671         is in effect.
672         (Is_Synchronous_Suspension_Call): New routine.
673         * switch-c.adb (Scan_Front_End_Switches): Switch -gnatJ now sets switch
674         -gnatd_s.
676 2018-05-23  Javier Miranda  <miranda@adacore.com>
678         * exp_disp.adb (Make_DT): Restrict the initialization of
679         External_Tag and Expanded_Name to an empty string to the case where
680         both pragmas apply (i.e. No_Tagged_Streams and Discard_Names), since
681         restricted runtimes are compiled with pragma Discard_Names.
682         * doc/gnat_rm/implementation_defined_pragmas.rst,
683         doc/gnat_rm/implementation_defined_characteristics.rst: Add
684         documentation.
685         * gnat_rm.texi: Regenerate.
687 2018-05-23  Maroua Maalej  <maalej@adacore.com>
689         * sem_spark.adb: Fix of some permission rules of pointers in SPARK.
691 2018-05-23  Ed Schonberg  <schonberg@adacore.com>
693         * sem_ch5.adb (Preanalyze_Range): The pre-analysis of the domain of
694         iteration of an Ada2012 loop is performed to determine the type of the
695         domain, but full analysis is performed once the loop is rewritten as a
696         while-loop during expansion. The pre-analysis suppresses expansion; it
697         must also suppress the generation of freeze nodes, which may otherwise
698         appear in the wrong scope before rewritting.
700 2018-05-23  Hristian Kirtchev  <kirtchev@adacore.com>
702         * sem_elab.adb: Update the section on suppressing elaboration warnings.
704 2018-05-23  Hristian Kirtchev  <kirtchev@adacore.com>
706         * einfo.adb (Is_Elaboration_Checks_OK_Id): Use predicate
707         Is_Elaboration_Target.
708         (Is_Elaboration_Target): New routine.
709         (Is_Elaboration_Warnings_OK_Id): Use predicate Is_Elaboration_Target.
710         (Set_Is_Elaboration_Checks_OK_Id): Use predicate Is_Elaboration_Target.
711         (Set_Is_Elaboration_Warnings_OK_Id): Use predicate
712         Is_Elaboration_Target.
713         * einfo.ads: Add new synthesized attribute Is_Elaboration_Target along
714         with occurrences in nodes.
715         (Is_Elaboration_Target): New routine.
716         * sem_prag.adb (Analyze_Pragma): Suppress elaboration warnings when an
717         elaboration target is subject to pragma Warnings (Off, ...).
719 2018-05-23  Eric Botcazou  <ebotcazou@adacore.com>
721         * repinfo.adb (List_Type_Info): Remove obsolete stuff.
723 2018-05-23  Hristian Kirtchev  <kirtchev@adacore.com>
725         * einfo.adb: Flag304 is now Is_Elaboration_Warnings_OK_Id.
726         (Is_Elaboration_Warnings_OK_Id): New routine.
727         (Set_Is_Elaboration_Warnings_OK_Id): New routine.
728         (Write_Entity_Flags): Output Flag304.
729         * einfo.ads: Add new attribute Is_Elaboration_Warnings_OK_Id along with
730         occurrences in entities.
731         (Is_Elaboration_Warnings_OK_Id): New routine along with pragma Inline.
732         (Set_Is_Elaboration_Warnings_OK_Id): New routine along with pragma
733         Inline.
734         * sem_attr.adb (Analyze_Access_Attribute): Capture the state of
735         elaboration warnings.
736         * sem_ch3.adb (Analyze_Object_Declaration): Capture the state of
737         elaboration warnings.
738         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Capture the
739         state of elaboration warnings.
740         (Analyze_Subprogram_Body_Helper): Capture the state of elaboration
741         warnings.
742         (Analyze_Subprogram_Declaration): Capture the state of elaboration
743         warnings.
744         * sem_ch9.adb (Analyze_Entry_Declaration): Capture the state of
745         elaboration warnings.
746         (Analyze_Single_Task_Declaration): Capture the state of elaboration
747         warnings.
748         (Analyze_Task_Type_Declaration): Capture the state of elaboration
749         warnings.
750         * sem_ch12.adb (Analyze_Generic_Package_Declaration): Capture the state
751         of elaboration warnings.
752         (Analyze_Generic_Subprogram_Declaration): Capture the state of
753         elaboration warnings.
754         * sem_elab.adb: Add a section on suppressing elaboration warnings.
755         Type Processing_Attributes includes component Suppress_Warnings
756         intended to suppress any elaboration warnings along a path in the
757         graph.  Update Initial_State to include a value for this component.
758         Types Target_Attributes and Task_Attriutes include component
759         Elab_Warnings_OK to indicate whether the target or task has elaboration
760         warnings enabled.  component Elab_Warnings_OK.
761         (Build_Access_Marker): Propagate attribute
762         Is_Elaboration_Warnings_OK_Node from the attribute to the generated
763         call marker.
764         (Extract_Instantiation_Attributes): Set the value for Elab_Warnings_OK.
765         (Extract_Target_Attributes): Set the value for Elab_Warnings_OK.
766         (Extract_Task_Attributes): Set the value for Elab_Warnings_OK.
767         (Process_Conditional_ABE_Access): Suppress futher elaboration warnings
768         when already in this mode or when the attribute or target have warnings
769         suppressed.
770         (Process_Conditional_ABE_Activation_Impl): Do not emit any diagnostics
771         if warnings are suppressed.
772         (Process_Conditional_ABE_Call): Suppress further elaboration warnings
773         when already in this mode, or the target or call have warnings
774         suppressed.
775         (Process_Conditional_ABE_Call_Ada): Do not emit any diagnostics if
776         warnings are suppressed.
777         (Process_Conditional_ABE_Call_SPARK): Do not emit any diagnostics if
778         warnings are suppressed.
779         (Process_Conditional_ABE_Instantiation): Suppress further elaboration
780         warnings when already in this mode or when the instantiation has
781         warnings suppressed.
782         (Process_Conditional_ABE_Instantiation_Ada): Do not emit any
783         diagnostics if warnings are suppressed.
784         (Process_Conditional_ABE_Variable_Assignment_Ada): Use the more
785         specific Is_Elaboration_Warnings_OK_Id rather than Warnings_Off.
786         (Process_Conditional_ABE_Variable_Assignment_SPARK): Use the more
787         specific Is_Elaboration_Warnings_OK_Id rather than Warnings_Off.
788         (Process_Task_Object): Suppress further elaboration warnings when
789         already in this mode, or when the object, activation call, or task type
790         have warnings suppressed. Update the processing state to indicate that
791         the path goes through a task body.
792         * sinfo.adb (Is_Elaboration_Warnings_OK_Node): Accept attribute
793         references.
794         (Set_Is_Elaboration_Warnings_OK_Node): Accept attribute references.
795         * sinfo.ads: Attribute Is_Elaboration_Warnings_OK_Node now applies to
796         attribute references.
798 2018-05-23  Piotr Trojanek  <trojanek@adacore.com>
800         * einfo.ads: Minor reformatting.
802 2018-05-23  Ed Schonberg  <schonberg@adacore.com>
804         * sem_ch3.adb (Analyze_Object_Declaration): If expression is an
805         anonymous_access_to_ subprogram formal, apply a conversion to force an
806         accsssibility check that will fail statically, enforcing 3.10.2 (13).
808 2018-05-23  Daniel Mercier  <mercier@adacore.com>
810         * gnat1drv.adb: Turn off length expansion in CodePeer mode.
812 2018-05-23  Bob Duff  <duff@adacore.com>
814         * freeze.adb: (Check_Address_Clause): Deal with build-in-place
815         aggregates in addition to build-in-place calls.
817 2018-05-23  Bob Duff  <duff@adacore.com>
819         * einfo.ads: Minor reformatting.
820         * sem_ch3.adb: Likewise.
821         * sinfo.ads: Likewise.
823 2018-05-23  Hristian Kirtchev  <kirtchev@adacore.com>
825         * exp_ch3.adb (Default_Initialize_Object): Do not optimize scalar array
826         initialization when the component type has predicates.
827         * exp_ch4.adb (Expand_N_Allocator): Do not optimize scalar array
828         allocation when the component type has predicates.
830 2018-05-23  Hristian Kirtchev  <kirtchev@adacore.com>
832         * einfo.adb, exp_disp.adb, sem_ch3.adb, sem_ch6.adb, sem_prag.adb:
833         Minor reformatting.
835 2018-05-22  Justin Squirek  <squirek@adacore.com>
837         * sem_ch6.adb (Analyze_Expression_Function): Propagate flags from the
838         original function spec into the generated function spec due to
839         expansion of expression functions during analysis.
840         (Analyze_Subprogram_Body_Helper): Modify check on formal parameter
841         references from the body to the subprogram spec in the case of
842         expression functions because of inconsistances related to having a
843         generated body.
844         * libgnarl/s-osinte__android.ads: Flag parameters as unused.
845         * libgnarl/s-osinte__lynxos178e.ads: Likewise.
846         * libgnarl/s-osinte__qnx.adb: Likewise.
847         * libgnarl/s-osinte__qnx.ads: Likewise.
849 2018-05-22  Doug Rupp  <rupp@adacore.com>
851         * init.c (HAVE_ADJUST_CONTEXT_FOR_RAISE): Don't define on VxWorks7 for
852         AArch64.
854 2018-05-22  Olivier Hainque  <hainque@adacore.com>
856         * libgnat/a-except.adb (Exception_Propagation.Propagate_Exception):
857         Expect an Exception_Occurence object, not an Access.
858         (Complete_And_Propagate_Occurrence): Adjust accordingly.
859         (Raise_From_Signal_Handler): Likewise.
860         (Reraise_Occurrence_No_Defer): If we have a Machine_Occurrence
861         available in the provided occurrence object, just re-propagate the
862         latter as a bare "raise;" would do.
863         * libgnat/a-exexpr.adb (Propagate_Exception): Adjust to spec change.
864         * libgnat/a-exstat.adb (String_To_EO): Initialize X.Machine_Occurrence
865         to null, to mark that the occurrence we're crafting from the stream
866         contents is not being propagated (yet).
868 2018-05-22  Hristian Kirtchev  <kirtchev@adacore.com>
870         * exp_aggr.adb (Initialize_Ctrl_Record_Component): Insert the generated
871         code for a transient component in line with the rest of the
872         initialization code, rather than before the aggregate. This ensures
873         that the component has proper visibility of the discriminants.
875 2018-05-22  Jerome Lambourg  <lambourg@adacore.com>
877         * adaint.c: Reorganize QNX-specific macros, use syspage to retreive the
878         number of CPUs.
880 2018-05-22  Jerome Lambourg  <lambourg@adacore.com>
882         * sigtramp-qnx.c: Properly restore link register in signal trampoline.
884 2018-05-22  Hristian Kirtchev  <kirtchev@adacore.com>
886         * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Strip away any
887         conversions before extracting the value of the expression.
888         * exp_ch3.adb (Default_Initialize_Object): Optimize the default
889         initialization of an array of scalars.
890         (Get_Simple_Init_Val): Add processing for array types. Remove the
891         processing of strings because this case is already handled by the array
892         case.
893         (Needs_Simple_Initialization): Moved to Sem_Util.
894         (Simple_Init_Array_Type): New routine.
895         (Simple_Init_Initialize_Scalars_Type): Reimplemented to use the new
896         facilities from Sem_Util.
897         (Simple_Initialization_OK): New routine.
898         * exp_ch3.ads (Needs_Simple_Initialization): Moved to Sem_Util.
899         * exp_ch4.adb (Expand_N_Allocator): Optimize the default allocation of
900         an array of scalars.
901         * sem_prag.adb (Analyze_Float_Value): New routine.
902         (Analyze_Integer_Value): New routine.
903         (Analyze_Pragma): Reimplement the analysis of pragma Initialize_Scalars
904         to handled the extended form of the pragma.
905         (Analyze_Type_Value_Pair): New routine.
906         * sem_util.adb: Add invalid value-related data structures.
907         (Examine_Array_Bounds): New routine.
908         (Has_Static_Array_Bounds): Reimplemented.
909         (Has_Static_Non_Empty_Array_Bounds): New routine.
910         (Invalid_Scalar_Value): New routine.
911         (Needs_Simple_Initialization): Moved from Exp_Ch3.
912         (Set_Invalid_Scalar_Value): New routines.
913         * sem_util.ads (Has_Static_Non_Empty_Array_Bounds): New routine.
914         (Invalid_Scalar_Value): New routine.
915         (Needs_Simple_Initialization): Moved from Exp_Ch3.
916         (Set_Invalid_Scalar_Value): New routines.
917         * snames.ads-tmpl: Add names for the salar type families used by pragma
918         Initialize_Scalars.
920 2018-05-22  Javier Miranda  <miranda@adacore.com>
922         * exp_disp.adb (Make_DT): Initialize the External_Tag with an empty
923         string when pragma No_Tagged_Streams is applicable to the tagged type,
924         and initialize the Expanded_Name with an empty string when pragma
925         Discard_Names is applicable to the tagged type.
927 2018-05-22  Ed Schonberg  <schonberg@adacore.com>
929         * sem_ch6.adb (Check_Conformance): Add RM reference for rule that a
930         formal subprogram is never subtype conformqnt, and thus cannot be the
931         prefix of 'Access.  Reject as well the attribute when applied to a
932         renaming of a formal subprogram.
934 2018-05-22  Hristian Kirtchev  <kirtchev@adacore.com>
936         * exp_ch3.adb (Build_Array_Init_Proc): Update the call to
937         Needs_Simple_Initialization.
938         (Build_Init_Statements): Update the call to Get_Simple_Init_Val.
939         (Check_Subtype_Bounds): Renamed to Extract_Subtype_Bounds. Update the
940         profile and comment on usage.
941         (Default_Initialize_Object): Do not use New_Copy_Tree to set the proper
942         Sloc of a value obtained from aspect Default_Value because this could
943         potentially replicate large trees. The proper Sloc is now set in
944         Get_Simple_Init_Val.
945         (Get_Simple_Init_Val): Reorganized by breaking the various cases into
946         separate routines. Eliminate the use of global variables.
947         (Init_Component): Update the call to Get_Simple_Init_Val.
948         (Needs_Simple_Initialization): Update the parameter profile and all
949         uses of T.
950         (Simple_Init_Defaulted_Type): Copy the value of aspect Default_Value
951         and set the proper Sloc.
952         * exp_ch3.ads (Get_Simple_Init_Val): Update the parameter profile and
953         comment on usage.
954         (Needs_Simple_Initialization): Update the parameter profile.
956 2018-05-22  Patrick Bernardi  <bernardi@adacore.com>
958         * sem_ch3.adb (Build_Discriminant_Constraints): Raise an error if the
959         user tries to use a subtype indication as a discriminant constraint.
961 2018-05-22  Ed Schonberg  <schonberg@adacore.com>
963         * exp_ch4.ads, exp_ch4.adb, exp_util.adb, expander.adb: Remove mention
964         of N_Reduction_Expression and N_Reduction_Expression_Parameter.
965         * par-ch4.adb: Remove parsing routines for reduction expressions.
966         * sem.adb, sinfo.ads, sinfo.adb, sem_ch4.ads, sem_ch4.adb, sem_res.adb,
967         sem_spark.adb, sprint.adb: Remove analysis routines for reduction
968         expressions.
970 2018-05-22  Arnaud Charlet  <charlet@adacore.com>
972         * sem_ch8.adb (Check_Frozen_Renaming): Do not emit error in
973         Relaxed_RM_Semantics mode.
975 2018-05-22  Arnaud Charlet  <charlet@adacore.com>
977         * comperr.adb (Delete_SCIL_Files): Take into account
978         N_Generic_Package_Renaming_Declaration.
980 2018-05-22  Ed Schonberg  <schonberg@adacore.com>
982         * sem_ch3.adb (Search_Derivation_Levels): Whenever a parent type is
983         private, use the full view if available, because it may include renamed
984         discriminants whose values are stored in the corresponding
985         Stored_Constraint.
987 2018-05-22  Ed Schonberg  <schonberg@adacore.com>
989         * einfo.ads, einfo.adb: New attribute Hidden_In_Formal_Instance,
990         defined on packages that are actuals for formal packages, in order to
991         set/reset the visibility of the formals of a formal package with given
992         actuals, when there are subsequent uses of those formals in the
993         enclosing generic, as required by RN 12.7 (10).
994         * atree.ads, atree.adb: Add operations for Elist30.
995         * atree.h: Add Elist30.
996         * sem_ch12.adb (Analyze_Formal_Package_Instantiation): Collect formals
997         that are not defaulted and are thus not visible within the current
998         instance.
999         (Check_Formal_Packages): Reset visibility of formals of a formal
1000         package that are not defaulted, on exit from current instance.
1002 2018-05-22  Hristian Kirtchev  <kirtchev@adacore.com>
1004         * sem_prag.adb (Analyze_Input_Output): Emit an error when a non-null,
1005         non-'Result output appears in the output list of a function.
1007 2018-05-22  Hristian Kirtchev  <kirtchev@adacore.com>
1009         * exp_attr.adb (Build_Array_VS_Func): Reimplemented.
1010         (Build_Record_VS_Func): Reimplemented.
1011         (Expand_N_Attribute): Reimplement the handling of attribute
1012         'Valid_Scalars.
1013         * sem_attr.adb (Analyze_Attribute): Reimplement the handling of
1014         attribute 'Valid_Scalars.
1015         * sem_util.adb (Scalar_Part_Present): Reimplemented.
1016         (Validated_View): New routine.
1017         * sem_util.ads (Scalar_Part_Present): Update the parameter profile and
1018         comment on usage.
1019         (Validated_View): New routine.
1020         * doc/gnat_rm/implementation_defined_attributes.rst: Update the
1021         documentation of attribute 'Valid_Scalars.
1022         * gnat_rm.texi: Regenerate.
1024 2018-05-22  Bob Duff  <duff@adacore.com>
1026         * binde.adb: (Choose): Ignore a pragma Elaborate_Body that appears in
1027         the spec of a SAL_Interface package.
1029 2018-05-22  Ed Schonberg  <schonberg@adacore.com>
1031         * freeze.adb (Freeze_Entity): When analyzing delayed aspects of an
1032         entity E within a generic unit, indicate that there are no remaining
1033         delayed aspects after invoking Analyze_Aspects_At_Freeze_Point. The
1034         entity E is not frozen yet but the aspects should not be reanalyzed at
1035         the freeze point, which may be outside of the generic and may not have
1036         the proper visibility.
1038 2018-05-22  Bob Duff  <duff@adacore.com>
1040         * doc/gnat_ugn/gnat_utility_programs.rst: Add documentation for
1041         the new --split-line-before-record, --indent-named-statements and
1042         --no-align-modes gnatpp switches.
1044 2018-05-22  Ed Schonberg  <schonberg@adacore.com>
1046         * sem_prag.adb (Process_Compile_Time_Warning_Or_Error): Handle properly
1047         a second argument that is a constant of a given string value.
1049 2018-05-22  Doug Rupp  <rupp@adacore.com>
1051         * sigtramp-vxworks-target.inc: Align stack to 128bits on AArch64.
1053 2018-05-22  Jerome Lambourg  <lambourg@adacore.com>
1055         * sigtramp-qnx.c: Fix stack alignment issue in the signal trampoline.
1057 2018-05-22  Ed Schonberg  <schonberg@adacore.com>
1059         * freeze.adb (Freeze_Fixed_Point_Type): If the first subtype has
1060         delayed aspects, analyze them now, os that the representation of the
1061         type (size, bounds) can be computed and validated.
1063 2018-05-22  Olivier Hainque  <hainque@adacore.com>
1065         * libgnat/s-dwalin.adb (Enable_Cache): Skip symbols outside of the
1066         executable code section boundaries.
1068 2018-05-22  Javier Miranda  <miranda@adacore.com>
1070         * locales.c: New implementation for the Ada.Locales package.
1071         * libgnat/a-locale.ads: Remove comment indicating that this is not
1072         implemented.
1073         * doc/gnat_rm/standard_library_routines.rst: Remove comment indicating
1074         that this is not implemented.
1075         * gnat_rm.texi: Regenerate.
1077 2018-05-22  Hristian Kirtchev  <kirtchev@adacore.com>
1079         * exp_ch5.adb, freeze.adb, pprint.adb, sem_ch4.adb, sem_res.adb: Minor
1080         reformattings.
1082 2018-05-22  Justin Squirek  <squirek@adacore.com>
1084         * sem_ch12.adb (In_Same_Declarative_Part): Moved to sem_util.
1085         (Freeze_Subprogram_Body, Install_Body): Modify calls to
1086         In_Same_Declarative_Part.
1087         * sem_prag.adb (Analyze_Pragma-Pragma_Pure_Function): Add check to
1088         verify pragma declaration is within the same declarative list with
1089         corresponding error message.
1090         * sem_util.adb, sem_util.ads (In_Same_Declarative_Part): Moved from
1091         sem_ch12.adb and generalized to be useful outside the scope of
1092         freezing.
1094 2018-05-22  Hristian Kirtchev  <kirtchev@adacore.com>
1096         * sem_ch6.adb (Analyze_Subprogram_Declaration): Set the proper
1097         categorization of the unit after processing the aspects in case one of
1098         its aspects is converted into a categorization pragma.
1100 2018-05-21  Ed Schonberg  <schonberg@adacore.com>
1102         * freeze.adb (Warn_Overlay): Do not emit a wawrning on an object
1103         declaration with an explicit address clause and a type with default
1104         initialization, if the declaration carries an aspect
1105         Suppress_Initialization.
1107 2018-05-21  Daniel Mercier  <mercier@adacore.com>
1109         * pprint.adb: Use mixed case for attribute names.
1111 2018-05-21  Hristian Kirtchev  <kirtchev@adacore.com>
1113         * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Rename the call to
1114         Analyze_Aspect_Specifications_On_Body_Or_Stub.
1115         (Analyze_Subprogram_Body_Helper): Rename the calls to
1116         Analyze_Aspect_Specifications_On_Body_Or_Stub.
1117         * sem_ch9.adb (Analyze_Entry_Body): Rename the call to
1118         Analyze_Aspect_Specifications_On_Body_Or_Stub.
1119         * sem_ch10.adb: Add with and use clause for Sem_Ch13.
1120         (Analyze_Package_Body_Stub): Add constant Id. Decorate the package stub
1121         prior to analyzing its aspects.
1122         (Analyze_Protected_Body_Stub): Add constant Id. Decorate the package
1123         stub prior to analyzing its aspects. Save and restore the configuration
1124         switches.
1125         (Analyze_Task_Body_Stub): Add constant Id. Decorate the package stub
1126         prior to analyzing its aspects.
1127         * sem_ch13.adb (Analyze_Aspect_Specifications_On_Body_Or_Stub): Renamed
1128         to Analyze_Aspects_On_Subprogram_Body_Or_Stub.
1129         * sem_ch13.ads (Analyze_Aspect_Specifications_On_Body_Or_Stub): Renamed
1130         to Analyze_Aspects_On_Subprogram_Body_Or_Stub.
1131         * sem_prag.adb: Code reformatting.
1132         (Analyze_Refined_Depends_Global_Post): Consider task body stubs.
1134 2018-05-21  Jerome Lambourg  <lambourg@adacore.com>
1136         * gcc-interface/Makefile.in: Add g-soliop__qnx.ads to the runtime build
1137         for QNX.
1139 2018-05-21  Hristian Kirtchev  <kirtchev@adacore.com>
1141         * exp_cg.adb: Remove with and use clause for Exp_Disp.
1142         * exp_ch9.adb: Remove with and use clause for Exp_Disp.
1143         * exp_disp.adb (Is_Predefined_Dispatching_Operation): Moved to Sem_Util.
1144         (Is_Predefined_Interface_Primitive): Moved to Sem_Util.
1145         (Is_Predefined_Internal_Operation): Moved to Sem_Util.
1146         * exp_disp.ads (Is_Predefined_Dispatching_Operation): Moved to Sem_Util.
1147         (Is_Predefined_Interface_Primitive): Moved to Sem_Util.
1148         (Is_Predefined_Internal_Operation): Moved to Sem_Util.
1149         * exp_dist.adb: Remove with and use clause for Exp_Disp.
1150         * freeze.adb: Remove with and use clause for Exp_Disp.
1151         * sem_cat.adb: Remove with and use clause for Exp_Disp.
1152         * sem_ch6.adb: Remove with and use clause for Exp_Disp.
1153         * sem_ch12.adb: Remove with and use clause for Exp_Disp.
1154         * sem_elab.adb (Check_Overriding_Primitive): Do not process predefined
1155         primitives.
1156         * sem_util.adb: Remove with and use clause for Exp_Disp.
1157         (Is_Predefined_Dispatching_Operation): Moved from Exp_Disp.
1158         (Is_Predefined_Interface_Primitive): Moved from Exp_Disp.
1159         (Is_Predefined_Internal_Operation): Moved from Exp_Disp.
1160         * sem_util.ads (Is_Predefined_Dispatching_Operation): Moved from
1161         Exp_Disp.
1162         (Is_Predefined_Interface_Primitive): Moved from Exp_Disp.
1163         (Is_Predefined_Internal_Operation): Moved from Exp_Disp.
1165 2018-05-21  Ed Schonberg  <schonberg@adacore.com>
1167         * sem_res.adb (Valid_Conversion): Improve error message on an illegal
1168         type conversion whose expression has a limited view of a type.
1170 2018-05-21  Ed Schonberg  <schonberg@adacore.com>
1172         * exp_ch5.adb (Build_Formal_Container_Iteration): If source has
1173         explicit name for iterator loop, preserve that name in expanded
1174         construct, for possible use in exit statements.
1176 2018-05-21  Javier Miranda  <miranda@adacore.com>
1178         * sem_ch4.adb (Analyze_Membership_Op): Avoid compiler crash when the
1179         spec of a unit has Ada 2012 membership tests with multiple choices and
1180         the unit body is not compiled under Ada 2012 mode.
1182 2018-05-21  Doug Rupp  <rupp@adacore.com>
1184         * sigtramp-vxworks-target.inc: Set cfa_reg properly from sigcontext
1185         pregs.
1186         (CFI_COMMON_REGS): Restore LR jic probed from prologue.
1187         (REGNO_PC_OFFSET): Change to correct value for Aarch64.
1189 2018-05-21  Jose Ruiz  <ruiz@adacore.com>
1191         * doc/gnat_ugn/gnat_utility_programs.rst, exp_attr.adb,
1192         libgnarl/s-tassta.adb: Minor typo fixes
1194 2018-05-21  Ed Schonberg  <schonberg@adacore.com>
1196         * sem_ch4.adb (Analyze_One_Call): Recognize complex cases where an
1197         indexed call originally in prefix forn is itself the prefix of a
1198         further call.
1200 2018-05-21  Piotr Trojanek  <trojanek@adacore.com>
1202         * sem_eval.adb (Is_Null_Range): Clarify access to the full view of a
1203         type.
1204         (Not_Null_Range): Same as above.
1206 2018-05-21  Hristian Kirtchev  <kirtchev@adacore.com>
1208         * exp_ch3.adb: Minor reformatting.
1209         * exp_ch6.adb: Likewise.
1210         * freeze.adb: Likewise.
1211         * inline.adb: Likewise.
1212         * sem_util.adb: Likewise.
1214 2018-05-21  Yannick Moy  <moy@adacore.com>
1216         * inline.adb (Expand_Inlined_Call.Process_Formals): Use a type
1217         conversion instead of an unchecked type conversion when inlining a
1218         return statement, unless type qualification is required (for character
1219         and string literal) or no check can result from the conversion (for
1220         access types).
1221         * opt.ads: Update comment.
1223 2018-05-21  Hristian Kirtchev  <kirtchev@adacore.com>
1225         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Install the elaboration
1226         model of the compilation unit spec, if any.
1227         * sem_ch7.adb (Analyze_Package_Body_Helper): Install the elaboration
1228         model of the compilation unit spec, if any.
1229         * sem_ch10.adb (Analyze_Subunit): Install the elaboration model of the
1230         parent compilation unit spec, if any.
1231         * sem_elab.adb (Check_Elaboration_Scenarios): Restore the elaboration
1232         model of the main unit.
1233         (Is_Same_Unit): The routine now uses Unit_Entity.
1234         (Is_Subunit): Removed.
1235         (Normalize_Unit): Removed.
1236         (Unit_Entity): New routine.
1237         * sem_prag.adb (Analyze_Pragma): Reimplement the handling of pragma
1238         Elaboration_Checks. The analysis now ensures that the pragma appears at
1239         the configuration level, and on the initial declaration of a unit.
1240         Other placements are either flagged as illegal, or ignored.
1241         (Check_Duplicate_Elaboration_Checks_Pragma): New routine.
1242         (Ignore_Elaboration_Checks_Pragma): New routine.
1243         * sem_util.adb (Install_Elaboration_Model): New routine.
1244         * sem_util.ads (Install_Elaboration_Model): New routine.
1245         * doc/gnat_rm/implementation_defined_pragmas.rst: Update the
1246         documentation of pragma Elaboration_Checks.
1247         * gnat_rm.texi: Regenerate.
1249 2018-05-21  Olivier Hainque  <hainque@adacore.com>
1251         * libgnat/s-trasym__dwarf.adb (Executable_Name): Return argv[0] instead
1252         of empty string when argv[0] couldn't be found on PATH.
1253         (Enable_Cache): Raise Program_Error instead of attempting a null
1254         pointer dereference when the Exec_Module initialization failed.
1256 2018-05-21  Piotr Trojanek  <trojanek@adacore.com>
1258         * libgnarl/a-reatim.ads (Clock_Time): Remove External aspect.
1259         * libgnarl/a-taside.ads (Tasking_State): Likewise.
1260         * libgnat/a-calend.ads (Clock_Time): Likewise.
1262 2018-05-21  Yannick Moy  <moy@adacore.com>
1264         * sem_ch6.adb (Analyze_Procedure_Call): Refine test to recognize prefix
1265         call notation in inlined call in GNATprove mode.
1267 2018-05-21  Hristian Kirtchev  <kirtchev@adacore.com>
1269         * einfo.adb (Is_External_State): An abstract state is also external
1270         when it is declared with option "synchronous".
1271         * einfo.ads: Update the documentation of synthesized attribute
1272         Is_External_State.
1273         * sem_util.adb (Find_Simple_Properties): New routine.
1274         (Is_Enabled_External_Property): New routine.
1275         (State_Has_Enabled_Property): Reimplemented. The two flavors of option
1276         External have precedence over option Synchronous when determining
1277         whether a property is in effect.
1279 2018-05-21  Yannick Moy  <moy@adacore.com>
1281         * sem_eval.adb (Static_Length): Take into account case of variable of
1282         subtype string literal.
1284 2018-05-21  Olivier Hainque  <hainque@adacore.com>
1286         * libgnat/s-objrea.ads (Get_Memory_Bounds): Rename as Get_Xcode_Bounds.
1287         (Object_Section): Rename Flag_Alloc component as Flag_Xcode.
1288         * libgnat/s-objrea.adb (Get_Xcode_Bounds): Adjust to new subprogram and
1289         component name.
1290         (Get_Section, ELF case): Set Flag_Xcode from SHF_EXECINSTR.
1291         * libgnat/s-dwalin.adb (Open): Adjust to the Get_Memory_Bounds name
1292         change.
1294 2018-05-21  Olivier Hainque  <hainque@adacore.com>
1296         * libgnat/s-dwalin.ads (Dwarf_Context): Change type of Load_Address to
1297         Address, and type of Low, High to Storage_Offset.
1298         (Low): Rename as Low_Address and convey that the return value is a
1299         runtime reference accounting for a load address.
1300         * libgnat/s-dwalin.adb (Read_Aranges_Entry): Adjust to the
1301         address/offset type changes.
1302         (Aranges_Lookup): Likewise.
1303         (Symbolic_Address): Likewise.
1304         (Symbolic_Traceback): Likewise.
1305         (Dump_Cache): Likewise.
1306         (Is_Inside): Likewise.
1307         (Open): Likewise.
1308         (Set_Load_Address): Likewise.
1309         (Low_Address): Likewise, and account for C.Load_Address.
1310         * libgnat/s-trasym__dwarf.adb (Lt): Use Low_Address instead of Low.
1311         (Multi_Module_Symbolic_Traceback): Compare address in traceback
1312         with module Low_Address instead of Low.
1314 2018-05-21  Olivier Hainque  <hainque@adacore.com>
1316         * libgnat/s-dwalin.ads (Dwarf_Context): Rename Load_Slide as
1317         Load_Address.
1318         * libgnat/s-dwalin.adb (Is_Inside): Adjust accordingly.
1319         (Set_Load_Address): Likewise.
1320         (Symbolic_Traceback): Likewise.
1322 2018-05-21  Olivier Hainque  <hainque@adacore.com>
1324         * libgnat/s-trasym__dwarf.adb (Add_Module_To_Cache): Expect a
1325         Load_Address argument and pass it down to Init_Module.
1326         * libgnat/s-tsmona__linux.adb (Build_Cache_For_All_Modules): Pass
1327         lm.l_addr as the Load_Address to Add_Module_To_Cache.
1329 2018-05-21  Piotr Trojanek  <trojanek@adacore.com>
1331         * einfo.adb (Has_Discriminants): Stronger assertion.
1332         (Set_Has_Discriminants): Stronger assertion.
1333         * sem_ch13.adb (Push_Scope_And_Install_Discriminants): Adapt to respect
1334         the stronger assertion on Has_Discriminant.
1335         (Uninstall_Discriminants_And_Pop_Scope): Same as above.
1336         * sem_util.adb (New_Copy_Tree): Same as above.
1337         * sem_ch7.adb (Generate_Parent_References): Prevent calls to
1338         Has_Discriminant on non-type entities that might happen when the
1339         compiled code has errors.
1340         * sem_ch3.adb (Derived_Type_Declaration): Only call
1341         Set_Has_Discriminant on type entities.
1343 2018-05-21  Arnaud Charlet  <charlet@adacore.com>
1345         * exp_unst.adb (Unnest_Subprogram): Unnest all subprograms relevant for
1346         code generation.
1348 2018-05-21  Piotr Trojanek  <trojanek@adacore.com>
1350         * lib.ads: Fix typo in enumeration in comment.
1352 2018-05-21  Ed Schonberg  <schonberg@adacore.com>
1354         * sem_attr.adb (Analyze_Attribute, case Scalar_Storage_Order): The
1355         attribute reference is legal within a generic unit when the prefix is a
1356         formal private type.
1358 2018-05-21  Hristian Kirtchev  <kirtchev@adacore.com>
1360         * exp_ch7.adb (Establish_Transient_Scope): Code cleanup. Do not
1361         delegate the secondary stack management when there is no suitable
1362         transient context, and the transient scope was intended to manage the
1363         secondary stack because this causes premature reclamation. Change the
1364         transient scope creation logic by special casing assignment statements
1365         of controlled components for type initialization procedures.
1366         (Find_Node_To_Be_Wrapped): Renamed to Find_Transient_Context. Update
1367         the comment on usage.
1368         (Find_Transient_Context): Change the initinte loop into a while loop.
1369         Iterations schemes and iterator specifications are not valid transient
1370         contexts because they rely on special processing. Assignment statements
1371         are now treated as a normal transient context, special cases are
1372         handled by the caller. Add special processing for pragma Check.
1373         (Is_OK_Construct): Removed. Its functionality has been merged in
1374         routine Find_Transient_Context.
1375         * sem_ch5.adb (Check_Call): Reimplemented. Add code to properly
1376         retrieve the subprogram being invoked. Use a more accurate predicate
1377         (Requires_Transient_Scope) to determine that the function will emply
1378         the secondary stack.
1380 2018-05-21  Piotr Trojanek  <trojanek@adacore.com>
1382         * ada_get_targ.adb: Fix subprogram body headers.
1383         * adabkend.adb: Likewise.
1384         * checks.adb: Likewise.
1385         * exp_ch3.adb: Likewise.
1386         * exp_ch5.adb: Likewise.
1387         * exp_ch9.adb: Likewise.
1388         * exp_dist.adb: Likewise.
1389         * exp_tss.adb: Likewise.
1390         * inline.adb: Likewise.
1391         * lib-writ.adb: Likewise.
1392         * lib-xref-spark_specific.adb: Likewise.
1393         * libgnarl/s-osinte__darwin.adb: Likewise.
1394         * libgnarl/s-stusta.adb: Likewise.
1395         * libgnarl/s-taprop__solaris.adb: Likewise.
1396         * libgnarl/s-tposen.adb: Likewise.
1397         * libgnarl/s-vxwext__kernel-smp.adb: Likewise.
1398         * libgnarl/s-vxwext__kernel.adb: Likewise.
1399         * libgnat/a-btgbso.adb: Likewise.
1400         * libgnat/a-cfdlli.adb: Likewise.
1401         * libgnat/a-cfhama.adb: Likewise.
1402         * libgnat/a-cfinve.adb: Likewise.
1403         * libgnat/a-cimutr.adb: Likewise.
1404         * libgnat/a-coboho.adb: Likewise.
1405         * libgnat/a-cofove.adb: Likewise.
1406         * libgnat/a-cofuve.adb: Likewise.
1407         * libgnat/a-comutr.adb: Likewise.
1408         * libgnat/a-exexda.adb: Likewise.
1409         * libgnat/a-tags.adb: Likewise.
1410         * libgnat/a-tideau.adb: Likewise.
1411         * libgnat/a-wtdeau.adb: Likewise.
1412         * libgnat/a-ztdeau.adb: Likewise.
1413         * libgnat/g-alleve.adb: Likewise.
1414         * libgnat/s-excdeb.adb: Likewise.
1415         * libgnat/s-parint.adb: Likewise.
1416         * libgnat/s-shasto.adb: Likewise.
1417         * libgnat/s-traceb__hpux.adb: Likewise.
1418         * prepcomp.adb: Likewise.
1419         * sem_ch4.adb: Likewise.
1420         * sem_ch6.adb: Likewise.
1421         * sem_dist.adb: Likewise.
1422         * sem_prag.adb: Likewise.
1423         * sem_util.adb: Likewise.
1424         * sinfo.adb: Likewise.
1425         * switch.adb: Likewise.
1427 2018-05-04  John Marino  <gnugcc@marino.st>
1429         PR ada/85635
1430         * link.c (BSD platforms): Add missing backslash.
1432 2018-04-27  Eric Botcazou  <ebotcazou@adacore.com>
1434         PR ada/85540
1435         * init.c (__gnat_handle_vms_condition): Add missing parentheses.
1437 2018-04-25  Eric Botcazou  <ebotcazou@adacore.com>
1439         PR ada/85007
1440         * gnat_ugn.texi: Regenerate.
1442 2018-03-23  Eric Botcazou  <ebotcazou@adacore.com>
1444         PR ada/85007
1445         * gnatlink.adb (Gnatlink): Remove handling of -b switch.
1446         * doc/gnat_ugn/building_executable_programs_with_gnat.rst (gnatlink):
1447         Remove documentation of -b switch.
1449 2018-03-23  Eric Botcazou  <ebotcazou@adacore.com>
1451         PR ada/85036
1452         * gnatlink.adb (Process_Args): Drop existing link switches if multiple
1453         switches are passed for --LINK.
1455 2018-03-12  Eric Botcazou  <ebotcazou@adacore.com>
1457         PR ada/82813
1458         * gcc-interface/misc.c (gnat_post_options): Disable string overflow
1459         warnings.
1461 2018-03-10  Eric Botcazou  <ebotcazou@adacore.com>
1463         * gcc-interface/trans.c (node_has_volatile_full_access) <N_Identifier>:
1464         Consider only entities for objects.
1466 2018-03-07  Sebastian Huber  <sebastian.huber@embedded-brains.de>
1468         * gcc-interface/Makefile.in (OSCONS_CPP): Remove redundant
1469         $(GNATLIBCFLAGS).
1470         (OSCONS_EXTRACT): Add $(GNATLIBCFLAGS_FOR_C).
1472 2018-03-06  Eric Botcazou  <ebotcazou@adacore.com>
1474         * gcc-interface/trans.c (convert_with_check): Fix typo in the condition
1475         guarding the overflow check emitted for the upper bound of a floating-
1476         point conversion.
1478 2018-03-06  Eric Botcazou  <ebotcazou@adacore.com>
1480         * gcc-interface/utils.c (def_builtin_1): Bail out on error_mark_node.
1482 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
1484         * libgnat/i-cexten.ads (Float_128): New type.
1486 2018-02-02  Eric Botcazou  <ebotcazou@adacore.com>
1488         * gcc-interface/decl.c (array_type_has_nonaliased_component): Return
1489         false if the component type is a pointer.
1491 2018-01-11  Gary Dismukes  <dismukes@adacore.com>
1493         * exp_ch3.adb (Default_Initialize_Object): Call New_Copy_Tree on the
1494         result of Get_Simple_Init_Value and pass the source location of the
1495         object declaration's object_definition.
1497 2018-01-11  Ed Schonberg  <schonberg@adacore.com>
1499         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration): Handle
1500         properly object declarations with initializations that are
1501         build-in-place function calls, when there is an address specification,
1502         either as an aspect specification or an explicit attribute
1503         specification clause, for the initialized object.
1504         * freeze.adb (Check_Address_Clause): Do not remove side-effects from
1505         initial expressions in the case of a build-in-place call.
1507 2018-01-11  Piotr Trojanek  <trojanek@adacore.com>
1509         * sem_eval.adb (Is_Null_Range): Retrieve the full view when called on a
1510         private (sub)type; refactor to avoid early return statement.
1511         (Not_Null_Range): Same as above.
1513 2018-01-11  Hristian Kirtchev  <kirtchev@adacore.com>
1515         * freeze.adb (Freeze_Entity): Ensure that a Ghost type is not
1516         concurrent, nor effectively volatile.
1517         * ghost.adb (Check_Ghost_Type): New routine.
1518         * ghost.ads (Check_Ghost_Type): New routine.
1519         * sem_util.adb (Is_Declaration): Reimplemented. The routine can now
1520         consider specific subsets of declarations.
1521         (Is_Declaration_Other_Than_Renaming): Removed. Its functionality is
1522         replicated by Is_Declaration.
1523         * sem_util.ads (Is_Declaration): New parameter profile. Update the
1524         comment on usage.
1525         (Is_Declaration_Other_Than_Renaming): Removed.
1527 2018-01-11  Hristian Kirtchev  <kirtchev@adacore.com>
1529         * sem_ch5.adb (Analyze_Assignment): Assignments to variables that act
1530         as Part_Of consituents of single protected types are illegal when they
1531         take place inside a protected function.
1532         (Diagnose_Non_Variable_Lhs): Use Within_Function to check for an
1533         enclosing function.
1534         (Is_Protected_Part_Of_Constituent): New routine.
1535         (Within_Function): New routine.
1537 2018-01-11  Arnaud Charlet  <charlet@adacore.com>
1539         Bump copyright notices to 2018.
1541 2018-01-11  Hristian Kirtchev  <kirtchev@adacore.com>
1543         * binde.adb, par-ch6.adb, par-ch9.adb, sem_ch12.adb, sem_ch13.adb:
1544         Minor reformatting.
1546 2018-01-11  Justin Squirek  <squirek@adacore.com>
1548         * par-ch6.adb (Scan_Body_Or_Expression_Function): Add additional check
1549         to make sure a given expression function is properly parenthesized.
1551 2018-01-11  Hristian Kirtchev  <kirtchev@adacore.com>
1553         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Check the
1554         categorization of a subprogram body which does not complete a previous
1555         declaration.
1557 2018-01-11  Hristian Kirtchev  <kirtchev@adacore.com>
1559         * sem_ch10.adb (Check_Private_Child_Unit): Ensure that the enclosing
1560         scope of package Ada is Standard.
1562 2018-01-11  Ed Schonberg  <schonberg@adacore.com>
1564         * sem_ch13.adb (Replace_Type_Ref): Handle properly reference to a
1565         subcomponent of the current entity when building the body for a dynamic
1566         predicate function for a record with composite subcomponents.
1568 2018-01-11  Hristian Kirtchev  <kirtchev@adacore.com>
1570         * exp_aggr.adb (Convert_Aggr_In_Object_Decl): Update the call to
1571         Establish_Transient_Scope.
1572         (Convert_To_Assignments): Update the call to Establish_Transient_Scope.
1573         (Expand_Array_Aggregate): Update the call to Establish_Transient_Scope.
1574         * exp_ch6.adb (Expand_Call_Helper): Update the call to
1575         Establish_Transient_Scope.
1576         (Make_Build_In_Place_Call_In_Object_Declaration): Update the call to
1577         Establish_Transient_Scope.
1578         * exp_ch7.adb (Establish_Transient_Scope): Restructured. Delegate the
1579         management of the secondary stack to an enclosing scope if there is no
1580         suitable construct to wrap, and the transient scope was intended to
1581         manage the secondary stack.
1582         (Find_Node_To_Be_Wrapped): Restructured. A case_statement_alternative
1583         is a valid boundary for a transient expression which comes from the
1584         statements of the alternative, otherwise alternatives cannot be
1585         wrapped. Assignments of controlled objects which have controlled
1586         actions suppressed now stop the traversal as there is no point in
1587         looking for an enclosing construct. Add several N_xxx_Body choices to
1588         the termination conditions for completeness.
1589         * exp_ch7.ads (Establish_Transient_Scope): Update the parameter profile
1590         and the associated comment on usage.
1591         * exp_smem.adb (Add_Shared_Var_Lock_Procs): Update the call to
1592         Establish_Transient_Scope.
1593         (Add_Write_After): Update the call to Establish_Transient_Scope.
1594         * sem_res.adb (Check_Initialization_Call): Removed.
1595         (Resolve_Actuals): Account for additional cases where finalization
1596         actions are required by utilizing predicate Needs_Finalization rather
1597         than Is_Controlled.
1598         (Resolve_Call): Type initialization procedures can now utilize
1599         transient scopes to manage the secondary stack, thus preventing leaks
1600         during initialization.  Remove the previous kludgy algorithm which
1601         attempts to manage the secondary stack at the object creation site.
1603 2018-01-11  Jerome Lambourg  <lambourg@adacore.com>
1605         * libgnat/g-soliop__qnx.ads: New.
1606         * adaint.c, adaint.h, cstreams.c, s-oscons-tmplt.c, sysdep.c: Update
1607         for QNX.
1609 2018-01-11  Bob Duff  <duff@adacore.com>
1611         * par-ch9.adb (P_Protected_Operation_Declaration_Opt): Give an error if
1612         a null procedure occurs in a protected definition.
1614 2018-01-11  Bob Duff  <duff@adacore.com>
1616         * binderr.ads, namet.ads: Minor reformatting.
1618 2018-01-11  Bob Duff  <duff@adacore.com>
1620         * doc/gnat_ugn/gnat_utility_programs.rst: Improve documentation of
1621         xml2gnat.
1623 2018-01-11  Bob Duff  <duff@adacore.com>
1625         * binde.adb (Force_Elab_Order): Give an error if there are duplicate
1626         unit names.
1628 2018-01-11  Ed Schonberg  <schonberg@adacore.com>
1630         * sem_ch6.adb (Freeze_Expr_Types): If an access value is the
1631         controlling argument of a dispatching call. freeze the corresponding
1632         designated type.
1634 2018-01-11  Ben Brosgol  <brosgol@adacore.com>
1636         * doc/Makefile: Add Sphinx option -W to treat warnings as errors.
1638 2018-01-11  Ben Brosgol  <brosgol@adacore.com>
1640         * doc/gnat_rm/implementation_defined_aspects.rst: Minor type/wording
1641         corrections.
1642         * gnat_rm.texi: Regenerate.
1644 2018-01-11  Ed Schonberg  <schonberg@adacore.com>
1646         * sem_ch12.adb (Check_Fixed_Point_Type): Do not apply check if the
1647         formsl type corresponding to the actual fixed point type is private,
1648         because in this case there can be no suspicious arithmetic operations
1649         in the generic unless they reference a formal subprogram.  Clarify
1650         warning.
1652 2018-01-11  Javier Miranda  <miranda@adacore.com>
1654         * exp_util.adb (Remove_Side_Effects): No action done for functions
1655         returning class-wide types since it requires generating code using
1656         'reference and the CCG target has no secondary stack.
1657         * gnat1drv.adb: Disable building static dispatch tables when generating
1658         C code.
1660 2018-01-11  Piotr Trojanek  <trojanek@adacore.com>
1662         * libgnat/a-direio.ads, libgnat/a-sequio.ads, libgnat/a-ststio.ads,
1663         libgnat/a-textio.ads, libgnat/a-witeio.ads, libgnat/a-ztexio.ads
1664         (File_Type): Add Default_Initial_Condition aspect.
1666 2018-01-11  Pascal Obry  <obry@adacore.com>
1668         * libgnat/s-os_lib.adb (Normalize_Pathname): New implementation.
1670 2018-01-11  Bob Duff  <duff@adacore.com>
1672         * doc/gnat_ugn/gnat_utility_programs.rst: Rewrite gnatpp documentation
1673         to match what the Libadalang-based version does.
1674         * doc/gnat_ugn/about_this_guide.rst: Update reference.
1676 2018-01-11  Hristian Kirtchev  <kirtchev@adacore.com>
1678         * sem_res.adb (Uses_SS): A controlled type requires the secondary stack
1679         if it contains at least one component declaration employing a function
1680         call returning on the secondary stack.
1682 2018-01-11  Yannick Moy  <moy@adacore.com>
1684         * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
1685         Update description of restriction SPARK_05 with SPARK 2014.
1686         * gnat_rm.texi: Regenerate.
1688 2018-01-11  Vasiliy Fofanov  <fofanov@adacore.com>
1690         * doc/gnat_ugn/gnat_utility_programs.rst: Fix layout.
1692 2018-01-11  Hristian Kirtchev  <kirtchev@adacore.com>
1694         * exp_aggr.adb, exp_ch9.adb, exp_util.adb, sem_aggr.adb, sem_ch3.adb,
1695         sem_res.adb, sem_util.adb: Minor reformatting.
1697 2018-01-11  Ed Schonberg  <schonberg@adacore.com>
1699         * sem_prag.adb (Analyze_Pragma, case Predicate): Indicate that the type
1700         has a delayed aspect which must be processed at the point the type is
1701         frozen. This mimics what is done when the predicate is provided by a
1702         source aspect.
1704 2018-01-11  Doug Rupp  <rupp@adacore.com>
1706         * init.c (vxworks): Add macro checks for __aarch64__.
1708 2018-01-11  Hristian Kirtchev  <kirtchev@adacore.com>
1710         * exp_util.adb (Add_Failure_Expression): New routine.
1711         (Make_Predicate_Check): Reimplement the handling of Predicate_Failure.
1712         * sem_util.adb (Is_Current_Instance): Code cleanup.
1714 2018-01-11  Patrick Bernardi  <bernardi@adacore.com>
1716         * libgnat/s-parame*.adb, libgnat/s-parame*.ads: Remove unneeded
1717         Default_Sec_Stack_Size.
1718         * libgnat/s-secsta.adb (SS_Allocate): Handle the fixed secondary stack
1719         limit check so that the integer index does not overflow. Check the
1720         dynamic stack allocation does not cause the secondary stack pointer to
1721         overflow.
1722         (SS_Info): Align colons.
1723         (SS_Init): Cover the case when bootstraping with an old compiler that
1724         does not set Default_SS_Size.
1726 2018-01-11  Ed Schonberg  <schonberg@adacore.com>
1728         * sem_ch3.adb (Add_Internal_Interface_Entities): When checking the
1729         legality of an inherited operation that may require overriding, ignore
1730         primitive_wrappers that correspond to explicit operations that override
1731         an interface primitive.
1732         * exp_util.adb (Build_Class_Wide_Expression, Replace_Entity): If the
1733         operation to which the class-wide expression applies is a protected op.
1734         with a primitive_wrapper, verify that the updated inherited expression
1735         does not contain an internal call to a protected function.  This
1736         completes the implementation of AI12-0166.
1738 2018-01-11  Hristian Kirtchev  <kirtchev@adacore.com>
1740         * ali.adb: Document the remaining letters available for ALI lines.
1741         (Scan_ALI): A with clause is internal when it is encoded on a 'Z' line.
1742         * ali.ads: Update type With_Record. Field
1743         Implicit_With_From_Instantiation is no longer in use. Add field
1744         Implicit_With.
1745         * csinfo.adb (CSinfo): Remove the setup for attribute
1746         Implicit_With_From_Instantiation.
1747         * lib-writ.adb (Collect_Withs): Correct the logic which marks a unit as
1748         either implicitly or explicitly withed.
1749         (Is_Implicit_With_Clause): New routine.
1750         (Write_ALI): Rename array Implicit_With to Has_Implicit_With to avoid
1751         confusion with the with clause attribute by the same name.
1752         (Write_With_Lines): Update the emission of 'W', 'Y', and 'Z' headers.
1753         * rtsfind.adb (Maybe_Add_With): Code cleanup.
1754         * sem_ch8.adb (Present_System_Aux): Code cleanup.
1755         * sem_ch10.adb (Expand_With_Clause): Mark the with clause as generated
1756         for a parent unit.
1757         (Implicit_With_On_Parent): Mark the with clause as generated for a
1758         parent unit.
1759         * sem_ch12.adb (Inherit_Context): With clauses inherited by an
1760         instantiation are no longer marked as Implicit_With_From_Instantiation
1761         because they are already marked as implicit.
1762         * sem_elab.adb (Ensure_Prior_Elaboration_Static): Remove the kludge
1763         which marks implicit with clauses as related to an instantiation.
1764         * sinfo.adb (Implicit_With_From_Instantiation): Removed.
1765         (Parent_With): New routine.
1766         (Set_Implicit_With_From_Instantiation): Removed.
1767         (Set_Parent_With): New routine.
1768         * sinfo.ads: Update the documentation of attribute Implicit_With.
1769         Remove attribute Implicit_With_From_Instantiation along with
1770         occurrences in nodes.  Add attribute Parent_With along with occurrences
1771         in nodes.
1772         (Implicit_With_From_Instantiation): Removed along with pragma Inline.
1773         (Parent_With): New routine along with pragma Inline.
1774         (Set_Implicit_With_From_Instantiation): Removed along with pragma Inline.
1775         (Set_Parent_With): New routine along with pragma Inline.
1777 2018-01-11  Hristian Kirtchev  <kirtchev@adacore.com>
1779         * sem_util.adb (Find_Enclosing_Scope): Return the unique defining
1780         entity when the enclosing construct is a body.
1782 2018-01-11  Patrick Bernardi  <bernardi@adacore.com>
1784         * exp_ch9.adb (Expand_N_Task_Type_Declaration): Simplified
1785         Secondary_Stack_Size handling as a pragma is now generated for the
1786         corresponding aspect instead of an attribute.  Pragma expression is
1787         relocated instead of evaluated. Discriminant of the corresponding
1788         record type is referenced rather than the type discriminant.
1789         (Create_Secondary_Stack_For_Task, Make_Task_Create_Call): Update
1790         Secondary_Stack_Size rep item checks to only look for the pragma rep.
1791         * sem_ch13.adb (Analyze_One_Aspect): Transform
1792         Aspect_Secondary_Stack_Size into a pragma instead of an attribute
1793         because the attribute does not have visibility on a task type's
1794         discriminants when the type's definition is expanded.
1795         (Analyze_Attribute_Definition_Clause): Remove handling of
1796         Attribute_Secondary_Stack_Size.
1797         * snames.adb-tmpl, snames.ads-tmpl: Remove
1798         Attribute_Secondary_Stack_Size, no longer used.
1800 2018-01-11  Justin Squirek  <squirek@adacore.com>
1802         * sem_ch8.adb: Minor comment fix.
1804 2018-01-11  Hristian Kirtchev  <kirtchev@adacore.com>
1806         * exp_ch4.adb (Process_Action): Do not abandon the inspection of an
1807         individual action because the action may denote a complex expression,
1808         such as a case statement, which in turn may contain additional
1809         transient objects.
1811 2018-01-11  Ed Schonberg  <schonberg@adacore.com>
1813         * sem_aggr.adb (Resolve_Iterated_Component_Association): Perform
1814         analysis on a copy of the expression with a copy of the index variable,
1815         because full expansion will rewrite construct into a loop with the
1816         original loop variable.
1817         * exp_aggr.adb (Gen_Assign): Defer analysis and resolution if the
1818         expression is an iterated component association. Full analysis takes
1819         place when construct is rewritten as a loop.
1820         (In_Place_Assign_OK, Safe_Component): An iterated_component_association
1821         is not safe for in-place assignment.
1822         * sem_util.adb (Remove_Entity): Handle properly the case of an isolated
1823         entity with no homonym and no other entity in the scope.
1825 2018-01-11  Justin Squirek  <squirek@adacore.com>
1827         * sem_prag.adb (Analyze_Pragma:Pragma_Loop_Variant): Modify error
1828         message to be printed on the pragma argument identifier.
1830 2018-01-11  Hristian Kirtchev  <kirtchev@adacore.com>
1832         * exp_util.adb (Build_Invariant_Procedure_Declaration): Set the last
1833         entity of the generated invariant procedure in order to construct a
1834         proper entity chain.
1836 2018-01-11  Piotr Trojanek  <trojanek@adacore.com>
1838         * sem_ch13.adb (Build_Predicate_Functions): Fix minor issues in
1839         comment.
1841 2018-01-11  Arnaud Charlet  <charlet@adacore.com>
1843         * einfo.ads, einfo.adb (Activation_Record_Component,
1844         Set_Activation_Record_Component, Set_Is_Uplevel_Referenced_Entity):
1845         Allow E_Discriminant.
1847 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
1849         * gcc-interface/decl.c (gnat_to_gnu_component_type): Apply the check
1850         for atomic access once the component size is taken into account and
1851         also do it if the component type is Atomic or Volatile_Full_Access.
1853 2018-01-04  Eric Botcazou  <ebotcazou@adacore.com>
1855         * gnatvsn.ads: Bump copyright year.
1857 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
1858             Alan Hayward  <alan.hayward@arm.com>
1859             David Sherwood  <david.sherwood@arm.com>
1861         * gcc-interface/misc.c (enumerate_modes): Treat GET_MODE_BITSIZE
1862         as polynomial.
1864 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
1865             Alan Hayward  <alan.hayward@arm.com>
1866             David Sherwood  <david.sherwood@arm.com>
1868         * gcc-interface/misc.c (enumerate_modes): Treat GET_MODE_PRECISION
1869         as polynomial.
1871 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
1872             Alan Hayward  <alan.hayward@arm.com>
1873             David Sherwood  <david.sherwood@arm.com>
1875         * gcc-interface/utils.c (gnat_types_compatible_p): Handle
1876         polynomial TYPE_VECTOR_SUBPARTS.
1878 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
1879             Alan Hayward  <alan.hayward@arm.com>
1880             David Sherwood  <david.sherwood@arm.com>
1882         * gcc-interface/misc.c (enumerate_modes): Handle polynomial
1883         GET_MODE_NUNITS.
1885 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
1887         Update copyright years.
1889         * gnat_ugn.texi: Bump @copying's copyright year.
1890         * gnat_rm.texi: Likewise.
1892 Copyright (C) 2018 Free Software Foundation, Inc.
1894 Copying and distribution of this file, with or without modification,
1895 are permitted in any medium without royalty provided the copyright
1896 notice and this notice are preserved.