Tweak
[official-gcc.git] / gcc / ada / ChangeLog
bloba585af8acff7f92aab6dafe6ae9b03d207ef933e
1 2017-09-20  Alexandre Oliva <aoliva@redhat.com>
3         * gcc-interface/lang.opt (gant, gnatO, gnat): Add RejectNegative.
5 2017-09-18  Bob Duff  <duff@adacore.com>
7         * sem_ch4.adb (Complete_Object_Operation): Do not insert 'Access for
8         reference types in the access-to-access case.
10 2017-09-18  Eric Botcazou  <ebotcazou@adacore.com>
12         * sem_attr.adb (Analyze_Access_Attribute): Move check for the presence
13         of the "aliased" keyword on the prefix from here to...
14         (Resolve_Attribute) <Attribute_Access>: ...here.  Remove useless call
15         to Check_No_Implicit_Aliasing.
16         * sinfo.ads (Non_Aliased_Prefix): Delete.
17         (Set_Non_Aliased_Prefix): Likewise.
18         * sinfo.adb (Non_Aliased_Prefix): Delete.
19         (Set_Non_Aliased_Prefix): Likewise.
21 2017-09-18  Bob Duff  <duff@adacore.com>
23         * exp_ch5.adb (Build_Formal_Container_Iteration,
24         Expand_Formal_Container_Element_Loop): Convert the container to the
25         root type before passing it to the iteration operations, so it will be
26         of the right type.
28 2017-09-18  Bob Duff  <duff@adacore.com>
30         * einfo.ads, validsw.ads, treepr.ads, sem_util.ads: Comment fixes.
32 2017-09-18  Bob Duff  <duff@adacore.com>
34         * exp_ch3.adb (Build_Array_Init_Proc): If validity checking is enabled,
35         and it's a bit-packed array, pass False to the Consider_IS parameter of
36         Needs_Simple_Initialization.
38 2017-09-18  Hristian Kirtchev  <kirtchev@adacore.com>
40         * sem_ch6.adb (Check_Inline_Pragma): Link the newly generated spec to
41         the preexisting body.
42         * sem_prag.adb (Check_Inline_Always_Placement): New routine.
43         (Process_Inline): Verify the placement of pragma Inline_Always. The
44         pragma must now appear on the initial declaration of the related
45         subprogram.
47 2017-09-18  Ed Schonberg  <schonberg@adacore.com>
49         * sem_ch3.adb (Analyze_Declarations): In ASIS mode,  At the end of the
50         declarative list in a subprogram body, analyze aspext specifications to
51         provide basic semantic information, because otherwise the aspect
52         specifications might only be snalyzed during expansion, when related
53         subprograms are generated.
55 2017-09-18  Bob Duff  <duff@adacore.com>
57         * exp_ch9.adb (Is_Simple_Barrier_Name): Follow Original_Node, in case
58         validity checks have rewritten the tree.
60 2017-09-18  Bob Duff  <duff@adacore.com>
62         * sem_util.adb: Comment fixes, and remove redundant Is_Itype check.
64 2017-09-18  Ed Schonberg  <schonberg@adacore.com>
66         * sem_ch12.adb (Save_References_In_Aggregate): When constructing a
67         qualified exxpression for an aggregate in a generic unit, verify that
68         the scope of the type is itself visible and not hidden, so that the
69         qualified expression is correctly resolved in any instance.
71 2017-09-18  Bob Duff  <duff@adacore.com>
73         * sem_ch4.adb (Analyze_Qualified_Expression): Give an error if the type
74         mark refers to the current instance. Set the type to Any_Type in that
75         case, to avoid later crashes.
77 2017-09-18  Ed Schonberg  <schonberg@adacore.com>
79         * exp_ch3.adb (Replace_Discriminant_References): New procedure,
80         subsidiary of Build_Assignment, used to handle the initialization code
81         for a mutable record component whose default value is an aggregate that
82         sets the values of the discriminants of the components.
84 2017-09-18  Eric Botcazou  <ebotcazou@adacore.com>
86         * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Address>: Mark
87         the entity as being volatile for an overlay that toggles the scalar
88         storage order.
90 2017-09-18  Fedor Rybin  <frybin@adacore.com>
92         * doc/gnat_ugn/gnat_utility_programs.rst: Document that gnattest
93         options -U main and --harness-only are not compatible.
95 2017-09-18  Hristian Kirtchev  <kirtchev@adacore.com>
97         * freeze.adb, sem_ch6.adb, sem_res.adb: Minor reformatting.
99 2017-09-18  Piotr Trojanek  <trojanek@adacore.com>
101         * einfo.ads (Is_Imported): Update comment, as this
102         routine also applies to constants.
104 2017-09-18  Yannick Moy  <moy@adacore.com>
106         * sem_util.adb (Find_Placement_In_State_Space): Allow generic package
107         holding state.
109 2017-09-18  Justin Squirek  <squirek@adacore.com>
111         * sem_prag.adb (Is_Non_Significant_Pragma_Reference): Change the
112         constant indication for Pragma_Linker_Section.
114 2017-09-18  Bob Duff  <duff@adacore.com>
116         Alternate fix for PR ada/71358
117         * libgnat/g-comlin.adb (Getopt): Remove manual null access checks.
118         Instead, make a local copy of Config, and if it's null, allocate an
119         empty Command_Line_Configuration_Record, so we won't crash on null
120         pointer dereference.
122 2017-09-16  Eric Botcazou  <ebotcazou@adacore.com>
124         * libgnarl/a-intnam__rtems.ads: Update copyright date.
125         * libgnarl/s-interr__hwint.adb: Likewise.
126         * libgnarl/s-osinte__kfreebsd-gnu.ads: Likewise.
127         * libgnarl/s-osinte__rtems.adb: Likewise.
128         * libgnarl/s-osinte__rtems.ads: Likewise.
130 2017-09-13  Nicolas Roche  <roche@adacore.com>
132         * Make-lang.in: In the fallback mechanim, parse the associated .ali
133         file and try to guess the locations of dependencies.
135 2017-09-13  Eric Botcazou  <ebotcazou@adacore.com>
137         * sem_ch13.adb (Register_Address_Clause_Check): New procedure to save
138         the suppression status of Alignment_Check on the current scope.
139         (Alignment_Checks_Suppressed): New function to use the saved instead of
140         the current suppression status of Alignment_Check.
141         (Address_Clause_Check_Record): Add Alignment_Checks_Suppressed field.
142         (Analyze_Attribute_Definition_Clause): Instead of manually appending to
143         the table, call Register_Address_Clause_Check.
144         (Validate_Address_Clauses): Call Alignment_Checks_Suppressed on the
145         recorded address clause instead of its entity.
147 2017-09-13  Jerome Guitton  <guitton@adacore.com>
149         * libgnarl/s-tpopsp__vxworks-tls.adb,
150         libgnarl/s-tpopsp__vxworks-rtp.adb, libgnarl/s-tpopsp__vxworks.adb
151         (Self): Register thread if task id is null.
153 2017-09-13  Arnaud Charlet  <charlet@adacore.com>
155         * libgnat/s-htable.adb, libgnat/s-htable.ads: Minor style tuning.
157 2017-09-13  Arnaud Charlet  <charlet@adacore.com>
159         * lib-xref-spark_specific.adb (Scopes): simplify hash map; now it maps
160         from an entity to only scope index, as a mapping from an entity to the
161         same entity was useless.
162         (Get_Scope_Num): refactor as a simple renaming; rename parameter from N
163         to E.
164         (Set_Scope_Num): refactor as a simple renaming; rename parameter from N
165         to E.
166         (Is_Constant_Object_Without_Variable_Input): remove local "Result"
167         variable, just use return statements.
169 2017-09-13  Arnaud Charlet  <charlet@adacore.com>
171         * libgnarl/s-vxwext__kernel-smp.adb,
172         libgnarl/s-tpopsp__vxworks-rtp.adb, libgnarl/s-vxwext__noints.adb:
173         New file.
175 2017-09-13  Hristian Kirtchev  <kirtchev@adacore.com>
177         * einfo.adb: Flag42 is now Is_Controlled_Active.
178         (Is_Controlled): This attribute is now synthesized.
179         (Is_Controlled_Active): This attribute is now an explicit flag rather
180         than a synthesized attribute.   (Set_Is_Controlled): Removed.
181         (Set_Is_Controlled_Active): New routine.
182         (Write_Entity_Flags): Update the output for Flag42.
183         * einfo.ads: Update the documentation of the following attributes:
184         Disable_Controlled, Is_Controlled, Is_Controlled_Active, Is_Controlled
185         and Is_Controlled_Active have swapped their functionality.
186         (Is_Controlled): Renamed to Is_Controlled_Active.
187         (Is_Controlled_Active): Renamed to Is_Controlled.
188         (Set_Is_Controlled): Renamed to Set_Is_Controlled_Active.
189         * exp_ch3.adb (Expand_Freeze_Record_Type): Restore the original use of
190         Is_Controlled.
191         * exp_util.adb (Has_Some_Controlled_Component): Code clean up.
192         (Needs_Finalization): Code clean up. Remove the tests for
193         Disable_Controlled because a) they were incorrect as they would reject
194         a type which is sublect to the aspect, but may contain controlled
195         components, and b) they are no longer necessary.
196         * exp_util.ads (Needs_Finalization): Update comment on documentation.
197         * freeze.adb (Freeze_Array_Type): Restore the original use of
198         Is_Controlled.
199         (Freeze_Record_Type): Restore the original use of Is_Controlled.
200         * sem_ch3.adb (Analyze_Object_Declaration): Restore the original use of
201         Is_Controlled.
202         (Array_Type_Declaration): Restore the original use of Is_Controlled.
203         (Build_Derived_Private_Type): Restore the original use of
204         Is_Controlled.
205         (Build_Derived_Record_Type): Set the Is_Controlled_Active flag of a
206         type derived from Ada.Finalization.[Limited_]Controlled.
207         (Build_Derived_Type): Restore the original use of Is_Controlled.
208         (Record_Type_Definition): Restore the original use of Is_Controlled.
209         * sem_ch7.adb (Preserve_Full_Attributes): Restore the original use of
210         Is_Controlled.
211         * sem_ch13.adb (Analyze_Aspect_Disable_Controlled): New routine.
212         (Analyze_Aspect_Specifications): Use routine
213         Analyze_Aspect_Disable_Controlled to process aspect Disable_Controlled.
215 2017-09-13  Vincent Celier  <celier@adacore.com>
217         * clean.adb (Gnatclean): Fix error when looking for target
218         of <target>-gnatclean
220 2017-09-13  Javier Miranda  <miranda@adacore.com>
221             Ed Schonberg  <schonberg@adacore.com>
223         * sem_ch8.adb (Find_Expanded_Name): Complete code that identifies an
224         expanded name that designates the current instance of a child unit in
225         its own body and appears as the prefix of a reference to an entity
226         local to the child unit.
228 2017-09-12  Bob Duff  <duff@adacore.com>
230         * sem_warn.adb: Minor comment.
232 2017-09-12  Bob Duff  <duff@adacore.com>
234         * libgnat/a-cbdlli.adb, libgnat/a-cbhama.adb,
235         libgnat/a-cbmutr.adb, libgnat/a-cborma.adb: Rename New_Item to
236         be Default_Initialized_Item, and apply pragma Unmodified to it,
237         to suppress the warning.
239 2017-09-12  Eric Botcazou  <ebotcazou@adacore.com>
241         * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Add early return
242         for access types.
244 2017-09-12  Yannick Moy  <moy@adacore.com>
246         * gnat1drv.adb (Adjust_Global_Switches): Consider Refined_Global
247         together with Global when ignoring one in CodePeer mode.
249 2017-09-12  Javier Miranda  <miranda@adacore.com>
251         * sem_ch3.adb (Analyze_Declarations): In nested
252         package declarations that have a private part enable missing check
253         of the RM rule 13.1.1(11/3): usage names in aspect definitions are
254         resolved at the end of the immediately enclosing declaration list.
256 2017-09-12  Bob Duff  <duff@adacore.com>
258         * sem_ch6.adb (Analyze_Expression_Function): Initialize Def_Id to
259         Empty.
261 2017-09-12  Georges-Axel Jaloyan  <jaloyan@adacore.com>
263         * debug.adb: Reserving flag -gnatdF for safe pointer checking.
264         * gnat1drv.adb (gnat1drv): Adding the call to the analysis on
265         dF flag.
266         * sem_spark.adb, sem_spark.ads: Implementation of the analysis,
267         in preparation for the evolution of the SPARK language that
268         includes a pointer analysis for checking non-aliasing of access
269         types. The Check_Safe_Pointers function is the entry point, and
270         will traverse the AST and raise compile-time errors everytime
271         it detects non-begign aliasing.  Detailed comments are present
272         in the sem_spark.ads file.
273         * sem_util.adb, sem_util.ads (First_Global, Next_Global): New
274         functions to iterate over the list of globals of a subprogram.
275         * libgnat/system.ads: Add restriction No_Finalization.
276         * gcc-interface/Make-lang.in: Add new file sem_spark.adb and
277         dependency on g-dynhta.adb.
279 2017-09-12  Bob Duff  <duff@adacore.com>
281         * sem_ch6.adb (Analyze_Expression_Function): Call
282         Check_Dynamically_Tagged_Expression.
283         * sem_util.adb (Check_Dynamically_Tagged_Expression): Remove
284         "and then Is_Tagged_Type (Typ)" because there is an earlier
285         "Assert (Is_Tagged_Type (Typ))".
287 2017-09-12  Eric Botcazou  <ebotcazou@adacore.com>
289         * gcc-interface/Makefile.in (SPARC/Solaris): Remove obsolete stuff.
291 2017-09-11  Arnaud Charlet  <charlet@adacore.com>
293         * doc/gnat_ugn/the_gnat_compilation_model.rst: Fix sphinx warning.
294         * doc/gnat_ugn/platform_specific_information.rst: Remove doc
295         for no longer supported platforms.
296         * doc/gnat_ugn/gnat_and_program_execution.rst: Added detailed
297         description of the semantics for dimensionality analysis.
298         * gnat_ugn.texi: Regenerated.
300 2017-09-11  Eric Botcazou  <ebotcazou@adacore.com>
302         * freeze.adb (Has_Incomplete_Compoent): Delete.
303         (Freeze_Profile):
304         Do not inhibit the freezing of the profile of an expression
305         function here.
306         (Freeze_Subprogram): Do not re-create extra formals.
307         * sem_ch6.adb (Analyze_Expression_Function): Always
308         pre-analyze the expression if the function is not a completion.
309         (Analyze_Subprogram_Body_Helper): For the body generated
310         from an expression function that is not a completion, do
311         not freeze the profile and temporary mask the types declared
312         outside the expression that are not yet frozen.
313         * sem_res.adb (Rewrite_Renamed_Operator): Also bail out if invoked
314         during the pre-analysis of an expression function.
316 2017-09-11  Eric Botcazou  <ebotcazou@adacore.com>
318         * gcc-interface/gigi.h (enum standard_datatypes): Minor tweak.
319         (gigi): Likewise.
321 2017-09-11  Yannick Moy  <moy@adacore.com>
323         * lib-xref-spark_specific.adb: Minor rewrite.
325 2017-09-11  Jerome Lambourg  <lambourg@adacore.com>
327         * libgnat: Rename ?-[a-z]*-* into ?-[a-z]*__*
328         * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Take this
329         renaming into account.
331 2017-09-11  Jerome Lambourg  <lambourg@adacore.com>
333         * libgnarl: Rename ?-[a-z]*-* into ?-[a-z]*__*
334         * gcc-interface/Makefile.in: Take this renaming into account.
336 2017-09-11  Arnaud Charlet  <charlet@adacore.com>
338         * s-auxdec-empty.ads, s-auxdec-empty.adb, 9drpc.adb: Removed, no
339         longer used.
341 2017-09-11  Yannick Moy  <moy@adacore.com>
343         * sem_util.adb (Check_Result_And_Post_State):
344         Do not issue a warning about missing reference to an outcome if
345         the subprogram is ghost and has no outputs.
346         * lib-xref-spark_specific.adb, sem_aggr.adb, sem_aux.ads: Minor
347         reformatting.
349 2017-09-11  Yannick Moy  <moy@adacore.com>
351         * gnat1drv.adb (Adjust_Global_Switches): Set
352         Check_Validity_Of_Parameters to False in GNATprove mode.
353         * opt.ads (Check_Validity_Of_Parameters): Document switch to
354         set option.
356 2017-09-09  Pierre-Marie de Rodat  <derodat@adacore.com>
358         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Don't
359         generate debug info for inner record types if -fgnat-encodings=minimal.
360         (gnat_to_gnu_entity) <E_Record_Subtype>: Use the ultimate base record
361         type as the debug type.
363 2017-09-09  Eric Botcazou  <ebotcazou@adacore.com>
365         * gcc-interface/decl.c (components_to_record): Do not reorder in non-
366         packed record types if pragma Optimize_Alignment (Space) is enabled.
368 2017-09-09  Eric Botcazou  <ebotcazou@adacore.com>
370         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Disregard inlining
371         limits for expression functions.
372         (gnat_to_gnu) <N_Object_Declaration>: Fix formatting.
374 2017-09-09  Eric Botcazou  <ebotcazou@adacore.com>
376         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Copy the
377         layout of the record from the parent type only if both are or are not
378         unchecked unions.
379         (is_stored_discriminant): Return false for an unchecked union.
381 2017-09-09  Eric Botcazou  <ebotcazou@adacore.com>
383         * gcc-interface/utils2.c (build_allocator): In type_annotate_only mode
384         return NULL_EXPR.
386 2017-09-09  Eric Botcazou  <ebotcazou@adacore.com>
388         * gcc-interface/decl.c (promote_object_alignment): New function taken
389         from...
390         (gnat_to_gnu_entity) <E_Variable>: ...here.  Invoke it.
391         (gnat_to_gnu_field): If the field is Atomic or VFA, invoke it and
392         create a padding type on success before doing the atomic check.
394 2017-09-09  Eric Botcazou  <ebotcazou@adacore.com>
396         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Apply the
397         promotion to static memory earlier in the processing.
399 2017-09-09  Eric Botcazou  <ebotcazou@adacore.com>
401         * gcc-interface/decl.c (gnat_to_gnu_entity): Only set the TYPE_ALIGN_OK
402         and TYPE_BY_REFERENCE_P flags on types after various promotions.
403         * gcc-interface/trans.c (node_has_volatile_full_access) <N_Identifier>:
404         Consider all kinds of entities.
406 2017-09-09  Eric Botcazou  <ebotcazou@adacore.com>
408         * gcc-interface/utils.c (convert): When converting to a padding type,
409         reuse an existing CONSTRUCTOR if it has got the right size.
411 2017-09-08  Nicolas Roche  <roche@adacore.com>
413         * gcc-interface/Make-lang.in, gcc-interface/Makefile.in: Find runtime
414         source in libgnat/
415         * a-lfztio.ads, g-timsta.ads, g-sercom-linux.adb, s-osprim-solaris.adb,
416         a-inteio.ads, s-stchop-rtems.adb, s-casuti.adb, s-pack39.adb,
417         i-vxwork-x86.ads, a-strbou.adb, a-stzmap.adb, s-assert.adb,
418         a-sfecin.ads, a-cohama.adb, s-casuti.ads, a-suenco.adb, s-pack39.ads,
419         a-stzmap.ads, a-strbou.ads, s-stalib.adb, s-trasym.adb, g-comver.adb,
420         s-assert.ads, s-vector.ads, g-cgi.adb, a-cohama.ads, s-wchcnv.adb,
421         a-titest.adb, s-pack48.adb, a-suenco.ads, a-strunb.adb, s-stalib.ads,
422         s-trasym.ads, a-nudira.adb, g-comver.ads, a-nuflra.adb, g-cgi.ads,
423         a-chacon.adb, s-wchcnv.ads, a-excach.adb, s-pack48.ads, a-titest.ads,
424         a-strunb.ads, s-dwalin.adb, a-nudira.ads, a-chtgbo.adb, s-resfil.adb,
425         a-scteio.ads, a-nuflra.ads, g-soliop-mingw.ads, s-pack57.adb,
426         a-chacon.ads, s-bytswa.ads, s-pooloc.adb, g-os_lib.adb, s-dwalin.ads,
427         a-szuzha.adb, s-resfil.ads, a-chtgbo.ads, s-spsufi.adb, s-pack57.ads,
428         s-pooloc.ads, g-os_lib.ads, a-stfiha.ads, a-lcteio.ads, a-wtcoau.adb,
429         a-szuzha.ads, s-mmosin-unix.adb, a-stmaco.ads, s-spsufi.ads,
430         s-stchop-limit.ads, a-wtcoau.ads, a-exctra.adb, s-mmosin-unix.ads,
431         s-sequio.adb, s-conca2.adb, g-table.adb, s-imglli.adb,
432         a-numaux-x86.adb, a-strsea.adb, s-wchstw.adb, a-clrefi.adb,
433         a-wwboio.adb, a-exctra.ads, s-sequio.ads, s-conca2.ads, a-wwunio.ads,
434         system-linux-hppa.ads, g-table.ads, s-dimkio.ads, s-imglli.ads,
435         a-cofove.adb, a-numaux-x86.ads, s-wchstw.ads, a-strsea.ads,
436         a-clrefi.ads, a-wwboio.ads, s-stratt-xdr.adb, s-crc32.adb,
437         s-excmac-arm.adb, g-busora.adb, a-cofove.ads, s-osprim-unix.adb,
438         g-io.adb, s-pack49.adb, s-crc32.ads, s-excmac-arm.ads, a-fzteio.ads,
439         g-busora.ads, s-stausa.adb, system-linux-mips.ads, sequenio.ads,
440         g-exctra.adb, g-rewdat.adb, a-cgaaso.adb, g-io.ads, s-pack49.ads,
441         a-wtflau.adb, a-undesu.adb, s-stausa.ads, a-ztenau.adb, g-enutst.ads,
442         calendar.ads, s-pack58.adb, g-rewdat.ads, g-exctra.ads, s-ststop.adb,
443         a-cgaaso.ads, a-strfix.adb, a-comlin.adb, a-strunb-shared.adb,
444         a-wtflau.ads, a-undesu.ads, a-cbhase.adb, a-ztenau.ads, s-os_lib.adb,
445         a-coorse.adb, a-chlat1.ads, s-pack58.ads, s-ststop.ads, a-strfix.ads,
446         a-comlin.ads, a-strunb-shared.ads, a-nscefu.ads, s-valboo.adb,
447         directio.ads, a-chtgke.adb, a-cbhase.ads, a-wtinau.adb,
448         system-linux-alpha.ads, s-os_lib.ads, a-coorse.ads,
449         system-linux-s390.ads, s-imgwiu.adb, a-chtgop.adb, s-valboo.ads,
450         a-chtgke.ads, a-tienio.adb, s-conca3.adb, a-wtinau.ads,
451         system-darwin-ppc.ads, i-c.adb, s-expllu.adb, g-expect.adb,
452         g-sha256.ads, s-vallld.adb, s-imgwiu.ads, a-chtgop.ads, a-strmap.adb,
453         a-tienio.ads, s-conca3.ads, s-imgint.adb, i-c.ads, s-expllu.ads,
454         s-osprim-darwin.adb, a-cogeso.adb, g-expect.ads, a-iwteio.ads,
455         s-vallld.ads, a-coinho-shared.adb, g-shsh64.adb, a-strmap.ads,
456         g-comlin.adb, a-excpol.adb, s-imgint.ads, a-ztdeau.adb, a-cogeso.ads,
457         a-coinho-shared.ads, g-shsh64.ads, g-comlin.ads, a-stzsup.adb,
458         a-rbtgbk.adb, a-wtmoau.adb, a-ztdeau.ads, s-exnlli.adb, g-tty.adb,
459         g-heasor.adb, g-socthi-dummy.adb, s-llflex.ads, a-zchara.ads,
460         a-stzsup.ads, a-ztcstr.adb, a-rbtgbk.ads, a-sfwtio.ads, a-wtmoau.ads,
461         a-sulcin.adb, s-exnlli.ads, system-freebsd.ads, a-stunha.adb,
462         a-charac.ads, g-tty.ads, g-heasor.ads, s-exctra.adb,
463         g-socthi-dummy.ads, a-coboho.adb, a-ztcstr.ads, a-tideio.adb,
464         a-sulcin.ads, a-wrstfi.adb, g-alleve.adb, s-pack59.adb, a-ngrear.adb,
465         a-stboha.adb, a-stunau-shared.adb, a-stunha.ads, a-lfwtio.ads,
466         s-fileio.adb, s-exctra.ads, a-coboho.ads, a-ioexce.ads, a-tideio.ads,
467         a-ngrear.ads, a-wrstfi.ads, s-pack59.ads, g-alleve.ads, a-stboha.ads,
468         s-poosiz.adb, g-traceb.adb, g-rannum.adb, machcode.ads, s-purexc.ads,
469         s-fileio.ads, a-cfinve.adb, a-crbtgk.adb, system-solaris-x86.ads,
470         s-poosiz.ads, g-rannum.ads, g-traceb.ads, a-except.adb, s-conca4.adb,
471         a-stream.adb, a-cfinve.ads, a-crbtgk.ads, s-wchwts.adb,
472         system-mingw.ads, a-except.ads, s-conca4.ads, a-chzla9.ads,
473         s-valenu.adb, s-soflin.adb, a-stream.ads, a-cgarso.adb, s-valllu.adb,
474         g-crc32.adb, s-wchwts.ads, s-fatflt.ads, s-imguns.adb, s-strcom.adb,
475         g-decstr.adb, s-valenu.ads, s-soflin.ads, a-cgarso.ads, a-cwila1.ads,
476         s-valllu.ads, g-crc32.ads, s-imguns.ads, g-spipat.adb, s-valwch.adb,
477         s-strcom.ads, g-decstr.ads, text_io.ads, g-debuti.adb, s-stchop.adb,
478         g-spipat.ads, s-valwch.ads, a-string.ads, s-exnint.adb, g-awk.adb,
479         g-tasloc.adb, s-wwdenu.adb, s-boustr.adb, a-zchuni.adb, s-stchop.ads,
480         g-debuti.ads, s-stopoo.adb, system-dragonfly-x86_64.ads,
481         system-linux-x86.ads, s-exnint.ads, g-awk.ads, a-stzhas.adb,
482         g-tasloc.ads, s-wwdenu.ads, g-debpoo.adb, g-except.ads,
483         g-sse.ads, s-boustr.ads, a-zchuni.ads, s-bitops.adb, s-wwdwch.adb,
484         s-stopoo.ads, a-catizo.adb, a-stzhas.ads, a-nlcefu.ads, g-debpoo.ads,
485         i-vxwoio.adb, s-bitops.ads, g-io-put-vxworks.adb, s-wwdwch.ads,
486         g-sehamd.adb, a-ssicst.adb, a-catizo.ads, s-mmap.adb, g-string.adb,
487         s-traceb.adb, a-swunau.adb, s-rannum.adb, a-ticoau.adb, i-vxwoio.ads,
488         g-sehamd.ads, a-stwiun.adb, a-ssicst.ads, s-conca5.adb, a-ssitio.ads,
489         s-mmap.ads, a-zttest.adb, g-string.ads, g-sercom.adb, a-cdlili.adb,
490         a-swunau.ads, s-traceb.ads, s-rannum.ads, a-ticoau.ads, system-aix.ads,
491         a-cforma.adb, a-stwiun.ads, s-conca5.ads, s-carsi8.adb, a-zttest.ads,
492         g-sercom.ads, a-cdlili.ads, a-cihama.adb, g-sptain.ads, a-cforma.ads,
493         s-maccod.ads, s-carsi8.ads, a-strsup.adb, g-sha1.adb, a-cihama.ads,
494         g-stseme.adb, s-traent.adb, s-valcha.adb, g-curexc.ads, a-strsup.ads,
495         g-sha1.ads, a-sflcin.ads, s-traent.ads, s-pack10.adb, s-valcha.ads,
496         a-coteio.ads, s-tasloc.adb, g-utf_32.adb, a-suteio.adb, s-except.adb,
497         a-direct.adb, g-stsifd-sockets.adb, a-numaux-vxworks.ads, s-winext.ads,
498         s-pack10.ads, a-ztexio.adb, a-tiflau.adb, system-vxworks-arm.ads,
499         s-tasloc.ads, a-suteio.ads, g-utf_32.ads, s-except.ads,
500         a-direct.ads, a-swbwha.adb, g-hesorg.adb, s-wwdcha.adb, a-wtedit.adb,
501         a-ztexio.ads, a-wtcoio.adb, a-tiflau.ads, a-ssizti.ads, s-casi32.adb,
502         a-swbwha.ads, s-veboop.adb, g-hesorg.ads, s-parame-rtems.adb,
503         s-wwdcha.ads, a-wtedit.ads, a-stuten.adb, a-coinve.adb, a-wtcoio.ads,
504         s-casi32.ads, s-string.adb, a-tiinau.adb, a-cusyqu.adb, s-conca6.adb,
505         s-veboop.ads, a-cgcaso.adb, a-numaux-darwin.adb, a-envvar.adb,
506         a-stuten.ads, s-secsta.adb, a-coinve.ads, s-string.ads, a-cusyqu.ads,
507         a-tiinau.ads, s-osprim-vxworks.adb, s-conca6.ads, g-spchge.adb,
508         s-parint.adb, a-cuprqu.adb, a-cgcaso.ads, a-numaux-darwin.ads,
509         a-envvar.ads, s-secsta.ads, g-spchge.ads, s-parint.ads, a-cuprqu.ads,
510         a-swuwti.adb, a-flteio.ads, a-sbhcin.adb, a-coprnu.adb, g-u3spch.adb,
511         s-atocou.adb, g-ctrl_c.adb, a-swuwti.ads, a-calend.adb, a-sbhcin.ads,
512         a-coprnu.ads, g-dirope.adb, g-sha512.ads, g-u3spch.ads, s-atocou.ads,
513         g-ctrl_c.ads, a-timoau.adb, a-witeio.adb, s-pack11.adb, a-strhas.adb,
514         a-wtflio.adb, g-spitbo.adb, a-calend.ads, a-ztenio.adb, g-dirope.ads,
515         a-slcain.adb, g-sechas.adb, a-timoau.ads, a-witeio.ads, s-pack11.ads,
516         s-shasto.adb, s-traceb-mastop.adb, a-ciorse.adb, s-utf_32.adb,
517         a-strhas.ads, a-wtflio.ads, g-spitbo.ads, a-ztenio.ads, a-slcain.ads,
518         g-sechas.ads, s-gearop.adb, a-siztio.ads, s-pack20.adb, s-shasto.ads,
519         a-ciorse.ads, s-utf_32.ads, s-crtl.ads, a-wtinio.adb, s-elaall.adb,
520         s-explli.adb, s-chepoo.ads, s-gearop.ads, a-einuoc.adb, s-pack20.ads,
521         system-linux-ia64.ads, a-swunau-shared.adb, a-wtinio.ads, g-alvety.ads,
522         a-liztio.ads, g-calend.adb, s-conca7.adb, s-elaall.ads, s-explli.ads,
523         a-einuoc.ads, s-widboo.adb, s-imgdec.adb, a-cbhama.adb, g-calend.ads,
524         s-conca7.ads, a-llitio.ads, i-cexten.ads, a-coorma.adb, s-widboo.ads,
525         s-diflio.adb, g-souinf.ads, s-imgdec.ads, g-strhas.ads, a-cbhama.ads,
526         g-shshco.adb, a-ztdeio.adb, s-gloloc.adb, a-coorma.ads, g-wispch.adb,
527         s-pack03.adb, g-eacodu.adb, s-casi16.adb, s-diflio.ads, a-colien.adb,
528         g-shshco.ads, a-wtmoio.adb, a-rbtgbo.adb, a-ztdeio.ads,
529         system-rtems.ads, s-gloloc.ads, a-csquin.ads, a-cofuse.adb,
530         g-wispch.ads, s-pack03.ads, s-casi16.ads, s-io.adb, a-colien.ads,
531         g-alveop.adb, gnat.ads, s-diinio.adb, a-cfdlli.adb, g-pehage.adb,
532         a-wtmoio.ads, a-stwiha.adb, a-locale.adb, a-tirsfi.adb, a-nscoty.ads,
533         a-rbtgbo.ads, s-pack12.adb, a-cofuse.ads, a-sfteio.ads, s-io.ads,
534         g-alveop.ads, a-cfdlli.ads, s-diinio.ads, a-stwiha.ads, g-pehage.ads,
535         a-locale.ads, a-tirsfi.ads, s-pack12.ads, s-valuti.adb, g-cppexc.adb,
536         system-vxworks-ppc.ads, g-memdum.adb, a-lfteio.ads, s-pack21.adb,
537         s-unstyp.ads, s-valuti.ads, g-cppexc.ads, system-hpux-ia64.ads,
538         g-memdum.ads, g-soccon.ads, g-altive.ads, a-crbtgo.adb, s-pack21.ads,
539         a-llizti.ads, a-numaux-libc-x86.ads, s-expint.adb, s-conca8.adb,
540         a-crbtgo.ads, s-pack30.adb, s-vallli.adb, s-geveop.adb, s-expint.ads,
541         a-direio.adb, s-conca8.ads, a-widcha.ads, s-pack30.ads, s-vallli.ads,
542         s-strhas.adb, s-geveop.ads, g-md5.adb, a-direio.ads, a-numaux.ads,
543         s-ransee.adb, a-szbzha.adb, i-cobol.adb, g-busorg.adb, s-strhas.ads,
544         g-md5.ads, s-widenu.adb, s-ransee.ads, s-widllu.adb, a-szbzha.ads,
545         a-ststio.adb, i-cobol.ads, g-busorg.ads, g-regpat.adb, s-widenu.ads,
546         a-secain.adb, s-widllu.ads, s-pack13.adb, g-encstr.adb, a-ztcoau.adb,
547         a-ststio.ads, s-widwch.adb, g-regpat.ads, s-atacco.adb, a-cborse.adb,
548         a-secain.ads, s-pack13.ads, g-encstr.ads, a-ztcoau.ads, s-widwch.ads,
549         g-io_aux.adb, s-atacco.ads, a-ncelfu.ads, interfac.ads, a-cborse.ads,
550         g-regexp.adb, s-pack22.adb, a-szuzti.adb, g-io_aux.ads, s-caun32.adb,
551         a-nselfu.ads, g-regexp.ads, s-pack22.ads, a-ticoio.adb, a-szuzti.ads,
552         g-diopit.adb, s-caun32.ads, s-conca9.adb, a-tags.adb, a-swmwco.ads,
553         a-sbecin.adb, s-pack31.adb, s-expuns.adb, a-ticoio.ads, s-valint.adb,
554         s-conca9.ads, g-diopit.ads, a-tags.ads, a-nllcef.ads, a-izteio.ads,
555         a-sbecin.ads, s-expuns.ads, s-pack31.ads, g-dyntab.adb, s-powtab.ads,
556         s-flocon-none.adb, s-valint.ads, a-ssiwti.ads, s-mmosin-mingw.adb,
557         s-pack40.adb, s-pack05.adb, a-ztflau.adb, g-dyntab.ads,
558         a-szuzti-shared.adb, g-alvevi.ads, a-stwise.adb, s-mmosin-mingw.ads,
559         s-pack40.ads, a-diocst.adb, a-ztflau.ads, s-pack05.ads, a-nlcoty.ads,
560         a-contai.ads, a-stwisu.adb, g-byorma.adb, a-siwtio.ads, a-stwise.ads,
561         s-regpat.adb, g-mbdira.adb, s-pack14.adb, a-diocst.ads, g-flocon.ads,
562         g-mbflra.adb, a-ztinau.adb, s-dim.ads, s-mantis.adb, a-stwisu.ads,
563         g-byorma.ads, s-atopri.adb, g-wistsp.ads, a-uncdea.ads, s-widcha.adb,
564         a-caldel.adb, s-regpat.ads, g-mbdira.ads, a-tiflio.adb, s-pack14.ads,
565         s-parame.adb, a-liwtio.ads, s-memory.adb, g-mbflra.ads, a-ztinau.ads,
566         a-wtgeau.adb, s-direio.adb, s-mantis.ads, s-atopri.ads, s-widcha.ads,
567         a-caldel.ads, s-pack23.adb, a-unccon.ads, a-tiflio.ads, s-parame.ads,
568         a-llftio.ads, s-memory.ads, s-regexp.adb, a-wtgeau.ads, a-exexda.adb,
569         s-direio.ads, s-pack23.ads, g-stheme.adb, a-tiinio.adb, g-sestin.ads,
570         s-regexp.ads, a-wtfiio.adb, a-comutr.adb, a-exexpr.adb, a-tiinio.ads,
571         a-ztmoau.adb, a-cohata.ads, a-wtfiio.ads, s-imgrea.adb, ada.ads,
572         a-szunau-shared.adb, a-comutr.ads, s-valuns.adb, a-ztmoau.ads,
573         system-linux-arm.ads, s-osprim-x32.adb, s-pack41.adb, s-pack06.adb,
574         s-imgrea.ads, s-valuns.ads, s-finroo.adb, s-caun16.adb, s-pooglo.adb,
575         a-zrstfi.adb, a-suenst.adb, s-pack41.ads, g-binenv.adb, s-pack06.ads,
576         a-calari.adb, a-nlcoar.ads, s-finroo.ads, a-timoio.adb, s-caun16.ads,
577         s-flocon.adb, a-suenst.ads, a-zrstfi.ads, s-pooglo.ads, s-wchcon.adb,
578         s-traceb-hpux.adb, s-pack50.adb, i-fortra.adb, s-pack15.adb,
579         a-ngcefu.adb, g-sptavs.ads, g-binenv.ads, s-wchjis.adb, a-calari.ads,
580         a-timoio.ads, a-decima.adb, s-flocon.ads, s-wchcon.ads, a-llfzti.ads,
581         i-fortra.ads, s-pack50.ads, s-pack15.ads, a-ngcefu.ads, a-cfhase.adb,
582         s-wchjis.ads, g-soliop.ads, a-decima.ads, a-chlat9.ads, s-pack24.adb,
583         a-nlelfu.ads, a-cfhase.ads, g-locfil.adb, s-atocou-builtin.adb,
584         s-memcop.ads, a-szunau.adb, s-pack24.ads, s-imgllb.adb, s-auxdec.adb,
585         g-locfil.ads, s-pack33.adb, a-szunau.ads, s-parame-vxworks.adb,
586         s-imgllb.ads, a-ciorma.adb, s-auxdec.ads, a-cobove.adb, s-dsaser.ads,
587         a-elchha.adb, s-pack33.ads, a-cofuve.adb, s-parame-vxworks.ads,
588         a-ciorma.ads, system-darwin-x86.ads, s-multip.adb, a-stwiun-shared.adb,
589         a-wichun.adb, a-cobove.ads, s-imgbiu.adb, s-tsmona-mingw.adb,
590         a-coormu.adb, a-siocst.adb, s-win32.ads, a-elchha.ads, s-pack42.adb,
591         s-pack07.adb, a-cofuve.ads, system-hpux.ads, a-teioed.adb,
592         a-convec.adb, g-speche.adb, s-multip.ads, a-stwiun-shared.ads,
593         a-wichun.ads, s-imgbiu.ads, a-numeri.ads, a-siocst.ads, a-coormu.ads,
594         a-lliwti.ads, s-pack42.ads, s-pack07.ads, a-teioed.ads, a-convec.ads,
595         g-speche.ads, g-socthi.adb, a-nucoty.ads, a-szmzco.ads, s-pack51.adb,
596         s-osprim-mingw.adb, s-casi64.adb, g-strspl.ads, g-socthi.ads,
597         g-socket-dummy.adb, s-pack51.ads, s-dimmks.ads, s-casi64.ads,
598         a-wtenau.adb, s-stchop-vxworks.adb, s-pack60.adb,
599         system-solaris-sparc.ads, s-pack25.adb, g-socket-dummy.ads,
600         a-exstat.adb, a-cofuma.adb, s-tsmona-linux.adb, a-wtenau.ads,
601         s-pack60.ads, s-pack25.ads, i-cstrea.adb, a-cofuma.ads, g-exptty.adb,
602         a-chzla1.ads, s-pack34.adb, i-cstrea.ads, s-excdeb.adb, a-iteint.ads,
603         g-exptty.ads, i-pacdec.adb, s-pack34.ads, s-rident.ads, s-sopco3.adb,
604         i-vxwork.ads, s-excdeb.ads, system-linux-ppc.ads, a-swuwti-shared.adb,
605         s-widlli.adb, s-pack43.adb, i-pacdec.ads, a-cwila9.ads, s-sopco3.ads,
606         a-fwteio.ads, s-widlli.ads, s-pack43.ads, a-suhcin.adb, a-wtdeau.adb,
607         g-allein.ads, a-suezst.adb, a-dirval-mingw.adb, g-zspche.adb,
608         s-bignum.adb, a-ztedit.adb, g-regist.adb, a-nllefu.ads, a-ztcoio.adb,
609         s-pack52.adb, a-llctio.ads, a-nucoar.ads, s-pack17.adb, a-suhcin.ads,
610         a-wtdeau.ads, a-suezst.ads, a-dirval.adb, g-zspche.ads, g-regist.ads,
611         a-ztedit.ads, s-bignum.ads, a-wtcstr.adb, system.ads, s-pack52.ads,
612         a-ztcoio.ads, s-pack17.ads, s-imgboo.adb, a-rbtgso.adb, a-dirval.ads,
613         a-cohase.adb, s-pack61.adb, a-wtcstr.ads, s-pack26.adb, s-osprim.ads,
614         a-tigeau.adb, s-imgboo.ads, a-nuelfu.ads, a-swfwha.ads, s-commun.adb,
615         g-socthi-vxworks.adb, a-rbtgso.ads, a-cohase.ads, g-zstspl.ads,
616         s-pack61.ads, s-pack26.ads, a-intnam-dragonfly.ads, s-imglld.adb,
617         a-tigeau.ads, s-commun.ads, g-socthi-vxworks.ads, a-cborma.adb,
618         a-stwifi.adb, g-moreex.adb, s-pack35.adb, s-imglld.ads, s-valdec.adb,
619         a-tifiio.adb, a-cborma.ads, g-moreex.ads, a-stwifi.ads, s-pack35.ads,
620         s-sopco4.adb, g-sha224.ads, g-socket.adb, a-intnam-rtems.ads,
621         s-finmas.adb, s-valdec.ads, s-addima.adb, a-finali.adb, a-tifiio.ads,
622         s-rpc.adb, a-ztflio.adb, s-pack44.adb, s-pack09.adb, a-sblcin.adb,
623         s-sopco4.ads, a-textio.adb, g-socket.ads, g-sptabo.ads, s-finmas.ads,
624         g-shsh32.adb, s-addima.ads, a-finali.ads, s-mmauni-long.ads, s-rpc.ads,
625         a-ztflio.ads, system-djgpp.ads, s-stache.adb, s-pack44.ads,
626         s-pack09.ads, a-sblcin.ads, a-textio.ads, a-cidlli.adb, g-shsh32.ads,
627         a-chtgbk.adb, a-tiocst.adb, s-pack53.adb, s-pack18.adb, s-stache.ads,
628         a-zchhan.adb, s-fatlfl.ads, a-ztinio.adb, s-strops.adb, a-siteio.ads,
629         a-cidlli.ads, a-chtgbk.ads, g-ssvety.ads, a-tiocst.ads, s-pack53.ads,
630         s-parame-hpux.ads, s-pack18.ads, a-zchhan.ads, s-strops.ads,
631         a-ztinio.ads, a-wichha.adb, a-stwima.adb, a-nlrear.ads, a-liteio.ads,
632         s-pack62.adb, s-pack27.adb, s-fore.adb, s-vercon.adb, a-wichha.ads,
633         a-stwima.ads, s-pack62.ads, system-linux-sparc.ads, s-pack27.ads,
634         g-dynhta.adb, s-fore.ads, s-vercon.ads, a-cofuba.adb, a-cimutr.adb,
635         i-cpoint.adb, s-imgenu.adb, a-stwibo.adb, s-pack36.adb, i-cstrin.adb,
636         s-imgllu.adb, a-suteio-shared.adb, g-excact.adb, s-stoele.adb,
637         s-addope.adb, g-dynhta.ads, a-cofuba.ads, a-ztmoio.adb, a-llfwti.ads,
638         a-cimutr.ads, i-cpoint.ads, s-imgenu.ads, a-stwibo.ads, a-wttest.adb,
639         s-pack36.ads, a-tgdico.ads, s-sopco5.adb, s-scaval.adb, i-cstrin.ads,
640         s-imgllu.ads, g-excact.ads, s-stoele.ads, g-deutst.ads, s-addope.ads,
641         s-imgwch.adb, g-sha384.ads, a-ztmoio.ads, s-pack45.adb, a-wttest.ads,
642         s-sopco5.ads, s-excmac-gcc.adb, s-scaval.ads, a-storio.adb,
643         a-coinho.adb, a-btgbso.adb, s-imgwch.ads, s-carun8.adb, memtrack.adb,
644         s-pack45.ads, a-sfhcin.ads, s-excmac-gcc.ads, a-storio.ads,
645         a-coinho.ads, a-btgbso.ads, s-stratt.adb, s-carun8.ads, a-shcain.adb,
646         s-pack54.adb, s-pack19.adb, a-colire.adb, a-tigeli.adb, s-caun64.adb,
647         s-stratt.ads, s-fatgen.adb, a-shcain.ads, a-stzunb-shared.adb,
648         s-pack54.ads, s-pack19.ads, a-colire.ads, a-calcon.adb, s-caun64.ads,
649         s-fatgen.ads, s-pack63.adb, g-arrspl.adb, a-stzunb-shared.ads,
650         s-pack28.adb, a-nllrar.ads, a-zzboio.adb, a-zzunio.ads, a-stunau.adb,
651         a-calcon.ads, g-cgideb.adb, s-objrea.adb, s-mastop.adb, a-tienau.adb,
652         g-altcon.adb, g-arrspl.ads, s-pack63.ads, s-restri.adb, s-pack28.ads,
653         a-zzboio.ads, a-stunau.ads, g-cgideb.ads, g-htable.adb, g-sothco.adb,
654         s-objrea.ads, g-soliop-solaris.ads, s-mastop.ads, a-tienau.ads,
655         system-linux-m68k.ads, g-altcon.ads, s-dmotpr.ads, s-memory-mingw.adb,
656         g-cgicoo.adb, s-pack37.adb, s-restri.ads, s-fatllf.ads, s-expmod.adb,
657         a-swuwha.adb, a-exextr.adb, a-cfhama.adb, s-gloloc-mingw.adb,
658         a-tiboio.adb, g-forstr.adb, g-sothco.ads, a-stzbou.adb, a-nllcty.ads,
659         a-suecin.adb, g-htable.ads, s-exctab.adb, a-tiunio.ads, g-cgicoo.ads,
660         s-osprim-posix.adb, s-pack37.ads, a-ciormu.adb, s-atocou-x86.adb,
661         a-swuwha.ads, s-expmod.ads, a-cfhama.ads, s-ficobl.ads, a-ngcoty.adb,
662         g-forstr.ads, a-tiboio.ads, a-calfor.adb, a-stzbou.ads, a-suecin.ads,
663         a-conhel.adb, a-crbltr.ads, s-exctab.ads, a-dhfina.ads, s-imgcha.adb,
664         s-pack46.adb, a-ciormu.ads, system-linux-sh4.ads, a-chahan.adb,
665         a-ngcoty.ads, a-stzunb.adb, a-szfzha.ads, a-calfor.ads, a-cbdlli.adb,
666         a-conhel.ads, s-imgcha.ads, s-pack46.ads, a-assert.adb, a-chahan.ads,
667         a-stzunb.ads, a-crdlli.adb, s-pack55.adb, a-cbdlli.ads, a-tideau.adb,
668         a-assert.ads, ioexcept.ads, s-boarop.ads, g-hesora.adb, a-crdlli.ads,
669         s-pack55.ads, a-tideau.ads, g-bubsor.adb, a-wtenio.adb, a-cbsyqu.adb,
670         g-hesora.ads, s-pack29.adb, a-nurear.ads, g-catiio.adb, s-stposu.adb,
671         g-bubsor.ads, a-wtenio.ads, a-cbsyqu.ads, a-suewst.adb,
672         system-vxworks-x86.ads, s-pack29.ads, a-cbmutr.adb, a-cbprqu.adb,
673         s-imenne.adb, g-sothco-dummy.adb, g-casuti.adb, g-catiio.ads,
674         s-stposu.ads, a-stzsea.adb, s-pack38.adb, a-suewst.ads, s-imgllw.adb,
675         a-cbprqu.ads, a-cbmutr.ads, s-imenne.ads, g-sothco-dummy.ads,
676         g-casuti.ads, s-htable.adb, s-fatsfl.ads, g-trasym.adb, unchconv.ads,
677         a-stzsea.ads, s-arit64.adb, s-pack38.ads, a-nllcar.ads, s-valrea.adb,
678         s-imgllw.ads, s-htable.ads, a-sequio.adb, g-trasym.ads, a-ngcoar.adb,
679         s-exnllf.adb, s-pack47.adb, s-arit64.ads, g-sercom-mingw.adb,
680         s-valrea.ads, g-socthi-mingw.adb, g-bytswa.adb, g-sehash.adb,
681         unchdeal.ads, a-sequio.ads, a-ngcoar.ads, s-exnllf.ads, a-wtdeio.adb,
682         s-pack47.ads, g-socthi-mingw.ads, a-excpol-abort.adb, a-ztgeau.adb,
683         g-bytswa.ads, g-sehash.ads, s-pack56.adb, a-wtdeio.ads, a-ngelfu.adb,
684         a-ztgeau.ads, a-cforse.adb, s-filatt.ads, a-stzfix.adb, a-cihase.adb,
685         s-pack56.ads, a-sfztio.ads, a-ngelfu.ads, s-trasym-dwarf.adb,
686         a-cforse.ads, a-ztfiio.adb, g-timsta.adb, a-stzfix.ads, a-cihase.ads,
687         a-ztfiio.ads, system-darwin-arm.ads: Move non-tasking runtime sources
688         to libgnat subdirectory.
690 2017-09-08  Yannick Moy  <moy@adacore.com>
692         * sem_aux.adb, sem_aux.ads (Get_Called_Entity): New function to
693         return the entity associated with the call.
694         * sem_util.adb, sem_util.ads (Check_Function_Writable_Actuals):
695         Replace the internal Get_Function_Id with the new
696         Sem_Aux.Get_Called_Entity.
697         (Iterate_Call_Parameters): New
698         procedure to iterate on formals and actuals at the same time.
699         * sem_ch12.adb (Analyze_Subprogram_Instantiation):
700         Set SPARK_Mode from spec when set, for analysis
701         of instance. Restore after analysis of instance.
702         (Instantiate_Subprogram_Body): Set SPARK_Mode from body when
703         set, for analysis of body instance. Restored automatically at
704         the end of the subprogram.
705         * gnat1drv.adb (Adjust_Global_Switches): Set
706         Check_Validity_Of_Parameters to False in GNATprove mode.
707         * opt.ads (Check_Validity_Of_Parameters): Document switch to
708         set option.
710 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
712         * sem_util.adb (NCT_Tables_In_Use): Move to library level from...
713         (New_Copy_Tree): ...there.  Reset the hash tables only if they
714         were used in the previous invocation.
715         * s-htable.adb: Fix typo.
717 2017-09-08  Bob Duff  <duff@adacore.com>
719         * a-ssicst.adb (Open): Set File.Last_Op to the appropriate value.
721 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
723         * sem_aggr.adb: minor style fix.
725 2017-09-08  Bob Duff  <duff@adacore.com>
727         * sprint.adb (Write_Corresponding_Source): Ignore if there is
728         no current source file.
729         (Write_Name_With_Col_Check, Write_Name_With_Col_Check_Sloc):
730         Print something helpful in case N is invalid.
731         * sprint.ads: Minor comment fix.
733 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
735         * exp_aggr.adb: (Aggr_Assignment_OK_For_Backend): Add early return for
736         access types.
738 2017-09-08  Bob Duff  <duff@adacore.com>
740         * par-prag.adb, sem_prag.adb, snames.ads-tmpl: Implement pragma
741         Ada_2020, along the same lines as the other Ada version pragmas.
743 2017-09-08  Gary Dismukes  <dismukes@adacore.com>
745         * sem_ch12.adb: Minor typo fixes and reformatting.
747 2017-09-08  Yannick Moy  <moy@adacore.com>
749         * sem_aggr.adb (Resolve_Record_Aggregate):
750         Rewrite bounds of aggregate subexpressions which may depend on
751         discriminants of the enclosing aggregate.
753 2017-09-08  Yannick Moy  <moy@adacore.com>
755         * sem_ch5.adb: Prevent assertion failure on illegal code.
757 2017-09-08  Yannick Moy  <moy@adacore.com>
759         * lib-xref-spark_specific.adb (Add_SPARK_Xrefs.Is_SPARK_Scope): Avoid
760         calling Renamed_Entity on an entity which cannot be a renaming.
762 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
764         * exp_aggr.adb: Add with & use clause for Urealp.
765         (Aggr_Assignment_OK_For_Backend): Accept (almost all)
766         elementary types instead of just discrete types.
767         * sem_eval.adb (Expr_Value): Deal with N_Null for access types.
768         * gcc-interface/trans.c (gnat_to_gnu) <N_Assignment_Statement>:
769         Be prepared for the FP zero value in the memset case.  Add small
770         guard.
772 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
774         * s-htable.adb (Static_HTable.Reset): Use aggregate instead
775         of loop.
777 2017-09-08  Hristian Kirtchev  <kirtchev@adacore.com>
779         * exp_aggr.adb (Expand_Array_Aggregate): Use New_Copy_Tree instead
780         of New_Copy because the latter leaves the syntactic structure of
781         the tree inconsistent (a child is accessible through two parents)
782         and prevents proper replication of itypes by subsequent calls
783         to New_Copy_Tree.
784         * exp_ch4.adb (Expand_Concatenate): Use New_Copy_Tree instead of
785         New_Copy because the latter leaves the syntactic structure of the
786         tree inconsistent (a child is accessible through two parents)
787         and prevents proper replication of itypes by subsequent calls
788         to New_Copy_Tree.
789         * sem_util.adb (In_Subtree): New routine.
790         (New_Copy_Tree): Reimplemented.
791         * sem_util.ads (In_Subtree): New routine.
792         (New_Copy_Tree): Reimplemented.
794 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
796         * sem_ch13.adb (Resolve_Aspect_Expressions): The expression
797         for aspect Default_Value is a static scalar value, but it does
798         not freeze the type. Yhis allows for subsequent representation
799         clauses for the type.
801 2017-09-08  Javier Miranda  <miranda@adacore.com>
803         * sem_ch8.adb (Find_Direct_Name.Undefined): Do
804         not add entries into the undefined reference table when we are
805         compiling with errors ignored.
807 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
809         * sem_ch12.adb (Check_Formal_Packages): Do not apply conformance
810         check if the instance is within an enclosing instance body. The
811         formal package was legal in the enclosing generic, and is
812         legal in the enclosing instantiation.  This optimisation may be
813         applicable elsewhere, and it also removes spurious errors that
814         may arise with on-the-fly processing  of instantiations that
815         contain Inline_Always subprograms.
817 2017-09-08  Vincent Celier  <celier@adacore.com>
819         * gnatcmd.adb: Disregard empty argument of GNAT driver.
821 2017-09-08  Justin Squirek  <squirek@adacore.com>
823         * checks.adb (Insert_Valid_Check): Manually decorate
824         the generated temporary for range valdity checks.
826 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
828         * usage.adb (Usage): Document new -gnatw.q/-gnatw.Q switches.
830 2017-09-08  Justin Squirek  <squirek@adacore.com>
832         * switch-c.adb (Scan_Front_End_Switches): Add new warning switch
833         case to handle underscore flags.
834         * warnsw.adb, warnsw.ads (Set_Underscore_Warning_Switch): Create
835         new procedure to handle underscores.
837 2017-09-08  Javier Miranda  <miranda@adacore.com>
839         * exp_ch4.adb (Expand_N_Op_Divide): Reordering code that handles
840         divisions with fixed point results to avoid generating twice
841         the runtime check on divide by zero.
842         * checks.adb (Apply_Divide_Checks): Ensure that operands are
843         not evaluated twice (once for their runtime checks and once for
844         their regular computation).
846 2017-09-08  Yannick Moy  <moy@adacore.com>
848         * sem_prag.adb (Analyze_Part_Of): Add missing
849         return statements after issuing errors.  Add detection of
850         out-of-order item and single concurrent type.
852 2017-09-08  Nicolas Roche  <roche@adacore.com>
854         * gcc-interface/Makefile.in, a-extiti.ads, s-taprop-linux.adb,
855         s-osinte-solaris.adb, a-intnam.ads, s-osinte-solaris.ads,
856         s-tpobop.adb, s-intman-android.adb, s-tasinf.adb, s-tpobop.ads,
857         s-tasinf.ads, i-vxinco.adb, a-exetim-posix.adb, i-vxinco.ads,
858         a-astaco.adb, a-astaco.ads, s-tporft.adb, s-tpoaal.adb, a-taside.adb,
859         a-taside.ads, s-tpopsp-posix.adb, s-tasdeb.adb, s-tasdeb.ads,
860         s-tpoben.adb, a-dinopr.ads, s-inmaop-vxworks.adb, s-tpoben.ads,
861         s-interr-vxworks.adb, s-interr-dummy.adb, s-tassta.adb,
862         a-intnam-mingw.ads, s-tassta.ads, s-taasde.adb, a-stcoed.ads,
863         s-taasde.ads, s-osinte-darwin.adb, s-proinf.adb, s-taprop-dummy.adb,
864         s-osinte-darwin.ads, s-proinf.ads, s-linux.ads, a-intnam-linux.ads,
865         s-tasren.adb, s-tasren.ads, s-mudido.adb, g-semaph.adb, s-mudido.ads,
866         s-taprop-posix.adb, g-semaph.ads, s-osinte-mingw.ads, s-vxwork-x86.ads,
867         s-tposen.adb, s-linux-sparc.ads, s-taprop-vxworks.adb, s-tasini.adb,
868         s-tposen.ads, s-tasini.ads, a-etgrbu.ads, s-interr-hwint.adb,
869         s-osinte-linux.ads, s-taprop.ads, s-tasque.adb, s-tasque.ads,
870         s-taenca.adb, s-taspri-vxworks.ads, s-taenca.ads, a-dynpri.adb,
871         s-tpopsp-solaris.adb, a-dynpri.ads, s-taprop-hpux-dce.adb,
872         a-interr.adb, a-intnam-freebsd.ads, s-tarest.adb, a-interr.ads,
873         s-intman-susv3.adb, a-synbar.adb, a-intnam-dummy.ads, s-tadeca.adb,
874         s-osinte-vxworks.adb, s-tarest.ads, s-taskin.adb, a-synbar.ads,
875         s-taspri-hpux-dce.ads, s-tadeca.ads, s-osinte-vxworks.ads,
876         s-taskin.ads, s-intman-solaris.adb, a-sytaco.adb, s-vxwext-kernel.adb,
877         s-mudido-affinity.adb, a-sytaco.ads, s-vxwext-kernel.ads, s-taprob.adb,
878         s-intman-mingw.adb, s-taprob.ads, s-osinte-kfreebsd-gnu.ads,
879         s-osinte-dummy.ads, s-osinte-gnu.adb, s-osinte-rtems.adb, s-interr.adb,
880         s-inmaop.ads, s-vxwext-rtp.adb, s-osinte-gnu.ads, s-osinte-rtems.ads,
881         a-synbar-posix.adb, s-interr.ads, s-taspri-posix-noaltstack.ads,
882         s-vxwext-rtp.ads, a-synbar-posix.ads, a-extiin.ads, s-osinte-posix.adb,
883         s-tpinop.adb, s-tasres.ads, s-tpinop.ads, a-disedf.ads, a-diroro.ads,
884         s-linux-alpha.ads, a-tasatt.adb, s-solita.adb, a-intnam-solaris.ads,
885         a-tasatt.ads, s-solita.ads, s-tasinf-solaris.adb, s-tasinf-solaris.ads,
886         s-vxwork-arm.ads, s-tpopsp-posix-foreign.adb, s-intman-dummy.adb,
887         s-intman.ads, s-stusta.adb, s-stusta.ads, s-intman-posix.adb,
888         s-tpopsp-vxworks.adb, s-inmaop-dummy.adb, s-taspri-mingw.ads,
889         a-intnam-darwin.ads, s-osinte-aix.adb, s-osinte-dragonfly.adb,
890         s-osinte-aix.ads, s-tasinf-mingw.adb, s-osinte-dragonfly.ads,
891         s-linux-hppa.ads, s-osinte-x32.adb, s-inmaop-posix.adb,
892         s-tasinf-mingw.ads, s-intman-vxworks.adb, s-linux-mips.ads,
893         s-intman-vxworks.ads, s-osinte-android.adb, s-tasinf-linux.adb,
894         s-osinte-android.ads, s-vxwork-ppc.ads, s-tasinf-linux.ads,
895         a-dispat.adb, a-dispat.ads, s-tadert.adb, g-thread.adb, s-tadert.ads,
896         g-thread.ads, a-intnam-hpux.ads, s-linux-android.ads, s-tataat.adb,
897         a-exetim.ads, s-tataat.ads, a-reatim.adb, a-reatim.ads, thread.c,
898         g-boubuf.adb, s-osinte-freebsd.adb, g-boubuf.ads, s-osinte-freebsd.ads,
899         s-tasuti.adb, s-taspri-dummy.ads, a-exetim-mingw.adb, s-linux-x32.ads,
900         s-tasuti.ads, g-signal.adb, a-exetim-mingw.ads, s-interr-sigaction.adb,
901         g-signal.ads, s-osinte-hpux.ads, a-intnam-vxworks.ads,
902         s-osinte-hpux-dce.adb, s-taspri-posix.ads, s-osinte-hpux-dce.ads,
903         s-tasinf-vxworks.ads, g-tastus.ads, s-tpopsp-tls.adb,
904         s-taprop-solaris.adb, a-retide.adb, a-exetim-darwin.adb, a-retide.ads,
905         s-vxwext.adb, s-vxwext.ads, a-rttiev.adb, a-rttiev.ads, g-boumai.ads,
906         a-exetim-default.ads, s-taprop-mingw.adb, s-taspri-solaris.ads,
907         a-intnam-aix.ads: Move libgnarl sources to libgnarl subdir.
909 2017-09-08  Arnaud Charlet <charlet@adacore.com>
911         * doc/share/conf.py, doc/share/latex_elements.py,
912         doc/share/ada_pygments.py, doc/Makefile: Improve support for Ada
913         highlighting.
915 2017-09-08  Arnaud Charlet <charlet@adacore.com>
917         * gnat_rm.texi, gnat_ugn.texi,
918         doc/gnat_ugn/the_gnat_compilation_model.rst,
919         doc/gnat_ugn/getting_started_with_gnat.rst,
920         doc/gnat_ugn/inline_assembler.rst,
921         doc/gnat_ugn/building_executable_programs_with_gnat.rst,
922         doc/gnat_ugn/elaboration_order_handling_in_gnat.rst,
923         doc/gnat_ugn/about_this_guide.rst,
924         doc/gnat_ugn/platform_specific_information.rst,
925         doc/gnat_ugn/example_of_binder_output.rst,
926         doc/gnat_ugn/gnat_and_program_execution.rst,
927         doc/gnat_ugn/gnat_utility_programs.rst,
928         doc/gnat_rm/implementation_of_specific_ada_features.rst,
929         doc/gnat_rm/interfacing_to_other_languages.rst,
930         doc/gnat_rm/implementation_defined_aspects.rst,
931         doc/gnat_rm/intrinsic_subprograms.rst,
932         doc/gnat_rm/implementation_defined_characteristics.rst,
933         doc/gnat_rm/implementation_advice.rst,
934         doc/gnat_rm/implementation_defined_attributes.rst,
935         doc/gnat_rm/compatibility_and_porting_guide.rst,
936         doc/gnat_rm/standard_library_routines.rst,
937         doc/gnat_rm/the_gnat_library.rst,
938         doc/gnat_rm/implementation_defined_pragmas.rst,
939         doc/gnat_rm/representation_clauses_and_pragmas.rst,
940         doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
941         doc/gnat_rm/obsolescent_features.rst,
942         doc/gnat_rm/about_this_guide.rst,
943         doc/gnat_rm/the_implementation_of_standard_i_o.rst,
944         doc/gnat_rm/implementation_of_ada_2012_features.rst,
945         doc/gnat_ugn.rst,
946         doc/gnat_rm.rst: Update documentation.
948 2017-09-08  Arnaud Charlet <charlet@adacore.com>
950         * s-dwalin.ads, s-dwalin.adb, s-trasym-dwarf.adb, s-objrea.ads,
951         s-objrea.adb, s-tsmona-linux.adb, s-tsmona-mingw.adb: New.
952         * gcc-interface/Makefile.in: Enable s-trasym-dwarf.adb on x86*linux.
954 2017-09-08  Bob Duff  <duff@adacore.com>
956         * s-ststop.ads, s-ststop.adb, rtsfind.ads (String_Input_Tag):
957         New routine to read the Tag robustly.
958         * exp_attr.adb (Input): Change the expansion of 'Input,
959         in the class-wide case, to call String_Input_Tag instead of
960         String_Input_Blk_IO.
962 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
964         * s-rident.ads (Restriction_Id): reorder enum
965         literals, so that Pure_Barriers is no longer in range of the
966         Cunit_Boolean_Restrictions subtype.
968 2017-09-08  Nicolas Roche  <roche@adacore.com>
970         * a-taster.ads, a-taster.adb: Move to libgnarl
971         * gcc-interface/Makefile.in: Remove obsolete targets. Code cleanups.
972         Add support for files in libgnarl.
974 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
976         * exp_ch4.adb (Expand_N_Type_Conversion): Do not apply
977         accessibility check to an interface conversion, whose purpose
978         is to perform a pointer adjustment in a dispatching call.
979         * exp_ch6.adb (Expand_Call_JHelper): Add accessibility checks
980         when the actual is a construct that involves a dereference of an
981         expression that includes a formal of the enclosing subprogram,
982         In such cases, the accessibility level of the actual is that of
983         the corresponding formal, which is passed in as an additional
984         actual in the outer call.
986 2017-09-08  Bob Duff  <duff@adacore.com>
988         * exp_intr.adb (Add_Source_Info): Do not decode
989         file names; they were not encoded in the first place.
991 2017-09-08  Bob Duff  <duff@adacore.com>
993         * a-tags.adb (Internal_Tag): Unsuppress checks, so we get
994         exceptions instead of crashes. Check for absurdly long strings
995         and empty strings. Empty strings cause trouble because they can
996         have super-null ranges (e.g. 100..10), which causes Ext_Copy to
997         be empty, which causes an array index out of bounds.
998         * s-ststop.adb (Input): Unsuppress checks, so we get exceptions
999         instead of crashes.
1001 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
1003         * sem_util.adb (Is_CCT_Instance): allow use in
1004         the context of protected types.
1006 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
1008         * a-tigeli.adb: minor remove extra whitespace.
1010 2017-09-08  Gary Dismukes  <dismukes@adacore.com>
1012         * par-ch4.adb: Reformatting of an error message.
1014 2017-09-08  Javier Miranda  <miranda@adacore.com>
1016         * sem_ch3.adb (Resolve_Name): Under ASIS mode analyze overloaded
1017         identifiers to ensure their correct decoration of names on
1018         aspect expressions.
1020 2017-09-08  Yannick Moy  <moy@adacore.com>
1022         * exp_attr.adb (Expand_Loop_Entry_Attribute): Do
1023         not skip a loop coming from source which is rewritten into a loop.
1025 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
1027         * freeze.adb (Wrap_Imported_Subprogram): Indicate that the
1028         wrapper has convention Ada, to prevent spurious warnings on
1029         unconstrained array parameters.
1031 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
1033         * sem_prag.adb (Check_Variant): Use First_Non_Pragma/Next_Non_Pragma.
1034         (Analyze_Pragma) <Pragma_Unchecked_Union>: Likewise.
1036 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
1038         * sem_ch6.adb (Freeze_Expr_Types): Rename Spec_Id into Def_Id.
1040 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
1042         * exp_intr.adb (Append_Entity_Name): Move to ...
1043         * sem_util.ads, sem_util.adb: ... here to share it.
1044         (Subprogram_Name): New subprogram, to compute the name of the enclosing
1045         subprogram/entity.
1046         * errutil.adb (Error_Msg): Fill new field Node.
1047         * erroutc.ads (Subprogram_Name_Ptr): New.
1048         (Error_Msg_Object): New field Node.
1049         * erroutc.adb (dmsg, Output_Msg_Text): Take new field Node into account.
1050         * errout.adb (Error_Msg): New variant with node id parameter.
1051         Fill new parameter Node when emitting messages. Revert previous
1052         changes for Include_Subprogram_In_Messages.
1053         * sem_ch5.adb (Check_Unreachable_Code): Supply Node parameter when
1054         generating warning message.
1056 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
1058         * par-ch4.adb (P_Iterated_Component_Association): Place construct
1059         under -gnat2020 flag, given that it is a future feature of
1060         the language.
1061         * sem_aggr.adb (Resolve_Iterated_Component_Association): Mark
1062         defining identifier as referenced to prevent spurious warnings:
1063         corresponding loop is expanded into one or more loops whose
1064         variable has the same name, and the expression uses those names
1065         and not the original one.
1067 2017-09-08  Hristian Kirtchev  <kirtchev@adacore.com>
1069         * sem_elab.adb (Check_A_Call): Do not consider
1070         references to internal variables for SPARK semantics.
1072 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
1074         * inline.adb (In_Package_Spec): refine type of
1075         the parameter from Node_Id to Entity_Id.
1077 2017-09-08  Justin Squirek  <squirek@adacore.com>
1079         * exp_ch5.adb (Expand_Formal_Container_Loop):
1080         Reset the scope of the loop parameter after it is reanalyzed.
1082 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
1084         * sem_util.ads (Set_Rep_Info): New inline procedure.
1085         * sem_util.adb (Set_Rep_Info): Implement it.
1086         * sem_ch3.adb (Process_Subtype): If the case of a constraint present,
1087         always copy the representation aspects onto the subtype.
1089 2017-09-08  Georges-Alex Jaloyan  <jaloyan@adacore.com>
1091         * g-dynhta.adb, g-dynhta.ads (Get_First_Key, Get_Next_key):
1092         Correction of the return type from access type to option type.
1093         (Simple_HTable): Moving the Instance_Data to ads file.
1095 2017-09-08  Yannick Moy  <moy@adacore.com>
1097         * sem_prag.adb: Use System.Case_Util.To_Lower to simplify code.
1099 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
1101         * opt.ads (Include_Subprogram_In_Messages): New variable.
1102         * errout.ads (Current_Subprogram_Ptr): New variable.
1103         * errout.adb (Error_Msg): Prepend current subprogram info
1104         in messages if Include_Subprogram_In_Messages is set.
1105         * sem_util.adb (elab code): Initialize Current_Subprogram_Ptr to
1106         Current_Subprogram.
1107         * gnat1drv.adb (Adjust_Global_Switches): Set
1108         Include_Subprogram_In_Messages when -gnatdJ is set.
1109         * debug.adb: Document and reserve -gnatdJ.
1111 2017-09-08  Georges-Axel Jaloyan  <jaloyan@adacore.com>
1113         * g-dynhta.adb, g-dynhta.ads (Get_First_Key, Get_Next_Key): New
1114         functions to iterate over simple hastables.
1115         (Load_Factor_HTable): Remove obsolete and inefficient implementation.
1117 2017-09-08  Javier Miranda  <miranda@adacore.com>
1119         * exp_ch6.adb (Unqual_BIP_Function_Call): Adding
1120         missing checks on the presence of Entity() before checking the
1121         entity attributes.
1123 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
1125         * sem_ch6.adb (Analyze_Expression_Function): Reorder some
1126         statements, use local variable and remove unnecessary processing.
1128 2017-09-08  Javier Miranda  <miranda@adacore.com>
1130         * exp_ch6.ads (Make_Build_In_Place_Iface_Call_In_Allocator): New
1131         subprogram.
1132         (Make_Build_In_Place_Iface_Call_In_Anonymous_Context): New subprogram.
1133         (Make_Build_In_Place_Iface_Call_In_Object_Declaration): New
1134         subprogram.
1135         (Unqual_BIP_Iface_Function_Call): New subprogram.
1136         * exp_ch6.adb (Replace_Renaming_Declaration_Id): New
1137         subprogram containing code that was previously inside
1138         Make_Build_In_Place_Call_In_Object_Declaration since it is also
1139         required for one of the new subprograms.
1140         (Expand_Actuals):
1141         Invoke Make_Build_In_Place_Iface_Call_In_Anonymous_Context
1142         (Expand_N_Extended_Return_Statement): Extend the
1143         cases covered by an assertion on expected BIP object
1144         declarations.
1145         (Make_Build_In_Place_Call_In_Assignment):
1146         Removing unused code; found working on this ticket.
1147         (Make_Build_In_Place_Call_In_Object_Declaration): Move the code
1148         that replaces the internal name of the renaming declaration
1149         into the new subprogram Replace_Renaming_Declaration_Id.
1150         (Make_Build_In_Place_Iface_Call_In_Allocator): New subprogram.
1151         (Make_Build_In_Place_Iface_Call_In_Anonymous_Context):
1152         New subprogram.
1153         (Make_Build_In_Place_Iface_Call_In_Object_Declaration): New
1154         subprogram.
1155         (Unqual_BIP_Iface_Function_Call): New subprogram.
1156         * exp_ch3.adb (Expand_N_Object_Declaration): Invoke the new
1157         subprogram Make_Build_In_Place_Iface_Call_In_Object_Declaration.
1158         * exp_attr.adb (Expand_N_Attribute_Reference): Invoke the new
1159         subprogram Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
1160         * exp_ch4.adb (Expand_Allocator_Expression): Invoke the new
1161         subprogram Make_Build_In_Place_Iface_Call_In_Allocator.
1162         (Expand_N_Indexed_Component): Invoke the new subprogram
1163         Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
1164         (Expand_N_Selected_Component): Invoke the new subprogram
1165         Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
1166         (Expand_N_Slice): Invoke the new subprogram
1167         Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
1168         * exp_ch8.adb (Expand_N_Object_Renaming_Declaration):
1169         Invoke the new subprogram
1170         Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
1172 2017-09-08  Javier Miranda  <miranda@adacore.com>
1174         * exp_disp.adb (Expand_Interface_Conversion): Fix handling of
1175         access to interface types.  Remove also the accessibility check.
1177 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
1179         * sem_ch6.adb (Freeze_Expr_Types): Really freeze
1180         all the types that are referenced by the expression.
1181         (Analyze_Expression_Function): Call Freeze_Expr_Types for
1182         a completion instead of manually freezing the type of the
1183         expression.
1184         (Analyze_Subprogram_Body_Helper): Do not call Freeze_Expr_Types here.
1186 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
1188         * exp_prag.adb (Replace_Discriminals_Of_Protected_Op):
1189         New procedure, auxiliary to Expand_Pragma_Check, to handle
1190         references to the discriminants of a protected type within a
1191         precondition of a protected operation. This is needed because
1192         the original precondition has been analyzed in the context of
1193         the protected declaration, but in the body of the operation
1194         references to the discriminants have been replaved by references
1195         to the discriminants of the target object, and these references
1196         are only created when expanding the protected body.
1198 2017-09-08  Yannick Moy  <moy@adacore.com>
1200         * sem_prag.adb (Analyze_Pragma): Issue more precise error messages on
1201         Loop_Variant.
1203 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
1205         * exp_attr.adb (Build_Record_VS_Func): If the record is an
1206         unchecked union, do not emit checks for its (non-existent)
1207         discriminants, or for variant parts that depend on them.
1209 2017-09-08  Justin Squirek  <squirek@adacore.com>
1211         * sem_ch4.adb (Find_Equality_Types.Try_One_Interp,
1212         Find_Comparison_Type.Try_One_Interp): Add check for generic
1213         instances.
1215 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
1217         * sem_ch3.adb, layout.adb, layout.ads, exp_attr.adb, debug.adb,
1218         exp_pakd.adb, sem_prag.adb, gnat1drv.adb, targparm.adb, targparm.ads,
1219         repinfo.adb, exp_ch6.adb, exp_aggr.adb, sem_eval.adb, sem_ch13.adb,
1220         exp_ch3.adb: Remove references to Frontend_Layout_On_Target and
1221         remaining references to AAMP_On_Target.
1223 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
1225         * style.adb: Fix typo.
1227 2017-09-08  Javier Miranda  <miranda@adacore.com>
1229         * einfo.adb (Underlying_Type): Add missing support for class-wide
1230         types that come from the limited view.
1231         * exp_attr.adb (Attribute_Address): Check class-wide type
1232         interfaces using the underlying type to handle limited-withed
1233         types.
1234         (Attribute_Tag): Check class-wide type interfaces using
1235         the underlying type to handle limited-withed types.
1237 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
1239         * exp_ch5.adb (Expand_Predicated_Loop): Handle properly a loop
1240         over a subtype of a type with a static predicate, taking into
1241         account the predicate function of the parent type and the bounds
1242         given in the loop specification.
1243         * sem_ch3.adb (Inherit_Predicate_Flags): For qn Itype created for
1244         a loop specification that is a subtype indication whose type mark
1245         is a type with a static predicate, inherit predicate function,
1246         used to build case statement for rewritten loop.
1248 2017-09-08  Justin Squirek  <squirek@adacore.com>
1250         * lib-load.adb: Modify printing of error message to exclude file
1251         line number.
1253 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
1255         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode):
1256         don't inline subprograms declared in both visible and private
1257         parts of a package.
1258         (In_Package_Spec): previously In_Package_Visible_Spec; now
1259         detects subprograms declared both in visible and private parts
1260         of a package spec.
1262 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
1264         * exp_util.adb (Build_Invariant_Procedure_Declaration): If
1265         the type is an anonymous array in an object declaration, whose
1266         component type has an invariant, use the object declaration
1267         as the insertion point for the invariant procedure, given that
1268         there is no explicit type declaration for an anonymous array type.
1270 2017-09-08  Bob Duff  <duff@adacore.com>
1272         * a-cbprqu.ads, a-cbdlli.adb: Suppress warnings.
1274 2017-09-08  Bob Duff  <duff@adacore.com>
1276         * a-strfix.adb (Trim): Compute Low and High only if needed.
1278 2017-09-08  Justin Squirek  <squirek@adacore.com>
1280         * lib-load.adb (Load_Main_Source): Add error output in the case a
1281         source file is missing.
1283 2017-09-08  Bob Duff  <duff@adacore.com>
1285 PR ada/80888
1286         * a-textio.adb, a-witeio.adb, a-ztexio.adb (Set_WCEM): Use
1287         Default_WCEM by default (i.e. if the encoding is not specified
1288         by the Form string).
1290 2017-09-08  Bob Duff  <duff@adacore.com>
1292         * s-trasym.ads (Hexa_Traceback): If
1293         Suppress_Hex is True, print "..." instead of a hexadecimal
1294         address.
1295         * s-trasym.adb: Ignore No_Hex in this version.
1296         Misc cleanup.
1298 2017-09-08  Bob Duff  <duff@adacore.com>
1300         * debug.adb: Minor reformatting.
1302 2017-09-08  Bob Duff  <duff@adacore.com>
1304         * a-cbdlli.adb, a-cohama.adb, a-cohase.adb (Copy): Rewrite the
1305         code so it doesn't trigger an "uninit var" warning.
1307 2017-09-08  Nicolas Roche  <roche@adacore.com>
1309         * s-hibaen.ads: Remove obsolete file.
1311 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
1313         * a-locale.ads: Add comment explaining the state of this package.
1315 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
1317         * sem_util.adb (Is_CCT_Instance): Allow calls in the context
1318         of packages.
1319         * sem_prag.ads, sem_prag.adb (Find_Related_Declaration_Or_Body):
1320         allow calls in the context of package spec (for pragma
1321         Initializes) and bodies (for pragma Refined_State).
1323 2017-09-08  Bob Duff  <duff@adacore.com>
1325         * checks.adb (Insert_Valid_Check): Copy the Do_Range_Check flag to the
1326         new Exp.
1328 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
1330         * debug.adb (dA): Adjust comment.
1331         * gnat1drv.adb (Gnat1drv): Likewise.
1332         * opt.ads (List_Representation_Info_Extended): New variable.
1333         * repinfo.adb (List_Record_Info): Split implementation into...
1334         (Compute_Max_Length): ...this.  Recurse on records if requested.
1335         (List_Record_Layout): Likewise.
1336         * switch-c.adb (Scan_Front_End_Switches) <'R'>: Use case
1337         statement, accept '0' and set List_Representation_Info_Extended
1338         on 'e'.
1339         * usage.adb (Usage): Document new -gnatRe variant.
1341 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
1343         * sem_prag.adb (Analyze_Pragma, case Default_Storage_Pool):
1344         Do not save the given entity in the global variable Default_Pool
1345         if the pragma appears within a generic unit.
1347 2017-09-08  Bob Duff  <duff@adacore.com>
1349         * errout.adb (Delete_Warning): Do not
1350         decrement Warnings_Treated_As_Errors. This is called before
1351         Warnings_Treated_As_Errors has been incremented to account for
1352         this warning. Decrementing it here can lead to negative values
1353         of Warnings_Treated_As_Errors, raising Constraint_Error in
1354         checks-on builds, and causing the compiler to return an error
1355         code in checks-off builds.
1357 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
1359         * sem_util.ads, sem_util.adb (Is_CCT_Instance): Only expect
1360         entities of named concurrent types as Ref_Id and not of anonymous
1361         concurrent objects (because callers already know when a conversion
1362         is necessary and can easily do it); also, do not expect protected
1363         types or protected objects as Context_Id (because no flow-related
1364         SPARK pragmas are attached there); reflect these changes in a
1365         more precise comment.
1367 2017-09-08  Olivier Hainque  <hainque@adacore.com>
1369         * g-altive.ads: Add documentation.
1371 2017-09-08  Bob Duff  <duff@adacore.com>
1373         * sem_util.ads, debug.adb: Minor comment fix.
1374         * erroutc.ads: Comment fix.
1376 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
1378         * sem_ch12.adb (Validate_Array_Type_Instance): Suppress check
1379         for compatibility of component types of formal and actual in an
1380         instantiation of a child unit,  when the component type of the
1381         formal is itself a formal of an enclosing generic.
1383 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
1385         * sem_util.ads, sem_util.adb (Is_CCT_Instance): moved from
1386         sem_prag.adb to make it available for GNATprove; for concurrent
1387         types replace custom scope climbing with Scope_Same_Or_Within; for
1388         single concurrent objects add scope climbing (with Scope_Within),
1389         which was not there (that's the primary semantic change of this
1390         commit); also, when comparing a single concurrent object with
1391         its corresponding concurrent type rely on equality of types,
1392         not of objects (because that's simpler to code).
1393         * sem_prag.adb (Is_CCT_Instance): lifted to sem_util.ads.
1394         (Analyze_Global_Item): adjust special-casing of references to the
1395         current instance of a concurrent unit in the Global contracts
1396         of task types and single tasks objects; similar for references
1397         in the protected operations and entries of protected types and
1398         single protected objects (in all these cases the current instance
1399         behaves as an implicit parameter and must not be mentioned in
1400         the Global contract).
1402 2017-09-08  Arnaud Charlet  <charlet@adacore.com>
1404         * exp_ch6.adb (Expand_Call_Helper): Introduce temporary for
1405         function calls returning a record within a subprogram call,
1406         for C generation.
1408 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
1410         * sem_ch8.adb (Find_Expanded_Name): Handle properly an expanded
1411         name that designates the current instance of a child unit in its
1412         own body and appears as the prefix of a reference to an entity
1413         local to the child unit.
1414         * exp_ch6.adb, freeze.adb, sem_ch3.adb, sem_prag.adb, sem_util.adb:
1415         Minor reformatting.
1417 2017-09-08  Yannick Moy  <moy@adacore.com>
1419         * sem_res.adb (Resolve_Equality_Op): Do not warn on comparisons that
1420         may be intentional.
1422 2017-09-08  Tristan Gingold  <gingold@adacore.com>
1424         * sem_warn.adb (Check_Unused_Withs): Remove test that disabled
1425         warnings on internal units in configurable run time mode.
1427 2017-09-08  Bob Duff  <duff@adacore.com>
1429         * sem_ch3.adb (Build_Derived_Private_Type): Inherit
1430         representation items from interfaces that the derived type
1431         implements, not just from the parent type.
1432         * sem_util.ads, sem_util.adb (Abstract_Interface_List): Change
1433         this to return an empty list when there are no interfaces.
1434         * einfo.ads, sem_ch13.adb: Minor comment fixes.
1435         * sem_attr.adb: Minor comment fix.
1437 2017-09-08  Doug Rupp  <rupp@adacore.com>
1439         * sigtramp-vxworks.c [i386]: Adjust the kernel context for
1440         x86-vx7.
1442 2017-09-08  Hristian Kirtchev  <kirtchev@adacore.com>
1444         * exp_ch4.adb (Expand_N_Allocator): Generate a
1445         call to Allocate_Any_Controlled when the allocation does not
1446         require any initialization.
1448 2017-09-08  Hristian Kirtchev  <kirtchev@adacore.com>
1450         * sem_util.adb (Copy_Node_With_Replacement):
1451         Update the Renamed_Object field of a replicated object renaming
1452         declaration.
1454 2017-09-08  Patrick Bernardi  <bernardi@adacore.com>
1456         * exp_ch9.adb (Is_Pure_Barrier): Allow type
1457         conversions and components of objects. Simplified the detection
1458         of the Count attribute by identifying the corresponding run-time
1459         calls.
1461 2017-09-08  Yannick Moy  <moy@adacore.com>
1463         * exp_ch9.adb, exp_disp.adb, repinfo.adb, sem_ch12.adb, sem_dim.adb,
1464         sem_type.adb, sinfo.ads: Minor reformatting.
1466 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
1468         * freeze.adb (Has_Incomplete_Compoent): New predicate, subsidiary
1469         of Freeze_Profile, used to inhibit the freezing of the profile
1470         of an expression function declared within a nested package, when
1471         some type in the profile depends on a private type declared in
1472         an enclosing package.
1474 2017-09-08  Bob Duff  <duff@adacore.com>
1476         * gnat1drv.adb (Gnat1drv): Do not set the Force_ALI_Tree_File flag in
1477         the subunit case. It's still OK to set it in the "missing subunits"
1478         case, because that won't cause the obsolete .ali files that cause
1479         confusion.
1481 2017-09-08  Bob Duff  <duff@adacore.com>
1483         * sinput-l.adb: Remove unused "with Unchecked_Conversion;". It's
1484         unclear why this didn't cause a warning.
1485         * a-uncdea.ads, a-unccon.ads: Add "Ada." to names in the
1486         pragmas. It's unclear why this didn't cause an error.
1488 2017-09-08  Hristian Kirtchev  <kirtchev@adacore.com>
1490         * exp_spark.adb (Expand_SPARK_N_Object_Renaming_Declaration):
1491         Reimplemented.
1492         (Expand_SPARK_Potential_Renaming): Code clean up.
1493         * sem_prag.adb (Analyze_Initialization_Item): Add a guard in case
1494         the item does not have a proper entity.
1495         (Analyze_Input_Item): Add a guard in case the item does not have a
1496         proper entity.
1497         (Collect_States_And_Objects): Include object renamings in the
1498         items being collected.
1499         (Resolve_State): Update the documentation of this routine.
1500         * sem_util.adb (Entity_Of): Add circuitry to handle
1501         renamings of function results.
1502         (Remove_Entity): New routine.
1503         (Remove_Overloaded_Entity): Take advantage of factorization.
1504         * sem_util.ads (Entity_Of): Update the documentation
1505         of this routine.
1506         (Remove_Entity): New routine.
1507         (Remove_Overloaded_Entity): Update the documentation of this
1508         routine.
1510 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
1512         * repinfo.adb (List_Record_Info): During first loop,
1513         do not override the normalized position and first bit
1514         if they have already been set.  Move fallback code
1515         for the packed case to the case where it belongs.
1516         * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order):
1517         Also adjust the normalized position of components.
1518         (Adjust_Record_For_Reverse_Bit_Order_Ada_95): Likewise.
1520 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
1522         * exp_disp.adb (Make_DT, Set_All_DT_Position): Handle properly
1523         the placement of a primitive operation O that renames an operation
1524         R declared in an inner package, and which is thus not a primitive
1525         of the dispatching type of O. In this case O is a new primitive
1526         and does not inherit its dispatch table position from R (which
1527         has none).
1529 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
1531         * sem_dim.adb (Analyze_Dimension_If_Expression,
1532         Analyze_Dimension_Case_Expression): new subprograms to verify
1533         the dimensional correctness of Ada2012 conditional expressions,
1534         and set properly the dimensions of the construct.
1535         * sem_res.adb (Resolve_If_Expression, Resolve_Case_Expression)):
1536         call Analyze_Dimension.
1538 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
1540         * sem_type.adb (Expand_Interface_Conversion): Prevent an infinite
1541         loop on an interface declared as a private extension of another
1542         synchronized interface.
1544 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
1546         * sem_ch12.adb (Check_Generic_Parent): New procedure within
1547         Analyze_Associations, to handle actual packages that depend on
1548         previous instances.  If a package IAP that is an instantiation is
1549         used as an actual in a subsequent instantiation SI in the same
1550         scope, and IAP has a body, IAP must be frozen before SI. If
1551         the generic parent of IAP is itself declared in a previous
1552         instantiation in the same scope, that instantiation must also
1553         be frozen before SI.
1554         (Install_Body): Prevent double insertion of freeze node for
1555         instance.
1557 2017-09-08  Hristian Kirtchev  <kirtchev@adacore.com>
1559         * sem_prag.adb (Resolve_State): Update the
1560         comment on documentation. Generate a reference to the state once
1561         resolution takes place.
1563 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
1565         * sem_ch13.adb (Analyze_Aspect_Specifications, case
1566         Linker_Section): If the aspect applies to an object declaration
1567         with explicit initialization, do not delay the freezing of the
1568         object, to prevent access-before-elaboration in the generated
1569         initialization code.
1571 2017-09-08  Ed Schonberg  <schonberg@adacore.com>
1573         * a-wtdeio.adb (Put, all versions): Use Long_Long_Integer
1574         (Integer_Value (Item)) when the size of the fixed decimal type
1575         is larger than Integer.
1577 2017-09-07  Eric Botcazou  <ebotcazou@adacore.com>
1579         PR ada/82127
1580         * gcc-interface/decl.c (copy_and_substitute_in_layout): Put the fields
1581         in order of increasing position in more cases.
1583 2017-09-07  Yannick Moy  <moy@adacore.com>
1585         * a-exetim-mingw.ads: Add contract Global=>null
1586         on all operations that are modeled as having no read or write
1587         of global variables in SPARK.
1589 2017-09-07  Raphael Amiard  <amiard@adacore.com>
1591         * a-chtgop.adb, a-chtgop.ads (Generic_Iteration_With_Position): Added
1592         to Hmaps.Generic_Ops.
1593         * a-cohama.adb (Ada.Containers.Hmaps.Iterate): Pass proper position in
1594         cursors.
1595         * a-cihama.adb (Ada.Containers.Indefinite_Hmaps.Iterate): Pass pos in
1596         cursors.
1597         * a-cohase.adb (Ada.Containers.Hashed_Sets.Iterate): Pass proper
1598         position in cursors.
1600 2017-09-07  Javier Miranda  <miranda@adacore.com>
1602         * sem_elab.adb (Check_Task_Activation): Adding switch -gnatd.y to
1603         allow disabling the generation of implicit pragma Elaborate_All
1604         on task bodies.
1606 2017-09-07  Javier Miranda  <miranda@adacore.com>
1608         * exp_disp.adb (Make_Tags): Avoid suffix counter
1609         in the external name of the elaboration flag. Required to fix
1610         the regressions introduced by the initial version of this patch.
1612 2017-09-07  Bob Duff  <duff@adacore.com>
1614         * sem_ch6.adb (Analyze_Function_Return): Do not
1615         insert an explicit conversion to force the displacement of the
1616         "this" pointer to reference the secondary dispatch table in the
1617         case where the return statement is returning a raise expression,
1618         as in "return raise ...".
1620 2017-09-07  Arnaud Charlet  <charlet@adacore.com>
1622         * sem_disp.adb (Is_User_Defined_Equality): Removed procedure.
1623         * sem_util.ads, sem_util.adb (Is_User_Defined_Equality): Copied
1624         procedure from sem_disp.adb.
1625         * sem_ch12.ads (Get_Unit_Instantiation_Node): rename Package
1626         with Unit.
1627         * sem_ch12.adb (Get_Unit_Instantiation_Node): function extended to
1628         return the instantiation node for subprograms. Update references
1629         to Get_Unit_Instantiation_Node.
1630         * sem_ch7.adb (Install_Parent_Private_Declarations): update
1631         reference to Get_Unit_Instantiation_Node.
1632         * exp_dist.adb (Build_Package_Stubs): update reference to
1633         Get_Unit_Instantiation_Node.
1634         * sem_ch9.adb: minor typo in comment.
1635         * lib-xref-spark_specific.adb
1636         (Traverse_Declaration_Or_Statement): traverse into task type
1637         definition.
1639 2017-09-07  Ed Schonberg  <schonberg@adacore.com>
1641         * sem_dim.adb (Analyze_Dimension_Type_Conversion): New procedure
1642         to handle properly various cases of type conversions where the
1643         target type and/or the expression carry dimension information.
1644         (Dimension_System_Root); If a subtype carries dimension
1645         information, obtain the source parent type that carries the
1646         Dimension aspect.
1648 2017-09-07  Dmitriy Anisimkov  <anisimko@adacore.com>
1650         * g-socket.adb, g-socket.ads (GNAT.Sockets.To_Ada): New routine.
1652 2017-09-07  Ed Schonberg  <schonberg@adacore.com>
1654         * exp_attr.adb (Expand_N_Attribute_Reference, case 'Constrained):
1655         If the prefix is a reference to an object, rewrite it as an
1656         explicit dereference, as required by 3.7.2 (2) and as is done
1657         with most other attributes whose prefix is an access value.
1659 2017-09-07  Bob Duff  <duff@adacore.com>
1661         * par-ch13.adb: Set the Inside_Depends flag if we are inside a
1662         Refined_Depends aspect.
1663         * par-ch2.adb: Set the Inside_Depends flag if we are inside a
1664         Refined_Depends pragma.
1665         * scans.ads: Fix documentation of Inside_Depends flag.
1666         * styleg.adb, styleg.ads: Minor reformatting and comment fixes.
1668 2017-09-07  Hristian Kirtchev  <kirtchev@adacore.com>
1670         * exp_ch7.adb (Insert_Actions_In_Scope_Around):
1671         Account for the case where the are no lists to insert, but the
1672         secondary stack still requires management.
1673         * a-chtgop.adb, a-cihama.adb, a-cohama.adb, a-cohase.adb, a-tags.adb,
1674         comperr.adb, einfo.adb, exp_aggr.adb, exp_ch3.adb, exp_disp.adb,
1675         lib-xref.adb, lib-xref-spark_specific.adb, sem_ch12.adb, sem_ch13.adb,
1676         sem_ch6.adb, sem_dim.adb, sem_dim.ads, sem_elab.adb, sem_prag.adb:
1677         Minor reformatting.
1679 2017-09-07  Vincent Celier  <celier@adacore.com>
1681         * clean.adb: Do not get the target parameters before calling
1682         gprclean.
1684 2017-09-07  Nicolas Roche  <roche@adacore.com>
1686         * s-osinte-solaris-posix.ads: Removed.
1688 2017-09-07  Arnaud Charlet  <charlet@adacore.com>
1690         * sem_prag.adb (Collect_States_And_Objects): Detect also instances of
1691         single concurrent objects.
1693 2017-09-07  Javier Miranda  <miranda@adacore.com>
1695         * s-regexp.ads: Fix documentation of the globbing grammar.
1697 2017-09-07  Gary Dismukes  <dismukes@adacore.com>
1699         * a-tags.ads, einfo.ads, exp_disp.ads: Minor reformatting.
1701 2017-09-07  Arnaud Charlet  <charlet@adacore.com>
1703         * gnat1drv.adb (Gnat1drv): Enable pragma Ignore_Pragma (Global)
1704         in CodePeer mode, to support more legacy code automatically.
1706 2017-09-07  Ed Schonberg  <schonberg@adacore.com>
1708         * exp_disp.adb (Replace_Formals): If thr formal is classwide,
1709         and thus not a controlling argument, preserve its type after
1710         rewriting because it may appear in an nested call with a classwide
1711         parameter.
1713 2017-09-07  Arnaud Charlet  <charlet@adacore.com>
1715         * comperr.adb (Delete_SCIL_Files): Handle case of
1716         N_Package_Instantiation.
1718 2017-09-07  Ed Schonberg  <schonberg@adacore.com>
1720         * sem_ch10.adb (Remove_Private_With_Clause): If a private with
1721         clause for a unit U appears in a context that includes a regular
1722         with_clause on U, rewrite the redundant private clause into a null
1723         statement, rather than removing it altogether from the context,
1724         so that ASIS tools can reconstruct the original source.
1726 2017-09-07  Ed Schonberg  <schonberg@adacore.com>
1728         * sem_ch13.adb (Check_Aspect_At_Freeze_Point): The expression
1729         for aspect Small can be of any real type (not only a universal
1730         real literal) as long as it is a static constant.
1732 2017-09-07  Thomas Quinot  <quinot@adacore.com>
1734         * par_sco.adb: Minor reformatting.
1736 2017-09-07  Arnaud Charlet  <charlet@adacore.com>
1738         * s-parame-ae653.ads: Removed.
1740 2017-09-07  Nicolas Roche  <roche@adacore.com>
1742         * s-traces-default.adb, s-trafor-default.adb, s-trafor-default.ads,
1743         s-traces.adb, s-traces.ads, s-tratas-default.adb, s-tfsetr-default.adb,
1744         s-tfsetr-vxworks.adb, s-tratas.adb, s-tratas.ads, s-tasuti.adb,
1745         s-parame-hpux.ads, s-tassta.adb, s-taasde.adb, s-tasren.adb,
1746         s-taprob.adb, a-caldel.adb, s-parame.ads, Makefile.rtl, s-tpobop.adb,
1747         s-taenca.adb, s-parame-vxworks.ads: Remove support for System.Traces.
1749 2017-09-07  Yannick Moy  <moy@adacore.com>
1751         * a-ngelfu.ads Add preconditions to all functions
1752         listed in Ada RM A.5.1(19-33) as having constraints on inputs.
1754 2017-09-07  Arnaud Charlet  <charlet@adacore.com>
1756         * lib-xref.adb (Generate_Reference): ignore
1757         references to entities which are Part_Of single concurrent
1758         objects.
1760 2017-09-07  Eric Botcazou  <ebotcazou@adacore.com>
1762         * sem_ch7.adb (Hide_Public_Entities): Add paragraph to main
1763         comment.
1765 2017-09-07  Arnaud Charlet  <charlet@adacore.com>
1767         * a-taside.adb (Activation_Is_Complete): Raise Program_Error if
1768         Null_Task_Id is passed.
1770 2017-09-07  Javier Miranda  <miranda@adacore.com>
1772         * einfo.ads, einfo.adb (Access_Disp_Table_Elab_Flag): New
1773         attribute. Defined for record types and subtypes.
1774         * exp_ch3.ads (Init_Secondary_Tags): Adding new formal
1775         (Init_Tags_List) to facilitate generating separate code in the
1776         IP routine to initialize the object components and for completing
1777         the elaboration of dispatch tables.
1778         * exp_ch3.adb (Build_Init_Procedure): Improve the code
1779         generated in the IP routines by means of keeping separate
1780         the initialization of the object components from the
1781         initialization of its dispatch tables.  (Init_Secondary_Tags):
1782         Adding new formal (Init_Tags_List) and adjusting calls to
1783         Ada.Tags.Set_Dynamic_Offset_To_Top since it has a new formal;
1784         adjusting also calls to Ada.Tags.Register_Interface_Offset
1785         because the type of one of its formals has been changed.
1786         * a-tags.ads, a-tags.adb (Register_Interface_Offset): Profile
1787         modified. Instead of receiving a pointer to an object this
1788         routine receives now a primary tag.
1789         (Set_Dyanic_Offset_To_Top): Profile modified. This routine receives an
1790         additional formal: the tag of the primary dispatch table.
1791         * exp_disp.ads (Elab_Flag_Needed): New subprogram.
1792         * exp_disp.adb (Elab_Flag_Needed): New subprogram.
1793         (Make_Tags): Adding the declaration of the elaboration flag (if needed).
1794         * exp_aggr.adb (Build_Record_Aggr_Code): Adding actual of new
1795         formal in calls to Init_Secondary_Tags.
1797 2017-09-07  Javier Miranda  <miranda@adacore.com>
1799         * ghost.adb (Mark_And_Set_Ghost_Instantiation.Check_Ghost_Actuals): New
1800         subprogram.
1801         * sem_prag.adb (Pragma_Ghost): Add missing support for ghost
1802         applied to generic subprograms.
1804 2017-09-07  Arnaud Charlet  <charlet@adacore.com>
1806         * sem_util.adb (Check_Part_Of_Reference): rename Conc_Typ to Conc_Obj
1807         (because it refers to the anonymous concurrent object, not its type);
1808         fix condition for emitting error message about task/protected type,
1810 2017-09-07  Bob Duff  <duff@adacore.com>
1812         * binde.adb (Debug_Flag_Old): If both -do and -dp
1813         are specified, behave as if just -do was specified, rather than
1814         using a mixture.
1816 2017-09-07  Nicolas Roche  <roche@adacore.com>
1818         * system-vxworks-sparcv9.ads, s-vxwork-m68k.ads, s-vxwork-mips.ads,
1819         system-vxworks-m68k.ads, system-vxworks-mips.ads: Removed.
1821 2017-09-07  Arnaud Charlet  <charlet@adacore.com>
1823         * sem_prag.adb (Find_Role): The Global_Seen flag
1824         is now consulted not only for abstract states and variables,
1825         but for all kinds of items.
1826         (Collect_Subprogram_Inputs_Outputs): Do not process formal
1827         generic parameters, because unlike ordinary formal parameters,
1828         generic formals only act as input/ outputs if they are explicitly
1829         mentioned in a Global contract.
1831 2017-09-07  Yannick Moy  <moy@adacore.com>
1833         * ghost.adb (Check_Ghost_Context): Do not err on ghost code inside
1834         predicate procedure. Check predicate pragma/aspect with Ghost entity.
1835         * exp_ch6.adb, par-ch6.adb, sem_ch13.adb, sem_prag.adb; Minor
1836         reformatting.
1838 2017-09-07  Ed Schonberg  <schonberg@adacore.com>
1840         * sem_aggr.adb: Move New_Copy_Tree_And_Dimensions to sem_dim
1841         (code cleanup);
1842         * sem_ch3.adb (Build_Derived_Record_Type):i Call
1843         Copy_Dimensions_Of_Components after creating the copy of the
1844         record declaration.
1845         * sem_dim.ads, sem_dim.adb (Copy_Dimensions_Of_Components): For a
1846         derived recor type, copy the dikensions if any of each component
1847         of the parent record to the corresponding component declarations
1848         of the derived record. These expressions are used among other
1849         things as default values in aggregates with box associations.
1850         * a-dirval-mingw.adb, g-cgi.adb, gnatcmd.adb, lib-xref.adb,
1851         repinfo.adb, sem_attr.adb, sem_ch10.adb, sem_ch6.adb, sem_prag.adb:
1852         Minor reformatting.
1854 2017-09-07  Arnaud Charlet  <charlet@adacore.com>
1856         * sem_util.adb: Remove extra space after THEN.
1858 2017-09-07  Eric Botcazou  <ebotcazou@adacore.com>
1860         * sem_ch7.adb (Has_Referencer): For a subprogram renaming,
1861         also mark the renamed subprogram as referenced.
1863 2017-09-07  Ed Schonberg  <schonberg@adacore.com>
1865         * par-ch6.adb (P_Subprogram): Improve error message on null
1866         procedure with misplaced aspect specification, which the parser
1867         first attempts to interpret as a malformed expression function.
1869 2017-09-07  Gary Dismukes  <dismukes@adacore.com>
1871         * sem_attr.adb (Analyze_Attribute_Old_Result):
1872         Allow attributes Result and Old in the case of an expression
1873         function.
1875 2017-09-07  Justin Squirek  <squirek@adacore.com>
1877         * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile): Propagate
1878         Volatile to subcomponents.
1880 2017-09-07  Bob Duff  <duff@adacore.com>
1882         * exp_ch7.adb (Find_Last_Init): Check for the
1883         case where a build-in-place function call has been replaced by a
1884         'Reference attribute reference.
1886 2017-09-07  Eric Botcazou  <ebotcazou@adacore.com>
1888         * sem_ch7.adb (Has_Referencer): Recurse on Actions of freeze
1889         nodes.
1891 2017-09-07  Bob Duff  <duff@adacore.com>
1893         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration,
1894         Make_Build_In_Place_Call_In_Anonymous_Context): Do not use the
1895         secondary stack for all functions that return limited tagged
1896         types -- just do it for dispatching calls.  Misc cleanup.
1897         * sem_util.ads, sem_util.adb (Unqual_Conv): New function to
1898         remove qualifications and type conversions. Fix various bugs
1899         where only a single level of qualification or conversion was
1900         removed, so e.g. "T1'(T2'(X))" would incorrectly return "T2'(X)"
1901         instead of "X".
1902         * checks.adb, exp_util.ads, exp_util.adb, sem_res.adb: Misc related
1903         cleanup.
1905 2017-09-07  Ed Schonberg  <schonberg@adacore.com>
1907         * sem_ch6.adb (setr_Actual_Subtypes): Within a predicate function
1908         do not create actual subtypes that may generate further predicate
1909         functions.
1910         * sem_ch13.adb (Build_Predicate_Functions): Indicate that entity
1911         of body is a predicate function as well.
1912         (Resolve_Aspect_Expressions, Resolve_Name): For a component
1913         association, only the expression needs resolution, not the name.
1914         (Resolve_Aspect_Expressions, case Predicates): Construct and
1915         analyze the predicate function declaration in the scope of the
1916         type, before making the type and its discriminants visible.
1918 2017-09-06  Eric Botcazou  <ebotcazou@adacore.com>
1920         * gcc-interface/decl.c (warn_on_field_placement): Issue the warning
1921         only if the record type itself comes from source.
1923 2017-09-06  Gary Dismukes  <dismukes@adacore.com>
1925         * sem_ch5.adb: Minor reformatting and a typo fix
1927 2017-09-06  Arnaud Charlet  <charlet@adacore.com>
1929         * sinput-l.ads: minor remove extra period at the end of comment
1931 2017-09-06  Arnaud Charlet  <charlet@adacore.com>
1933         * sem_prag.adb (Add_Item_To_Name_Buffer): remove support for
1934         E_Discriminant.
1935         (Find_Role): remove support for E_Discriminant.
1937 2017-09-06  Javier Miranda  <miranda@adacore.com>
1939         * exp_ch6.adb (Expand_Simple_Function_Return):
1940         Add missing implicit type conversion to force displacement of the
1941         "this" pointer.
1943 2017-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
1945         * sem_ch3.adb, sem_aux.adb, sem_res.adb: Minor reformatting.
1947 2017-09-06  Yannick Moy  <moy@adacore.com>
1949         * sem_ch12.adb (Analyze_Instance_And_Renamings): Refactor to set
1950         global variable Ignore_SPARK_Mode_Pragmas_In_Instance only once.
1952 2017-09-06  Bob Duff  <duff@adacore.com>
1954         * sem_ch8.adb: Change Assert to be consistent with
1955         other similar ones.
1957 2017-09-06  Bob Duff  <duff@adacore.com>
1959         * binde.adb (Find_Elab_Order): Do not run Elab_Old unless
1960         requested. Previously, the -do switch meant "run Elab_New and
1961         Elab_Old and use the order chosen by Elab_Old, possibly with
1962         debugging printouts comparing the two orders."  Now it means
1963         "do not run Elab_New." This is of use if there are bugs that
1964         cause Elab_New to crash.
1965         (Elab_Position, Num_Chosen): Change type to Nat, to avoid various
1966         type conversions.
1967         * ali.ads (Elab_Position): Change type to Nat, to avoid various
1968         type conversions.
1970 2017-09-06  Arnaud Charlet  <charlet@adacore.com>
1972         * sem_prag.adb (Check_Mode_Restriction_In_Enclosing_Context): Fix
1973         reference to SPARK RM.
1975 2017-09-06  Eric Botcazou  <ebotcazou@adacore.com>
1977         * layout.adb: Use SSU short hand consistently throughout the file.
1979 2017-09-06  Eric Botcazou  <ebotcazou@adacore.com>
1981         * freeze.adb (Freeze_Record_Type)
1982         <Sized_Component_Total_Round_RM_Size>: New local variable to
1983         accumulate the rounded RM_Size of components.  Update it for
1984         every component whose RM_Size is statically known.  Add missing
1985         guard to check that bit packing is really required before issuing
1986         the error about packing.  Swap condition for clarity's sake.
1987         * sem_prag.adb (Usage_Error): Fix reference to SPARK RM in comment.
1989 2017-09-06  Fedor Rybin  <frybin@adacore.com>
1991         * makeutl.adb, makeutl.ads, mlib.adb, mlib.ads, mlib-fil.adb,
1992         mlib-fil.ads, mlib-prj.adb, mlib-prj.ads, mlib-tgt.adb, mlib-tgt.ads,
1993         mlib-tgt-specific.adb, mlib-tgt-specific.ads,
1994         mlib-tgt-specific-aix.adb, mlib-tgt-specific-darwin.adb,
1995         mlib-tgt-specific-hpux.adb, mlib-tgt-specific-linux.adb,
1996         mlib-tgt-specific-mingw.adb, mlib-tgt-specific-solaris.adb,
1997         mlib-tgt-specific-vxworks.adb, mlib-tgt-specific-xi.adb, mlib-utl.adb,
1998         mlib-utl.ads, prj.adb, prj.ads, prj-attr.adb, prj-attr.ads,
1999         prj-attr-pm.adb, prj-attr-pm.ads, prj-com.ads, prj-conf.adb,
2000         prj-conf.ads, prj-dect.adb, prj-dect.ads, prj-env.adb, prj-env.ads,
2001         prj-err.adb, prj-err.ads, prj-ext.adb, prj-ext.ads, prj-makr.adb,
2002         prj-makr.ads, prj-nmsc.adb, prj-nmsc.ads, prj-pars.adb, prj-pars.ads,
2003         prj-part.adb, prj-part.ads, prj-pp.adb, prj-pp.ads, prj-proc.adb,
2004         prj-proc.ads, prj-strt.adb, prj-strt.ads, prj-tree.adb, prj-tree.ads,
2005         prj-util.adb, prj-util.ads, sinput-p.adb, sinput-p.ads: Remove obsolete
2006         project manager sources.
2008 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
2010         * sem_ch5.adb (Analyze_Assigment): If the left-hand side is an
2011         entity of a mutable type and the right-hand side is a conditional
2012         expression, resolve the alternatives of the conditional using
2013         the base type of the target entity, because the alternatives
2014         may have distinct subtypes. This is particularly relevant if
2015         the alternatives are aggregates.
2017 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
2019         * checks.adb (Apply_Predicate_Check): If the expression is an
2020         aggregate that is the RHS of an assignment, apply the check to
2021         the LHS after the assignment, rather than to the aggregate. This
2022         is more efficient than creating a temporary for the aggregate,
2023         and prevents back-end crashes when the aggregate includes a
2024         dynamic "others' association.
2026 2017-09-06  Yannick Moy  <moy@adacore.com>
2028         * sem_ch12.adb (Analyze_Instance_And_Renamings):
2029         Set variable to ignore SPARK_Mode in instance before the analysis
2030         of the generated package declaration.
2032 2017-09-06  Yannick Moy  <moy@adacore.com>
2034         * sem_res.adb (Resolve_Call): Do not issue a
2035         message for calls inside expression function, unless body was
2036         seen and is candidate for inlining.
2038 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
2040         * sem_aux.adb (Is_Generic_Formal): Handle properly formal packages.
2041         * sem_ch3.adb (Analyze_Declarations): In a generic subprogram
2042         body. do not freeze the formals of the generic unit.
2044 2017-09-06  Gary Dismukes  <dismukes@adacore.com>
2046         * errout.adb (Error_Msg): Separate the
2047         treatment for warning vs. style messages in inlinings and
2048         instantiations. Prevents blowups on calls to Warn_Insertion for
2049         style messages, which should not be called in that case because
2050         Warning_Msg_Char is not set.
2052 2017-09-06  Justin Squirek  <squirek@adacore.com>
2054         * sem_prag.adb (Check_VFA_Conflicts): Created
2055         to group all Volatile_Full_Access checks relating to other
2056         representation pragmas (Mark_Component_Or_Object): Created
2057         to centeralize the flagging of attributes for the record type
2058         component case, a pragma applied individually to a component, and
2059         the object case.
2060         (Process_Atomic_Independent_Shared_Volatile):
2061         Add propagation of certain pragmas to record components and move
2062         evaluation of VFA checks
2064 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
2066         * sem_prag.adb (Check_Postcondition_Use_In_Inlined_Subprogram):
2067         Do not warn on conditions that are not obeyed for Inline_Always
2068         subprograms, when assertions are not enabled.
2070 2017-09-06  Arnaud Charlet  <charlet@adacore.com>
2072         * sem_util.adb (Unique_Entity): For abstract states return their
2073         non-limited view.
2075 2017-09-06  Bob Duff  <duff@adacore.com>
2077         * sem_ch12.adb (Copy_Generic_Node): When we copy a node
2078         that is a proper body corresponding to a stub, we defer the
2079         adjustment of the sloc until after the correct adjustment has
2080         been computed. Otherwise, Adjust_Instantiation_Sloc will ignore
2081         the adjustment, because it will be outside the range in (the old,
2082         incorrect) S_Adjustment.
2083         * inline.adb: Use named notation for readability and uniformity.
2084         * sinput-l.adb: Minor improvements to debugging output printed
2085         for Debug_Flag_L.
2086         * sinput-l.ads (Create_Instantiation_Source): Minor comment
2087         correction.
2089 2017-09-06  Vincent Celier  <celier@adacore.com>
2091         * make.adb: Do not invoke gprbuild for -bargs -P.
2093 2017-09-06  Sylvain Dailler  <dailler@adacore.com>
2095         * sem_eval.adb (Compile_Time_Known_Value_Or_Aggr): Adding a
2096         case when Op is of kind N_Qualified_Expression. In this case,
2097         the function is called recursively on the subexpression like in
2098         other cases.
2099         * make.adb: Minor reformatting
2101 2017-09-06  Justin Squirek  <squirek@adacore.com>
2103         * einfo.adb (Set_Linker_Section_Pragma): Modify
2104         Set_Linker_Section_Pragma to be consistant with the "getter"
2105         Linker_Section_Pragma.
2106         * exp_ch5.adb (Expand_Formal_Container_Loop): Add proper error
2107         checking for container loops so that the index cursor is not
2108         directly changable by the user with the use of E_Loop_Parameter.
2109         * sem_ch5.adb (Analyze_Block_Statement): Revert previous change.
2110         * sem_warn.adb (Check_References): Revert previous change.
2112 2017-09-06  Bob Duff  <duff@adacore.com>
2114         * exp_util.adb (Is_Displace_Call): Make sure it works for indirect
2115         calls and the like.
2117 2017-09-06  Yannick Moy  <moy@adacore.com>
2119         * sem_prag.adb (Analyze_Depends_Global): Reinforce test on object
2120         declarations to only consider valid uses of Global/Depends those on
2121         single concurrent objects.
2123 2017-09-06  Eric Botcazou  <ebotcazou@adacore.com>
2125         * sem_ch13.adb (Check_Record_Representation_Clause): Give an
2126         error as soon as one of the specified components overlaps the
2127         parent field.
2129 2017-09-06  Arnaud Charlet  <charlet@adacore.com>
2131         * sem_prag.ads: minor fix typo in comment.
2133 2017-09-06  Justin Squirek  <squirek@adacore.com>
2135         * sem_ch5.adb (Analyze_Block_Statement): Verify a block comes
2136         from source before checking source references.
2137         * sem_warn.adb (Check_References): Add check for internal block
2138         before recursing.
2140 2017-09-06  Vincent Celier  <celier@adacore.com>
2142         * make.adb, makeusg.adb, switch-m.adb, switch-m.ads, make_util.adb,
2143         make_util.ads, sinput.adb, sinput.ads, clean.adb, gnatls.adb,
2144         gnatname.adb: Remove the Project Manager from the GNAT tools.
2145         * gcc-interface/Makefile.in: ditto.
2147 2017-09-06  Bob Duff  <duff@adacore.com>
2149         * sem_util.ads: Minor comment fix.
2151 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
2153         * sem_ch12.adb (Analyze_Associations, case of Formal_Package):
2154         Generate a freeze node for the actual of a formal package, if
2155         the actual is declared in the same unit and has a corresponding
2156         body, to prevent the current instance from being frozen before
2157         the actual is.
2159 2017-09-06  Eric Botcazou  <ebotcazou@adacore.com>
2161         * sem_ch7.adb (Entity_Table_Size): Change to nearest prime number.
2163 2017-09-06  Yannick Moy  <moy@adacore.com>
2165         * sem_warn.adb: Minor refactoring.
2167 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
2169         * einfo.ads, einfo.adb (Get_Classwwide_Pragma): New utility,
2170         to retrieve the inherited classwide precondition/postcondition
2171         of a subprogram.
2172         * freeze.adb (Freeze_Entity): Use Get_Classwide_Pragma when
2173         freezing a subprogram, to complete the generation of the
2174         corresponding checking code.
2176 2017-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
2178         * exp_util.adb (Is_Controlled_Indexing): New routine.
2179         (Is_Displace_Call): Use routine Strip to remove indirections.
2180         (Is_Displacement_Of_Object_Or_Function_Result): Code clean up. Add a
2181         missing case of controlled generalized indexing.
2182         (Is_Source_Object): Use routine Strip to remove indirections.
2183         (Strip): New routine.
2185 2017-09-06  Bob Duff  <duff@adacore.com>
2187         * sysdep.c (__gnat_has_cap_sys_nice): If HAVE_CAPABILITY is defined,
2188         we include the proper header. Otherwise, we just declare the necessary
2189         things from the capabilities library. This is so we can build on
2190         machines without that library, while still enabling that library.
2191         At run time, we're using weak symbols, so __gnat_has_cap_sys_nice will
2192         simply return 0 if the library is not present, or not included
2193         in the link.
2195 2017-09-06  Pierre-Marie de Rodat  <derodat@adacore.com>
2197         * exp_dbug.adb (Debug_Renaming_Declaration): Do not create an encoding
2198         for renamings that involve function calls in prefix form.
2200 2017-09-06  Bob Duff  <duff@adacore.com>
2202         * sem_ch3.adb (Analyze_Subtype_Declaration):
2203         Set Has_Delayed_Freeze on a subtype of an incomplete type.
2205 2017-09-06  Pierre-Marie de Rodat  <derodat@adacore.com>
2207         * par_sco.adb (Extend_Statement_Sequence): When the accept statement
2208         has no parameter specification and no entry index, use the entry name
2209         as the end of the generated SCO statement.
2211 2017-09-06  Steve Baird  <baird@adacore.com>
2213         * exp_util.adb (Side_Effect_Free): For CodePeer (only) treat
2214         uses of 'Image and related attributes as having side effects in
2215         order to avoid replicating such uses.
2216         * pprint.ads (Expression_Image) Add new generic formal flag
2217         Hide_Temp_Derefs.  The flag defaults to False; CodePeer will
2218         (eventually) override the default.
2219         * pprint.adb (Expression_Image) If the new flag is set, then
2220         suppress the ".all" suffix when displaying a dereference whose
2221         prefix is a use of a value-capturing compiler temp of the sort
2222         generated by Expr_Util.Remove_Side_Effects .
2223         * exp_attr.adb, g-catiio.adb, inline.adb, sem_attr.adb, sem_ch13.adb,
2224         sem_ch7.adb, sem_dim.adb, sem_util.adb, sem_util.ads, sem_warn.adb:
2225         Minor reformatting.
2226         * inline.adb: Minor wording change.
2228 2017-09-06  Eric Botcazou  <ebotcazou@adacore.com>
2230         * sem_ch7.adb: Update comment.
2232 2017-09-06  Yannick Moy  <moy@adacore.com>
2234         * einfo.adb, einfo.ads (Is_Subprogram_Or_Entry): New predicate.
2235         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Use new function.
2236         * sem_util.adb, sem_util.ads (Within_Protected_Type): Renaming
2237         with slight modification from Is_Subp_Or_Entry_Inside_Protected,
2238         so that applies to any entity.
2240 2017-09-06  Yannick Moy  <moy@adacore.com>
2242         * sem_ch3.adb (Derived_Type_Declaration): Use
2243         Incomplete_Or_Partial_View rather than local Find_Partial_View.
2245 2017-09-06  Javier Miranda  <miranda@adacore.com>
2247         * g-catiio.ads, g-catiio.adb (Value): Extended to parse an UTC time
2248         following ISO-8861.
2250 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
2252         * sem_dim.adb (Analyze_Dimension): In an instance, a type
2253         conversion takes its dimensions from the expression, not from
2254         the context type.
2255         (Dimensions_Of_Operand): Ditto.
2257 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
2259         * exp_ch6.adb (Expand_Call_Helper): Do not optimize calls to
2260         null procedures when GNAT coverage is used, so that their (empty)
2261         bodies are properly covered.
2263 2017-09-06  Bob Duff  <duff@adacore.com>
2265         * sem_ch13.adb (Resolve_Aspect_Expressions): If
2266         the entity is a type with discriminants, make the discriminants
2267         directly visible in aspect clauses.
2269 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
2271         * sem_res.adb (Resolve_Arithmentic_Op): If both operands are
2272         Universal_Real and the context is a floating-point type, resolve
2273         both operands to the target type.
2275 2017-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
2277         * a-comlin.adb, exp_aggr.adb, exp_ch6.adb, frontend.adb, gnatbind.adb,
2278         sem_ch3.adb, sem_util.adb: Minor reformatting.
2280 2017-09-06  Yannick Moy  <moy@adacore.com>
2282         * freeze.adb (Check_Inherited_Conditions): Rewriting
2283         of inherited preconditions and postconditions should only occur
2284         in GNATprove mode, that is, when GNATprove_Mode is True, not to
2285         be confused with SPARK_Mode being On.
2287 2017-09-06  Yannick Moy  <moy@adacore.com>
2289         * sem_warn.adb (Check_References): Take into
2290         account possibility of attribute reference as original node.
2292 2017-09-06  Yannick Moy  <moy@adacore.com>
2294         * exp_attr.adb (Expand_N_Attribute_Reference): Protect against invalid
2295         use of attribute.
2297 2017-09-06  Eric Botcazou  <ebotcazou@adacore.com>
2299         * inline.adb (Split_Unconstrained_Function): Also set Is_Inlined
2300         on the procedure created to encapsulate the body.
2301         * sem_ch7.adb: Add with clause for GNAT.HTable.
2302         (Entity_Table_Size): New constant.
2303         (Entity_Hash): New function.
2304         (Subprogram_Table): New instantiation of GNAT.Htable.Simple_HTable.
2305         (Is_Subprogram_Ref): Rename into...
2306         (Scan_Subprogram_Ref): ...this. Record references to subprograms in
2307         the table instead of bailing out on them. Scan the value of constants
2308         if it is not known at compile time.
2309         (Contains_Subprograms_Refs): Rename into...
2310         (Scan_Subprogram_Refs): ...this.
2311         (Has_Referencer): Scan the body of all inlined subprograms. Reset the
2312         Is_Public flag on subprograms if they are not actually referenced.
2313         (Hide_Public_Entities): Beef up comment on the algorithm.
2314         Reset the table of subprograms on entry.
2316 2017-09-06  Yannick Moy  <moy@adacore.com>
2318         * inline.adb: Add comments to Can_Be_Inlined_In_GNATprove_Mode.
2320 2017-09-06  Javier Miranda  <miranda@adacore.com>
2322         * exp_aggr.adb (Component_Not_OK_For_Backend): The C backend
2323         cannot handle a type conversion of an array as an aggregate
2324         component.
2326 2017-09-06  Bob Duff  <duff@adacore.com>
2328         * g-comlin.adb (Try_Help): Remove ".exe" so we
2329         get the same results on windows and unix.
2331 2017-09-06  Justin Squirek  <squirek@adacore.com>
2333         * exp_imgv.adb (Expand_Image_Attribute),
2334         (Expand_Wide_Image_Attribute), (Expand_Wide_Wide_Image_Attribute):
2335         Added case to handle new-style 'Image expansion
2336         (Rewrite_Object_Image): Moved from exp_attr.adb
2337         * exp_attr.adb (Expand_N_Attribute_Reference): Modified Image
2338         attribute cases so that the relevant subprograms in exp_imgv.adb
2339         handle all expansion.
2340         (Rewrite_Object_Reference_Image): Moved to exp_imgv.adb
2341         * sem_attr.adb (Analyze_Attribute): Modified Image attribute
2342         cases to call common function Analyze_Image_Attribute.
2343         (Analyze_Image_Attribute): Created as a common path for all
2344         image attributes (Check_Object_Reference_Image): Removed
2345         * sem_util.ads, sem_util.adb (Is_Image_Applied_To_Object):
2346         Removed and refactored into Is_Object_Image (Is_Object_Image):
2347         Created as a replacement for Is_Image_Applied_To_Object
2349 2017-09-06  Yannick Moy  <moy@adacore.com>
2351         * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add continuation
2352         message for missing input.
2354 2017-09-06  Yannick Moy  <moy@adacore.com>
2356         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Prevent inlining
2357         of protected subprograms and entries.
2358         * sem_util.adb, sem_util.ads (Is_Subp_Or_Entry_Inside_Protected):
2359         New function to detect when a subprogram of entry is defined
2360         inside a protected object.
2362 2017-09-06  Bob Duff  <duff@adacore.com>
2364         * sysdep.c (__gnat_has_cap_sys_nice): New function to determine
2365         whether the current process has the CAP_SYS_NICE capability.
2366         * s-taprop-linux.adb (Get_Ceiling_Support): Update this to allow
2367         ceiling priorities if the current process has the CAP_SYS_NICE
2368         capability.
2370 2017-09-06  Bob Duff  <duff@adacore.com>
2372         * a-comlin.ads, a-comlin.adb (Argument): Move the constraint
2373         check back to the body, because SPARK is not yet ready for
2374         "or else raise Constraint_Error".
2376 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
2378         * exp_ch6.adb (Expand_Call_Helper): Replace call to null
2379         procedure by a single null statement, after evaluating the
2380         actuals that require it.
2382 2017-09-06  Javier Miranda  <miranda@adacore.com>
2384         * exp_aggr.adb (Backend_Processing_Possible.Component_Check):
2385         Generating C code improve the code that checks the use of nested
2386         aggregates to initialize object declarations.
2388 2017-09-06  Yannick Moy  <moy@adacore.com>
2390         * sem_ch3.adb (Derived_Type_Declaration): Detect
2391         violations of new rule SPARK RM 3.4(1).  Also refactor existing
2392         check to use the new function Find_Partial_View.
2394 2017-09-06  Vincent Celier  <celier@adacore.com>
2396         * gnatcmd.adb: gnat ls -V -P... invokes gprls -V -P...  The code
2397         from the Prj hierarchy has been removed from the GNAT driver.
2399 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
2401         * sem_type.adb (Interface_Present_In_Ancestor): Within an
2402         expression function, or within a spec expression (default value,
2403         etc) a reference to an incomplete type is legal: legality of
2404         the operation will be checked when some related entity (type,
2405         object or subprogram) is frozen.
2407 2017-09-06  Gary Dismukes  <dismukes@adacore.com>
2409         * exp_ch5.adb, s-diinio.ads, sem_ch4.adb, s-diflio.ads: Minor spelling
2410         adjustments and a typo fix.
2412 2017-09-06  Yannick Moy  <moy@adacore.com>
2414         * sem_res.adb (Resolve_Call): Do not issue info
2415         message about inlining of calls to functions in assertions,
2416         for functions whose body has not been seen yet.
2418 2017-09-06  Bob Duff  <duff@adacore.com>
2420         * a-comlin.ads, a-comlin.adb (Argument): Simplify the code, now that
2421         we can use modern Ada in this package.
2422         * s-resfil.ads, s-resfil.adb, a-clrefi.ads, a-clrefi.adb:
2423         Move Ada.Command_Line.Response_File to System.Response_File,
2424         and make Ada.Command_Line.Response_File into a rename of
2425         System.Response_File. This is to avoid having gnatbind depend
2426         Ada.Command_Line, which would damage the bootstrap process now
2427         that Ada.Command_Line contains modern Ada (the raise expression).
2428         * gnatbind.adb: Avoid dependence on
2429         Ada.Command_Line. Depend on System.Response_File instead
2430         of Ada.Command_Line.Response_File. Change one call to
2431         Ada.Command_Line.Command_Name to use Fill_Arg.  Change one call
2432         to Ada.Command_Line.Argument_Count to use Arg_Count.
2433         * gcc-interface/Make-lang.in, Makefile.rtl: Take note of the new files.
2435 2017-09-06  Bob Duff  <duff@adacore.com>
2437         * frontend.adb (Frontend): Skip -gnatec=gnat.adc
2438         switch, because we've already read gnat.adc by default.
2440 2017-09-06  Bob Duff  <duff@adacore.com>
2442         * exp_ch5.adb (Get_Default_Iterator): Replace
2443         "Assert(False)" with "return Iter", because if an iterable
2444         type is derived from a noniterable one, then we won't find an
2445         overriding or inherited default iterator.
2447 2017-09-06  Yannick Moy  <moy@adacore.com>
2449         * sem_warn.adb (Warn_On_Suspicious_Index): Improve warning when the
2450         literal index used to access a string is null or negative.
2452 2017-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
2454         * einfo.adb (Status_Flag_Or_Transient_Decl): The attribute is now
2455         allowed on loop parameters.
2456         (Set_Status_Flag_Or_Transient_Decl): The attribute is now allowed
2457         on loop parameters.
2458         (Write_Field15_Name): Update the output for
2459         Status_Flag_Or_Transient_Decl.
2460         * einfo.ads: Attribute Status_Flag_Or_Transient_Decl now applies
2461         to loop parameters. Update the documentation of the attribute
2462         and the E_Loop_Parameter entity.
2463         * exp_ch7.adb (Process_Declarations): Remove the bogus guard
2464         which assumes that cursors can never be controlled.
2465         * exp_util.adb (Requires_Cleanup_Actions): Remove the bogus
2466         guard which assumes that cursors can never be controlled.
2468 2017-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
2470         * exp_attr.adb, sem_util.adb, sem_attr.adb, sem_ch6.adb, sem_ch8.adb,
2471         sem_warn.adb: Minor reformatting.
2473 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
2475         * sem_warn.adb (Warn_On_Overlapping_Actuals): Refine previous
2476         fix and preserve older GNAT warning on overlapping actuals that
2477         are not elementary types.
2479 2017-09-06  Justin Squirek  <squirek@adacore.com>
2481         * sem_attr.adb: Comment correction.
2483 2017-09-06  Gary Dismukes  <dismukes@adacore.com>
2485         * sem_util.adb: Minor reformatting.
2487 2017-09-06  Yannick Moy  <moy@adacore.com>
2489         * a-comlin.ads (Argument): Add precondition for analysis.
2491 2017-09-06  Yannick Moy  <moy@adacore.com>
2493         * sem_res.adb (Resolve): Update message for function call as statement.
2495 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
2497         * sem_ch6.adb (Check_Returns): Clean up warnings coming from
2498         generated bodies for renamings that are completions, when renamed
2499         procedure is No_Return.
2500         * sem_ch8.adb (Analyze_Subprogram_Renaming): Implement legality
2501         rule in 6.5.1 (7/2): if a renaming is a completion of a subprogram
2502         with No_Return, the renamed entity must be No_Return as well.
2504 2017-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
2506         * exp_ch5.adb, freeze.adb, exp_ch4.adb, exp_ch6.adb, lib-xref.adb:
2507         Minor reformatting.
2509 2017-09-06  Justin Squirek  <squirek@adacore.com>
2511         * exp_attr.adb (Expand_N_Attribute_Reference): Modified Image
2512         attribute cases (Rewrite_Object_Reference_Image): Created to
2513         aid the rewriting of new-style 'Image attributes.
2514         * sem_attr.adb (Analyze_Attribute): Modified Image attribute cases
2515         (Check_Object_Reference_Image): Created to handle verification of
2516         'Image with object-references as prefixes.
2517         * sem_util.ads, sem_util.adb (Is_Image_Applied_To_Object):
2518         Create predicate to identify cases where an 'Image attribute's
2519         prefix applies to an object reference.
2521 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
2523         * freeze.adb (Freeze_Entity): Do not generate a freeze
2524         node for a generic unit, even if it includes delayed aspect
2525         specifications. Freeze nodes for generic entities must never
2526         appear in the tree that reaches the back-end of the compiler.
2528 2017-09-06  Yannick Moy  <moy@adacore.com>
2530         * treepr.adb (Print_Entity_Info): Do not print empty Elist.
2532 2017-09-06  Yannick Moy  <moy@adacore.com>
2534         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do not consider calls
2535         to subprograms in other units as possibly inlined.
2537 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
2539         * freeze.adb (Freeze_Entity): For a derived type that has no
2540         explicit delayed aspects but may inherit delayed aspects from its
2541         parent type, analyze aspect at freeze point for proper capture
2542         of an inherited aspect.
2544 2017-09-06  Arnaud Charlet  <charlet@adacore.com>
2546         * lib-xref.adb (Get_Through_Renamings): Get through subprogram
2547         renamings; also, avoid repeated calls to Renamed_Object when getting
2548         through object renamings.
2550 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
2552         * sem_ch3.adb (Array_Type_Declaration): Handle properly an
2553         array type declaration in a private part, when an index is a
2554         subtype indication of a discrete type with a private partial view.
2556 2017-09-06  Javier Miranda  <miranda@adacore.com>
2558         * exp_ch4.adb (Expand_Modular_Op): Force generating
2559         temporary to improve the generated code.
2561 2017-09-06  Tristan Gingold  <gingold@adacore.com>
2563         * s-fatgen.adb: Minor typo fix in comment.
2565 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
2567         * exp_ch5.adb (Make_Field_Assign): If the type
2568         of the right-hand side has stored constraint, use its values
2569         (except for those that are renamings of parent discriminants)
2570         to produce additional assignments for the discriminants of the
2571         left-hand side, which are invisible in the righ-hand side and
2572         not retrievable as selected components.
2574 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
2576         * sem_util.adb (Needs_One_Formal): The first formal of such a
2577         function must be a controlling formal, so that Obj.F (X, Y)
2578         can have the interpretation F(Obj)(X, Y).
2579         * sem_util.ads: Clarify documentation.
2581 2017-09-06  Eric Botcazou  <ebotcazou@adacore.com>
2583         * table.ads, table.adb: Restore original implementation.
2584         * namet.h (Names_Ptr): Adjust back.
2585         (Name_Chars_Ptr): Likewise.
2586         * uintp.h (Uints_Ptr): Likewise.
2587         (Udigits_Ptr): Likewise.
2588         * g-table.ads: Remove pragma Compiler_Unit_Warning.
2589         * par_sco.adb: Do not with GNAT.Table and use Table consistently.
2590         * scos.ads: Replace GNAT.Table with Table and adjust instantiations.
2591         * spark_xrefs.ads: Likewise.
2592         * scos.h: Undo latest changes.
2594 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
2596         * sem_ch12.adb (Analyze_Subprogram_Instantiation): Propagate
2597         No_Return flag to instance if pragma applies to generic unit. This
2598         must be done explicitly because the pragma does not appear
2599         directly in the generic declaration (unlike the corresponding
2600         aspect specification).
2602 2017-09-06  Eric Botcazou  <ebotcazou@adacore.com>
2604         * sem_ch7.adb (Has_Referencer): Move up and expand comment
2605         explaining the test used to detect inlining.  Use same test
2606         in second occurrence.
2607         (Analyze_Package_Body_Helper): Minor formatting fixes.
2609 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
2611         * exp_ch4.adb (Handle_Changed_Representation): For an untagged
2612         derived type with a mixture of renamed and constrained parent
2613         discriminants, the constraint for the target must obtain the
2614         discriminant values from both the operand and from the stored
2615         constraint for it, given that the constrained discriminants are
2616         not visible in the object.
2617         * exp_ch5.adb (Make_Field_Assign): The type of the right-hand
2618         side may be derived from that of the left-hand side (as in the
2619         case of an assignment with a change of representation) so the
2620         discriminant to be used in the retrieval of the value of the
2621         component must be the entity in the type of the right-hand side.
2623 2017-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
2625         * sem_ch3.adb, sem_ch7.adb, sem_util.adb, g-debpoo.adb, sem_ch4.adb,
2626         sem_ch6.adb, sem_ch8.adb: Minor reformatting.
2627         * exp_util.adb (Is_Source_Object): Account for
2628         the cases where the source object may appear as a dereference
2629         or within a type conversion.
2630         * exp_ch6.adb: Fix missing space in error message.
2632 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
2634         * sem_prag.adb: Update description of Eliminate.
2636 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
2638         * sem_attr.adb (Analyze_Attribute, case 'Loop_Entry): Handle
2639         properly an attribute reference 'Loop_Entry that appears in the
2640         list of indices of an indexed expression, to prevent an infinite
2641         loop in the compiler.
2643 2017-09-06  Bob Duff  <duff@adacore.com>
2645         * s-fileio.adb (Name): Do not raise Use_Error for temp files.
2647 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
2649         * sem_ch4.adb (Analyze_Set_Membership):  If an alternative
2650         in a set membership is an overloaded enumeration literal, and
2651         the type of the alternative is resolved from a previous one,
2652         replace the entity of the alternative as well as the type,
2653         to prevent inconsistencies between the entity and the type.
2655 2017-09-06  Eric Botcazou  <ebotcazou@adacore.com>
2657         * ali.ads (ALIs_Record): Add No_Component_Reordering component.
2658         (No_Component_Reordering_Specified): New switch.
2659         * ali.adb (Initialize_ALI): Set No_Component_Reordering_Specified.
2660         (Scan_ALI): Set No_Component_Reordering and deal with NC marker.
2661         * bcheck.adb (Check_Consistent_No_Component_Reordering):
2662         New check.
2663         (Check_Configuration_Consistency): Invoke it.
2664         * debug.adb (d.r): Toggle the effect of the switch.
2665         (d.v): Change to no-op.
2666         * einfo.ads (Has_Complex_Representation):
2667         Restrict to record types.
2668         (No_Reordering): New alias for Flag239.
2669         (OK_To_Reorder_Components): Delete.
2670         (No_Reordering): Declare.
2671         (Set_No_Reordering): Likewise.
2672         (OK_To_Reorder_Components): Delete.
2673         (Set_OK_To_Reorder_Components): Likewise.
2674         * einfo.adb (Has_Complex_Representation): Expect record types.
2675         (No_Reordering): New function.
2676         (OK_To_Reorder_Components): Delete.
2677         (Set_Has_Complex_Representation): Expect base record types.
2678         (Set_No_Reordering): New procedure.
2679         (Set_OK_To_Reorder_Components): Delete.
2680         (Write_Entity_Flags): Adjust to above change.
2681         * fe.h (Debug_Flag_Dot_R): New macro and declaration.
2682         * freeze.adb (Freeze_Record_Type): Remove conditional code setting
2683         OK_To_Reorder_Components on record types with convention Ada.
2684         * lib-writ.adb (Write_ALI): Deal with NC marker.
2685         * opt.ads (No_Component_Reordering): New flag.
2686         (No_Component_Reordering_Config): Likewise.
2687         (Config_Switches_Type): Add No_Component_Reordering component.
2688         * opt.adb (Register_Opt_Config_Switches): Copy
2689         No_Component_Reordering onto No_Component_Reordering_Config.
2690         (Restore_Opt_Config_Switches): Restore No_Component_Reordering.
2691         (Save_Opt_Config_Switches): Save No_Component_Reordering.
2692         (Set_Opt_Config_Switches): Set No_Component_Reordering.
2693         * par-prag.adb (Prag): Deal with Pragma_No_Component_Reordering.
2694         * sem_ch3.adb (Analyze_Private_Extension_Declaration): Also set the
2695         No_Reordering flag from the default.
2696         (Build_Derived_Private_Type): Likewise.
2697         (Build_Derived_Record_Type): Likewise.  Then inherit it
2698         for untagged types and clean up handling of similar flags.
2699         (Record_Type_Declaration): Likewise.
2700         * sem_ch13.adb (Same_Representation): Deal with No_Reordering and
2701         remove redundant test on Is_Tagged_Type.
2702         * sem_prag.adb (Analyze_Pragma): Handle No_Component_Reordering.
2703         (Sig_Flags): Likewise.
2704         * snames.ads-tmpl (Name_No_Component_Reordering): New name.
2705         (Pragma_Id): Add Pragma_No_Component_Reordering value.
2706         * warnsw.adb (Set_GNAT_Mode_Warnings): Enable -gnatw.q as well.
2707         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>:
2708         Copy the layout of the parent type only if the No_Reordering
2709         settings match.
2710         (components_to_record): Reorder record types with
2711         convention Ada by default unless No_Reordering is set or -gnatd.r
2712         is specified and do not warn if No_Reordering is set in GNAT mode.
2714 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
2716         * sem_util.ads, sem_util.adb (Check_Previous_Null_Procedure):
2717         new predicate to reject declarations that can be completions,
2718         when there is a visible prior homograph that is a null procedure.
2719         * sem_ch6.adb (Analyze_Null_Procedure): use it.
2720         * sem_ch8.adb (Analyze_Subprogram_Renaming): ditto.
2722 2017-09-06  Thomas Quinot  <quinot@adacore.com>
2724         * s-regpat.adb (Compile.Parse_Literal): Fix handling of literal
2725         run of 253 characters or more.
2727 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
2729         * einfo.adb (Designated_Type): Use Is_Incomplete_Type to handle
2730         properly incomplete subtypes that may be created by explicit or
2731         implicit declarations.
2732         (Is_Base_Type): Take E_Incomplete_Subtype into account.
2733         (Subtype_Kind): Ditto.
2734         * sem_ch3.adb (Build_Discriminated_Subtype): Set properly the
2735         Ekind of a subtype of a discriminated incomplete type.
2736         (Fixup_Bad_Constraint): Use Subtype_Kind in all cases, including
2737         incomplete types, to preserve error reporting.
2738         (Process_Incomplete_Dependents): Do not create a subtype
2739         declaration for an incomplete subtype that is created internally.
2740         * sem_ch7.adb (Analyze_Package_Specification): Handle properly
2741         incomplete subtypes that do not require a completion, either
2742         because they are limited views, of they are generic actuals.
2744 2017-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
2746         * checks.adb (Insert_Valid_Check): Remove the
2747         suspicious manipulation of the Do_Range_Check flag as ths is
2748         no linger needed. Suppress validity check when analysing the
2749         validation variable.
2751 2017-09-06  Philippe Gil  <gil@adacore.com>
2753         * g-debpoo.adb: adapt GNAT.Debug_Pools to allow safe thread
2754         GNATCOLL.Memory
2756 2017-09-06  Bob Duff  <duff@adacore.com>
2758         * sem_elim.adb: Minor comment fix.
2760 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
2762         * sem_util.adb (Is_Object_Reference): A function call is an
2763         object reference, and thus attribute references for attributes
2764         that are functions (such as Pred and Succ) as well as predefined
2765         operators are legal in contexts that require an object, such as
2766         the prefix of attribute Img and the Ada2020 version of 'Image.
2768 2017-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
2770         * exp_util.adb, einfo.adb, sem_attr.adb, exp_ch4.adb, gnatls.adb,
2771         exp_ch3.adb, xoscons.adb: Minor reformatting.
2773 2017-09-06  Raphael Amiard  <amiard@adacore.com>
2775         * a-chtgop.ads, a-chtgop.adb: Add versions of First and Next with
2776         Position parameter. If supplied, use it to provide efficient iteration.
2777         * a-cohase.ads, a-cohase.adb, a-cihama.ads, a-cihama.adb,
2778         a-cohama.ads, a-cohama.adb: Add/Use Position to provide efficient
2779         iteration.
2781 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
2783         * exp_util.adb (Build_Allocate_Deallocate_Proc): If the
2784         designated type is class-wide and the expression is an unchecked
2785         conversion, preserve the conversion when checking the tag of the
2786         designated object, to prevent spurious semantic errors when the
2787         expression in the conversion has an untagged type (for example
2788         an address attribute).
2790 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
2792         * sem_res.adb (Resolve_Entry_Call): Check whether a protected
2793         operation is subject to a pragma Eliminate.
2795 2017-09-06  Ed Schonberg  <schonberg@adacore.com>
2797         * sem_elim.ads, exp_ch4.adb: Minor reformatting.
2799 2017-09-06  Eric Botcazou  <ebotcazou@adacore.com>
2801         * fe.h (Eliminate_Error_Msg): Remove.
2803 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
2805         * gcc-interface/utils.c (make_packable_type): Update call to
2806         mode_for_size_tree.
2808 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
2810         * gcc-interface/utils2.c (build_load_modify_store):
2811         Use int_mode_for_size.
2813 2017-09-05  Eric Botcazou  <ebotcazou@adacore.com>
2815         PR ada/62235
2816         * gcc-interface/decl.c (gnat_to_gnu_entity): Skip regular processing
2817         for Itypes that are E_Record_Subtype with a cloned subtype.
2818         <E_Record_Subtype>: Use the DECL of the cloned type directly, if any.
2820 2017-09-05  Eric Botcazou  <ebotcazou@adacore.com>
2822         * gcc-interface/trans.c (convert_with_check): Use a custom base type
2823         if the base type of the expression has a different machine mode.
2824         Rename a couple of parameters and local variable.
2826 2017-09-05  Eric Botcazou  <ebotcazou@adacore.com>
2828         * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Address>: Do not strip
2829         conversions around prefixes that are not references.
2831 2017-09-05  Eric Botcazou  <ebotcazou@adacore.com>
2833         * gcc-interface/utils.c (unchecked_convert): When the result type is a
2834         non-biased integral type with size 0, set the result to 0 directly.
2836 2017-09-05  Eric Botcazou  <ebotcazou@adacore.com>
2838         * gcc-interface/gigi.h (renaming_from_generic_instantiation_p): Turn to
2839         (renaming_from_instantiation_p): ...this.
2840         * gcc-interface/decl.c (gnat_to_gnu_entity): Use inline predicate
2841         instead of explicit tests on kind of entities.  Adjust for renaming.
2842         (gnat_to_gnu_profile_type): Likewise.
2843         (gnat_to_gnu_subprog_type): Likewise.
2844         * gcc-interface/trans.c (Identifier_to_gnu): Likewise.
2845         (Case_Statement_to_gnu): Likewise.
2846         (gnat_to_gnu): Likewise.
2847         (process_freeze_entity): Likewise.
2848         (process_type): Likewise.
2849         (add_stmt_with_node): Adjust for renaming.
2850         * gcc-interface/utils.c (gnat_pushdecl): Adjust for renaming.
2851         (renaming_from_generic_instantiation_p): Rename to...
2852         (renaming_from_instantiation_p): ...this.  Use inline predicate.
2853         (pad_type_hasher::keep_cache_entry): Fold.
2855 2017-09-05  Eric Botcazou  <ebotcazou@adacore.com>
2857         * gcc-interface/trans.c (adjust_for_implicit_deref): New function.
2858         (gnat_to_gnu) <N_Explicit_Dereference>: Translate result type first.
2859         (N_Indexed_Component): Invoke adjust_for_implicit_deref on the prefix.
2860         (N_Slice): Likewise.
2861         (N_Selected_Component): Likewise.  Do not try again to translate it.
2862         (N_Free_Statement): Invoke adjust_for_implicit_deref on the expression.
2864 2017-09-05  Eric Botcazou  <ebotcazou@adacore.com>
2866         * repinfo.ads: Document new treatment of dynamic values.
2867         (TCode): Bump upper bound to 29.
2868         (Dynamic_Val): New constant set to 29.
2869         * repinfo.adb (Print_Expr) <Dynamic_Val>: New case.
2870         (Rep_Value)  <Dynamic_Val>: Likewise.
2871         * repinfo.h (Dynamic_Val): New macro.
2872         * gcc-interface/decl.c (annotate_value): Tidy up and cache result for
2873         DECL_P nodes too.
2874         <INTEGER_CST>: Set TCODE instead of recursing.
2875         <COMPONENT_REF>: Set TCODE instead of calling Create_Node manually.
2876         <VAR_DECL>: New case.
2877         <MULT_EXPR, PLUS_EXPR>: Fold conversions into inner operations.
2878         <BIT_AND_EXPR>: Adjust.
2879         <CALL_EXPR>: Do not fall through.
2881 2017-09-05  Eric Botcazou  <ebotcazou@adacore.com>
2883         * gcc-interface/trans.c (Call_to_gnu): If this is a function call and
2884         there is no target, do not create a temporary for the return value for
2885         an allocator either.
2887 2017-09-05  Eric Botcazou  <ebotcazou@adacore.com>
2889         * gcc-interface/trans.c (pos_to_constructor): Skip conversions to an
2890         unconstrained array type.
2892 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
2893             Alan Hayward  <alan.hayward@arm.com>
2894             David Sherwood  <david.sherwood@arm.com>
2896         * gcc-interface/decl.c (validate_size): Use NARROWEST_INT_MODE
2897         instead of GET_CLASS_NARROWEST_MODE (MODE_INT).
2899 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
2900             Alan Hayward  <alan.hayward@arm.com>
2901             David Sherwood  <david.sherwood@arm.com>
2903         * gcc-interface/decl.c (check_ok_for_atomic_type): Use
2904         is_a <scalar_int_mode>.
2905         * gcc-interface/trans.c (Pragma_to_gnu): Likewise.
2906         * gcc-interface/utils.c (gnat_type_for_mode): Likewise.
2908 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
2909             Alan Hayward  <alan.hayward@arm.com>
2910             David Sherwood  <david.sherwood@arm.com>
2912         * gcc-interface/decl.c (gnat_to_gnu_entity): Use int_mode_for_size
2913         instead of mode_for_size.
2914         (gnat_to_gnu_subprog_type): Likewise.
2915         * gcc-interface/utils.c (make_type_from_size): Likewise.
2917 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
2918             Alan Hayward  <alan.hayward@arm.com>
2919             David Sherwood  <david.sherwood@arm.com>
2921         * gcc-interface/misc.c (fp_prec_to_size): Use opt_scalar_float_mode.
2922         (fp_size_to_prec): Likewise.
2924 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
2925             Alan Hayward  <alan.hayward@arm.com>
2926             David Sherwood  <david.sherwood@arm.com>
2928         * gcc-interface/utils.c (gnat_type_for_mode): Use is_a
2929         <scalar_float_mode> instead of SCALAR_FLOAT_MODE_P.
2931 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
2932             Alan Hayward  <alan.hayward@arm.com>
2933             David Sherwood  <david.sherwood@arm.com>
2935         * gcc-interface/decl.c (validate_size): Update use of
2936         GET_MODE_WIDER_MODE, forcing a wider mode to exist.
2938 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
2939             Alan Hayward  <alan.hayward@arm.com>
2940             David Sherwood  <david.sherwood@arm.com>
2942         * gcc-interface/misc.c (fp_prec_to_size): Use new mode iterators.
2943         (fp_size_to_prec): Likewise.
2945 2017-08-29  Martin Liska  <mliska@suse.cz>
2947         PR other/39851
2948         * gcc-interface/trans.c (Pragma_to_gnu): Set argument to NULL.
2950 2017-08-08  Martin Liska  <mliska@suse.cz>
2952         * gcc-interface/trans.c: Include header files.
2954 2017-07-29  Jakub Jelinek  <jakub@redhat.com>
2956         * gcc-interface/utils.c (gnat_write_global_declarations): Pass false
2957         as new argument to the imported_module_or_decl debug hook.
2959 2017-07-25  Javier Miranda  <miranda@adacore.com>
2961         * checks.adb (Apply_Divide_Checks): Ensure that operands are not
2962         evaluated twice. 
2964 2017-07-19  Jakub Jelinek  <jakub@redhat.com>
2966         * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE,
2967         TYPE_GCC_MIN_VALUE): Use TYPE_MIN_VALUE_RAW instead of TYPE_MINVAL.
2968         (TYPE_GCC_MAX_VALUE): Use TYPE_MAX_VALUE_RAW instead of TYPE_MAXVAL.
2970 2017-07-18  Mike Frysinger  <vapier@chromium.org>
2972         * gcc-interface/Makefile.in (../../gnatmake$(exeext)): Delete $(P).
2973         (../../gnatlink$(exeext)): Likewise.
2975 2017-07-15  John Paul Adrian Glaubitz  <glaubitz@physik.fu-berlin.de>
2977         PR ada/81446
2978         * system-linux-m68k.ads: Add pragma No_Elaboration_Code_All.
2979         (Backend_Overflow_Checks): Set to True.
2981 2017-06-23  Jakub Jelinek  <jakub@redhat.com>
2983         * gcc-interface/trans.c (gnat_to_gnu): Initialize sync to false.
2985 2017-06-21  Pierre-Marie de Rodat  <derodat@adacore.com>
2987         * gcc-interface/ada-tree.h (DECL_FUNCTION_IS_DEF): Update copyright
2988         notice.  New macro.
2989         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Tag the subprogram
2990         as a definition.
2991         (Compilation_Unit_to_gnu): Tag the elaboration procedure as a
2992         definition.
2993         * gcc-interface/decl.c (gnat_to_gnu_entity): Tag declarations of
2994         imported subprograms for the current compilation unit as
2995         definitions.  Disable debug info for references to variables.
2996         * gcc-interface/gigi.h (create_subprog_decl): Update declaration.
2997         * gcc-interface/utils.c (gnat_pushdecl): Add external DECLs that are
2998         not built-in functions to their binding scope.
2999         (create_subprog_decl): Add a DEFINITION parameter.  If it is true, tag
3000         the function as a definition.  Update all callers.
3001         (gnat_write_global_declarations): Emit debug info for imported
3002         functions.  Filter out external variables for which debug info
3003         is disabled.
3005 2017-06-15  Nicolas Boulenguez  <nicolas.boulenguez@free.fr>
3007         PR ada/81105
3008         * gcc-interface/Makefile.in (x86 kfreebsd): Adjust system.ads setting.
3009         (i[3456]86-pc-gnu): Likewise.
3010         (x86_64 kfreebsd): Likewise.
3012 2017-06-12  Eric Botcazou  <ebotcazou@adacore.com>
3014         PR bootstrap/80897
3015         * exp_ch3.adb (Make_Predefined_Primitive_Specs): Use Positive index.
3017 2017-06-12  Eric Botcazou  <ebotcazou@adacore.com>
3019         PR ada/81070
3020         * s-interr-hwint.adb: Reinstate.
3021         * gcc-interface/Makefile.in (RTEMS): Use it again.
3023 2017-06-08  Olivier Hainque  <hainque@adacore.com>
3025         * vx_crtbegin_auto.c: Update year in copyright notice.
3026         * vx_crtbegin.c: Likewise.
3027         * vx_crtbegin.inc: Likewise. 
3028         * vx_crtend.c:  Likewise.
3030 2017-06-07  Sebastian Huber  <sebastian.huber@embedded-brains.de>
3032         * Makefile.in (rtems): Use TLS implementation for s-tpopsp.adb.
3033         * s-tpopsp-rtems.adb: Delete.
3035 2017-06-02  Olivier Hainque  <hainque@adacore.com>
3037         * vx_crtbegin_auto.c: New file.
3038         * vx_crtbegin.c: New file.
3039         * vx_crtbegin.inc: New file.
3040         * vx_crtend.c: New file.
3042 2017-05-25  Jonathan Wakely  <jwakely@redhat.com>
3044         * gcc-interface/utils2.c (compare_elmt_bitpos): Remove redundant
3045         const qualifiers that cause -Wignored-qualifiers warnings.
3047 2017-05-22  Eric Botcazou  <ebotcazou@adacore.com>
3049         * gcc-interface/decl.c (gnat_to_gnu_entity): Skip regular processing
3050         for Itypes that are E_Access_Subtype.
3051         <E_Access_Subtype>: Use the DECL of the base type directly.
3053 2017-05-22  Ed Schonberg  <schonberg@adacore.com>
3054             Eric Botcazou  <ebotcazou@adacore.com>
3056         * sem_ch4.adb (Analyze_Call): In Ada2012 an incomplete type from a
3057         limited view may appear in the profile of a function, and a call to
3058         that function in another unit in which the full view is available must
3059         use this full view to spurious type errors at the point of call.
3060         * inline.adb (Analyze_Inlined_Bodies): Remove restriction on loading
3061         of parent body with a with clause for the main unit.
3062         * gcc-interface/decl.c (defer_limited_with_list): Document new usage.
3063         (gnat_to_gnu_entity) <E_Access_Type>: Handle completed Taft Amendment
3064         types declared in external units like types from limited with clauses.
3065         Adjust final processing of defer_limited_with_list accordingly.
3066         * gcc-interface/trans.c (gnat_to_gnu) < N_Selected_Component>: Try
3067         again to translate the prefix after the field if it is incomplete.
3069 2017-05-22  Eric Botcazou  <ebotcazou@adacore.com>
3071         * gcc-interface/decl.c (gnat_to_gnu_field): Do not enforce strict
3072         alignment for simple volatile fields and remove associated errors.
3074 2017-05-15  Eric Botcazou  <ebotcazou@adacore.com>
3076         * gcc-interface/gigi.h (get_elaboration_procedure): Delete.
3077         * gcc-interface/trans.c (get_elaboration_procedure): Make static.
3079 2017-05-15  Pierre-Marie de Rodat  <derodat@adacore.com>
3081         * gcc-interface/utils.c (can_materialize_object_renaming_p):
3082         Synchronize with GNAT's Exp_Dbug.Debug_Renaming_Declaration:
3083         process Original_Node instead of expanded names.
3085 2017-05-15  Eric Botcazou  <ebotcazou@adacore.com>
3087         * gcc-interface/trans.c (return_value_ok_for_nrv_p): Only apply the
3088         addressability check in the constrained case.
3090 2017-05-15  Eric Botcazou  <ebotcazou@adacore.com>
3092         * gcc-interface/trans.c (Identifier_to_gnu): Also accept incomplete
3093         types not coming from a limited context.
3095 2017-05-15  Eric Botcazou  <ebotcazou@adacore.com>
3097         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Skip subprograms on
3098         the inlined list that are not public.
3099         * gcc-interface/utils.c (create_subprog_decl): Clear TREE_PUBLIC if
3100         there is a pragma Inline_Always on the subprogram.
3102 2017-05-15  Eric Botcazou  <ebotcazou@adacore.com>
3104         * gcc-interface/trans.c (gnat_to_gnu) <N_Aggregate>: Fix formatting.
3105         <N_Allocator>: Use properly typed constants.
3106         (extract_values): Move around.
3107         (pos_to_constructor): Minor tweaks.
3108         (Sloc_to_locus): Fix formatting.
3109         * gcc-interface/utils.c (process_deferred_decl_context): Minor tweaks.
3110         * gcc-interface/gigi.h (MARK_VISITED): Remove blank line.
3111         (Gigi_Equivalent_Type): Adjust head comment.
3112         * gcc-interface/decl.c (Gigi_Equivalent_Type): Likewise.
3114 2017-05-15  Eric Botcazou  <ebotcazou@adacore.com>
3116         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: When there
3117         is a representation clause on an extension, propagate the alignment of
3118         the parent type only if the platform requires strict alignment.
3120 2017-05-12  Eric Botcazou  <ebotcazou@adacore.com>
3122         * system-linux-arm.ads (Memory_Size): Use Long_Integer'Size
3123         instead of Word_Size.
3125         Revert
3126         2017-03-28  Andreas Schwab  <schwab@suse.de>
3128         PR ada/80117
3129         * system-linux-aarch64-ilp32.ads: New file.
3130         * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS_COMMON): Rename
3131         from LIBGNAT_TARGET_PAIRS.
3132         (LIBGNAT_TARGET_PAIRS_32, LIBGNAT_TARGET_PAIRS_64): Define.
3133         (LIBGNAT_TARGET_PAIRS): Use LIBGNAT_TARGET_PAIRS_COMMON, and
3134         LIBGNAT_TARGET_PAIRS_64 or LIBGNAT_TARGET_PAIRS_32 for -mabi=lp64
3135         or -mabi=ilp32, resp.
3137 2017-05-10  H.J. Lu  <hongjiu.lu@intel.com>
3139         PR ada/80626
3140         * system-linux-x86.ads (Memory_Size): Use Long_Integer'Size
3141         instead of Word_Size.
3143 2017-05-10  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3145         * raise-gcc.c (exception_class_eq): Make ec parameter const.
3147 2017-05-02  Richard Biener  <rguenther@suse.de>
3149         * gcc-interface/misc.c (gnat_post_options): Do not set
3150         -fstrict-overflow.
3152 2017-05-02  Eric Botcazou  <ebotcazou@adacore.com>
3154         * gcc-interface/trans.c (assoc_to_constructor): Make sure
3155         Corresponding_Discriminant is only called on discriminants.
3156         Skip the saving of the result only for them.
3157         (gnat_to_gnu) <N_Selected_Component>: Likewise.
3158         <N_Unchecked_Type_Conversion>: Translate the result type first.
3159         (gigi): Set TREE_NOTHROW on Begin_Handler.
3160         (stmt_list_cannot_raise_p): New predicate.
3161         (Exception_Handler_to_gnu_gcc): Emit a simple final call instead of
3162         a cleanup if the statements of the handler cannot raise.
3163         (process_freeze_entity): Use Is_Record_Type.
3164         (process_type): Likewise.
3166 2017-05-02  Eric Botcazou  <ebotcazou@adacore.com>
3168         * einfo.ads (Corresponding_Record_Component): New alias
3169         for Node21 used for E_Component and E_Discriminant.
3170         * einfo.adb (Corresponding_Record_Component): New function.
3171         (Set_Corresponding_Record_Component): New procedure.
3172         (Write_Field21_Name): Handle Corresponding_Record_Component.
3173         * sem_ch3.adb (Inherit_Component): Set
3174         Corresponding_Record_Component for every component in
3175         the untagged case.  Clear it afterwards for non-girder
3176         discriminants.
3177         * gcc-interface/decl.c (gnat_to_gnu_entity)
3178         <E_Record_Type>: For a derived untagged type with discriminants
3179         and constraints, apply the constraints to the layout of the
3180         parent type to deduce the layout.
3181         (field_is_aliased): Delete.
3182         (components_to_record): Test DECL_ALIASED_P directly.
3183         (annotate_rep): Check that fields are present except for
3184         an extension.
3185         (create_field_decl_from): Add DEBUG_INFO_P
3186         parameter and pass it in recursive and other calls.  Add guard
3187         for the manual CSE on the size.
3188         (is_stored_discriminant): New predicate.
3189         (copy_and_substitute_in_layout): Consider only
3190         stored discriminants and check that original fields are present
3191         in the old type.  Deal with derived types.  Adjust call to
3192         create_variant_part_from.
3194 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
3196         * exp_ch6.adb (Expand_Call_Helper): When locating the
3197         accessibility entity created for an access parameter, handle
3198         properly a reference to a formal of an enclosing subprogram. if
3199         the reference appears in an inherited class-wide condition, it
3200         is the rewriting of the reference in the ancestor expression,
3201         but the accessibility entity must be that of the current formal.
3203 2017-05-02  Javier Miranda  <miranda@adacore.com>
3205         * exp_ch4.adb (Expand_Non_Binary_Modular_Op): New subprogram.
3206         (Expand_N_Op_Add, Expand_N_Op_Divide, Expand_N_Op_Minus,
3207         Expand_N_Op_Multiply, Expand_N_Op_Or, Expand_N_Op_Subtract):
3208         Call Expand_Non_Binary_Modular_Op.
3210 2017-05-02  Eric Botcazou  <ebotcazou@adacore.com>
3212         * sem_ch3.adb (Build_Derived_Private_Type): If the parent type
3213         has discriminants, do not override the Stored_Constraint list of
3214         the full view of the derived type with that of the derived type.
3216 2017-05-02  Bob Duff  <duff@adacore.com>
3218         * sem_attr.adb (Attribute_Enum_Rep): Disallow T'Enum_Rep.
3220 2017-05-02  Vasiliy Fofanov  <fofanov@adacore.com>
3222         * s-os_lib.ads: Minor typo fix.
3224 2017-05-02  Vasiliy Fofanov  <fofanov@adacore.com>
3226         * gnatls.adb: Merge and refactor code from Prj.Env and remove
3227         this deprecated dependency.
3229 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
3231         * exp_util.ads: minor comment addition.
3233 2017-05-02  Eric Botcazou  <ebotcazou@adacore.com>
3235         * sem_ch3.adb (Build_Derived_Record_Type): Fix a few typos and
3236         pastos in part #3 of the head comment.
3238 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
3240         * exp_ch3.adb (Freeze_Type): Do not generate an invariant
3241         procedure body for a local (sub)type declaration within a
3242         predicate function. Invariant checks do not apply to these, and
3243         the expansion of the procedure will happen in the wrong scope,
3244         leading to misplaced freeze nodes.
3246 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
3248         * exp_util.adb (Insert_Library_Level_Action): Use proper scope
3249         to analyze generated actions.  If the main unit is a body,
3250         the required scope is that of the corresponding unit declaration.
3252 2017-05-02  Arnaud Charlet  <charlet@adacore.com>
3254         * einfo.adb (Declaration_Node): flip branches of
3255         an IF statement to avoid repeated negations in its condition;
3256         no change in semantics, only to improve readability.
3258 2017-05-02  Arnaud Charlet  <charlet@adacore.com>
3260         * sem_case.adb: Remove extra spaces in parameter declarations.
3262 2017-05-02  Justin Squirek  <squirek@adacore.com>
3264         * usage.adb: Replace space with hyphen ("run time" -> "run-time")
3265         in usage line for new -gnatwE switch.
3267 2017-05-02  Claire Dross  <dross@adacore.com>
3269         * a-cofuve.ads (Remove): Remove unnecessary
3270         conditions in precondition.
3272 2017-05-02  Vasiliy Fofanov  <fofanov@adacore.com>
3274         * a-stream.ads, exp_imgv.adb, sem_ch10.adb,
3275         sem_attr.adb, s-finmas.ads, osint.adb: Minor typo fix.
3277 2017-05-02  Justin Squirek  <squirek@adacore.com>
3279         * sem_ch4.adb (Analyze_Case_Expression): Add check for valid
3280         alternative expression.
3281         * sem_res.adb (Resolve_Case_Expression): Ditto.
3283 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
3285         * exp_disp.adb (Set_All_DT_Position, In_Predef_Prim_DT):
3286         Refine predicate for the case where the primitive operation
3287         is a renaming of equality.  An overriding operation that is
3288         a user-defined renaming of predefined equality inherits its
3289         slot from the overridden operation. Otherwise it is treated
3290         as a predefined op and occupies the same predefined slot as
3291         equality. A call to it is transformed into a call to its alias,
3292         which is the predefined equality. A dispatching call thus uses
3293         the proper slot if operation is further inherited and called
3294         with class-wide arguments.
3296 2017-05-02  Justin Squirek  <squirek@adacore.com>
3298         * errout.adb (Set_Msg_Text): Add a case to switch the message
3299         type when the character '[' is detected signifying a warning
3300         about a run-time exception.
3301         * opt.ads Add a new Warning_Mode value for new switch
3302         * switch-b.adb (Scan_Binder_Switches): Add case for the binder
3303         to handle new warning mode
3304         * usage.adb (Usage): Add usage entry for -gnatwE
3305         * warnsw.adb (Set_Warning_Switch): Add case for the new switch
3307 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
3309         * sem_prag.adb (Process_Conversion): Reject an intrinsic operator
3310         declaration that operates on some fixed point type.
3312 2017-05-02  Justin Squirek  <squirek@adacore.com>
3314         * a-crbtgo.adb, s-taasde.adb: Remove unused use-type clauses.
3316 2017-05-02  Hristian Kirtchev  <kirtchev@adacore.com>
3318         * sem_ch6.adb (Analyze_Null_Procedure): Revert previous change.
3320 2017-05-02  Justin Squirek  <squirek@adacore.com>
3322         * sem_ch4.adb (Analyze_Case_Expression): Add check for valid
3323         expression (Analyze_If_Expression): Add check for valid condition
3324         * sem_eval.adb (Eval_Case_Expression): Add check for error posted
3325         on case-expression
3326         * sem_res.adb (Resolve_If_Expression): Add check for valid
3327         condition and then-expression.
3329 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
3331         * exp_ch3.adb (Build_Initialization_Call): Generate a null
3332         statement if the initialization call is a null procedure, as
3333         can happen with a controlled type with no explicit Initialize
3334         procedure, or an array of such.
3335         * exp_ch7.adb (Process_Object_Declaration): For a type with
3336         controlled components that has a trivial Initialize procedure,
3337         insert declaration for finalization counter after object
3338         declaration itself.
3339         (Make_Deep_Array_Body, Build_Initialize_statements): Do not create
3340         finalization block and attendant declarations if component has
3341         a trivial Initialize procedure.
3342         (Make_Init_Call): Do not generate a call if controlled type has
3343         a trivial Initialize procedure.
3345 2017-05-02  Eric Botcazou  <ebotcazou@adacore.com>
3347         * g-forstr.ads (Data): Move Format component last.
3348         * g-forstr.adb ("+"): Adjust for above change.
3349         * g-rewdat.ads (Buffer): Move Buffer, Current, Pattern and Value last.
3350         * g-sechas.ads (Context): Move Key last.
3351         * g-socket.ads (Service_Entry_Type): Move Aliases last.
3352         * s-fileio.adb (Temp_File_Record): Move Name last.
3353         * s-regexp.adb (Regexp_Value): Move Case_Sensitive last.
3354         * xr_tabls.ads (Project_File): Move Src_Dir and Obj_Dir last.
3356 2017-05-02  Jerome Lambourg  <lambourg@adacore.com>
3358         * bindusg.adb, bindgen.adb, gnatbind.adb, opt.ads: Remove the -nognarl
3359         switch introduced recently. finally not needed.
3361 2017-05-02  Hristian Kirtchev  <kirtchev@adacore.com>
3363         * sem_ch6.adb (Analyze_Null_Procedure): Set the
3364         Corresponding_Body link for a null procedure declaration.
3366 2017-05-02  Eric Botcazou  <ebotcazou@adacore.com>
3368         * atree.h (Flag290): Add missing terminating parenthesis.
3369         * einfo.adb (Is_Class_Wide_Clone): Use Flag290.
3370         (Set_Is_Class_Wide_Clone): Likewise.
3371         * einfo.ads (Is_Class_Wide_Clone): Likewise.
3373 2017-05-02  Gary Dismukes  <dismukes@adacore.com>
3375         * checks.ads (Null_Exclusion_Static_Checks): Add Boolean
3376         parameter Array_Comp to indicate the case of an array object
3377         with null-excluding components.
3378         * checks.adb (Null_Exclusion_Static_Checks):
3379         Call Compile_Time_Constraint_Error instead of
3380         Apply_Compile_Time_Constraint_Error in the component case. Also
3381         call that when Array_Comp is True, with an appropriate warning for
3382         the array component case. Only create an explicit initialization
3383         by null in the case of an object of a null-excluding access type
3384         (and no longer do that in the component case).
3385         * sem_ch3.adb (Check_Component): Add a Boolean parameter
3386         Array_Comp defaulted to False.  Pass Empty for the Comp
3387         actual when calling Null_Exclusion_Static_Checks in the case
3388         where Comp_Decl matches Object_Decl, because we don't have a
3389         component in that case. In the case of an object or component
3390         of an array type, pass True for Array_Comp on the recursive call
3391         to Check_Component.
3393 2017-05-02  Bob Duff  <duff@adacore.com>
3395         * s-taprop-linux.adb (Prio_To_Linux_Prio): New function to correctly
3396         compute the linux priority from the Ada priority. Call this everywhere
3397         required. In particular, the previous version was not doing this
3398         computation when setting the ceiling priority in various places. It
3399         was just converting to C.int, which results in a ceiling that is off
3400         by 1.
3402 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
3404         * sem_ch3.adb: Comment predicate inheritance.
3406 2017-05-02  Tristan Gingold  <gingold@adacore.com>
3408         * s-trasym.ads: Add comment.
3410 2017-05-02  Bob Duff  <duff@adacore.com>
3412         * sem_elab.adb, sem_elab.ads: Minor comment fixes.
3413         * sem_ch4.adb: Minor reformatting.
3414         * s-taprop-linux.adb, s-taspri-posix.ads: Code refactoring.
3415         * s-taspri-posix-noaltstack.ads: Minor refactoring.
3416         * sinput.ads: Minor typo fix.
3418 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
3420         * exp_ch9.adb (Discriminated_Size): Moved to sem_util.
3421         * sem_util.ads, sem_util.adb (Discriminated_Size): Predicate moved
3422         here from exp_ch9, to recognize objects whose creation requires
3423         dynamic allocation, so that the proper warning can be emitted
3424         when restriction No_Implicit_Heap_Allocation is in effect.
3425         * sem_ch3.adb (Analyze_Object_Declaration): Use Discriminated_Size
3426         to emit proper warning when an object that requires dynamic
3427         allocation is declared.
3429 2017-05-02  Tristan Gingold  <gingold@adacore.com>
3431         * s-trasym.ads, s-trasym.adb (Enable_Cache): New.
3433 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
3435         * sem_ch4.adb (Find_Equality_Types, Try_One_Interp): The same relaxed
3436         visibility rules for equality operators that apply within an
3437         instantiation apply within an inlined body.
3438         * sem_type.adb (Add_One_Interp): ditto.
3440 2017-05-02  Hristian Kirtchev  <kirtchev@adacore.com>
3442         * sem_prag.adb (Analyze_Pragma): Forbid pragma Contract_Cases on null
3443         procedures.
3445 2017-05-02  Eric Botcazou  <ebotcazou@adacore.com>
3447         * snames.ads-tmpl
3448         (Name_Assume, Name_Attribute_Definition, Name_Loop_Optimize,
3449         Name_No_Tagged_Streams): Move to regular pragmas.  Add
3450         placeholders for Default_Scalar_Storage_Order, Dispatching_Domain,
3451         and Secondary_Stack_Size.
3452         (Pragma_Id): Move Pragma_Assume,
3453         Pragma_Attribute_Definition, Pragma_Loop_Optimize and
3454         Pragma_No_Tagged_Streams to second part.
3456 2017-05-02  Hristian Kirtchev  <kirtchev@adacore.com>
3458         * exp_attr.adb: Minor reformatting.
3460 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
3462         * sem_ch4.adb (Analyze_Selected_Component): Improve error
3463         detection for illegal references to private components or
3464         operations of a protected type in the body of the type.
3466 2017-05-02  Eric Botcazou  <ebotcazou@adacore.com>
3468         * opt.ads: Add missing GNAT markers in comments.
3469         * opt.adb (Set_Opt_Config_Switches): Do not override earlier
3470         settings of Optimize_Alignment at the end.
3472 2017-05-02  Hristian Kirtchev  <kirtchev@adacore.com>
3474         * checks.adb (Apply_Constraint_Check): Do not apply
3475         a discriminant check when the associated type is a constrained
3476         subtype created for an unconstrained nominal type.
3477         * exp_attr.adb: Minor reformatting.
3479 2017-05-02  Bob Duff  <duff@adacore.com>
3481         * sem_ch3.adb (OK_For_Limited_Init_In_05): Handle correctly
3482         the N_Raise_Expression case.
3483         * sem_ch6.adb (Check_Limited_Return): Minor: clarify comment,
3484         and add assertions.
3486 2017-05-02  Yannick Moy  <moy@adacore.com>
3488         * exp_ch4.adb (Expand_N_Op_Ne): Do not bump parenthese level and
3489         optimize length comparison in GNATprove mode.
3490         * exp_spark.adb (Expand_SPARK_Op_Ne): New function to rewrite
3491         operator /= into negation of operator = when needed.
3492         (Expand_SPARK): Call new
3493         function to expand operator /=.
3495 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
3497         * exp_fixd.adb (Expand_Divide_Fixed_By_Fixed_Giving_Fixed):
3498         Simplify the expression for a fixed-fixed division to remove
3499         divisions by constants whenever possible, as an optimization
3500         for restricted targets.
3502 2017-05-02  Hristian Kirtchev  <kirtchev@adacore.com>
3504         * checks.adb, sem_ch3.adb, sem_ch6.adb: Minor reformatting.
3506 2017-05-02  Bob Duff  <duff@adacore.com>
3508         * exp_attr.adb (Callable, Identity, Terminated): Use Find_Prim_Op
3509         to find primitive ops, instead of using an Identifier that will
3510         later be looked up. This is necessary because these ops are not
3511         necessarily visible at all places where we need to call them.
3512         * exp_util.ads: Minor comment fix.
3514 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
3516         * sem_ch6.adb (Fully_Conformant_Expressions): Two entity
3517         references are fully conformant if they are both expansions
3518         of the discriminant of a protected type, within one of the
3519         protected operations. One occurrence may be expanded into a
3520         constant declaration while the other is an input parameter to
3521         the corresponding generated subprogram.
3523 2017-05-02  Justin Squirek  <squirek@adacore.com>
3525         * sem_ch3.adb (Check_For_Null_Excluding_Components): Created for
3526         recursivly searching composite-types for null-excluding access
3527         types and verifying them.
3528         (Analyze_Object_Declaration): Add a
3529         call to Check_Null_Excluding_Components for static verification
3530         of non-initialized objects.
3531         * checks.adb, checks.ads (Null_Exclusion_Static_Checks): Added
3532         a parameter for a composite-type's component and an extra case
3533         for printing component information.
3535 2017-05-02  Yannick Moy  <moy@adacore.com>
3537         * sem_ch10.adb (Analyze_Subunit): Take
3538         configuration pragma into account when restoring appropriate
3539         pragma for analysis of subunit.
3541 2017-05-02  Justin Squirek  <squirek@adacore.com>
3543         * s-tasren.adb, s-tasini.adb, s-taprop-linux.adb,
3544         s-mudido-affinity.adb,, a-exetim-posix.adb, a-direio.adb,
3545         g-socket.adb, s-taenca.adb, s-fileio.adb: Remove unused use-type
3546         clauses from the runtime.
3548 2017-05-02  Eric Botcazou  <ebotcazou@adacore.com>
3550         * freeze.adb (Check_Component_Storage_Order): Do not treat bit-packed
3551         array components specially.
3553 2017-05-02  Ed Schonberg  <schonberg@adacore.com>
3555         * sem_ch8.adb (Premature_Usage): If the premature usage of
3556         an entity is as the expression in its own object decaration,
3557         rewrite the reference as Any_Id to prevent cascaded errors or
3558         compiler loops when such an entity is used in an address clause.
3560 2017-05-01  Eric Botcazou  <ebotcazou@adacore.com>
3562         * gcc-interface/decl.c (components_to_record): Add missing guard.
3564 2017-05-01  Eric Botcazou  <ebotcazou@adacore.com>
3566         * gcc-interface/decl.c (components_to_record): Add more comments.
3567         Put back pending fields onto the regular list if the misalignment
3568         happens to cancel itself.
3570 2017-04-28  Ed Schonberg  <schonberg@adacore.com>
3572         * sem_ch4.adb (Complete_Object_Operation): When rewriting the
3573         controlling actual in a prefixed call, preserve the original node
3574         information if the prefix itself has been rewritten, for ASIS use.
3576 2017-04-28  Hristian Kirtchev  <kirtchev@adacore.com>
3578         * exp_ch6.adb (Insert_Post_Call_Actions):
3579         Code clean up. Insert the post-call actions after an enclosing
3580         procedure call when N denotes a function call and appears as an
3581         actual parameter in the procedure call.
3583 2017-04-28  Eric Botcazou  <ebotcazou@adacore.com>
3585         * freeze.adb (Check_Component_Storage_Order): If there is a clause
3586         for the component, also reject the attribute if the component
3587         doesn't end on a byte boundary and its scalar storage order is
3588         different from that of the enclosing record type.
3590 2017-04-28  Javier Miranda  <miranda@adacore.com>
3592         * atree.ads (Info_Messages): Removed.
3593         (Warning_Info_Messages): New counter.
3594         (Report_Info_Messages): New counter.
3595         * err_vars.ads Update documentation.
3596         * errout.adb (Delete_Warning_And_Continuations): Update
3597         Info_Message occurrences.
3598         (Error_Msg_Internal): Update Info_Message occurrences.
3599         (Delete_Warning): Update Info_Message occurrences.
3600         (Write_Error_Summary): Update Info_Message occurrences.
3601         (Output_Messages): Update Info_Message occurrences.
3602         (To_Be_Removed): Update Info_Message occurrences.
3603         (Reset_Warnings): Update Info_Message occurrences.
3604         * errutil.adb (Error_Msg): Update Info_Message occurrences.
3605         (Finalize): Update Info_Message occurrences.
3606         (Initialize): Update Info_Message occurrences.
3607         * erroutc.adb (Delete_Msg): Update Info_Message occurrences.
3608         (Compilation_Errors): Update Info_Message_Occurences.
3610 2017-04-28  Eric Botcazou  <ebotcazou@adacore.com>
3612         * exp_ch3.adb (Build_Init_Statements): Likewise on Nam.
3613         * freeze.adb (Check_Component_Storage_Order): And on Comp_Byte_Aligned.
3614         * sem_aggr.adb (Resolve_Record_Aggregate): Initialize Box_Node.
3615         * sem_attr.adb (Loop_Entry): Initialize Encl_Loop.
3616         * sem_ch12.adb (Build_Operator_Wrapper): Add pragma Warnings on Expr.
3617         * sem_ch13.adb (Validate_Address_Clauses): Initialize Y_Alignment and
3618         Y_Size.
3619         * sem_eval.adb (Why_Not_Static): Initialize Typ.
3620         * sem_prag.adb (Analyze_Pragma): Add pragma Warnings on Str.
3622 2017-04-28  Bob Duff  <duff@adacore.com>
3624         * sem_util.ads, sem_util.adb (Might_Raise): New function
3625         that replaces Is_Exception_Safe, but has the opposite
3626         sense. Is_Exception_Safe was missing various cases -- calls inside
3627         a pragma Debug, calls inside an 'if' or assignment statement,
3628         etc. Might_Raise now walks the entire subtree looking for things
3629         that can raise.
3630         * exp_ch9.adb (Is_Exception_Safe): Remove.
3631         (Build_Protected_Subprogram_Body): Replace call to
3632         Is_Exception_Safe with "not Might_Raise". Misc cleanup (use
3633         constants where possible).
3634         * exp_ch7.adb: Rename Is_Protected_Body -->
3635         Is_Protected_Subp_Body. A protected_body is something different
3636         in the grammar.
3638 2017-04-28  Eric Botcazou  <ebotcazou@adacore.com>
3640         * inline.adb (Expand_Inlined_Call): Initialize Targ1 variable.
3641         * par-ch3.adb (P_Component_Items): Initialize Decl_Node variable.
3642         (P_Discrete_Choice_List): Initialize Expr_Node variable.
3643         * par-ch9.adb (P_Task): Initialize Aspect_Sloc variable.
3644         (P_Protected): Likewise.
3645         * sem_case.adb (Check_Duplicates):
3646         Add pragma Warnings on variable.
3647         * sem_ch12.adb (Preanalyze_Actuals): Initialize Vis variable.
3648         * sem_ch4.adb (List_Operand_Interps):  Add pragma Warnings on variable.
3649         * sem_ch5.adb (Analyze_Assignment): Initialize Save_Full_Analysis.
3650         (Analyze_Exit_Statement): Initialize Scope_Id variable.
3651         (Analyze_Iterator_Specification): Initialize Bas variable.
3652         * sem_ch9.adb (Allows_Lock_Free_Implementation): Initialize
3653         Error_Count (Satisfies_Lock_Free_Requirements): Likewise.
3654         (Analyze_Accept_Statement): Initialize Task_Nam.
3656 2017-04-28  Hristian Kirtchev  <kirtchev@adacore.com>
3658         * checks.adb (Install_Primitive_Elaboration_Check):
3659         Do not generate an elaboration check if all checks have been
3660         suppressed.
3662 2017-04-28  Ed Schonberg  <schonberg@adacore.com>
3664         * sem_ch13.adb (Analyze_Aspect_Specifications, case
3665         Interrupt_Handler and Attach_Handler): Generate reference
3666         to protected operation to prevent spurious warnings about
3667         unreferenced entities. Previous scheme failed with style checks
3668         enabled.
3670 2017-04-28  Ed Schonberg  <schonberg@adacore.com>
3672         * sem_prag.adb (Relocate_Pragmas_To_Body): A pragma Warnings
3673         that follows an expression function must not be relocated to
3674         the generated body, because it applies to the code that follows.
3676 2017-04-28  Gary Dismukes  <dismukes@adacore.com>
3678         * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object): Test
3679         Relaxed_RM_Semantics to avoid having CodePeer issue errors on
3680         code that might violate the more stringent checking for 'Access
3681         introduced in Ada 2005.
3683 2017-04-28  Arnaud Charlet  <charlet@adacore.com>
3685         * a-cforse.adb: minor style fix in comment.
3687 2017-04-28  Eric Botcazou  <ebotcazou@adacore.com>
3689         * exp_ch9.adb (Build_Lock_Free_Unprotected_Subprogram_Body): Also
3690         initialize Block_Decls variable.
3691         (Expand_Entry_Barrier): Add pragma Warnings on Func_Body variable.
3692         (Build_Dispatching_Requeue): Add pragma Warnings on Op variable.
3693         * exp_disp.adb (Expand_Interface_Actuals): Initialize
3694         Formal_DDT and Actual_DDT variables.
3695         (Expand_Interface_Thunk): Initialize Iface_Formal.
3696         (Make_DT): Initialize Size_Comp.
3697         (Make_Select_Specific_Data_Table): Initialize Decls.
3698         * exp_dist.adb (Add_RACW_Primitive_Declarations_And_Bodies):
3699         Also initialize more RPC_Receiver_* variables.
3700         (Build_To_Any_Function): Initialize Cstr_Formal.
3701         * exp_prag.adb (Expand_Pragma_Contract_Cases): Initialize Msg_Str.
3703 2017-04-28  Ed Schonberg  <schonberg@adacore.com>
3705         * sem_ch6.adb (Freeze_Type_Refs): For an interface conversion
3706         node between access types, freeze the designated type as well,
3707         so that dispatch table pointers are created in the proper scope,
3708         and not in the constructed body of the expression function.
3710 2017-04-28  Bob Duff  <duff@adacore.com>
3712         * alloc.ads (Nodes_Initial): Go back to previous value. The large
3713         value makes large compilations faster, but small compilations slower.
3715 2017-04-28  Arnaud Charlet  <charlet@adacore.com>
3717         * sem_util.adb: minor typos in Is_Child_Or_Sibling.
3719 2017-04-28  Hristian Kirtchev  <kirtchev@adacore.com>
3721         * erroutc.adb (Compilation_Errors): Do not consider info messages
3722         as suitable warnings when warnings must be treated as errors.
3723         * sem_ch7.adb (Analyze_Package_Specification): Do not consider
3724         internally-generated packages when outputting completion
3725         information.
3726         * errout.adb (Output_Messages): Do not consider info messages as
3727         suitable warnings when warnings must be treated as errors.
3728         * errutil.adb (Finalize): Do not consider info messages as
3729         suitable warnings when warnings must be treated as errors.
3731 2017-04-28  Eric Botcazou  <ebotcazou@adacore.com>
3733         * warnsw.ads: Minor fix for incorrect wording in comment.
3735 2017-04-28  Ed Schonberg  <schonberg@adacore.com>
3737         * sem_res.adb (In_Instance_Code): New predicate in
3738         Valid_Conversion, to determine whether a type conversion appears
3739         as (or within) an actual for a formal object.  Type conversions
3740         in instances are not rechecked in Valid_Conversion because
3741         visibility changes between generic location andi instance may
3742         lead to spurious errors, but conversions within an actual must be
3743         fully checked, and they are not fully resolved when pre-analyzing
3744         the actuals.
3746 2017-04-28  Hristian Kirtchev  <kirtchev@adacore.com>
3748         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Use
3749         New_Copy_Tree instead of Relocate_Node as any subsequent copies
3750         of the relocated node will have mangled Parent pointers.
3751         * sem_util.adb (Build_NCT_Hash_Tables): Reset both hash
3752         tables used in conjunction with entity and itype replication.
3753         (Visit_Entity): Rewrite the restriction on which entities
3754         require duplication.  The restriction now includes all types.
3756 2017-04-28  Hristian Kirtchev  <kirtchev@adacore.com>
3758         * a-cofuse.ads, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfinve.adb,
3759         a-cfinve.ads, a-cforma.adb, a-cforma.ads, a-cofuma.adb, a-cofuma.ads,
3760         a-cfhama.adb, a-cfhama.ads, a-cforse.adb: Minor reformatting and code
3761         cleanups.
3763 2017-04-28  Hristian Kirtchev  <kirtchev@adacore.com>
3765         * exp_util.adb, g-dyntab.adb, par-ch4.adb, sem_util.adb, sem_attr.adb,
3766         gnat1drv.adb, exp_disp.adb, namet.adb, alloc.ads: Minor reformatting.
3768 2017-04-28  Gary Dismukes  <dismukes@adacore.com>
3770         * exp_util.adb: Minor reformatting.
3772 2017-04-28  Ed Schonberg  <schonberg@adacore.com>
3774         * sem_ch4.adb: Fix copy/pasto.
3776 2017-04-27  Tristan Gingold  <gingold@adacore.com>
3778         * gcc-interface/Make-lang.in: Define EH_MECHANISM while building
3779         raise-gcc.c. Fix include search path for raise-gcc.c
3781 2017-04-27  Eric Botcazou  <ebotcazou@adacore.com>
3783         * fe.h (Warn_On_Questionable_Layout): Declare.
3784         * warnsw.ads (Warn_On_Record_Holes): Move down.
3785         (Warn_On_Questionable_Layout): New boolean variable.
3786         (Warning_Record): Add Warn_On_Questionable_Layout field.
3787         * warnsw.adb (All_Warnings): Set Warn_On_Questionable_Layout.
3788         (Restore_Warnings): Likewise.
3789         (Save_Warnings): Likewise.
3790         (Set_Dot_Warning_Switch): Handle 'q' and 'Q' letters.
3791         * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust call to
3792         components_to_record.
3793         (gnu_field_to_gnat): New function.
3794         (warn_on_field_placement): Likewise.
3795         (components_to_record): Add GNAT_RECORD_TYPE and remove REORDER
3796         parameters.  Rename local variables and adjust recursive call.
3797         Rework final scan of the field list and implement warnings on the
3798         problematic placement of specific sorts of fields.
3800 2017-04-27  Bob Duff  <duff@adacore.com>
3802         * errout.adb, exp_aggr.adb, exp_attr.adb, exp_code.adb, fname.adb,
3803         * fname.ads, freeze.adb, inline.adb, lib.adb, lib.ads, lib-list.adb,
3804         * lib-load.adb, lib-writ.adb, par.adb, restrict.adb, rtsfind.adb,
3805         * sem.adb, sem_cat.adb, sem_ch10.adb, sem_ch12.adb, sem_ch3.adb,
3806         * sem_ch4.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb, sem_elab.adb,
3807         * sem_intr.adb, sem_res.adb, sem_util.adb, sem_warn.adb, sprint.adb:
3808         For efficiency, cache results of Is_Internal_File_Name and
3809         Is_Predefined_File_Name in the Units table. This avoids a lot
3810         of repeated text processing.
3812 2017-04-27  Emmanuel Briot  <briot@adacore.com>
3814         * g-comlin.adb (Sort_Sections): remove useless test.
3816 2017-04-27  Claire Dross  <dross@adacore.com>
3818         * a-cfhase.adb, a-cfhase.ads (=): Generic parameter removed to
3819         allow the use of regular equality over elements in contracts.
3820         (Formal_Model): Ghost package containing model functions that are
3821         used in subprogram contracts.
3822         (Current_To_Last): Removed, model functions should be used instead.
3823         (First_To_Previous): Removed, model functions should be used instead.
3824         (Strict_Equal): Removed, model functions should be used instead.
3825         (No_Overlap): Removed, model functions should be used instead.
3826         (Equivalent_Keys): Functions over cursors are removed. They were
3827         awkward with explicit container parameters.
3828         * a-cforse.adb, a-cforse.ads (=): Generic parameter removed to
3829         allow the use of regular equality over elements in contracts.
3830         (Formal_Model): Ghost package containing model functions that
3831         are used in subprogram contracts.
3832         (Current_To_Last): Removed, model functions should be used instead.
3833         (First_To_Previous): Removed, model functions should be used instead.
3834         (Strict_Equal): Removed, model functions should be used instead.
3835         (No_Overlap): Removed, model functions should be used instead.
3837 2017-04-27  Yannick Moy  <moy@adacore.com>
3839         * gnat1drv.adb: Code cleanup.
3841 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
3843         * exp_util.adb (Replace_Entity): The prefix of a 'Result
3844         attribute reference in a post- condition is the subprogram to
3845         which the condition applies. If the condition is inherited
3846         by a type extension, the prefix becomes a reference to the
3847         inherited operation, but there is no need to create a wrapper
3848         for this operation, because 'Result is expanded independently
3849         when elaborating the postconditions.
3851 2017-04-27  Bob Duff  <duff@adacore.com>
3853         * sinput.adb: Minor code cleanup.
3854         * namet.adb (Append): Create faster versions of
3855         Append(String) and Append(Name_Id) by using slice assignment
3856         instead of loops.
3857         * sem_util.adb (In_Instance): Speed this up by removing
3858         unnecessary tests; Is_Generic_Instance is defined for all
3859         entities.
3860         * sem_util.ads, sem_util.adb (In_Parameter_Specification):
3861         Remove unused function.
3862         * alloc.ads (Nodes_Initial): Use a much larger value, because
3863         the compiler was spending a lot of time copying the nodes table
3864         when it grows. This number was chosen in 1996, so is rather out
3865         of date with current memory sizes. Anyway, it's virtual memory.
3866         Get rid of Orig_Nodes_...; use Node_... instead.
3867         * atree.adb (Lock): Do not release the Nodes tables; it's a
3868         waste of time.
3869         Orig_Nodes_ ==> Nodes_
3870         * nlists.adb: Orig_Nodes_ ==> Nodes_
3871         * g-table.adb: Remove unused "with" clause.
3872         * g-table.ads, table.ads: Remove Big_Table_Type, which should
3873         not be used by clients.
3874         * g-dyntab.adb (Last_Allocated): New function
3875         to encapsulate T.P.Last_Allocated, which I'm thinking of changing.
3877 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
3879         * sem_eval.adb (Subtypes_Statically_Compatible): Remove duplicated
3880         check.
3881         (Subtypes_Statically_Match): Remove duplicate check.
3882         * sem_prag.adb (Check_Arg_Is_External_Name): Remove duplicate check.
3884 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
3886         * exp_aggr.adb (Replace_Type): Remove the special processing
3887         for selected components.
3888         * exp_attr.adb (Expand_N_Attribute_Reference): Merge the
3889         processing for attributes Fixed_Value and Integer_Value.
3890         * exp_util.adb (Side_Effect_Free): Merge the processing for
3891         qualified expressions, type conversions, and unchecked type
3892         conversions.
3893         * g-comlin.adb (Is_In_Config): Merge the processing for No_Space
3894         and Optional.
3895         * par-ch3.adb (P_Declarative_Items): Merge the processing for
3896         tokens function, not, overriding, and procedure.
3897         * sem_ch6.adb (Fully_Conformant_Expressions): Merge the processing
3898         for qualified expressions, type conversions, and unchecked
3899         type conversions.
3900         * sem_util.adb (Compile_Time_Constraint_Error): Merge the
3901         processing for Ada 83 and instances.
3902         (Object_Access_Level): Merge the processing for indexed components
3903         and selected components.
3904         * uname.adb (Add_Node_Name): Merge the processing for stubs.
3906 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
3908         * checks.adb (Install_Primitive_Elaboration_Check):
3909         Do not generate the check when restriction No_Elaboration_Code
3910         is in effect.
3912 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
3914         * exp_disp.adb (Build_Class_Wide_Check): New subsidiary
3915         of Expand_Dispatching_Call. If the denoted subprogram has a
3916         class-wide precondition, this is the only precondition that
3917         applies to the call, rather that the class-wide preconditions
3918         that may apply to the body that is executed. (This is specified
3919         in AI12-0195).
3921 2017-04-27  Yannick Moy  <moy@adacore.com>
3923         * gnat1drv.adb (Adjust_Global_Switches): Issue
3924         a warning in GNATprove mode if the runtime library does not
3925         support IEEE-754 floats.
3927 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
3929         * sem_prag.adb (Inherit_Class_Wide_Pre): If the parent operation
3930         is itself inherited it does not carry any contract information,
3931         so examine its parent operation which is its Alias.
3933 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
3935         * sem_attr.adb (Analyze_Attribute, case 'Image): In Ada2012 the
3936         prefix can be an object reference in which case Obj'Image (X)
3937         can only be interpreted as an indexing of the parameterless
3938         version of the attribute.
3939         * par-ch4.adb (P_Name): An attribute reference can be the prefix of
3940         an indexing or a slice operation if the attribute does not require
3941         parameters. In Ada2012 'Image also belongs in this category,
3942         and A'Image (lo .. hi) is legal and must be parsed as a slice.
3944 2017-04-27  Yannick Moy  <moy@adacore.com>
3946         * exp_ch4.adb: Minor reformatting.
3947         * gnat1drv.adb (Adjust_Global_Switches): When in GNATprove mode,
3948         disable the CodePeer and C generation modes. Similar to the
3949         opposite actions done in CodePeer mode.
3951 2017-04-27  Yannick Moy  <moy@adacore.com>
3953         * sem_res.adb: Remove duplicate code.
3954         * sem_attr.adb: Delete duplicate code.
3956 2017-04-27  Bob Duff  <duff@adacore.com>
3958         * g-dyntab.adb: Reduce the amount of copying in
3959         Release. No need to copy items past Last.
3961 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
3963         * checks.adb Add with and use clauses for Sem_Disp.
3964         (Install_Primitive_Elaboration_Check): New routine.
3965         * checks.ads (Install_Primitive_Elaboration_Check): New routine.
3966         * exp_attr.adb (Expand_N_Attribute_Reference): Clean up the
3967         processing of 'Elaborated.
3968         * exp_ch6.adb (Expand_N_Subprogram_Body): Install a primitive
3969         elaboration check.
3971 2017-04-27  Bob Duff  <duff@adacore.com>
3973         * g-dyntab.ads, g-dyntab.adb, g-table.ads: Remove incorrect assertion.
3974         If the table grows and then shrinks back to empty, we won't necessarily
3975         point back to the empty array. Code cleanups.
3976         * sinput.ads: Add 'Base to Size clause to match the declared
3977         component subtypes.
3979 2017-04-27  Claire Dross  <dross@adacore.com>
3981         * a-cforma.adb, a-cforma.ads (=): Generic parameter removed to
3982         allow the use of regular equality over elements in contracts.
3983         (Formal_Model): Ghost package containing model functions that
3984         are used in subprogram contracts.
3985         (Current_To_Last): Removed, model functions should be used instead.
3986         (First_To_Previous): Removed, model functions should be used instead.
3987         (Strict_Equal): Removed, model functions should be used instead.
3988         (No_Overlap): Removed, model functions should be used instead.
3989         * a-cofuma.adb, a-cofuma.ads (Enable_Handling_Of_Equivalence)
3990         Boolean generic parameter to disable contracts for equivalence
3991         between keys.
3992         (Witness): Create a witness of a key that is used for handling of
3993         equivalence between keys.
3994         (Has_Witness): Check whether a witness is contained in a map.
3995         (W_Get): Get the element associated to a witness.
3996         (Lift_Equivalent_Keys): Removed, equivalence between keys is handled
3997         directly.
3998         * a-cofuse.adb, a-cofuse.ads (Enable_Handling_Of_Equivalence)
3999         Boolean generic parameter to disable contracts for equivalence
4000         between keys.
4001         * a-cfhama.adb, a-cfhama.ads (Formal_Model.P) Disable handling
4002         of equivalence on functional maps.
4003         * a-cfdlli.adb, a-cfdlli.ads (Formal_Model.P) Disable handling
4004         of equivalence on functional maps.
4006 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
4008         * exp_ch9.adb (Expand_Entry_Barrier): Code
4009         cleanup. Do not perform the optimization which removes the
4010         declarations of the discriminant and component renamings when
4011         validity checks on operands and attributes are in effect.
4013 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
4015         * exp_spark.adb, exp_util.adb, sem_ch7.adb, g-dyntab.adb, g-dyntab.ads,
4016         freeze.adb, a-cfinve.ads, a-cofuma.adb, a-cofuma.ads, a-cfhama.adb,
4017         a-cfhama.ads, a-cofove.ads: Minor reformatting.
4019 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
4021         * g-debpoo.adb (Dump_Gnatmem): Protect against a possible null
4022         pointer dereference.
4023         * g-spipat.adb (Dump): Code clean up. Protect against a possible
4024         null pointer dereference.
4026 2017-04-27  Bob Duff  <duff@adacore.com>
4028         * g-dyntab.ads, g-dyntab.adb: Default for Table_Low_Bound.
4029         Rename Empty --> Empty_Table_Ptr, and don't duplicate code for it.
4030         Free renames Init, since they do the same thing.
4031         * g-table.ads: Default for Table_Low_Bound.
4032         * table.ads: Default for Table_Low_Bound, Table_Initial, and
4033         Table_Increment.
4035 2017-04-27  Bob Duff  <duff@adacore.com>
4037         * g-dyntab.ads, g-dyntab.adb: Add assertions to subprograms that
4038         can reallocate.
4039         * atree.adb, elists.adb, fname-uf.adb, ghost.adb, inline.adb,
4040         * lib.adb, namet.adb, nlists.adb, sem.adb, sinput.adb, stringt.adb:
4041         Reorder code so that above assertions do not fail.
4042         * table.ads: Remove obsolete comment on Locked.
4044 2017-04-27  Claire Dross  <dross@adacore.com>
4046         * a-cfdlli.ads: Code cleanup.
4048 2017-04-27  Yannick Moy  <moy@adacore.com>
4050         * exp_spark.adb (Expand_SPARK_Freeze_Type): Build a DIC procedure
4051         when needed for proof.  (Expand_SPARK): Call the new procedure.
4052         * exp_util.ads Fix typo.
4054 2017-04-27  Gary Dismukes  <dismukes@adacore.com>
4056         * a-cofuma.ads, a-cfhama.ads: Minor reformatting, grammar, and typo
4057         fixes.
4059 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
4061         * sem_elab.adb Add new type Visited_Element
4062         and update the contents of table Elab_Visited.  Various code clean up.
4063         (Check_Elab_Call): Determine whether a prior call to
4064         the same subprogram was already examined within the same context.
4065         (Check_Internal_Call_Continue): Register the subprogram being
4066         called as examined within a particular context. Do not suppress
4067         elaboration warnings.
4069 2017-04-27  Gary Dismukes  <dismukes@adacore.com>
4071         * xoscons.adb, osint.ads: Minor reformatting.
4073 2017-04-27  Bob Duff  <duff@adacore.com>
4075         * g-dyntab.ads, g-dyntab.adb: Misc cleanup. Rename
4076         Table_Count_Type --> Table_Last_Type, because the name
4077         was confusing (a "count" usually starts at zero).  Add
4078         functionality supported or needed by other tables packages
4079         (Move, Release_Threshold).
4080         * g-table.ads, g-table.adb: This is now just a thin wrapper
4081         around g-dyntab.ads/g-dyntab.adb.  Add functionality supported
4082         or needed by other tables packages (Save, Restore).
4083         * table.ads, table.adb: This is now just a thin wrapper around
4084         * g-table.ads/g-table.adb.
4085         * namet.h, scos.h, uintp.h: These files are reaching into the
4086         private data of some instances of g-table, whose names changed,
4087         so the above change requires some adjustment here. It now uses
4088         public interfaces.
4090 2017-04-27  Bob Duff  <duff@adacore.com>
4092         * namet.adb, namet.ads: Minor: remove unused procedures.
4094 2017-04-27  Eric Botcazou  <ebotcazou@adacore.com>
4096         * checks.adb (Apply_Scalar_Range_Check): Initialize Ok variable too.
4097         (Minimize_Eliminate_Overflows): Initialize Llo and Lhi.
4098         Add pragma Warnings on Rtype variable in nested block.  *
4099         * exp_ch3.adb (Build_Init_Statements): Initialize VAR_LOC.
4100         * exp_ch4.adb (Expand_Concatenate): Initialize 3 variables.
4101         (Size_In_Storage_Elements): Add pragma Warnings on Res variable.
4102         * exp_ch7.adb (Build_Adjust_Statements): Initialize Bod_Stmts.
4103         (Process_Component_List_For_Finalize): Initialize Counter_Id.
4104         (Build_Finalize_Statements): Initialize Bod_Stmts.
4105         * exp_disp.adb (Expand_Dispatching_Call): Initialize SCIL_Node.
4107 2017-04-27  Claire Dross  <dross@adacore.com>
4109         * a-cfhama.adb, a-cfhamai.ads (=): Generic parameter removed to
4110         allow the use of regular equality over elements in contracts.
4111         (Formal_Model): Ghost package containing model functions that are
4112         used in subprogram contracts.
4113         (Current_To_Last): Removed, model
4114         functions should be used instead.
4115         (First_To_Previous): Removed, model functions should be used instead.
4116         (Strict_Equal): Removed, model functions should be used instead.
4117         (No_Overlap): Removed, model functions should be used instead.
4118         (Equivalent_Keys): Functions over cursors are removed. They were
4119         awkward with explicit container parameters.
4120         * a-cofuma.adb, a-cofuma.ads (Lift_Equivalent_Keys): New lemma
4121         (proof only) procedure to help GNATprove when equivalence over
4122         keys is not equality.
4124 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
4126         * exp_util.adb, a-cfdlli.adb, a-cfdlli.ads, exp_ch9.adb, g-dyntab.adb,
4127         sem_dim.adb, a-cfinve.adb, a-cfinve.ads, a-cofove.adb, a-cofove.ads:
4128         Minor reformatting and code cleanups.
4130 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
4132         * freeze.adb (Build_Inherited_Condition_Pragmas): New procedure,
4133         subsidiary of Check_Inherited_Conditions, to build pragmas for an
4134         operation whose ancestor has classwide pre/postconditions. This
4135         is used both to check the legality of the inheritance in Ada
4136         and in SPARK, and to determine whether a wrapper is needed for
4137         an inherited operation.
4138         * exp_util.adb (Build_Class_Wide_Expression, Replace_Entity):
4139         Improve placement of error message for inherited classwide
4140         conditions that become illegal on type derivation.
4142 2017-04-27  Yannick Moy  <moy@adacore.com>
4144         * sem_ch12.adb (Analyze_Generic_Package_Declaration): Set
4145         SPARK_Mode from context on generic package.
4146         * sem_ch7.adb (Analyze_Package_Declaration): Simplify code to remove
4147         useless test.
4149 2017-04-27  Claire Dross  <dross@adacore.com>
4151         * a-cofuve.ads (Range_Shifted): Rewrite precondition to avoid
4152         overflows in computations.
4153         * a-cofove.ads (Capacity_Range): Rewrite last bound to avoid
4154         overflows in computations.
4155         (Insert): Rewrite precondition to avoid overflows in computations.
4156         * a-cfinve.ads (Capacity_Range): Rewrite last bound to avoid
4157         overflows in computations.
4158         (Insert): Rewrite precondition to avoid overflows in computations.
4160 2017-04-27  Steve Baird  <baird@adacore.com>
4162         * exp_ch9.adb (Expand_N_Asynchronous_Select): Initialize the Cancel
4163         flag when it is declared in order to avoid confusing CodePeer about
4164         the possibility of an uninitialized variable read.
4166 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
4168         * sem_dim.adb (Analyze_Dimension_Object_Declaration): There is
4169         no dimensionality error if the subtype of the expression is
4170         identical to the nominal subtype in the declaration, even though
4171         the expression itself may have been constant-folded and lack a
4172         dimension vector.
4173         * sem_dim.ads: Add comments on setting of dimension vectors and
4174         its interaction with node rewritings and side-effect removal.
4176 2017-04-27  Bob Duff  <duff@adacore.com>
4178         * debug.adb: Minor comment correction.
4179         * sem_dim.ads: Minor reformatting and typo fixes.
4181 2017-04-27  Bob Duff  <duff@adacore.com>
4183         * g-table.adb, g-table.adsa, scos.h: From the C side, access First and
4184         Last of the tables via function calls, rather than relying on layout
4185         of data structures.
4187 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
4189         * exp_util.adb: No wrapper in GNATprove mode.
4191 2017-04-27  Yannick Moy  <moy@adacore.com>
4193         * sem_res.adb (Resolve_Comparison_Op): Always
4194         evaluate comparisons between values of universal types.
4196 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
4198         * sem_elab.adb (Check_Internal_Call_Continue): Do not generate
4199         an elaboration counter nor a check when in GNATprove mode.
4200         * sem_util.adb (Build_Elaboration_Entity): Do not create an
4201         elaboration counter when in GNATprove mode.
4203 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
4205         * freeze.adb: copy-paste typo.
4207 2017-04-27  Yannick Moy  <moy@adacore.com>
4209         * sem_prag.adb (Analyze_Pre_Post_In_Decl_Part):
4210         Use correct test to detect call in GNATprove mode instead of
4211         compilation.
4213 2017-04-27  Claire Dross  <dross@adacore.com>
4215         * a-cfdlli.adb, a-cfdlli.ads (Formal_Model.M_Elements_In_Union):
4216         New property function expressing that the element of a
4217         sequence are contained in the union of two sequences.
4218         (Formal_Model.M_Elements_Included): New property function
4219         expressing that the element of a sequence are another sequence.
4220         (Generic_Sorting): Use new property functions to state that
4221         elements are preserved by Sort and Merge.
4222         * a-cofove.adb, a-cofove.ads (=): Generic parameter removed to
4223         allow the use of regular equality over elements in contracts.
4224         (Formal_Model): Ghost package containing model functions
4225         that are used in subprogram contracts.  (Capacity):
4226         On unbounded containers, return the maximal capacity.
4227         (Current_To_Last): Removed, model functions should be used instead.
4228         (First_To_Previous): Removed, model functions should be used instead.
4229         (Append): Default parameter value replaced
4230         by new wrapper to allow more precise contracts.
4231         (Insert): Subprogram restored, it seems it was useful to users even if
4232         it is inefficient.
4233         (Delete): Subprogram restored, it seems it was useful to users even if
4234         it is inefficient.
4235         (Prepend): Subprogram restored, it seems it was useful to users even
4236         if it is inefficient.
4237         (Delete_First): Subprogram restored, it seems it
4238         was useful to users even if it is inefficient.  (Delete_Last):
4239         Default parameter value replaced by new wrapper to allow more
4240         precise contracts.
4241         (Generic_Sorting.Merge): Subprogram restored.
4242         * a-cfinve.adb, a-cfinve.ads (=): Generic parameter removed to
4243         allow the use of regular equality over elements in contracts.
4244         (Formal_Model): Ghost package containing model functions
4245         that are used in subprogram contracts.  (Capacity):
4246         On unbounded containers, return the maximal capacity.
4247         (Current_To_Last): Removed, model functions should be used
4248         instead.
4249         (First_To_Previous): Removed, model functions should be used instead.
4250         (Append): Default parameter value replaced
4251         by new wrapper to allow more precise contracts.
4252         (Insert): Subprogram restored, it seems it was useful to users even if
4253         it is inefficient.
4254         (Delete): Subprogram restored, it seems it was useful to users even if
4255         it is inefficient.
4256         (Prepend): Subprogram restored, it seems it was useful to users even
4257         if it is inefficient.
4258         (Delete_First): Subprogram restored, it seems it
4259         was useful to users even if it is inefficient.  (Delete_Last):
4260         Default parameter value replaced by new wrapper to allow more
4261         precise contracts.
4262         (Generic_Sorting.Merge): Subprogram restored.
4263         (Vector): Do not reuse formal vectors, as it is no longer possible
4264         to supply them with an equality function over elements.
4266 2017-04-27  Bob Duff  <duff@adacore.com>
4268         * g-dyntab.adb (Release): When allocating the new
4269         table, use the correct slice of the old table to initialize it.
4271 2017-04-27  Eric Botcazou  <ebotcazou@adacore.com>
4273         * einfo.ads: Minor fixes in comments.
4275 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
4277         * sem_prag.adb: disable clones in SPARK_Mode.
4279 2017-04-27  Gary Dismukes  <dismukes@adacore.com>
4281         * sem_util.ads, contracts.adb: Minor reformatting.
4283 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
4285         * sem_util.adb, sem_util.ads (Build_Class_Wide_Clone_Body):
4286         Build body of subprogram that has a class-wide condition that
4287         contains calls to other primitives.
4288         (Build_Class_Wide_Clone_Call); Build a call to the common
4289         class-wide clone of a subprogram with classwide conditions. The
4290         body of the subprogram becomes a wrapper for a call to the
4291         clone. The inherited operation becomes a similar wrapper to which
4292         modified conditions apply, and the call to the clone includes
4293         the proper conversion in a call the parent operation.
4294         (Build_Class_Wide_Clone_Decl (Spec_Id : Entity_Id): For a
4295         subprogram that has a classwide condition that contains calls to
4296         other primitives, build an internal subprogram that is invoked
4297         through a type-specific wrapper for all inherited subprograms
4298         that may have a modified condition.
4299         * sem_prag.adb (Check_References): If subprogram has a classwide
4300         condition, create entity for corresponding clone, to be invoked
4301         through wrapper subprograns.
4302         (Analyze_Pre_Post_Condition_In_Decl_Part): Do not emit error
4303         message about placement if pragma isi internally generated.
4304         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If subprogram has
4305         a classwide clone, build body of clone as copy of original body,
4306         and rewrite original body as a wrapper as a wrapper for a call to
4307         the clone, so that it incorporates the original pre/postconditions
4308         of the subprogram.
4309         * freeze.adb (Check_Inherited_Conditions): For an inherited
4310         subprogram that inherits a classwide condition, build spec and
4311         body of corresponding wrapper so that call to inherited operation
4312         gets the modified conditions.
4313         * contracts.adb (Analyze_Contracts): If analysis of classwide
4314         condition has created a clone for a primitive operation, analyze
4315         declaration of clone.
4317 2017-04-27  Steve Baird  <baird@adacore.com>
4319         * exp_util.adb (Build_Allocate_Deallocate_Proc):
4320         Add "Suppress => All_Checks" to avoid generating unnecessary
4321         checks.
4323 2017-04-27  Yannick Moy  <moy@adacore.com>
4325         * debug.adb: Reserve debug flag 'm' for no inlining in GNATprove.
4326         * sem_ch6.adb (Anayze_Subprogram_Body_Helper): Skip creation of
4327         inlining body in GNATprove mode when switch -gnatdm used.
4328         * sem_res.adb (Resolve_Call): Skip detection of lack of inlining
4329         in GNATprove mode when switch -gnatdm used.
4331 2017-04-27  Arnaud Charlet  <charlet@adacore.com>
4333         * sem_ch13.adb (Analyze_Attribute_Definition_Clause
4334         [Attribute_Address]): Call Set_Address_Taken when ignoring rep
4335         clauses, so that we keep an indication of the address clause
4336         before removing it from the tree.
4338 2017-04-27  Yannick Moy  <moy@adacore.com>
4340         * exp_util.ads, exp_util.adb (Evaluate_Name): Force evaluation
4341         of expression being qualified, when not an object name, or else
4342         evaluate the underlying name.
4344 2017-04-27  Jerome Lambourg  <lambourg@adacore.com>
4346         * bindusg.adb, bindgen.adb, gnatbind.adb, opt.ads: add -nognarl switch.
4348 2017-04-27  Justin Squirek  <squirek@adacore.com>
4350         * exp_ch7.adb (Build_Finalize_Statements): Move Num_Comps to
4351         Process_Component_List_For_Finalization as a local variable.
4352         (Process_Component_For_Finalize): Add an extra parameter to avoid
4353         global references.
4354         (Process_Component_List_For_Finalization): Correct calls to
4355         Process_Component_For_Finalize to take Num_Comps as a parameter.
4357 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
4359         * sem_ch8.adb (Find_Direct_Name): Account for the case where
4360         a use-visible entity is defined within a nested scope of an
4361         instance when giving priority to entities which were visible in
4362         the original generic.
4363         * sem_util.ads, sem_util.adb (Nearest_Enclosing_Instance): New routine.
4365 2017-04-27  Tristan Gingold  <gingold@adacore.com>
4367         * raise-gcc.c: Don't use unwind.h while compiling
4368         for the frontend, but mimic host behavior.
4370 2017-04-27  Javier Miranda  <miranda@adacore.com>
4372         * sem_ch3.adb (Build_Discriminated_Subtype):
4373         Propagate Has_Pragma_Unreferenced_Objects to the built subtype.
4375 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
4377         * sem_prag.adb (Analyze_Global_Item):
4378         Do not consider discriminants because they are not "entire
4379         objects". Remove the discriminant-related checks because they are
4380         obsolete.
4381         (Analyze_Input_Output): Do not consider discriminants
4382         because they are not "entire objects".
4384 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
4386         * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Do not
4387         perform check if the current scope does not come from source,
4388         as is the case for a rewritten task body, because check has
4389         been performed already, and may not be doable because of changed
4390         visibility.
4392 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
4394         * a-cofuse.adb, a-cfdlli.adb, a-cofuse.ads, a-cfdlli.ads, a-cofuve.adb,
4395         a-cofuve.ads, a-cofuma.adb, a-cofuma.ads, sem_eval.adb, a-cofuba.adb:
4396         Minor reformatting.
4398 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
4400         * sem_ch4.adb (Analyze_Call): If the return type of a function
4401         is incomplete in an context in which the full view is available,
4402         replace the type of the call by the full view, to prevent spurious
4403         type errors.
4404         * exp_disp.adb (Check_Premature_Freezing): Disable check on an
4405         abstract subprogram so that compiler does not reject a parameter
4406         of a primitive operation of a tagged type being frozen, when
4407         the untagged type of that parameter cannot be frozen.
4409 2017-04-27  Bob Duff  <duff@adacore.com>
4411         * sem_attr.adb (Compute_Type_Key): Don't walk
4412         representation items for irrelevant types, which could be in a
4413         different source file.
4415 2017-04-27  Steve Baird  <baird@adacore.com>
4417         * exp_attr.adb (Expand_N_Attribute_Reference):
4418         Don't expand Image, Wide_Image, Wide_Wide_Image attributes
4419         for CodePeer.
4421 2017-04-27  Yannick Moy  <moy@adacore.com>
4423         * exp_unst.ads: Fix typos in comments.
4425 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
4427         * sem_eval.adb (Choice_Matches): Handle properly a real literal
4428         whose type has a defined static predicate.
4430 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
4432         * exp_ch4.adb (Insert_Dereference_Action):
4433         Do not adjust the address of a controlled object when the
4434         associated access type is subject to pragma No_Heap_Finalization.
4435         Code reformatting.
4437 2017-04-27  Pierre-Marie de Rodat  <derodat@adacore.com>
4439         * gcc-interface/utils.c (gnat_type_for_size): Set
4440         TYPE_ARTIFICIAL on created types.
4442 2017-04-27  Claire Dross  <dross@adacore.com>
4444         * a-cfdlli.adb, a-cfdlli.ads (Formal_Model): Adapt to
4445         modifications in functional containers.
4446         * a-cofuba.ads, a-cofuma.ads, a-cofuse.ads, a-cofuve.ads Reformat
4447         to improve readablity. Subprograms are separated between basic
4448         operations, constructors and properties. Universally quantified
4449         formulas in contracts are factorized in independant functions
4450         with a name and a comment.  Names of parameters are improved.
4452 2017-04-27  Gary Dismukes  <dismukes@adacore.com>
4454         * exp_spark.adb, sem_elab.adb: Minor reformatting and typo fix.
4456 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
4458         * sem_res.adb (Resolve_Type_Conversion): Do not
4459         install a predicate check here since this is already done during
4460         the expansion phase. Verify whether the operand satisfies the
4461         static predicate (if any) of the target type.
4462         * sem_ch3.adb (Analyze_Object_Declaration): Do
4463         not install a predicate check if the object is initialized by
4464         means of a type conversion because the conversion is subjected
4465         to the same check.
4467 2017-04-27  Tristan Gingold  <gingold@adacore.com>
4469         * raise.c (__gnat_builtin_longjmp): Remove.
4470         (__gnat_bracktrace):
4471         Add a dummy definition for the compiler (__gnat_eh_personality,
4472         __gnat_rcheck_04, __gnat_rcheck_10) (__gnat_rcheck_19,
4473         __gnat_rcheck_20, __gnat_rcheck_21) (__gnat_rcheck_30,
4474         __gnat_rcheck_31, __gnat_rcheck_32): Likewise.
4475         * a-exexpr.adb: Renamed from a-exexpr-gcc.adb
4476         * a-except.ads, a-except.adb: Renamed from a-except-2005.ads
4477         and a-except-2005.adb.
4478         * raise-gcc.c: Allow build in compiler, compiled as a C++
4479         file.
4480         (__gnat_Unwind_ForcedUnwind): Adjust prototype.
4481         (db): Constify msg_format.
4482         (get_call_site_action_for): Don't use void arithmetic.
4483         * system.ads (Frontend_Exceptions): Set to False.
4484         (ZCX_By_Default): Set to True.
4485         (GCC_ZC_Support): Set to True.
4486         * gcc-interface/Makefile.in: No more variants for a-exexpr.adb and
4487         a-except.ad[sb].
4488         * gcc-interface/Make-lang.in: Add support for backend zcx exceptions
4489         in gnat1 and gnatbind.
4490         * gnat1, gnatbind: link with raise-gcc.o, a-exctra.o, s-addima.o,
4491         s-excmac.o, s-imgint.o, s-traceb.o, s-trasym.o, s-wchstw.o
4492         * s-excmac.ads, s-excmac.adb: Copy of variants.
4493         * a-except.o: Adjust preequisites.
4494         Add handling of s-excmac-arm.adb and s-excmac-gcc.adb.
4496 2017-04-27  Claire Dross  <dross@adacore.com>
4498         * a-cfdlli.adb, a-cfdlli.ads (Formal_Model): Adapt to
4499         modifications in functional containers.
4500         * a-cofuba.ads, a-cofuma.ads, a-cofuse.ads, a-cofuve.ads Reformat
4501         to improve readablity. Subprograms are separated between basic
4502         operations, constructors and properties. Universally quantified
4503         formulas in contracts are factorized in independant functions
4504         with a name and a comment.  Names of parameters are improved.
4506 2017-04-27  Gary Dismukes  <dismukes@adacore.com>
4508         * exp_spark.adb, sem_elab.adb: Minor reformatting and typo fix.
4510 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
4512         * sem_res.adb (Resolve_Type_Conversion): Do not
4513         install a predicate check here since this is already done during
4514         the expansion phase. Verify whether the operand satisfies the
4515         static predicate (if any) of the target type.
4516         * sem_ch3.adb (Analyze_Object_Declaration): Do
4517         not install a predicate check if the object is initialized by
4518         means of a type conversion because the conversion is subjected
4519         to the same check.
4521 2017-04-27  Tristan Gingold  <gingold@adacore.com>
4523         * a-except.ads, a-except.adb, a-exexpr.adb: Removed (will be
4524         replaced by their variants).
4526 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
4528         * exp_prag.adb, a-cofuse.adb, a-cofuse.ads, einfo.adb, sem_prag.adb,
4529         cstand.adb, par-prag.adb, a-cofuve.adb, a-cofuve.ads, a-cofuma.adb,
4530         a-cofuma.ads, a-cofuba.adb, a-cofuba.ads: Minor reformatting.
4532 2017-04-27  Tristan Gingold  <gingold@adacore.com>
4534         * s-excmac-gcc.ads, s-excmac-gcc.adb,
4535         s-excmac-arm.ads, s-excmac-arm.adb (New_Occurrence): Rewrite it in
4536         Ada95.
4538 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
4540         * exp_ch7.adb (Establish_Transient_Scope): Rewrite
4541         the loop which detects potential enclosing transient scopes. The
4542         loop now terminates much earlier as transient scopes are bounded
4543         by packages and subprograms.
4545 2017-04-27  Claire Dross  <dross@adacore.com>
4547         * a-cfdlli.adb, a-cfdlli.ads (=): Generic parameter removed to
4548         allow the use of regular equality over elements in contracts.
4549         (Cursor): Type is now public so that it can be used in
4550         model functions.
4551         (Formal_Model): Ghost package containing
4552         model functions that are used in subprogram contracts.
4553         (Current_To_Last): Removed, model functions should be used
4554         instead.
4555         (First_To_Previous): Removed, model functions should
4556         be used instead.
4557         (Strict_Equal): Removed, model functions
4558         should be used instead.
4559         (Append): Default parameter value
4560         replaced by new wrapper to allow more precise contracts.
4561         (Insert): Default parameter value replaced by new wrapper to
4562         allow more precise contracts.
4563         (Delete): Default parameter
4564         value replaced by new wrapper to allow more precise contracts.
4565         (Prepend): Default parameter value replaced by new wrapper to
4566         allow more precise contracts.
4567         (Delete_First): Default parameter
4568         value replaced by new wrapper to allow more precise contracts.
4569         (Delete_Last): Default parameter value replaced by new wrapper
4570         to allow more precise contracts.
4572 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
4574         * exp_spark.adb (Expand_SPARK): Perform specialized expansion
4575         for object declarations.
4576         (Expand_SPARK_N_Object_Declaration): New routine.
4577         * sem_elab.adb (Check_A_Call): Include calls to the
4578         Default_Initial_Condition procedure of a type under the SPARK
4579         elaboration checks umbrella.
4581 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
4583         * sem.adb (Analyze): Diagnose an illegal iterated component
4584         association.
4585         * sem_util.ads, sem_util.adb
4586         (Diagnose_Iterated_Component_Association): New routine.
4588 2017-04-27  Bob Duff  <duff@adacore.com>
4590         * adaint.c (__gnat_get_current_dir): Return 0 in length if
4591         getcwd fails.
4592         * a-direct.adb, g-dirope.adb, osint.adb, s-os_lib.adb: Raise
4593         exception if getcwd failed.
4595 2017-04-27  Yannick Moy  <moy@adacore.com>
4597         * exp_dbug.adb, exp_dbug.ads (Get_External_Name): Prefix ghost
4598         entities with special prefix.
4600 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
4602         * debug.adb Change the documentation of switch -gnatd.s.
4603         * exp_ch7.adb (Make_Transient_Block): Transient blocks do not need
4604         to manage the secondary stack when an enclosing scope already
4605         performs this functionality (aka relaxed management). Switch
4606         -gnatd.s may be used to force strict management in which case
4607         the block will manage the secondary stack unconditionally. Add
4608         a guard to stop the traversal when encountering a package or a
4609         subprogram scope.
4611 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
4613         * sem_res.adb (Resolve_Call): Refine further the handling of
4614         limited views of return types in function calls. If the function
4615         that returns a limited view appears in the current unit,
4616         we do not replace its type by the non-limited view because
4617         this transformation is performed int the back-end. However,
4618         the type of the call itself must be the non-limited view, to
4619         prevent spurious resolution errors.
4621 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
4623         * einfo,ads, einfo.adb (Class_Wide_Preconds, Class_Wide_Postconds):
4624         Removed, proposed implementation using generics for class-wide
4625         preconditions proved impractical.
4626         (Class_Wide_Clone): New attribute of subprogram. Designates
4627         subprogram created for primitive operations with class-wide
4628         pre/postconditions that contain calls to other primitives. The
4629         clone holds the body of the original primitive, but the
4630         pre/postonditions do not apply to it. The original body is
4631         rewritten as a wrapper for a call to the clone.
4632         (Is_Class_Wide_Clone): New flag to identify a Class_Wide_Clone. If
4633         the flag is set, no code for the corresponding pre/postconditions
4634         is inserted into its body.
4636 2017-04-27  Bob Duff  <duff@adacore.com>
4638         * exp_prag.adb, par-prag.adb, sem_ch13.adb: Ignore
4639         Scalar_Storage_Order if -gnatI is given.
4640         * sem_prag.adb (Analyze_Pragma): Ignore
4641         Default_Scalar_Storage_Order if -gnatI is given.
4643 2017-04-27  Claire Dross  <dross@adacore.com>
4645         * a-cofuba.ads (Add): Take as an additional input parameter
4646         the position where the element should be inserted.
4647         (Remove): New function that removes an element from the container.
4648         * a-cofuma.ads (Add): Adapt to the new API of Base.Add.
4649         * a-cofuse.ads (Add): Adapt to the new API of Base.Add.
4650         (Remove): New function that removes an element from a set.
4651         * a-cofuve.ads (Add): Adapt to the new API of Base.Add.
4652         (Remove): New function that removes an element from a sequence.
4653         (Insert): New function that adds anywhere in a sequence.
4655 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
4657         * checks.adb (Generate_Range_Check): Revert previous change.
4659 2017-04-27  Gary Dismukes  <dismukes@adacore.com>
4661         * sem_util.adb: Minor reformatting/rewording.
4663 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
4665         * lib-xref.adb (Generate_Reference): The use
4666         of attribute 'Result is not considered a violation of pragma
4667         Unreferenced.
4669 2017-04-27  Justin Squirek  <squirek@adacore.com>
4671         * cstand.adb (Create_Standard): Correctly set
4672         Directly_Designated_Type for Any_Access.
4673         * sem_type.adb (Covers): Minor grammar fixes.
4675 2017-04-27  Bob Duff  <duff@adacore.com>
4677         * sem_attr.adb: Minor cleanup.
4679 2017-04-27  Claire Dross  <dross@adacore.com>
4681         * a-cofuba.ads, a-cofuba.adb (Ada.Containers.Functional_Base): New
4682         private child of Ada.Containers used to implement all functional
4683         containers.
4684         * a-cofuma.ads, a-cofuma.adb (Ada.Containers.Functional_Maps): New
4685         child of Ada.Containers. It provides functional indefinite unbounded
4686         maps which can be used as high level models for specification
4687         of data structures.
4688         * a-cofuse.ads, a-cofuse.adb (Ada.Containers.Functional_Sets): New
4689         child of Ada.Containers. It provides functional indefinite unbounded
4690         sets which can be used as high level models for specification
4691         of data structures.
4692         * a-cofuve.ads, a-cofuve.adb (Ada.Containers.Functional_Vectors): New
4693         child of Ada.Containers.  It provides functional indefinite unbounded
4694         vectors which can be used as high level models for specification
4695         of data structures.
4696         * Makefile.rtl: Add new packages.
4697         * impunit.adb: Add new packages.
4699 2017-04-27  Gary Dismukes  <dismukes@adacore.com>
4701         * sem_ch4.adb: Minor reformatting.
4703 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
4705         * sem_ch12.adb (Analyze_Associations): minor reformatting.
4706         (Check_Fixed_Point_Actual): Do not emit a warning on a fixed
4707         point type actual that has user-defined arithmetic primitives,
4708         when there is a previous actual for a formal package that defines
4709         a fixed-point type with the parent user-defined operator.
4711 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
4713         * checks.adb (Generate_Range_Check): Reinstate part of previous change.
4714         * sem_attr.adb (Resolve_Attribute): Generate a range check when
4715         the component type allows range checks.
4717 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
4719         * sem_aux.adb (Is_Generic_Formal): Use original node to locate
4720         corresponding declaration, because formal derived types are
4721         rewritten as private extensions.
4723 2017-04-27  Ed Schonberg  <schonberg@adacore.com>
4725         * sem_dim.adb (Analyze_Dimension_Binary_Op): Do not check
4726         dimensions of operands if node has been analyzed already, because
4727         previous analysis and dimension checking will have removed the
4728         dimension information from the operands.
4730 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
4732         * debug.adb: Document the use of switch -gnatd.s.
4733         * einfo.ads Update the documentation on attribute
4734         Sec_Stack_Needed_For_Return and attribute Uses_Sec_Stack. Remove
4735         the uses of these attributes from certain entities.
4736         * exp_ch7.adb (Make_Transient_Block): Reimplement the circuitry
4737         which determines whether the block should continue to manage
4738         the secondary stack.
4739         (Manages_Sec_Stack): New routine.
4741 2017-04-27  Bob Duff  <duff@adacore.com>
4743         * atree.ads: Minor edit.
4745 2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>
4747         * sinfo.ads: Update the section on Ghost mode. Add
4748         a section on SPARK mode. Update the placement of section on
4749         expression functions.
4751 2017-04-27  Bob Duff  <duff@adacore.com>
4753         * sinput.adb (Get_Source_File_Index): Don't
4754         assert that S is in the right range in the case where this is
4755         a .dg file under construction.
4757 2017-04-27  Yannick Moy  <moy@adacore.com>
4759         * sem_util.adb (Check_Result_And_Post_State):
4760         Handle more precisely each conjunct in expressions formed by
4761         and'ing sub-expressions.
4763 2017-04-27  Gary Dismukes  <dismukes@adacore.com>
4765         * exp_ch4.adb, sem_ch4.adb: Minor typo fix and reformatting.
4767 2017-04-25  Arnaud Charlet  <charlet@adacore.com>
4769         * gnat_rm.texi, gnat_ugn.texi,
4770         doc/gnat_ugn/building_executable_programs_with_gnat.rst,
4771         doc/gnat_ugn/platform_specific_information.rst,
4772         doc/gnat_ugn/gnat_and_program_execution.rst,
4773         doc/gnat_ugn/gnat_utility_programs.rst,
4774         doc/gnat_ugn/the_gnat_compilation_model.rst,
4775         doc/gnat_rm/implementation_defined_attributes.rst,
4776         doc/gnat_rm/the_gnat_library.rst,
4777         doc/gnat_rm/implementation_defined_pragmas.rst,
4778         doc/gnat_rm/representation_clauses_and_pragmas.rst,
4779         doc/gnat_rm/implementation_of_specific_ada_features.rst,
4780         doc/gnat_rm/implementation_defined_aspects.rst,
4781         doc/gnat_rm/implementation_defined_characteristics.rst: Update
4782         documentation.
4784 2017-04-25  Arnaud Charlet  <charlet@adacore.com>
4786         * exp_ch4.adb (Expand_N_Case_Expression): Emit error message when
4787         generating C code on complex case expressions.
4789 2017-04-25  Arnaud Charlet  <charlet@adacore.com>
4791         * sem_prag.adb (Analyze_Pragma): Generate a warning instead
4792         of silently ignoring pragma Ada_xxx in Latest_Ada_Only mode.
4793         * directio.ads, ioexcept.ads, sequenio.ads, text_io.ads: Use
4794         Ada_2012 instead of Ada_2005 to be compatible with the above
4795         change.
4796         * bindgen.adb: Silence new warning on pragma Ada_95.
4798 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
4800         * checks.adb (Generate_Range_Check): Revert part of previous change.
4802 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
4804         * sem_ch4.adb (Try_Container_Indexing): Handle properly a
4805         container indexing operation that appears as a an actual in a
4806         parameter association in a procedure call.
4808 2017-04-25  Olivier Ramonat  <ramonat@adacore.com>
4810         * prj-proc.adb, sem_util.adb, s-stposu.adb, sem_attr.adb, prj-conf.ads:
4811         Fix spelling mistakes.
4813 2017-04-25  Bob Duff  <duff@adacore.com>
4815         * types.ads, osint.adb, sinput-c.adb, sinput-d.adb, sinput-l.adb,
4816         * sinput-p.adb: Use regular fat pointers, with bounds checking,
4817         for source buffers.  Fix misc obscure bugs.
4818         * sinput.ads, sinput.adb: Use regular fat pointers, with bounds
4819         checking, for source buffers.  Modify representation clause for
4820         Source_File_Record as appropriate.  Move Source_File_Index_Table
4821         from spec to body, because it is not used outside the body.
4822         Move Set_Source_File_Index_Table into the private part, because
4823         it is used only in the body and in children.  Use trickery to
4824         modify the dope in the generic instantiation case.  It's ugly,
4825         but not as ugly as the previous method.  Fix documentation.
4826         Remove obsolete code.
4827         * fname-sf.adb, targparm.adb: Fix misc out-of-bounds
4828         indexing in source buffers.
4829         * fmap.adb: Avoid conversions from one string type to another.
4830         Remove a use of global name buffer.
4831         * osint.ads, sfn_scan.ads, sfn_scan.adb, sinput-c.ads: Comment
4832         fixes.
4834 2017-04-25  Gary Dismukes  <dismukes@adacore.com>
4836         * exp_util.adb, exp_ch4.adb: Minor reformatting.
4838 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
4840         * checks.adb: Code clean up in various routines.
4841         (Generate_Range_Check): Do not generate a range check when the
4842         expander is not active or when index/range checks are suppressed
4843         on the target type.
4844         (Insert_List_After_And_Analyze, Insert_List_Before_And_Analyze):
4845         Remove variants that include a Supress parameter. These routines
4846         are never used, and were introduced before the current scope-based
4847         check suppression method.
4849 2017-04-25  Vasiliy Fofanov  <fofanov@adacore.com>
4851         * prj-part.adb, cstreams.c, osint.adb, osint.ads: Remove VMS specific
4852         code and some subprogram calls that are now noop.
4854 2017-04-25  Arnaud Charlet  <charlet@adacore.com>
4856         * exp_ch4.adb (Expand_N_Case_Expression): Take
4857         Minimize_Expression_With_Actions into account when possible.
4859 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
4861         * exp_util.adb (Known_Non_Null): Moved to Sem_Util.
4862         (Known_Null): Moved to Sem_Util.
4863         * exp_util.ads (Known_Non_Null): Moved to Sem_Util.
4864         (Known_Null): Moved to Sem_Util.
4865         * sem_util.adb Add new enumeration type Null_Status_Kind.
4866         (Known_Non_Null): Moved from Exp_Util. Most of the logic in
4867         this routine is now carried out by Null_Status.
4868         (Known_Null): Moved from Exp_Util. Most of the logic in this routine
4869         is now carried out by Null_Status.
4870         (Null_Status): New routine.
4871         * sem_util.ads (Known_Non_Null): Moved from Exp_Util.
4872         (Known_Null): Moved from Exp_Util.
4874 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
4876         * sem_ch6.adb (Analyze_Expression_Function): Do not report an
4877         error on the return type of an expression function that is a
4878         completion, if the type is derived from a generic formal type.
4880 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
4882         * sem_dim.adb (Dimensions_Of_Operand): The dimensions of a type
4883         conversion are those of the target type.
4885 2017-04-25  Bob Duff  <duff@adacore.com>
4887         * a-clrefi.adb: Minor cleanup.
4889 2017-04-25  Gary Dismukes  <dismukes@adacore.com>
4891         * exp_util.adb, exp_util.ads, types.ads: Minor reformatting.
4893 2017-04-25  Bob Duff  <duff@adacore.com>
4895         * err_vars.ads, fmap.adb, fmap.ads, comperr.adb, fname-sf.adb,
4896         types.adb, types.ads, types.h, sinput-l.adb, targparm.adb,
4897         errout.adb, sinput.adb, sinput.ads, cstand.adb, scn.adb,
4898         scn.ads, gnatls.adb: Eliminate the vestigial Internal_Source_File and
4899         the Internal_Source buffer. This removes the incorrect call to "="
4900         the customer noticed.
4901         Wrap remaining calls to "=" in Null_Source_Buffer_Ptr. We
4902         eventually need to eliminate them altogether. Or else get rid
4903         of zero-origin addressing.
4905 2017-04-25  Claire Dross  <dross@adacore.com>
4907         * exp_util.ads (Expression_Contains_Primitives_Calls_Of): New
4908         function used in GNATprove to know if an expression contains
4909         non-dispatching calls on primitives of a tagged type.
4911 2017-04-25  Bob Duff  <duff@adacore.com>
4913         * rtsfind.adb (Initialize): Initialize
4914         First_Implicit_With. Building the compiler with Normalize_Scalars
4915         and validity checking finds this being used as an uninitialized
4916         variable.
4918 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
4920         * contracts.adb (Analyze_Entry_Or_Subprogram_Body_Contract):
4921         Add a warning about SPARK mode management. The routine now
4922         saves and restores both the mode and associated pragma.
4923         (Analyze_Entry_Or_Subprogram_Contract): Add a warning about
4924         SPARK mode management. The routine now saves and restores both
4925         the mode and associated pragma.
4926         (Analyze_Object_Contract):
4927         Add a warning about SPARK mode management. The routine
4928         now saves and restores both the mode and associated pragma.
4929         (Analyze_Package_Body_Contract): Add a warning about SPARK mode
4930         management.  The routine now saves and restores both the mode
4931         and associated pragma.  (Analyze_Package_Contract): Add a warning
4932         about SPARK mode management. The routine now saves and restores
4933         both the mode and associated pragma.
4934         (Analyze_Task_Contract):
4935         Add a warning about SPARK mode management. The routine now saves
4936         and restores both the mode and associated pragma.
4937         * expander.adb (Expand): Change the way the Ghost mode is saved
4938         and restored.
4939         * exp_ch3.adb (Freeze_Type): Change the way the Ghost mode is
4940         saved and restored.
4941         * exp_disp.adb (Make_DT): Change the way the Ghost mode is saved
4942         and restored.
4943         * exp_util.adb (Build_DIC_Procedure_Body):
4944         Change the way the Ghost mode is saved and restored.
4945         (Build_DIC_Procedure_Declaration): Change the way the Ghost
4946         mode is saved and restored.
4947         (Build_Invariant_Procedure_Body):
4948         Change the way the Ghost mode is saved and restored.
4949         (Build_Invariant_Procedure_Declaration): Change the way the Ghost
4950         mode is saved and restored.
4951         (Make_Predicate_Call): Change the
4952         way the Ghost mode is saved and restored.
4953         * freeze.adb (Freeze_Entity): Change the way the Ghost mode is
4954         saved and restored.
4955         * ghost.adb (Mark_And_Set_Ghost_Assignment): Remove parameter Mode
4956         and its assignment.
4957         (Mark_And_Set_Ghost_Body): Remove parameter
4958         Mode and its assignment.
4959         (Mark_And_Set_Ghost_Completion):
4960         Remove parameter Mode and its assignment.
4961         (Mark_And_Set_Ghost_Declaration): Remove parameter Mode and its
4962         assignment.
4963         (Mark_And_Set_Ghost_Instantiation): Remove parameter
4964         Mode and its assignment.
4965         (Mark_And_Set_Ghost_Procedure_Call):
4966         Remove parameter Mode and its assignment.
4967         (Set_Ghost_Mode):
4968         Remove parameter Mode and its assignment.
4969         * ghost.ads (Mark_And_Set_Ghost_Assignment): Remove parameter Mode
4970         and update the comment on usage.
4971         (Mark_And_Set_Ghost_Body):
4972         Remove parameter Mode and update the comment on usage.
4973         (Mark_And_Set_Ghost_Completion): Remove parameter Mode and
4974         update the comment on usage.
4975         (Mark_And_Set_Ghost_Declaration):
4976         Remove parameter Mode and update the comment on usage.
4977         (Mark_And_Set_Ghost_Instantiation): Remove parameter Mode and
4978         update the comment on usage.
4979         (Mark_And_Set_Ghost_Procedure_Call):
4980         Remove parameter Mode and update the comment on usage.
4981         (Set_Ghost_Mode): Remove parameter Mode and update the comment
4982         on usage.
4983         * lib.ads Remove obsolete fields SPARK_Mode_Pragma from various
4984         types.
4985         * lib-load.adb (Create_Dummy_Package_Unit): Remove the assignment
4986         of obsolete field SPARK_Mode_Pragma.
4987         (Load_Main_Source): Remove
4988         the assignment of obsolete field SPARK_Mode_Pragma.
4989         (Load_Unit): Remove the assignment of obsolete field SPARK_Mode_Pragma.
4990         * lib-writ.adb (Add_Preprocessing_Dependency): Remove
4991         the assignment of obsolete field SPARK_Mode_Pragma.
4992         (Ensure_System_Dependency): Remove the assignment of obsolete
4993         field SPARK_Mode_Pragma.
4994         * rtsfind.adb (Load_RTU): Add a warning about Ghost and SPARK
4995         mode management. Change the way Ghost and SPARK modes are saved
4996         and restored.
4997         * sem.adb (Analyze): Change the way the Ghost mode is saved
4998         and restored.
4999         * sem_ch3.adb (Analyze_Object_Declaration): Change the way the
5000         Ghost mode is saved and restored.
5001         (Process_Full_View): Change
5002         the way the Ghost mode is saved and restored.
5003         * sem_ch5.adb (Analyze_Assignment): Change the way the Ghost
5004         mode is saved and restored.
5005         * sem_ch6.adb (Analyze_Procedure_Call): Change the way the Ghost
5006         mode is saved and restored.
5007         (Analyze_Subprogram_Body_Helper):
5008         Change the way the Ghost mode is saved and restored.
5009         * sem_ch7.adb (Analyze_Package_Body_Helper): Change the way the
5010         Ghost mode is saved and restored.
5011         * sem_ch10.adb (Analyze_Subunit): Add a warning about SPARK mode
5012         management. Save the SPARK mode-related data prior to any changes
5013         to the scope stack and contexts. The mode is then reinstalled
5014         before the subunit is analyzed in order to restore the original
5015         view of the subunit.
5016         * sem_ch12.adb (Analyze_Package_Instantiation): Update the
5017         warning on region management.  Change the way the Ghost and
5018         SPARK modes are saved and restored.
5019         (Inline_Instance_Body):
5020         Add a warning about SPARK mode management. Code clean up.
5021         (Analyze_Subprogram_Instantiation): Update the warning on region
5022         management.  Change the way the Ghost and SPARK modes are saved
5023         and restored.
5024         (Instantiate_Package_Body): Update the warning
5025         on region management. Change the way the Ghost and SPARK modes
5026         are saved and restored.
5027         (Instantiate_Subprogram_Body): Update
5028         the warning on region management. Change the way the Ghost and
5029         SPARK modes are saved and restored.
5030         (Set_Instance_Env): Add a
5031         warning about SPARK mode management. Change the way SPARK mode
5032         is saved and restored.
5033         * sem_ch13.adb (Build_Predicate_Functions):
5034         Change the way the Ghost mode is saved and restored.
5035         (Build_Predicate_Function_Declaration): Change the way the Ghost
5036         mode is saved and restored.
5037         * sem_elab.adb (Check_Elab_Calls): Add a warning about SPARK
5038         mode management. Change the way SPARK mode is saved and restored.
5039         * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
5040         Change the way the Ghost mode is saved and restored.
5041         (Analyze_Initial_Condition_In_Decl_Part): Change the way
5042         the Ghost mode is saved and restored.
5043         (Analyze_Pragma):
5044         Change the way the Ghost mode is saved and restored.
5045         (Analyze_Pre_Post_Condition_In_Decl_Part): Change the way the
5046         Ghost mode is saved and restored.
5047         * sem_util.adb (Install_SPARK_Mode): New routine.
5048         (Restore_SPARK_Mode): New routine.
5049         (Save_SPARK_Mode_And_Set): Removed.
5050         (Set_SPARK_Mode): New routine.
5051         * sem_util.ads (Install_SPARK_Mode): New routine.
5052         (Restore_SPARK_Mode): New routine.
5053         (Save_SPARK_Mode_And_Set): Removed.
5054         (Set_SPARK_Mode): New routine.
5056 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
5058         * sem_util.adb, sem_util.ads (From_Nested_Package): New predicate
5059         to determine whether a type is declared in a local package that
5060         has not yet been frozen.
5061         * freeze.adb (Freeze_Before): Use new predicate to determine
5062         whether a local package must be installed on the scope stack
5063         in order to evaluate in the proper scope actions generated by
5064         aspect specifications, such as Predicate
5065         * sem_ch13.adb: Simplify code in Analyze_Aspects_At_Freeze_Point
5066         using new predicate.
5068 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
5070         * sem_warn.adb (Warn_On_Constant_Valid_Condition): Do not consider
5071         comparisons between non- scalar expressions expressions because
5072         their values cannot be invalidated.
5073         * sem_warn.ads (Warn_On_Constant_Valid_Condition): Update the
5074         comment on usage.
5076 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
5078         * par_sco.adb: Minor reformatting.
5080 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
5082         * sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): If entity
5083         is a type from an unfrozen local package, install package to
5084         complete the analysis of delayed aspects of the type.
5086 2017-04-25  Tristan Gingold  <gingold@adacore.com>
5088         * bingen.adb (System_Version_Control_Used): New variable.
5089         (Resolve_Binder_Options): Set the above variable.
5090         (Gen_Output_File_Ada): Conditionally call Gen_Versions.
5091         (Gen_Elab_Order): Emit blank line before.
5093 2017-04-25  Justin Squirek  <squirek@adacore.com>
5095         * sem_cat.adb (Validate_RT_RAT_Component): Added
5096         an extra check to ignore incomplete types.
5098 2017-04-25  Thomas Quinot  <quinot@adacore.com>
5100         * sem_prag.adb (Analyze_Pragma, case Pragma_Check): Remove
5101         bogus circuitry for the case where Name is Predicate.
5103 2017-04-25  Thomas Quinot  <quinot@adacore.com>
5105         * par_sco.adb(Traverse_Declarations_Or_Statements.Traverse_Aspects):
5106         Create SCOs for Predicate aspects in disabled
5107         state initially, to be enabled later on by...
5108         * sem_ch13.adb (Build_Predicate_Functions.Add_Predicates): Mark
5109         SCO for predicate as enabled.
5111 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
5113         * comperr.adb (Compiler_Abort): Remove now obsolete pair of
5114         pragmas Warnings Off / On.
5115         * namet.adb (Finalize): Remove now obsolete pair of pragmas
5116         Warnings Off / On.
5117         * output.adb: Remove now obsolete pair of pragmas Warnings Off / On.
5118         * sem_warn.adb (Warn_On_Constant_Valid_Condition): Do not
5119         consider comparisons between static expressions because their
5120         values cannot be invalidated.
5121         * urealp.adb (Tree_Read): Remove now obsolete pair of pragmas
5122         Warnings Off / On.
5123         (Tree_Write): Remove now obsolete pair of pragmas Warnings Off / On.
5124         * usage.adb Remove now obsolete pair of pragmas Warnings Off / On.
5126 2017-04-25  Bob Duff  <duff@adacore.com>
5128         * sem_elab.adb (In_Task_Activation): Trace internal calls in
5129         task bodies.
5131 2017-04-25  Gary Dismukes  <dismukes@adacore.com>
5133         * sem_prag.adb, sem_warn.adb, sem_eval.adb: Minor reformatting and
5134         typo fixes.
5136 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
5138         * comperr.adb (Compiler_Abort): Add a pair of pragma Warnings
5139         On/Off to defend against a spurious warning in conditional
5140         compilation.
5141         * exp_ch4.adb (Rewrite_Comparison): Reimplemented.
5142         * namet.adb (Finalize): Add a pair of pragma Warnings On/Off to
5143         defend against a spurious warning in conditional compilation.
5144         * output.adb Add a pair of pragma Warnings On/Off to defend
5145         against a spurious warning in conditional compilation.
5146         * sem_eval.adb (Eval_Relational_Op): Major code clean up.
5147         (Fold_General_Op): New routine.
5148         (Fold_Static_Real_Op): New routine.
5149         (Test_Comparison): New routine.
5150         * sem_eval.ads (Test_Comparison): New routine.
5151         * sem_warn.adb (Is_Attribute_Constant_Comparison): New routine.
5152         (Warn_On_Constant_Valid_Condition): New routine.
5153         (Warn_On_Known_Condition): Use Is_Attribute_Constant_Comparison
5154         to detect a specific case.
5155         * sem_warn.adb (Warn_On_Constant_Valid_Condition): New routine.
5156         * urealp.adb (Tree_Read): Add a pair of pragma Warnings On/Off
5157         to defend against a spurious warning in conditional compilation.
5158         (Tree_Write): Add a pair of pragma Warnings On/Off to defend
5159         against a spurious warning in conditional compilation.
5160         * usage.adb Add a pair of pragma Warnings On/Off to defend
5161         against a spurious warning in conditional compilation.
5163 2017-04-25  Arnaud Charlet  <charlet@adacore.com>
5165         * sinfo.ads, sem_ch13.adb: Update comment.
5167 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
5169         * sem_util.adb (Is_Post_State): A reference to a
5170         generic in out parameter is considered a change in the post-state
5171         of a subprogram.
5173 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
5175         * sem_ch12.adb (Load_Parent_Of_Generic); When retrieving the
5176         declaration of a subprogram instance within its wrapper package,
5177         skip over null statements that may result from the rewriting of
5178         ignored pragmas.
5180 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
5182         * exp_attr.adb (Expand_Attribute_Reference, case 'Read):
5183         If the type is an unchecked_union, replace the attribute with
5184         a Raise_Program_Error (rather than inserting such before the
5185         attribute reference) to handle properly the case where we are
5186         processing a component of a larger record, and we need to prevent
5187         further expansion for the unchecked union.
5188         (Expand_Attribute_Reference, case 'Write): If the type is
5189         an unchecked_union, check whether enclosing scope is a Write
5190         subprogram. Replace attribute with a Raise_Program_Error if the
5191         discriminants of the unchecked_union type have not default values
5192         because such a use is erroneous..
5194 2017-04-25  Tristan Gingold  <gingold@adacore.com>
5196         * exp_ch9.adb (Expand_N_Task_Type_Declaration):
5197         Add relative_deadline to task record on edf profile.
5198         (Make_Initialize_Protection): Pass deadline_floor value on edf profile.
5199         (Make_Task_Create_Call): Pass relative_deadline value.
5200         * par-prag.adb (Prag): Handle Pragma_Deadline_Floor.
5201         * s-rident.ads (Profile_Name): Add GNAT_Ravenscar_EDF.
5202         (Profile_Info): Add info for GNAT_Ravenscar_EDF.
5203         * sem_prag.adb (Set_Ravenscar_Profile): Handle
5204         GNAT_Ravenscar_EDF (set scheduling policy).
5205         (Analyze_Pragma): Handle GNAT_Ravenscar_EDF profile and Deadline_Floor
5206         pragma.
5207         (Sig_Flags): Add choice for Pragma_Deadline_Floor.
5208         * snames.ads-tmpl (Name_Deadline_Floor, Name_Gnat_Ravenscar_EDF):
5209         New names.
5210         (Pragma_Deadline_Floor): New pragma.
5211         * targparm.adb (Get_Target_Parameters): Recognize
5212         GNAT_Ravenscar_EDF profile.
5214 2017-04-25  Arnaud Charlet  <charlet@adacore.com trojanek>
5216         * gnatvsn.ads (Library_Version): Bump to 8. Update comment.
5218 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
5220         * sem_aux.adb (Nearest_Ancestor): Use original node of type
5221         declaration to locate nearest ancestor, because derived
5222         type declarations for record types are rewritten as record
5223         declarations.
5224         * sem_ch13.adb (Add_Call): Use an unchecked conversion to handle
5225         properly derivations that are completions of private types.
5226         (Add_Predicates): If type is private, examine rep. items of full
5227         view, which may include inherited predicates.
5228         (Build_Predicate_Functions): Ditto.
5230 2017-04-25  Javier Miranda  <miranda@adacore.com>
5232         * sem_util.adb (New_Copy_Tree.Visit_Entity): Extend previous change
5233         to generate new entities for subtype declarations located in
5234         Expression_With_Action nodes.
5236 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
5238         * sem_elab.adb (Check_A_Call): Remove
5239         local variables Is_DIC_Proc and Issue_In_SPARK. Verify the
5240         need for Elaborate_All when SPARK elaboration checks are
5241         required. Update the checks for instances, variables, and calls
5242         to Default_Initial_Condition procedures.
5244 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
5246         * aspects.ads, aspects.adb: Make the GNAT-specific pragma No_Inline
5247         into a boolean aspect, in analogy with the Ada aspect No_Return.
5249 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
5251         * exp_ch6.adb, sem_ch13.adb, sem_ch6.adb: Minor reformatting.
5253 2017-04-25  Bob Duff  <duff@adacore.com>
5255         * sem_res.adb (Resolve_Actuals): Under -gnatd.q, reset
5256         Is_True_Constant for an array variable that is passed to a
5257         foreign function as an 'in' parameter.
5258         * debug.adb: Document -gnatd.q.
5260 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
5262         * sem_ch6.adb (Analyze_Expression_Function): If expression function
5263         is completion and return type is an access type do not freeze
5264         designated type: this will be done in the process of freezing
5265         the expression if needed.
5266         (Freeze_Expr_Types): Check whether type is complete before
5267         creating freeze node, to provide a better error message if
5268         reference is premature.
5269         * sem_ch13.adb (Check_Indexing_Functions): Ignore inherited
5270         functions created by type derivations.
5272 2017-04-25  Pascal Obry  <obry@adacore.com>
5274         * g-sercom.ads: Add simple usage of GNAT.Serial_Communication.
5276 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
5278         * sem_res.adb (Resolve_Type_Conversion):
5279         When resolving against any fixed type, set the type of the
5280         operand as universal real when the operand is a multiplication
5281         or a division where both operands are of any fixed type.
5282         (Unique_Fixed_Point_Type): Add local variable ErrN. Improve the
5283         placement of an error message by pointing to the operand of a
5284         type conversion rather than the conversion itself.
5286 2017-04-25  Thomas Quinot  <quinot@adacore.com>
5288         * sem_ch13.adb (Build_Predicate_Function_Declaration): Set
5289         Needs_Debug_Info when producing SCOs.
5291 2017-04-25  Thomas Quinot  <quinot@adacore.com>
5293         * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
5294         Always pass a null finalization master for a library level named access
5295         type to which a pragme No_Heap_Finalization applies.
5297 2017-04-25  Arnaud Charlet  <charlet@adacore.com trojanek>
5299         PR ada/78845
5301         * a-ngcoar.adb, a-ngrear.adb (Inverse): call Unit_Matrix with First_1
5302         set to A'First(2) and vice versa.
5304 2017-04-25  Yannick Moy  <moy@adacore.com>
5306         * freeze.adb (Freeze_Record_Type): Remove obsolete
5307         rule on volatile tagged record restriction on SPARK code.
5309 2017-04-25  Yannick Moy  <moy@adacore.com>
5311         * sem_prag.adb (minor) Fix SPARK RM reference.
5313 2017-04-25  Yannick Moy  <moy@adacore.com>
5315         * sem_util.adb, sem_util.ads (Unique_Defining_Entity): Update
5316         comment to reflect which entity is chosen as unique entity.
5317         (Unique_Entity): Return full view instead of private spec for
5318         protected type or task type. Fix possible incorrect access when
5319         called on entry.
5321 2017-04-25  Eric Botcazou  <ebotcazou@adacore.com>
5323         * sem_res.adb (Set_Slice_Subtype): Treat specially bit-packed
5324         array types only instead of all packed array types.
5326 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
5328         * sem_ch6.adb (Conforming_Types): If type of formal as a specified
5329         dimension system, verify that dimensions of both match.
5330         (Check_Conformance): Add error message in case of dimension
5331         mismatch.
5332         * sem_dim.ads, sem_dim.adb (Dimensions_Match): New utility
5333         predicate.
5335 2017-04-25  Arnaud Charlet  <charlet@adacore.com trojanek>
5337         * gnatxref.adb, gnatfind.adb: Avoid using the term project file,
5338         confusing.
5340 2017-04-25  Yannick Moy  <moy@adacore.com>
5342         * sem_util.adb: Minor refactoring.
5343         * freeze.adb (Freeze_Record_Type): Fix checking of SPARK RM 7.1.3(5).
5345 2017-04-25  Claire Dross  <dross@adacore.com>
5347         * sem_prag.adb (Collect_Inherited_Class_Wide_Conditions): Go to
5348         ultimate alias when accessing overridden operation. Indeed, if the
5349         overridden operation is itself inherited, it won't have any explicit
5350         contract.
5352 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
5354         * sem_warn.adb (Warn_On_Overlapping_Actuals): There can be no
5355         overlap if the two formals have different types, because formally
5356         the corresponding actuals cannot designate the same objects.
5358 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
5360         * sem_dim.adb (Dimensions_Of_Operand): minot cleanups: a) If
5361         dimensions are present from context, use them.  b) If operand is
5362         a static constant rewritten as a literal, obtain the dimensions
5363         from the original declaration, otherwise use dimensions of type
5364         established from context.
5366 2017-04-25  Yannick Moy  <moy@adacore.com>
5368         * sem_util.adb (Is_Effectively_Volatile): Protect against base type
5369         of array that is private.
5371 2017-04-25  Gary Dismukes  <dismukes@adacore.com>
5373         * sem_ch3.adb, exp_util.adb, sem_prag.adb, exp_ch4.adb: Minor
5374         reformatting.
5376 2017-04-25  Yannick Moy  <moy@adacore.com>
5378         * a-ngelfu.adb, a-ngelfu.ads: Add SPARK_Mode On on spec, Off
5379         on body.
5381 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
5383         * sem_disp.adb (Check_Dispatching_Context): Add guard to refine
5384         the check that recognizes a call to a private overridding and
5385         replaces the called subprogram with its alias.
5387 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
5389         * exp_util.adb: Minor reformatting.
5391 2017-04-25  Justin Squirek  <squirek@adacore.com>
5393         * exp_ch3.adb (Freeze_Type): Add condition to always treat
5394         interface types as a partial view of a private type for the
5395         generation of invariant procedure bodies.
5396         * exp_util.adb, exp_util.ads (Add_Inherited_Invariants):
5397         Add a condition to get the Corresponding_Record_Type for
5398         concurrent types, add condition to return in the absence of a
5399         class in the pragma, remove call to Replace_Type_References,
5400         and add call to Replace_References.
5401         (Add_Interface_Invariatns),
5402         (Add_Parent_Invariants): Modify call to Add_Inherited_Invariants
5403         to including the working type T.
5404         (Add_Own_Invariants): Remove
5405         legacy condition for separate units, remove dispatching for ASIS
5406         and save a copy of the expression in the pragma expression.
5407         (Build_Invariant_Procedure_Body): Default initalize vars,
5408         remove return condition on interfaces, always use the
5409         private type for interfaces, and move the processing of types
5410         until after the processing of invariants for the full view.
5411         (Build_Invariant_Procedure_Declaration): Remove condition
5412         to return if an interface type is encountered and add
5413         condition to convert the formal parameter to its class-wide
5414         counterpart if Work_Typ is abstract.
5415         (Replace_Type): Add call to Remove_Controlling_Arguments.
5416         (Replace_Type_Ref): Remove class-wide dispatching for the current
5417         instance of the type.
5418         (Replace_Type_References): Remove parameter "Derived"
5419         (Remove_Controlling_Arguments): Created in order to removing
5420         the controlliong argument from calls to primitives in the case
5421         of the formal parameter being an class-wide abstract type.
5422         * sem_ch3.adb (Build_Assertion_Bodies_For_Type): Almost identical
5423         to the change made to Freeze_Type in exp_ch3. Add a condition
5424         to treat interface types as a partial view.
5425         * sem_prag.adb (Analyze_Pragma): Modify parameters in the call
5426         to Build_Invariant_Procedure_Declaration to properly generate a
5427         "partial" invariant procedure when Typ is an interface.
5429 2017-04-25  Bob Duff  <duff@adacore.com>
5431         * a-numeri.ads: Go back to using brackets encoding for the Greek
5432         letter pi.
5434 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
5436         * sem_ch3.adb (Derive_Subprogram): Implement rule in RM 6.1.1
5437         (10-15): if derived type T with progenitors is abstract,
5438         and primitive P of this type inherits non-trivial classwide
5439         preconditions from both a parent operation and from an interface
5440         operation, then the inherited operation is abstract if the parent
5441         operation is not null.
5442         * sem_disp.ads, sem_disp.adb: replace function Covers_Some_Interface
5443         with Covered_Interface_Op to yield the actual interface operation
5444         that is implemented by a given inherited operation.
5446 2017-04-25  Javier Miranda  <miranda@adacore.com>
5448         * exp_ch4.adb (Expand_N_Op_Expon): Relocate left
5449         and right operands after performing the validity checks. Required
5450         because validity checks may remove side effects from the operands.
5452 2017-04-25  Javier Miranda  <miranda@adacore.com>
5454         * exp_attr.adb (Attribute_Unrestricted_Access):
5455         Do not disable implicit type conversion.  Required to generate
5456         code that displaces the pointer to reference the secondary
5457         dispatch table.
5459 2017-04-25  Pascal Obry  <obry@adacore.com>
5461         * prj-attr.adb, snames.ads-tmpl: Add package Install's
5462         Required_Artifacts attribute.
5464 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
5466         * sem_util.adb (Same_Value): String literals are compile-time
5467         values, and comparing them must use Expr_Value_S.
5469 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
5471         * sem_ch4.adb (Complete_Object_Interpretation): If an explicit
5472         dereference is introduced for the object, and the object is
5473         overloaded, do not check whether it is aliased, because it may
5474         include an implicit dereference.
5475         * sem_type.adb (Disambiguate): If two interpretations are access
5476         attribute types with the same designated type keep either of
5477         them and do not report an ambiguity.  A true ambiguity will be
5478         reported elsewhere.
5480 2017-04-25  Bob Duff  <duff@adacore.com>
5482         * a-numeri.ads: Change the encoding of Greek letter Pi from
5483         brackets encoding to UTF-8.  Use pragma Wide_Character_Encoding
5484         to indicate the encoding. We considered using a byte order mark
5485         (BOM), but that causes various trouble (misc software eats the
5486         BOM, if you have a patch with a BOM, then it's not at the start
5487         of the patch, so it's not a BOM, the BOM affects with-ing files,
5488         etc.).
5489         * scng.adb, s-wchcnv.adb: Minor.
5491 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
5493         * sem_ch3.adb, sem_ch8.adb, sem_disp.adb: Minor reformatting.
5494 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
5496         * sem_ch3.adb (Add_Internal_Interface_Entities): Move
5497         Has_Non_Trivial_Precondition to sem_util. for use elsewhere.
5498         Improve error message on operations that inherit non-conforming
5499         classwide preconditions from ancestor and progenitor.
5500         * sem_util.ads, sem_util.adb (Has_Non_Trivial_Precondition):
5501         moved here from sem_ch3.
5502         * sem_ch8.adb (Analyze_Subprogram_Renaming): Implement legality
5503         check given in RM 6.1.1 (17) concerning renamings of overriding
5504         operations that inherits class-wide preconditions from ancestor
5505         or progenitor.
5507 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
5509         * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Code cleanup.
5510         (Build_Adjust_Statements): Code cleanup.
5511         (Build_Finalizer): Update the initialization of
5512         Exceptions_OK.
5513         (Build_Finalize_Statements): Code cleanup.
5514         (Build_Initialize_Statements): Code cleanup.
5515         (Make_Deep_Array_Body): Update the initialization of
5516         Exceptions_OK.
5517         (Make_Deep_Record_Body): Update the initialization of Exceptions_OK.
5518         (Process_Object_Declaration): Generate a null exception handler only
5519         when exceptions are allowed.
5520         (Process_Transients_In_Scope): Update the initialization of
5521         Exceptions_OK.
5522         * exp_util.ads, exp_util.adb (Exceptions_In_Finalization_OK): New
5523         routine.
5524         * sem_ch11.adb (Analyze_Exception_Handlers): Do not check any
5525         restrictions when the handler is internally generated and the
5526         mode is warnings.
5528 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
5530         * sem_ch3.adb (Has_Non_Trivial_Precondition): New predicate to
5531         enforce legality rule on classwide preconditions inherited from
5532         both an ancestor and a progenitor (RM 6.1.1 (10-13).
5533         * sem_disp.adb (Check_Dispatching_Context): A call to an abstract
5534         subprogram need not be dispatching if it appears in a precondition
5535         for an abstract or null subprogram.
5537 2017-04-25  Gary Dismukes  <dismukes@adacore.com>
5539         * sem_ch10.adb: Minor typo fix.
5541 2017-04-25  Arnaud Charlet  <charlet@adacore.com>
5543         * gcc-interface/Makefile.in: Cleanup VxWorks targets.
5545 2017-04-25  Eric Botcazou  <ebotcazou@adacore.com>
5547         * fname.adb (Is_Internal_File_Name): Arrange for the slices to
5548         have a length which is a power of 2.
5549         (Is_Predefined_File_Name): Likewise. Adjust comment.
5551 2017-04-25  Bob Duff  <duff@adacore.com>
5553         * exp_aggr.adb (Component_Count): Protect the
5554         arithmetic from attempting to convert a value >= 2**31 to Int,
5555         which would otherwise raise Constraint_Error.
5557 2017-04-25  Bob Duff  <duff@adacore.com>
5559         * opt.ads (Locking_Policy): Fix incorrect documentation. The
5560         first character of the policy name is not unique.
5562 2017-04-25  Bob Duff  <duff@adacore.com>
5564         * s-fileio.adb (Name): Raise Use_Error if the file is a temp file.
5565         * s-ficobl.ads (Is_Temporary_File): Remove incorrect comment
5566         about this flag not being used. It was already used, and it is
5567         now used more.
5569 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
5571         * einfo.adb Flag301 is now known as Ignore_SPARK_Mode_Pragmas.
5572         (Ignore_SPARK_Mode_Pragmas): New routine.
5573         (Set_Ignore_SPARK_Mode_Pragmas): New routine.
5574         (Write_Entity_Flags): Add an entry for Ignore_SPARK_Mode_Pragmas.
5575         * einfo.ads Add new attribute Ignore_SPARK_Mode_Pragmas and update
5576         related entities.
5577         (Ignore_SPARK_Mode_Pragmas): New routine
5578         along with pragma Inline.
5579         (Set_Ignore_SPARK_Mode_Pragmas): New routine along with pragma Inline.
5580         * opt.ads Rename flag Ignore_Pragma_SPARK_Mode to
5581         Ignore_SPARK_Mode_Pragmas_In_Instance.
5582         * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
5583         Save and restore the value of global flag
5584         Ignore_SPARK_Mode_Pragmas_In_Instance. Set or reinstate the value
5585         of global flag Ignore_SPARK_Mode_Pragmas_In_Instance when either
5586         the corresponding spec or the body must ignore all SPARK_Mode
5587         pragmas found within.
5588         (Analyze_Subprogram_Declaration): Mark
5589         the spec when it needs to ignore all SPARK_Mode pragmas found
5590         within to allow the body to infer this property in case it is
5591         instantiated or inlined later.
5592         * sem_ch7.adb (Analyze_Package_Body_Helper): Save and restore the
5593         value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set
5594         the value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance
5595         when the corresponding spec also ignored all SPARK_Mode pragmas
5596         found within.
5597         (Analyze_Package_Declaration): Mark the spec when
5598         it needs to ignore all SPARK_Mode pragmas found within to allow
5599         the body to infer this property in case it is instantiated or
5600         inlined later.
5601         * sem_ch12.adb (Analyze_Formal_Package_Declaration):
5602         Save and restore the value of flag
5603         Ignore_SPARK_Mode_Pragmas_In_Instance. Mark the
5604         formal spec when it needs to ignore all SPARK_Mode
5605         pragmas found within to allow the body to infer this
5606         property in case it is instantiated or inlined later.
5607         (Analyze_Package_Instantiation): Save and restore the value
5608         of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Mark
5609         the instance spec when it needs to ignore all SPARK_Mode
5610         pragmas found within to allow the body to infer this
5611         property in case it is instantiated or inlined later.
5612         (Analyze_Subprogram_Instantiation): Save and restore the value
5613         of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Mark the
5614         instance spec and anonymous package when they need to ignore
5615         all SPARK_Mode pragmas found within to allow the body to infer
5616         this property in case it is instantiated or inlined later.
5617         (Instantiate_Package_Body): Save and restore the value of global
5618         flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set the value of
5619         global flag Ignore_SPARK_Mode_Pragmas_In_Instance when the
5620         corresponding instance spec also ignored all SPARK_Mode pragmas
5621         found within.
5622         (Instantiate_Subprogram_Body): Save and restore the
5623         value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set
5624         the value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance
5625         when the corresponding instance spec also ignored all SPARK_Mode
5626         pragmas found within.
5627         * sem_prag.adb (Analyze_Pragma): Update the reference to
5628         Ignore_Pragma_SPARK_Mode.
5629         * sem_util.adb (SPARK_Mode_Is_Off): A construct which ignored
5630         all SPARK_Mode pragmas defined within yields mode "off".
5632 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
5634         * bindgen.adb, exp_dbug.adb, errout.adb, fname.adb: Minor reformatting.
5636 2017-04-25  Bob Duff  <duff@adacore.com>
5638         * exp_atag.adb (Build_CW_Membership): Add "Suppress =>
5639         All_Checks" to avoid generating unnecessary checks.
5640         * exp_ch4.adb (Expand_N_In, Make_Tag_Check): Add "Suppress =>
5641         All_Checks".
5642         * sem.ads: Fix comment.
5643         * expander.ads: Fix comment.
5644         * exp_atag.ads: Fix comment: "Index = 0" should be
5645         "Index >= 0".
5647 2017-04-25  Gary Dismukes  <dismukes@adacore.com>
5649         * s-taprop-linux.adb: Minor editorial fixes.
5651 2017-04-25  Eric Botcazou  <ebotcazou@adacore.com>
5653         * sem_util.adb (New_Copy_Tree): Put back the declarations of the
5654         hash tables at library level.  Reinstate the NCT_Hash_Tables_Used
5655         variable and set it to True whenever the main hash table is
5656         populated.  Short- circuit the Assoc function if it is false
5657         and add associated guards.
5659 2017-04-25  Olivier Hainque  <hainque@adacore.com>
5661         * bindgen.adb (Gen_Elab_Calls): Also update counter of lone
5662         specs without elaboration code that have an elaboration counter
5663         nevertheless, e.g.  when compiled with -fpreserve-control-flow.
5664         * sem_ch10.adb (Analyze_Compilation_Unit):
5665         Set_Elaboration_Entity_Required when requested to preserve
5666         control flow, to ensure the unit elaboration is materialized at
5667         bind time, resulting in the inclusion of the unit object file
5668         in the executable closure at link time.
5670 2017-04-25  Pierre-Marie de Rodat  <derodat@adacore.com>
5672         * exp_dbug.adb: In Debug_Renaming_Declaration,
5673         when dealing with indexed component, accept to produce a renaming
5674         symbol when the index is an IN parameter or when it is a name
5675         defined in an outer scope.
5677 2017-04-25  Yannick Moy  <moy@adacore.com>
5679         * errout.adb (Error_Msg): Adapt continuation
5680         message in instantiations and inlined bodies for info messages.
5682 2017-04-25  Eric Botcazou  <ebotcazou@adacore.com>
5684         * fname.adb (Has_Internal_Extension): Add pragma Inline.
5685         Use direct 4-character slice comparisons.
5686         (Has_Prefix): Add
5687         pragma Inline.  (Has_Suffix): Delete.
5688         (Is_Internal_File_Name):
5689         Test Is_Predefined_File_Name first.
5690         (Is_Predefined_File_Name):
5691         Use direct slice comparisons as much as possible and limit all
5692         comparisons to at most 8 characters.
5694 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
5696         * checks.adb (Insert_Valid_Check): Code cleanup.
5697         * exp_ch6.adb (Add_Validation_Call_By_Copy_Code): New routine.
5698         (Expand_Actuals): Generate proper copy-back for a validation
5699         variable when it acts as the argument of a type conversion.
5700         * sem_util.adb (Is_Validation_Variable_Reference): Augment the
5701         predicate to operate on type qualifications.
5703 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
5705         * sem_prag.adb, exp_ch6.adb, binde.adb, sem_disp.adb, s-fileio.adb:
5706         Minor reformatting.
5708 2017-04-25  Bob Duff  <duff@adacore.com>
5710         * sem_prag.adb (No_Return): Give an error if the pragma applies
5711         to a body. Specialize the error for the specless body case,
5712         as is done for (e.g.) pragma Convention.
5713         * debug.adb: Add switch -gnatd.J to disable the above legality
5714         checks. This is mainly for use in our test suite, to avoid
5715         rewriting a lot of illegal (but working) code.  It might also
5716         be useful to customers. Under this switch, if a pragma No_Return
5717         applies to a body, and the procedure raises an exception (as it
5718         should), the pragma has no effect. If the procedure does return,
5719         execution is erroneous.
5721 2017-04-25  Bob Duff  <duff@adacore.com>
5723         * exp_ch6.adb (Expand_Actuals): This is the
5724         root of the problem. It took N as an 'in out' parameter, and in
5725         some cases, rewrote N, but then set N to Original_Node(N). So
5726         the node returned in N had no Parent. The caller continued
5727         processing of this orphaned node. In some cases that caused a
5728         crash (e.g. Remove_Side_Effects climbs up Parents in a loop,
5729         and trips over the Empty Parent). The solution is to make N an
5730         'in' parameter.  Instead of rewriting it, return the list of
5731         post-call actions, so the caller can do the rewriting later,
5732         after N has been fully processed.
5733         (Expand_Call_Helper): Move most of Expand_Call here. It has
5734         too many premature 'return' statements, and we want to do the
5735         rewriting on return.
5736         (Insert_Post_Call_Actions): New procedure to insert the post-call
5737         actions in the appropriate place. In the problematic case,
5738         that involves rewriting N as an Expression_With_Actions.
5739         (Expand_Call): Call the new procedures Expand_Call_Helper and
5740         Insert_Post_Call_Actions.
5742 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
5744         * sem_prag.adb (Inherits_Class_Wide_Pre): Cleanup code, handle
5745         properly type derived from generic formal types, to handle
5746         properly modified version of ACATS 4.1B B611017.
5748 2017-04-25  Javier Miranda  <miranda@adacore.com>
5750         * exp_unst.adb (Subp_Index): Adding missing
5751         support for renamings and functions that return a constrained
5752         array type (i.e. functions for which the frontend built a
5753         procedure with an extra out parameter).
5755 2017-04-25  Pascal Obry  <obry@adacore.com>
5757         * s-string.adb: Minor code clean-up.
5759 2017-04-25  Bob Duff  <duff@adacore.com>
5761         * s-os_lib.ads, s-os_lib.adb (Non_Blocking_Wait_Process): New
5762         procedure.
5763         * adaint.h, adaint.c (__gnat_portable_no_block_wait): C support
5764         function for Non_Blocking_Wait_Process.
5766 2017-04-25  Bob Duff  <duff@adacore.com>
5768         * prep.adb (Preprocess): Remove incorrect
5769         Assert. Current character can be ASCII.CR.
5771 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
5773         * sem_prag.adb (Set_Convention_From_Pragma): Cleanup code for
5774         convention Stdcall, which has a number of exceptions. Convention
5775         is legal on a component declaration whose type is an anonymous
5776         access to subprogram.
5778 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
5780         * sem_ch4.adb: sem_ch4.adb Various reformattings.
5781         (Try_One_Prefix_Interpretation): Use the base type when dealing
5782         with a subtype created for purposes of constraining a private
5783         type with discriminants.
5785 2017-04-25  Javier Miranda  <miranda@adacore.com>
5787         * einfo.ads, einfo.adb (Has_Private_Extension): new attribute.
5788         * warnsw.ads, warnsw.adb (All_Warnings): Set warning on late
5789         dispatching primitives (Restore_Warnings): Restore warning on
5790         late dispatching primitives (Save_Warnings): Save warning on late
5791         dispatching primitives (Do_Warning_Switch): Use -gnatw.j/-gnatw.J
5792         to enable/disable this warning.
5793         (WA_Warnings): Set warning on late dispatching primitives.
5794         * sem_ch3.adb (Analyze_Private_Extension_Declaration): Remember
5795         that its parent type has a private extension.
5796         * sem_disp.adb (Warn_On_Late_Primitive_After_Private_Extension):
5797         New subprogram.
5798         * usage.adb: Document -gnatw.j and -gnatw.J.
5800 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
5802         * exp_ch7.adb, checks.adb, sem_prag.adb, eval_fat.adb: Minor
5803         reformatting.
5805 2017-04-25  Bob Duff  <duff@adacore.com>
5807         * binde.adb (Validate): Do not pass dynamic strings
5808         to pragma Assert, because older compilers do not support that.
5810 2017-04-25  Bob Duff  <duff@adacore.com>
5812         * s-fileio.adb (Close): When a temp file is
5813         closed, delete it and clean up its Temp_File_Record immediately,
5814         rather than waiting until later.
5815         (Temp_File_Record): Add File
5816         component, so Close can know which Temp_File_Record corresponds
5817         to the file being closed.
5818         (Delete): Don't delete temp files,
5819         because they are deleted by Close.
5820         (Open): Set the File component
5821         of Temp_File_Record. This requires moving the creation of the
5822         Temp_File_Record to the end, after the AFCB has been created.
5824 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
5826         * checks.adb (Insert_Valid_Check): Do not generate
5827         a validity check when inside a generic.
5829 2017-04-25  Yannick Moy  <moy@adacore.com>
5831         * sem_res.adb (Resolve_Type_Conversion): Fix bad logic.
5833 2017-04-25  Arnaud Charlet  <charlet@adacore.com>
5835         * snames.ads-tmpl (Snames): More names for detecting predefined
5836         potentially blocking subprograms.
5838 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
5840         * sem_prag.adb (Analyze_Pre_Post_Condition): The rules
5841         concerning inheritance of class-wide preconditions do not apply
5842         to postconditions.
5844 2017-04-25  Bob Duff  <duff@adacore.com>
5846         * s-ficobl.ads: Minor comment fix.
5848 2017-04-25  Yannick Moy  <moy@adacore.com>
5850         * checks.adb (Apply_Scalar_Range_Check): Analyze precisely
5851         conversions from float to integer in GNATprove mode.
5852         (Apply_Type_Conversion_Checks): Make sure in GNATprove mode
5853         to call Apply_Type_Conversion_Checks, so that range checks
5854         are properly positioned when needed on conversions, including
5855         when converting from float to integer.  (Determine_Range): In
5856         GNATprove mode, take into account the possibility of conversion
5857         from float to integer.
5858         * sem_res.adb (Resolve_Type_Conversion): Only enforce range
5859         check on conversions from fixed-point to integer, not anymore
5860         on conversions from floating-point to integer, when in GNATprove
5861         mode.
5863 2017-04-25  Yannick Moy  <moy@adacore.com>
5865         * checks.adb (Determine_Range_R): Special case type conversions
5866         from integer to float in order to get bounds in that case too.
5867         * eval_fat.adb (Machine): Avoid issuing warnings in GNATprove
5868         mode, for computations involved in interval checking.
5870 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
5872         * checks.adb (Insert_Valid_Check): Partially reimplement validity
5873         checks.
5874         * einfo.adb Node36 is now used as Validated_Object.
5875         (Validated_Object): New routine.
5876         (Set_Validated_Object): New routine.
5877         (Write_Field36_Name): Add an entry for Validated_Object.
5878         * einfo.ads Add new attribute Validated_Object along with
5879         usage in entities.
5880         (Validated_Object): New routine along with pragma Inline.
5881         (Set_Validated_Object): New routine along with pragma Inline.
5882         * exp_attr.adb (Make_Range_Test): Add processing for validation
5883         variables to avoid extra reads and copies of the prefix.
5884         * exp_ch6.adb (Expand_Actuals): Add copy-back for validation
5885         variables in order to reflect any changes done in the variable
5886         back into the original object.
5887         * sem_util.adb (Is_Validation_Variable_Reference): New routine.
5888         * sem_util.ads (Is_Validation_Variable_Reference): New routine.
5890 2017-04-25  Steve Baird  <baird@adacore.com>
5892         * exp_ch7.adb (Build_Array_Deep_Procs,
5893         Build_Record_Deep_Procs, Make_Finalize_Address_Body): Don't
5894         generate Finalize_Address routines for CodePeer.
5896 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
5898         * sem_prag.adb (Inherits_Class_Wide_Pre): subsidiary of
5899         Analyze_Pre_Post_Condition, to implement the legality checks
5900         mandated by AI12-0131: Pre'Class shall not be specified for an
5901         overriding primitive subprogram of a tagged type T unless the
5902         Pre'Class aspect is specified for the corresponding primitive
5903         subprogram of some ancestor of T.
5905 2017-04-25  Bob Duff  <duff@adacore.com>
5907         * sem_ch8.adb (Use_One_Type): If a use_type_clause
5908         is redundant, set its Used_Operations to empty. This is only
5909         necessary for use clauses that appear in the parent of a generic
5910         child unit, because those use clauses get reanalyzed when we
5911         instantiate the generic, and we don't want the Used_Operations
5912         carried over from the original context (where it was probably
5913         not redundant).
5915 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
5917         * exp_ch6.adb: Minor reformatting.
5919 2017-04-25  Bob Duff  <duff@adacore.com>
5921         * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
5922         Use Source_Index (Current_Sem_Unit) to find the correct casing.
5923         * exp_prag.adb (Expand_Pragma_Check): Use Source_Index
5924         (Current_Sem_Unit) to find the correct casing.
5925         * par.adb (Par): Null out Current_Source_File, to ensure that
5926         the above bugs won't rear their ugly heads again.
5928 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
5930         * sem_ch8.adb (Find_Type): For an attribute reference
5931         'Class, if prefix type is synchronized and previous errors
5932         have suppressed the creation of the corresponding record type,
5933         create a spurious class-wide for the synchonized type itself,
5934         to catch other misuses of the attribute
5936 2017-04-25  Steve Baird  <baird@adacore.com>
5938         * exp_ch6.adb (Expand_Simple_Function_Return): if CodePeer_Mode
5939         is True, then don't generate the accessibility check for the
5940         tag of a tagged result.
5941         * exp_intr.adb (Expand_Dispatching_Constructor_Call):
5942         if CodePeer_Mode is True, then don't generate the
5943         tag checks for the result of call to an instance of
5944         Ada.Tags.Generic_Dispatching_Constructor (i.e., both the "is a
5945         descendant of" check and the accessibility check).
5947 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
5949         * sem_ch13.adb: Code cleanups.
5950         * a-strbou.ads: minor whitespace fix in Trim for bounded strings.
5951         * sem_ch8.ads: Minor comment fix.
5953 2017-04-25  Eric Botcazou  <ebotcazou@adacore.com>
5955         * exp_ch4.adb (Library_Level_Target): New function.
5956         (Expand_Concatenate): When optimization is enabled, also expand
5957         the operation out-of-line if the concatenation is present within
5958         the expression of the declaration of a library-level object and
5959         not only if it is the expression of the declaration.
5961 2017-04-25  Bob Duff  <duff@adacore.com>
5963         * freeze.adb (Freeze_Object_Declaration): Do
5964         not Remove_Side_Effects if there is a pragma Linker_Section,
5965         because in that case we want static initialization in the
5966         appropriate section.
5968 2017-04-25  Gary Dismukes  <dismukes@adacore.com>
5970         * exp_dbug.adb: Minor rewording and reformatting.
5972 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
5974         * sem_attr.adb (Statically_Denotes_Object): New predicate, to
5975         handle the proposed changes to rules concerning potentially
5976         unevaluated expressions, to include selected components that
5977         do not depend on discriminants, and indexed components with
5978         static indices.
5979         * sem_util.adb (Is_Potentially_Unevaluated): Add check for
5980         predicate in quantified expression, and fix bugs in the handling
5981         of case expressions and membership test.
5982         (Analyze_Attribute_Old_Result): use new predicate.
5983         (Analyze_Attribute, case Loop_Entry): ditto.
5985 2017-04-25  Bob Duff  <duff@adacore.com>
5987         * s-secsta.adb (SS_Info): Add a comment
5988         explaining why we don't need to walk all the chunks in order to
5989         compute the total size.
5991 2017-04-25  Bob Duff  <duff@adacore.com>
5993         * namet.ads, namet.adb (Global_Name_Buffer): Increase the length
5994         of the global name buffer to 4*Max_Line_Length.
5996 2017-04-25  Javier Miranda  <miranda@adacore.com>
5998         * exp_ch8.adb (Expand_N_Object_Renaming_Declaration): When creating a
5999         renaming entity for debug information, mark the entity as needing debug
6000         info if it comes from sources.
6002 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
6004         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Remove the
6005         restriction converning the use of 'Address where the prefix is
6006         of a controlled type.
6008 2017-04-25  Pierre-Marie de Rodat  <derodat@adacore.com>
6010         * exp_dbug.adb: In Debug_Renaming_Declaration,
6011         skip slices that are made redundant by an indexed component
6012         access.
6013         * atree.h: New definition for Original_Node.
6015 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
6017         * sem_prag.adb, sem_prag.ads: Minor reformatting.
6019 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
6021         * sem_ch3.adb (Check_Entry_Contract): Call
6022         Preanalyze_Spec_Expression so that resolution takes place as well.
6023         * sem_util.adb (Check_Internal_Protected_Use): Reject properly
6024         internal calls that appear in preconditions of protected
6025         operations, in default values for same, and in contract guards
6026         for contract cases in SPARK.
6028 2017-04-25  Eric Botcazou  <ebotcazou@adacore.com>
6030         * a-numaux.ads: Fix description of a-numaux-darwin
6031         and a-numaux-x86.
6032         (Double): Define to Long_Float.
6033         * a-numaux-vxworks.ads (Double): Likewise.
6034         * a-numaux-darwin.ads
6035         (Double): Likewise.
6036         * a-numaux-libc-x86.ads (Double): Define to Long_Long_Float.
6037         * a-numaux-x86.ads: Fix package description.
6038         * a-numaux-x86.adb (Is_Nan): Minor tweak.
6039         (Reduce): Adjust and complete description. Call Is_Nan instead of
6040         testing manually. Use an integer temporary to hold rounded value.
6041         * a-numaux-darwin.adb (Reduce): Likewise.
6042         (Is_Nan): New function.
6044 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
6046         * sem_ch4.adb (Analyze_Selected_Component): Additional refinement
6047         on analysis of prefix whose type is a current instance of a
6048         synchronized type, but where the prefix itself is an entity that
6049         is an object.
6051 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
6053         * exp_ch5.adb (Replace_Target): When rewriting the RHS, preserve
6054         the identity of callable entities therein, because they have been
6055         properly resolved, and prefixed calls may have been rewritten
6056         as normal calls.
6058 2017-04-25  Patrick Bernardi  <bernardi@adacore.com>
6060         * exp_ch3.adb (Build_Init_Statements): Convert
6061         the expression of the pragma/aspect Secondary_Stack_Size to
6062         internal type System.Parameters.Size_Type before assigning
6063         it to the Secondary_Stack_Size component of the task type's
6064         corresponding record.
6066 2017-04-25  Eric Botcazou  <ebotcazou@adacore.com>
6068         * sem_eval.adb (Compile_Time_Compare): Reinstate the expr+literal
6069         (etc) optimizations when the type is modular and the offsets
6070         are equal.
6072 2017-04-25  Eric Botcazou  <ebotcazou@adacore.com>
6074         * s-osinte-freebsd.ads: Minor comment tweaks
6076 2017-04-25  Javier Miranda  <miranda@adacore.com>
6078         * urealp.adb (UR_Write): Reverse previous patch
6079         adding documentation on why we generate multiplications instead
6080         of divisions (needed to avoid expressions whose computation with
6081         large numbers may cause division by 0).
6083 2017-04-25  Bob Duff  <duff@adacore.com>
6085         * erroutc.adb (Set_Specific_Warning_Off,
6086         Set_Warnings_Mode_Off): Use the correct source file for
6087         Stop. Was using Current_Source_File, which is only valid during
6088         parsing. Current_Source_File will have a leftover value from
6089         whatever file happened to be parsed last, because of a with_clause
6090         or something.
6092 2017-04-25  Bob Duff  <duff@adacore.com>
6094         * lib.ads, lib.adb (In_Internal_Unit): New functions similar
6095         to In_Predefined_Unit, but including GNAT units.
6096         * sem_util.ads, sem_util.adb (Should_Ignore_Pragma): Replace
6097         with Should_Ignore_Pragma_Par and Should_Ignore_Pragma_Sem,
6098         because Should_Ignore_Pragma was not working reliably outside
6099         the parser, because Current_Source_File is not valid.
6100         * sem_prag.adb, exp_prag.adb: Call Should_Ignore_Pragma_Sem.
6101         * par-prag.adb: Call Should_Ignore_Pragma_Par.
6103 2017-04-25  Arnaud Charlet  <charlet@adacore.com trojanek>
6105         * gnat1drv.adb (Gnat1Drv): Disable Generate_Processed_File in
6106         codepeer mode.
6108 2017-04-25  Javier Miranda  <miranda@adacore.com>
6110         * urealp.adb (UR_Write): Fix output of constants with a base other
6111         that 10.
6113 2017-04-25  Justin Squirek  <squirek@adacore.com>
6115         * sem_ch13.adb (Get_Interfacing_Aspects): Moved to sem_util.adb.
6116         * sem_prag.adb (Analyze_Pragma, Process_Import_Or_Interface):
6117         Add extra parameter for Process_Interface_Name.
6118         (Process_Interface_Name): Add parameter for pragma to analyze
6119         corresponding aspect.
6120         * sem_util.ads, sem_util.adb (Get_Interfacing_Aspects): Added
6121         from sem_ch13.adb
6123 2017-04-25  Gary Dismukes  <dismukes@adacore.com>
6125         * exp_ch7.adb, einfo.ads, sem_prag.adb: Minor reformatting and typo
6126         correction.
6128 2017-04-25  Yannick Moy  <moy@adacore.com>
6130         * sem_res.adb (Resolve_Comparison_Op): Do not
6131         attempt evaluation of relational operations inside assertions.
6133 2017-04-25  Justin Squirek  <squirek@adacore.com>
6135         * exp_util.adb (Add_Interface_Invariants):
6136         Restored, code moved back from Build_Invariant_Procedure_Body.
6137         (Add_Parent_Invariants): Restored, code moved back from
6138         Build_Invariant_Procedure_Body.
6139         (Build_Invariant_Procedure_Body):
6140         Remove refactored calls and integrated code from
6141         Add_Parent_Invariants and Add_Interface_Invariants.
6143 2017-04-25  Johannes Kanig  <kanig@adacore.com>
6145         * errout.adb (Output_Messages): Adjust computation of total
6146         errors
6147         * erroutc.adb (Error_Msg): In statistics counts, deal
6148         correctly with informational messages that are not warnings.
6149         * errutil.adb (Finalize): adjust computation of total errors.
6151 2017-04-25  Arnaud Charlet  <charlet@adacore.com trojanek>
6153         * terminals.c (__gnat_terminate_pid): New.
6154         * g-exptty.ads (Terminate_Process): New. Update comments.
6156 2017-04-25  Arnaud Charlet  <charlet@adacore.com>
6158         * a-cfinve.ads, a-cofove.ads (Empty_Vector): add Global contract.
6160 2017-04-25  Justin Squirek  <squirek@adacore.com>
6162         * sem_ch3.adb (Analyze_Declarations): Minor
6163         correction to comments, move out large conditional and scope
6164         traversal into a predicate.
6165         (Uses_Unseen_Lib_Unit_Priv): Predicate function made from extracted
6166         logic.
6168 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
6170         * sem_ch4.adb (Analyze_Selected_Component): Refine analysis
6171         of prefix whose type is a current instance of a synchronized
6172         type. If the prefix is an object this is an external call (or
6173         requeue) that can only access public operations of the object. The
6174         previous predicate was too restrictive, and did not allow public
6175         protected operations, only task entries.
6177 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
6179         * sem_ch5.adb, fname.adb: Minor reformatting.
6181 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
6183         * einfo.adb (Is_Anonymous_Access_Type): New routine.
6184         * einfo.ads Update the placement of
6185         E_Anonymous_Access_Subprogram_Type along with all subtypes that
6186         mention the ekind.
6187         (Is_Anonymous_Access_Type): New routine.
6188         * exp_ch7.adb (Allows_Finalization_Master): Do not generate a
6189         master for an access type subject to pragma No_Heap_Finalization.
6190         * exp_util.adb (Build_Allocate_Deallocate_Proc): An object being
6191         allocated or deallocated does not finalization actions if the
6192         associated access type is subject to pragma No_Heap_Finalization.
6193         * opt.ads Add new global variable No_Heap_Finalization_Pragma.
6194         * par-prag.adb Pragma No_Heap_Finalization does not need special
6195         processing from the parser.
6196         * sem_ch6.adb (Check_Return_Subtype_Indication): Remove ancient
6197         ??? comments. Use the new predicate Is_Anonymous_Access_Type.
6198         * sem_prag.adb Add an entry in table Sig_Flags for pragma
6199         No_Heap_Finalization.
6200         (Analyze_Pragma): Add processing for
6201         pragma No_Heap_Finalization. Update various error messages to
6202         use Duplication_Error.
6203         * sem_util.ads, sem_util.adb (No_Heap_Finalization): New routine.
6204         * snames.ads-tmpl: Add new predefined name No_Heap_Finalization
6205         and corresponding pragma id.
6207 2017-04-25  Bob Duff  <duff@adacore.com>
6209         * freeze.adb (Freeze_Record_Type): Use the
6210         underlying type of the component type to determine whether it's
6211         elementary. For representation clause purposes, a private type
6212         should behave the same as its full type.
6213         * fname.ads, fname.adb (Is_Predefined_File_Name):
6214         Make sure things like "system.ali" are recognized as predefined.
6216 2017-04-25  Javier Miranda  <miranda@adacore.com>
6218         * debug.adb: Update documentation of -gnatd.6.
6220 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
6222         * sem_ch5.adb (Preanalyze_Range): Handle properly an Ada2012
6223         element iterator when the name is an overloaded function call,
6224         one of whose interpretations yields an array.
6226 2017-04-25  Bob Duff  <duff@adacore.com>
6228         * uname.ads, uname.adb (Is_Predefined_Unit_Name,
6229         Is_Internal_Unit_Name): New functions for operating on unit
6230         names, as opposed to file names. There's some duplicated code
6231         with fname.adb, which is unfortunate, but it seems like we don't
6232         want to add dependencies here.
6233         * fname-uf.adb (Get_File_Name): Change Is_Predefined_File_Name
6234         to Is_Predefined_Unit_Name; the former was wrong, because Uname
6235         is not a file name at all.
6236         * fname.ads, fname.adb: Document the fact that
6237         Is_Predefined_File_Name and Is_Internal_File_Name can be called
6238         for ALI files, and fix the code so it works properly for ALI
6239         files. E.g. these should return True for "system.ali".
6241 2017-04-25  Justin Squirek  <squirek@adacore.com>
6243         * exp_util.adb (Add_Invariant): Removed,
6244         code moved to Add_Invariant_Check, Add_Inherited_Invariant,
6245         and Add_Own_Invariant.  (Add_Invariant_Check): Used
6246         for adding runtime checks from any kind of invariant.
6247         (Add_Inherited_Invariant): Generates invariant checks for
6248         class-wide invariants (Add_Interface_Invariants): Removed, code
6249         moved to Build_Invariant_Procedure_Body (Add_Own_Invariant):
6250         Create a types own invariant procedure (Add_Parent_Invariants):
6251         Removed, code moved to Build_Invariant_Procedure_Body
6252         (Build_Invariant_Procedure_Body): Add refactored calls
6253         and integrated code from Add_Parent_Invariants and
6254         Add_Interface_Invariants.
6255         (Process_Type): Removed, the
6256         relavant code was inlined into both Add_Own_Invariant and
6257         Add_Inherited_Invariant.
6259 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
6261         * make.adb, par-ch2.adb, sem_util.adb, scans.ads, sem_ch8.adb,
6262         scn.adb, osint.adb, fname.adb: Minor reformatting.
6264 2017-04-25  Pascal Obry  <obry@adacore.com>
6266         * s-taprop-mingw.adb: Do not check for CloseHandle in
6267         Finalize_TCB.
6269 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
6271         * sem_util.adb (Check_Part_Of_Reference):
6272         Continue to examine the context if the reference appears within
6273         an expression function.
6275 2017-04-25  Justin Squirek  <squirek@adacore.com>
6277         * exp_ch7.adb, exp_ch7.ads Remove Build_Invariant_Procedure_Body
6278         and Build_Invariant_Procedure_Declaration.
6279         * exp_util.ads, exp_util.adb Add Build_Invariant_Procedure_Body
6280         and Build_Invariant_Procedure_Declaration from exp_ch7
6281         and break-out Is_Untagged_Private_Derivation from
6282         Build_Invariant_Procedure_Body.
6283         (Replace_Type_References):
6284         Append an extra parameter to allow for dispatching replacements
6285         and add the corrasponding logic.
6286         (Type_Invariant): Remove
6287         Replace_Typ_Refs and replace its references with calls to
6288         Replace_Type_References.
6289         * sem_ch3.adb, sem_prag.adb: Remove with and use of exp_ch7.
6291 2017-04-25  Bob Duff  <duff@adacore.com>
6293         * sem_util.ads, sem_util.adb (Should_Ignore_Pragma): New function
6294         that returns True when appropriate.
6295         * par-prag.adb, exp_prag.adb, sem_prag.adb: Do not ignore pragmas
6296         when compiling predefined files.
6297         * fname.ads, fname.adb (Is_Predefined_File_Name): Fix bug:
6298         "gnat.adc" should not be considered a predefined file name.
6299         That required (or at least encouraged) a lot of cleanup of global
6300         variable usage. We shouldn't be communicating information via
6301         the global name buffer.
6302         * bindgen.adb, errout.adb, fname-uf.adb, lib-load.adb, make.adb,
6303         * restrict.adb, sem_ch10.adb, sem_ch6.adb, sem_ch8.adb: Changes
6304         required by the above-mentioned cleanup.
6306 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
6308         * osint.adb (Find_File): Handle properly a request for a
6309         configuration file whose name is a directory.
6311 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
6313         * sem_attr.adb, sem_ch5.adb: Minor reformatting.
6315 2017-04-25  Bob Duff  <duff@adacore.com>
6317         * types.ads: Minor: Fix '???' comment.
6318         * sem_ch8.adb: Minor comment fix.
6320 2017-04-25  Bob Duff  <duff@adacore.com>
6322         * sem_prag.adb: Remove suspicious uses of Name_Buf.
6323         * stringt.ads, stringt.adb, exp_dbug.adb, sem_dim.adb: Remove
6324         Add_String_To_Name_Buffer, to avoid using the global Name_Buf.
6325         Add String_To_Name with no side effects.
6327 2017-04-25  Justin Squirek  <squirek@adacore.com>
6329         * sem_ch3.adb (Analyze_Declarations): Add
6330         additional condition for edge case.
6332 2017-04-25  Bob Duff  <duff@adacore.com>
6334         * par-ch2.adb, scans.ads, scn.adb: Do not give an error for
6335         reserved words inside pragmas. This is necessary to allow the
6336         pragma name Interface to be used in pragma Ignore_Pragma.
6337         * par.adb: Minor comment fix.
6339 2017-04-25  Javier Miranda  <miranda@adacore.com>
6341         * a-tags.ads, a-tags.adb (Type_Is_Abstract): Renamed as Is_Abstract.
6342         * rtsfind.ads (RE_Type_Is_Abstract): Renamed as Is_Abstract.
6343         * exp_disp.adb (Make_DT): Update occurrences of RE_Type_Is_Abstract.
6344         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Update
6345         occurrences of RE_Type_Is_Abstract
6347 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
6349         * exp_util.adb (Build_Chain): Account for ancestor
6350         subtypes while traversing the derivation chain.
6352 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
6354         * sem_attr.adb: minor reformatting.
6356 2017-04-25  Doug Rupp  <rupp@adacore.com>
6358         * sigtramp-vxworks-target.inc [PPC64]: Add a .localentry pseudo-op.
6360 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
6362         * sem_ch5.adb (Analyze_Assignment): Reset Full_Analysis flag on
6363         the first pass over an assignment statement with target names,
6364         to prevent the generation of subtypes (such as discriminated
6365         record components)that may carry the target name outside of the
6366         tree for the assignment. The subtypes will be generated when
6367         the assignment is reanalyzed in full.
6368         (Analyze_Target_Name): Handle properly class-wide types.
6370 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
6372         * elists.ads, elists.adb (Prepend_Unique_Elmt): New routine.
6373         * exp_ch3.adb (Freeze_Type): Signal the DIC body is created for
6374         the purposes of freezing.
6375         * exp_util.adb Update the documentation and structure of the
6376         type map used in class-wide semantics of assertion expressions.
6377         (Add_Inherited_Tagged_DIC): There is really no need to preanalyze
6378         and resolve the triaged expression because all substitutions
6379         refer to the proper entities.  Update the replacement of
6380         references.
6381         (Build_DIC_Procedure_Body): Add formal parameter
6382         For_Freeze. Add local variable Build_Body. Inherited DIC pragmas
6383         are now only processed when freezing occurs.  Build a body only
6384         when one is needed.
6385         (Entity_Hash): Removed.
6386         (Map_Types): New routine.
6387         (Replace_Object_And_Primitive_References): Removed.
6388         (Replace_References): New routine.
6389         (Replace_Type_References): Moved to the library level of Exp_Util.
6390         (Type_Map_Hash): New routine.
6391         (Update_Primitives_Mapping): Update the mapping call.
6392         (Update_Primitives_Mapping_Of_Types): Removed.
6393         * exp_util.ads (Build_DIC_Procedure_Body): Add formal
6394         parameter For_Freeze and update the comment on usage.
6395         (Map_Types): New routine.
6396         (Replace_References): New routine.
6397         (Replace_Type_References): Moved to the library level of Exp_Util.
6398         (Update_Primitives_Mapping_Of_Types): Removed.
6399         * sem_ch7.adb (Preserve_Full_Attributes): Propagate the DIC
6400         properties of the private type to the full view in case the full
6401         view derives from a parent type and inherits a DIC pragma.
6402         * sem_prag.adb (Analyze_Pragma): Guard against a case where a
6403         DIC pragma is placed at the top of a declarative region.
6405 2017-04-25  Arnaud Charlet  <charlet@adacore.com trojanek>
6407         * a-tasatt.adb: Complete previous change and use an unsigned
6408         int to avoid overflow checks.
6410 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
6412         * sem_attr.adb (Analyze_Attribute, case 'Access): Specialize
6413         the error message when the attribute reference is an actual in
6414         a call to a subprogram inherited from a generic formal type with
6415         unknown discriminants, which makes the subprogram and its formal
6416         parameters intrinsic (see RM 6.3.1 (8) and (13)).
6418 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
6420         * sem_aggr.adb, inline.adb, einfo.adb, einfo.ads, scng.adb,
6421         sem_prag.adb: Minor reformatting.
6423 2017-04-25  Bob Duff  <duff@adacore.com>
6425         * sem_attr.adb (Type_Key): Add code in the
6426         recursive Compute_Type_Key to protect against fetching the source
6427         code for Standard, in case a component of the type is declared
6428         in Standard. There was already code to do this for the original
6429         type, but not for its components.
6431 2017-04-25  Javier Miranda  <miranda@adacore.com>
6433         * exp_ch3.adb (Build_Initialization_Call): Handle
6434         subtypes of private types when searching for the underlying full
6435         view of a private type.
6437 2017-04-25  Javier Miranda  <miranda@adacore.com>
6439         * sem_res.adb (Set_Mixed_Mode_Operand): A universal
6440         real conditional expression can appear in a fixed-type context
6441         and must be resolved with that context to facilitate the code
6442         generation to the backend.
6444 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
6446         * einfo.adb, einfo.ads (Body_Needed_For_Inlining): New flag,
6447         to indicate whether during inline processing, when some unit U1
6448         appears in the context of a unit U2 compiled for instantiation
6449         or inlining purposes, the body of U1 needs to be compiled as well.
6450         * sem_prag.adb (Process_Inline): Set Body_Needed_For_Inlining if
6451         context is a package declaration.
6452         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration,
6453         Analyze_Generic_Package_Declaration): ditto.
6454         * inline.adb (Analyze_Inlined_Bodies): Check
6455         Body_Needed_For_Inlining.
6457 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
6459         * par.adb (Current_Assign_Node): Global variable use to record
6460         the presence of a target_name in the right hand side of the
6461         assignment being parsed.
6462         * par-ch4.adb (P_Name): If the name is a target_name, mark the
6463         enclosing assignment node accordingly.
6464         * par-ch5.adb (P_Assignment_Statement): Set Current_Assign_Node
6465         appropriately.
6466         * sem_ch5.adb (Analyze_Assignment): Disable expansion before
6467         analyzing RHS if the statement has target_names.
6468         * sem_aggr.adb (Resolve_Iterated_Component_Association): Handle
6469         properly choices that are subtype marks.
6470         * exp_ch5.adb: Code cleanup.
6472 2017-04-25  Bob Duff  <duff@adacore.com>
6474         * s-memory.adb: Add a comment regarding efficiency.
6475         * atree.adb: Fix the assertion, and combine 2 assertions into one,
6476         "the source has an extension if and only if the destination does."
6477         * sem_ch3.adb, sem_ch13.adb: Address ??? comments.
6479 2017-04-25  Arnaud Charlet  <charlet@adacore.com trojanek>
6481         * a-tasatt.adb (Set_Value): Fix handling of 32bits -> 64bits
6482         conversion.
6484 2017-04-25  Doug Rupp  <rupp@adacore.com>
6486         * init.c (__gnat_error_handler) [vxworks]: Turn on sigtramp
6487         handling for ppc64-vx7.
6488         * sigtramp-vxworks-target.inc
6489         [SIGTRAMP_BODY]: Add section for ppc64-vx7.
6491 2017-04-25  Arnaud Charlet  <charlet@adacore.com>
6493         * ada_get_targ.adb: New file.
6495 2017-04-25  Bob Duff  <duff@adacore.com>
6497         * uintp.adb (Most_Sig_2_Digits): In case Direct (Right), fetch
6498         Direct_Val (Right), instead of the incorrect Direct_Val (Left).
6499         (UI_GCD): Remove ??? comment involving possible efficiency
6500         improvements. This just isn't important after all these years.
6501         Also minor cleanup.
6502         * uintp.ads: Minor cleanup.
6504 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
6506         * exp_util.adb, exp_util.ads, sem_ch7.adb, sem_prag.adb, exp_ch3.adb:
6507         Revert previous changes.
6508         * scng.adb: Minor reformatting.
6509         * s-stratt.ads: Fix unbalanced parens in comment.
6511 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
6513         * sem_ch3.adb, exp_util.adb, sem_prag.adb, freeze.adb, sem_util.adb:
6514         Minor reformatting.
6516 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
6518         * scng.adb (Scan): Handle '@' appropriately.
6519         * sem_ch5.adb: Code cleanup.
6521 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
6523         * freeze.adb (Check_Expression_Function): Do not check for the
6524         use of deferred constants if the freezing of the expression
6525         function is triggered by its generated body, rather than a
6526         premature use.
6528 2017-04-25  Javier Miranda  <miranda@adacore.com>
6530         * exp_attr.adb (Rewrite_Stream_Proc_Call): Handle
6531         subtypes of private types when performing the view conversion.
6533 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
6535         * exp_ch3.adb (Freeze_Type): Signal the DIC body is created for
6536         the purposes of freezing.
6537         * exp_util.adb Update the documentation and structure of the
6538         type map used in class-wide semantics of assertion expressions.
6539         (Add_Inherited_Tagged_DIC): There is really no need to preanalyze
6540         and resolve the triaged expression because all substitutions
6541         refer to the proper entities.  Update the replacement of
6542         references.
6543         (Build_DIC_Procedure_Body): Add formal parameter
6544         For_Freeze. Add local variable Build_Body. Inherited DIC pragmas
6545         are now only processed when freezing occurs.  Build a body only
6546         when one is needed.
6547         (Entity_Hash): Removed.
6548         (Map_Types): New routine.
6549         (Replace_Object_And_Primitive_References): Removed.
6550         (Replace_References): New routine.
6551         (Replace_Type_References): Moved to the library level of Exp_Util.
6552         (Type_Map_Hash): New routine.
6553         (Update_Primitives_Mapping): Update the mapping call.
6554         (Update_Primitives_Mapping_Of_Types): Removed.
6555         * exp_util.ads (Build_DIC_Procedure_Body): Add formal
6556         parameter For_Freeze and update the comment on usage.
6557         (Map_Types): New routine.
6558         (Replace_References): New routine.
6559         (Replace_Type_References): Moved to the library level of Exp_Util.
6560         (Update_Primitives_Mapping_Of_Types): Removed.
6561         * sem_ch7.adb (Preserve_Full_Attributes): Propagate the DIC
6562         properties of the private type to the full view in case the full
6563         view derives from a parent type and inherits a DIC pragma.
6564         * sem_prag.adb (Analyze_Pragma): Guard against a case where a
6565         DIC pragma is placed at the top of a declarative region.
6567 2017-04-25  Tristan Gingold  <gingold@adacore.com>
6569         * s-mmap.ads (Data): Add pragma Inline.
6571 2017-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
6573         * checks.adb (Insert_Valid_Check): Do not use
6574         a renaming to alias a volatile name because this will lead to
6575         multiple evaluations of the volatile name. Use a constant to
6576         capture the value instead.
6578 2017-04-25  Doug Rupp  <rupp@adacore.com>
6580         * init.c [VxWorks Section]: Disable sigtramp for ppc64-vx7.
6582 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
6584         * exp_util.adb, exp_util.ads (Build_Class_Wide_Expression):
6585         Add out parameter to indicate to caller that a wrapper must
6586         be constructed for an inherited primitive whose inherited
6587         pre/postcondition has called to overridden primitives.
6588         * freeze.adb (Check_Inherited_Conditions): Build wrapper body
6589         for inherited primitive that requires it.
6590         * sem_disp.adb (Check_Dispatching_Operation): Such wrappers are
6591         legal primitive operations and belong to the list of bodies
6592         generated after the freeze point of a type.
6593         * sem_prag.adb (Build_Pragma_Check_Equivalent): Use new signature
6594         of Build_Class_Wide_Expression.
6595         * sem_util.adb, sem_util.ads (Build_Overriding_Spec): New procedure
6596         to construct the specification of the wrapper subprogram created
6597         for an inherited operation.
6599 2017-04-25  Bob Duff  <duff@adacore.com>
6601         * s-osinte-linux.ads (pthread_mutexattr_setprotocol,
6602         pthread_mutexattr_setprioceiling): Add new interfaces for these
6603         pthread operations.
6604         * s-taprop-linux.adb (Initialize_Lock, Initialize_TCB): Set
6605         protocols as appropriate for Locking_Policy 'C' and 'I'.
6606         * s-taprop-posix.adb: Minor reformatting to make it more similar
6607         to s-taprop-linux.adb.
6609 2017-04-25  Ed Schonberg  <schonberg@adacore.com>
6611         * sem_ch3.adb (Get_Discriminant_Value, Search_Derivation_Levels):
6612         Handle properly a multi- level derivation involving both renamed
6613         and constrained parent discriminants, when the type to be
6614         constrained has fewer discriminants that the ultimate ancestor.
6616 2017-04-25  Bob Duff  <duff@adacore.com>
6618         * sem_util.adb (Is_Object_Reference): In the
6619         case of N_Explicit_Dereference, return False if it came from a
6620         conditional expression.
6622 2017-04-25  Bob Duff  <duff@adacore.com>
6624         * par-ch4.adb (P_Case_Expression): If a semicolon
6625         is followed by "when", assume that ";" was meant to be ",".
6627 2017-04-25  Gary Dismukes  <dismukes@adacore.com>
6629         * sem_ch9.adb, sem_ch10.adb, sem_util.adb: Minor reformatting and typo
6630         fixes.
6632 2017-04-25  Arnaud Charlet  <charlet@adacore.com>
6634         * rtsfind.ads (SPARK_Implicit_Load): New procedure for forced
6635         loading of an entity.
6636         * rtsfind.adb (SPARK_Implicit_Load): Body with a pattern
6637         previously repeated in the analysis.
6638         * sem_ch9.adb (Analyze_Protected_Type_Declaration): use new
6639         procedure SPARK_Implicit_Load.  (Analyze_Task_Type_Declaration):
6640         use new procedure SPARK_Implicit_Load.
6641         * sem_ch10.adb (Analyze_Compilation_Unit): Use new procedure
6642         SPARK_Implicit_Load.
6644 2017-04-25  Javier Miranda  <miranda@adacore.com>
6646         * sem_util.adb (New_Copy_Tree): By default
6647         copying of defining identifiers is prohibited because
6648         this would introduce an entirely new entity into the
6649         tree. This patch introduces an exception to this general
6650         rule: the declaration of constants and variables located in
6651         Expression_With_Action nodes.
6652         (Copy_Itype_With_Replacement): Renamed as Copy_Entity_With_Replacement.
6653         (In_Map): New subprogram.
6654         (Visit_Entity): New subprogram.
6655         (Visit_Node): Handle EWA_Level,
6656         EWA_Inner_Scope_Level, and take care of defining entities defined
6657         in Expression_With_Action nodes.
6659 2017-04-25  Thomas Quinot  <quinot@adacore.com>
6661         * exp_ch6.adb: minor comment edit.
6662         * sinfo.ads, sinfo.adb: New Null_Statement attribute for null
6663         procedure specifications that come from source.
6664         * par-ch6.adb (P_Subprogram, case of a null procedure): Set new
6665         Null_Statement attribute.
6666         * par_sco.adb (Traverse_Declarations_Or_Statements): For a null
6667         procedure, generate statement SCO for the generated NULL statement.
6668         * sem_ch6.adb (Analyze_Null_Procedure): Use null statement from
6669         parser, if available.
6671 2017-04-04  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
6673         * system-linux-s390.ads: Use Long_Integer'Size to define
6674         Memory_Size.
6676 2017-04-04  Eric Botcazou  <ebotcazou@adacore.com>
6678         * sem_ch3.adb (Build_Derived_Record_Type): Fix long line.
6680 2017-04-03  Jonathan Wakely  <jwakely@redhat.com>
6682         * doc/gnat_ugn/gnat_and_program_execution.rst: Fix typo.
6683         * g-socket.adb (To_Host_Entry): Fix typo in comment.
6684         * gnat_ugn.texi: Fix typo.
6685         * raise.c (_gnat_builtin_longjmp): Fix capitalization in comment.
6686         * s-stposu.adb (Allocate_Any_Controlled): Fix typo in comment.
6687         * sem_ch3.adb (Build_Derived_Record_Type): Likewise.
6688         * sem_util.adb (Mark_Coextensions): Likewise.
6689         * sem_util.ads (Available_Full_View_Of_Component): Likewise.
6691 2017-03-28  Andreas Schwab  <schwab@suse.de>
6693         PR ada/80117
6694         * system-linux-aarch64-ilp32.ads: New file.
6695         * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS_COMMON): Rename
6696         from LIBGNAT_TARGET_PAIRS.
6697         (LIBGNAT_TARGET_PAIRS_32, LIBGNAT_TARGET_PAIRS_64): Define.
6698         (LIBGNAT_TARGET_PAIRS): Use LIBGNAT_TARGET_PAIRS_COMMON, and
6699         LIBGNAT_TARGET_PAIRS_64 or LIBGNAT_TARGET_PAIRS_32 for -mabi=lp64
6700         or -mabi=ilp32, resp.
6702 2017-03-14  James Cowgill  <James.Cowgill@imgtec.com>
6704         * s-osinte-linux.ads (struct_sigaction): Use correct type for sa_flags.
6706 2017-03-08  Thanassis Tsiodras  <ttsiodras@gmail.com>
6708         PR ada/79903
6709         * socket.c (__gnat_gethostbyaddr): Add missing test for __rtems__.
6711 2017-03-08  Eric Botcazou  <ebotcazou@adacore.com>
6713         PR ada/79945
6714         * system-linux-ppc.ads (Default_Bit_Order): Use Standard's setting.
6716         * system-linux-arm.ads (Default_Bit_Order): Likewise.
6717         * system-linux-mips.ads (Default_Bit_Order): Likewise.
6718         * system-linux-armeb.ads: Delete.
6719         * system-linux-mipsel.ads: Likewise.
6720         * gcc-interface/Makefile.in (MIPS/Linux): Adjust.
6721         (ARM/Linux): Likewise.
6723 2017-02-24  Jakub Jelinek  <jakub@redhat.com>
6725         PR c/79677
6726         * gcc-interface/misc.c (gnat_handle_option): Pass true to
6727         handle_generated_option GENERATED_P.
6729 2017-02-24  Eric Botcazou  <ebotcazou@adacore.com>
6731         * gcc-interface/decl.c (gnat_to_gnu_field): Do not remove the wrapper
6732         around a justified modular type if it doesn't have the same scalar
6733         storage order as the enclosing record type.
6735 2017-02-24  Eric Botcazou  <ebotcazou@adacore.com>
6737         * gcc-interface/trans.c (gnat_to_gnu): Do not apply special handling
6738         of boolean rvalues to function calls.
6740 2017-02-24  Eric Botcazou  <ebotcazou@adacore.com>
6742         * gcc-interface/utils.c (fold_bit_position): New function.
6743         (rest_of_record_type_compilation): Call it instead of bit_position to
6744         compute the field position and remove the call to remove_conversions.
6745         (compute_related_constant): Factor out the multiplication in both
6746         operands, if any, and streamline the final test.
6748 2017-02-24  Eric Botcazou  <ebotcazou@adacore.com>
6750         * gcc-interface/trans.c (return_value_ok_for_nrv_p): Add sanity check.
6752 2017-02-24  Eric Botcazou  <ebotcazou@adacore.com>
6754         * gcc-interface/decl.c: Include demangle.h.
6755         (is_cplusplus_method): Return again true for a primitive operation
6756         only if it is dispatching.  For a subprogram with an interface name,
6757         call the demangler to get the number of C++ parameters and compare it
6758         with the number of Ada parameters.
6760 2017-02-24  Eric Botcazou  <ebotcazou@adacore.com>
6762         * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): If
6763         there is no end label, put the location of the At_End procedure on
6764         the call to the procedure.
6766 2017-02-24  Eric Botcazou  <ebotcazou@adacore.com>
6768         * gcc-interface/misc.c (gnat_type_max_size): Try to return a meaningful
6769         value for array types with TYPE_INDEX_TYPE set on their domain type.
6770         * gcc-interface/utils.c (max_size): For operations and expressions, do
6771         not build a new node if the operands have not changed or are missing.
6773 2017-02-24  Eric Botcazou  <ebotcazou@adacore.com>
6775         * gcc-interface/utils.c (max_size) <tcc_expression>: Flip the second
6776         argument when recursing on TRUTH_NOT_EXPR.
6778 2017-02-12  John Marino  <gnugcc@marino.st>
6780         * system-freebsd-x86.ads: Rename into...
6781         * system-freebsd.ads: ...this.
6782         (Default_Bit_Order): Define using Standard'Default_Bit_Order.
6783         * gcc-interface/Makefile.in: Support aarch64-freebsd.
6784         (x86-64/FreeBSD): Adjust to above renaming.
6785         (i386/FreeBSD): Likewise.
6787 2017-02-09  Gerald Pfeifer  <gerald@pfeifer.com>
6789         * comperr.adb: Update FSF bug reporting URL.
6791 2017-02-01  Eric Botcazou  <ebotcazou@adacore.com>
6792             Jakub Jelinek  <jakub@redhat.com>
6794         PR ada/79309
6795         * adaint.c (__gnat_killprocesstree): Fix broken string handling.
6797 2017-01-25  Maxim Ostapenko  <m.ostapenko@samsung.com>
6799         PR lto/79061
6800         * gcc-interface/utils.c (get_global_context): Pass main_input_filename
6801         to build_translation_unit_decl.
6803 2017-01-23  Javier Miranda  <miranda@adacore.com>
6805         * sem_util.adb (New_Copy_Tree): Code cleanup:
6806         removal of the internal map (ie. variable Actual_Map, its
6807         associated local variables, and all the code handling it).
6808         * sem_ch9.adb (Analyze_Task_Type_Declaration): in GNATprove mode
6809         force loading of the System package when processing a task type.
6810         (Analyze_Protected_Type_Declaration): in GNATprove mode force
6811         loading of the System package when processing a protected type.
6812         * sem_ch10.adb (Analyze_Compilation_Unit): in GNATprove mode
6813         force loading of the System package when processing compilation
6814         unit with a main-like subprogram.
6815         * frontend.adb (Frontend): remove forced loading of the System
6816         package.
6818 2017-01-23  Ed Schonberg  <schonberg@adacore.com>
6820         * sem_prag.adb (Default_Initial_Condition): If the desired type
6821         declaration is a derived type declaration with discriminants,
6822         it is rewritten as a private type declaration.
6823         * sem_ch13.adb (Replace_Type_References_Generic,
6824         Visible_Component): A discriminated private type with descriminnts
6825         has components that must be rewritten as selected components
6826         if they appear as identifiers in an aspect expression such as
6827         a Default_Initial_Condition.
6828         * sem_util.adb (Defining_Entity): support N_Iterator_Specification
6829         nodes.
6831 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
6833         * ghost.ads, ghost.adb (Is_Ignored_Ghost_Unit): New routine.
6834         * gnat1drv.adb Generate an empty object file for an ignored
6835         Ghost compilation unit.
6836         * inline.adb, sem_util.adb, sem_ch4.adb: Minor reformatting.
6838 2017-01-23  Yannick Moy  <moy@adacore.com>
6840         * sem_ch4.adb (Analyze_Indexed_Component_Form):
6841         Adapt to inlined prefix with string literal subtype.
6842         * inline.adb (Expand_Inlined_Call): Keep unchecked
6843         conversion inside inlined call when formal type is constrained.
6845 2017-01-23  Javier Miranda  <miranda@adacore.com>
6847         * sem_util.adb (New_Copy_Tree): Code cleanup:
6848         removal of global variables. All the global variables, global
6849         functions and tables of this subprogram are now declared locally.
6851 2017-01-23  Gary Dismukes  <dismukes@adacore.com>
6853         * exp_strm.ads: Minor reformatting and typo fixes.
6855 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
6857         * sem_aggr.adb, par_sco.adb, exp_util.adb, sem.adb, sem_ch4.adb,
6858         exp_aggr.adb: Minor reformatting.
6859         * g-diopit.adb: minor grammar/punctuation fix in comment.
6860         * g-byorma.ads: minor fix of unbalanced parens in comment.
6862 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
6864         * par.adb: Update the documentation of component Labl.
6865         * par-ch6.adb (P_Return_Statement): Set the expected label of
6866         an extended return statement to Error.
6868 2017-01-23  Tristan Gingold  <gingold@adacore.com>
6870         * s-boustr.ads, s-boustr.adb (Is_Full): New function.
6872 2017-01-23  Ed Schonberg  <schonberg@adacore.com>
6874         * expander.adb: Handle N_Delta_Aggregate.
6876 2017-01-23  Javier Miranda  <miranda@adacore.com>
6878         * exp_ch6.adb (Expand_Call): Improve the code that
6879         checks if some formal of the called subprogram is a class-wide
6880         interface, to handle subtypes of class-wide interfaces.
6882 2017-01-23  Javier Miranda  <miranda@adacore.com>
6884         * checks.adb (Apply_Parameter_Aliasing_Checks):
6885         Remove side effects of the actuals before generating the overlap
6886         check.
6888 2017-01-23  Justin Squirek  <squirek@adacore.com>
6890         * exp_strm.ads, exp_strm.ads
6891         (Build_Record_Or_Elementary_Input_Function): Add an extra parameter so
6892         as to avoid getting the underlying type by default.
6893         * exp_attr.adb (Expand_N_Attribute_Reference): Remove use of
6894         underlying type in the Iiput and output attribute cases when
6895         building their respective functions.
6897 2017-01-23  Gary Dismukes  <dismukes@adacore.com>
6899         * scng.adb: Minor reformatting of error message.
6901 2017-01-23  Ed Schonberg  <schonberg@adacore.com>
6903         * sem_ch6.adb (Analyze_Expression_Function): Do not attempt
6904         to freeze the return type of an expression funxtion that is a
6905         completion, if the type is a limited view and the non-limited
6906         view is available.
6908 2017-01-23  Ed Schonberg  <schonberg@adacore.com>
6910         * par-ch4.adb (P_Aggregate_Or_Parent_Expr): Recognize delta
6911         aggregate construct.
6912         (P_Record_Or_Array_Component_Association): An array aggregate
6913         can start with an Iterated_Component_Association.
6914         * scng.adb: Modify error message on improper use of @ in earlier
6915         versions of the language.
6916         * sinfo.ads: New node kind N_Delta_Aggregate.
6917         * sinfo.adb: An N_Delta_Aggregate has component associations and
6918         an expression.
6919         * sem_res.adb (Resolve): Call Resolve_Delta_Aggregate.
6920         * sem_aggr.ads, sem_aggr.adb (Resolve_Iterated_Component_Association):
6921         Create a new index for each one of the choices in the association,
6922         to prevent spurious homonyms in the scope.
6923         (Resolve_Delta_Aggregate): New.
6924         * sem.adb: An N_Delta_Aggregate is analyzed like an aggregate.
6925         * exp_util.adb (Insert_Actions): Take into account
6926         N_Delta_Aggregate.
6927         * exp_aggr.ads: New procedure Expand_N_Delta_Aggregate.
6928         * exp_aggr.adb: New procedure Expand_N_Delta_Aggregate,
6929         and local procedures Expand_Delta_Array_Aggregate and
6930         expand_Delta_Record_Aggregate.
6931         * sprint.adb: Handle N_Delta_Aggregate.
6933 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
6935         * exp_ch11.adb (Expand_N_Exception_Declaration): Generate an
6936         empty name when the exception declaration is subject to pragma
6937         Discard_Names.
6938         (Null_String): New routine.
6940 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
6942         * par-ch9.adb (P_Protected_Definition): Parse
6943         any optional and potentially illegal pragmas which appear in
6944         a protected operation declaration list.
6945         (P_Task_Items): Parse
6946         any optional and potentially illegal pragmas which appear in a
6947         task item list.
6949 2017-01-23  Pascal Obry  <obry@adacore.com>
6951         * s-taprop-mingw.adb (Enter_Task): Initialize the Thread handle which
6952         is needed when a foreign thread call a Win32 API using a thread handle
6953         like GetThreadTimes() for example.
6955 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
6957         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
6958         allow an 'Address clause to be specified on a prefix of a
6959         class-wide type.
6961 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
6963         * checks.adb (Insert_Valid_Check): Ensure that the prefix of
6964         attribute 'Valid is a renaming of the original expression when
6965         the expression denotes a name. For all other kinds of expression,
6966         use a constant to capture the value.
6967         * exp_util.adb (Is_Name_Reference): Moved to Sem_Util.
6968         * sem_util.ads, sem_util.adb (Is_Name_Reference): Moved from Exp_Util.
6970 2017-01-23  Justin Squirek  <squirek@adacore.com>
6972         * sem_eval.adb (Eval_Integer_Literal): Add special
6973         case to avoid optimizing out check if the literal appears in
6974         an if-expression.
6976 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
6978         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
6979         allow an 'Address clause to be specified on a prefix of a
6980         class-wide type.
6982 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
6984         * checks.adb (Insert_Valid_Check): Ensure that the prefix of
6985         attribute 'Valid is a renaming of the original expression when
6986         the expression denotes a name. For all other kinds of expression,
6987         use a constant to capture the value.
6988         * exp_util.adb (Is_Name_Reference): Moved to Sem_Util.
6989         * sem_util.ads, sem_util.adb (Is_Name_Reference): Moved from Exp_Util.
6991 2017-01-23  Justin Squirek  <squirek@adacore.com>
6993         * sem_eval.adb (Eval_Integer_Literal): Add special
6994         case to avoid optimizing out check if the literal appears in
6995         an if-expression.
6997 2017-01-23  Ed Schonberg  <schonberg@adacore.com>
6999         * sem_ch4.adb (Try_Primitive_Operations,
7000         Is_Valid_First_Argument_Of): argument is valid if it is a derived
7001         type with unknown discriminants that matches its underlying
7002         record view.
7003         * exp_util.adb (Expand_Subtype_From_Expr): Do not expand
7004         expression if its type is derived from a limited type with
7005         unknown discriminants, because the expansion (which is a call)
7006         must be expanded in the enclosing context to add the proper build-
7007         in-place parameters to the call.
7008         * lib.ads, exp_ch9.adb: Minor fixes in comments.
7010 2017-01-23  Yannick Moy  <moy@adacore.com>
7012         * frontend.adb (Frontend): Do not load runtime
7013         unit for GNATprove when parsing failed.
7014         * exp_ch9.adb: minor removal of extra whitespace
7015         * exp_ch6.adb: minor typo in comment
7016         * sem_util.adb: Code cleanup.
7017         * exp_ch9.ads, par-ch2.adb: minor style fixes in whitespace and comment
7018         * a-ngcefu.adb: minor style fix in whitespace
7020 2017-01-23  Thomas Quinot  <quinot@adacore.com>
7022         * scos.ads: Document usage of 'd' as default SCO kind for
7023         declarations.
7024         * par_sco.adb (Traverse_Declarations_Or_Statements.
7025         Traverse_Degenerate_Subprogram): New supporting routine for expression
7026         functions and null procedures.
7027         (Traverse_Declarations_Or_Statements.Traverse_One): Add
7028         N_Expression_Function to the subprogram case; add required
7029         support for null procedures and expression functions.
7031 2017-01-23  Bob Duff  <duff@adacore.com>
7033         * namet.ads (Bounded_String): Decrease the size of type
7034         Bounded_String to avoid running out of stack space.
7035         * namet.ads (Append): Don't ignore buffer overflow; raise
7036         Program_Error instead.
7038 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
7040         * exp_ch5.adb, freeze.adb, par-ch4.adb, scng.adb, sem_ch13.adb,
7041         sem_ch3.adb, sem_ch5.adb, sem_ch5.ads, sem_util.adb, sinfo.ads: Minor
7042         reformatting.
7043         * exp_ch9.adb: minor style fix in comment.
7045 2017-01-23  Ed Schonberg  <schonberg@adacore.com>
7047         * sem_ch4.adb (Analyze_Allocator): Handle properly a type derived
7048         for a limited record extension with unknown discriminants whose
7049         full view has no discriminants.
7051 2017-01-23  Yannick Moy  <moy@adacore.com>
7053         * exp_spark.adb: Alphabetize with clauses.
7055 2017-01-23  Yannick Moy  <moy@adacore.com>
7057         * sem_util.adb (Has_Enabled_Property): Treat
7058         protected objects and variables differently from other variables.
7060 2017-01-23  Thomas Quinot  <quinot@adacore.com>
7062         * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order):
7063         Split original Ada 95 part off into new subprogram
7064         below. Call that subprogram (instead of proceeding with
7065         AI95-0133 behaviour) if debug switch -gnatd.p is in use.
7066         (Adjust_Record_For_Reverse_Bit_Order_Ada_95): ... new subprogram
7067         * debug.adb Document new switch -gnatd.p
7068         * freeze.adb (Freeze_Entity.Freeze_Record_Type): Do not adjust
7069         record for reverse bit order if an error has already been posted
7070         on the record type.  This avoids generating extraneous "info:"
7071         messages for illegal code.
7073 2017-01-23  Justin Squirek  <squirek@adacore.com>
7075         * sem_ch3.adb (Analyze_Declarations): Correct comments
7076         * freeze.adb (Find_Constant): Add detection of deferred constants
7077         so they are not incorrectly flagged as premature.
7079 2017-01-23  Ed Schonberg  <schonberg@adacore.com>
7081         * scans.ads: New token At_Sign. Remove '@' from list of illegal
7082         characters for future version of the language. '@' is legal name.
7083         * scng.ads, scng.adb (Scan):  Handle '@' appropriately.
7084         * scn.adb (Scan_Reserved_Identifier): An occurrence of '@'
7085         denotes a Target_Name.
7086         * par-ch4.adb (P_Name, P_Primary): Handle Target_Name.
7087         * sinfo.ads, sinfo.adb (N_Target_Name): New non-terminal node.
7088         (Has_Target_Names): New flag on N_Assignment_Statement, to
7089         indicate that RHS has occurrences of N_Target_Name.
7090         * sem.adb: Call Analyze_Target_Name.
7091         * sem_ch5.ads, sem_ch5.adb (Analyze_Target_Name): New subpogram.
7092         (urrent_LHS): Global variable that denotes LHS of assignment,
7093         used in the analysis of Target_Name nodes.
7094         * sem_res.adb (Resolve_Target_Name): New procedure.
7095         * exp_ch5.adb (Expand_Assign_With_Target_Names): (AI12-0125):
7096         N is an assignment statement whose RHS contains occurences of @
7097         that designate the value of the LHS of the assignment. If the
7098         LHS is side-effect free the target names can be replaced with
7099         a copy of the LHS; otherwise the semantics of the assignment
7100         is described in terms of a procedure with an in-out parameter,
7101         and expanded as such.
7102         (Expand_N_Assignment_Statement): Call
7103         Expand_Assign_With_Target_Names when needed.
7104         * exp_util.adb (Insert_Actions): Take into account N_Target_Name.
7105         * sprint.adb: Handle N_Target_Name.
7107 2017-01-23  Eric Botcazou  <ebotcazou@adacore.com>
7109         * checks.adb: Minor fix in comment.
7111 2017-01-23  Philippe Gil  <gil@adacore.com>
7113         * g-debpoo.adb (Do_Report) remove freed chunks from chunks
7114         count in Sort = Memory_Usage or Allocations_Count
7116 2017-01-23  Justin Squirek  <squirek@adacore.com>
7118         * sem_ch3.adb: Code cleanup.
7120 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
7122         * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Move all global
7123         variables to the local variable section. Update the profile
7124         of various nested routine that previously had visibility
7125         of those globals. One the matching phase has completed,
7126         remove certain classes of clauses which are considered noise.
7127         (Check_Dependency_Clause): Properly detect a match between two
7128         'Result attributes. Update the various post-match cases to use
7129         Is_Already_Matched as this routine now automatically recognizes
7130         a previously matched 'Result attribute.
7131         (Is_Already_Matched): New routine.
7132         (Remove_Extra_Clauses): New routine.
7133         (Report_Extra_Clauses): Remove the detection of ... => null
7134         clauses as this is now done in Remove_Extra_Clauses.
7136 2017-01-23  Ed Schonberg  <schonberg@adacore.com>
7138         * sem_aggr.adb (Resolve_Array_Aggregate): In ASIS mode do not
7139         report on spurious overlaps between values involving a subtype
7140         with a static predicate, because the expansion of such a subtype
7141         into individual ranges in inhibited in ASIS mode.
7143 2017-01-23  Justin Squirek  <squirek@adacore.com>
7145         * sem_ch3.adb (Analyze_Declarations): Add detection
7146         of an edge case and delay freezing if it is present.
7148 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
7150         * sem_ch3.adb, exp_spark.adb, exp_attr.adb, sem_ch9.adb, sem_prag.adb,
7151         sem_util.adb, sem_warn.adb, exp_ch3.adb: Minor reformatting.
7153 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
7155         * freeze.adb (Freeze_Subprogram): Ensure that all anonymous
7156         access-to-subprogram types inherit the convention of the
7157         associated subprogram.  (Set_Profile_Convention): New routine.
7158         * sem_ch6.adb (Check_Conformance): Do not compare the conventions
7159         of the two entities directly, use Conventions_Match to account
7160         for anonymous access-to-subprogram and subprogram types.
7161         (Conventions_Match): New routine.
7163 2017-01-23  Claire Dross  <dross@adacore.com>
7165         * exp_spark.adb (Expand_SPARK_Attribute_Reference): For attributes
7166         which return Universal_Integer, force the overflow check flag for
7167         Length and Range_Length for types as big as Long_Long_Integer.
7169 2017-01-23  Claire Dross  <dross@adacore.com>
7171         * exp_spark.adb (Expand_SPARK_Attribute_Reference):  For
7172         attributes which return Universal_Integer, introduce a conversion
7173         to the expected type with the appropriate check flags set.
7174         * sem_res.adb (Resolve_Range): The higher bound can be in Typ's
7175         base type if the range is null. It may still be invalid if it
7176         is higher than the lower bound. This is checked later in the
7177         context in which the range appears.
7179 2017-01-23  Pierre-Marie de Rodat  <derodat@adacore.com>
7181         * scos.ads: Introduce a constant to represent ignored
7182         dependencies in SCO_Unit_Table_Entry.
7184 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
7186         * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Remove extra
7187         spaces from error messages.
7189 2017-01-23  Ed Schonberg  <schonberg@adacore.com>
7191         * exp_ch3.adb (Check_Large_Modular_Array): New procedure,
7192         subsidiary to Expand_N_Object_ Declaration, to compute a guard on
7193         an object declaration for an array type with a modular index type
7194         with the size of Long_Long_Integer. Special processing is needed
7195         in this case to compute reliably the size of the object, and
7196         eventually  to raise Storage_Error, when wrap-around arithmetic
7197         might compute a meangingless size for the object.
7199 2017-01-23  Justin Squirek  <squirek@adacore.com>
7201         * a-wtenau.adb, par-endh.adb, sem_prag.adb,
7202         sem_type.adb: Code cleanups.
7204 2017-01-23  Bob Duff  <duff@adacore.com>
7206         * sem_res.adb (Resolve_Call): In the part of the code where
7207         it is deciding whether to turn the call into an indexed
7208         component, avoid doing so if the call is to an instance of
7209         Unchecked_Conversion. Otherwise, the compiler turns it into an
7210         indexed component, and resolution of that turns it back into a
7211         function call, and so on, resulting in infinite recursion.
7212         * sem_util.adb (Needs_One_Actual): If the first formal has a
7213         default, then return False.
7215 2017-01-21  Eric Botcazou  <ebotcazou@adacore.com>
7217         * sem_eval.adb (Compile_Time_Compare): Reinstate the expr+literal (etc)
7218         optimizations when the type is modular and the offsets are equal.
7220 2017-01-20  Thomas Quinot  <quinot@adacore.com>
7222         * sem_warn.adb (Warn_On_Useless_Assignment): Adjust wording of warning
7223         message.
7225 2017-01-20  Nicolas Roche  <roche@adacore.com>
7227         * terminals.c: Ignore failures on setpgid and tcsetpgrp commands.
7229 2017-01-20  Bob Duff  <duff@adacore.com>
7231         * sem_eval.adb (Compile_Time_Compare): Disable the expr+literal
7232         (etc) optimizations when the type is modular.
7234 2017-01-20  Yannick Moy  <moy@adacore.com>
7236         * sem_ch6.adb (Move_Pragmas): move some pragmas,
7237         but copy the SPARK_Mode pragma instead of moving it.
7238         (Build_Subprogram_Declaration): Ensure that the generated spec
7239         and original body share the same SPARK_Pragma aspect/pragma.
7240         * sem_util.adb, sem_util.ads (Copy_SPARK_Mode_Aspect): New
7241         procedure to copy SPARK_Mode aspect.
7243 2017-01-20  Bob Duff  <duff@adacore.com>
7245         * sem_ch3.adb (Analyze_Declarations): Disable Resolve_Aspects
7246         even in ASIS mode.
7247         * sem_ch13.adb (Resolve_Name): Enable setting the entity to
7248         Empty even in ASIS mode.
7250 2017-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
7252         * exp_ch9.adb: minor style fixes in comments.
7253         * sem_ch9.adb (Analyze_Delay_Relative): in GNATprove mode a delay
7254         relative statement introduces an implicit dependency on
7255         Ada.Real_Time.Clock_Time.
7256         * sem_util.adb: Minor reformatting.
7258 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
7260         * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect Alignment
7261         must be treated as delayed aspect even if the expression is
7262         a literal, because the aspect affects the freezing and the
7263         elaboration of the object to which it applies.
7265 2017-01-20  Tristan Gingold  <gingold@adacore.com>
7267         * s-osinte-vxworks.ads (Interrup_Range): New subtype.
7269 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
7271         * lib-xref.adb (Generate_Reference): Do not warn about the
7272         presence of a pragma Unreferenced if the entity appears as the
7273         actual in a procedure call that does not come from source.
7275 2017-01-20  Pascal Obry  <obry@adacore.com>
7277         * expect.c, terminals.c: Fix some warnings about unused variables.
7278         * gsocket.h, adaint.c, adaint.h: Fix some more warnings in the C part
7279         of the runtime.
7281 2017-01-20  Bob Duff  <duff@adacore.com>
7283         * exp_attr.adb (Constrained): Apply an access check (check that
7284         the prefix is not null) when the prefix denotes an object of an
7285         access type; that is, when there is an implicit dereference.
7287 2017-01-20  Gary Dismukes  <dismukes@adacore.com>
7289         * s-rident.ads (constant Profile_Info): Remove
7290         No_Calendar from GNAT_Extended_Ravenscar restrictions.
7292 2017-01-20  Tristan Gingold  <gingold@adacore.com>
7294         *  s-maccod.ads: Add pragma No_Elaboration_Code_All
7296 2017-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
7298         * ghost.adb (Mark_Ghost_Clause): New routine.
7299         (Prune_Node): Do not prune compilation unit nodes.
7300         (Remove_Ignored_Ghost_Code): Prune the compilation unit node directly.
7301         This does not touch the node itself, but does prune all its fields.
7302         * ghost.ads (Mark_Ghost_Clause): New routine.
7303         * sem_ch8.adb (Analyze_Use_Package): Emit an error when a use
7304         package clause mentions Ghost and non-Ghost packages. Mark a
7305         use package clause as Ghost when it mentions a Ghost package.
7306         (Analyze_Use_Type): Emit an error when a use type clause mentions
7307         Ghost and non-Ghost types. Mark a use type clause as Ghost when
7308         it mentions a Ghost type.
7309         * sem_ch10.adb (Analyze_With_Clause): Mark a with clause as
7310         Ghost when it withs a Ghost unit.
7312 2017-01-20  Javier Miranda  <miranda@adacore.com>
7314         * sem_res.adb (Resolve_Call): If a function call
7315         returns a limited view of a type and at the point of the call the
7316         function is not declared in the extended main unit then replace
7317         it with the non-limited view, which must be available. If the
7318         called function is in the extended main unit then no action is
7319         needed since the back-end handles this case.
7321 2017-01-20  Eric Botcazou  <ebotcazou@adacore.com>
7323         * sem_ch7.adb (Contains_Subp_Or_Const_Refs): Rename into...
7324         (Contains_Subprograms_Refs): ...this.  Adjust comment
7325         for constants.  (Is_Subp_Or_Const_Ref): Rename into...
7326         (Is_Subprogram_Ref): ...this.
7327         (Has_Referencer): Rename Has_Non_Subp_Const_Referencer variable into
7328         Has_Non_Subprograms_Referencer and adjust comment.  Remove
7329         incorrect shortcut for package declarations and bodies.
7331 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
7333         * sem_ch3.adb (Complete_Private_Subtype): If the scope of the
7334         base type differs from that of the completion and the private
7335         subtype is an itype (created for a constraint on an access
7336         type e.g.), set Delayed_Freeze on both to prevent out-of-scope
7337         anomalies in gigi.
7339 2017-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
7341         * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
7342         When inheriting the SPARK_Mode of a prior expression function,
7343         look at the properly resolved entity rather than the initial
7344         candidate which may denote a homonym.
7346 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
7348         * sem_prag.adb (Rewrite_Assertion_Kind): If the name is
7349         Precondition or Postcondition, and the context is pragma
7350         Check_Policy, indicate that this Pre-Ada2012 usage is deprecated
7351         and suggest the standard names Assertion_Policy /Pre /Post
7352         instead.
7354 2017-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
7356         * sem_ch10.adb, sem_cat.adb: Minor reformatting.
7358 2017-01-20  Javier Miranda  <miranda@adacore.com>
7360         * sem_ch3.adb (Access_Type_Declaration): Protect access to the
7361         Entity attribute.
7362         * sem_ch10.adb (Install_Siblings): Skip processing malformed trees.
7363         * sem_cat.adb (Validate_Categoriztion_Dependency): Skip processing
7364         malformed trees.
7366 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
7368         * sem_ch13.adb (Analyze_Aspect_Specification, case
7369         Dynamic_Predicate): If the entity E is a subtype that inherits
7370         a static predicate for its parent P,, the inherited and the
7371         new predicate combine in the generated predicate function,
7372         and E only has a dynamic predicate.
7374 2017-01-20  Tristan Gingold  <gingold@adacore.com>
7376         * s-boustr.ads, s-boustr.adb: New package.
7377         * Makefile.rtl: Add s-boustr.
7379 2017-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
7381         * inline.adb (Process_Formals): Qualify the
7382         expression of a return statement when it yields a universal type.
7384 2017-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
7386         * freeze.adb (Freeze_All): Freeze the default
7387         expressions of all eligible formal parameters that appear in
7388         entries, entry families, and protected subprograms.
7390 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
7392         * sem_ch3.adb (Check_Nonoverridable_Aspects); Refine check
7393         for illegal inherited Implicit_Dereference aspects with renamed
7394         discriminants.
7396 2017-01-20  Javier Miranda  <miranda@adacore.com>
7398         * debug.adb (switch d.6): do not avoid declaring unreferenced itypes.
7399         * nlists.ads (Lock_Lists, Unlock_Lists): New subprograms.
7400         * nlists.adb (Lock_Lists, Unlock_Lists): New subprograms.
7401         (Set_First, Set_Last, Set_List_Link, Set_Next, Set_Parent,
7402         Set_Prev, Tree_Read): Adding assertion.
7403         * atree.ads (Lock_Nodes, Unlock_Nodes): New subprograms.
7404         * atree.adb (Lock_Nodes, Unlock_Nodes): New subprograms.
7405         (Set_Analyzed, Set_Check_Actuals, Set_Comes_From_Source,
7406         Set_Ekind, Set_Error_Posted, Set_Has_Aspects,
7407         Set_Is_Ignored_Ghost_Node, Set_Original_Node, Set_Paren_Count,
7408         Set_Parent, Set_Sloc, Set_Nkind, Set_FieldNN, Set_NodeNN,
7409         Set_ListNN, Set_ElistNN, Set_NameN, Set_StrN, Set_UintNN,
7410         Set_UrealNN, Set_FlagNNN, Set_NodeN_With_Parent,
7411         Set_ListN_With_Parent): Adding assertion.
7413 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
7415         * sem_prag.adb (Process_Convention): Diagnose properly a pragma
7416         import that applies to several homograph subprograms. when one
7417         of them is declared by a subprogram body.
7419 2017-01-20  Justin Squirek  <squirek@adacore.com>
7421         * exp_ch6.adb (Expand_Call): Remove optimization
7422         that nulls out calls to null procedures.
7424 2017-01-20  Yannick Moy  <moy@adacore.com>
7426         * inline.adb (Expand_Inlined_Call): Keep more
7427         precise type of actual for inlining whenever possible. In
7428         particular, do not switch to the formal type in GNATprove mode in
7429         some case where the GNAT backend might require it for visibility.
7431 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
7433         * sem_ch3.adb (Check_Non_Overridable_Aspects): An inherited
7434         aspect Implicit_Dereference can be inherited by a full view if
7435         the partial view has no discriminants, because there is no way
7436         to apply the aspect to the partial view.
7437         (Build_Derived_Record_Type): If derived type renames discriminants
7438         of the parent, the new discriminant inherits the aspect from
7439         the old one.
7440         * sem_ch4.adb (Analyze_Call): Handle properly a parameterless
7441         call through an access discriminant designating a subprogram.
7442         * sem_ch5.adb (Analyze_Assignment): (Analyze_Call): Handle
7443         properly a parameterless call through an access discriminant on
7444         the left-hand side of an assignment.
7445         * sem_res.adb (resolve): If an interpreation involves a
7446         discriminant with an implicit dereference and the expression is an
7447         entity, resolution takes place later in the appropriate routine.
7448         * sem_ch13.adb (Analyze_Aspect_Implicit_Dereference): Recognize
7449         access discriminants that designate a subprogram type.
7451 2017-01-20  Pascal Obry  <obry@adacore.com>
7453         * a-locale.adb, a-locale.ads: Update Ada.Locales for RM 2012 COR:1:2016
7455 2017-01-20  Yannick Moy  <moy@adacore.com>
7457         * sem_ch10.adb (Check_No_Elab_Code_All): Do not issue an error
7458         on implicitly with'ed units in GNATprove mode.
7459         * sinfo.ads (Implicit_With): Document use of flag for implicitly
7460         with'ed units in GNATprove mode.
7462 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
7464         * sem_cat.adb (Validate_Static_Object_Name): In a preelaborated
7465         unit Do not report an error on a non-static entity that appears
7466         in the context of a spec expression, such as an aspect expression.
7468 2017-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
7470         * einfo.adb: Flag298 now denotes Is_Underlying_Full_View.
7471         (Is_Underlying_Full_View): New routine.
7472         (Set_Is_Underlying_Full_View): New routine.
7473         (Write_Entity_Flags): Add an entry for Is_Underlying_Full_View.
7474         * einfo.ads Add new attribute Is_Underlying_Full_View.
7475         (Is_Underlying_Full_View): New routine along with pragma Inline.
7476         (Set_Is_Underlying_Full_View): New routine along with pragma Inline.
7477         * exp_util.adb (Build_DIC_Procedure_Body): Do not consider
7478         class-wide types and underlying full views. The first subtype
7479         is used as the working type for all Itypes, not just array base types.
7480         (Build_DIC_Procedure_Declaration): Do not consider
7481         class-wide types and underlying full views. The first subtype
7482         is used as the working type for all Itypes, not just array
7483         base types.
7484         * freeze.adb (Freeze_Entity): Inherit the freeze node of a full
7485         view or an underlying full view without clobbering the attributes
7486         of a previous freeze node.
7487         (Inherit_Freeze_Node): New routine.
7488         * sem_ch3.adb (Build_Derived_Private_Type): Mark an underlying
7489         full view as such.
7490         (Build_Underlying_Full_View): Mark an underlying full view as such.
7491         * sem_ch7.adb (Install_Private_Declarations): Mark an underlying
7492         full view as such.
7494 2017-01-20  Yannick Moy  <moy@adacore.com>
7496         * sinfo.ads: Document lack of Do_Division_Check flag
7497         on float exponentiation.
7499 2017-01-19  Javier Miranda  <miranda@adacore.com>
7501         * ghost.adb (Propagate_Ignored_Ghost_Code): Protect access to the
7502         identifier attribute of a block-statement node. Required to avoid
7503         assertion failure when building the new containers library.
7505 2017-01-19  Bob Duff  <duff@adacore.com>
7507         * exp_ch3.adb: Update comment.
7509 2017-01-19  Vincent Celier  <celier@adacore.com>
7511         * gprep.adb (Gnatprep): Parse the definition file without
7512         "replace in comments" even when switch -C is used.
7514 2017-01-19  Justin Squirek  <squirek@adacore.com>
7516         * exp_ch9.adb (Is_Pure_Barrier): Create function
7517         Is_Count_Attribute to identify an expansion of the 'Count
7518         attribute.
7520 2017-01-19  Ed Schonberg  <schonberg@adacore.com>
7522         * sem_ch5.adb (Analyze_Loop_Statement): In GNATprove mode the
7523         statements within an element iterator loop are only analyzed
7524         agter the loop is rewritten. Within a generic the analysis must
7525         be performed in any case to complete name capture.
7527 2017-01-19  Bob Duff  <duff@adacore.com>
7529         * sem_prag.adb (Analyze_Pragma): Check for ignored pragmas first,
7530         before checking for unrecognized pragmas.
7531         Initialize Pname on its declarations; that's always good style.
7533 2017-01-19  Claire Dross  <dross@adacore.com>
7535         * exp_ch7.adb (Build_Invariant_Procedure_Body): Semi-insert the
7536         body into the tree for GNATprove by setting its Parent field. The
7537         components invariants of composite types are not checked by
7538         the composite type's invariant procedure in GNATprove mode.
7539         (Build_Invariant_Procedure_Declaration): Semi-insert the
7540         declaration into the tree for GNATprove by setting its Parent
7541         field.
7542         * freeze.adb (Freeze_Arry_Type):In GNATprove mode, do not add
7543         the component invariants to the array type  invariant procedure
7544         so that the procedure can be used to  check the array type
7545         invariants if any.
7546         (Freeze_Record_Type): In GNATprove mode, do
7547         not add the component invariants to the record type  invariant
7548         procedure so that the procedure can be used to  check the record
7549         type invariants if any.
7551 2017-01-19  Hristian Kirtchev  <kirtchev@adacore.com>
7553         * lib-xref-spark_specific.adb: Minor reformatting.
7554         * exp_ch7.adb (Add_Parent_Invariants): Do not process array types.
7556 2017-01-19  Javier Miranda  <miranda@adacore.com>
7558         * exp_aggr.adb (Pass_Aggregate_To_Back_End): Renamed as
7559         Build_Back_End_Aggregate.
7560         (Generate_Aggregate_For_Derived_Type): Code cleanup.
7561         (Prepend_Stored_Values): Code cleanup.
7563 2017-01-19  Ed Schonberg  <schonberg@adacore.com>
7565         * sem_ch6.adb (Analyze_Expression_Function): Check for an
7566         incomplete return type after attempting to freeze it, so that
7567         other freeze actiona are generated in the proper order.
7569 2017-01-19  Ed Schonberg  <schonberg@adacore.com>
7571         * sem_aggr.adb (Resolve_Aggregate): If the type is a string
7572         type, ie. a type whose component is a character type, and the
7573         aggregate is positional, do not convert into a string literal
7574         if the index type is not an integer type, because the original
7575         type may be required in an enclosing operation.
7577 2017-01-19  Bob Duff  <duff@adacore.com>
7579         * binde.adb, debug.adb: Enable new elaboration order algorithm
7580         by default. -dp switch reverts to the old algorithm.
7582 2017-01-19  Hristian Kirtchev  <kirtchev@adacore.com>
7584         * sem_ch3.adb Add with and use clauses for Exp_Ch7.
7585         (Analyze_Declarations): Create the DIC and Invariant
7586         procedure bodies s after all freezing has taken place.
7587         (Build_Assertion_Bodies): New routine.
7588         * sem_ch7.adb Remove the with and use clauses for Exp_Ch7
7589         and Exp_Util.
7590         (Analyze_Package_Specification): Remove the
7591         generation of the DIC and Invariant procedure bodies. This is
7592         now done by Analyze_Declarations.
7593         * sem_disp.adb (Check_Dispatching_Operation): DIC and Invariant
7594         procedures are never treated as primitives.
7596 2017-01-19  Yannick Moy  <moy@adacore.com>
7598         * frontend.adb: Analyze inlined bodies and check elaboration
7599         rules in GNATprove mode too.
7600         * sem_elab.adb (Delay_Element): Add Boolean component to save
7601         indication that call is in SPARK code.  (Check_Elab_Calls):
7602         Check elaboration rules in GNATprove mode, and correctly set
7603         the current value of SPARK_Mode.
7604         * lib-xref-spark_specific.adb
7605         (Add_SPARK_Xrefs): Simplify iteration over dereferences.
7607 2017-01-19  Ed Schonberg  <schonberg@adacore.com>
7609         * exp_ch4.adb (Expand_Concatenate): Do no enable overflow
7610         checks on the expression for the high bound of concatenation
7611         when checks are disabled, to suppress warnings about potential
7612         constraint errors in restricted runtimes.
7614 2017-01-19  Hristian Kirtchev  <kirtchev@adacore.com>
7616         * exp_ch3.adb (Expand_Freeze_Enumeration_Type): Mark the
7617         representation-to-position function as inlined.
7618         * sem_cat.adb (Set_Categorization_From_Scope): Do not modify
7619         the purity of an internally generated entity if it has been
7620         explicitly marked as pure for optimization purposes.
7621         * exp_aggr.adb: Minor reformatting.
7623 2017-01-19  Javier Miranda  <miranda@adacore.com>
7625         * exp_ch6.adb (Expand_Call): Remove side effects on
7626         actuals that are allocators with qualified expression since the
7627         initialization of the object is performed by means of individual
7628         statements (and hence it must be done before the call).
7630 2017-01-19  Ed Schonberg  <schonberg@adacore.com>
7632         * sem_ch3.adb (Analyze_Declarations): Minor reformatting.
7633         (Build_Derived_Enumeration_Type): If the derived type inherits a
7634         dynamic predicate from its parent, the bounds of the type must
7635         freeze because an explicit constraint is constructed for the
7636         type and the corresponding range is elaborated now.
7638 2017-01-19  Arnaud Charlet  <charlet@adacore.com>
7640         * sem_attr.ads: minor fix of inconsistent casing in comment
7641         * lib-writ.ads: minor align comments in columns
7642         * sem_ch3.adb: Minor reformatting.
7643         * spark_xrefs.ads: minor fix typo in SPARK-related comment
7644         * table.ads: minor style fix in comment
7645         * lib-xref-spark_specific.adb
7646         (Add_SPARK_Xrefs): simplify processing of SPARK cross-references.
7647         * sem_ch12.adb: minor whitespace fix
7648         * freeze.adb: Add comment.
7649         * sem_util.adb (Unique_Name): for instances of
7650         generic subprograms ignore the name of the wrapper package.
7652 2017-01-19  Javier Miranda  <miranda@adacore.com>
7654         * exp_aggr.adb (Resolve_Record_Aggregate):
7655         Factorize code needed for aggregates of limited and unlimited
7656         types in a new routine.
7657         (Pass_Aggregate_To_Back_End): New subprogram.
7659 2017-01-19  Yannick Moy  <moy@adacore.com>
7661         * sinfo.adb (Pragma_Name): Only access up to Last_Pair of Pragma_Map.
7663 2017-01-19  Ed Schonberg  <schonberg@adacore.com>
7665         * sem_ch4.ads, sem_ch4.adb (Try_Object_Operation): Make subprogram
7666         public, for use elsewhere.
7667         * sem_ch6.adb (Analyze_Procedure_Call): In SPARK_Mode and within
7668         an Inlined_body, recognize a call that uses object notation
7669         and has not been rewritten as a regular call because regular
7670         expansion has not taken place.
7672 2017-01-19  Bob Duff  <duff@adacore.com>
7674         * checks.adb (Apply_Type_Conversion_Checks): Disable small optimization
7675         in case of generic formal discrete types, because it causes crashes in
7676         the compiler when built with assertions on.
7678 2017-01-19  Hristian Kirtchev  <kirtchev@adacore.com>
7680         * lib-xref-spark_specific.adb, sem_util.adb, sem_util.ads,
7681         sem_ch4.adb, sem_ch8.adb, lib-xref.ads: Minor reformatting.
7683 2017-01-19  Bob Duff  <duff@adacore.com>
7685         * bcheck.adb (Check_Consistent_Dynamic_Elaboration_Checking):
7686         Increment Warnings_Detected.  It was decrementing, which is
7687         wrong since we just issued a warning message.
7688         * binderr.ads (Errors_Detected, Warnings_Detected): Declare
7689         these variables to be of subtype Nat instead of Int, because
7690         they should never be negative.
7692 2017-01-19  Javier Miranda  <miranda@adacore.com>
7694         * contracts.adb (Build_Postconditions_Procedure): Replace
7695         Generate_C_Code by Modify_Tree_For_C.
7696         * exp_aggr.adb (Build_Record_Aggr_Code, Expand_Array_Aggregate):
7697         Replace Generate_C_Code by Modify_Tree_For_C.
7698         * exp_attr.adb (Float_Valid, Is_GCC_Target): Replace Generate_C_Code by
7699         Modify_Tree_For_C.
7700         * exp_ch11.adb (Expand_N_Exception_Declaration): Replace
7701         Generate_C_Code by Modify_Tree_For_C.
7702         * exp_ch4.adb (Expand_Allocator_Expression): Replace
7703         Generate_C_Code by Modify_Tree_For_C.
7704         * exp_dbug.adb (Qualify_Entity_Name): Replace Generate_C_Code
7705         by Modify_Tree_For_C.
7706         * exp_util.adb (Remove_Side_Effects, Side_Effect_Free): Replace
7707         Generate_C_Code by Modify_Tree_For_C.
7708         * sem_res.adb (Resolve_Type_Conversion): Replace Generate_C_Code
7709         by Modify_Tree_For_C.
7710         * sinfo.ads (Modify_Tree_For_C): Adding documentation.
7712 2017-01-19  Javier Miranda  <miranda@adacore.com>
7714         * sem_util.ads, sem_util.adb (Expression_Of_Expression_Function): New
7715         subprogram.
7716         (Is_Inlinable_Expression_Function): New subprogram.
7717         * exp_ch6.ads, exp_ch6.adb (Expression_Of_Expression_Function): Moved
7718         to Sem_Util.
7719         (Is_Inlinable_Expression_Function): Moved to Sem_Util.
7721 2017-01-19  Ed Schonberg  <schonberg@adacore.com>
7723         * sem_ch4.adb (Diagnose_Call): Improve error message when a
7724         selected component has a prefix that might be interpreted
7725         as a parameterless function call, but none of the candidate
7726         interpretations is parameterless, and there is a hidden homonym
7727         of the prefix that is a package.
7728         * sem_ch8.adb (Find_Selected_Component): If the prefix might be
7729         interpreted as a parameterless function call and its analysis
7730         fails, do not call Analyze_Selected_Component.
7732 2017-01-19  Steve Baird  <baird@adacore.com>
7734         * sem_util.ads: Add new Use_Full_View Boolean parameter to
7735         Get_Index_Bounds.
7736         * sem_util.adb (Get_Index_Bounds): replace calls to Scalar_Range with
7737         calls to a newly-defined Scalar_Range_Of_Right_View function.
7739 2017-01-19  Arnaud Charlet  <charlet@adacore.com>
7741         * gnat1drv.adb: minor fix of unbalanced parens in comment
7742         * lib-xref.ads (Traverse_Compilation_Unit): declaration moved
7743         to visible part of the package to allow re-use in GNATprove.
7744         * lib-xref-spark_specific.adb (Traverse_Stub): routine refactored
7745         from repeated code of Traverse_Compilation_Unit.
7746         (Traverse_Declaration_Or_Statement): fixed detection of
7747         generic subprograms and packages; also, iteration over case
7748         statement alternatives rewritten to avoid testing if the first
7749         alternative is present (since it must be present due to Ada
7750         syntax restrictions).
7752 2017-01-19  Hristian Kirtchev  <kirtchev@adacore.com>
7754         * exp_ch6.adb (Expand_N_Subprogram_Body): Mark the spec as
7755         returning by reference not just for subprogram body stubs,
7756         but for all subprogram cases.
7757         * sem_util.adb: Code reformatting.
7758         (Requires_Transient_Scope): Update the call to Results_Differ.
7759         (Results_Differ): Update the parameter profile and the associated
7760         comment on usage.
7762 2017-01-19  Ed Schonberg  <schonberg@adacore.com>
7764         * sem_dim.adb (Analyze_Dimension): Analyze object declaration and
7765         identifier nodes that do not come from source, to handle properly
7766         dimensionality check within an inlined body which inclddes both
7767         original operands and rewritten operands. This removes spurious
7768         dimensionality errors in the presence of front-end inlining,
7769         as well as in SPARK mode.
7771 2017-01-16  Jakub Jelinek  <jakub@redhat.com>
7773         PR driver/49726
7774         * gcc-interface/lang.opt (gant, gnatO, gnat): Add Driver flag.
7776 2017-01-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7778         * gcc-interface/Makefile.in (SPARC/Solaris): Fix typo.
7780 2017-01-13  Arnaud Charlet  <charlet@adacore.com>
7782         * doc/gnat_ugn/getting_started_with_gnat.rst,
7783         doc/gnat_ugn/inline_assembler.rst,
7784         doc/gnat_ugn/building_executable_programs_with_gnat.rst,
7785         doc/gnat_ugn/elaboration_order_handling_in_gnat.rst,
7786         doc/gnat_ugn/about_this_guide.rst,
7787         doc/gnat_ugn/platform_specific_information.rst,
7788         doc/gnat_ugn/example_of_binder_output.rst,
7789         doc/gnat_ugn/gnat_and_program_execution.rst,
7790         doc/gnat_ugn/gnat_utility_programs.rst,
7791         doc/gnat_ugn/the_gnat_compilation_model.rst,
7792         doc/gnat_rm/implementation_defined_attributes.rst,
7793         doc/gnat_rm/compatibility_and_porting_guide.rst,
7794         doc/gnat_rm/standard_library_routines.rst,
7795         doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
7796         doc/gnat_rm/implementation_defined_pragmas.rst,
7797         doc/gnat_rm/the_gnat_library.rst,
7798         doc/gnat_rm/obsolescent_features.rst,
7799         doc/gnat_rm/about_this_guide.rst,
7800         doc/gnat_rm/the_implementation_of_standard_i_o.rst,
7801         doc/gnat_rm/implementation_of_ada_2012_features.rst,
7802         doc/gnat_rm/interfacing_to_other_languages.rst,
7803         doc/gnat_rm/implementation_defined_aspects.rst,
7804         doc/gnat_rm.rst: Update documentation.
7805         * gnat_rm.texi, gnat_ugn.texi: Regenerated.
7807 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
7809         * einfo.ads: minor grammar fixes in comment of Normalized_Position_Max.
7810         * scil_ll.adb: Minor style fix in comment.
7811         * sem_ch8.adb (Analyze_Expanded_Name): Perform dimension analysis
7812         even if entity is already set, because the node may be renalyzed
7813         after inlining transformations.
7815 2017-01-13  Javier Miranda  <miranda@adacore.com>
7817         * sem_res.adb (Resolve_Call): Do not establish a transient scope
7818         for a call to inlinable expression function (since the call will
7819         be replaced by its returned object).
7820         * exp_ch6.ads (Is_Inlinable_Expression_Function): New subprogram.
7821         * exp_ch6.adb (Expression_Of_Expression_Function): New subprogram.
7822         (Expand_Call): For inlinable expression function call replace the
7823         call by its returned object.
7824         (Is_Inlinable_Expression_Function): New subprogram.
7826 2017-01-13  Gary Dismukes  <dismukes@adacore.com>
7828         * checks.adb: Minor typo fix and reformatting.
7830 2017-01-13  Javier Miranda  <miranda@adacore.com>
7832         * contracts.adb (Contract_Only_Subprograms): Remove formal.
7833         (Copy_Original_Specification): Removed.
7834         (Skip_Contract_Only_Subprogram): Move here checks previously
7835         located in the caller of this routine (to leave the code more clean).
7836         (Build_Contract_Only_Subprogram): Code cleanup.
7837         * scil_ll.ads, scil_ll.adb (Get_Contract_Only_Body_Name): Removed.
7838         (Get_Contract_Only_Missing_Body_Name): Removed.
7840 2017-01-13  Javier Miranda  <miranda@adacore.com>
7842         * sem_ch6.adb (Cloned_Expression): New subprogram.
7843         (Freeze_Expr_Types): Complete previous patch since the expression
7844         of an expression-function may have iterators and loops with
7845         defining identifiers which, as part of the preanalysis of the
7846         expression, may be left decorated with itypes that will not be
7847         available in the tree passed to the backend.
7849 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
7851         * checks.adb (Apply_Type_Conversion_Checks): Optimize a type
7852         conversion to Integer of an expression that is an attribute
7853         reference 'Pos on an enumeration type.
7855 2017-01-13  Bob Duff  <duff@adacore.com>
7857         * atree.ads: Minor comment fix.
7859 2017-01-13  Justin Squirek  <squirek@adacore.com>
7861         * sem_ch6.adb (Check_Aggregate_Accessibility): Ignore function
7862         calls in accessibility check on return statement.
7864 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
7866         * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
7867         Ensure that the input body is a subprogram body before trying to
7868         determine whether it denoted an expression function.  Note that
7869         subprogram body stubs cannot denote expression functions.
7871 2017-01-13  Gary Dismukes  <dismukes@adacore.com>
7873         * bindgen.adb, sem_ch6.adb, binde.adb, exp_ch3.adb: Minor reformatting
7874         and typo fixes.
7876 2017-01-13  Javier Miranda  <miranda@adacore.com>
7878         * einfo.ads (Component_Bit_Offset): Fix documentation.
7879         * sem_ch13.adb (Check_Record_Representation_Clause): Skip check
7880         on record holes for components with unknown compile-time offsets.
7882 2017-01-13  Bob Duff  <duff@adacore.com>
7884         * ali.ads, ali.adb (Static_Elaboration_Model_Used): Remove unused flag.
7885         * g-locfil.ads: Minor comment fix.
7887 2017-01-13  Bob Duff  <duff@adacore.com>
7889         * binde.adb (Elab_New): New elaboration order algorithm
7890         that is expected to cause fewer ABE issues. This is a work in
7891         progress. The new algorithm is currently disabled, and can be
7892         enable by the -dp switch, or by modifying the Do_Old and Do_New
7893         etc. flags and rebuilding. Experimental code is included to
7894         compare the results of the old and new algorithms.
7895         * binde.ads: Use GNAT.Dynamic_Tables instead of Table, so we
7896         can have multiple of these tables, so the old and new algorithms
7897         can coexist.
7898         * bindgen.ads (Gen_Output_File): Pass Elab_Order as an 'in'
7899         parameter of type array. This avoids the global variable, and
7900         allows bounds checking (which is normally defeated by the tables
7901         packages). It also ensures that the Elab_Order is read-only
7902         to Bindgen.
7903         * bindgen.adb: Pass Elab_Order as an 'in' parameter to all
7904         subprograms that need it, as above.
7905         * debug.adb: Document new -dp switch. Modify doc of old -do
7906         switch.
7907         * gnatbind.adb (Gnatbind): Make use of new interfaces to Binde
7908         and Bindgen.  Move writing of closure (-R and -Ra switches)
7909         to Binde; that's more convenient.
7911 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
7913         * sem_ch6.adb (Analyze_Expression_Function): If the expression
7914         function is a completion, all entities referenced in the
7915         expression are frozen. As a consequence, a reference to an
7916         uncompleted private type from an enclosing scope is illegal.
7918 2017-01-13  Javier Miranda  <miranda@adacore.com>
7920         * sem_ch6.adb (Freeze_Expr_Types): New subprogram.
7921         (Analyze_Subprogram_Body_Helper): At the occurrence of an
7922         expression function declaration that is a completion, its
7923         expression causes freezing (AI12-0103).
7925 2017-01-13  Vadim Godunko  <godunko@adacore.com>
7927         * a-coinho-shared.adb: Fix memory leaks in Constant_Reference and
7928         Reference functions of Ada.Containers.Indefinite_Holders.
7930 2017-01-13  Bob Duff  <duff@adacore.com>
7932         * s-os_lib.ads: Minor comment fixes.
7934 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
7936         * exp_ch3.adb (Default_Initialize_Object): Do not default
7937         initialize an object when it is of a task type and restriction
7938         No_Tasking is in effect because the initialization is obsolete.
7939         * exp_ch9.adb (Build_Master_Entity): Do not generate a master when
7940         restriction No_Tasking is in effect.
7941         (Build_Master_Renaming): Do not rename a master when restriction
7942         No_Tasking is in effect.
7944 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
7946         * sem_aggr.adb (Resolve_Array_Aggregate): The code that verifies
7947         the legality of An others clause applies as well to a choice in
7948         an Iterated_component_ association.
7949         (Resolve_Iterated_Component_Association): An others choice
7950         is legal.
7951         * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): An
7952         Iterated_Component_Association is not static.
7954 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
7956         * exp_ch3.adb (Freeze_Type): Mark the Ghost mode as set in case
7957         control is passed to the expresion handler before the new mode
7958         is set.
7959         * sem_ch12.adb (Analyze_Package_Instantiation,
7960         Analyze_Subprogram_Instantiation): Mark the Ghost mode as set
7961         in case control is passed to the expresion handler before the
7962         new mode is set.
7964 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
7966         * sem_aggr.adb, sem_ch3.adb, inline.adb, sem_util.adb, exp_ch4.adb,
7967         exp_aggr.adb: Minor reformatting.
7969 2017-01-13  Gary Dismukes  <dismukes@adacore.com>
7971         * inline.adb: Minor reformatting and typo fix.
7973 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
7975         * sem_util.ads, sem_util.adb (Choice_List): Move function here
7976         from sem_aggr.adb, for use elsewhere.
7977         * sem_ch3.adb (Analyze_Object_Declaration): Use Choice_List.
7978         * sem_aggr.adb (Resolve_Array_Aggregate): Remove
7979         Iterated_Component_Present.
7980         * exp_aggr.adb: Use Choice_List throughout, to handle
7981         Iterated_Component_Associations.
7982         (Gen_Loop): Generate proper loop for an
7983         Iterated_Component_Association: loop variable has the identifier
7984         of the original association. Generate a loop even for a single
7985         component choice, in order to make loop parameter visible in
7986         expression.
7987         (Flatten): An Iterated_Component_Association is not static.
7989 2017-01-13  Yannick Moy  <moy@adacore.com>
7991         * exp_ch4.adb (Expand_N_Op_Expon): Ensure that the value of
7992         float exponentiation for statically known small negative values
7993         is the reciprocal of the exponentiation for the opposite value
7994         of the exponent.
7995         * s-exnllf.adb (Exn_Float, Exn_Long_Float, Exn_Long_Long_Float):
7996         Ensure that the value of float exponentiation for negative values
7997         is the reciprocal of the exponentiation for the opposite value
7998         of the exponent.
7999         * inline.adb (Expand_Inlined_Call): Fix the count
8000         for the number of generated gotos.
8002 2017-01-13  Yannick Moy  <moy@adacore.com>
8004         * inline.adb: Code cleanup.
8005         * sem_util.adb (Is_OK_Volatile_Context): Add
8006         expression in delay statement as OK for volatile context.
8008 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
8010         * sem_aggr.adb (Resolve_Array_Aggregate): In normal compilation
8011         mode a choice that is a subtype with a static predicate is
8012         replaced by the values it covers. This transformation must not
8013         be performed in ASIS mode, to preserve the source for analysis.
8015 2017-01-13  Justin Squirek  <squirek@adacore.com>
8017         * nlists.ads: Correct minor typo.
8019 2017-01-13  Gary Dismukes  <dismukes@adacore.com>
8021         * sem_ch13.adb: Minor reformatting and typo fix.
8023 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
8025         * par-ch4.adb (P_Aggregate_Or_Parent_Expr): An
8026         Iterated_Component_Association is a named association in an
8027         array aggregate.
8028         * sem_aggr.adb (Resolve_Iterated_Component_Association): New
8029         procedure, subsidiary of Resolve_Array_Aggregate, to analyze
8030         and resolve the discrete choices and the expression of the
8031         new construct.
8032         * sinfo.adb, sinfo.ads: In analogy with N_Component_Association,
8033         Loop_Actions and Box_Present are attributes of
8034         N_Iterated_Component_Association nodes. Box_Present is always
8035         False in this case.
8036         * sprint.adb (Sprint_Node): An Iterated_Component_Association
8037         has a Discrete_Choices list, as specified in the RM. A
8038         Component_Association for aggregate uses instead a Choices list.
8039         We have to live with this small inconsistency because the new
8040         construct also has a defining identifier, and there is no way
8041         to merge the two node structures.
8043 2017-01-13  Yannick Moy  <moy@adacore.com>
8045         * inline.adb (Remove_Aspects_And_Pragmas): Add Unused to the
8046         list of pragmas to remove.  Remove pragmas from the list of
8047         statements in the body to inline.
8048         * namet.adb, namet.ads (Nam_In): New version with 12 parameters.
8050 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
8052         * sem_ch3.adb (Resolve_Aspects): New procedure, subsidiary of
8053         Analyze_Declarations, to analyze and resolve the expressions of
8054         aspect specifications in the current declarative list, so that
8055         the expressions have proper entity and type info.  This is needed
8056         for ASIS when there is no subsequent expansion to generate this
8057         semantic information.
8058         * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Use Etype of
8059         original expression, to suppress cascaded errors when expression
8060         has been constant-folded.
8061         (Resolve_Aspect_Expressions, Resolve_Name): Preserve entities in
8062         ASIS mode, because there is no subsequent expansion to decorate
8063         the tree.
8065 2017-01-13  Yannick Moy  <moy@adacore.com>
8067         * inline.adb, inline.ads (Call_Can_Be_Inlined_In_GNATprove_Mode):
8068         New function to detect when a call may be inlined or not in
8069         GNATprove mode.
8070         (Expand_Inlined_Call): Ensure that a temporary
8071         is always created in the cases where a type conversion may be
8072         needed on an input parameter in GNATprove mode, so that GNATprove
8073         sees the check to perform.
8074         * sem_res.adb (Resolve_Call): In GNATprove mode, skip inlining
8075         when not applicable due to actual requiring type conversion
8076         with possible check but no temporary value can be copied for
8077         GNATprove to see the check.
8079 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
8081         * sem_aggr.adb, par_sco.adb, s-osprim-mingw.adb, exp_ch5.adb,
8082         exp_prag.adb, sem_ch3.adb, xr_tabls.adb, lib-xref-spark_specific.adb,
8083         layout.adb, sem_dist.adb, exp_spark.adb, exp_ch7.adb, gnatcmd.adb,
8084         exp_util.adb, prj-proc.adb, sem_aux.adb, comperr.adb, g-memdum.adb,
8085         exp_attr.adb, s-intman-solaris.adb, exp_ch9.adb, make.adb, live.adb,
8086         g-sercom-linux.adb, sem_dim.adb, mlib-prj.adb, s-intman-posix.adb,
8087         sem_ch9.adb, sem_ch10.adb, prep.adb, einfo.adb, scng.adb, checks.adb,
8088         prj-strt.adb, sem_prag.adb, eval_fat.adb, sem_ch12.adb, sem.adb,
8089         a-numaux-x86.adb, a-stwifi.adb, i-cobol.adb, prj.adb,
8090         get_spark_xrefs.adb, s-tasini.adb, rtsfind.adb, freeze.adb,
8091         g-arrspl.adb, par-ch4.adb, sem_util.adb, sem_res.adb, expander.adb,
8092         sem_attr.adb, exp_dbug.adb, prj-pp.adb, a-stzfix.adb, s-interr.adb,
8093         s-wchcnv.adb, switch-m.adb, gnat1drv.adb, sinput-l.adb, stylesw.adb,
8094         contracts.adb, s-intman-android.adb, g-expect.adb, exp_ch4.adb,
8095         g-comlin.adb, errout.adb, sinput.adb, s-exctra.adb, repinfo.adb,
8096         g-spipat.adb, g-debpoo.adb, exp_ch6.adb, sem_ch4.adb, exp_ch13.adb,
8097         a-wtedit.adb, validsw.adb, pprint.adb, widechar.adb, makeutl.adb,
8098         ali.adb, set_targ.adb, sem_mech.adb, sem_ch6.adb, gnatdll.adb,
8099         get_scos.adb, g-pehage.adb, s-tratas-default.adb, gnatbind.adb,
8100         prj-dect.adb, g-socthi-mingw.adb, par-prag.adb, prj-nmsc.adb,
8101         exp_disp.adb, par-ch12.adb, binde.adb, sem_ch8.adb,
8102         s-tfsetr-default.adb, s-regexp.adb, gprep.adb, s-tpobop.adb,
8103         a-teioed.adb, sem_warn.adb, sem_eval.adb, g-awk.adb, s-io.adb,
8104         a-ztedit.adb, xoscons.adb, exp_intr.adb, sem_cat.adb, sprint.adb,
8105         g-socket.adb, exp_dist.adb, sem_ch13.adb, s-tfsetr-vxworks.adb,
8106         par-ch3.adb, treepr.adb, g-forstr.adb, g-catiio.adb, par-ch5.adb,
8107         uname.adb, osint.adb, exp_ch3.adb, prj-env.adb, a-strfix.adb,
8108         a-stzsup.adb, prj-tree.adb, s-fileio.adb: Update all eligible case
8109         statements to reflect the new style for case alternatives. Various
8110         code clean up and reformatting.
8112 2017-01-13  Gary Dismukes  <dismukes@adacore.com>
8114         * exp_util.adb: Minor reformatting.
8116 2017-01-13  Yannick Moy  <moy@adacore.com>
8118         * exp_spark.adb: Code cleanup.
8119         * sem_ch9.adb (Analyze_Delay_Until): Resolve
8120         expression so that calls are identified as such inside delay
8121         until.
8123 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
8125         * exp_util.adb (Insert_Actions): Handle Iterated_Component_Association.
8126         * par-ch3.adb (P_Discrete_Choice_List): An
8127         Iterated_Component_Association is an array aggregate component.
8128         * par-ch4.adb (P_Iterated_Component_Association): New procedure.
8129         (Is_Quantified_Expression): New function that performs a lookahead
8130         to distinguish quantified expressions from iterated component
8131         associations.
8132         (P_Aggregate_Or_Paren_Expr): Recognize iterated component
8133         associations.
8134         (P_Unparen_Cond_Case_Quant_Expression, P_Primary): Ditto.
8135         * sem.adb (Analyze): Handle Iterated_Component_Association.
8136         * sem_aggr.adb (Resolve_Array_Aggregate): Dummy handling of iterated
8137         component associations.
8138         * sinfo.ads, sinfo.adb: Entries for for
8139         N_Iterated_Component_Association and its fields.
8140         * sprint.adb (Sprint_Node_Actual): Handle
8141         N_Iterated_Component_Association.
8143 2017-01-13  Justin Squirek  <squirek@adacore.com>
8145         * sem_ch12.adb (Analyze_Package_Instantiation): Move disabiling
8146         of the style check until after preanalysis of acutals.
8148 2017-01-13  Yannick Moy  <moy@adacore.com>
8150         * sem_ch13.adb: Minor reformatting.
8151         * par-ch11.adb: minor style fix in whitespace
8152         * gnatbind.adb (Gnatbind): Scope of Std_Lib_File
8153         reduced to Add_Artificial_ALI_File; style fix in declaration of
8154         Text; grammar fix in comment.
8155         * osint-c.adb (Read_Library_Info): strip trailing NUL from result.
8156         * freeze.adb: Cleanup to pass pragma instead of
8157         expression to call.
8158         * exp_spark.adb (Expand_SPARK_Attribute_Reference): New procedure to
8159         replace System'To_Address by equivalent call.
8161 2017-01-13  Arnaud Charlet  <charlet@adacore.com>
8163         * bindusg.adb: Improve usage output for -f switch.
8165 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
8167         * frontend.adb, freeze.adb, sem_res.adb, sem_attr.adb, sem_ch8.adb:
8168         Minor reformatting.
8170 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
8172         * sem_ch13.adb (Is_Predicate_Static): Following the intent of the RM,
8173         treat comparisons on strings as legal in a Static_Predicate.
8174         (Is_Predicate_Static, Is_Type_Ref): Predicate also returns true on
8175         a function call that is the expansion of a string comparison.The
8176         function call is built when compiling the corresponding predicate
8177         function, but the expression has been found legal as a static
8178         predicate during earlier analysis.
8179         * sem_eval.adb (Real_Or_String_Static_Predicate_Matches): Handle
8180         properly a function call that is the expansion of a string
8181         comparison operation, in order to recover the Static_Predicate
8182         expression and apply it to a static argument when needed.
8184 2017-01-13  Tristan Gingold  <gingold@adacore.com>
8186         * s-mmap.adb, s-mmap.ads (Open_Read_No_Exception): New function.
8187         (Open_Read): Re-implement using Open_Read_No_Exception.
8188         (Open_Write): Raise exception in case of error.
8189         * s-mmosin-mingw.adb (Open_Common): Do not raise exception.
8190         * s-mmosin-unix.adb (Open_Read, Open_Write): Do not
8191         reaise exception.
8192         * s-mmosin-mingw.ads, s-mmosin-unix.ads (Open_Read): Adjust comment.
8194 2017-01-13  Yannick Moy  <moy@adacore.com>
8196         * checks.adb: Code cleanup.
8198 2017-01-13  Yannick Moy  <moy@adacore.com>
8200         * freeze.adb (Check_Inherited_Conditions): Use analyzed pragma
8201         expression instead of unanalyzed aspect expression for checking
8202         the validity of inheriting an operation. Also copy the expression
8203         being passing it to Build_Class_Wide_Expression, as this call
8204         modifies its argument.
8205         * sem_util.ads Fix comment to reference correct function name
8206         New_Copy_Tree.
8208 2017-01-13  Javier Miranda  <miranda@adacore.com>
8210         * sem_res.adb (Resolve_Generalized_Indexing): Compiling in ASIS mode,
8211         when we propagate information about the indexes back to the original
8212         indexing mode and the prefix of the index is a function call, do not
8213         remove any parameter from such call.
8215 2017-01-13  Gary Dismukes  <dismukes@adacore.com>
8217         * exp_ch6.ads (Needs_BIP_Finalization_Master): Update comment.
8218         * exp_ch6.adb (Needs_BIP_Finalization_Master): Return True for
8219         a build-in-place function whose result type is tagged.
8221 2017-01-13  Yannick Moy  <moy@adacore.com>
8223         * sem_ch8.adb (Analyze_Subprogram_Renaming.Build_Class_Wide_Wrapper):
8224         Do not generate a wrapper when the only candidate is a class-wide
8225         subprogram.
8226         (Analyze_Subprogram_Renaming): Do not freeze the renaming or renamed
8227         inside a generic context.
8229 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
8231         * exp_util.adb (Add_Inherited_Tagged_DIC):
8232         Pass the object parameters of both the parent and the derived
8233         type DIC procedure to the reference replacement circuitry.
8234         (Find_DIC_Type): Modify the circuitry to present the partial
8235         view of a private type in case the private type defines its own
8236         DIC pragma.
8237         (Replace_Object_And_Primitive_References): Add two
8238         optional formal parameters.  Update the comment on usage. Update
8239         the replacement of references to object parameters.
8241 2017-01-13  Gary Dismukes  <dismukes@adacore.com>
8243         * einfo.adb, sem_ch6.adb, atree.adb: Minor reformatting and typo fix.
8245 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
8247         * sem_res.adb (Resolve_Actuals): Apply Scalar_Range_Check to
8248         an out parameter that is a type conversion, independently of th
8249         range check that may apply to the expression of the conversion,
8250         for use in GNATProve.
8252 2017-01-13  Yannick Moy  <moy@adacore.com>
8254         * gnat1drv.adb (Gnat1drv): Move the implicit with for System in
8255         GNATprove_Mode here to Frontend.
8256         * frontend.adb (Frontend): Move the implicit with for System
8257         in GNATprove_Mode here as it ismore correct this way; the old
8258         place only worked by chance, since there were no overloaded names.
8259         * rtsfind.ads (RE_Id, RE_Unit_Table): Add RE_Tasking_State.
8260         * sem_attr.adb (Analyze_Attribute): In GNATprove_Mode, for the
8261         four attributes identified in SRM 9(18), add an implicit with
8262         to Ada.Task_Identification.
8263         * sem_ch8.adb (Analyze_Subprogram_Renaming.Build_Class_Wide_Wrapper):
8264         Deal specially with the wrapper introduced for AI05-0071 in GNATprove
8265         mode.
8266         * checks.adb (Apply_Discriminant_Check,
8267         Apply_Selected_Length_Checks, Apply_Selected_Range_Checks):
8268         In GNATprove mode, we do not apply the checks, but we still
8269         analyze the expression to possibly issue errors on SPARK
8270         code when a run-time error can be detected at compile time.
8271         (Selected_Length_Checks, Selected_Range_Checks): Perform analysis
8272         in GNATprove mode.
8274 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
8276         * expander.adb (Expand): Add a warning about using return
8277         statements in Ghost management code.
8278         * exp_ch3.adb (Freeze_Type): Add a warning about using return
8279         statements in Ghost management code.
8280         * exp_ch7.adb (Build_Invariant_Procedure_Body,
8281         Build_Invariant_Procedure_Declaration): Add a warning about
8282         using return statements in Ghost management code.
8283         * exp_disp.adb (Make_DT): Add a warning about using return
8284         statements in Ghost management code.
8285         * exp_util.adb (Build_DIC_Procedure_Body,
8286         Build_DIC_Procedure_Declaration, Make_Predicated_Call): Add a
8287         warning about using return statements in Ghost management code.
8288         * freeze.adb (Freeze_Entity): Add a warning about using return
8289         statements in Ghost management code.
8290         * sem.adb (Analyze, Do_Analyze): Add a warning about using return
8291         statements in Ghost management code.
8292         * sem_ch3.adb (Analyze_Object_Declaration, Process_Full_View): Add
8293         a warning about using return statements in Ghost management code.
8294         * sem_ch5.adb (Analyze_Assignment): Add a warning about using
8295         return statements in Ghost management code.
8296         * sem_ch6.adb (Analyze_Procedure_Call,
8297         Analyze_Subprogram_Body_Helper): Add a warning about using return
8298         statements in Ghost management code.
8299         * sem_ch7.adb (Analyze_Package_Body_Helper): Add a warning about
8300         using return statements in Ghost management code.
8301         * sem_ch12.adb (Analyze_Package_Instantiation,
8302         Analyze_Subprogram_Instantiation, Instantiate_Package_Body,
8303         Instantiate_Subprogram_Body): Add a warning about using return
8304         statements in Ghost management code.
8305         * sem_ch13.adb (Build_Predicate_Functions,
8306         Build_Predicate_Function_Declarations): Add a warning about
8307         using return statements in Ghost management code.
8308         * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part,
8309         Analyze_Initial_Condition_In_Decl_Part, Analyze_Pragma,
8310         Analyze_Pre_Post_Condition_In_Decl_Part):  Add a warning about
8311         using return statements in Ghost management code.
8313 2017-01-13  Tristan Gingold  <gingold@adacore.com>
8315         * s-mmosin-mingw.adb: Fix pragma import.
8317 2017-01-13  Arnaud Charlet  <charlet@adacore.com>
8319         * gnat1drv.adb (Adjust_Global_Switches): Ignore -gnateE in
8320         codepeer mode.
8322 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
8324         * atree.adb (Allocate_Initialize_Node): A newly created node is
8325         no longer marked as Ghost at this level.
8326         (Mark_New_Ghost_Node): New routine.
8327         (New_Copy): Mark the copy as Ghost.
8328         (New_Entity): Mark the entity as Ghost.
8329         (New_Node): Mark the node as Ghost.
8330         * einfo.adb (Is_Checked_Ghost_Entity): This attribute can now
8331         apply to unanalyzed entities.
8332         (Is_Ignored_Ghost_Entity): This attribute can now apply to unanalyzed
8333         entities.
8334         (Set_Is_Checked_Ghost_Entity): This attribute now
8335         applies to all entities as well as unanalyzed entities.
8336         (Set_Is_Ignored_Ghost_Entity): This attribute now applies to
8337         all entities as well as unanalyzed entities.
8338         * expander.adb Add with and use clauses for Ghost.
8339         (Expand): Install and revert the Ghost region associated with the node
8340         being expanded.
8341         * exp_ch3.adb (Expand_Freeze_Array_Type): Remove all Ghost-related code.
8342         (Expand_Freeze_Class_Wide_Type): Remoe all Ghost-related code.
8343         (Expand_Freeze_Enumeration_Type): Remove all Ghost-related code.
8344         (Expand_Freeze_Record_Type): Remove all Ghost-related code.
8345         (Freeze_Type): Install and revert the Ghost region associated
8346         with the type being frozen.
8347         * exp_ch5.adb Remove with and use clauses for Ghost.
8348         (Expand_N_Assignment_Statement): Remove all Ghost-related code.
8349         * exp_ch6.adb Remove with and use clauses for Ghost.
8350         (Expand_N_Procedure_Call_Statement): Remove all Ghost-relatd code.
8351         (Expand_N_Subprogram_Body): Remove all Ghost-related code.
8352         * exp_ch7.adb (Build_Invariant_Procedure_Body): Install and revert the
8353         Ghost region of the working type.
8354         (Build_Invariant_Procedure_Declaration): Install and revert
8355         the Ghost region of the working type.
8356         (Expand_N_Package_Body): Remove all Ghost-related code.
8357         * exp_ch8.adb Remove with and use clauses for Ghost.
8358         (Expand_N_Exception_Renaming_Declaration): Remove all Ghost-related
8359         code.
8360         (Expand_N_Object_Renaming_Declaration): Remove all Ghost-related code.
8361         (Expand_N_Package_Renaming_Declaration): Remove all Ghost-related code.
8362         (Expand_N_Subprogram_Renaming_Declaration): Remove all Ghost-related
8363         code.
8364         * exp_ch13.adb Remove with and use clauses for Ghost.
8365         (Expand_N_Freeze_Entity): Remove all Ghost-related code.
8366         * exp_disp.adb (Make_DT): Install and revert the Ghost region of
8367         the tagged type. Move the generation of various entities within
8368         the Ghost region of the type.
8369         * exp_prag.adb Remove with and use clauses for Ghost.
8370         (Expand_Pragma_Check): Remove all Ghost-related code.
8371         (Expand_Pragma_Contract_Cases): Remove all Ghost-related code.
8372         (Expand_Pragma_Initial_Condition): Remove all Ghost-related code.
8373         (Expand_Pragma_Loop_Variant): Remove all Ghost-related code.
8374         * exp_util.adb (Build_DIC_Procedure_Body): Install
8375         and revert the Ghost region of the working types.
8376         (Build_DIC_Procedure_Declaration): Install and revert the
8377         Ghost region of the working type.
8378         (Make_Invariant_Call): Install and revert the Ghost region of the
8379         associated type.
8380         (Make_Predicate_Call): Reimplemented. Install and revert the
8381         Ghost region of the associated type.
8382         * freeze.adb (Freeze_Entity): Install and revert the Ghost region
8383         of the entity being frozen.
8384         (New_Freeze_Node): Removed.
8385         * ghost.adb Remove with and use clauses for Opt.
8386         (Check_Ghost_Completion): Update the parameter profile
8387         and all references to formal parameters.
8388         (Ghost_Entity): Update the comment on usage.
8389         (Install_Ghost_Mode): New routines.
8390         (Is_Ghost_Assignment): New routine.
8391         (Is_Ghost_Declaration): New routine.
8392         (Is_Ghost_Pragma): New routine.
8393         (Is_Ghost_Procedure_Call): New routine.
8394         (Is_Ghost_Renaming): Removed.
8395         (Is_OK_Declaration): Reimplemented.
8396         (Is_OK_Pragma): Reimplemented.
8397         (Is_OK_Statement): Reimplemented.
8398         (Is_Subject_To_Ghost): Update the comment on usage.
8399         (Mark_And_Set_Ghost_Assignment): New routine.
8400         (Mark_And_Set_Ghost_Body): New routine.
8401         (Mark_And_Set_Ghost_Completion): New routine.
8402         (Mark_And_Set_Ghost_Declaration): New routine.
8403         (Mark_And_Set_Ghost_Instantiation): New routine.
8404         (Mark_And_Set_Ghost_Procedure_Call): New routine.
8405         (Mark_Full_View_As_Ghost): Removed.
8406         (Mark_Ghost_Declaration_Or_Body): New routine.
8407         (Mark_Ghost_Pragma): New routine.
8408         (Mark_Ghost_Renaming): New routine.
8409         (Mark_Pragma_As_Ghost): Removed.
8410         (Mark_Renaming_As_Ghost): Removed.
8411         (Propagate_Ignored_Ghost_Code): Update the comment on usage.
8412         (Prune_Node): Freeze nodes no longer need special pruning, they
8413         are processed by the general ignored Ghost code mechanism.
8414         (Restore_Ghost_Mode): New routine.
8415         (Set_Ghost_Mode): Reimplemented.
8416         (Set_Ghost_Mode_From_Entity): Removed.
8417         * ghost.ads Add with and use clauses for Ghost.
8418         (Check_Ghost_Completion): Update the parameter profile
8419         along with the comment on usage.
8420         (Install_Ghost_Mode): New routine.
8421         (Is_Ghost_Assignment): New routine.
8422         (Is_Ghost_Declaration): New routine.
8423         (Is_Ghost_Pragma): New routine.
8424         (Is_Ghost_Procedure_Call): New routine.
8425         (Mark_And_Set_Ghost_Assignment): New routine.
8426         (Mark_And_Set_Ghost_Body): New routine.
8427         (Mark_And_Set_Ghost_Completion): New routine.
8428         (Mark_And_Set_Ghost_Declaration): New routine.
8429         (Mark_And_Set_Ghost_Instantiation): New routine.
8430         (Mark_And_Set_Ghost_Procedure_Call): New routine.
8431         (Mark_Full_View_As_Ghost): Removed.
8432         (Mark_Ghost_Pragma): New routine.
8433         (Mark_Ghost_Renaming): New routine.
8434         (Mark_Pragma_As_Ghost): Removed.
8435         (Mark_Renaming_As_Ghost): Removed.
8436         (Restore_Ghost_Mode): New routine.
8437         (Set_Ghost_Mode): Redefined.
8438         (Set_Ghost_Mode_From_Entity): Removed.
8439         * sem.adb (Analyze): Install and revert the Ghost region of the
8440         node being analyzed.
8441         (Do_Analyze): Change the way a clean Ghost
8442         region is installed and reverted.
8443         * sem_ch3.adb (Analyze_Full_Type_Declaration): Remove
8444         all Ghost-related code.
8445         (Analyze_Incomplete_Type_Decl): Remove all Ghost-related code.
8446         (Analyze_Number_Declaration): Remove all Ghost-related code.
8447         (Analyze_Object_Declaration): Install and revert the Ghost region of
8448         a deferred object declaration's completion.
8449         (Array_Type_Declaration): Remove all Ghost-related code.
8450         (Build_Derived_Type): Update the comment on
8451         the propagation of Ghost attributes from a parent to a derived type.
8452         (Derive_Subprogram): Remove all Ghost-related code.
8453         (Make_Class_Wide_Type): Remove all Ghost-related code.
8454         (Make_Implicit_Base): Remove all Ghost-related code.
8455         (Process_Full_View): Install and revert the Ghost region of
8456         the partial view.  There is no longer need to check the Ghost
8457         completion here.
8458         * sem_ch5.adb (Analyze_Assignment): Install and revert the Ghost
8459         region of the left hand side.
8460         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Remove
8461         all Ghost-related code.
8462         (Analyze_Expression_Function): Remove all Ghost-related code.
8463         (Analyze_Generic_Subprogram_Body): Remove all Ghost-related code.
8464         (Analyze_Procedure_Call): Install and revert the Ghost region of
8465         the procedure being called.
8466         (Analyze_Subprogram_Body_Helper): Install and revert the Ghost
8467         region of the spec or body.
8468         (Analyze_Subprogram_Declaration): Remove all Ghost-related code.
8469         (Build_Subprogram_Declaration): Remove all Ghost-related code.
8470         (Find_Corresponding_Spec): Remove all Ghost-related code.
8471         (Process_Formals): Remove all Ghost-related code.
8472         * sem_ch7.adb (Analyze_Package_Body_Helper): Install and revert
8473         the Ghost region of the spec.
8474         (Analyze_Package_Declaration): Remove all Ghost-related code.
8475         * sem_ch8.adb (Analyze_Exception_Renaming): Mark a renaming as
8476         Ghost when it aliases a Ghost entity.
8477         (Analyze_Generic_Renaming): Mark a renaming as Ghost when it aliases
8478         a Ghost entity.
8479         (Analyze_Object_Renaming): Mark a renaming as Ghost when
8480         it aliases a Ghost entity.
8481         (Analyze_Package_Renaming): Mark a renaming as Ghost when it aliases
8482         a Ghost entity.
8483         (Analyze_Subprogram_Renaming): Mark a renaming as Ghost when it
8484         aliases a Ghost entity.
8485         * sem_ch11.adb Remove with and use clauses for Ghost.
8486         (Analyze_Exception_Declaration): Remove all Ghost-related code.
8487         * sem_ch12.adb (Analyze_Generic_Package_Declaration): Remove all
8488         Ghost-related code.
8489         (Analyze_Generic_Subprogram_Declaration): Remove all Ghost-related
8490         code.
8491         (Analyze_Package_Instantiation): Install and revert the Ghost region
8492         of the package instantiation.
8493         (Analyze_Subprogram_Instantiation): Install
8494         and revert the Ghost region of the subprogram instantiation.
8495         (Instantiate_Package_Body): Code clean up. Install and revert the
8496         Ghost region of the package body.
8497         (Instantiate_Subprogram_Body): Code clean up. Install and revert the
8498         Ghost region of the subprogram body.
8499         * sem_ch13.adb (Build_Predicate_Functions): Install
8500         and revert the Ghost region of the related type.
8501         (Build_Predicate_Function_Declaration): Code clean up. Install
8502         and rever the Ghost region of the related type.
8503         * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
8504         Install and revert the Ghost region of the pragma.
8505         (Analyze_Initial_Condition_In_Decl_Part): Install and revert the
8506         Ghost region of the pragma.
8507         (Analyze_Pragma): Install and revert the Ghost region of various
8508         pragmas.  Mark a pragma as Ghost when it is related to a Ghost entity
8509         or encloses a Ghost entity.
8510         (Analyze_Pre_Post_Condition): Install and revert the Ghost
8511         region of the pragma.
8512         (Analyze_Pre_Post_Condition_In_Decl_Part): Install and revert the
8513         Ghost region of the pragma.
8514         * sem_res.adb (Resolve): Remove all Ghost-related code.
8515         * sem_util.adb (Is_Declaration): Reimplemented.
8516         (Is_Declaration_Other_Than_Renaming): New routine.
8517         * sem_util.ads (Is_Declaration_Other_Than_Renaming): New routine.
8518         * sinfo.adb (Is_Checked_Ghost_Pragma): New routine.
8519         (Is_Ghost_Pragma): Removed.
8520         (Is_Ignored_Ghost_Pragma): New routine.
8521         (Set_Is_Checked_Ghost_Pragma): New routine.
8522         (Set_Is_Ghost_Pragma): Removed.
8523         (Set_Is_Ignored_Ghost_Pragma): New routine.
8524         * sinfo.ads: Update the documentation on Ghost mode and
8525         Ghost regions.  New attributes Is_Checked_Ghost_Pragma
8526         and Is_Ignored_Ghost_Pragma along with usages in nodes.
8527         Remove attribute Is_Ghost_Pragma along with usages in nodes.
8528         (Is_Checked_Ghost_Pragma): New routine along with pragma Inline.
8529         (Is_Ghost_Pragma): Removed along with pragma Inline.
8530         (Is_Ignored_Ghost_Pragma): New routine along with pragma Inline.
8531         (Set_Is_Checked_Ghost_Pragma): New routine along with pragma Inline.
8532         (Set_Is_Ghost_Pragma): Removed along with pragma Inline.
8533         (Set_Is_Ignored_Ghost_Pragma): New routine along with pragma Inline.
8535 2017-01-12  Tristan Gingold  <gingold@adacore.com>
8537         * s-mmap.ads, s-mmap.adb, s-mmosin-unix.ads, s-mmosin-unix.adb,
8538         s-mmauni-long.ads, s-mmosin-mingw.ads, s-mmosin-mingw.adb: New files.
8540 2017-01-12  Yannick Moy  <moy@adacore.com>
8542         * errout.adb, errout.ads (Initialize): Factor common treatment
8543         in Reset_Warnings.
8544         (Reset_Warnings): New procedure to reset counts related to warnings.
8545         (Record_Compilation_Errors): New variable to store the presence of an
8546         error, used in gnat2why to allow changing the Warning_Mode.
8547         (Compilation_Errors): Use new variable Record_Compilation_Errors to
8548         store the presence of an error.
8550 2017-01-12  Javier Miranda  <miranda@adacore.com>
8552         * sem_ch13.adb (Analyze_Aspect_Specifications):
8553         For Interrupt_Handler and Attach_ Handler aspects, decorate the
8554         internally built reference to the protected procedure as coming
8555         from sources and force its analysis.
8557 2017-01-12  Ed Schonberg  <schonberg@adacore.com>
8559         * sem_ch3.adb (Build_Derived_Type): For a scalar derived type,
8560         inherit predicates if any from the first_subtype of the parent,
8561         not from the anonymous parent type.
8562         * sem_eval.adb (Is_Static_Subtype): A type that inherits a dynamic
8563         predicate is not a static subtype.
8565 2017-01-12  Gary Dismukes  <dismukes@adacore.com>
8567         * freeze.adb (Check_Suspicious_Convention): New procedure
8568         performing a warning check on discriminated record types with
8569         convention C or C++. Factored out of procedure Freeze_Record_Type,
8570         and changed to only apply to base types (to avoid spurious
8571         warnings on subtypes). Minor improvement of warning messages
8572         to refer to discriminated rather than variant record types.
8573         (Freeze_Record_Type): Remove code for performing a suspicious
8574         convention check.
8575         (Freeze_Entity): Only call Freeze_Record_Type
8576         on types that aren't declared within any enclosing generic units
8577         (rather than just excluding the type when the innermost scope
8578         is generic). Call Check_Suspicious_Convention whether or not
8579         the type is declared within a generic unit.
8580         * sem_ch8.adb (In_Generic_Scope): Move this function to Sem_Util.
8581         * sem_util.ads, sem_util.adb (In_Generic_Scope): New function (moved
8582         from Sem_Ch8).
8584 2017-01-12  Tristan Gingold  <gingold@adacore.com>
8586         * sysdep.c, adaint.c, rtinit.c, ming32.h:
8587         (__gnat_current_codepage): Renamed from CurrentCodePage
8588         (__gnat_current_ccs_encoding): Renamed from CurrentCCSEncoding
8590 2017-01-12  Ed Schonberg  <schonberg@adacore.com>
8592         * sem_ch6.adb (Fully_Conformant_Expressions): Handle properly
8593         quantified expressions, following AI12-050: the loop parameters
8594         of two quantified expressions are conformant if they have the
8595         same identifier.
8597 2017-01-12  Arnaud Charlet  <charlet@adacore.com>
8599         * gcc-interface/Makefile.in: Clean up VxWorks targets.
8601 2017-01-12  Ed Schonberg  <schonberg@adacore.com>
8603         * sem_attr.adb (Analyze_Attribute_Reference, case Loop_Entry):
8604         Hnadle properly the attribute reference when it appears as part
8605         of an expression in another loop aspect.
8607 2017-01-12  Ed Schonberg  <schonberg@adacore.com>
8609         * exp_ch3.adb (Check_Predicated_Discriminant): New procedure,
8610         subsidiary of Build_Initialization_Call, to complete generation
8611         of predicate checks on discriminants whose (sub)types have
8612         predicates, and to add checks on variants that do not have an
8613         others clause.
8614         * sem_util.adb (Gather_Components): A missing Others alternative is
8615         not an error when the type of the discriminant is a static predicate
8616         (and coverage has been checked when analyzing the case statement). A
8617         runtime check is generated to verify that a given discriminant
8618         satisfies the predicate (RM 3.8.1. (21.1/2)).
8620 2017-01-12  Yannick Moy  <moy@adacore.com>
8622         * gnat1drv.adb (Adjust_Global_Switches): Only
8623         perform checking of exception mechanism when generating code.
8625 2017-01-12  Justin Squirek  <squirek@adacore.com>
8627         * exp_ch7.adb (Add_Type_Invariants, Process_Array_Component):
8628         Remove handling of access component with invariant.
8629         (Build_Invariant_Procedure_Declaration): Remove return on class
8630         wide type.
8631         * freeze.adb (Freeze_Array_Type, Freeze_Record_Type): Remove
8632         conditional exception for component or array so Has_Own_Invariants
8633         flag is not falsly set.
8634         * sem_ch3.adb (Make_Class_Wide_Type): Initialize copy of class
8635         wide type to have no invariant flags.
8637 2017-01-12  Hristian Kirtchev  <kirtchev@adacore.com>
8639         * exp_ch9.adb, sem_prag.adb, s-tassta.adb, sem_util.adb, s-tarest.adb,
8640         sem_ch13.adb: Minor reformatting.
8642 2017-01-12  Hristian Kirtchev  <kirtchev@adacore.com>
8644         * exp_aggr.adb (Build_Record_Aggr_Code): Guard against a missing
8645         adjustment primitive when the ancestor type was not properly frozen.
8646         (Gen_Assign): Guard against a missing initialization
8647         primitive when the component type was not properly frozen.
8648         (Initialize_Array_Component): Guard against a missing adjustment
8649         primitive when the component type was not properly frozen.
8650         (Initialize_Record_Component): Guard against a missing adjustment
8651         primitive when the component type was not properly frozen.
8652         (Process_Transient_Component_Completion): The transient object may
8653         not be finalized when its associated type was not properly frozen.
8654         * exp_ch3.adb (Build_Assignment): Guard against a missing
8655         adjustment primitive when the component type was not properly frozen.
8656         (Build_Initialization_Call): Guard against a missing
8657         initialization primitive when the associated type was not properly
8658         frozen.
8659         (Expand_N_Object_Declaration): Guard against a missing
8660         adjustment primitive when the base type was not properly frozen.
8661         (Predefined_Primitive_Bodies): Create an empty Deep_Adjust
8662         body when there is no adjustment primitive available. Create an
8663         empty Deep_Finalize body when there is no finalization primitive
8664         available.
8665         * exp_ch4.adb (Apply_Accessibility_Check): Guard against a
8666         missing finalization primitive when the designated type was
8667         not properly frozen.
8668         (Expand_N_Allocator): Guard against a missing initialization primitive
8669         when the designated type was not properly frozen.
8670         * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add the adjustment call
8671         only when the corresponding adjustment primitive is available.
8672         * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Generate the
8673         adjustment/finalization statements only when there is an available
8674         primitive to carry out the action.
8675         (Build_Initialize_Statements): Generate the initialization/finalization
8676         statements only when there is an available primitive to carry out the
8677         action.
8678         (Make_Adjust_Call): Do not generate a call when the underlying
8679         type is not present due to a possible missing full view.
8680         (Make_Final_Call): Do not generate a call when the underlying
8681         type is not present due to a possible missing full view.
8682         (Make_Finalize_Address_Stmts): Generate an empty body when the
8683         designated type lacks a finalization primitive.
8684         (Make_Init_Call): Do not generate a call when the underlying type is
8685         not present due to a possible missing full view.
8686         (Process_Component_For_Adjust): Add the adjustment call only when the
8687         corresponding adjustment primitive is available.
8688         (Process_Component_For_Finalize): Add the finalization call only when
8689         the corresponding finalization primitive is available.
8690         (Process_Object_Declaration): Use a null statement to emulate a
8691         missing call to the finalization primitive of the object type.
8692         * exp_ch7.ads (Make_Adjust_Call): Update the comment on usage.
8693         (Make_Final_Call): Update the comment on usage.
8694         (Make_Init_Call): Update the comment on usage.
8695         * exp_util.adb (Build_Transient_Object_Statements): Code reformatting.
8697 2017-01-12  Arnaud Charlet  <charlet@adacore.com>
8699         * einfo.ads: Update documentation of Address_Taken.
8700         * sem_attr.adb (Analyze_Access_Attribute, Resolve_Attribute
8701         [Access_Attribute]): Only consider 'Access/'Unchecked_Access
8702         for subprograms when setting Address_Taken flag.
8704 2017-01-12  Patrick Bernardi  <bernardi@adacore.com>
8706         * sem_ch10.adb (Analyze_With_Clause): Removed code that turned
8707         Configurable_Run_Time_Mode off when analysing with'ed predefined
8708         libraries.
8710 2017-01-12  Gary Dismukes  <dismukes@adacore.com>
8712         * sem_prag.adb: Minor reformatting.
8713         * sem_util.adb (Unique_Entity): fix result for
8714         bodies of entry families.
8716 2017-01-12  Justin Squirek  <squirek@adacore.com>
8718         * sem_prag.adb (Analyze_Pragma): Add appropriate calls to
8719         Resolve_Suppressible in the pragma Assertion_Policy case.
8720         (Resolve_Suppressible): Created this function to factor out
8721         common code used to resolve Suppress to either Ignore or Check
8722         * snames.ads-tmpl: Add name for Suppressible.
8724 2017-01-12  Gary Dismukes  <dismukes@adacore.com>
8726         * exp_ch9.adb, s-secsta.adb, snames.ads-tmpl, exp_ch3.adb: Minor
8727         reformatting.
8728         * debug.adb: Minor comment fixes.
8730 2017-01-12  Arnaud Charlet  <charlet@adacore.com>
8732         * sem_util.adb (Unique_Entity): For concurrent
8733         bodies that are defined with stubs and complete a declaration
8734         of a single concurrent object return the entity of an implicit
8735         concurrent type, not the entity of the anonymous concurrent
8736         object.
8737         * debug.adb: -gnatd.J is no longer used.
8738         * make.adb (Globalize): Removed, no longer used.
8739         * sem_ch9.adb: minor typo in comment for entry index
8741 2017-01-12  Patrick Bernardi  <bernardi@adacore.com>
8743         * aspect.adb, aspect.ads: Added new aspect Secondary_Stack_Size.
8744         * exp_ch3.adb (Build_Init_Statements): As part of initialising
8745         the value record of a task, set its _Secondary_Stack_Size field
8746         if present.
8747         * exp_ch9.adb (Expand_N_Task_Type_Declaration): Create
8748         a _Secondary_Stack_Size field in the value record of
8749         the task if a Secondary_Stack_Size rep item is present.
8750         (Make_Task_Create_Call): Include secondary stack size
8751         parameter. If No_Secondary_Stack restriction is in place, passes
8752         stack size of 0.
8753         * par-prag.adb, sem_prag.adb, sem_prag.ads: Added new pragma
8754         Secondary_Stack_Size.
8755         * s-secsta.adb, s-secsta.ads (Minimum_Secondary_Stack_Size): New
8756         function to define the overhead of the secondary stack.
8757         * s-tarest.adb (Create_Restricted_Task,
8758         Create_Restricted_Task_Sequential): Functions now include
8759         Secondary_Stack_Size parameter to pass to Initialize_ATCB.
8760         * s-tarest.adb (Create_Restricted_Task,
8761         Create_Restricted_Task_Sequential): Calls to Initialize_ATCB now
8762         include Secondary_Stack_Size parameter.
8763         (Task_Wrapper): Secondary stack now allocated to the size specified by
8764         the Secondary_Stack_Size parameter in the task's ATCB.
8765         * s-taskin.adb, s-taskin.adb (Common_ATCB, Initialize_ATCB): New
8766         Secondary_Stack_Size component.
8767         * s-tassta.adb, s-tassta.ads (Create_Restricted_Task,
8768         Create_Restricted_Task_Sequential): Function now include
8769         Secondary_Stack_Size parameter.
8770         (Task_Wrapper): Secondary stack now allocated to the size
8771         specified by the Secondary_Stack_Size parameter in the task's
8772         ATCB.
8773         * s-tproft.adb (Register_Foreign_Thread): Amended Initialize_ATCB call
8774         to include Secondary_Stack_Size parameter.
8775         * sem_ch13.adb (Analyze_Aspect_Specification): Add support for
8776         Secondary_Stack_Size aspect, turning the aspect into its corresponding
8777         internal attribute.
8778         (Analyze_Attribute_Definition): Process Secondary_Stack_Size attribute.
8779         * snames.adb-tmpl, snames.ads-tmpl: Added names
8780         Name_Secondary_Stack_Size, Name_uSecondary_Stack_Size,
8781         Attribute_Secondary_Stack_Size and Pragma_Secondary_Stack_Size.
8783 2017-01-12  Yannick Moy  <moy@adacore.com>
8785         * exp_spark.adb (Expand_SPARK_Potential_Renaming): Fix sloc of copied
8786         subtree.
8788 2017-01-12  Justin Squirek  <squirek@adacore.com>
8790         * exp_attr.adb (Expand_N_Attribute_Reference):
8791         Fix Finalization_Size case by properly resolving the type after
8792         rewritting the node.
8794 2017-01-12  Hristian Kirtchev  <kirtchev@adacore.com>
8796         * exp_util.adb (Build_DIC_Procedure_Body): Semi-insert the body into
8797         the tree.
8798         (Build_DIC_Procedure_Declaration): Semi-insert the body into the tree.
8799         * binde.adb, exp_ch5.adb, sem_type.adb, sem.ads, sem_res.adb,
8800         exp_sel.ads: Minor reformatting.
8802 2017-01-12  Justin Squirek  <squirek@adacore.com>
8804         * exp_ch6.adb (Expand_Call): Add guard to prevent
8805         invariant checks from being created for internally generated
8806         subprograms.
8808 2017-01-12  Bob Duff  <duff@adacore.com>
8810         * lib-writ.ads: Remove incorrect comment.
8812 2017-01-12  Javier Miranda  <miranda@adacore.com>
8814         * debug.adb (-gnatd.K): Enable generation of contract-only
8815         procedures in CodePeer mode.
8816         * contracts.adb (Build_And_Analyze_Contract_Only_Subprograms):
8817         New subprogram.
8818         (Analyze_Contracts): Generate contract-only procedures if -gnatdK is
8819         set.
8820         * scil_ll.ads, scil_ll.adb (Get_Contract_Only_Body_Name): New
8821         subprogram.
8822         (Get_Contract_Only_Missing_Body_Name): New subprogram.
8823         (Get_Contract_Only_Body): New subprogram.
8824         (Set_Contract_Only_Body): New subprogram.
8825         (Is_Contract_Only_Body): New subprogram.
8826         (Set_Is_Contract_Only_Body): New subprogram.
8827         (SCIL_Nodes): Replace table by hash-table.
8829 2017-01-12  Hristian Kirtchev  <kirtchev@adacore.com>
8831         * exp_ch6.adb: Minor reformatting.
8832         * spark_xrefs.ads: minor cleanup of comments for SPARK xrefs
8834 2017-01-12  Bob Duff  <duff@adacore.com>
8836         * binde.adb (Forced): New reason for a dependence.
8837         (Force_Elab_Order): Implementation of the new switch.
8838         * binde.ads: Minor comment fixes.
8839         * bindusg.adb: Add -f switch. Apparently, there was an -f switch
8840         long ago that is no longer supported; removed comment about that.
8841         * opt.ads (Force_Elab_Order_File): Name of file specified for
8842         -f switch.
8843         * switch-b.adb: Parse -f switch.
8845 2017-01-12  Justin Squirek  <squirek@adacore.com>
8847         * exp_ch6.adb (Check_View_Conversion): Created this function
8848         to properly chain calls to check type invariants that may be
8849         present in a subprogram call after the subprogram.
8850         (Expand_Call): Add a conditional to identify when a view conversion
8851         needs to be checked.
8852         * nlists.adb, nlists.ads (Prepend_New): New routine.
8853         (Prepend_New_To): New routine.
8855 2017-01-12  Hristian Kirtchev  <kirtchev@adacore.com>
8857         * sinfo.ads: Minor reformatting.
8859 2017-01-12  Gary Dismukes  <dismukes@adacore.com>
8861         * exp_util.adb, exp_util.ads, einfo.ads: Minor typo fixes and
8862         reformatting.
8864 2017-01-12  Hristian Kirtchev  <kirtchev@adacore.com>
8866         * exp_ch6.adb (Make_Build_In_Place_Call_In_Anonymous_Context): Add new
8867         variable Definite. Create a local object and pass its 'Access to the
8868         BIP function when the result type is either definite or it does not
8869         require any finalization or secondary stack management.
8871 2017-01-12  Bob Duff  <duff@adacore.com>
8873         * contracts.adb, einfo.adb, errout.adb, exp_attr.adb,
8874         exp_ch3.adb, exp_ch7.adb, exp_ch9.adb, exp_prag.adb, freeze.adb,
8875         frontend.adb, ghost.adb, inline.adb, lib-writ.adb, lib-xref.adb,
8876         par.adb, par-ch10.adb, par-ch2.adb, par-prag.adb, par_sco.adb,
8877         sem_attr.adb, sem_aux.adb, sem_ch10.adb, sem_ch12.adb,
8878         sem_ch13.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb, sem_elab.adb,
8879         sem_prag.adb, sem_res.adb, sem_util.adb, sem_util.ads,
8880         sem_warn.adb, sinfo.adb, sinfo.ads, sprint.adb (Pragma_Name):
8881         Change name to Pragma_Name_Unmapped.
8882         (Pragma_Name_Mapped): Change name to Pragma_Name.
8883         This is because the "mapped" version should be the usual case.
8885 2017-01-09  Hristian Kirtchev  <kirtchev@adacore.com>
8887         * einfo.ads, einfo.adb: Remove uses of flags Has_Default_Init_Cond,
8888         Is_Default_Init_Cond_Procedure, and
8889         Has_Inherited_Default_Init_Cond.  Add uses of flags
8890         Has_Own_DIC, Is_DIC_Procedure, and Has_Inherited_DIC.
8891         (Default_Init_Cond_Procedure): Removed.
8892         (DIC_Procedure): New routine.
8893         (Has_Default_Init_Cond): Removed.
8894         (Has_DIC): New routine.
8895         (Has_Inheritable_Invariants): The attribute applies to the base type.
8896         (Has_Inherited_Default_Init_Cond): Removed.
8897         (Has_Inherited_DIC): New routine.
8898         (Has_Inherited_Invariants): The attribute applies to the base type.
8899         (Has_Own_DIC): New routine.
8900         (Has_Own_Invariants): The attribute applies to the base type.
8901         (Is_Default_Init_Cond_Procedure): Removed.
8902         (Is_DIC_Procedure): New routine.
8903         (Set_Default_Init_Cond_Procedure): Removed.
8904         (Set_DIC_Procedure): New routine.
8905         (Set_Has_Default_Init_Cond): Removed.
8906         (Set_Has_Inheritable_Invariants): The attribute applies
8907         to the base type.
8908         (Set_Has_Inherited_Default_Init_Cond): Removed.
8909         (Set_Has_Inherited_DIC): New routine.
8910         (Set_Has_Inherited_Invariants): The attribute applies to the base type.
8911         (Set_Has_Own_DIC): New routine.
8912         (Set_Has_Own_Invariants): The attribute applies to the base type.
8913         (Set_Is_Default_Init_Cond_Procedure): Removed.
8914         (Set_Is_DIC_Procedure): New routine.
8915         (Write_Entity_Flags): Update the output of all flags related to
8916         default initial condition.
8917         * exp_ch3.adb (Expand_N_Object_Declaration): Update the generation
8918         of the call to the DIC procedure.
8919         (Freeze_Type): Generate the body of the DIC procedure.
8920         * exp_ch7.adb (Build_Invariant_Procedure_Body): Replace
8921         all occurrences of Create_Append with Append_New_To. Do
8922         not generate an invariant procedure for a class-wide type.
8923         The generated body acts as a freeze action of the working type.
8924         (Build_Invariant_Procedure_Declaration): Do not generate an
8925         invariant procedure for a class-wide type.
8926         (Create_Append): Removed.
8927         * exp_util.adb: Add with and use clauses for Sem_Ch3, sem_ch6,
8928         sem_Ch12, Sem_Disp, and GNAT.HTable. Move the handling of
8929         class-wide pre/postcondition description and data structures from
8930         Sem_Prag.
8931         (Build_Class_Wide_Expression): Moved from Sem_Prag.
8932         (Build_DIC_Call): New routine.
8933         (Build_DIC_Procedure_Body): New routine.
8934         (Build_DIC_Procedure_Declaration): New routine.
8935         (Entity_Hash): Moved from Sem_Prag.
8936         (Find_DIC_Type): New routine.
8937         (Update_Primitives_Mapping): Reimplemented.
8938         (Update_Primitives_Mapping_Of_Types): New routine.
8939         * exp_util.ads (Build_Class_Wide_Expression): Moved from Sem_Prag.
8940         (Build_DIC_Call): New routine.
8941         (Build_DIC_Procedure_Body): New routine.
8942         (Build_DIC_Procedure_Declaration): New routine.
8943         (Update_Primitives_Mapping): Moved from Sem_Prag.
8944         (Update_Primitives_Mapping_Of_Types): New routine.
8945         * nlists.adb (Append_New): New routine.
8946         (Append_New_To): New routine.
8947         * nlists.ads (Append_New): New routine.
8948         (Append_New_To): New routine.
8949         * sem_ch3.adb (Analyze_Declarations): Do not generate the bodies
8950         of DIC procedures here. This is now done at the end of the
8951         visible declarations, private declarations, and at the freeze
8952         point of a type.
8953         (Analyze_Private_Extension_Declaration):
8954         A private extension inherits the DIC pragma of a parent type.
8955         (Analyze_Subtype_Declaration): No need to propagate invariant
8956         attributes to a subtype as those apply to the base type.
8957         (Build_Derived_Record_Type): No need to inherit invariants here
8958         as this is now done in Build_Derived_Type.
8959         (Build_Derived_Type): Inherit both the DIC pragma and invariants from
8960         a parent type.
8961         (Process_Full_View): Update the propagation of DIC attributes.
8962         (Propagate_Default_Init_Cond_Attributes): Removed.
8963         * sem_ch7.adb Add with and use clauses for Exp_Util.
8964         (Analyze_Package_Specification): Create the body of the DIC
8965         procedure at the end of the visible and private declarations.
8966         (Preserve_Full_Attributes): Propagate DIC attributes.
8967         * sem_ch9.adb (Analyze_Protected_Type_Declaration): Propagate
8968         DIC attributes.
8969         (Analyze_Task_Type_Declaration): Propagate DIC attributes.
8970         * sem_elab.adb (Check_A_Call): Update the call to
8971         Is_Nontrivial_Default_Init_Cond_Procedure.
8972         * sem_prag.adb Remove the with and use clauses for
8973         GNAT.HTable. Move the handling of class- wide pre/postcondition
8974         description and data structures to Exp_Util.
8975         (Analyze_Pragma): Create the declaration of the DIC procedure. There
8976         is no need to propagate invariant-related attributes at this point
8977         as this is done in Build_Invariant_Procedure_Declaration.
8978         (Build_Class_Wide_Expression): Moved to Exp_Util.
8979         (Entity_Hash): Moved to Exp_Util.
8980         (Update_Primitives_Mapping): Moved to Exp_Util.
8981         * sem_prag.ads (Build_Class_Wide_Expression): Moved to Exp_Util.
8982         (Update_Primitives_Mapping): Moved to Exp_Util.
8983         * sem_util.adb: Remove with and use clauses for Ghost
8984         and Sem_Ch13.
8985         (Build_Default_Init_Cond_Call): Removed.
8986         (Build_Default_Init_Cond_Procedure_Bodies): Removed.
8987         (Build_Default_Init_Cond_Procedure_Declaration): Removed.
8988         (Get_Views): Reimplemented.
8989         (Has_Full_Default_Initialization): Reimplement the section on DIC.
8990         (Inherit_Default_Init_Cond_Procedure): Removed.
8991         (Is_Nontrivial_Default_Init_Cond_Procedure): Removed.
8992         (Is_Nontrivial_DIC_Procedure): New routine.
8993         (Is_Verifiable_DIC_Pragma): New routine.
8994         (Propagate_DIC_Attributes): New routine.
8995         * sem_util.ads (Build_Default_Init_Cond_Call): Removed.
8996         (Build_Default_Init_Cond_Procedure_Bodies): Removed.
8997         (Build_Default_Init_Cond_Procedure_Declaration): Removed.
8998         (Inherit_Default_Init_Cond_Procedure): Removed.
8999         (Is_Nontrivial_Default_Init_Cond_Procedure): Removed.
9000         (Is_Nontrivial_DIC_Procedure): New routine.
9001         (Is_Verifiable_DIC_Pragma): New routine.
9002         (Propagate_DIC_Attributes): New routine.
9003         * sem_warn.adb (Is_OK_Fully_Initialized): Reimplement the section
9004         on DIC.
9005         * sinfo.ads, sinfo.adb: Add new attribute Expression_Copy along with
9006         usage in nodes.
9007         (Expression_Copy): New routine along with pragma Inline.
9008         (Set_Expression_Copy): New routine along with pragma Inline.
9010 2017-01-06  Bob Duff  <duff@adacore.com>
9012         * bindgen.adb (Gen_Adainit, Gen_Adafinal): Change
9013         "Bind_Main_Program" to "not Bind_For_Library", because otherwise
9014         we won't generate the call to s_stalib_adafinal when the main
9015         is not written in Ada.
9017 2017-01-06  Bob Duff  <duff@adacore.com>
9019         * sem_prag.adb: Minor: remove pragma Warnings.
9021 2017-01-06  Tristan Gingold  <gingold@adacore.com>
9023         * Makefile.rtl: Do not compile s-stchop by default.
9025 2017-01-06  Patrick Bernardi  <bernardi@adacore.com>
9027         * aspects.adb, aspects.ads, exp_ch3.adb, exp_ch9.adb, par-prag.adb,
9028         sem_ch13.adb, sem_prag.adb, sem_prag.ads, snames.adb-tmpl,
9029         snames.ads-tmpl, s-secsta.adb, s-secsta.ads, s-tarest.adb,
9030         s-tarest.ads, s-taskin.adb, s-taskin.ads, s-tassta.adb, s-tassta.ads:
9031         Reverted previous change for now.
9033 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
9035         * exp_ch3.adb (Build_Initialization_Call): Apply predicate
9036         check to default discriminant value if checks are enabled.
9037         (Build_Assignment): If type of component has static predicate,
9038         apply check to its default value, if any.
9040 2017-01-06  Patrick Bernardi  <bernardi@adacore.com>
9042         * aspect.adb, aspect.ads: Added new aspect Secondary_Stack_Size.
9043         * exp_ch3.adb (Build_Init_Statements): As part of initialising
9044         the value record of a task, set its _Secondary_Stack_Size field
9045         if present.
9046         * exp_ch9.adb (Expand_N_Task_Type_Declaration): Create
9047         a _Secondary_Stack_Size field in the value record of
9048         the task if a Secondary_Stack_Size rep item is present.
9049         (Make_Task_Create_Call): Include secondary stack size
9050         parameter. If No_Secondary_Stack restriction is in place, passes
9051         stack size of 0.
9052         * par-prag.adb, sem_prag.adb, sem_prag.ads: Added new pragma
9053         Secondary_Stack_Size.
9054         * s-secsta.adb, s-secsta.ads (Minimum_Secondary_Stack_Size): New
9055         function to define the overhead of the secondary stack.
9056         * s-tarest.adb (Create_Restricted_Task,
9057         Create_Restricted_Task_Sequential): Functions now include
9058         Secondary_Stack_Size parameter to pass to Initialize_ATCB.
9059         * s-tarest.adb (Create_Restricted_Task,
9060         Create_Restricted_Task_Sequential): Calls to Initialize_ATCB
9061         now include Secondary_Stack_Size parameter.
9062         (Task_Wrapper):
9063         Secondary stack now allocated to the size specified by the
9064         Secondary_Stack_Size parameter in the task's ATCB.
9065         * s-taskin.adb, s-taskin.adb (Common_ATCB, Initialise_ATCB): New
9066         Secondary_Stack_Size component.
9067         * s-tassta.adb, s-tassta.ads (Create_Restricted_Task,
9068         Create_Restricted_Task_Sequential): Function now include
9069         Secondary_Stack_Size parameter.
9070         (Task_Wrapper): Secondary stack
9071         now allocated to the size specified by the Secondary_Stack_Size
9072         parameter in the task's ATCB.
9073         * sem_ch13.adb (Analyze_Aspect_Specification): Add support
9074         for Secondary_Stack_Size aspect, turning the aspect into its
9075         corresponding internal attribute.
9076         (Analyze_Attribute_Definition):
9077         Process Secondary_Stack_Size attribute.
9078         * snames.adb-tmpl, snames.ads-tmpl: Added names
9079         Name_Secondary_Stack_Size, Name_uSecondary_Stack_Size,
9080         Attribute_Secondary_Stack_Size and Pragma_Secondary_Stack_Size.
9082 2017-01-06  Pascal Obry  <obry@adacore.com>
9084         * a-direio.adb, a-direio.ads, a-sequio.adb, a-sequio.ads: Add Flush to
9085         Sequential_IO and Direct_IO.
9087 2017-01-06  Bob Duff  <duff@adacore.com>
9089         * snames.ads-tmpl (Renamed): New name for the pragma argument.
9090         * par-ch2.adb: Allow the new pragma (with analysis deferred
9091         to Sem_Prag).
9092         * sinfo.ads, sinfo.adb (Map_Pragma_Name, Pragma_Name_Mapped):
9093         Keep a mapping from new pragma names to old names.
9094         * sem_prag.adb: Check legality of pragma Rename_Pragma, and
9095         implement it by calling Map_Pragma_Name.
9096         * checks.adb, contracts.adb, einfo.adb, errout.adb,
9097         * exp_attr.adb, exp_ch3.adb, exp_ch6.adb, exp_ch7.adb, exp_ch9.adb,
9098         * exp_prag.adb, exp_util.adb, freeze.adb, frontend.adb, ghost.adb,
9099         * inline.adb, lib-writ.adb, scans.adb, scans.ads, sem_attr.adb,
9100         * sem_aux.adb, sem_ch10.adb, sem_ch13.adb, sem_ch6.adb, sem_ch9.adb,
9101         * sem_elab.adb, sem_res.adb, sem_util.adb, sem_util.ads,
9102         * sem_warn.adb: Call Pragma_Name_Mapped instead of Pragma_Name
9103         as appropriate.
9105 2017-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
9107         * exp_ch9.adb: Minor reformatting.
9109 2017-01-06  Tristan Gingold  <gingold@adacore.com>
9111         * exp_ch9.ads, exp_ch9.adb (Build_Entry_Names): Remove (unused).
9112         * rtsfind.ads (RE_Task_Entry_Names_Array, RO_ST_Set_Entry_Names)
9113         (RE_Protected_Entry_Names_Array, RO_PE_Set_Entry_Names): Remove
9114         (unused).
9115         * s-taskin.ads, s-taskin.adb (Set_Entry_Names,
9116         Task_Entry_Names_Array, Task_Entry_Names_Access): Remove.
9117         * s-tpoben.ads, s-tpoben.adb (Set_Entry_Names,
9118         Protected_Entry_Names_Array, Protected_Entry_Names_Access): Remove.
9120 2017-01-06  Bob Duff  <duff@adacore.com>
9122         * sinfo.ads, sinfo.adb (Map_Pragma_Name): Preparation work,
9123         dummy implementation of Map_Pragma_Name.
9125 2017-01-06  Tristan Gingold  <gingold@adacore.com>
9127         * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Make the
9128         entry_body variable constant.
9129         * s-taprob.ads (Entry_Body_Access): Move to s-tposen.
9130         * s-tpoben.ads (Protected_Entry_Body_Access): Now access
9131         to constant.
9132         * s-tposen.ads (Entry_Body_Access): Moved from s-taprob,
9133         now access to constant.
9135 2017-01-06  Gary Dismukes  <dismukes@adacore.com>
9137         * einfo.ads, sem_res.adb, sem_attr.adb, sem_ch6.adb: Minor
9138         reformatting and typo fixes.
9140 2017-01-06  Bob Duff  <duff@adacore.com>
9142         * snames.ads-tmpl: New names for pragma renaming.
9143         * snames.adb-tmpl (Is_Configuration_Pragma_Name): Minor cleanup.
9144         * par-prag.adb: Add new pragma name to case statement.
9145         * sem_prag.adb (Rename_Pragma): Initial cut at semantic analysis
9146         of the pragma.
9147         * sinfo.ads, sinfo.adb (Pragma_Name_Mapped): Preparation work,
9148         Dummy implementation of Pragma_Name_Mapped.
9150 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
9152         * exp_ch6.adb (Expand_Protected_Subprogram_Call): Add guard to
9153         better detect call within an entry_wrapper.
9154         * sem_res.adb (Resolve_Call): A protected call within an
9155         entity_wrapper is analyzed in the context of the protected
9156         object but corresponds to a pre-analysis and is not an access
9157         before elaboration.
9158         * sem_attr.adb: Minor reformatting.
9160 2017-01-06  Justin Squirek  <squirek@adacore.com>
9162         * sem_attr.adb (Analyze_Attribute): Modify semantic checks for
9163         Finalization_Size to allow a prefix of any non-class-wide type.
9164         * sem_attr.ads Modify comment for Finalization_Size to include
9165         definite type use case.
9167 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
9169         * einfo.ads, einfo.adb (Is_Entry_Wrapper): New flag, defined
9170         on procedures that are wrappers created for entries that have
9171         preconditions.
9172         * sem_ch6.adb (Analyze_Subrogram_Body_Helper): If the subprogram
9173         body is an entry_wrapper, compile it in the context of the
9174         synchronized type, because a precondition may refer to funtions
9175         of the type.
9176         * exp_ch9.adb (Build_Contract_Wrapper): Set Is_Entry_Wrapper on
9177         body entity.
9178         * exp_ch6.adb (Expand_Protected_Subprogram_Call): if the call is
9179         within an Entry_Wrapper this is an external call whose target
9180         is the synchronized object that is the actual in the call to
9181         the wrapper.
9183 2017-01-06  Yannick Moy  <moy@adacore.com>
9185         * sem_attr.adb (Analyze_Attribute/Attribute_Loop_Entry): Analyze node
9186         in tree, which means not analyzing the previous prefix if the node has
9187         been rewritten into its prefix.
9189 2017-01-06  Gary Dismukes  <dismukes@adacore.com>
9191         * s-tpobop.adb: Minor reformatting.
9193 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
9195         * checks.adb (Ensure_Valid): Do not generate a validity check
9196         within a generated predicate function, validity checks will have
9197         been applied earlier when required.
9199 2017-01-06  Tristan Gingold  <gingold@adacore.com>
9201         * s-tpoben.ads (Protection_Entries): Add comment and reorder
9202         components for performances.
9203         * s-tpobop.adb (PO_Do_Or_Queue): Implement Max_Queue_Length runtime
9204         semantic.
9206 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
9208         * sem_eval.adb (Check_Expression_Against_Static_Predicate):
9209         If expression is compile-time known and obeys a static predicate
9210         it must be labelled as static, to prevent spurious warnings and
9211         run-time errors, e.g. in case statements. This is relevant when
9212         the expression is the result of constant-folding a type conversion
9213         whose expression is a variable with a known static value.
9215 2017-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
9217         * exp_attr.adb, sem_attr.ads: Minor reformatting.
9219 2017-01-06  Justin Squirek  <squirek@adacore.com>
9221         * exp_attr.adb (Expand_N_Attribute_Reference): Add entry for
9222         expansion of Finalization_Size attribute.
9223         * sem_attr.adb (Analyze_Attribute): Add entry to check the
9224         semantics of Finalization_Size.
9225         (Eval_Attribute): Add null entry for Finalization_Size.
9226         * sem_attr.ads: Add Finalization_Size to the implementation
9227         dependent attribute list.
9228         * snames.ads-tmpl: Add name entry for Finalization_Size attribute.
9230 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
9232         * sem_ch5.adb (Analyze_Loop_Statement): If the loop includes an
9233         iterator specification with a serious syntactic error, transform
9234         construct into an infinite loop in order to continue analysis
9235         and prevent a compiler abort.
9237 2017-01-06  Tristan Gingold  <gingold@adacore.com>
9239         * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Do not generate
9240         max_queue_lengths_array if unused.
9242 2017-01-06  Bob Duff  <duff@adacore.com>
9244         * errout.adb (Set_Msg_Text): Protect against out-of-bounds
9245         array access, in case "\" is at the end of Text.
9246         * stylesw.adb (Set_Style_Check_Options): Don't include input
9247         characters in the error message template, because they could
9248         be control characters such as "\", which Errout will try to
9249         interpret.
9251 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
9253         * sem_ch4.adb (Find_Indexing_Operations, Inspect_Declarations):
9254         For a private type examine the visible declarations that follow
9255         the partial view, not just the private declarations that follow
9256         the full view.
9258 2017-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
9260         * exp_ch5.adb, sem_ch3.adb, checks.adb: Minor reformatting and
9261         code cleanup.
9263 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
9265         * exp_ch5.adb (Get_Default_Iterator): For a derived type, the
9266         alias of the inherited op is the parent iterator, no need to
9267         examine dispatch table positions which might not be established
9268         yet if type is not frozen.
9269         * sem_disp.adb (Check_Controlling_Formals): The formal of a
9270         predicate function may be a subtype of a tagged type.
9271         * sem_ch3.adb (Complete_Private_Subtype): Adjust inheritance
9272         of representation items for the completion of a type extension
9273         where a predicate applies to the partial view.
9274         * checks.ads, checks.adb (Apply_Predicate_Check): Add optional
9275         parameter that designates function whose actual receives a
9276         predicate check, to improve warning message when the check will
9277         lead to infinite recursion.
9278         * sem_res.adb (Resolve_Actuals): Pass additional parameter to
9279         Apply_Predicate_Check.
9281 2017-01-06  Tristan Gingold  <gingold@adacore.com>
9283         * s-rident.ads (Profile_Info): Remove No_Entry_Queue from
9284         Gnat_Extended_Ravenscar.
9285         * exp_ch9.adb, s-tpoben.adb, s-tpoben.ads: Fix spelling.
9287 2017-01-06  Gary Dismukes  <dismukes@adacore.com>
9289         * sem_util.ads: Minor typo fix and reformatting.
9291 2017-01-06  Yannick Moy  <moy@adacore.com>
9293         * ghost.adb Minor fixing of references to SPARK RM.
9294         (Check_Ghost_Context): Check whether reference is to a lvalue
9295         before issuing an error about violation of SPARK RM 6.9(13)
9296         when declaration has Ghost policy Check and reference has Ghost
9297         policy Ignore.
9298         * sem_util.adb Minor indentation.
9299         * sem_ch10.adb (Analyze_Package_Body_Stub, Analyze_Protected_Body_Stub,
9300         Analyze_Task_Body_Stub): Set Ekind of the defining identifier.
9301         * sem_util.ads (Unique_Defining_Entity): Document the result
9302         for package body stubs.
9304 2017-01-06  Tristan Gingold  <gingold@adacore.com>
9306         * raise-gcc.c (abort): Macro to call Abort_Propagation.
9307         * s-tpoben.ads (Protected_Entry_Queue_Max_Access): Make it access
9308         constant.
9309         * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
9310         Do not generate the Entry_Max_Queue_Lengths_Array if all default
9311         values.
9312         * exp_util.adb (Corresponding_Runtime_Package): Consider
9313         Max_Queue_Length pragma.
9315 2017-01-06  Justin Squirek  <squirek@adacore.com>
9317         * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
9318         Remove declaration generation in the case of
9319         System_Tasking_Protected_Objects_Single_Entry being used,
9320         and add a warning message when this is detected to occur.
9321         (Make_Initialize_Protection): Remove reference pass in the case
9322         of System_Tasking_Protected_Objects_Single_Entry.
9323         * rtsfind.ads: Remove RE_Protected_Entry_Queue_Max
9324         * s-tposen.adb (Initialize_Protection_Entry): Remove
9325         Entry_Queue_Max parameter.
9326         * s-tposen.ads: Remove the types use to store the entry queue
9327         maximum.
9328         * sem_prag.adb (Analyze_Pragma): Remove entry families restriction
9330 2017-01-06  Yannick Moy  <moy@adacore.com>
9332         * sem_util.adb, sem_util.ads (Get_Enum_Lit_From_Pos): Strengthen
9333         behavior of function, to also accept out of range positions
9334         and raise Constraint_Error in such case, and to copy sloc from
9335         literal if No_Location passed as location.
9336         * uintp.adb, uintp.ads (UI_To_Int, UI_To_CC): Strengthen behavior
9337         of functions to raise Constraint_Error in case of value not in
9338         appropriate range.
9340 2017-01-06  Tristan Gingold  <gingold@adacore.com>
9342         * sem_util.adb, s-taprop-linux.adb (Finalize_TCB): Remove call to
9343         Invalidate_Stack_Cache.
9345 2017-01-06  Eric Botcazou  <ebotcazou@adacore.com>
9347         * s-os_lib.adb: Minor fix to the signature of Readlink.
9349 2017-01-06  Javier Miranda  <miranda@adacore.com>
9351         * sem_ch6.adb (Conforming_Types): Handle another
9352         confusion between views in a nested instance with an actual
9353         private type whose full view is not in scope.
9355 2017-01-06  Arnaud Charlet  <charlet@adacore.com>
9357         * exp_ch5.adb (Expand_N_If_Statement): Obey existing comment and
9358         mark a rewritten if statement as explicit (Comes_From_Source).
9360 2017-01-06  Gary Dismukes  <dismukes@adacore.com>
9362         * sem_prag.adb, rtsfind.adb, sem_util.adb: Minor typo fixes.
9364 2017-01-06  Tristan Gingold  <gingold@adacore.com>
9366         * ada.ads, a-unccon.ads: Add pragma No_Elaboration_Code_All.
9368 2017-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
9370         * sem_case.adb: Minor reformatting.
9372 2017-01-06  Thomas Quinot  <quinot@adacore.com>
9374         * g-socthi-mingw.adb: Remove now extraneous USE TYPE clause
9376 2017-01-06  Justin Squirek  <squirek@adacore.com>
9378         * aspects.adb: Register aspect in Canonical_Aspect.
9379         * aspects.ads: Associate qualities of Aspect_Max_Queue_Length
9380         into respective tables.
9381         * einfo.ads, einfo.adb: Add a new attribute for
9382         handling the parameters for Pragma_Max_Entry_Queue
9383         (Entry_Max_Queue_Lengths_Array) in E_Protected_Type. Subprograms
9384         for accessing and setting were added as well.
9385         * par-prag.adb (Prag): Register Pramga_Max_Entry_Queue.
9386         * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Emit
9387         declaration for pramga arguments and store them in the protected
9388         type node.
9389         (Make_Initialize_Protection): Pass a reference to
9390         the Entry_Max_Queue_Lengths_Array in the protected type node to
9391         the runtime.
9392         * rtsfind.adb: Minor grammar fix.
9393         * rtsfind.ads: Register new types taken from the
9394         runtime libraries RE_Protected_Entry_Queue_Max and
9395         RE_Protected_Entry_Queue_Max_Array
9396         * s-tposen.adb, s-tpoben.adb
9397         (Initialize_Protection_Entry/Initialize_Protection_Entries):
9398         Add extra parameter and add assignment to local object.
9399         * s-tposen.ads, s-tpoben.ads: Add new types to
9400         store entry queue maximums and a field to the entry object record.
9401         * sem_ch13.adb (Analyze_Aspect_Specifications): Add case statement
9402         for Aspect_Max_Queue_Length.
9403         (Check_Aspect_At_Freeze_Point):
9404         Add aspect to list of aspects that don't require delayed analysis.
9405         * sem_prag.adb (Analyze_Pragma): Add case statement for
9406         Pragma_Max_Queue_Length, check semantics, and register arugments
9407         in the respective entry nodes.
9408         * sem_util.adb, sem_util.ads Add functions Get_Max_Queue_Length
9409         and Has_Max_Queue_Length
9410         * snames.ads-tmpl: Add constant for the new aspect-name
9411         Name_Max_Queue_Length and corrasponding pragma.
9413 2017-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
9415         * exp_util.adb (Is_Controlled_Function_Call):
9416         Reimplemented. Consider any node which has an entity as the
9417         function call may appear in various ways.
9419 2017-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
9421         * exp_attr.adb (Rewrite_Stream_Proc_Call): Use
9422         an unchecked type conversion when performing a view conversion
9423         to/from a private type. In all other cases use a regular type
9424         conversion to ensure that any relevant checks are properly
9425         installed.
9427 2017-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
9429         * sem_prag.adb, sem_ch8.adb: Minor reformatting.
9431 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
9433         * sem_case.adb (Explain_Non_Static_Bound): Suppress cascaded
9434         error on case expression that is an entity, when coverage is
9435         incomplete and entity has a static value obtained by local
9436         propagation.
9437         (Handle_Static_Predicate): New procedure, subsidiary of
9438         Check_Choices, to handle case alternatives that are either
9439         subtype names or subtype indications involving subtypes that
9440         have static predicates.
9442 2017-01-06  Thomas Quinot  <quinot@adacore.com>
9444         * s-oscons-tmplt.c, g-socket.adb, g-socket.ads, g-sothco.ads:
9445         (GNAT.Socket): Add support for Busy_Polling and Generic_Option
9447 2017-01-06  Bob Duff  <duff@adacore.com>
9449         * sem_elab.adb (Activate_Elaborate_All_Desirable): Don't add
9450         Elaborate_All(P) to P itself. That could happen in obscure cases,
9451         and always introduced a cycle (P body must be elaborated before
9452         P body).
9453         * lib-writ.ads: Comment clarification.
9454         * ali-util.ads: Minor comment fix.
9455         * ali.adb: Minor reformatting.
9457 2017-01-06  Tristan Gingold  <gingold@adacore.com>
9459         * a-exexpr-gcc.adb: Improve comment.
9461 2017-01-03  James Cowgill  <James.Cowgill@imgtec.com>
9463         * s-linux-mips.ads: Use correct signal and errno constants.
9464         (sa_handler_pos, sa_mask_pos): Fix offsets for 64-bit MIPS.
9466 2017-01-03  James Cowgill  <James.Cowgill@imgtec.com>
9468         * s-linux-mips.ads: Rename from s-linux-mipsel.ads.
9469         * gcc-interface/Makefile.in (MIPS/Linux): Merge mips and mipsel
9470         sections.
9472 2017-01-01  Eric Botcazou  <ebotcazou@adacore.com>
9474         * gnatvsn.ads: Bump copyright year.
9476 2017-01-01  Jakub Jelinek  <jakub@redhat.com>
9478         * gnat_ugn.texi: Bump @copying's copyright year.
9479         * gnat_rm.texi: Likewise.
9481 Copyright (C) 2017 Free Software Foundation, Inc.
9483 Copying and distribution of this file, with or without modification,
9484 are permitted in any medium without royalty provided the copyright
9485 notice and this notice are preserved.