1 2017-10-05 Eric Botcazou <ebotcazou@adacore.com>
4 * mingw32.h (_O_U8TEXT, _O_U16TEXT, _O_WTEXT): Delete.
5 * sysdep.c (__gnat_set_mode ): Use DJGPP version for Cygwin.
7 2017-10-02 Eric Botcazou <ebotcazou@adacore.com>
8 Pierre-Marie de Rodat <derodat@adacore.com>
11 * libgnarl/s-linux__x32.ads (suseconds_t): New subtype.
12 (time_t): Change from derived type to subtype.
13 (timeval): Use suseconds_t for tv_usec.
14 * libgnarl/s-osinte__x32.adb (To_Timespec): Remove use type clause.
16 2017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
18 * gcc-interface/decl.c (annotate_value): Use wi::to_widest when
19 handling the form (plus/mult (convert @0) @1).
21 2017-09-29 Bob Duff <duff@adacore.com>
23 * exp_ch6.adb (Expand_Call_Helper): Replace with code more similar to
25 (Make_Build_In_Place_Call_In_Object_Declaration): Back out previous
26 change. Set the Etype in the class-wide case. This fixes a regression
27 in the libadalang test suite.
29 2017-09-29 Joel Brobecker <brobecker@adacore.com>
31 * doc/gnat_ugn/building_executable_programs_with_gnat.rst,
32 doc/gnat_ugn/the_gnat_compilation_model.rst: Avoid use of single colon
34 * gnat_ugn.texi: Regenerate.
36 2017-09-29 Justin Squirek <squirek@adacore.com>
38 * ali-util.adb, comperr.adb, cprint.adb, errout.adb, fmap.adb,
39 fname-sf.adb, frontend.adb, lib-xref-spark_specific.adb, gnat1drv.adb,
40 gnatls.adb, lib.adb, lib-load.adb, lib-writ.adb, prepcomp.adb,
41 sinput-d.adb, sinput-l.adb, sprint.adb, targparm.adb: Update comparison
42 for checking source file status and error message and/or call to
44 * libgnat/s-os_lib.ads: Add new potential value constant for
45 uninitialized file descriptors.
46 * osint.adb, osint.ads (Read_Source_File): Add extra parameter to
47 return result of IO to encompass a read access failure in addition to a
50 2017-09-29 Bob Duff <duff@adacore.com>
52 * exp_ch6.adb (Expand_Call_Helper): Handle case of build-in-place
53 functions returning nonlimited types. Allow for qualified expressions
55 (Expand_N_Extended_Return_Statement): Correct the computation of
56 Func_Bod to allow for child units.
57 (Expand_Simple_Function_Return): Remove assumption that b-i-p implies
58 limited (initialization of In_Place_Expansion), and implies >= Ada
60 (Is_Build_In_Place_Result_Type): New function to accompany
61 Is_Build_In_Place_Function and Is_Build_In_Place_Function_Call, because
62 sometimes we just have the type on our hands, not the function. For
63 now, does the same thing as the old version, so build-in-place is
64 disabled for nonlimited types, except that you can use -gnatd.9 to
66 * exp_ch6.ads (Is_Build_In_Place_Result_Type): New function to
67 accompany Is_Build_In_Place_Function and
68 Is_Build_In_Place_Function_Call, because sometimes we just have the
69 type on our hands, not the function.
70 (Make_Build_In_Place_Call_In_...): Handle nonlimited build-in-place
72 (Make_Build_In_Place_Call_In_Object_Declaration): Remove the
73 questionable code at the end that was setting the Etype.
74 * exp_aggr.adb (Is_Build_In_Place_Aggregate_Return): New function to
75 determine whether "return (...agg...);" is returning from a
76 build-in-place function.
77 (Initialize_Ctrl_Array_Component, Initialize_Ctrl_Record_Component):
78 Remove assumption that b-i-p implies limited (initialization of
80 (Build_Record_Aggr_Code): AI-287: fix comment; it can't be wrapped in
81 an unchecked conversion. Add assertions.
82 (Convert_Aggr_In_Object_Decl): Establish_Transient_Scope -- no need for
83 secondary stack here, just because the type needs finalization. That
85 (Convert_To_Assignments): Only set Unc_Decl if Nkind (N) = N_Aggregate.
86 For "return (...agg...);" don't assume b-i-p implies limited.
87 Needs_Finalization does not imply secondary stack.
88 (Expand_Array_Aggregate): Named notation. Reverse the sense of
89 Component_OK_For_Backend -- more readability with fewer double
91 * exp_attr.adb (Expand_N_Attribute_Reference): Remove assumptions that
92 b-i-p implies >= Ada 2005.
93 * exp_ch3.adb (Expand_N_Object_Declaration): Remove assumptions that
94 b-i-p implies >= Ada 2005. Remove Adjust if we're building the return
95 object of an extended return statement in place.
96 * exp_ch4.adb (Expand_Allocator_Expression, Expand_N_Indexed_Component,
97 Expand_N_Selected_Component, Expand_N_Slice): Remove assumptions that
98 b-i-p implies >= Ada 2005.
99 * exp_ch5.adb (Expand_N_Assignment_Statement): Remove assumption that
100 b-i-p implies >= Ada 2005.
101 * exp_ch7.adb: Comment fix.
102 * exp_ch8.adb (Expand_N_Object_Renaming_Declaration): Remove
103 assumptions that b-i-p implies >= Ada 2005.
104 * exp_disp.adb (Expand_Interface_Actuals): Remove assumptions that
105 b-i-p implies >= Ada 2005.
106 * exp_util.adb (Build_Allocate_Deallocate_Proc): Look at Storage_Pool
107 (Expr), in case Pool_Id is not set.
108 (Initialized_By_Aliased_BIP_Func_Call): Handle case where the call is
109 qualified or converted.
110 (Is_Secondary_Stack_BIP_Func_Call): Don't check if Nkind (Selector_Name
111 (Param)) = N_Identifier; that's all it could be.
112 * sinfo.ads: Comment fixes.
113 * snames.ads-tmpl: Comment fixes.
114 * debug.adb: Add flag gnatd.9, to enable the build-in-place machinery.
116 2017-09-29 Justin Squirek <squirek@adacore.com>
118 * sem_ch8.adb (Mark_Use_Clauses): Add recursive call to properly handle
119 all cases related to marking entity identifiers.
121 2017-09-29 Vasiliy Fofanov <fofanov@adacore.com>
123 * adaint.c (win32_wait): Properly handle error and take into account
124 the WIN32 limitation on the number of simultaneous wait objects.
126 2017-09-29 Vasiliy Fofanov <fofanov@adacore.com>
128 * cal.c: Minor proofreading.
130 2017-09-29 Vasiliy Fofanov <fofanov@adacore.com>
132 * doc/gnat_ugn/gnat_utility_programs.rst: Minor formatting fix.
133 * gnat_ugn.texi: Regenerate.
135 2017-09-29 Bob Duff <duff@adacore.com>
137 * lib-xref.ads: Comment fix.
139 2017-09-29 Bob Duff <duff@adacore.com>
141 * exp_aggr.adb: Remove calls to Set_No_Ctrl_Actions for discriminants.
142 Discriminants can't need finalization.
144 2017-09-29 Ed Schonberg <schonberg@adacore.com>
146 * sem_ch6.adb (Analyze_Expression_Function): Do not emit freeze nodes
147 for types in expression if the function is within a generic unit.
148 * sem_res.adb (Resolve): In a generic context do not freeze an
149 expression, unless it is an entity. This exception is solely for the
150 purpose of detecting illegal uses of deferred constants in generic
152 * sem_res.adb: Minor reformatting.
154 2017-09-29 Justin Squirek <squirek@adacore.com>
156 * sem_ch8.adb (Note_Redundant_Use): Add guard to protect against false
159 2017-09-29 Yannick Moy <moy@adacore.com>
161 * sinput-c.adb: Remove unused with-clause on Ada.Unchecked_Conversion.
163 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
165 * doc/gnat_rm/representation_clauses_and_pragmas.rst: Minor rewording.
166 * doc/gnat_rm/implementation_defined_pragmas.rst (Optimize_Alignment):
167 Document the effect of pragma Optimize_Alignment (Space) on non-packed
169 * gnat_rm.texi: Regenerate.
171 2017-09-25 Justin Squirek <squirek@adacore.com>
173 * aspects.adb, bindgen.adb, clean.adb, erroutc.adb, exp_ch13.adb,
174 exp_dbug.adb, exp_unst.adb, exp_util.adb, frontend.adb, gnat1drv.adb,
175 gnatdll.adb, gnatlink.adb, gnatls.adb, gnatname.adb, gnatxref.adb,
176 gnatfind.adb, libgnat/a-cfhama.ads, libgnat/a-exetim__mingw.adb,
177 libgnat/a-strmap.adb, libgnat/a-teioed.adb, libgnat/g-alvety.ads,
178 libgnat/g-expect.adb, libgnat/g-regist.adb, libgnat/g-socket.adb,
179 libgnat/g-socthi__mingw.ads, libgnat/s-stausa.adb,
180 libgnat/s-tsmona__linux.adb, libgnat/s-tsmona__mingw.adb,
181 libgnarl/s-taenca.adb, libgnarl/s-tassta.adb, libgnarl/s-tarest.adb,
182 libgnarl/s-tpobop.adb, make.adb, makeusg.adb, namet.adb, output.ads,
183 put_scos.adb, repinfo.adb, rtsfind.adb, scn.ads, sem_attr.adb,
184 sem_aux.ads, sem_warn.ads, targparm.adb, xr_tabls.adb, xref_lib.adb:
185 Removal of ineffective use-clauses.
186 * exp_ch9.adb (Is_Simple_Barrier_Name): Check for false positives with
187 constant folded barriers.
188 * ghost.adb, sprint.adb, sem_ch10.adb, sem_warn.adb: Change access to
189 Subtype_Marks and Names list in use-clause nodes to their new singular
190 counterparts (e.g. Subtype_Mark, Name).
191 * par.adb, par-ch8.adb (Append_Use_Clause): Created to set
192 Prev_Ids and More_Ids in use-clause nodes.
193 (P_Use_Clause): Modify to take a list as a parameter.
194 (P_Use_Package_Clause, P_Use_Type_Clause): Divide names and
195 subtype_marks within an aggregate use-clauses into individual clauses.
196 * par-ch3.adb, par-ch10.adb, par-ch12.adb: Trivally modify call to
197 P_Use_Clause to match its new behavior.
198 * sem.adb (Analyze): Mark use clauses for non-overloaded entities.
199 * sem_ch4.adb (Try_One_Interp): Add sanity check to handle previous
201 * sem_ch6.adb (Analyze_Generic_Subprogram_Body,
202 Analyze_Subprogram_Body_Helper): Update use clause chain at the end of
203 the declarative region.
204 * sem_ch7.adb (Analyze_Package_Body_Helper): Update use clause chain
205 after analysis (Analyze_Package_Specification): Update use clause chain
206 when there is no body.
207 * sem_ch8.ads, sem_ch8.adb (Analyze_Use_Package, Analyze_Use_Type): Add
208 parameter to determine weither the installation of scopes should also
209 propagate on the use-clause "chain".
210 (Mark_Use_Clauses): Created to traverse use-clause chains and determine
211 what constitutes a valid "use" of a clause.
212 (Update_Use_Clause_Chain): Created to aggregate common machinary used
213 to clean up use-clause chains (and warn on ineffectiveness) at the end
214 of declaritive regions.
215 * sem_ch8.adb (Analyze_Package_Name): Created to perform analysis on a
216 package name from a use-package clause.
217 (Analyze_Package_Name_List): Created to perform analysis on a list of
218 package names (similar to Analyze_Package_Name).
219 (Find_Most_Prev): Created to traverse to the beginning of a given
221 (Most_Decendant_Use_Clause): Create to identify which clause from a
222 given set is highest in scope (not always the most prev).
223 (Use_One_Package, Use_One_Type): Major cleanup and reorganization to
224 handle the new chaining algorithm, also many changes related to
225 redundant clauses. A new parameter has also been added to force
226 installation to handle certain cases.
227 * sem_ch9.adb (Analyze_Entry_Body, Analyze_Protected_Body,
228 Analyze_Task_Body): Mark use clauses on relevant entities.
229 * sem_ch10.adb, sem_ch10.ads (Install_Context_Clauses,
230 Install_Parents): Add parameter to determine weither the installation
231 of scopes should also propagate on the use-clause "chain".
232 * sem_ch12.adb (Inline_Instance_Body): Add flag in call to
233 Install_Context to avoid redundant chaining of use-clauses.
234 * sem_ch13.adb: Minor reformatting.
235 * sem_res.adb (Resolve): Mark use clauses on operators.
236 (Resolve_Call, Resolve_Entity_Name): Mark use clauses on relevant
238 * sinfo.adb, sinfo.ads (Is_Effective_Use_Clause,
239 Set_Is_Effective_Use_Clause): Add new flag to N_Use_Clause nodes to
240 represent any given clause's usage/reference/necessity.
241 (Prev_Use_Clause, Set_Prev_Use_Clause): Add new field to N_Use_Clause
242 nodes to allow loose chaining of redundant clauses.
243 (Set_Used_Operations, Set_Subtype_Mark, Set_Prev_Ids, Set_Names,
244 Set_More_Ids, Set_Name): Modify set procedure calls to reflect
245 reorganization in node fields.
246 * types.ads (Source_File_Index): Adjust index bounds.
247 (No_Access_To_Source_File): New constant.
249 2017-09-25 Ed Schonberg <schonberg@adacore.com>
251 * sem_ch13.adb (Analyze_One_Aspect): In ASIS mode make a full copy of
252 the expression to be used in the generated attribute specification
253 (rather than relocating it) to avoid resolving a potentially malformed
254 tree when the expression is resolved through an ASIS-specific call to
255 Resolve_Aspect_Expressions. This manifests itself as a crash on a
256 function with parameter associations.
258 2017-09-25 Yannick Moy <moy@adacore.com>
260 * exp_spark.adb (Expand_SPARK_Indexed_Component,
261 Expand_SPARK_Selected_Component): New procedures to insert explicit
262 dereference if required.
263 (Expand_SPARK): Call the new procedures.
265 2017-09-25 Patrick Bernardi <bernardi@adacore.com>
267 * libgnat/a-stwiun.adb, libgnat/s-stchop__vxworks.adb,
268 libgnat/g-socthi__vxworks.ads, libgnat/a-stzunb.adb,
269 libgnat/a-strunb.adb, libgnarl/s-osinte__lynxos178.adb,
270 libgnarl/s-intman__vxworks.adb, libgnarl/s-osinte__darwin.adb,
271 libgnarl/a-exetim__darwin.adb: Removed ineffective use-clauses.
273 2017-09-25 Vasiliy Fofanov <fofanov@adacore.com>
275 * adaint.c (win32_wait): Properly handle error and take into account
276 the WIN32 limitation on the number of simultaneous wait objects.
278 2017-09-25 Yannick Moy <moy@adacore.com>
280 * sem_ch3.adb (Constant_Redeclaration): Do not insert a call to the
281 invariant procedure in GNATprove mode.
282 * sem_ch5.adb (Analyze_Assignment): Likewise.
284 2017-09-25 Piotr Trojanek <trojanek@adacore.com>
286 * adabkend.adb (Call_Back_End): Fix wording of "front-end" and
287 "back-end" in comments.
289 2017-09-25 Ed Schonberg <schonberg@adacore.com>
291 * exp_ch6.adb (Expand_Call_Helper): The extra accessibility check in a
292 call that appears in a classwide precondition and that mentions an
293 access formal of the subprogram, must use the accessibility level of
294 the actual in the call. This is one case in which a reference to a
295 formal parameter appears outside of the body of the subprogram.
297 2017-09-25 Hristian Kirtchev <kirtchev@adacore.com>
299 * sem_res.adb (Replace_Actual_Discriminants): Replace a discriminant
301 (Resolve_Entry): Clean up predicate
303 2017-09-25 Hristian Kirtchev <kirtchev@adacore.com>
305 * sem_prag.adb (Analyze_Constituent): Raise Unrecoverable_Error rather
306 than Program_Error because U_E is more in line with respect to the
309 2017-09-25 Ed Schonberg <schonberg@adacore.com>
311 * sem_ch13.adb (Resolve_Aspect_Expressions): The expression for aspect
312 Storage_Size does not freeze, and thus can include references to
315 2017-09-25 Hristian Kirtchev <kirtchev@adacore.com>
317 * exp_spark.adb (Expand_SPARK_Potential_Renaming): Do not process a
318 reference when it appears within a pragma of no significance to SPARK.
319 (In_Insignificant_Pragma): New routine.
320 * sem_prag.ads: Add new table Pragma_Significant_In_SPARK.
322 2017-09-25 Ed Schonberg <schonberg@adacore.com>
324 * sem_ch12.adb (Analyze_Associations, case N_Formal_Package): If the
325 actual is a renaming, indicate that it is the renamed package that must
326 be frozen before the instantiation.
328 2017-09-25 Yannick Moy <moy@adacore.com>
330 * doc/gnat_ugn/gnat_and_program_execution.rst: Fix typo in description
331 of dimensionality system in GNAT UG.
332 * gnat_ugn.texi: Regenerate.
334 2017-09-25 Yannick Moy <moy@adacore.com>
336 * gnat1drv.adb: Call Check_Safe_Pointers from the frontend in
337 GNATprove_Mode when switch -gnatdF used.
339 2017-09-25 Piotr Trojanek <trojanek@adacore.com>
341 * adabkend.adb (Call_Back_End): Reset Current_Error_Node when starting
344 2017-09-25 Javier Miranda <miranda@adacore.com>
346 * exp_imgv.adb (Expand_Image_Attribute): Disable the optimized
347 expansion of user-defined enumeration types when the generation of
348 names for enumeration literals is suppressed.
350 2017-09-25 Gary Dismukes <dismukes@adacore.com>
352 * libgnarl/s-taprop__linux.adb: Minor reformatting.
354 2017-09-25 Ed Schonberg <schonberg@adacore.com>
356 * sem_ch13.adb (Resolve_Aspect_Expressions): Do not resolve identifiers
357 that appear as selector names of parameter associations, as these are
358 never resolved by visibility.
360 2017-09-25 Justin Squirek <squirek@adacore.com>
362 * sem_res.adb (Resolve_Entry): Generate reference for index entities.
364 2017-09-25 Doug Rupp <rupp@adacore.com>
366 * libgnarl/s-taprop__linux.adb (Compute_Base_Monotonic_Clock): Refine.
368 2017-09-25 Javier Miranda <miranda@adacore.com>
370 * exp_imgv.adb (Is_User_Defined_Enumeration_Type): New subprogram.
371 (Expand_User_Defined_Enumeration_Image): New subprogram.
372 (Expand_Image_Attribute): Enable speed-optimized expansion of
373 user-defined enumeration types when we are compiling with optimizations
376 2017-09-25 Piotr Trojanek <trojanek@adacore.com>
378 * sem_util.adb (Has_Null_Abstract_State): Remove, as an exactly same
379 routine is already provided by Einfo.
380 * einfo.adb (Has_Null_Abstract_State): Replace with the body from
381 Sem_Util, which had better comments and avoided double calls to
384 2017-09-25 Bob Duff <duff@adacore.com>
386 * exp_ch3.adb: Rename Comp_Type_Simple to be Comp_Simple_Init.
388 2017-09-25 Doug Rupp <rupp@adacore.com>
390 * libgnarl/s-taprop__linux.adb (Base_Monotonic_Clock): New variable.
391 (Compute_Base_Monotonic_Clock): New function.
392 (Timed_Sleep): Adjust to use Base_Monotonic_Clock.
393 (Timed_Delay): Likewise.
394 (Monotonic_Clock): Likewise.
395 * s-oscons-tmplt.c (CLOCK_MONOTONIC): Use on Linux.
397 2017-09-25 Ed Schonberg <schonberg@adacore.com>
399 * sem_ch12.adb (Save_References_In_Aggregate): Small correction to
402 2017-09-25 Hristian Kirtchev <kirtchev@adacore.com>
404 * exp_ch5.adb, sem_ch4.adb, sem_ch13.adb, sem_attr.adb, exp_ch3.adb:
407 2017-09-20 Alexandre Oliva <aoliva@redhat.com>
409 * gcc-interface/lang.opt (gant, gnatO, gnat): Add RejectNegative.
411 2017-09-18 Bob Duff <duff@adacore.com>
413 * sem_ch4.adb (Complete_Object_Operation): Do not insert 'Access for
414 reference types in the access-to-access case.
416 2017-09-18 Eric Botcazou <ebotcazou@adacore.com>
418 * sem_attr.adb (Analyze_Access_Attribute): Move check for the presence
419 of the "aliased" keyword on the prefix from here to...
420 (Resolve_Attribute) <Attribute_Access>: ...here. Remove useless call
421 to Check_No_Implicit_Aliasing.
422 * sinfo.ads (Non_Aliased_Prefix): Delete.
423 (Set_Non_Aliased_Prefix): Likewise.
424 * sinfo.adb (Non_Aliased_Prefix): Delete.
425 (Set_Non_Aliased_Prefix): Likewise.
427 2017-09-18 Bob Duff <duff@adacore.com>
429 * exp_ch5.adb (Build_Formal_Container_Iteration,
430 Expand_Formal_Container_Element_Loop): Convert the container to the
431 root type before passing it to the iteration operations, so it will be
434 2017-09-18 Bob Duff <duff@adacore.com>
436 * einfo.ads, validsw.ads, treepr.ads, sem_util.ads: Comment fixes.
438 2017-09-18 Bob Duff <duff@adacore.com>
440 * exp_ch3.adb (Build_Array_Init_Proc): If validity checking is enabled,
441 and it's a bit-packed array, pass False to the Consider_IS parameter of
442 Needs_Simple_Initialization.
444 2017-09-18 Hristian Kirtchev <kirtchev@adacore.com>
446 * sem_ch6.adb (Check_Inline_Pragma): Link the newly generated spec to
447 the preexisting body.
448 * sem_prag.adb (Check_Inline_Always_Placement): New routine.
449 (Process_Inline): Verify the placement of pragma Inline_Always. The
450 pragma must now appear on the initial declaration of the related
453 2017-09-18 Ed Schonberg <schonberg@adacore.com>
455 * sem_ch3.adb (Analyze_Declarations): In ASIS mode, At the end of the
456 declarative list in a subprogram body, analyze aspext specifications to
457 provide basic semantic information, because otherwise the aspect
458 specifications might only be snalyzed during expansion, when related
459 subprograms are generated.
461 2017-09-18 Bob Duff <duff@adacore.com>
463 * exp_ch9.adb (Is_Simple_Barrier_Name): Follow Original_Node, in case
464 validity checks have rewritten the tree.
466 2017-09-18 Bob Duff <duff@adacore.com>
468 * sem_util.adb: Comment fixes, and remove redundant Is_Itype check.
470 2017-09-18 Ed Schonberg <schonberg@adacore.com>
472 * sem_ch12.adb (Save_References_In_Aggregate): When constructing a
473 qualified exxpression for an aggregate in a generic unit, verify that
474 the scope of the type is itself visible and not hidden, so that the
475 qualified expression is correctly resolved in any instance.
477 2017-09-18 Bob Duff <duff@adacore.com>
479 * sem_ch4.adb (Analyze_Qualified_Expression): Give an error if the type
480 mark refers to the current instance. Set the type to Any_Type in that
481 case, to avoid later crashes.
483 2017-09-18 Ed Schonberg <schonberg@adacore.com>
485 * exp_ch3.adb (Replace_Discriminant_References): New procedure,
486 subsidiary of Build_Assignment, used to handle the initialization code
487 for a mutable record component whose default value is an aggregate that
488 sets the values of the discriminants of the components.
490 2017-09-18 Eric Botcazou <ebotcazou@adacore.com>
492 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Address>: Mark
493 the entity as being volatile for an overlay that toggles the scalar
496 2017-09-18 Fedor Rybin <frybin@adacore.com>
498 * doc/gnat_ugn/gnat_utility_programs.rst: Document that gnattest
499 options -U main and --harness-only are not compatible.
501 2017-09-18 Hristian Kirtchev <kirtchev@adacore.com>
503 * freeze.adb, sem_ch6.adb, sem_res.adb: Minor reformatting.
505 2017-09-18 Piotr Trojanek <trojanek@adacore.com>
507 * einfo.ads (Is_Imported): Update comment, as this
508 routine also applies to constants.
510 2017-09-18 Yannick Moy <moy@adacore.com>
512 * sem_util.adb (Find_Placement_In_State_Space): Allow generic package
515 2017-09-18 Justin Squirek <squirek@adacore.com>
517 * sem_prag.adb (Is_Non_Significant_Pragma_Reference): Change the
518 constant indication for Pragma_Linker_Section.
520 2017-09-18 Bob Duff <duff@adacore.com>
522 Alternate fix for PR ada/71358
523 * libgnat/g-comlin.adb (Getopt): Remove manual null access checks.
524 Instead, make a local copy of Config, and if it's null, allocate an
525 empty Command_Line_Configuration_Record, so we won't crash on null
528 2017-09-16 Eric Botcazou <ebotcazou@adacore.com>
530 * libgnarl/a-intnam__rtems.ads: Update copyright date.
531 * libgnarl/s-interr__hwint.adb: Likewise.
532 * libgnarl/s-osinte__kfreebsd-gnu.ads: Likewise.
533 * libgnarl/s-osinte__rtems.adb: Likewise.
534 * libgnarl/s-osinte__rtems.ads: Likewise.
536 2017-09-13 Nicolas Roche <roche@adacore.com>
538 * Make-lang.in: In the fallback mechanim, parse the associated .ali
539 file and try to guess the locations of dependencies.
541 2017-09-13 Eric Botcazou <ebotcazou@adacore.com>
543 * sem_ch13.adb (Register_Address_Clause_Check): New procedure to save
544 the suppression status of Alignment_Check on the current scope.
545 (Alignment_Checks_Suppressed): New function to use the saved instead of
546 the current suppression status of Alignment_Check.
547 (Address_Clause_Check_Record): Add Alignment_Checks_Suppressed field.
548 (Analyze_Attribute_Definition_Clause): Instead of manually appending to
549 the table, call Register_Address_Clause_Check.
550 (Validate_Address_Clauses): Call Alignment_Checks_Suppressed on the
551 recorded address clause instead of its entity.
553 2017-09-13 Jerome Guitton <guitton@adacore.com>
555 * libgnarl/s-tpopsp__vxworks-tls.adb,
556 libgnarl/s-tpopsp__vxworks-rtp.adb, libgnarl/s-tpopsp__vxworks.adb
557 (Self): Register thread if task id is null.
559 2017-09-13 Arnaud Charlet <charlet@adacore.com>
561 * libgnat/s-htable.adb, libgnat/s-htable.ads: Minor style tuning.
563 2017-09-13 Arnaud Charlet <charlet@adacore.com>
565 * lib-xref-spark_specific.adb (Scopes): simplify hash map; now it maps
566 from an entity to only scope index, as a mapping from an entity to the
567 same entity was useless.
568 (Get_Scope_Num): refactor as a simple renaming; rename parameter from N
570 (Set_Scope_Num): refactor as a simple renaming; rename parameter from N
572 (Is_Constant_Object_Without_Variable_Input): remove local "Result"
573 variable, just use return statements.
575 2017-09-13 Arnaud Charlet <charlet@adacore.com>
577 * libgnarl/s-vxwext__kernel-smp.adb,
578 libgnarl/s-tpopsp__vxworks-rtp.adb, libgnarl/s-vxwext__noints.adb:
581 2017-09-13 Hristian Kirtchev <kirtchev@adacore.com>
583 * einfo.adb: Flag42 is now Is_Controlled_Active.
584 (Is_Controlled): This attribute is now synthesized.
585 (Is_Controlled_Active): This attribute is now an explicit flag rather
586 than a synthesized attribute. (Set_Is_Controlled): Removed.
587 (Set_Is_Controlled_Active): New routine.
588 (Write_Entity_Flags): Update the output for Flag42.
589 * einfo.ads: Update the documentation of the following attributes:
590 Disable_Controlled, Is_Controlled, Is_Controlled_Active, Is_Controlled
591 and Is_Controlled_Active have swapped their functionality.
592 (Is_Controlled): Renamed to Is_Controlled_Active.
593 (Is_Controlled_Active): Renamed to Is_Controlled.
594 (Set_Is_Controlled): Renamed to Set_Is_Controlled_Active.
595 * exp_ch3.adb (Expand_Freeze_Record_Type): Restore the original use of
597 * exp_util.adb (Has_Some_Controlled_Component): Code clean up.
598 (Needs_Finalization): Code clean up. Remove the tests for
599 Disable_Controlled because a) they were incorrect as they would reject
600 a type which is sublect to the aspect, but may contain controlled
601 components, and b) they are no longer necessary.
602 * exp_util.ads (Needs_Finalization): Update comment on documentation.
603 * freeze.adb (Freeze_Array_Type): Restore the original use of
605 (Freeze_Record_Type): Restore the original use of Is_Controlled.
606 * sem_ch3.adb (Analyze_Object_Declaration): Restore the original use of
608 (Array_Type_Declaration): Restore the original use of Is_Controlled.
609 (Build_Derived_Private_Type): Restore the original use of
611 (Build_Derived_Record_Type): Set the Is_Controlled_Active flag of a
612 type derived from Ada.Finalization.[Limited_]Controlled.
613 (Build_Derived_Type): Restore the original use of Is_Controlled.
614 (Record_Type_Definition): Restore the original use of Is_Controlled.
615 * sem_ch7.adb (Preserve_Full_Attributes): Restore the original use of
617 * sem_ch13.adb (Analyze_Aspect_Disable_Controlled): New routine.
618 (Analyze_Aspect_Specifications): Use routine
619 Analyze_Aspect_Disable_Controlled to process aspect Disable_Controlled.
621 2017-09-13 Vincent Celier <celier@adacore.com>
623 * clean.adb (Gnatclean): Fix error when looking for target
624 of <target>-gnatclean
626 2017-09-13 Javier Miranda <miranda@adacore.com>
627 Ed Schonberg <schonberg@adacore.com>
629 * sem_ch8.adb (Find_Expanded_Name): Complete code that identifies an
630 expanded name that designates the current instance of a child unit in
631 its own body and appears as the prefix of a reference to an entity
632 local to the child unit.
634 2017-09-12 Bob Duff <duff@adacore.com>
636 * sem_warn.adb: Minor comment.
638 2017-09-12 Bob Duff <duff@adacore.com>
640 * libgnat/a-cbdlli.adb, libgnat/a-cbhama.adb,
641 libgnat/a-cbmutr.adb, libgnat/a-cborma.adb: Rename New_Item to
642 be Default_Initialized_Item, and apply pragma Unmodified to it,
643 to suppress the warning.
645 2017-09-12 Eric Botcazou <ebotcazou@adacore.com>
647 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Add early return
650 2017-09-12 Yannick Moy <moy@adacore.com>
652 * gnat1drv.adb (Adjust_Global_Switches): Consider Refined_Global
653 together with Global when ignoring one in CodePeer mode.
655 2017-09-12 Javier Miranda <miranda@adacore.com>
657 * sem_ch3.adb (Analyze_Declarations): In nested
658 package declarations that have a private part enable missing check
659 of the RM rule 13.1.1(11/3): usage names in aspect definitions are
660 resolved at the end of the immediately enclosing declaration list.
662 2017-09-12 Bob Duff <duff@adacore.com>
664 * sem_ch6.adb (Analyze_Expression_Function): Initialize Def_Id to
667 2017-09-12 Georges-Axel Jaloyan <jaloyan@adacore.com>
669 * debug.adb: Reserving flag -gnatdF for safe pointer checking.
670 * gnat1drv.adb (gnat1drv): Adding the call to the analysis on
672 * sem_spark.adb, sem_spark.ads: Implementation of the analysis,
673 in preparation for the evolution of the SPARK language that
674 includes a pointer analysis for checking non-aliasing of access
675 types. The Check_Safe_Pointers function is the entry point, and
676 will traverse the AST and raise compile-time errors everytime
677 it detects non-begign aliasing. Detailed comments are present
678 in the sem_spark.ads file.
679 * sem_util.adb, sem_util.ads (First_Global, Next_Global): New
680 functions to iterate over the list of globals of a subprogram.
681 * libgnat/system.ads: Add restriction No_Finalization.
682 * gcc-interface/Make-lang.in: Add new file sem_spark.adb and
683 dependency on g-dynhta.adb.
685 2017-09-12 Bob Duff <duff@adacore.com>
687 * sem_ch6.adb (Analyze_Expression_Function): Call
688 Check_Dynamically_Tagged_Expression.
689 * sem_util.adb (Check_Dynamically_Tagged_Expression): Remove
690 "and then Is_Tagged_Type (Typ)" because there is an earlier
691 "Assert (Is_Tagged_Type (Typ))".
693 2017-09-12 Eric Botcazou <ebotcazou@adacore.com>
695 * gcc-interface/Makefile.in (SPARC/Solaris): Remove obsolete stuff.
697 2017-09-11 Arnaud Charlet <charlet@adacore.com>
699 * doc/gnat_ugn/the_gnat_compilation_model.rst: Fix sphinx warning.
700 * doc/gnat_ugn/platform_specific_information.rst: Remove doc
701 for no longer supported platforms.
702 * doc/gnat_ugn/gnat_and_program_execution.rst: Added detailed
703 description of the semantics for dimensionality analysis.
704 * gnat_ugn.texi: Regenerated.
706 2017-09-11 Eric Botcazou <ebotcazou@adacore.com>
708 * freeze.adb (Has_Incomplete_Compoent): Delete.
710 Do not inhibit the freezing of the profile of an expression
712 (Freeze_Subprogram): Do not re-create extra formals.
713 * sem_ch6.adb (Analyze_Expression_Function): Always
714 pre-analyze the expression if the function is not a completion.
715 (Analyze_Subprogram_Body_Helper): For the body generated
716 from an expression function that is not a completion, do
717 not freeze the profile and temporary mask the types declared
718 outside the expression that are not yet frozen.
719 * sem_res.adb (Rewrite_Renamed_Operator): Also bail out if invoked
720 during the pre-analysis of an expression function.
722 2017-09-11 Eric Botcazou <ebotcazou@adacore.com>
724 * gcc-interface/gigi.h (enum standard_datatypes): Minor tweak.
727 2017-09-11 Yannick Moy <moy@adacore.com>
729 * lib-xref-spark_specific.adb: Minor rewrite.
731 2017-09-11 Jerome Lambourg <lambourg@adacore.com>
733 * libgnat: Rename ?-[a-z]*-* into ?-[a-z]*__*
734 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Take this
735 renaming into account.
737 2017-09-11 Jerome Lambourg <lambourg@adacore.com>
739 * libgnarl: Rename ?-[a-z]*-* into ?-[a-z]*__*
740 * gcc-interface/Makefile.in: Take this renaming into account.
742 2017-09-11 Arnaud Charlet <charlet@adacore.com>
744 * s-auxdec-empty.ads, s-auxdec-empty.adb, 9drpc.adb: Removed, no
747 2017-09-11 Yannick Moy <moy@adacore.com>
749 * sem_util.adb (Check_Result_And_Post_State):
750 Do not issue a warning about missing reference to an outcome if
751 the subprogram is ghost and has no outputs.
752 * lib-xref-spark_specific.adb, sem_aggr.adb, sem_aux.ads: Minor
755 2017-09-11 Yannick Moy <moy@adacore.com>
757 * gnat1drv.adb (Adjust_Global_Switches): Set
758 Check_Validity_Of_Parameters to False in GNATprove mode.
759 * opt.ads (Check_Validity_Of_Parameters): Document switch to
762 2017-09-09 Pierre-Marie de Rodat <derodat@adacore.com>
764 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Don't
765 generate debug info for inner record types if -fgnat-encodings=minimal.
766 (gnat_to_gnu_entity) <E_Record_Subtype>: Use the ultimate base record
767 type as the debug type.
769 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
771 * gcc-interface/decl.c (components_to_record): Do not reorder in non-
772 packed record types if pragma Optimize_Alignment (Space) is enabled.
774 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
776 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Disregard inlining
777 limits for expression functions.
778 (gnat_to_gnu) <N_Object_Declaration>: Fix formatting.
780 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
782 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Copy the
783 layout of the record from the parent type only if both are or are not
785 (is_stored_discriminant): Return false for an unchecked union.
787 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
789 * gcc-interface/utils2.c (build_allocator): In type_annotate_only mode
792 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
794 * gcc-interface/decl.c (promote_object_alignment): New function taken
796 (gnat_to_gnu_entity) <E_Variable>: ...here. Invoke it.
797 (gnat_to_gnu_field): If the field is Atomic or VFA, invoke it and
798 create a padding type on success before doing the atomic check.
800 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
802 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Apply the
803 promotion to static memory earlier in the processing.
805 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
807 * gcc-interface/decl.c (gnat_to_gnu_entity): Only set the TYPE_ALIGN_OK
808 and TYPE_BY_REFERENCE_P flags on types after various promotions.
809 * gcc-interface/trans.c (node_has_volatile_full_access) <N_Identifier>:
810 Consider all kinds of entities.
812 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
814 * gcc-interface/utils.c (convert): When converting to a padding type,
815 reuse an existing CONSTRUCTOR if it has got the right size.
817 2017-09-08 Nicolas Roche <roche@adacore.com>
819 * gcc-interface/Make-lang.in, gcc-interface/Makefile.in: Find runtime
821 * a-lfztio.ads, g-timsta.ads, g-sercom-linux.adb, s-osprim-solaris.adb,
822 a-inteio.ads, s-stchop-rtems.adb, s-casuti.adb, s-pack39.adb,
823 i-vxwork-x86.ads, a-strbou.adb, a-stzmap.adb, s-assert.adb,
824 a-sfecin.ads, a-cohama.adb, s-casuti.ads, a-suenco.adb, s-pack39.ads,
825 a-stzmap.ads, a-strbou.ads, s-stalib.adb, s-trasym.adb, g-comver.adb,
826 s-assert.ads, s-vector.ads, g-cgi.adb, a-cohama.ads, s-wchcnv.adb,
827 a-titest.adb, s-pack48.adb, a-suenco.ads, a-strunb.adb, s-stalib.ads,
828 s-trasym.ads, a-nudira.adb, g-comver.ads, a-nuflra.adb, g-cgi.ads,
829 a-chacon.adb, s-wchcnv.ads, a-excach.adb, s-pack48.ads, a-titest.ads,
830 a-strunb.ads, s-dwalin.adb, a-nudira.ads, a-chtgbo.adb, s-resfil.adb,
831 a-scteio.ads, a-nuflra.ads, g-soliop-mingw.ads, s-pack57.adb,
832 a-chacon.ads, s-bytswa.ads, s-pooloc.adb, g-os_lib.adb, s-dwalin.ads,
833 a-szuzha.adb, s-resfil.ads, a-chtgbo.ads, s-spsufi.adb, s-pack57.ads,
834 s-pooloc.ads, g-os_lib.ads, a-stfiha.ads, a-lcteio.ads, a-wtcoau.adb,
835 a-szuzha.ads, s-mmosin-unix.adb, a-stmaco.ads, s-spsufi.ads,
836 s-stchop-limit.ads, a-wtcoau.ads, a-exctra.adb, s-mmosin-unix.ads,
837 s-sequio.adb, s-conca2.adb, g-table.adb, s-imglli.adb,
838 a-numaux-x86.adb, a-strsea.adb, s-wchstw.adb, a-clrefi.adb,
839 a-wwboio.adb, a-exctra.ads, s-sequio.ads, s-conca2.ads, a-wwunio.ads,
840 system-linux-hppa.ads, g-table.ads, s-dimkio.ads, s-imglli.ads,
841 a-cofove.adb, a-numaux-x86.ads, s-wchstw.ads, a-strsea.ads,
842 a-clrefi.ads, a-wwboio.ads, s-stratt-xdr.adb, s-crc32.adb,
843 s-excmac-arm.adb, g-busora.adb, a-cofove.ads, s-osprim-unix.adb,
844 g-io.adb, s-pack49.adb, s-crc32.ads, s-excmac-arm.ads, a-fzteio.ads,
845 g-busora.ads, s-stausa.adb, system-linux-mips.ads, sequenio.ads,
846 g-exctra.adb, g-rewdat.adb, a-cgaaso.adb, g-io.ads, s-pack49.ads,
847 a-wtflau.adb, a-undesu.adb, s-stausa.ads, a-ztenau.adb, g-enutst.ads,
848 calendar.ads, s-pack58.adb, g-rewdat.ads, g-exctra.ads, s-ststop.adb,
849 a-cgaaso.ads, a-strfix.adb, a-comlin.adb, a-strunb-shared.adb,
850 a-wtflau.ads, a-undesu.ads, a-cbhase.adb, a-ztenau.ads, s-os_lib.adb,
851 a-coorse.adb, a-chlat1.ads, s-pack58.ads, s-ststop.ads, a-strfix.ads,
852 a-comlin.ads, a-strunb-shared.ads, a-nscefu.ads, s-valboo.adb,
853 directio.ads, a-chtgke.adb, a-cbhase.ads, a-wtinau.adb,
854 system-linux-alpha.ads, s-os_lib.ads, a-coorse.ads,
855 system-linux-s390.ads, s-imgwiu.adb, a-chtgop.adb, s-valboo.ads,
856 a-chtgke.ads, a-tienio.adb, s-conca3.adb, a-wtinau.ads,
857 system-darwin-ppc.ads, i-c.adb, s-expllu.adb, g-expect.adb,
858 g-sha256.ads, s-vallld.adb, s-imgwiu.ads, a-chtgop.ads, a-strmap.adb,
859 a-tienio.ads, s-conca3.ads, s-imgint.adb, i-c.ads, s-expllu.ads,
860 s-osprim-darwin.adb, a-cogeso.adb, g-expect.ads, a-iwteio.ads,
861 s-vallld.ads, a-coinho-shared.adb, g-shsh64.adb, a-strmap.ads,
862 g-comlin.adb, a-excpol.adb, s-imgint.ads, a-ztdeau.adb, a-cogeso.ads,
863 a-coinho-shared.ads, g-shsh64.ads, g-comlin.ads, a-stzsup.adb,
864 a-rbtgbk.adb, a-wtmoau.adb, a-ztdeau.ads, s-exnlli.adb, g-tty.adb,
865 g-heasor.adb, g-socthi-dummy.adb, s-llflex.ads, a-zchara.ads,
866 a-stzsup.ads, a-ztcstr.adb, a-rbtgbk.ads, a-sfwtio.ads, a-wtmoau.ads,
867 a-sulcin.adb, s-exnlli.ads, system-freebsd.ads, a-stunha.adb,
868 a-charac.ads, g-tty.ads, g-heasor.ads, s-exctra.adb,
869 g-socthi-dummy.ads, a-coboho.adb, a-ztcstr.ads, a-tideio.adb,
870 a-sulcin.ads, a-wrstfi.adb, g-alleve.adb, s-pack59.adb, a-ngrear.adb,
871 a-stboha.adb, a-stunau-shared.adb, a-stunha.ads, a-lfwtio.ads,
872 s-fileio.adb, s-exctra.ads, a-coboho.ads, a-ioexce.ads, a-tideio.ads,
873 a-ngrear.ads, a-wrstfi.ads, s-pack59.ads, g-alleve.ads, a-stboha.ads,
874 s-poosiz.adb, g-traceb.adb, g-rannum.adb, machcode.ads, s-purexc.ads,
875 s-fileio.ads, a-cfinve.adb, a-crbtgk.adb, system-solaris-x86.ads,
876 s-poosiz.ads, g-rannum.ads, g-traceb.ads, a-except.adb, s-conca4.adb,
877 a-stream.adb, a-cfinve.ads, a-crbtgk.ads, s-wchwts.adb,
878 system-mingw.ads, a-except.ads, s-conca4.ads, a-chzla9.ads,
879 s-valenu.adb, s-soflin.adb, a-stream.ads, a-cgarso.adb, s-valllu.adb,
880 g-crc32.adb, s-wchwts.ads, s-fatflt.ads, s-imguns.adb, s-strcom.adb,
881 g-decstr.adb, s-valenu.ads, s-soflin.ads, a-cgarso.ads, a-cwila1.ads,
882 s-valllu.ads, g-crc32.ads, s-imguns.ads, g-spipat.adb, s-valwch.adb,
883 s-strcom.ads, g-decstr.ads, text_io.ads, g-debuti.adb, s-stchop.adb,
884 g-spipat.ads, s-valwch.ads, a-string.ads, s-exnint.adb, g-awk.adb,
885 g-tasloc.adb, s-wwdenu.adb, s-boustr.adb, a-zchuni.adb, s-stchop.ads,
886 g-debuti.ads, s-stopoo.adb, system-dragonfly-x86_64.ads,
887 system-linux-x86.ads, s-exnint.ads, g-awk.ads, a-stzhas.adb,
888 g-tasloc.ads, s-wwdenu.ads, g-debpoo.adb, g-except.ads,
889 g-sse.ads, s-boustr.ads, a-zchuni.ads, s-bitops.adb, s-wwdwch.adb,
890 s-stopoo.ads, a-catizo.adb, a-stzhas.ads, a-nlcefu.ads, g-debpoo.ads,
891 i-vxwoio.adb, s-bitops.ads, g-io-put-vxworks.adb, s-wwdwch.ads,
892 g-sehamd.adb, a-ssicst.adb, a-catizo.ads, s-mmap.adb, g-string.adb,
893 s-traceb.adb, a-swunau.adb, s-rannum.adb, a-ticoau.adb, i-vxwoio.ads,
894 g-sehamd.ads, a-stwiun.adb, a-ssicst.ads, s-conca5.adb, a-ssitio.ads,
895 s-mmap.ads, a-zttest.adb, g-string.ads, g-sercom.adb, a-cdlili.adb,
896 a-swunau.ads, s-traceb.ads, s-rannum.ads, a-ticoau.ads, system-aix.ads,
897 a-cforma.adb, a-stwiun.ads, s-conca5.ads, s-carsi8.adb, a-zttest.ads,
898 g-sercom.ads, a-cdlili.ads, a-cihama.adb, g-sptain.ads, a-cforma.ads,
899 s-maccod.ads, s-carsi8.ads, a-strsup.adb, g-sha1.adb, a-cihama.ads,
900 g-stseme.adb, s-traent.adb, s-valcha.adb, g-curexc.ads, a-strsup.ads,
901 g-sha1.ads, a-sflcin.ads, s-traent.ads, s-pack10.adb, s-valcha.ads,
902 a-coteio.ads, s-tasloc.adb, g-utf_32.adb, a-suteio.adb, s-except.adb,
903 a-direct.adb, g-stsifd-sockets.adb, a-numaux-vxworks.ads, s-winext.ads,
904 s-pack10.ads, a-ztexio.adb, a-tiflau.adb, system-vxworks-arm.ads,
905 s-tasloc.ads, a-suteio.ads, g-utf_32.ads, s-except.ads,
906 a-direct.ads, a-swbwha.adb, g-hesorg.adb, s-wwdcha.adb, a-wtedit.adb,
907 a-ztexio.ads, a-wtcoio.adb, a-tiflau.ads, a-ssizti.ads, s-casi32.adb,
908 a-swbwha.ads, s-veboop.adb, g-hesorg.ads, s-parame-rtems.adb,
909 s-wwdcha.ads, a-wtedit.ads, a-stuten.adb, a-coinve.adb, a-wtcoio.ads,
910 s-casi32.ads, s-string.adb, a-tiinau.adb, a-cusyqu.adb, s-conca6.adb,
911 s-veboop.ads, a-cgcaso.adb, a-numaux-darwin.adb, a-envvar.adb,
912 a-stuten.ads, s-secsta.adb, a-coinve.ads, s-string.ads, a-cusyqu.ads,
913 a-tiinau.ads, s-osprim-vxworks.adb, s-conca6.ads, g-spchge.adb,
914 s-parint.adb, a-cuprqu.adb, a-cgcaso.ads, a-numaux-darwin.ads,
915 a-envvar.ads, s-secsta.ads, g-spchge.ads, s-parint.ads, a-cuprqu.ads,
916 a-swuwti.adb, a-flteio.ads, a-sbhcin.adb, a-coprnu.adb, g-u3spch.adb,
917 s-atocou.adb, g-ctrl_c.adb, a-swuwti.ads, a-calend.adb, a-sbhcin.ads,
918 a-coprnu.ads, g-dirope.adb, g-sha512.ads, g-u3spch.ads, s-atocou.ads,
919 g-ctrl_c.ads, a-timoau.adb, a-witeio.adb, s-pack11.adb, a-strhas.adb,
920 a-wtflio.adb, g-spitbo.adb, a-calend.ads, a-ztenio.adb, g-dirope.ads,
921 a-slcain.adb, g-sechas.adb, a-timoau.ads, a-witeio.ads, s-pack11.ads,
922 s-shasto.adb, s-traceb-mastop.adb, a-ciorse.adb, s-utf_32.adb,
923 a-strhas.ads, a-wtflio.ads, g-spitbo.ads, a-ztenio.ads, a-slcain.ads,
924 g-sechas.ads, s-gearop.adb, a-siztio.ads, s-pack20.adb, s-shasto.ads,
925 a-ciorse.ads, s-utf_32.ads, s-crtl.ads, a-wtinio.adb, s-elaall.adb,
926 s-explli.adb, s-chepoo.ads, s-gearop.ads, a-einuoc.adb, s-pack20.ads,
927 system-linux-ia64.ads, a-swunau-shared.adb, a-wtinio.ads, g-alvety.ads,
928 a-liztio.ads, g-calend.adb, s-conca7.adb, s-elaall.ads, s-explli.ads,
929 a-einuoc.ads, s-widboo.adb, s-imgdec.adb, a-cbhama.adb, g-calend.ads,
930 s-conca7.ads, a-llitio.ads, i-cexten.ads, a-coorma.adb, s-widboo.ads,
931 s-diflio.adb, g-souinf.ads, s-imgdec.ads, g-strhas.ads, a-cbhama.ads,
932 g-shshco.adb, a-ztdeio.adb, s-gloloc.adb, a-coorma.ads, g-wispch.adb,
933 s-pack03.adb, g-eacodu.adb, s-casi16.adb, s-diflio.ads, a-colien.adb,
934 g-shshco.ads, a-wtmoio.adb, a-rbtgbo.adb, a-ztdeio.ads,
935 system-rtems.ads, s-gloloc.ads, a-csquin.ads, a-cofuse.adb,
936 g-wispch.ads, s-pack03.ads, s-casi16.ads, s-io.adb, a-colien.ads,
937 g-alveop.adb, gnat.ads, s-diinio.adb, a-cfdlli.adb, g-pehage.adb,
938 a-wtmoio.ads, a-stwiha.adb, a-locale.adb, a-tirsfi.adb, a-nscoty.ads,
939 a-rbtgbo.ads, s-pack12.adb, a-cofuse.ads, a-sfteio.ads, s-io.ads,
940 g-alveop.ads, a-cfdlli.ads, s-diinio.ads, a-stwiha.ads, g-pehage.ads,
941 a-locale.ads, a-tirsfi.ads, s-pack12.ads, s-valuti.adb, g-cppexc.adb,
942 system-vxworks-ppc.ads, g-memdum.adb, a-lfteio.ads, s-pack21.adb,
943 s-unstyp.ads, s-valuti.ads, g-cppexc.ads, system-hpux-ia64.ads,
944 g-memdum.ads, g-soccon.ads, g-altive.ads, a-crbtgo.adb, s-pack21.ads,
945 a-llizti.ads, a-numaux-libc-x86.ads, s-expint.adb, s-conca8.adb,
946 a-crbtgo.ads, s-pack30.adb, s-vallli.adb, s-geveop.adb, s-expint.ads,
947 a-direio.adb, s-conca8.ads, a-widcha.ads, s-pack30.ads, s-vallli.ads,
948 s-strhas.adb, s-geveop.ads, g-md5.adb, a-direio.ads, a-numaux.ads,
949 s-ransee.adb, a-szbzha.adb, i-cobol.adb, g-busorg.adb, s-strhas.ads,
950 g-md5.ads, s-widenu.adb, s-ransee.ads, s-widllu.adb, a-szbzha.ads,
951 a-ststio.adb, i-cobol.ads, g-busorg.ads, g-regpat.adb, s-widenu.ads,
952 a-secain.adb, s-widllu.ads, s-pack13.adb, g-encstr.adb, a-ztcoau.adb,
953 a-ststio.ads, s-widwch.adb, g-regpat.ads, s-atacco.adb, a-cborse.adb,
954 a-secain.ads, s-pack13.ads, g-encstr.ads, a-ztcoau.ads, s-widwch.ads,
955 g-io_aux.adb, s-atacco.ads, a-ncelfu.ads, interfac.ads, a-cborse.ads,
956 g-regexp.adb, s-pack22.adb, a-szuzti.adb, g-io_aux.ads, s-caun32.adb,
957 a-nselfu.ads, g-regexp.ads, s-pack22.ads, a-ticoio.adb, a-szuzti.ads,
958 g-diopit.adb, s-caun32.ads, s-conca9.adb, a-tags.adb, a-swmwco.ads,
959 a-sbecin.adb, s-pack31.adb, s-expuns.adb, a-ticoio.ads, s-valint.adb,
960 s-conca9.ads, g-diopit.ads, a-tags.ads, a-nllcef.ads, a-izteio.ads,
961 a-sbecin.ads, s-expuns.ads, s-pack31.ads, g-dyntab.adb, s-powtab.ads,
962 s-flocon-none.adb, s-valint.ads, a-ssiwti.ads, s-mmosin-mingw.adb,
963 s-pack40.adb, s-pack05.adb, a-ztflau.adb, g-dyntab.ads,
964 a-szuzti-shared.adb, g-alvevi.ads, a-stwise.adb, s-mmosin-mingw.ads,
965 s-pack40.ads, a-diocst.adb, a-ztflau.ads, s-pack05.ads, a-nlcoty.ads,
966 a-contai.ads, a-stwisu.adb, g-byorma.adb, a-siwtio.ads, a-stwise.ads,
967 s-regpat.adb, g-mbdira.adb, s-pack14.adb, a-diocst.ads, g-flocon.ads,
968 g-mbflra.adb, a-ztinau.adb, s-dim.ads, s-mantis.adb, a-stwisu.ads,
969 g-byorma.ads, s-atopri.adb, g-wistsp.ads, a-uncdea.ads, s-widcha.adb,
970 a-caldel.adb, s-regpat.ads, g-mbdira.ads, a-tiflio.adb, s-pack14.ads,
971 s-parame.adb, a-liwtio.ads, s-memory.adb, g-mbflra.ads, a-ztinau.ads,
972 a-wtgeau.adb, s-direio.adb, s-mantis.ads, s-atopri.ads, s-widcha.ads,
973 a-caldel.ads, s-pack23.adb, a-unccon.ads, a-tiflio.ads, s-parame.ads,
974 a-llftio.ads, s-memory.ads, s-regexp.adb, a-wtgeau.ads, a-exexda.adb,
975 s-direio.ads, s-pack23.ads, g-stheme.adb, a-tiinio.adb, g-sestin.ads,
976 s-regexp.ads, a-wtfiio.adb, a-comutr.adb, a-exexpr.adb, a-tiinio.ads,
977 a-ztmoau.adb, a-cohata.ads, a-wtfiio.ads, s-imgrea.adb, ada.ads,
978 a-szunau-shared.adb, a-comutr.ads, s-valuns.adb, a-ztmoau.ads,
979 system-linux-arm.ads, s-osprim-x32.adb, s-pack41.adb, s-pack06.adb,
980 s-imgrea.ads, s-valuns.ads, s-finroo.adb, s-caun16.adb, s-pooglo.adb,
981 a-zrstfi.adb, a-suenst.adb, s-pack41.ads, g-binenv.adb, s-pack06.ads,
982 a-calari.adb, a-nlcoar.ads, s-finroo.ads, a-timoio.adb, s-caun16.ads,
983 s-flocon.adb, a-suenst.ads, a-zrstfi.ads, s-pooglo.ads, s-wchcon.adb,
984 s-traceb-hpux.adb, s-pack50.adb, i-fortra.adb, s-pack15.adb,
985 a-ngcefu.adb, g-sptavs.ads, g-binenv.ads, s-wchjis.adb, a-calari.ads,
986 a-timoio.ads, a-decima.adb, s-flocon.ads, s-wchcon.ads, a-llfzti.ads,
987 i-fortra.ads, s-pack50.ads, s-pack15.ads, a-ngcefu.ads, a-cfhase.adb,
988 s-wchjis.ads, g-soliop.ads, a-decima.ads, a-chlat9.ads, s-pack24.adb,
989 a-nlelfu.ads, a-cfhase.ads, g-locfil.adb, s-atocou-builtin.adb,
990 s-memcop.ads, a-szunau.adb, s-pack24.ads, s-imgllb.adb, s-auxdec.adb,
991 g-locfil.ads, s-pack33.adb, a-szunau.ads, s-parame-vxworks.adb,
992 s-imgllb.ads, a-ciorma.adb, s-auxdec.ads, a-cobove.adb, s-dsaser.ads,
993 a-elchha.adb, s-pack33.ads, a-cofuve.adb, s-parame-vxworks.ads,
994 a-ciorma.ads, system-darwin-x86.ads, s-multip.adb, a-stwiun-shared.adb,
995 a-wichun.adb, a-cobove.ads, s-imgbiu.adb, s-tsmona-mingw.adb,
996 a-coormu.adb, a-siocst.adb, s-win32.ads, a-elchha.ads, s-pack42.adb,
997 s-pack07.adb, a-cofuve.ads, system-hpux.ads, a-teioed.adb,
998 a-convec.adb, g-speche.adb, s-multip.ads, a-stwiun-shared.ads,
999 a-wichun.ads, s-imgbiu.ads, a-numeri.ads, a-siocst.ads, a-coormu.ads,
1000 a-lliwti.ads, s-pack42.ads, s-pack07.ads, a-teioed.ads, a-convec.ads,
1001 g-speche.ads, g-socthi.adb, a-nucoty.ads, a-szmzco.ads, s-pack51.adb,
1002 s-osprim-mingw.adb, s-casi64.adb, g-strspl.ads, g-socthi.ads,
1003 g-socket-dummy.adb, s-pack51.ads, s-dimmks.ads, s-casi64.ads,
1004 a-wtenau.adb, s-stchop-vxworks.adb, s-pack60.adb,
1005 system-solaris-sparc.ads, s-pack25.adb, g-socket-dummy.ads,
1006 a-exstat.adb, a-cofuma.adb, s-tsmona-linux.adb, a-wtenau.ads,
1007 s-pack60.ads, s-pack25.ads, i-cstrea.adb, a-cofuma.ads, g-exptty.adb,
1008 a-chzla1.ads, s-pack34.adb, i-cstrea.ads, s-excdeb.adb, a-iteint.ads,
1009 g-exptty.ads, i-pacdec.adb, s-pack34.ads, s-rident.ads, s-sopco3.adb,
1010 i-vxwork.ads, s-excdeb.ads, system-linux-ppc.ads, a-swuwti-shared.adb,
1011 s-widlli.adb, s-pack43.adb, i-pacdec.ads, a-cwila9.ads, s-sopco3.ads,
1012 a-fwteio.ads, s-widlli.ads, s-pack43.ads, a-suhcin.adb, a-wtdeau.adb,
1013 g-allein.ads, a-suezst.adb, a-dirval-mingw.adb, g-zspche.adb,
1014 s-bignum.adb, a-ztedit.adb, g-regist.adb, a-nllefu.ads, a-ztcoio.adb,
1015 s-pack52.adb, a-llctio.ads, a-nucoar.ads, s-pack17.adb, a-suhcin.ads,
1016 a-wtdeau.ads, a-suezst.ads, a-dirval.adb, g-zspche.ads, g-regist.ads,
1017 a-ztedit.ads, s-bignum.ads, a-wtcstr.adb, system.ads, s-pack52.ads,
1018 a-ztcoio.ads, s-pack17.ads, s-imgboo.adb, a-rbtgso.adb, a-dirval.ads,
1019 a-cohase.adb, s-pack61.adb, a-wtcstr.ads, s-pack26.adb, s-osprim.ads,
1020 a-tigeau.adb, s-imgboo.ads, a-nuelfu.ads, a-swfwha.ads, s-commun.adb,
1021 g-socthi-vxworks.adb, a-rbtgso.ads, a-cohase.ads, g-zstspl.ads,
1022 s-pack61.ads, s-pack26.ads, a-intnam-dragonfly.ads, s-imglld.adb,
1023 a-tigeau.ads, s-commun.ads, g-socthi-vxworks.ads, a-cborma.adb,
1024 a-stwifi.adb, g-moreex.adb, s-pack35.adb, s-imglld.ads, s-valdec.adb,
1025 a-tifiio.adb, a-cborma.ads, g-moreex.ads, a-stwifi.ads, s-pack35.ads,
1026 s-sopco4.adb, g-sha224.ads, g-socket.adb, a-intnam-rtems.ads,
1027 s-finmas.adb, s-valdec.ads, s-addima.adb, a-finali.adb, a-tifiio.ads,
1028 s-rpc.adb, a-ztflio.adb, s-pack44.adb, s-pack09.adb, a-sblcin.adb,
1029 s-sopco4.ads, a-textio.adb, g-socket.ads, g-sptabo.ads, s-finmas.ads,
1030 g-shsh32.adb, s-addima.ads, a-finali.ads, s-mmauni-long.ads, s-rpc.ads,
1031 a-ztflio.ads, system-djgpp.ads, s-stache.adb, s-pack44.ads,
1032 s-pack09.ads, a-sblcin.ads, a-textio.ads, a-cidlli.adb, g-shsh32.ads,
1033 a-chtgbk.adb, a-tiocst.adb, s-pack53.adb, s-pack18.adb, s-stache.ads,
1034 a-zchhan.adb, s-fatlfl.ads, a-ztinio.adb, s-strops.adb, a-siteio.ads,
1035 a-cidlli.ads, a-chtgbk.ads, g-ssvety.ads, a-tiocst.ads, s-pack53.ads,
1036 s-parame-hpux.ads, s-pack18.ads, a-zchhan.ads, s-strops.ads,
1037 a-ztinio.ads, a-wichha.adb, a-stwima.adb, a-nlrear.ads, a-liteio.ads,
1038 s-pack62.adb, s-pack27.adb, s-fore.adb, s-vercon.adb, a-wichha.ads,
1039 a-stwima.ads, s-pack62.ads, system-linux-sparc.ads, s-pack27.ads,
1040 g-dynhta.adb, s-fore.ads, s-vercon.ads, a-cofuba.adb, a-cimutr.adb,
1041 i-cpoint.adb, s-imgenu.adb, a-stwibo.adb, s-pack36.adb, i-cstrin.adb,
1042 s-imgllu.adb, a-suteio-shared.adb, g-excact.adb, s-stoele.adb,
1043 s-addope.adb, g-dynhta.ads, a-cofuba.ads, a-ztmoio.adb, a-llfwti.ads,
1044 a-cimutr.ads, i-cpoint.ads, s-imgenu.ads, a-stwibo.ads, a-wttest.adb,
1045 s-pack36.ads, a-tgdico.ads, s-sopco5.adb, s-scaval.adb, i-cstrin.ads,
1046 s-imgllu.ads, g-excact.ads, s-stoele.ads, g-deutst.ads, s-addope.ads,
1047 s-imgwch.adb, g-sha384.ads, a-ztmoio.ads, s-pack45.adb, a-wttest.ads,
1048 s-sopco5.ads, s-excmac-gcc.adb, s-scaval.ads, a-storio.adb,
1049 a-coinho.adb, a-btgbso.adb, s-imgwch.ads, s-carun8.adb, memtrack.adb,
1050 s-pack45.ads, a-sfhcin.ads, s-excmac-gcc.ads, a-storio.ads,
1051 a-coinho.ads, a-btgbso.ads, s-stratt.adb, s-carun8.ads, a-shcain.adb,
1052 s-pack54.adb, s-pack19.adb, a-colire.adb, a-tigeli.adb, s-caun64.adb,
1053 s-stratt.ads, s-fatgen.adb, a-shcain.ads, a-stzunb-shared.adb,
1054 s-pack54.ads, s-pack19.ads, a-colire.ads, a-calcon.adb, s-caun64.ads,
1055 s-fatgen.ads, s-pack63.adb, g-arrspl.adb, a-stzunb-shared.ads,
1056 s-pack28.adb, a-nllrar.ads, a-zzboio.adb, a-zzunio.ads, a-stunau.adb,
1057 a-calcon.ads, g-cgideb.adb, s-objrea.adb, s-mastop.adb, a-tienau.adb,
1058 g-altcon.adb, g-arrspl.ads, s-pack63.ads, s-restri.adb, s-pack28.ads,
1059 a-zzboio.ads, a-stunau.ads, g-cgideb.ads, g-htable.adb, g-sothco.adb,
1060 s-objrea.ads, g-soliop-solaris.ads, s-mastop.ads, a-tienau.ads,
1061 system-linux-m68k.ads, g-altcon.ads, s-dmotpr.ads, s-memory-mingw.adb,
1062 g-cgicoo.adb, s-pack37.adb, s-restri.ads, s-fatllf.ads, s-expmod.adb,
1063 a-swuwha.adb, a-exextr.adb, a-cfhama.adb, s-gloloc-mingw.adb,
1064 a-tiboio.adb, g-forstr.adb, g-sothco.ads, a-stzbou.adb, a-nllcty.ads,
1065 a-suecin.adb, g-htable.ads, s-exctab.adb, a-tiunio.ads, g-cgicoo.ads,
1066 s-osprim-posix.adb, s-pack37.ads, a-ciormu.adb, s-atocou-x86.adb,
1067 a-swuwha.ads, s-expmod.ads, a-cfhama.ads, s-ficobl.ads, a-ngcoty.adb,
1068 g-forstr.ads, a-tiboio.ads, a-calfor.adb, a-stzbou.ads, a-suecin.ads,
1069 a-conhel.adb, a-crbltr.ads, s-exctab.ads, a-dhfina.ads, s-imgcha.adb,
1070 s-pack46.adb, a-ciormu.ads, system-linux-sh4.ads, a-chahan.adb,
1071 a-ngcoty.ads, a-stzunb.adb, a-szfzha.ads, a-calfor.ads, a-cbdlli.adb,
1072 a-conhel.ads, s-imgcha.ads, s-pack46.ads, a-assert.adb, a-chahan.ads,
1073 a-stzunb.ads, a-crdlli.adb, s-pack55.adb, a-cbdlli.ads, a-tideau.adb,
1074 a-assert.ads, ioexcept.ads, s-boarop.ads, g-hesora.adb, a-crdlli.ads,
1075 s-pack55.ads, a-tideau.ads, g-bubsor.adb, a-wtenio.adb, a-cbsyqu.adb,
1076 g-hesora.ads, s-pack29.adb, a-nurear.ads, g-catiio.adb, s-stposu.adb,
1077 g-bubsor.ads, a-wtenio.ads, a-cbsyqu.ads, a-suewst.adb,
1078 system-vxworks-x86.ads, s-pack29.ads, a-cbmutr.adb, a-cbprqu.adb,
1079 s-imenne.adb, g-sothco-dummy.adb, g-casuti.adb, g-catiio.ads,
1080 s-stposu.ads, a-stzsea.adb, s-pack38.adb, a-suewst.ads, s-imgllw.adb,
1081 a-cbprqu.ads, a-cbmutr.ads, s-imenne.ads, g-sothco-dummy.ads,
1082 g-casuti.ads, s-htable.adb, s-fatsfl.ads, g-trasym.adb, unchconv.ads,
1083 a-stzsea.ads, s-arit64.adb, s-pack38.ads, a-nllcar.ads, s-valrea.adb,
1084 s-imgllw.ads, s-htable.ads, a-sequio.adb, g-trasym.ads, a-ngcoar.adb,
1085 s-exnllf.adb, s-pack47.adb, s-arit64.ads, g-sercom-mingw.adb,
1086 s-valrea.ads, g-socthi-mingw.adb, g-bytswa.adb, g-sehash.adb,
1087 unchdeal.ads, a-sequio.ads, a-ngcoar.ads, s-exnllf.ads, a-wtdeio.adb,
1088 s-pack47.ads, g-socthi-mingw.ads, a-excpol-abort.adb, a-ztgeau.adb,
1089 g-bytswa.ads, g-sehash.ads, s-pack56.adb, a-wtdeio.ads, a-ngelfu.adb,
1090 a-ztgeau.ads, a-cforse.adb, s-filatt.ads, a-stzfix.adb, a-cihase.adb,
1091 s-pack56.ads, a-sfztio.ads, a-ngelfu.ads, s-trasym-dwarf.adb,
1092 a-cforse.ads, a-ztfiio.adb, g-timsta.adb, a-stzfix.ads, a-cihase.ads,
1093 a-ztfiio.ads, system-darwin-arm.ads: Move non-tasking runtime sources
1094 to libgnat subdirectory.
1096 2017-09-08 Yannick Moy <moy@adacore.com>
1098 * sem_aux.adb, sem_aux.ads (Get_Called_Entity): New function to
1099 return the entity associated with the call.
1100 * sem_util.adb, sem_util.ads (Check_Function_Writable_Actuals):
1101 Replace the internal Get_Function_Id with the new
1102 Sem_Aux.Get_Called_Entity.
1103 (Iterate_Call_Parameters): New
1104 procedure to iterate on formals and actuals at the same time.
1105 * sem_ch12.adb (Analyze_Subprogram_Instantiation):
1106 Set SPARK_Mode from spec when set, for analysis
1107 of instance. Restore after analysis of instance.
1108 (Instantiate_Subprogram_Body): Set SPARK_Mode from body when
1109 set, for analysis of body instance. Restored automatically at
1110 the end of the subprogram.
1111 * gnat1drv.adb (Adjust_Global_Switches): Set
1112 Check_Validity_Of_Parameters to False in GNATprove mode.
1113 * opt.ads (Check_Validity_Of_Parameters): Document switch to
1116 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
1118 * sem_util.adb (NCT_Tables_In_Use): Move to library level from...
1119 (New_Copy_Tree): ...there. Reset the hash tables only if they
1120 were used in the previous invocation.
1121 * s-htable.adb: Fix typo.
1123 2017-09-08 Bob Duff <duff@adacore.com>
1125 * a-ssicst.adb (Open): Set File.Last_Op to the appropriate value.
1127 2017-09-08 Arnaud Charlet <charlet@adacore.com>
1129 * sem_aggr.adb: minor style fix.
1131 2017-09-08 Bob Duff <duff@adacore.com>
1133 * sprint.adb (Write_Corresponding_Source): Ignore if there is
1134 no current source file.
1135 (Write_Name_With_Col_Check, Write_Name_With_Col_Check_Sloc):
1136 Print something helpful in case N is invalid.
1137 * sprint.ads: Minor comment fix.
1139 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
1141 * exp_aggr.adb: (Aggr_Assignment_OK_For_Backend): Add early return for
1144 2017-09-08 Bob Duff <duff@adacore.com>
1146 * par-prag.adb, sem_prag.adb, snames.ads-tmpl: Implement pragma
1147 Ada_2020, along the same lines as the other Ada version pragmas.
1149 2017-09-08 Gary Dismukes <dismukes@adacore.com>
1151 * sem_ch12.adb: Minor typo fixes and reformatting.
1153 2017-09-08 Yannick Moy <moy@adacore.com>
1155 * sem_aggr.adb (Resolve_Record_Aggregate):
1156 Rewrite bounds of aggregate subexpressions which may depend on
1157 discriminants of the enclosing aggregate.
1159 2017-09-08 Yannick Moy <moy@adacore.com>
1161 * sem_ch5.adb: Prevent assertion failure on illegal code.
1163 2017-09-08 Yannick Moy <moy@adacore.com>
1165 * lib-xref-spark_specific.adb (Add_SPARK_Xrefs.Is_SPARK_Scope): Avoid
1166 calling Renamed_Entity on an entity which cannot be a renaming.
1168 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
1170 * exp_aggr.adb: Add with & use clause for Urealp.
1171 (Aggr_Assignment_OK_For_Backend): Accept (almost all)
1172 elementary types instead of just discrete types.
1173 * sem_eval.adb (Expr_Value): Deal with N_Null for access types.
1174 * gcc-interface/trans.c (gnat_to_gnu) <N_Assignment_Statement>:
1175 Be prepared for the FP zero value in the memset case. Add small
1178 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
1180 * s-htable.adb (Static_HTable.Reset): Use aggregate instead
1183 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
1185 * exp_aggr.adb (Expand_Array_Aggregate): Use New_Copy_Tree instead
1186 of New_Copy because the latter leaves the syntactic structure of
1187 the tree inconsistent (a child is accessible through two parents)
1188 and prevents proper replication of itypes by subsequent calls
1190 * exp_ch4.adb (Expand_Concatenate): Use New_Copy_Tree instead of
1191 New_Copy because the latter leaves the syntactic structure of the
1192 tree inconsistent (a child is accessible through two parents)
1193 and prevents proper replication of itypes by subsequent calls
1195 * sem_util.adb (In_Subtree): New routine.
1196 (New_Copy_Tree): Reimplemented.
1197 * sem_util.ads (In_Subtree): New routine.
1198 (New_Copy_Tree): Reimplemented.
1200 2017-09-08 Ed Schonberg <schonberg@adacore.com>
1202 * sem_ch13.adb (Resolve_Aspect_Expressions): The expression
1203 for aspect Default_Value is a static scalar value, but it does
1204 not freeze the type. Yhis allows for subsequent representation
1205 clauses for the type.
1207 2017-09-08 Javier Miranda <miranda@adacore.com>
1209 * sem_ch8.adb (Find_Direct_Name.Undefined): Do
1210 not add entries into the undefined reference table when we are
1211 compiling with errors ignored.
1213 2017-09-08 Ed Schonberg <schonberg@adacore.com>
1215 * sem_ch12.adb (Check_Formal_Packages): Do not apply conformance
1216 check if the instance is within an enclosing instance body. The
1217 formal package was legal in the enclosing generic, and is
1218 legal in the enclosing instantiation. This optimisation may be
1219 applicable elsewhere, and it also removes spurious errors that
1220 may arise with on-the-fly processing of instantiations that
1221 contain Inline_Always subprograms.
1223 2017-09-08 Vincent Celier <celier@adacore.com>
1225 * gnatcmd.adb: Disregard empty argument of GNAT driver.
1227 2017-09-08 Justin Squirek <squirek@adacore.com>
1229 * checks.adb (Insert_Valid_Check): Manually decorate
1230 the generated temporary for range valdity checks.
1232 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
1234 * usage.adb (Usage): Document new -gnatw.q/-gnatw.Q switches.
1236 2017-09-08 Justin Squirek <squirek@adacore.com>
1238 * switch-c.adb (Scan_Front_End_Switches): Add new warning switch
1239 case to handle underscore flags.
1240 * warnsw.adb, warnsw.ads (Set_Underscore_Warning_Switch): Create
1241 new procedure to handle underscores.
1243 2017-09-08 Javier Miranda <miranda@adacore.com>
1245 * exp_ch4.adb (Expand_N_Op_Divide): Reordering code that handles
1246 divisions with fixed point results to avoid generating twice
1247 the runtime check on divide by zero.
1248 * checks.adb (Apply_Divide_Checks): Ensure that operands are
1249 not evaluated twice (once for their runtime checks and once for
1250 their regular computation).
1252 2017-09-08 Yannick Moy <moy@adacore.com>
1254 * sem_prag.adb (Analyze_Part_Of): Add missing
1255 return statements after issuing errors. Add detection of
1256 out-of-order item and single concurrent type.
1258 2017-09-08 Nicolas Roche <roche@adacore.com>
1260 * gcc-interface/Makefile.in, a-extiti.ads, s-taprop-linux.adb,
1261 s-osinte-solaris.adb, a-intnam.ads, s-osinte-solaris.ads,
1262 s-tpobop.adb, s-intman-android.adb, s-tasinf.adb, s-tpobop.ads,
1263 s-tasinf.ads, i-vxinco.adb, a-exetim-posix.adb, i-vxinco.ads,
1264 a-astaco.adb, a-astaco.ads, s-tporft.adb, s-tpoaal.adb, a-taside.adb,
1265 a-taside.ads, s-tpopsp-posix.adb, s-tasdeb.adb, s-tasdeb.ads,
1266 s-tpoben.adb, a-dinopr.ads, s-inmaop-vxworks.adb, s-tpoben.ads,
1267 s-interr-vxworks.adb, s-interr-dummy.adb, s-tassta.adb,
1268 a-intnam-mingw.ads, s-tassta.ads, s-taasde.adb, a-stcoed.ads,
1269 s-taasde.ads, s-osinte-darwin.adb, s-proinf.adb, s-taprop-dummy.adb,
1270 s-osinte-darwin.ads, s-proinf.ads, s-linux.ads, a-intnam-linux.ads,
1271 s-tasren.adb, s-tasren.ads, s-mudido.adb, g-semaph.adb, s-mudido.ads,
1272 s-taprop-posix.adb, g-semaph.ads, s-osinte-mingw.ads, s-vxwork-x86.ads,
1273 s-tposen.adb, s-linux-sparc.ads, s-taprop-vxworks.adb, s-tasini.adb,
1274 s-tposen.ads, s-tasini.ads, a-etgrbu.ads, s-interr-hwint.adb,
1275 s-osinte-linux.ads, s-taprop.ads, s-tasque.adb, s-tasque.ads,
1276 s-taenca.adb, s-taspri-vxworks.ads, s-taenca.ads, a-dynpri.adb,
1277 s-tpopsp-solaris.adb, a-dynpri.ads, s-taprop-hpux-dce.adb,
1278 a-interr.adb, a-intnam-freebsd.ads, s-tarest.adb, a-interr.ads,
1279 s-intman-susv3.adb, a-synbar.adb, a-intnam-dummy.ads, s-tadeca.adb,
1280 s-osinte-vxworks.adb, s-tarest.ads, s-taskin.adb, a-synbar.ads,
1281 s-taspri-hpux-dce.ads, s-tadeca.ads, s-osinte-vxworks.ads,
1282 s-taskin.ads, s-intman-solaris.adb, a-sytaco.adb, s-vxwext-kernel.adb,
1283 s-mudido-affinity.adb, a-sytaco.ads, s-vxwext-kernel.ads, s-taprob.adb,
1284 s-intman-mingw.adb, s-taprob.ads, s-osinte-kfreebsd-gnu.ads,
1285 s-osinte-dummy.ads, s-osinte-gnu.adb, s-osinte-rtems.adb, s-interr.adb,
1286 s-inmaop.ads, s-vxwext-rtp.adb, s-osinte-gnu.ads, s-osinte-rtems.ads,
1287 a-synbar-posix.adb, s-interr.ads, s-taspri-posix-noaltstack.ads,
1288 s-vxwext-rtp.ads, a-synbar-posix.ads, a-extiin.ads, s-osinte-posix.adb,
1289 s-tpinop.adb, s-tasres.ads, s-tpinop.ads, a-disedf.ads, a-diroro.ads,
1290 s-linux-alpha.ads, a-tasatt.adb, s-solita.adb, a-intnam-solaris.ads,
1291 a-tasatt.ads, s-solita.ads, s-tasinf-solaris.adb, s-tasinf-solaris.ads,
1292 s-vxwork-arm.ads, s-tpopsp-posix-foreign.adb, s-intman-dummy.adb,
1293 s-intman.ads, s-stusta.adb, s-stusta.ads, s-intman-posix.adb,
1294 s-tpopsp-vxworks.adb, s-inmaop-dummy.adb, s-taspri-mingw.ads,
1295 a-intnam-darwin.ads, s-osinte-aix.adb, s-osinte-dragonfly.adb,
1296 s-osinte-aix.ads, s-tasinf-mingw.adb, s-osinte-dragonfly.ads,
1297 s-linux-hppa.ads, s-osinte-x32.adb, s-inmaop-posix.adb,
1298 s-tasinf-mingw.ads, s-intman-vxworks.adb, s-linux-mips.ads,
1299 s-intman-vxworks.ads, s-osinte-android.adb, s-tasinf-linux.adb,
1300 s-osinte-android.ads, s-vxwork-ppc.ads, s-tasinf-linux.ads,
1301 a-dispat.adb, a-dispat.ads, s-tadert.adb, g-thread.adb, s-tadert.ads,
1302 g-thread.ads, a-intnam-hpux.ads, s-linux-android.ads, s-tataat.adb,
1303 a-exetim.ads, s-tataat.ads, a-reatim.adb, a-reatim.ads, thread.c,
1304 g-boubuf.adb, s-osinte-freebsd.adb, g-boubuf.ads, s-osinte-freebsd.ads,
1305 s-tasuti.adb, s-taspri-dummy.ads, a-exetim-mingw.adb, s-linux-x32.ads,
1306 s-tasuti.ads, g-signal.adb, a-exetim-mingw.ads, s-interr-sigaction.adb,
1307 g-signal.ads, s-osinte-hpux.ads, a-intnam-vxworks.ads,
1308 s-osinte-hpux-dce.adb, s-taspri-posix.ads, s-osinte-hpux-dce.ads,
1309 s-tasinf-vxworks.ads, g-tastus.ads, s-tpopsp-tls.adb,
1310 s-taprop-solaris.adb, a-retide.adb, a-exetim-darwin.adb, a-retide.ads,
1311 s-vxwext.adb, s-vxwext.ads, a-rttiev.adb, a-rttiev.ads, g-boumai.ads,
1312 a-exetim-default.ads, s-taprop-mingw.adb, s-taspri-solaris.ads,
1313 a-intnam-aix.ads: Move libgnarl sources to libgnarl subdir.
1315 2017-09-08 Arnaud Charlet <charlet@adacore.com>
1317 * doc/share/conf.py, doc/share/latex_elements.py,
1318 doc/share/ada_pygments.py, doc/Makefile: Improve support for Ada
1321 2017-09-08 Arnaud Charlet <charlet@adacore.com>
1323 * gnat_rm.texi, gnat_ugn.texi,
1324 doc/gnat_ugn/the_gnat_compilation_model.rst,
1325 doc/gnat_ugn/getting_started_with_gnat.rst,
1326 doc/gnat_ugn/inline_assembler.rst,
1327 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
1328 doc/gnat_ugn/elaboration_order_handling_in_gnat.rst,
1329 doc/gnat_ugn/about_this_guide.rst,
1330 doc/gnat_ugn/platform_specific_information.rst,
1331 doc/gnat_ugn/example_of_binder_output.rst,
1332 doc/gnat_ugn/gnat_and_program_execution.rst,
1333 doc/gnat_ugn/gnat_utility_programs.rst,
1334 doc/gnat_rm/implementation_of_specific_ada_features.rst,
1335 doc/gnat_rm/interfacing_to_other_languages.rst,
1336 doc/gnat_rm/implementation_defined_aspects.rst,
1337 doc/gnat_rm/intrinsic_subprograms.rst,
1338 doc/gnat_rm/implementation_defined_characteristics.rst,
1339 doc/gnat_rm/implementation_advice.rst,
1340 doc/gnat_rm/implementation_defined_attributes.rst,
1341 doc/gnat_rm/compatibility_and_porting_guide.rst,
1342 doc/gnat_rm/standard_library_routines.rst,
1343 doc/gnat_rm/the_gnat_library.rst,
1344 doc/gnat_rm/implementation_defined_pragmas.rst,
1345 doc/gnat_rm/representation_clauses_and_pragmas.rst,
1346 doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
1347 doc/gnat_rm/obsolescent_features.rst,
1348 doc/gnat_rm/about_this_guide.rst,
1349 doc/gnat_rm/the_implementation_of_standard_i_o.rst,
1350 doc/gnat_rm/implementation_of_ada_2012_features.rst,
1352 doc/gnat_rm.rst: Update documentation.
1354 2017-09-08 Arnaud Charlet <charlet@adacore.com>
1356 * s-dwalin.ads, s-dwalin.adb, s-trasym-dwarf.adb, s-objrea.ads,
1357 s-objrea.adb, s-tsmona-linux.adb, s-tsmona-mingw.adb: New.
1358 * gcc-interface/Makefile.in: Enable s-trasym-dwarf.adb on x86*linux.
1360 2017-09-08 Bob Duff <duff@adacore.com>
1362 * s-ststop.ads, s-ststop.adb, rtsfind.ads (String_Input_Tag):
1363 New routine to read the Tag robustly.
1364 * exp_attr.adb (Input): Change the expansion of 'Input,
1365 in the class-wide case, to call String_Input_Tag instead of
1366 String_Input_Blk_IO.
1368 2017-09-08 Arnaud Charlet <charlet@adacore.com>
1370 * s-rident.ads (Restriction_Id): reorder enum
1371 literals, so that Pure_Barriers is no longer in range of the
1372 Cunit_Boolean_Restrictions subtype.
1374 2017-09-08 Nicolas Roche <roche@adacore.com>
1376 * a-taster.ads, a-taster.adb: Move to libgnarl
1377 * gcc-interface/Makefile.in: Remove obsolete targets. Code cleanups.
1378 Add support for files in libgnarl.
1380 2017-09-08 Ed Schonberg <schonberg@adacore.com>
1382 * exp_ch4.adb (Expand_N_Type_Conversion): Do not apply
1383 accessibility check to an interface conversion, whose purpose
1384 is to perform a pointer adjustment in a dispatching call.
1385 * exp_ch6.adb (Expand_Call_JHelper): Add accessibility checks
1386 when the actual is a construct that involves a dereference of an
1387 expression that includes a formal of the enclosing subprogram,
1388 In such cases, the accessibility level of the actual is that of
1389 the corresponding formal, which is passed in as an additional
1390 actual in the outer call.
1392 2017-09-08 Bob Duff <duff@adacore.com>
1394 * exp_intr.adb (Add_Source_Info): Do not decode
1395 file names; they were not encoded in the first place.
1397 2017-09-08 Bob Duff <duff@adacore.com>
1399 * a-tags.adb (Internal_Tag): Unsuppress checks, so we get
1400 exceptions instead of crashes. Check for absurdly long strings
1401 and empty strings. Empty strings cause trouble because they can
1402 have super-null ranges (e.g. 100..10), which causes Ext_Copy to
1403 be empty, which causes an array index out of bounds.
1404 * s-ststop.adb (Input): Unsuppress checks, so we get exceptions
1407 2017-09-08 Arnaud Charlet <charlet@adacore.com>
1409 * sem_util.adb (Is_CCT_Instance): allow use in
1410 the context of protected types.
1412 2017-09-08 Arnaud Charlet <charlet@adacore.com>
1414 * a-tigeli.adb: minor remove extra whitespace.
1416 2017-09-08 Gary Dismukes <dismukes@adacore.com>
1418 * par-ch4.adb: Reformatting of an error message.
1420 2017-09-08 Javier Miranda <miranda@adacore.com>
1422 * sem_ch3.adb (Resolve_Name): Under ASIS mode analyze overloaded
1423 identifiers to ensure their correct decoration of names on
1426 2017-09-08 Yannick Moy <moy@adacore.com>
1428 * exp_attr.adb (Expand_Loop_Entry_Attribute): Do
1429 not skip a loop coming from source which is rewritten into a loop.
1431 2017-09-08 Ed Schonberg <schonberg@adacore.com>
1433 * freeze.adb (Wrap_Imported_Subprogram): Indicate that the
1434 wrapper has convention Ada, to prevent spurious warnings on
1435 unconstrained array parameters.
1437 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
1439 * sem_prag.adb (Check_Variant): Use First_Non_Pragma/Next_Non_Pragma.
1440 (Analyze_Pragma) <Pragma_Unchecked_Union>: Likewise.
1442 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
1444 * sem_ch6.adb (Freeze_Expr_Types): Rename Spec_Id into Def_Id.
1446 2017-09-08 Arnaud Charlet <charlet@adacore.com>
1448 * exp_intr.adb (Append_Entity_Name): Move to ...
1449 * sem_util.ads, sem_util.adb: ... here to share it.
1450 (Subprogram_Name): New subprogram, to compute the name of the enclosing
1452 * errutil.adb (Error_Msg): Fill new field Node.
1453 * erroutc.ads (Subprogram_Name_Ptr): New.
1454 (Error_Msg_Object): New field Node.
1455 * erroutc.adb (dmsg, Output_Msg_Text): Take new field Node into account.
1456 * errout.adb (Error_Msg): New variant with node id parameter.
1457 Fill new parameter Node when emitting messages. Revert previous
1458 changes for Include_Subprogram_In_Messages.
1459 * sem_ch5.adb (Check_Unreachable_Code): Supply Node parameter when
1460 generating warning message.
1462 2017-09-08 Ed Schonberg <schonberg@adacore.com>
1464 * par-ch4.adb (P_Iterated_Component_Association): Place construct
1465 under -gnat2020 flag, given that it is a future feature of
1467 * sem_aggr.adb (Resolve_Iterated_Component_Association): Mark
1468 defining identifier as referenced to prevent spurious warnings:
1469 corresponding loop is expanded into one or more loops whose
1470 variable has the same name, and the expression uses those names
1471 and not the original one.
1473 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
1475 * sem_elab.adb (Check_A_Call): Do not consider
1476 references to internal variables for SPARK semantics.
1478 2017-09-08 Arnaud Charlet <charlet@adacore.com>
1480 * inline.adb (In_Package_Spec): refine type of
1481 the parameter from Node_Id to Entity_Id.
1483 2017-09-08 Justin Squirek <squirek@adacore.com>
1485 * exp_ch5.adb (Expand_Formal_Container_Loop):
1486 Reset the scope of the loop parameter after it is reanalyzed.
1488 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
1490 * sem_util.ads (Set_Rep_Info): New inline procedure.
1491 * sem_util.adb (Set_Rep_Info): Implement it.
1492 * sem_ch3.adb (Process_Subtype): If the case of a constraint present,
1493 always copy the representation aspects onto the subtype.
1495 2017-09-08 Georges-Alex Jaloyan <jaloyan@adacore.com>
1497 * g-dynhta.adb, g-dynhta.ads (Get_First_Key, Get_Next_key):
1498 Correction of the return type from access type to option type.
1499 (Simple_HTable): Moving the Instance_Data to ads file.
1501 2017-09-08 Yannick Moy <moy@adacore.com>
1503 * sem_prag.adb: Use System.Case_Util.To_Lower to simplify code.
1505 2017-09-08 Arnaud Charlet <charlet@adacore.com>
1507 * opt.ads (Include_Subprogram_In_Messages): New variable.
1508 * errout.ads (Current_Subprogram_Ptr): New variable.
1509 * errout.adb (Error_Msg): Prepend current subprogram info
1510 in messages if Include_Subprogram_In_Messages is set.
1511 * sem_util.adb (elab code): Initialize Current_Subprogram_Ptr to
1513 * gnat1drv.adb (Adjust_Global_Switches): Set
1514 Include_Subprogram_In_Messages when -gnatdJ is set.
1515 * debug.adb: Document and reserve -gnatdJ.
1517 2017-09-08 Georges-Axel Jaloyan <jaloyan@adacore.com>
1519 * g-dynhta.adb, g-dynhta.ads (Get_First_Key, Get_Next_Key): New
1520 functions to iterate over simple hastables.
1521 (Load_Factor_HTable): Remove obsolete and inefficient implementation.
1523 2017-09-08 Javier Miranda <miranda@adacore.com>
1525 * exp_ch6.adb (Unqual_BIP_Function_Call): Adding
1526 missing checks on the presence of Entity() before checking the
1529 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
1531 * sem_ch6.adb (Analyze_Expression_Function): Reorder some
1532 statements, use local variable and remove unnecessary processing.
1534 2017-09-08 Javier Miranda <miranda@adacore.com>
1536 * exp_ch6.ads (Make_Build_In_Place_Iface_Call_In_Allocator): New
1538 (Make_Build_In_Place_Iface_Call_In_Anonymous_Context): New subprogram.
1539 (Make_Build_In_Place_Iface_Call_In_Object_Declaration): New
1541 (Unqual_BIP_Iface_Function_Call): New subprogram.
1542 * exp_ch6.adb (Replace_Renaming_Declaration_Id): New
1543 subprogram containing code that was previously inside
1544 Make_Build_In_Place_Call_In_Object_Declaration since it is also
1545 required for one of the new subprograms.
1547 Invoke Make_Build_In_Place_Iface_Call_In_Anonymous_Context
1548 (Expand_N_Extended_Return_Statement): Extend the
1549 cases covered by an assertion on expected BIP object
1551 (Make_Build_In_Place_Call_In_Assignment):
1552 Removing unused code; found working on this ticket.
1553 (Make_Build_In_Place_Call_In_Object_Declaration): Move the code
1554 that replaces the internal name of the renaming declaration
1555 into the new subprogram Replace_Renaming_Declaration_Id.
1556 (Make_Build_In_Place_Iface_Call_In_Allocator): New subprogram.
1557 (Make_Build_In_Place_Iface_Call_In_Anonymous_Context):
1559 (Make_Build_In_Place_Iface_Call_In_Object_Declaration): New
1561 (Unqual_BIP_Iface_Function_Call): New subprogram.
1562 * exp_ch3.adb (Expand_N_Object_Declaration): Invoke the new
1563 subprogram Make_Build_In_Place_Iface_Call_In_Object_Declaration.
1564 * exp_attr.adb (Expand_N_Attribute_Reference): Invoke the new
1565 subprogram Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
1566 * exp_ch4.adb (Expand_Allocator_Expression): Invoke the new
1567 subprogram Make_Build_In_Place_Iface_Call_In_Allocator.
1568 (Expand_N_Indexed_Component): Invoke the new subprogram
1569 Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
1570 (Expand_N_Selected_Component): Invoke the new subprogram
1571 Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
1572 (Expand_N_Slice): Invoke the new subprogram
1573 Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
1574 * exp_ch8.adb (Expand_N_Object_Renaming_Declaration):
1575 Invoke the new subprogram
1576 Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
1578 2017-09-08 Javier Miranda <miranda@adacore.com>
1580 * exp_disp.adb (Expand_Interface_Conversion): Fix handling of
1581 access to interface types. Remove also the accessibility check.
1583 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
1585 * sem_ch6.adb (Freeze_Expr_Types): Really freeze
1586 all the types that are referenced by the expression.
1587 (Analyze_Expression_Function): Call Freeze_Expr_Types for
1588 a completion instead of manually freezing the type of the
1590 (Analyze_Subprogram_Body_Helper): Do not call Freeze_Expr_Types here.
1592 2017-09-08 Ed Schonberg <schonberg@adacore.com>
1594 * exp_prag.adb (Replace_Discriminals_Of_Protected_Op):
1595 New procedure, auxiliary to Expand_Pragma_Check, to handle
1596 references to the discriminants of a protected type within a
1597 precondition of a protected operation. This is needed because
1598 the original precondition has been analyzed in the context of
1599 the protected declaration, but in the body of the operation
1600 references to the discriminants have been replaved by references
1601 to the discriminants of the target object, and these references
1602 are only created when expanding the protected body.
1604 2017-09-08 Yannick Moy <moy@adacore.com>
1606 * sem_prag.adb (Analyze_Pragma): Issue more precise error messages on
1609 2017-09-08 Ed Schonberg <schonberg@adacore.com>
1611 * exp_attr.adb (Build_Record_VS_Func): If the record is an
1612 unchecked union, do not emit checks for its (non-existent)
1613 discriminants, or for variant parts that depend on them.
1615 2017-09-08 Justin Squirek <squirek@adacore.com>
1617 * sem_ch4.adb (Find_Equality_Types.Try_One_Interp,
1618 Find_Comparison_Type.Try_One_Interp): Add check for generic
1621 2017-09-08 Arnaud Charlet <charlet@adacore.com>
1623 * sem_ch3.adb, layout.adb, layout.ads, exp_attr.adb, debug.adb,
1624 exp_pakd.adb, sem_prag.adb, gnat1drv.adb, targparm.adb, targparm.ads,
1625 repinfo.adb, exp_ch6.adb, exp_aggr.adb, sem_eval.adb, sem_ch13.adb,
1626 exp_ch3.adb: Remove references to Frontend_Layout_On_Target and
1627 remaining references to AAMP_On_Target.
1629 2017-09-08 Ed Schonberg <schonberg@adacore.com>
1631 * style.adb: Fix typo.
1633 2017-09-08 Javier Miranda <miranda@adacore.com>
1635 * einfo.adb (Underlying_Type): Add missing support for class-wide
1636 types that come from the limited view.
1637 * exp_attr.adb (Attribute_Address): Check class-wide type
1638 interfaces using the underlying type to handle limited-withed
1640 (Attribute_Tag): Check class-wide type interfaces using
1641 the underlying type to handle limited-withed types.
1643 2017-09-08 Ed Schonberg <schonberg@adacore.com>
1645 * exp_ch5.adb (Expand_Predicated_Loop): Handle properly a loop
1646 over a subtype of a type with a static predicate, taking into
1647 account the predicate function of the parent type and the bounds
1648 given in the loop specification.
1649 * sem_ch3.adb (Inherit_Predicate_Flags): For qn Itype created for
1650 a loop specification that is a subtype indication whose type mark
1651 is a type with a static predicate, inherit predicate function,
1652 used to build case statement for rewritten loop.
1654 2017-09-08 Justin Squirek <squirek@adacore.com>
1656 * lib-load.adb: Modify printing of error message to exclude file
1659 2017-09-08 Arnaud Charlet <charlet@adacore.com>
1661 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode):
1662 don't inline subprograms declared in both visible and private
1664 (In_Package_Spec): previously In_Package_Visible_Spec; now
1665 detects subprograms declared both in visible and private parts
1668 2017-09-08 Ed Schonberg <schonberg@adacore.com>
1670 * exp_util.adb (Build_Invariant_Procedure_Declaration): If
1671 the type is an anonymous array in an object declaration, whose
1672 component type has an invariant, use the object declaration
1673 as the insertion point for the invariant procedure, given that
1674 there is no explicit type declaration for an anonymous array type.
1676 2017-09-08 Bob Duff <duff@adacore.com>
1678 * a-cbprqu.ads, a-cbdlli.adb: Suppress warnings.
1680 2017-09-08 Bob Duff <duff@adacore.com>
1682 * a-strfix.adb (Trim): Compute Low and High only if needed.
1684 2017-09-08 Justin Squirek <squirek@adacore.com>
1686 * lib-load.adb (Load_Main_Source): Add error output in the case a
1687 source file is missing.
1689 2017-09-08 Bob Duff <duff@adacore.com>
1692 * a-textio.adb, a-witeio.adb, a-ztexio.adb (Set_WCEM): Use
1693 Default_WCEM by default (i.e. if the encoding is not specified
1694 by the Form string).
1696 2017-09-08 Bob Duff <duff@adacore.com>
1698 * s-trasym.ads (Hexa_Traceback): If
1699 Suppress_Hex is True, print "..." instead of a hexadecimal
1701 * s-trasym.adb: Ignore No_Hex in this version.
1704 2017-09-08 Bob Duff <duff@adacore.com>
1706 * debug.adb: Minor reformatting.
1708 2017-09-08 Bob Duff <duff@adacore.com>
1710 * a-cbdlli.adb, a-cohama.adb, a-cohase.adb (Copy): Rewrite the
1711 code so it doesn't trigger an "uninit var" warning.
1713 2017-09-08 Nicolas Roche <roche@adacore.com>
1715 * s-hibaen.ads: Remove obsolete file.
1717 2017-09-08 Arnaud Charlet <charlet@adacore.com>
1719 * a-locale.ads: Add comment explaining the state of this package.
1721 2017-09-08 Arnaud Charlet <charlet@adacore.com>
1723 * sem_util.adb (Is_CCT_Instance): Allow calls in the context
1725 * sem_prag.ads, sem_prag.adb (Find_Related_Declaration_Or_Body):
1726 allow calls in the context of package spec (for pragma
1727 Initializes) and bodies (for pragma Refined_State).
1729 2017-09-08 Bob Duff <duff@adacore.com>
1731 * checks.adb (Insert_Valid_Check): Copy the Do_Range_Check flag to the
1734 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
1736 * debug.adb (dA): Adjust comment.
1737 * gnat1drv.adb (Gnat1drv): Likewise.
1738 * opt.ads (List_Representation_Info_Extended): New variable.
1739 * repinfo.adb (List_Record_Info): Split implementation into...
1740 (Compute_Max_Length): ...this. Recurse on records if requested.
1741 (List_Record_Layout): Likewise.
1742 * switch-c.adb (Scan_Front_End_Switches) <'R'>: Use case
1743 statement, accept '0' and set List_Representation_Info_Extended
1745 * usage.adb (Usage): Document new -gnatRe variant.
1747 2017-09-08 Ed Schonberg <schonberg@adacore.com>
1749 * sem_prag.adb (Analyze_Pragma, case Default_Storage_Pool):
1750 Do not save the given entity in the global variable Default_Pool
1751 if the pragma appears within a generic unit.
1753 2017-09-08 Bob Duff <duff@adacore.com>
1755 * errout.adb (Delete_Warning): Do not
1756 decrement Warnings_Treated_As_Errors. This is called before
1757 Warnings_Treated_As_Errors has been incremented to account for
1758 this warning. Decrementing it here can lead to negative values
1759 of Warnings_Treated_As_Errors, raising Constraint_Error in
1760 checks-on builds, and causing the compiler to return an error
1761 code in checks-off builds.
1763 2017-09-08 Arnaud Charlet <charlet@adacore.com>
1765 * sem_util.ads, sem_util.adb (Is_CCT_Instance): Only expect
1766 entities of named concurrent types as Ref_Id and not of anonymous
1767 concurrent objects (because callers already know when a conversion
1768 is necessary and can easily do it); also, do not expect protected
1769 types or protected objects as Context_Id (because no flow-related
1770 SPARK pragmas are attached there); reflect these changes in a
1771 more precise comment.
1773 2017-09-08 Olivier Hainque <hainque@adacore.com>
1775 * g-altive.ads: Add documentation.
1777 2017-09-08 Bob Duff <duff@adacore.com>
1779 * sem_util.ads, debug.adb: Minor comment fix.
1780 * erroutc.ads: Comment fix.
1782 2017-09-08 Ed Schonberg <schonberg@adacore.com>
1784 * sem_ch12.adb (Validate_Array_Type_Instance): Suppress check
1785 for compatibility of component types of formal and actual in an
1786 instantiation of a child unit, when the component type of the
1787 formal is itself a formal of an enclosing generic.
1789 2017-09-08 Arnaud Charlet <charlet@adacore.com>
1791 * sem_util.ads, sem_util.adb (Is_CCT_Instance): moved from
1792 sem_prag.adb to make it available for GNATprove; for concurrent
1793 types replace custom scope climbing with Scope_Same_Or_Within; for
1794 single concurrent objects add scope climbing (with Scope_Within),
1795 which was not there (that's the primary semantic change of this
1796 commit); also, when comparing a single concurrent object with
1797 its corresponding concurrent type rely on equality of types,
1798 not of objects (because that's simpler to code).
1799 * sem_prag.adb (Is_CCT_Instance): lifted to sem_util.ads.
1800 (Analyze_Global_Item): adjust special-casing of references to the
1801 current instance of a concurrent unit in the Global contracts
1802 of task types and single tasks objects; similar for references
1803 in the protected operations and entries of protected types and
1804 single protected objects (in all these cases the current instance
1805 behaves as an implicit parameter and must not be mentioned in
1806 the Global contract).
1808 2017-09-08 Arnaud Charlet <charlet@adacore.com>
1810 * exp_ch6.adb (Expand_Call_Helper): Introduce temporary for
1811 function calls returning a record within a subprogram call,
1814 2017-09-08 Ed Schonberg <schonberg@adacore.com>
1816 * sem_ch8.adb (Find_Expanded_Name): Handle properly an expanded
1817 name that designates the current instance of a child unit in its
1818 own body and appears as the prefix of a reference to an entity
1819 local to the child unit.
1820 * exp_ch6.adb, freeze.adb, sem_ch3.adb, sem_prag.adb, sem_util.adb:
1823 2017-09-08 Yannick Moy <moy@adacore.com>
1825 * sem_res.adb (Resolve_Equality_Op): Do not warn on comparisons that
1828 2017-09-08 Tristan Gingold <gingold@adacore.com>
1830 * sem_warn.adb (Check_Unused_Withs): Remove test that disabled
1831 warnings on internal units in configurable run time mode.
1833 2017-09-08 Bob Duff <duff@adacore.com>
1835 * sem_ch3.adb (Build_Derived_Private_Type): Inherit
1836 representation items from interfaces that the derived type
1837 implements, not just from the parent type.
1838 * sem_util.ads, sem_util.adb (Abstract_Interface_List): Change
1839 this to return an empty list when there are no interfaces.
1840 * einfo.ads, sem_ch13.adb: Minor comment fixes.
1841 * sem_attr.adb: Minor comment fix.
1843 2017-09-08 Doug Rupp <rupp@adacore.com>
1845 * sigtramp-vxworks.c [i386]: Adjust the kernel context for
1848 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
1850 * exp_ch4.adb (Expand_N_Allocator): Generate a
1851 call to Allocate_Any_Controlled when the allocation does not
1852 require any initialization.
1854 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
1856 * sem_util.adb (Copy_Node_With_Replacement):
1857 Update the Renamed_Object field of a replicated object renaming
1860 2017-09-08 Patrick Bernardi <bernardi@adacore.com>
1862 * exp_ch9.adb (Is_Pure_Barrier): Allow type
1863 conversions and components of objects. Simplified the detection
1864 of the Count attribute by identifying the corresponding run-time
1867 2017-09-08 Yannick Moy <moy@adacore.com>
1869 * exp_ch9.adb, exp_disp.adb, repinfo.adb, sem_ch12.adb, sem_dim.adb,
1870 sem_type.adb, sinfo.ads: Minor reformatting.
1872 2017-09-08 Ed Schonberg <schonberg@adacore.com>
1874 * freeze.adb (Has_Incomplete_Compoent): New predicate, subsidiary
1875 of Freeze_Profile, used to inhibit the freezing of the profile
1876 of an expression function declared within a nested package, when
1877 some type in the profile depends on a private type declared in
1878 an enclosing package.
1880 2017-09-08 Bob Duff <duff@adacore.com>
1882 * gnat1drv.adb (Gnat1drv): Do not set the Force_ALI_Tree_File flag in
1883 the subunit case. It's still OK to set it in the "missing subunits"
1884 case, because that won't cause the obsolete .ali files that cause
1887 2017-09-08 Bob Duff <duff@adacore.com>
1889 * sinput-l.adb: Remove unused "with Unchecked_Conversion;". It's
1890 unclear why this didn't cause a warning.
1891 * a-uncdea.ads, a-unccon.ads: Add "Ada." to names in the
1892 pragmas. It's unclear why this didn't cause an error.
1894 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
1896 * exp_spark.adb (Expand_SPARK_N_Object_Renaming_Declaration):
1898 (Expand_SPARK_Potential_Renaming): Code clean up.
1899 * sem_prag.adb (Analyze_Initialization_Item): Add a guard in case
1900 the item does not have a proper entity.
1901 (Analyze_Input_Item): Add a guard in case the item does not have a
1903 (Collect_States_And_Objects): Include object renamings in the
1904 items being collected.
1905 (Resolve_State): Update the documentation of this routine.
1906 * sem_util.adb (Entity_Of): Add circuitry to handle
1907 renamings of function results.
1908 (Remove_Entity): New routine.
1909 (Remove_Overloaded_Entity): Take advantage of factorization.
1910 * sem_util.ads (Entity_Of): Update the documentation
1912 (Remove_Entity): New routine.
1913 (Remove_Overloaded_Entity): Update the documentation of this
1916 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
1918 * repinfo.adb (List_Record_Info): During first loop,
1919 do not override the normalized position and first bit
1920 if they have already been set. Move fallback code
1921 for the packed case to the case where it belongs.
1922 * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order):
1923 Also adjust the normalized position of components.
1924 (Adjust_Record_For_Reverse_Bit_Order_Ada_95): Likewise.
1926 2017-09-08 Ed Schonberg <schonberg@adacore.com>
1928 * exp_disp.adb (Make_DT, Set_All_DT_Position): Handle properly
1929 the placement of a primitive operation O that renames an operation
1930 R declared in an inner package, and which is thus not a primitive
1931 of the dispatching type of O. In this case O is a new primitive
1932 and does not inherit its dispatch table position from R (which
1935 2017-09-08 Ed Schonberg <schonberg@adacore.com>
1937 * sem_dim.adb (Analyze_Dimension_If_Expression,
1938 Analyze_Dimension_Case_Expression): new subprograms to verify
1939 the dimensional correctness of Ada2012 conditional expressions,
1940 and set properly the dimensions of the construct.
1941 * sem_res.adb (Resolve_If_Expression, Resolve_Case_Expression)):
1942 call Analyze_Dimension.
1944 2017-09-08 Ed Schonberg <schonberg@adacore.com>
1946 * sem_type.adb (Expand_Interface_Conversion): Prevent an infinite
1947 loop on an interface declared as a private extension of another
1948 synchronized interface.
1950 2017-09-08 Ed Schonberg <schonberg@adacore.com>
1952 * sem_ch12.adb (Check_Generic_Parent): New procedure within
1953 Analyze_Associations, to handle actual packages that depend on
1954 previous instances. If a package IAP that is an instantiation is
1955 used as an actual in a subsequent instantiation SI in the same
1956 scope, and IAP has a body, IAP must be frozen before SI. If
1957 the generic parent of IAP is itself declared in a previous
1958 instantiation in the same scope, that instantiation must also
1959 be frozen before SI.
1960 (Install_Body): Prevent double insertion of freeze node for
1963 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
1965 * sem_prag.adb (Resolve_State): Update the
1966 comment on documentation. Generate a reference to the state once
1967 resolution takes place.
1969 2017-09-08 Ed Schonberg <schonberg@adacore.com>
1971 * sem_ch13.adb (Analyze_Aspect_Specifications, case
1972 Linker_Section): If the aspect applies to an object declaration
1973 with explicit initialization, do not delay the freezing of the
1974 object, to prevent access-before-elaboration in the generated
1975 initialization code.
1977 2017-09-08 Ed Schonberg <schonberg@adacore.com>
1979 * a-wtdeio.adb (Put, all versions): Use Long_Long_Integer
1980 (Integer_Value (Item)) when the size of the fixed decimal type
1981 is larger than Integer.
1983 2017-09-07 Eric Botcazou <ebotcazou@adacore.com>
1986 * gcc-interface/decl.c (copy_and_substitute_in_layout): Put the fields
1987 in order of increasing position in more cases.
1989 2017-09-07 Yannick Moy <moy@adacore.com>
1991 * a-exetim-mingw.ads: Add contract Global=>null
1992 on all operations that are modeled as having no read or write
1993 of global variables in SPARK.
1995 2017-09-07 Raphael Amiard <amiard@adacore.com>
1997 * a-chtgop.adb, a-chtgop.ads (Generic_Iteration_With_Position): Added
1998 to Hmaps.Generic_Ops.
1999 * a-cohama.adb (Ada.Containers.Hmaps.Iterate): Pass proper position in
2001 * a-cihama.adb (Ada.Containers.Indefinite_Hmaps.Iterate): Pass pos in
2003 * a-cohase.adb (Ada.Containers.Hashed_Sets.Iterate): Pass proper
2004 position in cursors.
2006 2017-09-07 Javier Miranda <miranda@adacore.com>
2008 * sem_elab.adb (Check_Task_Activation): Adding switch -gnatd.y to
2009 allow disabling the generation of implicit pragma Elaborate_All
2012 2017-09-07 Javier Miranda <miranda@adacore.com>
2014 * exp_disp.adb (Make_Tags): Avoid suffix counter
2015 in the external name of the elaboration flag. Required to fix
2016 the regressions introduced by the initial version of this patch.
2018 2017-09-07 Bob Duff <duff@adacore.com>
2020 * sem_ch6.adb (Analyze_Function_Return): Do not
2021 insert an explicit conversion to force the displacement of the
2022 "this" pointer to reference the secondary dispatch table in the
2023 case where the return statement is returning a raise expression,
2024 as in "return raise ...".
2026 2017-09-07 Arnaud Charlet <charlet@adacore.com>
2028 * sem_disp.adb (Is_User_Defined_Equality): Removed procedure.
2029 * sem_util.ads, sem_util.adb (Is_User_Defined_Equality): Copied
2030 procedure from sem_disp.adb.
2031 * sem_ch12.ads (Get_Unit_Instantiation_Node): rename Package
2033 * sem_ch12.adb (Get_Unit_Instantiation_Node): function extended to
2034 return the instantiation node for subprograms. Update references
2035 to Get_Unit_Instantiation_Node.
2036 * sem_ch7.adb (Install_Parent_Private_Declarations): update
2037 reference to Get_Unit_Instantiation_Node.
2038 * exp_dist.adb (Build_Package_Stubs): update reference to
2039 Get_Unit_Instantiation_Node.
2040 * sem_ch9.adb: minor typo in comment.
2041 * lib-xref-spark_specific.adb
2042 (Traverse_Declaration_Or_Statement): traverse into task type
2045 2017-09-07 Ed Schonberg <schonberg@adacore.com>
2047 * sem_dim.adb (Analyze_Dimension_Type_Conversion): New procedure
2048 to handle properly various cases of type conversions where the
2049 target type and/or the expression carry dimension information.
2050 (Dimension_System_Root); If a subtype carries dimension
2051 information, obtain the source parent type that carries the
2054 2017-09-07 Dmitriy Anisimkov <anisimko@adacore.com>
2056 * g-socket.adb, g-socket.ads (GNAT.Sockets.To_Ada): New routine.
2058 2017-09-07 Ed Schonberg <schonberg@adacore.com>
2060 * exp_attr.adb (Expand_N_Attribute_Reference, case 'Constrained):
2061 If the prefix is a reference to an object, rewrite it as an
2062 explicit dereference, as required by 3.7.2 (2) and as is done
2063 with most other attributes whose prefix is an access value.
2065 2017-09-07 Bob Duff <duff@adacore.com>
2067 * par-ch13.adb: Set the Inside_Depends flag if we are inside a
2068 Refined_Depends aspect.
2069 * par-ch2.adb: Set the Inside_Depends flag if we are inside a
2070 Refined_Depends pragma.
2071 * scans.ads: Fix documentation of Inside_Depends flag.
2072 * styleg.adb, styleg.ads: Minor reformatting and comment fixes.
2074 2017-09-07 Hristian Kirtchev <kirtchev@adacore.com>
2076 * exp_ch7.adb (Insert_Actions_In_Scope_Around):
2077 Account for the case where the are no lists to insert, but the
2078 secondary stack still requires management.
2079 * a-chtgop.adb, a-cihama.adb, a-cohama.adb, a-cohase.adb, a-tags.adb,
2080 comperr.adb, einfo.adb, exp_aggr.adb, exp_ch3.adb, exp_disp.adb,
2081 lib-xref.adb, lib-xref-spark_specific.adb, sem_ch12.adb, sem_ch13.adb,
2082 sem_ch6.adb, sem_dim.adb, sem_dim.ads, sem_elab.adb, sem_prag.adb:
2085 2017-09-07 Vincent Celier <celier@adacore.com>
2087 * clean.adb: Do not get the target parameters before calling
2090 2017-09-07 Nicolas Roche <roche@adacore.com>
2092 * s-osinte-solaris-posix.ads: Removed.
2094 2017-09-07 Arnaud Charlet <charlet@adacore.com>
2096 * sem_prag.adb (Collect_States_And_Objects): Detect also instances of
2097 single concurrent objects.
2099 2017-09-07 Javier Miranda <miranda@adacore.com>
2101 * s-regexp.ads: Fix documentation of the globbing grammar.
2103 2017-09-07 Gary Dismukes <dismukes@adacore.com>
2105 * a-tags.ads, einfo.ads, exp_disp.ads: Minor reformatting.
2107 2017-09-07 Arnaud Charlet <charlet@adacore.com>
2109 * gnat1drv.adb (Gnat1drv): Enable pragma Ignore_Pragma (Global)
2110 in CodePeer mode, to support more legacy code automatically.
2112 2017-09-07 Ed Schonberg <schonberg@adacore.com>
2114 * exp_disp.adb (Replace_Formals): If thr formal is classwide,
2115 and thus not a controlling argument, preserve its type after
2116 rewriting because it may appear in an nested call with a classwide
2119 2017-09-07 Arnaud Charlet <charlet@adacore.com>
2121 * comperr.adb (Delete_SCIL_Files): Handle case of
2122 N_Package_Instantiation.
2124 2017-09-07 Ed Schonberg <schonberg@adacore.com>
2126 * sem_ch10.adb (Remove_Private_With_Clause): If a private with
2127 clause for a unit U appears in a context that includes a regular
2128 with_clause on U, rewrite the redundant private clause into a null
2129 statement, rather than removing it altogether from the context,
2130 so that ASIS tools can reconstruct the original source.
2132 2017-09-07 Ed Schonberg <schonberg@adacore.com>
2134 * sem_ch13.adb (Check_Aspect_At_Freeze_Point): The expression
2135 for aspect Small can be of any real type (not only a universal
2136 real literal) as long as it is a static constant.
2138 2017-09-07 Thomas Quinot <quinot@adacore.com>
2140 * par_sco.adb: Minor reformatting.
2142 2017-09-07 Arnaud Charlet <charlet@adacore.com>
2144 * s-parame-ae653.ads: Removed.
2146 2017-09-07 Nicolas Roche <roche@adacore.com>
2148 * s-traces-default.adb, s-trafor-default.adb, s-trafor-default.ads,
2149 s-traces.adb, s-traces.ads, s-tratas-default.adb, s-tfsetr-default.adb,
2150 s-tfsetr-vxworks.adb, s-tratas.adb, s-tratas.ads, s-tasuti.adb,
2151 s-parame-hpux.ads, s-tassta.adb, s-taasde.adb, s-tasren.adb,
2152 s-taprob.adb, a-caldel.adb, s-parame.ads, Makefile.rtl, s-tpobop.adb,
2153 s-taenca.adb, s-parame-vxworks.ads: Remove support for System.Traces.
2155 2017-09-07 Yannick Moy <moy@adacore.com>
2157 * a-ngelfu.ads Add preconditions to all functions
2158 listed in Ada RM A.5.1(19-33) as having constraints on inputs.
2160 2017-09-07 Arnaud Charlet <charlet@adacore.com>
2162 * lib-xref.adb (Generate_Reference): ignore
2163 references to entities which are Part_Of single concurrent
2166 2017-09-07 Eric Botcazou <ebotcazou@adacore.com>
2168 * sem_ch7.adb (Hide_Public_Entities): Add paragraph to main
2171 2017-09-07 Arnaud Charlet <charlet@adacore.com>
2173 * a-taside.adb (Activation_Is_Complete): Raise Program_Error if
2174 Null_Task_Id is passed.
2176 2017-09-07 Javier Miranda <miranda@adacore.com>
2178 * einfo.ads, einfo.adb (Access_Disp_Table_Elab_Flag): New
2179 attribute. Defined for record types and subtypes.
2180 * exp_ch3.ads (Init_Secondary_Tags): Adding new formal
2181 (Init_Tags_List) to facilitate generating separate code in the
2182 IP routine to initialize the object components and for completing
2183 the elaboration of dispatch tables.
2184 * exp_ch3.adb (Build_Init_Procedure): Improve the code
2185 generated in the IP routines by means of keeping separate
2186 the initialization of the object components from the
2187 initialization of its dispatch tables. (Init_Secondary_Tags):
2188 Adding new formal (Init_Tags_List) and adjusting calls to
2189 Ada.Tags.Set_Dynamic_Offset_To_Top since it has a new formal;
2190 adjusting also calls to Ada.Tags.Register_Interface_Offset
2191 because the type of one of its formals has been changed.
2192 * a-tags.ads, a-tags.adb (Register_Interface_Offset): Profile
2193 modified. Instead of receiving a pointer to an object this
2194 routine receives now a primary tag.
2195 (Set_Dyanic_Offset_To_Top): Profile modified. This routine receives an
2196 additional formal: the tag of the primary dispatch table.
2197 * exp_disp.ads (Elab_Flag_Needed): New subprogram.
2198 * exp_disp.adb (Elab_Flag_Needed): New subprogram.
2199 (Make_Tags): Adding the declaration of the elaboration flag (if needed).
2200 * exp_aggr.adb (Build_Record_Aggr_Code): Adding actual of new
2201 formal in calls to Init_Secondary_Tags.
2203 2017-09-07 Javier Miranda <miranda@adacore.com>
2205 * ghost.adb (Mark_And_Set_Ghost_Instantiation.Check_Ghost_Actuals): New
2207 * sem_prag.adb (Pragma_Ghost): Add missing support for ghost
2208 applied to generic subprograms.
2210 2017-09-07 Arnaud Charlet <charlet@adacore.com>
2212 * sem_util.adb (Check_Part_Of_Reference): rename Conc_Typ to Conc_Obj
2213 (because it refers to the anonymous concurrent object, not its type);
2214 fix condition for emitting error message about task/protected type,
2216 2017-09-07 Bob Duff <duff@adacore.com>
2218 * binde.adb (Debug_Flag_Old): If both -do and -dp
2219 are specified, behave as if just -do was specified, rather than
2222 2017-09-07 Nicolas Roche <roche@adacore.com>
2224 * system-vxworks-sparcv9.ads, s-vxwork-m68k.ads, s-vxwork-mips.ads,
2225 system-vxworks-m68k.ads, system-vxworks-mips.ads: Removed.
2227 2017-09-07 Arnaud Charlet <charlet@adacore.com>
2229 * sem_prag.adb (Find_Role): The Global_Seen flag
2230 is now consulted not only for abstract states and variables,
2231 but for all kinds of items.
2232 (Collect_Subprogram_Inputs_Outputs): Do not process formal
2233 generic parameters, because unlike ordinary formal parameters,
2234 generic formals only act as input/ outputs if they are explicitly
2235 mentioned in a Global contract.
2237 2017-09-07 Yannick Moy <moy@adacore.com>
2239 * ghost.adb (Check_Ghost_Context): Do not err on ghost code inside
2240 predicate procedure. Check predicate pragma/aspect with Ghost entity.
2241 * exp_ch6.adb, par-ch6.adb, sem_ch13.adb, sem_prag.adb; Minor
2244 2017-09-07 Ed Schonberg <schonberg@adacore.com>
2246 * sem_aggr.adb: Move New_Copy_Tree_And_Dimensions to sem_dim
2248 * sem_ch3.adb (Build_Derived_Record_Type):i Call
2249 Copy_Dimensions_Of_Components after creating the copy of the
2251 * sem_dim.ads, sem_dim.adb (Copy_Dimensions_Of_Components): For a
2252 derived recor type, copy the dikensions if any of each component
2253 of the parent record to the corresponding component declarations
2254 of the derived record. These expressions are used among other
2255 things as default values in aggregates with box associations.
2256 * a-dirval-mingw.adb, g-cgi.adb, gnatcmd.adb, lib-xref.adb,
2257 repinfo.adb, sem_attr.adb, sem_ch10.adb, sem_ch6.adb, sem_prag.adb:
2260 2017-09-07 Arnaud Charlet <charlet@adacore.com>
2262 * sem_util.adb: Remove extra space after THEN.
2264 2017-09-07 Eric Botcazou <ebotcazou@adacore.com>
2266 * sem_ch7.adb (Has_Referencer): For a subprogram renaming,
2267 also mark the renamed subprogram as referenced.
2269 2017-09-07 Ed Schonberg <schonberg@adacore.com>
2271 * par-ch6.adb (P_Subprogram): Improve error message on null
2272 procedure with misplaced aspect specification, which the parser
2273 first attempts to interpret as a malformed expression function.
2275 2017-09-07 Gary Dismukes <dismukes@adacore.com>
2277 * sem_attr.adb (Analyze_Attribute_Old_Result):
2278 Allow attributes Result and Old in the case of an expression
2281 2017-09-07 Justin Squirek <squirek@adacore.com>
2283 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile): Propagate
2284 Volatile to subcomponents.
2286 2017-09-07 Bob Duff <duff@adacore.com>
2288 * exp_ch7.adb (Find_Last_Init): Check for the
2289 case where a build-in-place function call has been replaced by a
2290 'Reference attribute reference.
2292 2017-09-07 Eric Botcazou <ebotcazou@adacore.com>
2294 * sem_ch7.adb (Has_Referencer): Recurse on Actions of freeze
2297 2017-09-07 Bob Duff <duff@adacore.com>
2299 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration,
2300 Make_Build_In_Place_Call_In_Anonymous_Context): Do not use the
2301 secondary stack for all functions that return limited tagged
2302 types -- just do it for dispatching calls. Misc cleanup.
2303 * sem_util.ads, sem_util.adb (Unqual_Conv): New function to
2304 remove qualifications and type conversions. Fix various bugs
2305 where only a single level of qualification or conversion was
2306 removed, so e.g. "T1'(T2'(X))" would incorrectly return "T2'(X)"
2308 * checks.adb, exp_util.ads, exp_util.adb, sem_res.adb: Misc related
2311 2017-09-07 Ed Schonberg <schonberg@adacore.com>
2313 * sem_ch6.adb (setr_Actual_Subtypes): Within a predicate function
2314 do not create actual subtypes that may generate further predicate
2316 * sem_ch13.adb (Build_Predicate_Functions): Indicate that entity
2317 of body is a predicate function as well.
2318 (Resolve_Aspect_Expressions, Resolve_Name): For a component
2319 association, only the expression needs resolution, not the name.
2320 (Resolve_Aspect_Expressions, case Predicates): Construct and
2321 analyze the predicate function declaration in the scope of the
2322 type, before making the type and its discriminants visible.
2324 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
2326 * gcc-interface/decl.c (warn_on_field_placement): Issue the warning
2327 only if the record type itself comes from source.
2329 2017-09-06 Gary Dismukes <dismukes@adacore.com>
2331 * sem_ch5.adb: Minor reformatting and a typo fix
2333 2017-09-06 Arnaud Charlet <charlet@adacore.com>
2335 * sinput-l.ads: minor remove extra period at the end of comment
2337 2017-09-06 Arnaud Charlet <charlet@adacore.com>
2339 * sem_prag.adb (Add_Item_To_Name_Buffer): remove support for
2341 (Find_Role): remove support for E_Discriminant.
2343 2017-09-06 Javier Miranda <miranda@adacore.com>
2345 * exp_ch6.adb (Expand_Simple_Function_Return):
2346 Add missing implicit type conversion to force displacement of the
2349 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
2351 * sem_ch3.adb, sem_aux.adb, sem_res.adb: Minor reformatting.
2353 2017-09-06 Yannick Moy <moy@adacore.com>
2355 * sem_ch12.adb (Analyze_Instance_And_Renamings): Refactor to set
2356 global variable Ignore_SPARK_Mode_Pragmas_In_Instance only once.
2358 2017-09-06 Bob Duff <duff@adacore.com>
2360 * sem_ch8.adb: Change Assert to be consistent with
2363 2017-09-06 Bob Duff <duff@adacore.com>
2365 * binde.adb (Find_Elab_Order): Do not run Elab_Old unless
2366 requested. Previously, the -do switch meant "run Elab_New and
2367 Elab_Old and use the order chosen by Elab_Old, possibly with
2368 debugging printouts comparing the two orders." Now it means
2369 "do not run Elab_New." This is of use if there are bugs that
2370 cause Elab_New to crash.
2371 (Elab_Position, Num_Chosen): Change type to Nat, to avoid various
2373 * ali.ads (Elab_Position): Change type to Nat, to avoid various
2376 2017-09-06 Arnaud Charlet <charlet@adacore.com>
2378 * sem_prag.adb (Check_Mode_Restriction_In_Enclosing_Context): Fix
2379 reference to SPARK RM.
2381 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
2383 * layout.adb: Use SSU short hand consistently throughout the file.
2385 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
2387 * freeze.adb (Freeze_Record_Type)
2388 <Sized_Component_Total_Round_RM_Size>: New local variable to
2389 accumulate the rounded RM_Size of components. Update it for
2390 every component whose RM_Size is statically known. Add missing
2391 guard to check that bit packing is really required before issuing
2392 the error about packing. Swap condition for clarity's sake.
2393 * sem_prag.adb (Usage_Error): Fix reference to SPARK RM in comment.
2395 2017-09-06 Fedor Rybin <frybin@adacore.com>
2397 * makeutl.adb, makeutl.ads, mlib.adb, mlib.ads, mlib-fil.adb,
2398 mlib-fil.ads, mlib-prj.adb, mlib-prj.ads, mlib-tgt.adb, mlib-tgt.ads,
2399 mlib-tgt-specific.adb, mlib-tgt-specific.ads,
2400 mlib-tgt-specific-aix.adb, mlib-tgt-specific-darwin.adb,
2401 mlib-tgt-specific-hpux.adb, mlib-tgt-specific-linux.adb,
2402 mlib-tgt-specific-mingw.adb, mlib-tgt-specific-solaris.adb,
2403 mlib-tgt-specific-vxworks.adb, mlib-tgt-specific-xi.adb, mlib-utl.adb,
2404 mlib-utl.ads, prj.adb, prj.ads, prj-attr.adb, prj-attr.ads,
2405 prj-attr-pm.adb, prj-attr-pm.ads, prj-com.ads, prj-conf.adb,
2406 prj-conf.ads, prj-dect.adb, prj-dect.ads, prj-env.adb, prj-env.ads,
2407 prj-err.adb, prj-err.ads, prj-ext.adb, prj-ext.ads, prj-makr.adb,
2408 prj-makr.ads, prj-nmsc.adb, prj-nmsc.ads, prj-pars.adb, prj-pars.ads,
2409 prj-part.adb, prj-part.ads, prj-pp.adb, prj-pp.ads, prj-proc.adb,
2410 prj-proc.ads, prj-strt.adb, prj-strt.ads, prj-tree.adb, prj-tree.ads,
2411 prj-util.adb, prj-util.ads, sinput-p.adb, sinput-p.ads: Remove obsolete
2412 project manager sources.
2414 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2416 * sem_ch5.adb (Analyze_Assigment): If the left-hand side is an
2417 entity of a mutable type and the right-hand side is a conditional
2418 expression, resolve the alternatives of the conditional using
2419 the base type of the target entity, because the alternatives
2420 may have distinct subtypes. This is particularly relevant if
2421 the alternatives are aggregates.
2423 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2425 * checks.adb (Apply_Predicate_Check): If the expression is an
2426 aggregate that is the RHS of an assignment, apply the check to
2427 the LHS after the assignment, rather than to the aggregate. This
2428 is more efficient than creating a temporary for the aggregate,
2429 and prevents back-end crashes when the aggregate includes a
2430 dynamic "others' association.
2432 2017-09-06 Yannick Moy <moy@adacore.com>
2434 * sem_ch12.adb (Analyze_Instance_And_Renamings):
2435 Set variable to ignore SPARK_Mode in instance before the analysis
2436 of the generated package declaration.
2438 2017-09-06 Yannick Moy <moy@adacore.com>
2440 * sem_res.adb (Resolve_Call): Do not issue a
2441 message for calls inside expression function, unless body was
2442 seen and is candidate for inlining.
2444 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2446 * sem_aux.adb (Is_Generic_Formal): Handle properly formal packages.
2447 * sem_ch3.adb (Analyze_Declarations): In a generic subprogram
2448 body. do not freeze the formals of the generic unit.
2450 2017-09-06 Gary Dismukes <dismukes@adacore.com>
2452 * errout.adb (Error_Msg): Separate the
2453 treatment for warning vs. style messages in inlinings and
2454 instantiations. Prevents blowups on calls to Warn_Insertion for
2455 style messages, which should not be called in that case because
2456 Warning_Msg_Char is not set.
2458 2017-09-06 Justin Squirek <squirek@adacore.com>
2460 * sem_prag.adb (Check_VFA_Conflicts): Created
2461 to group all Volatile_Full_Access checks relating to other
2462 representation pragmas (Mark_Component_Or_Object): Created
2463 to centeralize the flagging of attributes for the record type
2464 component case, a pragma applied individually to a component, and
2466 (Process_Atomic_Independent_Shared_Volatile):
2467 Add propagation of certain pragmas to record components and move
2468 evaluation of VFA checks
2470 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2472 * sem_prag.adb (Check_Postcondition_Use_In_Inlined_Subprogram):
2473 Do not warn on conditions that are not obeyed for Inline_Always
2474 subprograms, when assertions are not enabled.
2476 2017-09-06 Arnaud Charlet <charlet@adacore.com>
2478 * sem_util.adb (Unique_Entity): For abstract states return their
2481 2017-09-06 Bob Duff <duff@adacore.com>
2483 * sem_ch12.adb (Copy_Generic_Node): When we copy a node
2484 that is a proper body corresponding to a stub, we defer the
2485 adjustment of the sloc until after the correct adjustment has
2486 been computed. Otherwise, Adjust_Instantiation_Sloc will ignore
2487 the adjustment, because it will be outside the range in (the old,
2488 incorrect) S_Adjustment.
2489 * inline.adb: Use named notation for readability and uniformity.
2490 * sinput-l.adb: Minor improvements to debugging output printed
2492 * sinput-l.ads (Create_Instantiation_Source): Minor comment
2495 2017-09-06 Vincent Celier <celier@adacore.com>
2497 * make.adb: Do not invoke gprbuild for -bargs -P.
2499 2017-09-06 Sylvain Dailler <dailler@adacore.com>
2501 * sem_eval.adb (Compile_Time_Known_Value_Or_Aggr): Adding a
2502 case when Op is of kind N_Qualified_Expression. In this case,
2503 the function is called recursively on the subexpression like in
2505 * make.adb: Minor reformatting
2507 2017-09-06 Justin Squirek <squirek@adacore.com>
2509 * einfo.adb (Set_Linker_Section_Pragma): Modify
2510 Set_Linker_Section_Pragma to be consistant with the "getter"
2511 Linker_Section_Pragma.
2512 * exp_ch5.adb (Expand_Formal_Container_Loop): Add proper error
2513 checking for container loops so that the index cursor is not
2514 directly changable by the user with the use of E_Loop_Parameter.
2515 * sem_ch5.adb (Analyze_Block_Statement): Revert previous change.
2516 * sem_warn.adb (Check_References): Revert previous change.
2518 2017-09-06 Bob Duff <duff@adacore.com>
2520 * exp_util.adb (Is_Displace_Call): Make sure it works for indirect
2523 2017-09-06 Yannick Moy <moy@adacore.com>
2525 * sem_prag.adb (Analyze_Depends_Global): Reinforce test on object
2526 declarations to only consider valid uses of Global/Depends those on
2527 single concurrent objects.
2529 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
2531 * sem_ch13.adb (Check_Record_Representation_Clause): Give an
2532 error as soon as one of the specified components overlaps the
2535 2017-09-06 Arnaud Charlet <charlet@adacore.com>
2537 * sem_prag.ads: minor fix typo in comment.
2539 2017-09-06 Justin Squirek <squirek@adacore.com>
2541 * sem_ch5.adb (Analyze_Block_Statement): Verify a block comes
2542 from source before checking source references.
2543 * sem_warn.adb (Check_References): Add check for internal block
2546 2017-09-06 Vincent Celier <celier@adacore.com>
2548 * make.adb, makeusg.adb, switch-m.adb, switch-m.ads, make_util.adb,
2549 make_util.ads, sinput.adb, sinput.ads, clean.adb, gnatls.adb,
2550 gnatname.adb: Remove the Project Manager from the GNAT tools.
2551 * gcc-interface/Makefile.in: ditto.
2553 2017-09-06 Bob Duff <duff@adacore.com>
2555 * sem_util.ads: Minor comment fix.
2557 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2559 * sem_ch12.adb (Analyze_Associations, case of Formal_Package):
2560 Generate a freeze node for the actual of a formal package, if
2561 the actual is declared in the same unit and has a corresponding
2562 body, to prevent the current instance from being frozen before
2565 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
2567 * sem_ch7.adb (Entity_Table_Size): Change to nearest prime number.
2569 2017-09-06 Yannick Moy <moy@adacore.com>
2571 * sem_warn.adb: Minor refactoring.
2573 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2575 * einfo.ads, einfo.adb (Get_Classwwide_Pragma): New utility,
2576 to retrieve the inherited classwide precondition/postcondition
2578 * freeze.adb (Freeze_Entity): Use Get_Classwide_Pragma when
2579 freezing a subprogram, to complete the generation of the
2580 corresponding checking code.
2582 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
2584 * exp_util.adb (Is_Controlled_Indexing): New routine.
2585 (Is_Displace_Call): Use routine Strip to remove indirections.
2586 (Is_Displacement_Of_Object_Or_Function_Result): Code clean up. Add a
2587 missing case of controlled generalized indexing.
2588 (Is_Source_Object): Use routine Strip to remove indirections.
2589 (Strip): New routine.
2591 2017-09-06 Bob Duff <duff@adacore.com>
2593 * sysdep.c (__gnat_has_cap_sys_nice): If HAVE_CAPABILITY is defined,
2594 we include the proper header. Otherwise, we just declare the necessary
2595 things from the capabilities library. This is so we can build on
2596 machines without that library, while still enabling that library.
2597 At run time, we're using weak symbols, so __gnat_has_cap_sys_nice will
2598 simply return 0 if the library is not present, or not included
2601 2017-09-06 Pierre-Marie de Rodat <derodat@adacore.com>
2603 * exp_dbug.adb (Debug_Renaming_Declaration): Do not create an encoding
2604 for renamings that involve function calls in prefix form.
2606 2017-09-06 Bob Duff <duff@adacore.com>
2608 * sem_ch3.adb (Analyze_Subtype_Declaration):
2609 Set Has_Delayed_Freeze on a subtype of an incomplete type.
2611 2017-09-06 Pierre-Marie de Rodat <derodat@adacore.com>
2613 * par_sco.adb (Extend_Statement_Sequence): When the accept statement
2614 has no parameter specification and no entry index, use the entry name
2615 as the end of the generated SCO statement.
2617 2017-09-06 Steve Baird <baird@adacore.com>
2619 * exp_util.adb (Side_Effect_Free): For CodePeer (only) treat
2620 uses of 'Image and related attributes as having side effects in
2621 order to avoid replicating such uses.
2622 * pprint.ads (Expression_Image) Add new generic formal flag
2623 Hide_Temp_Derefs. The flag defaults to False; CodePeer will
2624 (eventually) override the default.
2625 * pprint.adb (Expression_Image) If the new flag is set, then
2626 suppress the ".all" suffix when displaying a dereference whose
2627 prefix is a use of a value-capturing compiler temp of the sort
2628 generated by Expr_Util.Remove_Side_Effects .
2629 * exp_attr.adb, g-catiio.adb, inline.adb, sem_attr.adb, sem_ch13.adb,
2630 sem_ch7.adb, sem_dim.adb, sem_util.adb, sem_util.ads, sem_warn.adb:
2632 * inline.adb: Minor wording change.
2634 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
2636 * sem_ch7.adb: Update comment.
2638 2017-09-06 Yannick Moy <moy@adacore.com>
2640 * einfo.adb, einfo.ads (Is_Subprogram_Or_Entry): New predicate.
2641 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Use new function.
2642 * sem_util.adb, sem_util.ads (Within_Protected_Type): Renaming
2643 with slight modification from Is_Subp_Or_Entry_Inside_Protected,
2644 so that applies to any entity.
2646 2017-09-06 Yannick Moy <moy@adacore.com>
2648 * sem_ch3.adb (Derived_Type_Declaration): Use
2649 Incomplete_Or_Partial_View rather than local Find_Partial_View.
2651 2017-09-06 Javier Miranda <miranda@adacore.com>
2653 * g-catiio.ads, g-catiio.adb (Value): Extended to parse an UTC time
2656 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2658 * sem_dim.adb (Analyze_Dimension): In an instance, a type
2659 conversion takes its dimensions from the expression, not from
2661 (Dimensions_Of_Operand): Ditto.
2663 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2665 * exp_ch6.adb (Expand_Call_Helper): Do not optimize calls to
2666 null procedures when GNAT coverage is used, so that their (empty)
2667 bodies are properly covered.
2669 2017-09-06 Bob Duff <duff@adacore.com>
2671 * sem_ch13.adb (Resolve_Aspect_Expressions): If
2672 the entity is a type with discriminants, make the discriminants
2673 directly visible in aspect clauses.
2675 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2677 * sem_res.adb (Resolve_Arithmentic_Op): If both operands are
2678 Universal_Real and the context is a floating-point type, resolve
2679 both operands to the target type.
2681 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
2683 * a-comlin.adb, exp_aggr.adb, exp_ch6.adb, frontend.adb, gnatbind.adb,
2684 sem_ch3.adb, sem_util.adb: Minor reformatting.
2686 2017-09-06 Yannick Moy <moy@adacore.com>
2688 * freeze.adb (Check_Inherited_Conditions): Rewriting
2689 of inherited preconditions and postconditions should only occur
2690 in GNATprove mode, that is, when GNATprove_Mode is True, not to
2691 be confused with SPARK_Mode being On.
2693 2017-09-06 Yannick Moy <moy@adacore.com>
2695 * sem_warn.adb (Check_References): Take into
2696 account possibility of attribute reference as original node.
2698 2017-09-06 Yannick Moy <moy@adacore.com>
2700 * exp_attr.adb (Expand_N_Attribute_Reference): Protect against invalid
2703 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
2705 * inline.adb (Split_Unconstrained_Function): Also set Is_Inlined
2706 on the procedure created to encapsulate the body.
2707 * sem_ch7.adb: Add with clause for GNAT.HTable.
2708 (Entity_Table_Size): New constant.
2709 (Entity_Hash): New function.
2710 (Subprogram_Table): New instantiation of GNAT.Htable.Simple_HTable.
2711 (Is_Subprogram_Ref): Rename into...
2712 (Scan_Subprogram_Ref): ...this. Record references to subprograms in
2713 the table instead of bailing out on them. Scan the value of constants
2714 if it is not known at compile time.
2715 (Contains_Subprograms_Refs): Rename into...
2716 (Scan_Subprogram_Refs): ...this.
2717 (Has_Referencer): Scan the body of all inlined subprograms. Reset the
2718 Is_Public flag on subprograms if they are not actually referenced.
2719 (Hide_Public_Entities): Beef up comment on the algorithm.
2720 Reset the table of subprograms on entry.
2722 2017-09-06 Yannick Moy <moy@adacore.com>
2724 * inline.adb: Add comments to Can_Be_Inlined_In_GNATprove_Mode.
2726 2017-09-06 Javier Miranda <miranda@adacore.com>
2728 * exp_aggr.adb (Component_Not_OK_For_Backend): The C backend
2729 cannot handle a type conversion of an array as an aggregate
2732 2017-09-06 Bob Duff <duff@adacore.com>
2734 * g-comlin.adb (Try_Help): Remove ".exe" so we
2735 get the same results on windows and unix.
2737 2017-09-06 Justin Squirek <squirek@adacore.com>
2739 * exp_imgv.adb (Expand_Image_Attribute),
2740 (Expand_Wide_Image_Attribute), (Expand_Wide_Wide_Image_Attribute):
2741 Added case to handle new-style 'Image expansion
2742 (Rewrite_Object_Image): Moved from exp_attr.adb
2743 * exp_attr.adb (Expand_N_Attribute_Reference): Modified Image
2744 attribute cases so that the relevant subprograms in exp_imgv.adb
2745 handle all expansion.
2746 (Rewrite_Object_Reference_Image): Moved to exp_imgv.adb
2747 * sem_attr.adb (Analyze_Attribute): Modified Image attribute
2748 cases to call common function Analyze_Image_Attribute.
2749 (Analyze_Image_Attribute): Created as a common path for all
2750 image attributes (Check_Object_Reference_Image): Removed
2751 * sem_util.ads, sem_util.adb (Is_Image_Applied_To_Object):
2752 Removed and refactored into Is_Object_Image (Is_Object_Image):
2753 Created as a replacement for Is_Image_Applied_To_Object
2755 2017-09-06 Yannick Moy <moy@adacore.com>
2757 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add continuation
2758 message for missing input.
2760 2017-09-06 Yannick Moy <moy@adacore.com>
2762 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Prevent inlining
2763 of protected subprograms and entries.
2764 * sem_util.adb, sem_util.ads (Is_Subp_Or_Entry_Inside_Protected):
2765 New function to detect when a subprogram of entry is defined
2766 inside a protected object.
2768 2017-09-06 Bob Duff <duff@adacore.com>
2770 * sysdep.c (__gnat_has_cap_sys_nice): New function to determine
2771 whether the current process has the CAP_SYS_NICE capability.
2772 * s-taprop-linux.adb (Get_Ceiling_Support): Update this to allow
2773 ceiling priorities if the current process has the CAP_SYS_NICE
2776 2017-09-06 Bob Duff <duff@adacore.com>
2778 * a-comlin.ads, a-comlin.adb (Argument): Move the constraint
2779 check back to the body, because SPARK is not yet ready for
2780 "or else raise Constraint_Error".
2782 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2784 * exp_ch6.adb (Expand_Call_Helper): Replace call to null
2785 procedure by a single null statement, after evaluating the
2786 actuals that require it.
2788 2017-09-06 Javier Miranda <miranda@adacore.com>
2790 * exp_aggr.adb (Backend_Processing_Possible.Component_Check):
2791 Generating C code improve the code that checks the use of nested
2792 aggregates to initialize object declarations.
2794 2017-09-06 Yannick Moy <moy@adacore.com>
2796 * sem_ch3.adb (Derived_Type_Declaration): Detect
2797 violations of new rule SPARK RM 3.4(1). Also refactor existing
2798 check to use the new function Find_Partial_View.
2800 2017-09-06 Vincent Celier <celier@adacore.com>
2802 * gnatcmd.adb: gnat ls -V -P... invokes gprls -V -P... The code
2803 from the Prj hierarchy has been removed from the GNAT driver.
2805 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2807 * sem_type.adb (Interface_Present_In_Ancestor): Within an
2808 expression function, or within a spec expression (default value,
2809 etc) a reference to an incomplete type is legal: legality of
2810 the operation will be checked when some related entity (type,
2811 object or subprogram) is frozen.
2813 2017-09-06 Gary Dismukes <dismukes@adacore.com>
2815 * exp_ch5.adb, s-diinio.ads, sem_ch4.adb, s-diflio.ads: Minor spelling
2816 adjustments and a typo fix.
2818 2017-09-06 Yannick Moy <moy@adacore.com>
2820 * sem_res.adb (Resolve_Call): Do not issue info
2821 message about inlining of calls to functions in assertions,
2822 for functions whose body has not been seen yet.
2824 2017-09-06 Bob Duff <duff@adacore.com>
2826 * a-comlin.ads, a-comlin.adb (Argument): Simplify the code, now that
2827 we can use modern Ada in this package.
2828 * s-resfil.ads, s-resfil.adb, a-clrefi.ads, a-clrefi.adb:
2829 Move Ada.Command_Line.Response_File to System.Response_File,
2830 and make Ada.Command_Line.Response_File into a rename of
2831 System.Response_File. This is to avoid having gnatbind depend
2832 Ada.Command_Line, which would damage the bootstrap process now
2833 that Ada.Command_Line contains modern Ada (the raise expression).
2834 * gnatbind.adb: Avoid dependence on
2835 Ada.Command_Line. Depend on System.Response_File instead
2836 of Ada.Command_Line.Response_File. Change one call to
2837 Ada.Command_Line.Command_Name to use Fill_Arg. Change one call
2838 to Ada.Command_Line.Argument_Count to use Arg_Count.
2839 * gcc-interface/Make-lang.in, Makefile.rtl: Take note of the new files.
2841 2017-09-06 Bob Duff <duff@adacore.com>
2843 * frontend.adb (Frontend): Skip -gnatec=gnat.adc
2844 switch, because we've already read gnat.adc by default.
2846 2017-09-06 Bob Duff <duff@adacore.com>
2848 * exp_ch5.adb (Get_Default_Iterator): Replace
2849 "Assert(False)" with "return Iter", because if an iterable
2850 type is derived from a noniterable one, then we won't find an
2851 overriding or inherited default iterator.
2853 2017-09-06 Yannick Moy <moy@adacore.com>
2855 * sem_warn.adb (Warn_On_Suspicious_Index): Improve warning when the
2856 literal index used to access a string is null or negative.
2858 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
2860 * einfo.adb (Status_Flag_Or_Transient_Decl): The attribute is now
2861 allowed on loop parameters.
2862 (Set_Status_Flag_Or_Transient_Decl): The attribute is now allowed
2864 (Write_Field15_Name): Update the output for
2865 Status_Flag_Or_Transient_Decl.
2866 * einfo.ads: Attribute Status_Flag_Or_Transient_Decl now applies
2867 to loop parameters. Update the documentation of the attribute
2868 and the E_Loop_Parameter entity.
2869 * exp_ch7.adb (Process_Declarations): Remove the bogus guard
2870 which assumes that cursors can never be controlled.
2871 * exp_util.adb (Requires_Cleanup_Actions): Remove the bogus
2872 guard which assumes that cursors can never be controlled.
2874 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
2876 * exp_attr.adb, sem_util.adb, sem_attr.adb, sem_ch6.adb, sem_ch8.adb,
2877 sem_warn.adb: Minor reformatting.
2879 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2881 * sem_warn.adb (Warn_On_Overlapping_Actuals): Refine previous
2882 fix and preserve older GNAT warning on overlapping actuals that
2883 are not elementary types.
2885 2017-09-06 Justin Squirek <squirek@adacore.com>
2887 * sem_attr.adb: Comment correction.
2889 2017-09-06 Gary Dismukes <dismukes@adacore.com>
2891 * sem_util.adb: Minor reformatting.
2893 2017-09-06 Yannick Moy <moy@adacore.com>
2895 * a-comlin.ads (Argument): Add precondition for analysis.
2897 2017-09-06 Yannick Moy <moy@adacore.com>
2899 * sem_res.adb (Resolve): Update message for function call as statement.
2901 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2903 * sem_ch6.adb (Check_Returns): Clean up warnings coming from
2904 generated bodies for renamings that are completions, when renamed
2905 procedure is No_Return.
2906 * sem_ch8.adb (Analyze_Subprogram_Renaming): Implement legality
2907 rule in 6.5.1 (7/2): if a renaming is a completion of a subprogram
2908 with No_Return, the renamed entity must be No_Return as well.
2910 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
2912 * exp_ch5.adb, freeze.adb, exp_ch4.adb, exp_ch6.adb, lib-xref.adb:
2915 2017-09-06 Justin Squirek <squirek@adacore.com>
2917 * exp_attr.adb (Expand_N_Attribute_Reference): Modified Image
2918 attribute cases (Rewrite_Object_Reference_Image): Created to
2919 aid the rewriting of new-style 'Image attributes.
2920 * sem_attr.adb (Analyze_Attribute): Modified Image attribute cases
2921 (Check_Object_Reference_Image): Created to handle verification of
2922 'Image with object-references as prefixes.
2923 * sem_util.ads, sem_util.adb (Is_Image_Applied_To_Object):
2924 Create predicate to identify cases where an 'Image attribute's
2925 prefix applies to an object reference.
2927 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2929 * freeze.adb (Freeze_Entity): Do not generate a freeze
2930 node for a generic unit, even if it includes delayed aspect
2931 specifications. Freeze nodes for generic entities must never
2932 appear in the tree that reaches the back-end of the compiler.
2934 2017-09-06 Yannick Moy <moy@adacore.com>
2936 * treepr.adb (Print_Entity_Info): Do not print empty Elist.
2938 2017-09-06 Yannick Moy <moy@adacore.com>
2940 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do not consider calls
2941 to subprograms in other units as possibly inlined.
2943 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2945 * freeze.adb (Freeze_Entity): For a derived type that has no
2946 explicit delayed aspects but may inherit delayed aspects from its
2947 parent type, analyze aspect at freeze point for proper capture
2948 of an inherited aspect.
2950 2017-09-06 Arnaud Charlet <charlet@adacore.com>
2952 * lib-xref.adb (Get_Through_Renamings): Get through subprogram
2953 renamings; also, avoid repeated calls to Renamed_Object when getting
2954 through object renamings.
2956 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2958 * sem_ch3.adb (Array_Type_Declaration): Handle properly an
2959 array type declaration in a private part, when an index is a
2960 subtype indication of a discrete type with a private partial view.
2962 2017-09-06 Javier Miranda <miranda@adacore.com>
2964 * exp_ch4.adb (Expand_Modular_Op): Force generating
2965 temporary to improve the generated code.
2967 2017-09-06 Tristan Gingold <gingold@adacore.com>
2969 * s-fatgen.adb: Minor typo fix in comment.
2971 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2973 * exp_ch5.adb (Make_Field_Assign): If the type
2974 of the right-hand side has stored constraint, use its values
2975 (except for those that are renamings of parent discriminants)
2976 to produce additional assignments for the discriminants of the
2977 left-hand side, which are invisible in the righ-hand side and
2978 not retrievable as selected components.
2980 2017-09-06 Ed Schonberg <schonberg@adacore.com>
2982 * sem_util.adb (Needs_One_Formal): The first formal of such a
2983 function must be a controlling formal, so that Obj.F (X, Y)
2984 can have the interpretation F(Obj)(X, Y).
2985 * sem_util.ads: Clarify documentation.
2987 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
2989 * table.ads, table.adb: Restore original implementation.
2990 * namet.h (Names_Ptr): Adjust back.
2991 (Name_Chars_Ptr): Likewise.
2992 * uintp.h (Uints_Ptr): Likewise.
2993 (Udigits_Ptr): Likewise.
2994 * g-table.ads: Remove pragma Compiler_Unit_Warning.
2995 * par_sco.adb: Do not with GNAT.Table and use Table consistently.
2996 * scos.ads: Replace GNAT.Table with Table and adjust instantiations.
2997 * spark_xrefs.ads: Likewise.
2998 * scos.h: Undo latest changes.
3000 2017-09-06 Ed Schonberg <schonberg@adacore.com>
3002 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Propagate
3003 No_Return flag to instance if pragma applies to generic unit. This
3004 must be done explicitly because the pragma does not appear
3005 directly in the generic declaration (unlike the corresponding
3006 aspect specification).
3008 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
3010 * sem_ch7.adb (Has_Referencer): Move up and expand comment
3011 explaining the test used to detect inlining. Use same test
3012 in second occurrence.
3013 (Analyze_Package_Body_Helper): Minor formatting fixes.
3015 2017-09-06 Ed Schonberg <schonberg@adacore.com>
3017 * exp_ch4.adb (Handle_Changed_Representation): For an untagged
3018 derived type with a mixture of renamed and constrained parent
3019 discriminants, the constraint for the target must obtain the
3020 discriminant values from both the operand and from the stored
3021 constraint for it, given that the constrained discriminants are
3022 not visible in the object.
3023 * exp_ch5.adb (Make_Field_Assign): The type of the right-hand
3024 side may be derived from that of the left-hand side (as in the
3025 case of an assignment with a change of representation) so the
3026 discriminant to be used in the retrieval of the value of the
3027 component must be the entity in the type of the right-hand side.
3029 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
3031 * sem_ch3.adb, sem_ch7.adb, sem_util.adb, g-debpoo.adb, sem_ch4.adb,
3032 sem_ch6.adb, sem_ch8.adb: Minor reformatting.
3033 * exp_util.adb (Is_Source_Object): Account for
3034 the cases where the source object may appear as a dereference
3035 or within a type conversion.
3036 * exp_ch6.adb: Fix missing space in error message.
3038 2017-09-06 Ed Schonberg <schonberg@adacore.com>
3040 * sem_prag.adb: Update description of Eliminate.
3042 2017-09-06 Ed Schonberg <schonberg@adacore.com>
3044 * sem_attr.adb (Analyze_Attribute, case 'Loop_Entry): Handle
3045 properly an attribute reference 'Loop_Entry that appears in the
3046 list of indices of an indexed expression, to prevent an infinite
3047 loop in the compiler.
3049 2017-09-06 Bob Duff <duff@adacore.com>
3051 * s-fileio.adb (Name): Do not raise Use_Error for temp files.
3053 2017-09-06 Ed Schonberg <schonberg@adacore.com>
3055 * sem_ch4.adb (Analyze_Set_Membership): If an alternative
3056 in a set membership is an overloaded enumeration literal, and
3057 the type of the alternative is resolved from a previous one,
3058 replace the entity of the alternative as well as the type,
3059 to prevent inconsistencies between the entity and the type.
3061 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
3063 * ali.ads (ALIs_Record): Add No_Component_Reordering component.
3064 (No_Component_Reordering_Specified): New switch.
3065 * ali.adb (Initialize_ALI): Set No_Component_Reordering_Specified.
3066 (Scan_ALI): Set No_Component_Reordering and deal with NC marker.
3067 * bcheck.adb (Check_Consistent_No_Component_Reordering):
3069 (Check_Configuration_Consistency): Invoke it.
3070 * debug.adb (d.r): Toggle the effect of the switch.
3071 (d.v): Change to no-op.
3072 * einfo.ads (Has_Complex_Representation):
3073 Restrict to record types.
3074 (No_Reordering): New alias for Flag239.
3075 (OK_To_Reorder_Components): Delete.
3076 (No_Reordering): Declare.
3077 (Set_No_Reordering): Likewise.
3078 (OK_To_Reorder_Components): Delete.
3079 (Set_OK_To_Reorder_Components): Likewise.
3080 * einfo.adb (Has_Complex_Representation): Expect record types.
3081 (No_Reordering): New function.
3082 (OK_To_Reorder_Components): Delete.
3083 (Set_Has_Complex_Representation): Expect base record types.
3084 (Set_No_Reordering): New procedure.
3085 (Set_OK_To_Reorder_Components): Delete.
3086 (Write_Entity_Flags): Adjust to above change.
3087 * fe.h (Debug_Flag_Dot_R): New macro and declaration.
3088 * freeze.adb (Freeze_Record_Type): Remove conditional code setting
3089 OK_To_Reorder_Components on record types with convention Ada.
3090 * lib-writ.adb (Write_ALI): Deal with NC marker.
3091 * opt.ads (No_Component_Reordering): New flag.
3092 (No_Component_Reordering_Config): Likewise.
3093 (Config_Switches_Type): Add No_Component_Reordering component.
3094 * opt.adb (Register_Opt_Config_Switches): Copy
3095 No_Component_Reordering onto No_Component_Reordering_Config.
3096 (Restore_Opt_Config_Switches): Restore No_Component_Reordering.
3097 (Save_Opt_Config_Switches): Save No_Component_Reordering.
3098 (Set_Opt_Config_Switches): Set No_Component_Reordering.
3099 * par-prag.adb (Prag): Deal with Pragma_No_Component_Reordering.
3100 * sem_ch3.adb (Analyze_Private_Extension_Declaration): Also set the
3101 No_Reordering flag from the default.
3102 (Build_Derived_Private_Type): Likewise.
3103 (Build_Derived_Record_Type): Likewise. Then inherit it
3104 for untagged types and clean up handling of similar flags.
3105 (Record_Type_Declaration): Likewise.
3106 * sem_ch13.adb (Same_Representation): Deal with No_Reordering and
3107 remove redundant test on Is_Tagged_Type.
3108 * sem_prag.adb (Analyze_Pragma): Handle No_Component_Reordering.
3109 (Sig_Flags): Likewise.
3110 * snames.ads-tmpl (Name_No_Component_Reordering): New name.
3111 (Pragma_Id): Add Pragma_No_Component_Reordering value.
3112 * warnsw.adb (Set_GNAT_Mode_Warnings): Enable -gnatw.q as well.
3113 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>:
3114 Copy the layout of the parent type only if the No_Reordering
3116 (components_to_record): Reorder record types with
3117 convention Ada by default unless No_Reordering is set or -gnatd.r
3118 is specified and do not warn if No_Reordering is set in GNAT mode.
3120 2017-09-06 Ed Schonberg <schonberg@adacore.com>
3122 * sem_util.ads, sem_util.adb (Check_Previous_Null_Procedure):
3123 new predicate to reject declarations that can be completions,
3124 when there is a visible prior homograph that is a null procedure.
3125 * sem_ch6.adb (Analyze_Null_Procedure): use it.
3126 * sem_ch8.adb (Analyze_Subprogram_Renaming): ditto.
3128 2017-09-06 Thomas Quinot <quinot@adacore.com>
3130 * s-regpat.adb (Compile.Parse_Literal): Fix handling of literal
3131 run of 253 characters or more.
3133 2017-09-06 Ed Schonberg <schonberg@adacore.com>
3135 * einfo.adb (Designated_Type): Use Is_Incomplete_Type to handle
3136 properly incomplete subtypes that may be created by explicit or
3137 implicit declarations.
3138 (Is_Base_Type): Take E_Incomplete_Subtype into account.
3139 (Subtype_Kind): Ditto.
3140 * sem_ch3.adb (Build_Discriminated_Subtype): Set properly the
3141 Ekind of a subtype of a discriminated incomplete type.
3142 (Fixup_Bad_Constraint): Use Subtype_Kind in all cases, including
3143 incomplete types, to preserve error reporting.
3144 (Process_Incomplete_Dependents): Do not create a subtype
3145 declaration for an incomplete subtype that is created internally.
3146 * sem_ch7.adb (Analyze_Package_Specification): Handle properly
3147 incomplete subtypes that do not require a completion, either
3148 because they are limited views, of they are generic actuals.
3150 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
3152 * checks.adb (Insert_Valid_Check): Remove the
3153 suspicious manipulation of the Do_Range_Check flag as ths is
3154 no linger needed. Suppress validity check when analysing the
3155 validation variable.
3157 2017-09-06 Philippe Gil <gil@adacore.com>
3159 * g-debpoo.adb: adapt GNAT.Debug_Pools to allow safe thread
3162 2017-09-06 Bob Duff <duff@adacore.com>
3164 * sem_elim.adb: Minor comment fix.
3166 2017-09-06 Ed Schonberg <schonberg@adacore.com>
3168 * sem_util.adb (Is_Object_Reference): A function call is an
3169 object reference, and thus attribute references for attributes
3170 that are functions (such as Pred and Succ) as well as predefined
3171 operators are legal in contexts that require an object, such as
3172 the prefix of attribute Img and the Ada2020 version of 'Image.
3174 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
3176 * exp_util.adb, einfo.adb, sem_attr.adb, exp_ch4.adb, gnatls.adb,
3177 exp_ch3.adb, xoscons.adb: Minor reformatting.
3179 2017-09-06 Raphael Amiard <amiard@adacore.com>
3181 * a-chtgop.ads, a-chtgop.adb: Add versions of First and Next with
3182 Position parameter. If supplied, use it to provide efficient iteration.
3183 * a-cohase.ads, a-cohase.adb, a-cihama.ads, a-cihama.adb,
3184 a-cohama.ads, a-cohama.adb: Add/Use Position to provide efficient
3187 2017-09-06 Ed Schonberg <schonberg@adacore.com>
3189 * exp_util.adb (Build_Allocate_Deallocate_Proc): If the
3190 designated type is class-wide and the expression is an unchecked
3191 conversion, preserve the conversion when checking the tag of the
3192 designated object, to prevent spurious semantic errors when the
3193 expression in the conversion has an untagged type (for example
3194 an address attribute).
3196 2017-09-06 Ed Schonberg <schonberg@adacore.com>
3198 * sem_res.adb (Resolve_Entry_Call): Check whether a protected
3199 operation is subject to a pragma Eliminate.
3201 2017-09-06 Ed Schonberg <schonberg@adacore.com>
3203 * sem_elim.ads, exp_ch4.adb: Minor reformatting.
3205 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
3207 * fe.h (Eliminate_Error_Msg): Remove.
3209 2017-09-05 Richard Sandiford <richard.sandiford@linaro.org>
3211 * gcc-interface/utils.c (make_packable_type): Update call to
3214 2017-09-05 Richard Sandiford <richard.sandiford@linaro.org>
3216 * gcc-interface/utils2.c (build_load_modify_store):
3217 Use int_mode_for_size.
3219 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
3222 * gcc-interface/decl.c (gnat_to_gnu_entity): Skip regular processing
3223 for Itypes that are E_Record_Subtype with a cloned subtype.
3224 <E_Record_Subtype>: Use the DECL of the cloned type directly, if any.
3226 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
3228 * gcc-interface/trans.c (convert_with_check): Use a custom base type
3229 if the base type of the expression has a different machine mode.
3230 Rename a couple of parameters and local variable.
3232 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
3234 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Address>: Do not strip
3235 conversions around prefixes that are not references.
3237 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
3239 * gcc-interface/utils.c (unchecked_convert): When the result type is a
3240 non-biased integral type with size 0, set the result to 0 directly.
3242 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
3244 * gcc-interface/gigi.h (renaming_from_generic_instantiation_p): Turn to
3245 (renaming_from_instantiation_p): ...this.
3246 * gcc-interface/decl.c (gnat_to_gnu_entity): Use inline predicate
3247 instead of explicit tests on kind of entities. Adjust for renaming.
3248 (gnat_to_gnu_profile_type): Likewise.
3249 (gnat_to_gnu_subprog_type): Likewise.
3250 * gcc-interface/trans.c (Identifier_to_gnu): Likewise.
3251 (Case_Statement_to_gnu): Likewise.
3252 (gnat_to_gnu): Likewise.
3253 (process_freeze_entity): Likewise.
3254 (process_type): Likewise.
3255 (add_stmt_with_node): Adjust for renaming.
3256 * gcc-interface/utils.c (gnat_pushdecl): Adjust for renaming.
3257 (renaming_from_generic_instantiation_p): Rename to...
3258 (renaming_from_instantiation_p): ...this. Use inline predicate.
3259 (pad_type_hasher::keep_cache_entry): Fold.
3261 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
3263 * gcc-interface/trans.c (adjust_for_implicit_deref): New function.
3264 (gnat_to_gnu) <N_Explicit_Dereference>: Translate result type first.
3265 (N_Indexed_Component): Invoke adjust_for_implicit_deref on the prefix.
3266 (N_Slice): Likewise.
3267 (N_Selected_Component): Likewise. Do not try again to translate it.
3268 (N_Free_Statement): Invoke adjust_for_implicit_deref on the expression.
3270 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
3272 * repinfo.ads: Document new treatment of dynamic values.
3273 (TCode): Bump upper bound to 29.
3274 (Dynamic_Val): New constant set to 29.
3275 * repinfo.adb (Print_Expr) <Dynamic_Val>: New case.
3276 (Rep_Value) <Dynamic_Val>: Likewise.
3277 * repinfo.h (Dynamic_Val): New macro.
3278 * gcc-interface/decl.c (annotate_value): Tidy up and cache result for
3280 <INTEGER_CST>: Set TCODE instead of recursing.
3281 <COMPONENT_REF>: Set TCODE instead of calling Create_Node manually.
3282 <VAR_DECL>: New case.
3283 <MULT_EXPR, PLUS_EXPR>: Fold conversions into inner operations.
3284 <BIT_AND_EXPR>: Adjust.
3285 <CALL_EXPR>: Do not fall through.
3287 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
3289 * gcc-interface/trans.c (Call_to_gnu): If this is a function call and
3290 there is no target, do not create a temporary for the return value for
3291 an allocator either.
3293 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
3295 * gcc-interface/trans.c (pos_to_constructor): Skip conversions to an
3296 unconstrained array type.
3298 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3299 Alan Hayward <alan.hayward@arm.com>
3300 David Sherwood <david.sherwood@arm.com>
3302 * gcc-interface/decl.c (validate_size): Use NARROWEST_INT_MODE
3303 instead of GET_CLASS_NARROWEST_MODE (MODE_INT).
3305 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3306 Alan Hayward <alan.hayward@arm.com>
3307 David Sherwood <david.sherwood@arm.com>
3309 * gcc-interface/decl.c (check_ok_for_atomic_type): Use
3310 is_a <scalar_int_mode>.
3311 * gcc-interface/trans.c (Pragma_to_gnu): Likewise.
3312 * gcc-interface/utils.c (gnat_type_for_mode): Likewise.
3314 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3315 Alan Hayward <alan.hayward@arm.com>
3316 David Sherwood <david.sherwood@arm.com>
3318 * gcc-interface/decl.c (gnat_to_gnu_entity): Use int_mode_for_size
3319 instead of mode_for_size.
3320 (gnat_to_gnu_subprog_type): Likewise.
3321 * gcc-interface/utils.c (make_type_from_size): Likewise.
3323 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3324 Alan Hayward <alan.hayward@arm.com>
3325 David Sherwood <david.sherwood@arm.com>
3327 * gcc-interface/misc.c (fp_prec_to_size): Use opt_scalar_float_mode.
3328 (fp_size_to_prec): Likewise.
3330 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3331 Alan Hayward <alan.hayward@arm.com>
3332 David Sherwood <david.sherwood@arm.com>
3334 * gcc-interface/utils.c (gnat_type_for_mode): Use is_a
3335 <scalar_float_mode> instead of SCALAR_FLOAT_MODE_P.
3337 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3338 Alan Hayward <alan.hayward@arm.com>
3339 David Sherwood <david.sherwood@arm.com>
3341 * gcc-interface/decl.c (validate_size): Update use of
3342 GET_MODE_WIDER_MODE, forcing a wider mode to exist.
3344 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3345 Alan Hayward <alan.hayward@arm.com>
3346 David Sherwood <david.sherwood@arm.com>
3348 * gcc-interface/misc.c (fp_prec_to_size): Use new mode iterators.
3349 (fp_size_to_prec): Likewise.
3351 2017-08-29 Martin Liska <mliska@suse.cz>
3354 * gcc-interface/trans.c (Pragma_to_gnu): Set argument to NULL.
3356 2017-08-08 Martin Liska <mliska@suse.cz>
3358 * gcc-interface/trans.c: Include header files.
3360 2017-07-29 Jakub Jelinek <jakub@redhat.com>
3362 * gcc-interface/utils.c (gnat_write_global_declarations): Pass false
3363 as new argument to the imported_module_or_decl debug hook.
3365 2017-07-25 Javier Miranda <miranda@adacore.com>
3367 * checks.adb (Apply_Divide_Checks): Ensure that operands are not
3370 2017-07-19 Jakub Jelinek <jakub@redhat.com>
3372 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE,
3373 TYPE_GCC_MIN_VALUE): Use TYPE_MIN_VALUE_RAW instead of TYPE_MINVAL.
3374 (TYPE_GCC_MAX_VALUE): Use TYPE_MAX_VALUE_RAW instead of TYPE_MAXVAL.
3376 2017-07-18 Mike Frysinger <vapier@chromium.org>
3378 * gcc-interface/Makefile.in (../../gnatmake$(exeext)): Delete $(P).
3379 (../../gnatlink$(exeext)): Likewise.
3381 2017-07-15 John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
3384 * system-linux-m68k.ads: Add pragma No_Elaboration_Code_All.
3385 (Backend_Overflow_Checks): Set to True.
3387 2017-06-23 Jakub Jelinek <jakub@redhat.com>
3389 * gcc-interface/trans.c (gnat_to_gnu): Initialize sync to false.
3391 2017-06-21 Pierre-Marie de Rodat <derodat@adacore.com>
3393 * gcc-interface/ada-tree.h (DECL_FUNCTION_IS_DEF): Update copyright
3395 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Tag the subprogram
3397 (Compilation_Unit_to_gnu): Tag the elaboration procedure as a
3399 * gcc-interface/decl.c (gnat_to_gnu_entity): Tag declarations of
3400 imported subprograms for the current compilation unit as
3401 definitions. Disable debug info for references to variables.
3402 * gcc-interface/gigi.h (create_subprog_decl): Update declaration.
3403 * gcc-interface/utils.c (gnat_pushdecl): Add external DECLs that are
3404 not built-in functions to their binding scope.
3405 (create_subprog_decl): Add a DEFINITION parameter. If it is true, tag
3406 the function as a definition. Update all callers.
3407 (gnat_write_global_declarations): Emit debug info for imported
3408 functions. Filter out external variables for which debug info
3411 2017-06-15 Nicolas Boulenguez <nicolas.boulenguez@free.fr>
3414 * gcc-interface/Makefile.in (x86 kfreebsd): Adjust system.ads setting.
3415 (i[3456]86-pc-gnu): Likewise.
3416 (x86_64 kfreebsd): Likewise.
3418 2017-06-12 Eric Botcazou <ebotcazou@adacore.com>
3421 * exp_ch3.adb (Make_Predefined_Primitive_Specs): Use Positive index.
3423 2017-06-12 Eric Botcazou <ebotcazou@adacore.com>
3426 * s-interr-hwint.adb: Reinstate.
3427 * gcc-interface/Makefile.in (RTEMS): Use it again.
3429 2017-06-08 Olivier Hainque <hainque@adacore.com>
3431 * vx_crtbegin_auto.c: Update year in copyright notice.
3432 * vx_crtbegin.c: Likewise.
3433 * vx_crtbegin.inc: Likewise.
3434 * vx_crtend.c: Likewise.
3436 2017-06-07 Sebastian Huber <sebastian.huber@embedded-brains.de>
3438 * Makefile.in (rtems): Use TLS implementation for s-tpopsp.adb.
3439 * s-tpopsp-rtems.adb: Delete.
3441 2017-06-02 Olivier Hainque <hainque@adacore.com>
3443 * vx_crtbegin_auto.c: New file.
3444 * vx_crtbegin.c: New file.
3445 * vx_crtbegin.inc: New file.
3446 * vx_crtend.c: New file.
3448 2017-05-25 Jonathan Wakely <jwakely@redhat.com>
3450 * gcc-interface/utils2.c (compare_elmt_bitpos): Remove redundant
3451 const qualifiers that cause -Wignored-qualifiers warnings.
3453 2017-05-22 Eric Botcazou <ebotcazou@adacore.com>
3455 * gcc-interface/decl.c (gnat_to_gnu_entity): Skip regular processing
3456 for Itypes that are E_Access_Subtype.
3457 <E_Access_Subtype>: Use the DECL of the base type directly.
3459 2017-05-22 Ed Schonberg <schonberg@adacore.com>
3460 Eric Botcazou <ebotcazou@adacore.com>
3462 * sem_ch4.adb (Analyze_Call): In Ada2012 an incomplete type from a
3463 limited view may appear in the profile of a function, and a call to
3464 that function in another unit in which the full view is available must
3465 use this full view to spurious type errors at the point of call.
3466 * inline.adb (Analyze_Inlined_Bodies): Remove restriction on loading
3467 of parent body with a with clause for the main unit.
3468 * gcc-interface/decl.c (defer_limited_with_list): Document new usage.
3469 (gnat_to_gnu_entity) <E_Access_Type>: Handle completed Taft Amendment
3470 types declared in external units like types from limited with clauses.
3471 Adjust final processing of defer_limited_with_list accordingly.
3472 * gcc-interface/trans.c (gnat_to_gnu) < N_Selected_Component>: Try
3473 again to translate the prefix after the field if it is incomplete.
3475 2017-05-22 Eric Botcazou <ebotcazou@adacore.com>
3477 * gcc-interface/decl.c (gnat_to_gnu_field): Do not enforce strict
3478 alignment for simple volatile fields and remove associated errors.
3480 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
3482 * gcc-interface/gigi.h (get_elaboration_procedure): Delete.
3483 * gcc-interface/trans.c (get_elaboration_procedure): Make static.
3485 2017-05-15 Pierre-Marie de Rodat <derodat@adacore.com>
3487 * gcc-interface/utils.c (can_materialize_object_renaming_p):
3488 Synchronize with GNAT's Exp_Dbug.Debug_Renaming_Declaration:
3489 process Original_Node instead of expanded names.
3491 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
3493 * gcc-interface/trans.c (return_value_ok_for_nrv_p): Only apply the
3494 addressability check in the constrained case.
3496 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
3498 * gcc-interface/trans.c (Identifier_to_gnu): Also accept incomplete
3499 types not coming from a limited context.
3501 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
3503 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Skip subprograms on
3504 the inlined list that are not public.
3505 * gcc-interface/utils.c (create_subprog_decl): Clear TREE_PUBLIC if
3506 there is a pragma Inline_Always on the subprogram.
3508 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
3510 * gcc-interface/trans.c (gnat_to_gnu) <N_Aggregate>: Fix formatting.
3511 <N_Allocator>: Use properly typed constants.
3512 (extract_values): Move around.
3513 (pos_to_constructor): Minor tweaks.
3514 (Sloc_to_locus): Fix formatting.
3515 * gcc-interface/utils.c (process_deferred_decl_context): Minor tweaks.
3516 * gcc-interface/gigi.h (MARK_VISITED): Remove blank line.
3517 (Gigi_Equivalent_Type): Adjust head comment.
3518 * gcc-interface/decl.c (Gigi_Equivalent_Type): Likewise.
3520 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
3522 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: When there
3523 is a representation clause on an extension, propagate the alignment of
3524 the parent type only if the platform requires strict alignment.
3526 2017-05-12 Eric Botcazou <ebotcazou@adacore.com>
3528 * system-linux-arm.ads (Memory_Size): Use Long_Integer'Size
3529 instead of Word_Size.
3532 2017-03-28 Andreas Schwab <schwab@suse.de>
3535 * system-linux-aarch64-ilp32.ads: New file.
3536 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS_COMMON): Rename
3537 from LIBGNAT_TARGET_PAIRS.
3538 (LIBGNAT_TARGET_PAIRS_32, LIBGNAT_TARGET_PAIRS_64): Define.
3539 (LIBGNAT_TARGET_PAIRS): Use LIBGNAT_TARGET_PAIRS_COMMON, and
3540 LIBGNAT_TARGET_PAIRS_64 or LIBGNAT_TARGET_PAIRS_32 for -mabi=lp64
3541 or -mabi=ilp32, resp.
3543 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
3546 * system-linux-x86.ads (Memory_Size): Use Long_Integer'Size
3547 instead of Word_Size.
3549 2017-05-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
3551 * raise-gcc.c (exception_class_eq): Make ec parameter const.
3553 2017-05-02 Richard Biener <rguenther@suse.de>
3555 * gcc-interface/misc.c (gnat_post_options): Do not set
3558 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
3560 * gcc-interface/trans.c (assoc_to_constructor): Make sure
3561 Corresponding_Discriminant is only called on discriminants.
3562 Skip the saving of the result only for them.
3563 (gnat_to_gnu) <N_Selected_Component>: Likewise.
3564 <N_Unchecked_Type_Conversion>: Translate the result type first.
3565 (gigi): Set TREE_NOTHROW on Begin_Handler.
3566 (stmt_list_cannot_raise_p): New predicate.
3567 (Exception_Handler_to_gnu_gcc): Emit a simple final call instead of
3568 a cleanup if the statements of the handler cannot raise.
3569 (process_freeze_entity): Use Is_Record_Type.
3570 (process_type): Likewise.
3572 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
3574 * einfo.ads (Corresponding_Record_Component): New alias
3575 for Node21 used for E_Component and E_Discriminant.
3576 * einfo.adb (Corresponding_Record_Component): New function.
3577 (Set_Corresponding_Record_Component): New procedure.
3578 (Write_Field21_Name): Handle Corresponding_Record_Component.
3579 * sem_ch3.adb (Inherit_Component): Set
3580 Corresponding_Record_Component for every component in
3581 the untagged case. Clear it afterwards for non-girder
3583 * gcc-interface/decl.c (gnat_to_gnu_entity)
3584 <E_Record_Type>: For a derived untagged type with discriminants
3585 and constraints, apply the constraints to the layout of the
3586 parent type to deduce the layout.
3587 (field_is_aliased): Delete.
3588 (components_to_record): Test DECL_ALIASED_P directly.
3589 (annotate_rep): Check that fields are present except for
3591 (create_field_decl_from): Add DEBUG_INFO_P
3592 parameter and pass it in recursive and other calls. Add guard
3593 for the manual CSE on the size.
3594 (is_stored_discriminant): New predicate.
3595 (copy_and_substitute_in_layout): Consider only
3596 stored discriminants and check that original fields are present
3597 in the old type. Deal with derived types. Adjust call to
3598 create_variant_part_from.
3600 2017-05-02 Ed Schonberg <schonberg@adacore.com>
3602 * exp_ch6.adb (Expand_Call_Helper): When locating the
3603 accessibility entity created for an access parameter, handle
3604 properly a reference to a formal of an enclosing subprogram. if
3605 the reference appears in an inherited class-wide condition, it
3606 is the rewriting of the reference in the ancestor expression,
3607 but the accessibility entity must be that of the current formal.
3609 2017-05-02 Javier Miranda <miranda@adacore.com>
3611 * exp_ch4.adb (Expand_Non_Binary_Modular_Op): New subprogram.
3612 (Expand_N_Op_Add, Expand_N_Op_Divide, Expand_N_Op_Minus,
3613 Expand_N_Op_Multiply, Expand_N_Op_Or, Expand_N_Op_Subtract):
3614 Call Expand_Non_Binary_Modular_Op.
3616 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
3618 * sem_ch3.adb (Build_Derived_Private_Type): If the parent type
3619 has discriminants, do not override the Stored_Constraint list of
3620 the full view of the derived type with that of the derived type.
3622 2017-05-02 Bob Duff <duff@adacore.com>
3624 * sem_attr.adb (Attribute_Enum_Rep): Disallow T'Enum_Rep.
3626 2017-05-02 Vasiliy Fofanov <fofanov@adacore.com>
3628 * s-os_lib.ads: Minor typo fix.
3630 2017-05-02 Vasiliy Fofanov <fofanov@adacore.com>
3632 * gnatls.adb: Merge and refactor code from Prj.Env and remove
3633 this deprecated dependency.
3635 2017-05-02 Ed Schonberg <schonberg@adacore.com>
3637 * exp_util.ads: minor comment addition.
3639 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
3641 * sem_ch3.adb (Build_Derived_Record_Type): Fix a few typos and
3642 pastos in part #3 of the head comment.
3644 2017-05-02 Ed Schonberg <schonberg@adacore.com>
3646 * exp_ch3.adb (Freeze_Type): Do not generate an invariant
3647 procedure body for a local (sub)type declaration within a
3648 predicate function. Invariant checks do not apply to these, and
3649 the expansion of the procedure will happen in the wrong scope,
3650 leading to misplaced freeze nodes.
3652 2017-05-02 Ed Schonberg <schonberg@adacore.com>
3654 * exp_util.adb (Insert_Library_Level_Action): Use proper scope
3655 to analyze generated actions. If the main unit is a body,
3656 the required scope is that of the corresponding unit declaration.
3658 2017-05-02 Arnaud Charlet <charlet@adacore.com>
3660 * einfo.adb (Declaration_Node): flip branches of
3661 an IF statement to avoid repeated negations in its condition;
3662 no change in semantics, only to improve readability.
3664 2017-05-02 Arnaud Charlet <charlet@adacore.com>
3666 * sem_case.adb: Remove extra spaces in parameter declarations.
3668 2017-05-02 Justin Squirek <squirek@adacore.com>
3670 * usage.adb: Replace space with hyphen ("run time" -> "run-time")
3671 in usage line for new -gnatwE switch.
3673 2017-05-02 Claire Dross <dross@adacore.com>
3675 * a-cofuve.ads (Remove): Remove unnecessary
3676 conditions in precondition.
3678 2017-05-02 Vasiliy Fofanov <fofanov@adacore.com>
3680 * a-stream.ads, exp_imgv.adb, sem_ch10.adb,
3681 sem_attr.adb, s-finmas.ads, osint.adb: Minor typo fix.
3683 2017-05-02 Justin Squirek <squirek@adacore.com>
3685 * sem_ch4.adb (Analyze_Case_Expression): Add check for valid
3686 alternative expression.
3687 * sem_res.adb (Resolve_Case_Expression): Ditto.
3689 2017-05-02 Ed Schonberg <schonberg@adacore.com>
3691 * exp_disp.adb (Set_All_DT_Position, In_Predef_Prim_DT):
3692 Refine predicate for the case where the primitive operation
3693 is a renaming of equality. An overriding operation that is
3694 a user-defined renaming of predefined equality inherits its
3695 slot from the overridden operation. Otherwise it is treated
3696 as a predefined op and occupies the same predefined slot as
3697 equality. A call to it is transformed into a call to its alias,
3698 which is the predefined equality. A dispatching call thus uses
3699 the proper slot if operation is further inherited and called
3700 with class-wide arguments.
3702 2017-05-02 Justin Squirek <squirek@adacore.com>
3704 * errout.adb (Set_Msg_Text): Add a case to switch the message
3705 type when the character '[' is detected signifying a warning
3706 about a run-time exception.
3707 * opt.ads Add a new Warning_Mode value for new switch
3708 * switch-b.adb (Scan_Binder_Switches): Add case for the binder
3709 to handle new warning mode
3710 * usage.adb (Usage): Add usage entry for -gnatwE
3711 * warnsw.adb (Set_Warning_Switch): Add case for the new switch
3713 2017-05-02 Ed Schonberg <schonberg@adacore.com>
3715 * sem_prag.adb (Process_Conversion): Reject an intrinsic operator
3716 declaration that operates on some fixed point type.
3718 2017-05-02 Justin Squirek <squirek@adacore.com>
3720 * a-crbtgo.adb, s-taasde.adb: Remove unused use-type clauses.
3722 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
3724 * sem_ch6.adb (Analyze_Null_Procedure): Revert previous change.
3726 2017-05-02 Justin Squirek <squirek@adacore.com>
3728 * sem_ch4.adb (Analyze_Case_Expression): Add check for valid
3729 expression (Analyze_If_Expression): Add check for valid condition
3730 * sem_eval.adb (Eval_Case_Expression): Add check for error posted
3732 * sem_res.adb (Resolve_If_Expression): Add check for valid
3733 condition and then-expression.
3735 2017-05-02 Ed Schonberg <schonberg@adacore.com>
3737 * exp_ch3.adb (Build_Initialization_Call): Generate a null
3738 statement if the initialization call is a null procedure, as
3739 can happen with a controlled type with no explicit Initialize
3740 procedure, or an array of such.
3741 * exp_ch7.adb (Process_Object_Declaration): For a type with
3742 controlled components that has a trivial Initialize procedure,
3743 insert declaration for finalization counter after object
3745 (Make_Deep_Array_Body, Build_Initialize_statements): Do not create
3746 finalization block and attendant declarations if component has
3747 a trivial Initialize procedure.
3748 (Make_Init_Call): Do not generate a call if controlled type has
3749 a trivial Initialize procedure.
3751 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
3753 * g-forstr.ads (Data): Move Format component last.
3754 * g-forstr.adb ("+"): Adjust for above change.
3755 * g-rewdat.ads (Buffer): Move Buffer, Current, Pattern and Value last.
3756 * g-sechas.ads (Context): Move Key last.
3757 * g-socket.ads (Service_Entry_Type): Move Aliases last.
3758 * s-fileio.adb (Temp_File_Record): Move Name last.
3759 * s-regexp.adb (Regexp_Value): Move Case_Sensitive last.
3760 * xr_tabls.ads (Project_File): Move Src_Dir and Obj_Dir last.
3762 2017-05-02 Jerome Lambourg <lambourg@adacore.com>
3764 * bindusg.adb, bindgen.adb, gnatbind.adb, opt.ads: Remove the -nognarl
3765 switch introduced recently. finally not needed.
3767 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
3769 * sem_ch6.adb (Analyze_Null_Procedure): Set the
3770 Corresponding_Body link for a null procedure declaration.
3772 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
3774 * atree.h (Flag290): Add missing terminating parenthesis.
3775 * einfo.adb (Is_Class_Wide_Clone): Use Flag290.
3776 (Set_Is_Class_Wide_Clone): Likewise.
3777 * einfo.ads (Is_Class_Wide_Clone): Likewise.
3779 2017-05-02 Gary Dismukes <dismukes@adacore.com>
3781 * checks.ads (Null_Exclusion_Static_Checks): Add Boolean
3782 parameter Array_Comp to indicate the case of an array object
3783 with null-excluding components.
3784 * checks.adb (Null_Exclusion_Static_Checks):
3785 Call Compile_Time_Constraint_Error instead of
3786 Apply_Compile_Time_Constraint_Error in the component case. Also
3787 call that when Array_Comp is True, with an appropriate warning for
3788 the array component case. Only create an explicit initialization
3789 by null in the case of an object of a null-excluding access type
3790 (and no longer do that in the component case).
3791 * sem_ch3.adb (Check_Component): Add a Boolean parameter
3792 Array_Comp defaulted to False. Pass Empty for the Comp
3793 actual when calling Null_Exclusion_Static_Checks in the case
3794 where Comp_Decl matches Object_Decl, because we don't have a
3795 component in that case. In the case of an object or component
3796 of an array type, pass True for Array_Comp on the recursive call
3799 2017-05-02 Bob Duff <duff@adacore.com>
3801 * s-taprop-linux.adb (Prio_To_Linux_Prio): New function to correctly
3802 compute the linux priority from the Ada priority. Call this everywhere
3803 required. In particular, the previous version was not doing this
3804 computation when setting the ceiling priority in various places. It
3805 was just converting to C.int, which results in a ceiling that is off
3808 2017-05-02 Ed Schonberg <schonberg@adacore.com>
3810 * sem_ch3.adb: Comment predicate inheritance.
3812 2017-05-02 Tristan Gingold <gingold@adacore.com>
3814 * s-trasym.ads: Add comment.
3816 2017-05-02 Bob Duff <duff@adacore.com>
3818 * sem_elab.adb, sem_elab.ads: Minor comment fixes.
3819 * sem_ch4.adb: Minor reformatting.
3820 * s-taprop-linux.adb, s-taspri-posix.ads: Code refactoring.
3821 * s-taspri-posix-noaltstack.ads: Minor refactoring.
3822 * sinput.ads: Minor typo fix.
3824 2017-05-02 Ed Schonberg <schonberg@adacore.com>
3826 * exp_ch9.adb (Discriminated_Size): Moved to sem_util.
3827 * sem_util.ads, sem_util.adb (Discriminated_Size): Predicate moved
3828 here from exp_ch9, to recognize objects whose creation requires
3829 dynamic allocation, so that the proper warning can be emitted
3830 when restriction No_Implicit_Heap_Allocation is in effect.
3831 * sem_ch3.adb (Analyze_Object_Declaration): Use Discriminated_Size
3832 to emit proper warning when an object that requires dynamic
3833 allocation is declared.
3835 2017-05-02 Tristan Gingold <gingold@adacore.com>
3837 * s-trasym.ads, s-trasym.adb (Enable_Cache): New.
3839 2017-05-02 Ed Schonberg <schonberg@adacore.com>
3841 * sem_ch4.adb (Find_Equality_Types, Try_One_Interp): The same relaxed
3842 visibility rules for equality operators that apply within an
3843 instantiation apply within an inlined body.
3844 * sem_type.adb (Add_One_Interp): ditto.
3846 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
3848 * sem_prag.adb (Analyze_Pragma): Forbid pragma Contract_Cases on null
3851 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
3854 (Name_Assume, Name_Attribute_Definition, Name_Loop_Optimize,
3855 Name_No_Tagged_Streams): Move to regular pragmas. Add
3856 placeholders for Default_Scalar_Storage_Order, Dispatching_Domain,
3857 and Secondary_Stack_Size.
3858 (Pragma_Id): Move Pragma_Assume,
3859 Pragma_Attribute_Definition, Pragma_Loop_Optimize and
3860 Pragma_No_Tagged_Streams to second part.
3862 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
3864 * exp_attr.adb: Minor reformatting.
3866 2017-05-02 Ed Schonberg <schonberg@adacore.com>
3868 * sem_ch4.adb (Analyze_Selected_Component): Improve error
3869 detection for illegal references to private components or
3870 operations of a protected type in the body of the type.
3872 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
3874 * opt.ads: Add missing GNAT markers in comments.
3875 * opt.adb (Set_Opt_Config_Switches): Do not override earlier
3876 settings of Optimize_Alignment at the end.
3878 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
3880 * checks.adb (Apply_Constraint_Check): Do not apply
3881 a discriminant check when the associated type is a constrained
3882 subtype created for an unconstrained nominal type.
3883 * exp_attr.adb: Minor reformatting.
3885 2017-05-02 Bob Duff <duff@adacore.com>
3887 * sem_ch3.adb (OK_For_Limited_Init_In_05): Handle correctly
3888 the N_Raise_Expression case.
3889 * sem_ch6.adb (Check_Limited_Return): Minor: clarify comment,
3892 2017-05-02 Yannick Moy <moy@adacore.com>
3894 * exp_ch4.adb (Expand_N_Op_Ne): Do not bump parenthese level and
3895 optimize length comparison in GNATprove mode.
3896 * exp_spark.adb (Expand_SPARK_Op_Ne): New function to rewrite
3897 operator /= into negation of operator = when needed.
3898 (Expand_SPARK): Call new
3899 function to expand operator /=.
3901 2017-05-02 Ed Schonberg <schonberg@adacore.com>
3903 * exp_fixd.adb (Expand_Divide_Fixed_By_Fixed_Giving_Fixed):
3904 Simplify the expression for a fixed-fixed division to remove
3905 divisions by constants whenever possible, as an optimization
3906 for restricted targets.
3908 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
3910 * checks.adb, sem_ch3.adb, sem_ch6.adb: Minor reformatting.
3912 2017-05-02 Bob Duff <duff@adacore.com>
3914 * exp_attr.adb (Callable, Identity, Terminated): Use Find_Prim_Op
3915 to find primitive ops, instead of using an Identifier that will
3916 later be looked up. This is necessary because these ops are not
3917 necessarily visible at all places where we need to call them.
3918 * exp_util.ads: Minor comment fix.
3920 2017-05-02 Ed Schonberg <schonberg@adacore.com>
3922 * sem_ch6.adb (Fully_Conformant_Expressions): Two entity
3923 references are fully conformant if they are both expansions
3924 of the discriminant of a protected type, within one of the
3925 protected operations. One occurrence may be expanded into a
3926 constant declaration while the other is an input parameter to
3927 the corresponding generated subprogram.
3929 2017-05-02 Justin Squirek <squirek@adacore.com>
3931 * sem_ch3.adb (Check_For_Null_Excluding_Components): Created for
3932 recursivly searching composite-types for null-excluding access
3933 types and verifying them.
3934 (Analyze_Object_Declaration): Add a
3935 call to Check_Null_Excluding_Components for static verification
3936 of non-initialized objects.
3937 * checks.adb, checks.ads (Null_Exclusion_Static_Checks): Added
3938 a parameter for a composite-type's component and an extra case
3939 for printing component information.
3941 2017-05-02 Yannick Moy <moy@adacore.com>
3943 * sem_ch10.adb (Analyze_Subunit): Take
3944 configuration pragma into account when restoring appropriate
3945 pragma for analysis of subunit.
3947 2017-05-02 Justin Squirek <squirek@adacore.com>
3949 * s-tasren.adb, s-tasini.adb, s-taprop-linux.adb,
3950 s-mudido-affinity.adb,, a-exetim-posix.adb, a-direio.adb,
3951 g-socket.adb, s-taenca.adb, s-fileio.adb: Remove unused use-type
3952 clauses from the runtime.
3954 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
3956 * freeze.adb (Check_Component_Storage_Order): Do not treat bit-packed
3957 array components specially.
3959 2017-05-02 Ed Schonberg <schonberg@adacore.com>
3961 * sem_ch8.adb (Premature_Usage): If the premature usage of
3962 an entity is as the expression in its own object decaration,
3963 rewrite the reference as Any_Id to prevent cascaded errors or
3964 compiler loops when such an entity is used in an address clause.
3966 2017-05-01 Eric Botcazou <ebotcazou@adacore.com>
3968 * gcc-interface/decl.c (components_to_record): Add missing guard.
3970 2017-05-01 Eric Botcazou <ebotcazou@adacore.com>
3972 * gcc-interface/decl.c (components_to_record): Add more comments.
3973 Put back pending fields onto the regular list if the misalignment
3974 happens to cancel itself.
3976 2017-04-28 Ed Schonberg <schonberg@adacore.com>
3978 * sem_ch4.adb (Complete_Object_Operation): When rewriting the
3979 controlling actual in a prefixed call, preserve the original node
3980 information if the prefix itself has been rewritten, for ASIS use.
3982 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
3984 * exp_ch6.adb (Insert_Post_Call_Actions):
3985 Code clean up. Insert the post-call actions after an enclosing
3986 procedure call when N denotes a function call and appears as an
3987 actual parameter in the procedure call.
3989 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
3991 * freeze.adb (Check_Component_Storage_Order): If there is a clause
3992 for the component, also reject the attribute if the component
3993 doesn't end on a byte boundary and its scalar storage order is
3994 different from that of the enclosing record type.
3996 2017-04-28 Javier Miranda <miranda@adacore.com>
3998 * atree.ads (Info_Messages): Removed.
3999 (Warning_Info_Messages): New counter.
4000 (Report_Info_Messages): New counter.
4001 * err_vars.ads Update documentation.
4002 * errout.adb (Delete_Warning_And_Continuations): Update
4003 Info_Message occurrences.
4004 (Error_Msg_Internal): Update Info_Message occurrences.
4005 (Delete_Warning): Update Info_Message occurrences.
4006 (Write_Error_Summary): Update Info_Message occurrences.
4007 (Output_Messages): Update Info_Message occurrences.
4008 (To_Be_Removed): Update Info_Message occurrences.
4009 (Reset_Warnings): Update Info_Message occurrences.
4010 * errutil.adb (Error_Msg): Update Info_Message occurrences.
4011 (Finalize): Update Info_Message occurrences.
4012 (Initialize): Update Info_Message occurrences.
4013 * erroutc.adb (Delete_Msg): Update Info_Message occurrences.
4014 (Compilation_Errors): Update Info_Message_Occurences.
4016 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
4018 * exp_ch3.adb (Build_Init_Statements): Likewise on Nam.
4019 * freeze.adb (Check_Component_Storage_Order): And on Comp_Byte_Aligned.
4020 * sem_aggr.adb (Resolve_Record_Aggregate): Initialize Box_Node.
4021 * sem_attr.adb (Loop_Entry): Initialize Encl_Loop.
4022 * sem_ch12.adb (Build_Operator_Wrapper): Add pragma Warnings on Expr.
4023 * sem_ch13.adb (Validate_Address_Clauses): Initialize Y_Alignment and
4025 * sem_eval.adb (Why_Not_Static): Initialize Typ.
4026 * sem_prag.adb (Analyze_Pragma): Add pragma Warnings on Str.
4028 2017-04-28 Bob Duff <duff@adacore.com>
4030 * sem_util.ads, sem_util.adb (Might_Raise): New function
4031 that replaces Is_Exception_Safe, but has the opposite
4032 sense. Is_Exception_Safe was missing various cases -- calls inside
4033 a pragma Debug, calls inside an 'if' or assignment statement,
4034 etc. Might_Raise now walks the entire subtree looking for things
4036 * exp_ch9.adb (Is_Exception_Safe): Remove.
4037 (Build_Protected_Subprogram_Body): Replace call to
4038 Is_Exception_Safe with "not Might_Raise". Misc cleanup (use
4039 constants where possible).
4040 * exp_ch7.adb: Rename Is_Protected_Body -->
4041 Is_Protected_Subp_Body. A protected_body is something different
4044 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
4046 * inline.adb (Expand_Inlined_Call): Initialize Targ1 variable.
4047 * par-ch3.adb (P_Component_Items): Initialize Decl_Node variable.
4048 (P_Discrete_Choice_List): Initialize Expr_Node variable.
4049 * par-ch9.adb (P_Task): Initialize Aspect_Sloc variable.
4050 (P_Protected): Likewise.
4051 * sem_case.adb (Check_Duplicates):
4052 Add pragma Warnings on variable.
4053 * sem_ch12.adb (Preanalyze_Actuals): Initialize Vis variable.
4054 * sem_ch4.adb (List_Operand_Interps): Add pragma Warnings on variable.
4055 * sem_ch5.adb (Analyze_Assignment): Initialize Save_Full_Analysis.
4056 (Analyze_Exit_Statement): Initialize Scope_Id variable.
4057 (Analyze_Iterator_Specification): Initialize Bas variable.
4058 * sem_ch9.adb (Allows_Lock_Free_Implementation): Initialize
4059 Error_Count (Satisfies_Lock_Free_Requirements): Likewise.
4060 (Analyze_Accept_Statement): Initialize Task_Nam.
4062 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
4064 * checks.adb (Install_Primitive_Elaboration_Check):
4065 Do not generate an elaboration check if all checks have been
4068 2017-04-28 Ed Schonberg <schonberg@adacore.com>
4070 * sem_ch13.adb (Analyze_Aspect_Specifications, case
4071 Interrupt_Handler and Attach_Handler): Generate reference
4072 to protected operation to prevent spurious warnings about
4073 unreferenced entities. Previous scheme failed with style checks
4076 2017-04-28 Ed Schonberg <schonberg@adacore.com>
4078 * sem_prag.adb (Relocate_Pragmas_To_Body): A pragma Warnings
4079 that follows an expression function must not be relocated to
4080 the generated body, because it applies to the code that follows.
4082 2017-04-28 Gary Dismukes <dismukes@adacore.com>
4084 * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object): Test
4085 Relaxed_RM_Semantics to avoid having CodePeer issue errors on
4086 code that might violate the more stringent checking for 'Access
4087 introduced in Ada 2005.
4089 2017-04-28 Arnaud Charlet <charlet@adacore.com>
4091 * a-cforse.adb: minor style fix in comment.
4093 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
4095 * exp_ch9.adb (Build_Lock_Free_Unprotected_Subprogram_Body): Also
4096 initialize Block_Decls variable.
4097 (Expand_Entry_Barrier): Add pragma Warnings on Func_Body variable.
4098 (Build_Dispatching_Requeue): Add pragma Warnings on Op variable.
4099 * exp_disp.adb (Expand_Interface_Actuals): Initialize
4100 Formal_DDT and Actual_DDT variables.
4101 (Expand_Interface_Thunk): Initialize Iface_Formal.
4102 (Make_DT): Initialize Size_Comp.
4103 (Make_Select_Specific_Data_Table): Initialize Decls.
4104 * exp_dist.adb (Add_RACW_Primitive_Declarations_And_Bodies):
4105 Also initialize more RPC_Receiver_* variables.
4106 (Build_To_Any_Function): Initialize Cstr_Formal.
4107 * exp_prag.adb (Expand_Pragma_Contract_Cases): Initialize Msg_Str.
4109 2017-04-28 Ed Schonberg <schonberg@adacore.com>
4111 * sem_ch6.adb (Freeze_Type_Refs): For an interface conversion
4112 node between access types, freeze the designated type as well,
4113 so that dispatch table pointers are created in the proper scope,
4114 and not in the constructed body of the expression function.
4116 2017-04-28 Bob Duff <duff@adacore.com>
4118 * alloc.ads (Nodes_Initial): Go back to previous value. The large
4119 value makes large compilations faster, but small compilations slower.
4121 2017-04-28 Arnaud Charlet <charlet@adacore.com>
4123 * sem_util.adb: minor typos in Is_Child_Or_Sibling.
4125 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
4127 * erroutc.adb (Compilation_Errors): Do not consider info messages
4128 as suitable warnings when warnings must be treated as errors.
4129 * sem_ch7.adb (Analyze_Package_Specification): Do not consider
4130 internally-generated packages when outputting completion
4132 * errout.adb (Output_Messages): Do not consider info messages as
4133 suitable warnings when warnings must be treated as errors.
4134 * errutil.adb (Finalize): Do not consider info messages as
4135 suitable warnings when warnings must be treated as errors.
4137 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
4139 * warnsw.ads: Minor fix for incorrect wording in comment.
4141 2017-04-28 Ed Schonberg <schonberg@adacore.com>
4143 * sem_res.adb (In_Instance_Code): New predicate in
4144 Valid_Conversion, to determine whether a type conversion appears
4145 as (or within) an actual for a formal object. Type conversions
4146 in instances are not rechecked in Valid_Conversion because
4147 visibility changes between generic location andi instance may
4148 lead to spurious errors, but conversions within an actual must be
4149 fully checked, and they are not fully resolved when pre-analyzing
4152 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
4154 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Use
4155 New_Copy_Tree instead of Relocate_Node as any subsequent copies
4156 of the relocated node will have mangled Parent pointers.
4157 * sem_util.adb (Build_NCT_Hash_Tables): Reset both hash
4158 tables used in conjunction with entity and itype replication.
4159 (Visit_Entity): Rewrite the restriction on which entities
4160 require duplication. The restriction now includes all types.
4162 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
4164 * a-cofuse.ads, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfinve.adb,
4165 a-cfinve.ads, a-cforma.adb, a-cforma.ads, a-cofuma.adb, a-cofuma.ads,
4166 a-cfhama.adb, a-cfhama.ads, a-cforse.adb: Minor reformatting and code
4169 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
4171 * exp_util.adb, g-dyntab.adb, par-ch4.adb, sem_util.adb, sem_attr.adb,
4172 gnat1drv.adb, exp_disp.adb, namet.adb, alloc.ads: Minor reformatting.
4174 2017-04-28 Gary Dismukes <dismukes@adacore.com>
4176 * exp_util.adb: Minor reformatting.
4178 2017-04-28 Ed Schonberg <schonberg@adacore.com>
4180 * sem_ch4.adb: Fix copy/pasto.
4182 2017-04-27 Tristan Gingold <gingold@adacore.com>
4184 * gcc-interface/Make-lang.in: Define EH_MECHANISM while building
4185 raise-gcc.c. Fix include search path for raise-gcc.c
4187 2017-04-27 Eric Botcazou <ebotcazou@adacore.com>
4189 * fe.h (Warn_On_Questionable_Layout): Declare.
4190 * warnsw.ads (Warn_On_Record_Holes): Move down.
4191 (Warn_On_Questionable_Layout): New boolean variable.
4192 (Warning_Record): Add Warn_On_Questionable_Layout field.
4193 * warnsw.adb (All_Warnings): Set Warn_On_Questionable_Layout.
4194 (Restore_Warnings): Likewise.
4195 (Save_Warnings): Likewise.
4196 (Set_Dot_Warning_Switch): Handle 'q' and 'Q' letters.
4197 * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust call to
4198 components_to_record.
4199 (gnu_field_to_gnat): New function.
4200 (warn_on_field_placement): Likewise.
4201 (components_to_record): Add GNAT_RECORD_TYPE and remove REORDER
4202 parameters. Rename local variables and adjust recursive call.
4203 Rework final scan of the field list and implement warnings on the
4204 problematic placement of specific sorts of fields.
4206 2017-04-27 Bob Duff <duff@adacore.com>
4208 * errout.adb, exp_aggr.adb, exp_attr.adb, exp_code.adb, fname.adb,
4209 * fname.ads, freeze.adb, inline.adb, lib.adb, lib.ads, lib-list.adb,
4210 * lib-load.adb, lib-writ.adb, par.adb, restrict.adb, rtsfind.adb,
4211 * sem.adb, sem_cat.adb, sem_ch10.adb, sem_ch12.adb, sem_ch3.adb,
4212 * sem_ch4.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb, sem_elab.adb,
4213 * sem_intr.adb, sem_res.adb, sem_util.adb, sem_warn.adb, sprint.adb:
4214 For efficiency, cache results of Is_Internal_File_Name and
4215 Is_Predefined_File_Name in the Units table. This avoids a lot
4216 of repeated text processing.
4218 2017-04-27 Emmanuel Briot <briot@adacore.com>
4220 * g-comlin.adb (Sort_Sections): remove useless test.
4222 2017-04-27 Claire Dross <dross@adacore.com>
4224 * a-cfhase.adb, a-cfhase.ads (=): Generic parameter removed to
4225 allow the use of regular equality over elements in contracts.
4226 (Formal_Model): Ghost package containing model functions that are
4227 used in subprogram contracts.
4228 (Current_To_Last): Removed, model functions should be used instead.
4229 (First_To_Previous): Removed, model functions should be used instead.
4230 (Strict_Equal): Removed, model functions should be used instead.
4231 (No_Overlap): Removed, model functions should be used instead.
4232 (Equivalent_Keys): Functions over cursors are removed. They were
4233 awkward with explicit container parameters.
4234 * a-cforse.adb, a-cforse.ads (=): Generic parameter removed to
4235 allow the use of regular equality over elements in contracts.
4236 (Formal_Model): Ghost package containing model functions that
4237 are used in subprogram contracts.
4238 (Current_To_Last): Removed, model functions should be used instead.
4239 (First_To_Previous): Removed, model functions should be used instead.
4240 (Strict_Equal): Removed, model functions should be used instead.
4241 (No_Overlap): Removed, model functions should be used instead.
4243 2017-04-27 Yannick Moy <moy@adacore.com>
4245 * gnat1drv.adb: Code cleanup.
4247 2017-04-27 Ed Schonberg <schonberg@adacore.com>
4249 * exp_util.adb (Replace_Entity): The prefix of a 'Result
4250 attribute reference in a post- condition is the subprogram to
4251 which the condition applies. If the condition is inherited
4252 by a type extension, the prefix becomes a reference to the
4253 inherited operation, but there is no need to create a wrapper
4254 for this operation, because 'Result is expanded independently
4255 when elaborating the postconditions.
4257 2017-04-27 Bob Duff <duff@adacore.com>
4259 * sinput.adb: Minor code cleanup.
4260 * namet.adb (Append): Create faster versions of
4261 Append(String) and Append(Name_Id) by using slice assignment
4263 * sem_util.adb (In_Instance): Speed this up by removing
4264 unnecessary tests; Is_Generic_Instance is defined for all
4266 * sem_util.ads, sem_util.adb (In_Parameter_Specification):
4267 Remove unused function.
4268 * alloc.ads (Nodes_Initial): Use a much larger value, because
4269 the compiler was spending a lot of time copying the nodes table
4270 when it grows. This number was chosen in 1996, so is rather out
4271 of date with current memory sizes. Anyway, it's virtual memory.
4272 Get rid of Orig_Nodes_...; use Node_... instead.
4273 * atree.adb (Lock): Do not release the Nodes tables; it's a
4275 Orig_Nodes_ ==> Nodes_
4276 * nlists.adb: Orig_Nodes_ ==> Nodes_
4277 * g-table.adb: Remove unused "with" clause.
4278 * g-table.ads, table.ads: Remove Big_Table_Type, which should
4279 not be used by clients.
4280 * g-dyntab.adb (Last_Allocated): New function
4281 to encapsulate T.P.Last_Allocated, which I'm thinking of changing.
4283 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4285 * sem_eval.adb (Subtypes_Statically_Compatible): Remove duplicated
4287 (Subtypes_Statically_Match): Remove duplicate check.
4288 * sem_prag.adb (Check_Arg_Is_External_Name): Remove duplicate check.
4290 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4292 * exp_aggr.adb (Replace_Type): Remove the special processing
4293 for selected components.
4294 * exp_attr.adb (Expand_N_Attribute_Reference): Merge the
4295 processing for attributes Fixed_Value and Integer_Value.
4296 * exp_util.adb (Side_Effect_Free): Merge the processing for
4297 qualified expressions, type conversions, and unchecked type
4299 * g-comlin.adb (Is_In_Config): Merge the processing for No_Space
4301 * par-ch3.adb (P_Declarative_Items): Merge the processing for
4302 tokens function, not, overriding, and procedure.
4303 * sem_ch6.adb (Fully_Conformant_Expressions): Merge the processing
4304 for qualified expressions, type conversions, and unchecked
4306 * sem_util.adb (Compile_Time_Constraint_Error): Merge the
4307 processing for Ada 83 and instances.
4308 (Object_Access_Level): Merge the processing for indexed components
4309 and selected components.
4310 * uname.adb (Add_Node_Name): Merge the processing for stubs.
4312 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4314 * checks.adb (Install_Primitive_Elaboration_Check):
4315 Do not generate the check when restriction No_Elaboration_Code
4318 2017-04-27 Ed Schonberg <schonberg@adacore.com>
4320 * exp_disp.adb (Build_Class_Wide_Check): New subsidiary
4321 of Expand_Dispatching_Call. If the denoted subprogram has a
4322 class-wide precondition, this is the only precondition that
4323 applies to the call, rather that the class-wide preconditions
4324 that may apply to the body that is executed. (This is specified
4327 2017-04-27 Yannick Moy <moy@adacore.com>
4329 * gnat1drv.adb (Adjust_Global_Switches): Issue
4330 a warning in GNATprove mode if the runtime library does not
4331 support IEEE-754 floats.
4333 2017-04-27 Ed Schonberg <schonberg@adacore.com>
4335 * sem_prag.adb (Inherit_Class_Wide_Pre): If the parent operation
4336 is itself inherited it does not carry any contract information,
4337 so examine its parent operation which is its Alias.
4339 2017-04-27 Ed Schonberg <schonberg@adacore.com>
4341 * sem_attr.adb (Analyze_Attribute, case 'Image): In Ada2012 the
4342 prefix can be an object reference in which case Obj'Image (X)
4343 can only be interpreted as an indexing of the parameterless
4344 version of the attribute.
4345 * par-ch4.adb (P_Name): An attribute reference can be the prefix of
4346 an indexing or a slice operation if the attribute does not require
4347 parameters. In Ada2012 'Image also belongs in this category,
4348 and A'Image (lo .. hi) is legal and must be parsed as a slice.
4350 2017-04-27 Yannick Moy <moy@adacore.com>
4352 * exp_ch4.adb: Minor reformatting.
4353 * gnat1drv.adb (Adjust_Global_Switches): When in GNATprove mode,
4354 disable the CodePeer and C generation modes. Similar to the
4355 opposite actions done in CodePeer mode.
4357 2017-04-27 Yannick Moy <moy@adacore.com>
4359 * sem_res.adb: Remove duplicate code.
4360 * sem_attr.adb: Delete duplicate code.
4362 2017-04-27 Bob Duff <duff@adacore.com>
4364 * g-dyntab.adb: Reduce the amount of copying in
4365 Release. No need to copy items past Last.
4367 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4369 * checks.adb Add with and use clauses for Sem_Disp.
4370 (Install_Primitive_Elaboration_Check): New routine.
4371 * checks.ads (Install_Primitive_Elaboration_Check): New routine.
4372 * exp_attr.adb (Expand_N_Attribute_Reference): Clean up the
4373 processing of 'Elaborated.
4374 * exp_ch6.adb (Expand_N_Subprogram_Body): Install a primitive
4377 2017-04-27 Bob Duff <duff@adacore.com>
4379 * g-dyntab.ads, g-dyntab.adb, g-table.ads: Remove incorrect assertion.
4380 If the table grows and then shrinks back to empty, we won't necessarily
4381 point back to the empty array. Code cleanups.
4382 * sinput.ads: Add 'Base to Size clause to match the declared
4385 2017-04-27 Claire Dross <dross@adacore.com>
4387 * a-cforma.adb, a-cforma.ads (=): Generic parameter removed to
4388 allow the use of regular equality over elements in contracts.
4389 (Formal_Model): Ghost package containing model functions that
4390 are used in subprogram contracts.
4391 (Current_To_Last): Removed, model functions should be used instead.
4392 (First_To_Previous): Removed, model functions should be used instead.
4393 (Strict_Equal): Removed, model functions should be used instead.
4394 (No_Overlap): Removed, model functions should be used instead.
4395 * a-cofuma.adb, a-cofuma.ads (Enable_Handling_Of_Equivalence)
4396 Boolean generic parameter to disable contracts for equivalence
4398 (Witness): Create a witness of a key that is used for handling of
4399 equivalence between keys.
4400 (Has_Witness): Check whether a witness is contained in a map.
4401 (W_Get): Get the element associated to a witness.
4402 (Lift_Equivalent_Keys): Removed, equivalence between keys is handled
4404 * a-cofuse.adb, a-cofuse.ads (Enable_Handling_Of_Equivalence)
4405 Boolean generic parameter to disable contracts for equivalence
4407 * a-cfhama.adb, a-cfhama.ads (Formal_Model.P) Disable handling
4408 of equivalence on functional maps.
4409 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model.P) Disable handling
4410 of equivalence on functional maps.
4412 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4414 * exp_ch9.adb (Expand_Entry_Barrier): Code
4415 cleanup. Do not perform the optimization which removes the
4416 declarations of the discriminant and component renamings when
4417 validity checks on operands and attributes are in effect.
4419 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4421 * exp_spark.adb, exp_util.adb, sem_ch7.adb, g-dyntab.adb, g-dyntab.ads,
4422 freeze.adb, a-cfinve.ads, a-cofuma.adb, a-cofuma.ads, a-cfhama.adb,
4423 a-cfhama.ads, a-cofove.ads: Minor reformatting.
4425 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4427 * g-debpoo.adb (Dump_Gnatmem): Protect against a possible null
4428 pointer dereference.
4429 * g-spipat.adb (Dump): Code clean up. Protect against a possible
4430 null pointer dereference.
4432 2017-04-27 Bob Duff <duff@adacore.com>
4434 * g-dyntab.ads, g-dyntab.adb: Default for Table_Low_Bound.
4435 Rename Empty --> Empty_Table_Ptr, and don't duplicate code for it.
4436 Free renames Init, since they do the same thing.
4437 * g-table.ads: Default for Table_Low_Bound.
4438 * table.ads: Default for Table_Low_Bound, Table_Initial, and
4441 2017-04-27 Bob Duff <duff@adacore.com>
4443 * g-dyntab.ads, g-dyntab.adb: Add assertions to subprograms that
4445 * atree.adb, elists.adb, fname-uf.adb, ghost.adb, inline.adb,
4446 * lib.adb, namet.adb, nlists.adb, sem.adb, sinput.adb, stringt.adb:
4447 Reorder code so that above assertions do not fail.
4448 * table.ads: Remove obsolete comment on Locked.
4450 2017-04-27 Claire Dross <dross@adacore.com>
4452 * a-cfdlli.ads: Code cleanup.
4454 2017-04-27 Yannick Moy <moy@adacore.com>
4456 * exp_spark.adb (Expand_SPARK_Freeze_Type): Build a DIC procedure
4457 when needed for proof. (Expand_SPARK): Call the new procedure.
4458 * exp_util.ads Fix typo.
4460 2017-04-27 Gary Dismukes <dismukes@adacore.com>
4462 * a-cofuma.ads, a-cfhama.ads: Minor reformatting, grammar, and typo
4465 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4467 * sem_elab.adb Add new type Visited_Element
4468 and update the contents of table Elab_Visited. Various code clean up.
4469 (Check_Elab_Call): Determine whether a prior call to
4470 the same subprogram was already examined within the same context.
4471 (Check_Internal_Call_Continue): Register the subprogram being
4472 called as examined within a particular context. Do not suppress
4473 elaboration warnings.
4475 2017-04-27 Gary Dismukes <dismukes@adacore.com>
4477 * xoscons.adb, osint.ads: Minor reformatting.
4479 2017-04-27 Bob Duff <duff@adacore.com>
4481 * g-dyntab.ads, g-dyntab.adb: Misc cleanup. Rename
4482 Table_Count_Type --> Table_Last_Type, because the name
4483 was confusing (a "count" usually starts at zero). Add
4484 functionality supported or needed by other tables packages
4485 (Move, Release_Threshold).
4486 * g-table.ads, g-table.adb: This is now just a thin wrapper
4487 around g-dyntab.ads/g-dyntab.adb. Add functionality supported
4488 or needed by other tables packages (Save, Restore).
4489 * table.ads, table.adb: This is now just a thin wrapper around
4490 * g-table.ads/g-table.adb.
4491 * namet.h, scos.h, uintp.h: These files are reaching into the
4492 private data of some instances of g-table, whose names changed,
4493 so the above change requires some adjustment here. It now uses
4496 2017-04-27 Bob Duff <duff@adacore.com>
4498 * namet.adb, namet.ads: Minor: remove unused procedures.
4500 2017-04-27 Eric Botcazou <ebotcazou@adacore.com>
4502 * checks.adb (Apply_Scalar_Range_Check): Initialize Ok variable too.
4503 (Minimize_Eliminate_Overflows): Initialize Llo and Lhi.
4504 Add pragma Warnings on Rtype variable in nested block. *
4505 * exp_ch3.adb (Build_Init_Statements): Initialize VAR_LOC.
4506 * exp_ch4.adb (Expand_Concatenate): Initialize 3 variables.
4507 (Size_In_Storage_Elements): Add pragma Warnings on Res variable.
4508 * exp_ch7.adb (Build_Adjust_Statements): Initialize Bod_Stmts.
4509 (Process_Component_List_For_Finalize): Initialize Counter_Id.
4510 (Build_Finalize_Statements): Initialize Bod_Stmts.
4511 * exp_disp.adb (Expand_Dispatching_Call): Initialize SCIL_Node.
4513 2017-04-27 Claire Dross <dross@adacore.com>
4515 * a-cfhama.adb, a-cfhamai.ads (=): Generic parameter removed to
4516 allow the use of regular equality over elements in contracts.
4517 (Formal_Model): Ghost package containing model functions that are
4518 used in subprogram contracts.
4519 (Current_To_Last): Removed, model
4520 functions should be used instead.
4521 (First_To_Previous): Removed, model functions should be used instead.
4522 (Strict_Equal): Removed, model functions should be used instead.
4523 (No_Overlap): Removed, model functions should be used instead.
4524 (Equivalent_Keys): Functions over cursors are removed. They were
4525 awkward with explicit container parameters.
4526 * a-cofuma.adb, a-cofuma.ads (Lift_Equivalent_Keys): New lemma
4527 (proof only) procedure to help GNATprove when equivalence over
4528 keys is not equality.
4530 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4532 * exp_util.adb, a-cfdlli.adb, a-cfdlli.ads, exp_ch9.adb, g-dyntab.adb,
4533 sem_dim.adb, a-cfinve.adb, a-cfinve.ads, a-cofove.adb, a-cofove.ads:
4534 Minor reformatting and code cleanups.
4536 2017-04-27 Ed Schonberg <schonberg@adacore.com>
4538 * freeze.adb (Build_Inherited_Condition_Pragmas): New procedure,
4539 subsidiary of Check_Inherited_Conditions, to build pragmas for an
4540 operation whose ancestor has classwide pre/postconditions. This
4541 is used both to check the legality of the inheritance in Ada
4542 and in SPARK, and to determine whether a wrapper is needed for
4543 an inherited operation.
4544 * exp_util.adb (Build_Class_Wide_Expression, Replace_Entity):
4545 Improve placement of error message for inherited classwide
4546 conditions that become illegal on type derivation.
4548 2017-04-27 Yannick Moy <moy@adacore.com>
4550 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Set
4551 SPARK_Mode from context on generic package.
4552 * sem_ch7.adb (Analyze_Package_Declaration): Simplify code to remove
4555 2017-04-27 Claire Dross <dross@adacore.com>
4557 * a-cofuve.ads (Range_Shifted): Rewrite precondition to avoid
4558 overflows in computations.
4559 * a-cofove.ads (Capacity_Range): Rewrite last bound to avoid
4560 overflows in computations.
4561 (Insert): Rewrite precondition to avoid overflows in computations.
4562 * a-cfinve.ads (Capacity_Range): Rewrite last bound to avoid
4563 overflows in computations.
4564 (Insert): Rewrite precondition to avoid overflows in computations.
4566 2017-04-27 Steve Baird <baird@adacore.com>
4568 * exp_ch9.adb (Expand_N_Asynchronous_Select): Initialize the Cancel
4569 flag when it is declared in order to avoid confusing CodePeer about
4570 the possibility of an uninitialized variable read.
4572 2017-04-27 Ed Schonberg <schonberg@adacore.com>
4574 * sem_dim.adb (Analyze_Dimension_Object_Declaration): There is
4575 no dimensionality error if the subtype of the expression is
4576 identical to the nominal subtype in the declaration, even though
4577 the expression itself may have been constant-folded and lack a
4579 * sem_dim.ads: Add comments on setting of dimension vectors and
4580 its interaction with node rewritings and side-effect removal.
4582 2017-04-27 Bob Duff <duff@adacore.com>
4584 * debug.adb: Minor comment correction.
4585 * sem_dim.ads: Minor reformatting and typo fixes.
4587 2017-04-27 Bob Duff <duff@adacore.com>
4589 * g-table.adb, g-table.adsa, scos.h: From the C side, access First and
4590 Last of the tables via function calls, rather than relying on layout
4593 2017-04-27 Ed Schonberg <schonberg@adacore.com>
4595 * exp_util.adb: No wrapper in GNATprove mode.
4597 2017-04-27 Yannick Moy <moy@adacore.com>
4599 * sem_res.adb (Resolve_Comparison_Op): Always
4600 evaluate comparisons between values of universal types.
4602 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4604 * sem_elab.adb (Check_Internal_Call_Continue): Do not generate
4605 an elaboration counter nor a check when in GNATprove mode.
4606 * sem_util.adb (Build_Elaboration_Entity): Do not create an
4607 elaboration counter when in GNATprove mode.
4609 2017-04-27 Ed Schonberg <schonberg@adacore.com>
4611 * freeze.adb: copy-paste typo.
4613 2017-04-27 Yannick Moy <moy@adacore.com>
4615 * sem_prag.adb (Analyze_Pre_Post_In_Decl_Part):
4616 Use correct test to detect call in GNATprove mode instead of
4619 2017-04-27 Claire Dross <dross@adacore.com>
4621 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model.M_Elements_In_Union):
4622 New property function expressing that the element of a
4623 sequence are contained in the union of two sequences.
4624 (Formal_Model.M_Elements_Included): New property function
4625 expressing that the element of a sequence are another sequence.
4626 (Generic_Sorting): Use new property functions to state that
4627 elements are preserved by Sort and Merge.
4628 * a-cofove.adb, a-cofove.ads (=): Generic parameter removed to
4629 allow the use of regular equality over elements in contracts.
4630 (Formal_Model): Ghost package containing model functions
4631 that are used in subprogram contracts. (Capacity):
4632 On unbounded containers, return the maximal capacity.
4633 (Current_To_Last): Removed, model functions should be used instead.
4634 (First_To_Previous): Removed, model functions should be used instead.
4635 (Append): Default parameter value replaced
4636 by new wrapper to allow more precise contracts.
4637 (Insert): Subprogram restored, it seems it was useful to users even if
4639 (Delete): Subprogram restored, it seems it was useful to users even if
4641 (Prepend): Subprogram restored, it seems it was useful to users even
4642 if it is inefficient.
4643 (Delete_First): Subprogram restored, it seems it
4644 was useful to users even if it is inefficient. (Delete_Last):
4645 Default parameter value replaced by new wrapper to allow more
4647 (Generic_Sorting.Merge): Subprogram restored.
4648 * a-cfinve.adb, a-cfinve.ads (=): Generic parameter removed to
4649 allow the use of regular equality over elements in contracts.
4650 (Formal_Model): Ghost package containing model functions
4651 that are used in subprogram contracts. (Capacity):
4652 On unbounded containers, return the maximal capacity.
4653 (Current_To_Last): Removed, model functions should be used
4655 (First_To_Previous): Removed, model functions should be used instead.
4656 (Append): Default parameter value replaced
4657 by new wrapper to allow more precise contracts.
4658 (Insert): Subprogram restored, it seems it was useful to users even if
4660 (Delete): Subprogram restored, it seems it was useful to users even if
4662 (Prepend): Subprogram restored, it seems it was useful to users even
4663 if it is inefficient.
4664 (Delete_First): Subprogram restored, it seems it
4665 was useful to users even if it is inefficient. (Delete_Last):
4666 Default parameter value replaced by new wrapper to allow more
4668 (Generic_Sorting.Merge): Subprogram restored.
4669 (Vector): Do not reuse formal vectors, as it is no longer possible
4670 to supply them with an equality function over elements.
4672 2017-04-27 Bob Duff <duff@adacore.com>
4674 * g-dyntab.adb (Release): When allocating the new
4675 table, use the correct slice of the old table to initialize it.
4677 2017-04-27 Eric Botcazou <ebotcazou@adacore.com>
4679 * einfo.ads: Minor fixes in comments.
4681 2017-04-27 Ed Schonberg <schonberg@adacore.com>
4683 * sem_prag.adb: disable clones in SPARK_Mode.
4685 2017-04-27 Gary Dismukes <dismukes@adacore.com>
4687 * sem_util.ads, contracts.adb: Minor reformatting.
4689 2017-04-27 Ed Schonberg <schonberg@adacore.com>
4691 * sem_util.adb, sem_util.ads (Build_Class_Wide_Clone_Body):
4692 Build body of subprogram that has a class-wide condition that
4693 contains calls to other primitives.
4694 (Build_Class_Wide_Clone_Call); Build a call to the common
4695 class-wide clone of a subprogram with classwide conditions. The
4696 body of the subprogram becomes a wrapper for a call to the
4697 clone. The inherited operation becomes a similar wrapper to which
4698 modified conditions apply, and the call to the clone includes
4699 the proper conversion in a call the parent operation.
4700 (Build_Class_Wide_Clone_Decl (Spec_Id : Entity_Id): For a
4701 subprogram that has a classwide condition that contains calls to
4702 other primitives, build an internal subprogram that is invoked
4703 through a type-specific wrapper for all inherited subprograms
4704 that may have a modified condition.
4705 * sem_prag.adb (Check_References): If subprogram has a classwide
4706 condition, create entity for corresponding clone, to be invoked
4707 through wrapper subprograns.
4708 (Analyze_Pre_Post_Condition_In_Decl_Part): Do not emit error
4709 message about placement if pragma isi internally generated.
4710 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If subprogram has
4711 a classwide clone, build body of clone as copy of original body,
4712 and rewrite original body as a wrapper as a wrapper for a call to
4713 the clone, so that it incorporates the original pre/postconditions
4715 * freeze.adb (Check_Inherited_Conditions): For an inherited
4716 subprogram that inherits a classwide condition, build spec and
4717 body of corresponding wrapper so that call to inherited operation
4718 gets the modified conditions.
4719 * contracts.adb (Analyze_Contracts): If analysis of classwide
4720 condition has created a clone for a primitive operation, analyze
4721 declaration of clone.
4723 2017-04-27 Steve Baird <baird@adacore.com>
4725 * exp_util.adb (Build_Allocate_Deallocate_Proc):
4726 Add "Suppress => All_Checks" to avoid generating unnecessary
4729 2017-04-27 Yannick Moy <moy@adacore.com>
4731 * debug.adb: Reserve debug flag 'm' for no inlining in GNATprove.
4732 * sem_ch6.adb (Anayze_Subprogram_Body_Helper): Skip creation of
4733 inlining body in GNATprove mode when switch -gnatdm used.
4734 * sem_res.adb (Resolve_Call): Skip detection of lack of inlining
4735 in GNATprove mode when switch -gnatdm used.
4737 2017-04-27 Arnaud Charlet <charlet@adacore.com>
4739 * sem_ch13.adb (Analyze_Attribute_Definition_Clause
4740 [Attribute_Address]): Call Set_Address_Taken when ignoring rep
4741 clauses, so that we keep an indication of the address clause
4742 before removing it from the tree.
4744 2017-04-27 Yannick Moy <moy@adacore.com>
4746 * exp_util.ads, exp_util.adb (Evaluate_Name): Force evaluation
4747 of expression being qualified, when not an object name, or else
4748 evaluate the underlying name.
4750 2017-04-27 Jerome Lambourg <lambourg@adacore.com>
4752 * bindusg.adb, bindgen.adb, gnatbind.adb, opt.ads: add -nognarl switch.
4754 2017-04-27 Justin Squirek <squirek@adacore.com>
4756 * exp_ch7.adb (Build_Finalize_Statements): Move Num_Comps to
4757 Process_Component_List_For_Finalization as a local variable.
4758 (Process_Component_For_Finalize): Add an extra parameter to avoid
4760 (Process_Component_List_For_Finalization): Correct calls to
4761 Process_Component_For_Finalize to take Num_Comps as a parameter.
4763 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4765 * sem_ch8.adb (Find_Direct_Name): Account for the case where
4766 a use-visible entity is defined within a nested scope of an
4767 instance when giving priority to entities which were visible in
4768 the original generic.
4769 * sem_util.ads, sem_util.adb (Nearest_Enclosing_Instance): New routine.
4771 2017-04-27 Tristan Gingold <gingold@adacore.com>
4773 * raise-gcc.c: Don't use unwind.h while compiling
4774 for the frontend, but mimic host behavior.
4776 2017-04-27 Javier Miranda <miranda@adacore.com>
4778 * sem_ch3.adb (Build_Discriminated_Subtype):
4779 Propagate Has_Pragma_Unreferenced_Objects to the built subtype.
4781 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4783 * sem_prag.adb (Analyze_Global_Item):
4784 Do not consider discriminants because they are not "entire
4785 objects". Remove the discriminant-related checks because they are
4787 (Analyze_Input_Output): Do not consider discriminants
4788 because they are not "entire objects".
4790 2017-04-27 Ed Schonberg <schonberg@adacore.com>
4792 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Do not
4793 perform check if the current scope does not come from source,
4794 as is the case for a rewritten task body, because check has
4795 been performed already, and may not be doable because of changed
4798 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4800 * a-cofuse.adb, a-cfdlli.adb, a-cofuse.ads, a-cfdlli.ads, a-cofuve.adb,
4801 a-cofuve.ads, a-cofuma.adb, a-cofuma.ads, sem_eval.adb, a-cofuba.adb:
4804 2017-04-27 Ed Schonberg <schonberg@adacore.com>
4806 * sem_ch4.adb (Analyze_Call): If the return type of a function
4807 is incomplete in an context in which the full view is available,
4808 replace the type of the call by the full view, to prevent spurious
4810 * exp_disp.adb (Check_Premature_Freezing): Disable check on an
4811 abstract subprogram so that compiler does not reject a parameter
4812 of a primitive operation of a tagged type being frozen, when
4813 the untagged type of that parameter cannot be frozen.
4815 2017-04-27 Bob Duff <duff@adacore.com>
4817 * sem_attr.adb (Compute_Type_Key): Don't walk
4818 representation items for irrelevant types, which could be in a
4819 different source file.
4821 2017-04-27 Steve Baird <baird@adacore.com>
4823 * exp_attr.adb (Expand_N_Attribute_Reference):
4824 Don't expand Image, Wide_Image, Wide_Wide_Image attributes
4827 2017-04-27 Yannick Moy <moy@adacore.com>
4829 * exp_unst.ads: Fix typos in comments.
4831 2017-04-27 Ed Schonberg <schonberg@adacore.com>
4833 * sem_eval.adb (Choice_Matches): Handle properly a real literal
4834 whose type has a defined static predicate.
4836 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4838 * exp_ch4.adb (Insert_Dereference_Action):
4839 Do not adjust the address of a controlled object when the
4840 associated access type is subject to pragma No_Heap_Finalization.
4843 2017-04-27 Pierre-Marie de Rodat <derodat@adacore.com>
4845 * gcc-interface/utils.c (gnat_type_for_size): Set
4846 TYPE_ARTIFICIAL on created types.
4848 2017-04-27 Claire Dross <dross@adacore.com>
4850 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model): Adapt to
4851 modifications in functional containers.
4852 * a-cofuba.ads, a-cofuma.ads, a-cofuse.ads, a-cofuve.ads Reformat
4853 to improve readablity. Subprograms are separated between basic
4854 operations, constructors and properties. Universally quantified
4855 formulas in contracts are factorized in independant functions
4856 with a name and a comment. Names of parameters are improved.
4858 2017-04-27 Gary Dismukes <dismukes@adacore.com>
4860 * exp_spark.adb, sem_elab.adb: Minor reformatting and typo fix.
4862 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4864 * sem_res.adb (Resolve_Type_Conversion): Do not
4865 install a predicate check here since this is already done during
4866 the expansion phase. Verify whether the operand satisfies the
4867 static predicate (if any) of the target type.
4868 * sem_ch3.adb (Analyze_Object_Declaration): Do
4869 not install a predicate check if the object is initialized by
4870 means of a type conversion because the conversion is subjected
4873 2017-04-27 Tristan Gingold <gingold@adacore.com>
4875 * raise.c (__gnat_builtin_longjmp): Remove.
4876 (__gnat_bracktrace):
4877 Add a dummy definition for the compiler (__gnat_eh_personality,
4878 __gnat_rcheck_04, __gnat_rcheck_10) (__gnat_rcheck_19,
4879 __gnat_rcheck_20, __gnat_rcheck_21) (__gnat_rcheck_30,
4880 __gnat_rcheck_31, __gnat_rcheck_32): Likewise.
4881 * a-exexpr.adb: Renamed from a-exexpr-gcc.adb
4882 * a-except.ads, a-except.adb: Renamed from a-except-2005.ads
4883 and a-except-2005.adb.
4884 * raise-gcc.c: Allow build in compiler, compiled as a C++
4886 (__gnat_Unwind_ForcedUnwind): Adjust prototype.
4887 (db): Constify msg_format.
4888 (get_call_site_action_for): Don't use void arithmetic.
4889 * system.ads (Frontend_Exceptions): Set to False.
4890 (ZCX_By_Default): Set to True.
4891 (GCC_ZC_Support): Set to True.
4892 * gcc-interface/Makefile.in: No more variants for a-exexpr.adb and
4894 * gcc-interface/Make-lang.in: Add support for backend zcx exceptions
4895 in gnat1 and gnatbind.
4896 * gnat1, gnatbind: link with raise-gcc.o, a-exctra.o, s-addima.o,
4897 s-excmac.o, s-imgint.o, s-traceb.o, s-trasym.o, s-wchstw.o
4898 * s-excmac.ads, s-excmac.adb: Copy of variants.
4899 * a-except.o: Adjust preequisites.
4900 Add handling of s-excmac-arm.adb and s-excmac-gcc.adb.
4902 2017-04-27 Claire Dross <dross@adacore.com>
4904 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model): Adapt to
4905 modifications in functional containers.
4906 * a-cofuba.ads, a-cofuma.ads, a-cofuse.ads, a-cofuve.ads Reformat
4907 to improve readablity. Subprograms are separated between basic
4908 operations, constructors and properties. Universally quantified
4909 formulas in contracts are factorized in independant functions
4910 with a name and a comment. Names of parameters are improved.
4912 2017-04-27 Gary Dismukes <dismukes@adacore.com>
4914 * exp_spark.adb, sem_elab.adb: Minor reformatting and typo fix.
4916 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4918 * sem_res.adb (Resolve_Type_Conversion): Do not
4919 install a predicate check here since this is already done during
4920 the expansion phase. Verify whether the operand satisfies the
4921 static predicate (if any) of the target type.
4922 * sem_ch3.adb (Analyze_Object_Declaration): Do
4923 not install a predicate check if the object is initialized by
4924 means of a type conversion because the conversion is subjected
4927 2017-04-27 Tristan Gingold <gingold@adacore.com>
4929 * a-except.ads, a-except.adb, a-exexpr.adb: Removed (will be
4930 replaced by their variants).
4932 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4934 * exp_prag.adb, a-cofuse.adb, a-cofuse.ads, einfo.adb, sem_prag.adb,
4935 cstand.adb, par-prag.adb, a-cofuve.adb, a-cofuve.ads, a-cofuma.adb,
4936 a-cofuma.ads, a-cofuba.adb, a-cofuba.ads: Minor reformatting.
4938 2017-04-27 Tristan Gingold <gingold@adacore.com>
4940 * s-excmac-gcc.ads, s-excmac-gcc.adb,
4941 s-excmac-arm.ads, s-excmac-arm.adb (New_Occurrence): Rewrite it in
4944 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4946 * exp_ch7.adb (Establish_Transient_Scope): Rewrite
4947 the loop which detects potential enclosing transient scopes. The
4948 loop now terminates much earlier as transient scopes are bounded
4949 by packages and subprograms.
4951 2017-04-27 Claire Dross <dross@adacore.com>
4953 * a-cfdlli.adb, a-cfdlli.ads (=): Generic parameter removed to
4954 allow the use of regular equality over elements in contracts.
4955 (Cursor): Type is now public so that it can be used in
4957 (Formal_Model): Ghost package containing
4958 model functions that are used in subprogram contracts.
4959 (Current_To_Last): Removed, model functions should be used
4961 (First_To_Previous): Removed, model functions should
4963 (Strict_Equal): Removed, model functions
4964 should be used instead.
4965 (Append): Default parameter value
4966 replaced by new wrapper to allow more precise contracts.
4967 (Insert): Default parameter value replaced by new wrapper to
4968 allow more precise contracts.
4969 (Delete): Default parameter
4970 value replaced by new wrapper to allow more precise contracts.
4971 (Prepend): Default parameter value replaced by new wrapper to
4972 allow more precise contracts.
4973 (Delete_First): Default parameter
4974 value replaced by new wrapper to allow more precise contracts.
4975 (Delete_Last): Default parameter value replaced by new wrapper
4976 to allow more precise contracts.
4978 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4980 * exp_spark.adb (Expand_SPARK): Perform specialized expansion
4981 for object declarations.
4982 (Expand_SPARK_N_Object_Declaration): New routine.
4983 * sem_elab.adb (Check_A_Call): Include calls to the
4984 Default_Initial_Condition procedure of a type under the SPARK
4985 elaboration checks umbrella.
4987 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
4989 * sem.adb (Analyze): Diagnose an illegal iterated component
4991 * sem_util.ads, sem_util.adb
4992 (Diagnose_Iterated_Component_Association): New routine.
4994 2017-04-27 Bob Duff <duff@adacore.com>
4996 * adaint.c (__gnat_get_current_dir): Return 0 in length if
4998 * a-direct.adb, g-dirope.adb, osint.adb, s-os_lib.adb: Raise
4999 exception if getcwd failed.
5001 2017-04-27 Yannick Moy <moy@adacore.com>
5003 * exp_dbug.adb, exp_dbug.ads (Get_External_Name): Prefix ghost
5004 entities with special prefix.
5006 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
5008 * debug.adb Change the documentation of switch -gnatd.s.
5009 * exp_ch7.adb (Make_Transient_Block): Transient blocks do not need
5010 to manage the secondary stack when an enclosing scope already
5011 performs this functionality (aka relaxed management). Switch
5012 -gnatd.s may be used to force strict management in which case
5013 the block will manage the secondary stack unconditionally. Add
5014 a guard to stop the traversal when encountering a package or a
5017 2017-04-27 Ed Schonberg <schonberg@adacore.com>
5019 * sem_res.adb (Resolve_Call): Refine further the handling of
5020 limited views of return types in function calls. If the function
5021 that returns a limited view appears in the current unit,
5022 we do not replace its type by the non-limited view because
5023 this transformation is performed int the back-end. However,
5024 the type of the call itself must be the non-limited view, to
5025 prevent spurious resolution errors.
5027 2017-04-27 Ed Schonberg <schonberg@adacore.com>
5029 * einfo,ads, einfo.adb (Class_Wide_Preconds, Class_Wide_Postconds):
5030 Removed, proposed implementation using generics for class-wide
5031 preconditions proved impractical.
5032 (Class_Wide_Clone): New attribute of subprogram. Designates
5033 subprogram created for primitive operations with class-wide
5034 pre/postconditions that contain calls to other primitives. The
5035 clone holds the body of the original primitive, but the
5036 pre/postonditions do not apply to it. The original body is
5037 rewritten as a wrapper for a call to the clone.
5038 (Is_Class_Wide_Clone): New flag to identify a Class_Wide_Clone. If
5039 the flag is set, no code for the corresponding pre/postconditions
5040 is inserted into its body.
5042 2017-04-27 Bob Duff <duff@adacore.com>
5044 * exp_prag.adb, par-prag.adb, sem_ch13.adb: Ignore
5045 Scalar_Storage_Order if -gnatI is given.
5046 * sem_prag.adb (Analyze_Pragma): Ignore
5047 Default_Scalar_Storage_Order if -gnatI is given.
5049 2017-04-27 Claire Dross <dross@adacore.com>
5051 * a-cofuba.ads (Add): Take as an additional input parameter
5052 the position where the element should be inserted.
5053 (Remove): New function that removes an element from the container.
5054 * a-cofuma.ads (Add): Adapt to the new API of Base.Add.
5055 * a-cofuse.ads (Add): Adapt to the new API of Base.Add.
5056 (Remove): New function that removes an element from a set.
5057 * a-cofuve.ads (Add): Adapt to the new API of Base.Add.
5058 (Remove): New function that removes an element from a sequence.
5059 (Insert): New function that adds anywhere in a sequence.
5061 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
5063 * checks.adb (Generate_Range_Check): Revert previous change.
5065 2017-04-27 Gary Dismukes <dismukes@adacore.com>
5067 * sem_util.adb: Minor reformatting/rewording.
5069 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
5071 * lib-xref.adb (Generate_Reference): The use
5072 of attribute 'Result is not considered a violation of pragma
5075 2017-04-27 Justin Squirek <squirek@adacore.com>
5077 * cstand.adb (Create_Standard): Correctly set
5078 Directly_Designated_Type for Any_Access.
5079 * sem_type.adb (Covers): Minor grammar fixes.
5081 2017-04-27 Bob Duff <duff@adacore.com>
5083 * sem_attr.adb: Minor cleanup.
5085 2017-04-27 Claire Dross <dross@adacore.com>
5087 * a-cofuba.ads, a-cofuba.adb (Ada.Containers.Functional_Base): New
5088 private child of Ada.Containers used to implement all functional
5090 * a-cofuma.ads, a-cofuma.adb (Ada.Containers.Functional_Maps): New
5091 child of Ada.Containers. It provides functional indefinite unbounded
5092 maps which can be used as high level models for specification
5094 * a-cofuse.ads, a-cofuse.adb (Ada.Containers.Functional_Sets): New
5095 child of Ada.Containers. It provides functional indefinite unbounded
5096 sets which can be used as high level models for specification
5098 * a-cofuve.ads, a-cofuve.adb (Ada.Containers.Functional_Vectors): New
5099 child of Ada.Containers. It provides functional indefinite unbounded
5100 vectors which can be used as high level models for specification
5102 * Makefile.rtl: Add new packages.
5103 * impunit.adb: Add new packages.
5105 2017-04-27 Gary Dismukes <dismukes@adacore.com>
5107 * sem_ch4.adb: Minor reformatting.
5109 2017-04-27 Ed Schonberg <schonberg@adacore.com>
5111 * sem_ch12.adb (Analyze_Associations): minor reformatting.
5112 (Check_Fixed_Point_Actual): Do not emit a warning on a fixed
5113 point type actual that has user-defined arithmetic primitives,
5114 when there is a previous actual for a formal package that defines
5115 a fixed-point type with the parent user-defined operator.
5117 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
5119 * checks.adb (Generate_Range_Check): Reinstate part of previous change.
5120 * sem_attr.adb (Resolve_Attribute): Generate a range check when
5121 the component type allows range checks.
5123 2017-04-27 Ed Schonberg <schonberg@adacore.com>
5125 * sem_aux.adb (Is_Generic_Formal): Use original node to locate
5126 corresponding declaration, because formal derived types are
5127 rewritten as private extensions.
5129 2017-04-27 Ed Schonberg <schonberg@adacore.com>
5131 * sem_dim.adb (Analyze_Dimension_Binary_Op): Do not check
5132 dimensions of operands if node has been analyzed already, because
5133 previous analysis and dimension checking will have removed the
5134 dimension information from the operands.
5136 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
5138 * debug.adb: Document the use of switch -gnatd.s.
5139 * einfo.ads Update the documentation on attribute
5140 Sec_Stack_Needed_For_Return and attribute Uses_Sec_Stack. Remove
5141 the uses of these attributes from certain entities.
5142 * exp_ch7.adb (Make_Transient_Block): Reimplement the circuitry
5143 which determines whether the block should continue to manage
5144 the secondary stack.
5145 (Manages_Sec_Stack): New routine.
5147 2017-04-27 Bob Duff <duff@adacore.com>
5149 * atree.ads: Minor edit.
5151 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
5153 * sinfo.ads: Update the section on Ghost mode. Add
5154 a section on SPARK mode. Update the placement of section on
5155 expression functions.
5157 2017-04-27 Bob Duff <duff@adacore.com>
5159 * sinput.adb (Get_Source_File_Index): Don't
5160 assert that S is in the right range in the case where this is
5161 a .dg file under construction.
5163 2017-04-27 Yannick Moy <moy@adacore.com>
5165 * sem_util.adb (Check_Result_And_Post_State):
5166 Handle more precisely each conjunct in expressions formed by
5167 and'ing sub-expressions.
5169 2017-04-27 Gary Dismukes <dismukes@adacore.com>
5171 * exp_ch4.adb, sem_ch4.adb: Minor typo fix and reformatting.
5173 2017-04-25 Arnaud Charlet <charlet@adacore.com>
5175 * gnat_rm.texi, gnat_ugn.texi,
5176 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
5177 doc/gnat_ugn/platform_specific_information.rst,
5178 doc/gnat_ugn/gnat_and_program_execution.rst,
5179 doc/gnat_ugn/gnat_utility_programs.rst,
5180 doc/gnat_ugn/the_gnat_compilation_model.rst,
5181 doc/gnat_rm/implementation_defined_attributes.rst,
5182 doc/gnat_rm/the_gnat_library.rst,
5183 doc/gnat_rm/implementation_defined_pragmas.rst,
5184 doc/gnat_rm/representation_clauses_and_pragmas.rst,
5185 doc/gnat_rm/implementation_of_specific_ada_features.rst,
5186 doc/gnat_rm/implementation_defined_aspects.rst,
5187 doc/gnat_rm/implementation_defined_characteristics.rst: Update
5190 2017-04-25 Arnaud Charlet <charlet@adacore.com>
5192 * exp_ch4.adb (Expand_N_Case_Expression): Emit error message when
5193 generating C code on complex case expressions.
5195 2017-04-25 Arnaud Charlet <charlet@adacore.com>
5197 * sem_prag.adb (Analyze_Pragma): Generate a warning instead
5198 of silently ignoring pragma Ada_xxx in Latest_Ada_Only mode.
5199 * directio.ads, ioexcept.ads, sequenio.ads, text_io.ads: Use
5200 Ada_2012 instead of Ada_2005 to be compatible with the above
5202 * bindgen.adb: Silence new warning on pragma Ada_95.
5204 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5206 * checks.adb (Generate_Range_Check): Revert part of previous change.
5208 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5210 * sem_ch4.adb (Try_Container_Indexing): Handle properly a
5211 container indexing operation that appears as a an actual in a
5212 parameter association in a procedure call.
5214 2017-04-25 Olivier Ramonat <ramonat@adacore.com>
5216 * prj-proc.adb, sem_util.adb, s-stposu.adb, sem_attr.adb, prj-conf.ads:
5217 Fix spelling mistakes.
5219 2017-04-25 Bob Duff <duff@adacore.com>
5221 * types.ads, osint.adb, sinput-c.adb, sinput-d.adb, sinput-l.adb,
5222 * sinput-p.adb: Use regular fat pointers, with bounds checking,
5223 for source buffers. Fix misc obscure bugs.
5224 * sinput.ads, sinput.adb: Use regular fat pointers, with bounds
5225 checking, for source buffers. Modify representation clause for
5226 Source_File_Record as appropriate. Move Source_File_Index_Table
5227 from spec to body, because it is not used outside the body.
5228 Move Set_Source_File_Index_Table into the private part, because
5229 it is used only in the body and in children. Use trickery to
5230 modify the dope in the generic instantiation case. It's ugly,
5231 but not as ugly as the previous method. Fix documentation.
5232 Remove obsolete code.
5233 * fname-sf.adb, targparm.adb: Fix misc out-of-bounds
5234 indexing in source buffers.
5235 * fmap.adb: Avoid conversions from one string type to another.
5236 Remove a use of global name buffer.
5237 * osint.ads, sfn_scan.ads, sfn_scan.adb, sinput-c.ads: Comment
5240 2017-04-25 Gary Dismukes <dismukes@adacore.com>
5242 * exp_util.adb, exp_ch4.adb: Minor reformatting.
5244 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5246 * checks.adb: Code clean up in various routines.
5247 (Generate_Range_Check): Do not generate a range check when the
5248 expander is not active or when index/range checks are suppressed
5250 (Insert_List_After_And_Analyze, Insert_List_Before_And_Analyze):
5251 Remove variants that include a Supress parameter. These routines
5252 are never used, and were introduced before the current scope-based
5253 check suppression method.
5255 2017-04-25 Vasiliy Fofanov <fofanov@adacore.com>
5257 * prj-part.adb, cstreams.c, osint.adb, osint.ads: Remove VMS specific
5258 code and some subprogram calls that are now noop.
5260 2017-04-25 Arnaud Charlet <charlet@adacore.com>
5262 * exp_ch4.adb (Expand_N_Case_Expression): Take
5263 Minimize_Expression_With_Actions into account when possible.
5265 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5267 * exp_util.adb (Known_Non_Null): Moved to Sem_Util.
5268 (Known_Null): Moved to Sem_Util.
5269 * exp_util.ads (Known_Non_Null): Moved to Sem_Util.
5270 (Known_Null): Moved to Sem_Util.
5271 * sem_util.adb Add new enumeration type Null_Status_Kind.
5272 (Known_Non_Null): Moved from Exp_Util. Most of the logic in
5273 this routine is now carried out by Null_Status.
5274 (Known_Null): Moved from Exp_Util. Most of the logic in this routine
5275 is now carried out by Null_Status.
5276 (Null_Status): New routine.
5277 * sem_util.ads (Known_Non_Null): Moved from Exp_Util.
5278 (Known_Null): Moved from Exp_Util.
5280 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5282 * sem_ch6.adb (Analyze_Expression_Function): Do not report an
5283 error on the return type of an expression function that is a
5284 completion, if the type is derived from a generic formal type.
5286 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5288 * sem_dim.adb (Dimensions_Of_Operand): The dimensions of a type
5289 conversion are those of the target type.
5291 2017-04-25 Bob Duff <duff@adacore.com>
5293 * a-clrefi.adb: Minor cleanup.
5295 2017-04-25 Gary Dismukes <dismukes@adacore.com>
5297 * exp_util.adb, exp_util.ads, types.ads: Minor reformatting.
5299 2017-04-25 Bob Duff <duff@adacore.com>
5301 * err_vars.ads, fmap.adb, fmap.ads, comperr.adb, fname-sf.adb,
5302 types.adb, types.ads, types.h, sinput-l.adb, targparm.adb,
5303 errout.adb, sinput.adb, sinput.ads, cstand.adb, scn.adb,
5304 scn.ads, gnatls.adb: Eliminate the vestigial Internal_Source_File and
5305 the Internal_Source buffer. This removes the incorrect call to "="
5306 the customer noticed.
5307 Wrap remaining calls to "=" in Null_Source_Buffer_Ptr. We
5308 eventually need to eliminate them altogether. Or else get rid
5309 of zero-origin addressing.
5311 2017-04-25 Claire Dross <dross@adacore.com>
5313 * exp_util.ads (Expression_Contains_Primitives_Calls_Of): New
5314 function used in GNATprove to know if an expression contains
5315 non-dispatching calls on primitives of a tagged type.
5317 2017-04-25 Bob Duff <duff@adacore.com>
5319 * rtsfind.adb (Initialize): Initialize
5320 First_Implicit_With. Building the compiler with Normalize_Scalars
5321 and validity checking finds this being used as an uninitialized
5324 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5326 * contracts.adb (Analyze_Entry_Or_Subprogram_Body_Contract):
5327 Add a warning about SPARK mode management. The routine now
5328 saves and restores both the mode and associated pragma.
5329 (Analyze_Entry_Or_Subprogram_Contract): Add a warning about
5330 SPARK mode management. The routine now saves and restores both
5331 the mode and associated pragma.
5332 (Analyze_Object_Contract):
5333 Add a warning about SPARK mode management. The routine
5334 now saves and restores both the mode and associated pragma.
5335 (Analyze_Package_Body_Contract): Add a warning about SPARK mode
5336 management. The routine now saves and restores both the mode
5337 and associated pragma. (Analyze_Package_Contract): Add a warning
5338 about SPARK mode management. The routine now saves and restores
5339 both the mode and associated pragma.
5340 (Analyze_Task_Contract):
5341 Add a warning about SPARK mode management. The routine now saves
5342 and restores both the mode and associated pragma.
5343 * expander.adb (Expand): Change the way the Ghost mode is saved
5345 * exp_ch3.adb (Freeze_Type): Change the way the Ghost mode is
5347 * exp_disp.adb (Make_DT): Change the way the Ghost mode is saved
5349 * exp_util.adb (Build_DIC_Procedure_Body):
5350 Change the way the Ghost mode is saved and restored.
5351 (Build_DIC_Procedure_Declaration): Change the way the Ghost
5352 mode is saved and restored.
5353 (Build_Invariant_Procedure_Body):
5354 Change the way the Ghost mode is saved and restored.
5355 (Build_Invariant_Procedure_Declaration): Change the way the Ghost
5356 mode is saved and restored.
5357 (Make_Predicate_Call): Change the
5358 way the Ghost mode is saved and restored.
5359 * freeze.adb (Freeze_Entity): Change the way the Ghost mode is
5361 * ghost.adb (Mark_And_Set_Ghost_Assignment): Remove parameter Mode
5363 (Mark_And_Set_Ghost_Body): Remove parameter
5364 Mode and its assignment.
5365 (Mark_And_Set_Ghost_Completion):
5366 Remove parameter Mode and its assignment.
5367 (Mark_And_Set_Ghost_Declaration): Remove parameter Mode and its
5369 (Mark_And_Set_Ghost_Instantiation): Remove parameter
5370 Mode and its assignment.
5371 (Mark_And_Set_Ghost_Procedure_Call):
5372 Remove parameter Mode and its assignment.
5374 Remove parameter Mode and its assignment.
5375 * ghost.ads (Mark_And_Set_Ghost_Assignment): Remove parameter Mode
5376 and update the comment on usage.
5377 (Mark_And_Set_Ghost_Body):
5378 Remove parameter Mode and update the comment on usage.
5379 (Mark_And_Set_Ghost_Completion): Remove parameter Mode and
5380 update the comment on usage.
5381 (Mark_And_Set_Ghost_Declaration):
5382 Remove parameter Mode and update the comment on usage.
5383 (Mark_And_Set_Ghost_Instantiation): Remove parameter Mode and
5384 update the comment on usage.
5385 (Mark_And_Set_Ghost_Procedure_Call):
5386 Remove parameter Mode and update the comment on usage.
5387 (Set_Ghost_Mode): Remove parameter Mode and update the comment
5389 * lib.ads Remove obsolete fields SPARK_Mode_Pragma from various
5391 * lib-load.adb (Create_Dummy_Package_Unit): Remove the assignment
5392 of obsolete field SPARK_Mode_Pragma.
5393 (Load_Main_Source): Remove
5394 the assignment of obsolete field SPARK_Mode_Pragma.
5395 (Load_Unit): Remove the assignment of obsolete field SPARK_Mode_Pragma.
5396 * lib-writ.adb (Add_Preprocessing_Dependency): Remove
5397 the assignment of obsolete field SPARK_Mode_Pragma.
5398 (Ensure_System_Dependency): Remove the assignment of obsolete
5399 field SPARK_Mode_Pragma.
5400 * rtsfind.adb (Load_RTU): Add a warning about Ghost and SPARK
5401 mode management. Change the way Ghost and SPARK modes are saved
5403 * sem.adb (Analyze): Change the way the Ghost mode is saved
5405 * sem_ch3.adb (Analyze_Object_Declaration): Change the way the
5406 Ghost mode is saved and restored.
5407 (Process_Full_View): Change
5408 the way the Ghost mode is saved and restored.
5409 * sem_ch5.adb (Analyze_Assignment): Change the way the Ghost
5410 mode is saved and restored.
5411 * sem_ch6.adb (Analyze_Procedure_Call): Change the way the Ghost
5412 mode is saved and restored.
5413 (Analyze_Subprogram_Body_Helper):
5414 Change the way the Ghost mode is saved and restored.
5415 * sem_ch7.adb (Analyze_Package_Body_Helper): Change the way the
5416 Ghost mode is saved and restored.
5417 * sem_ch10.adb (Analyze_Subunit): Add a warning about SPARK mode
5418 management. Save the SPARK mode-related data prior to any changes
5419 to the scope stack and contexts. The mode is then reinstalled
5420 before the subunit is analyzed in order to restore the original
5421 view of the subunit.
5422 * sem_ch12.adb (Analyze_Package_Instantiation): Update the
5423 warning on region management. Change the way the Ghost and
5424 SPARK modes are saved and restored.
5425 (Inline_Instance_Body):
5426 Add a warning about SPARK mode management. Code clean up.
5427 (Analyze_Subprogram_Instantiation): Update the warning on region
5428 management. Change the way the Ghost and SPARK modes are saved
5430 (Instantiate_Package_Body): Update the warning
5431 on region management. Change the way the Ghost and SPARK modes
5432 are saved and restored.
5433 (Instantiate_Subprogram_Body): Update
5434 the warning on region management. Change the way the Ghost and
5435 SPARK modes are saved and restored.
5436 (Set_Instance_Env): Add a
5437 warning about SPARK mode management. Change the way SPARK mode
5438 is saved and restored.
5439 * sem_ch13.adb (Build_Predicate_Functions):
5440 Change the way the Ghost mode is saved and restored.
5441 (Build_Predicate_Function_Declaration): Change the way the Ghost
5442 mode is saved and restored.
5443 * sem_elab.adb (Check_Elab_Calls): Add a warning about SPARK
5444 mode management. Change the way SPARK mode is saved and restored.
5445 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
5446 Change the way the Ghost mode is saved and restored.
5447 (Analyze_Initial_Condition_In_Decl_Part): Change the way
5448 the Ghost mode is saved and restored.
5450 Change the way the Ghost mode is saved and restored.
5451 (Analyze_Pre_Post_Condition_In_Decl_Part): Change the way the
5452 Ghost mode is saved and restored.
5453 * sem_util.adb (Install_SPARK_Mode): New routine.
5454 (Restore_SPARK_Mode): New routine.
5455 (Save_SPARK_Mode_And_Set): Removed.
5456 (Set_SPARK_Mode): New routine.
5457 * sem_util.ads (Install_SPARK_Mode): New routine.
5458 (Restore_SPARK_Mode): New routine.
5459 (Save_SPARK_Mode_And_Set): Removed.
5460 (Set_SPARK_Mode): New routine.
5462 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5464 * sem_util.adb, sem_util.ads (From_Nested_Package): New predicate
5465 to determine whether a type is declared in a local package that
5466 has not yet been frozen.
5467 * freeze.adb (Freeze_Before): Use new predicate to determine
5468 whether a local package must be installed on the scope stack
5469 in order to evaluate in the proper scope actions generated by
5470 aspect specifications, such as Predicate
5471 * sem_ch13.adb: Simplify code in Analyze_Aspects_At_Freeze_Point
5472 using new predicate.
5474 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5476 * sem_warn.adb (Warn_On_Constant_Valid_Condition): Do not consider
5477 comparisons between non- scalar expressions expressions because
5478 their values cannot be invalidated.
5479 * sem_warn.ads (Warn_On_Constant_Valid_Condition): Update the
5482 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5484 * par_sco.adb: Minor reformatting.
5486 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5488 * sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): If entity
5489 is a type from an unfrozen local package, install package to
5490 complete the analysis of delayed aspects of the type.
5492 2017-04-25 Tristan Gingold <gingold@adacore.com>
5494 * bingen.adb (System_Version_Control_Used): New variable.
5495 (Resolve_Binder_Options): Set the above variable.
5496 (Gen_Output_File_Ada): Conditionally call Gen_Versions.
5497 (Gen_Elab_Order): Emit blank line before.
5499 2017-04-25 Justin Squirek <squirek@adacore.com>
5501 * sem_cat.adb (Validate_RT_RAT_Component): Added
5502 an extra check to ignore incomplete types.
5504 2017-04-25 Thomas Quinot <quinot@adacore.com>
5506 * sem_prag.adb (Analyze_Pragma, case Pragma_Check): Remove
5507 bogus circuitry for the case where Name is Predicate.
5509 2017-04-25 Thomas Quinot <quinot@adacore.com>
5511 * par_sco.adb(Traverse_Declarations_Or_Statements.Traverse_Aspects):
5512 Create SCOs for Predicate aspects in disabled
5513 state initially, to be enabled later on by...
5514 * sem_ch13.adb (Build_Predicate_Functions.Add_Predicates): Mark
5515 SCO for predicate as enabled.
5517 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5519 * comperr.adb (Compiler_Abort): Remove now obsolete pair of
5520 pragmas Warnings Off / On.
5521 * namet.adb (Finalize): Remove now obsolete pair of pragmas
5523 * output.adb: Remove now obsolete pair of pragmas Warnings Off / On.
5524 * sem_warn.adb (Warn_On_Constant_Valid_Condition): Do not
5525 consider comparisons between static expressions because their
5526 values cannot be invalidated.
5527 * urealp.adb (Tree_Read): Remove now obsolete pair of pragmas
5529 (Tree_Write): Remove now obsolete pair of pragmas Warnings Off / On.
5530 * usage.adb Remove now obsolete pair of pragmas Warnings Off / On.
5532 2017-04-25 Bob Duff <duff@adacore.com>
5534 * sem_elab.adb (In_Task_Activation): Trace internal calls in
5537 2017-04-25 Gary Dismukes <dismukes@adacore.com>
5539 * sem_prag.adb, sem_warn.adb, sem_eval.adb: Minor reformatting and
5542 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5544 * comperr.adb (Compiler_Abort): Add a pair of pragma Warnings
5545 On/Off to defend against a spurious warning in conditional
5547 * exp_ch4.adb (Rewrite_Comparison): Reimplemented.
5548 * namet.adb (Finalize): Add a pair of pragma Warnings On/Off to
5549 defend against a spurious warning in conditional compilation.
5550 * output.adb Add a pair of pragma Warnings On/Off to defend
5551 against a spurious warning in conditional compilation.
5552 * sem_eval.adb (Eval_Relational_Op): Major code clean up.
5553 (Fold_General_Op): New routine.
5554 (Fold_Static_Real_Op): New routine.
5555 (Test_Comparison): New routine.
5556 * sem_eval.ads (Test_Comparison): New routine.
5557 * sem_warn.adb (Is_Attribute_Constant_Comparison): New routine.
5558 (Warn_On_Constant_Valid_Condition): New routine.
5559 (Warn_On_Known_Condition): Use Is_Attribute_Constant_Comparison
5560 to detect a specific case.
5561 * sem_warn.adb (Warn_On_Constant_Valid_Condition): New routine.
5562 * urealp.adb (Tree_Read): Add a pair of pragma Warnings On/Off
5563 to defend against a spurious warning in conditional compilation.
5564 (Tree_Write): Add a pair of pragma Warnings On/Off to defend
5565 against a spurious warning in conditional compilation.
5566 * usage.adb Add a pair of pragma Warnings On/Off to defend
5567 against a spurious warning in conditional compilation.
5569 2017-04-25 Arnaud Charlet <charlet@adacore.com>
5571 * sinfo.ads, sem_ch13.adb: Update comment.
5573 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5575 * sem_util.adb (Is_Post_State): A reference to a
5576 generic in out parameter is considered a change in the post-state
5579 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5581 * sem_ch12.adb (Load_Parent_Of_Generic); When retrieving the
5582 declaration of a subprogram instance within its wrapper package,
5583 skip over null statements that may result from the rewriting of
5586 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5588 * exp_attr.adb (Expand_Attribute_Reference, case 'Read):
5589 If the type is an unchecked_union, replace the attribute with
5590 a Raise_Program_Error (rather than inserting such before the
5591 attribute reference) to handle properly the case where we are
5592 processing a component of a larger record, and we need to prevent
5593 further expansion for the unchecked union.
5594 (Expand_Attribute_Reference, case 'Write): If the type is
5595 an unchecked_union, check whether enclosing scope is a Write
5596 subprogram. Replace attribute with a Raise_Program_Error if the
5597 discriminants of the unchecked_union type have not default values
5598 because such a use is erroneous..
5600 2017-04-25 Tristan Gingold <gingold@adacore.com>
5602 * exp_ch9.adb (Expand_N_Task_Type_Declaration):
5603 Add relative_deadline to task record on edf profile.
5604 (Make_Initialize_Protection): Pass deadline_floor value on edf profile.
5605 (Make_Task_Create_Call): Pass relative_deadline value.
5606 * par-prag.adb (Prag): Handle Pragma_Deadline_Floor.
5607 * s-rident.ads (Profile_Name): Add GNAT_Ravenscar_EDF.
5608 (Profile_Info): Add info for GNAT_Ravenscar_EDF.
5609 * sem_prag.adb (Set_Ravenscar_Profile): Handle
5610 GNAT_Ravenscar_EDF (set scheduling policy).
5611 (Analyze_Pragma): Handle GNAT_Ravenscar_EDF profile and Deadline_Floor
5613 (Sig_Flags): Add choice for Pragma_Deadline_Floor.
5614 * snames.ads-tmpl (Name_Deadline_Floor, Name_Gnat_Ravenscar_EDF):
5616 (Pragma_Deadline_Floor): New pragma.
5617 * targparm.adb (Get_Target_Parameters): Recognize
5618 GNAT_Ravenscar_EDF profile.
5620 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
5622 * gnatvsn.ads (Library_Version): Bump to 8. Update comment.
5624 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5626 * sem_aux.adb (Nearest_Ancestor): Use original node of type
5627 declaration to locate nearest ancestor, because derived
5628 type declarations for record types are rewritten as record
5630 * sem_ch13.adb (Add_Call): Use an unchecked conversion to handle
5631 properly derivations that are completions of private types.
5632 (Add_Predicates): If type is private, examine rep. items of full
5633 view, which may include inherited predicates.
5634 (Build_Predicate_Functions): Ditto.
5636 2017-04-25 Javier Miranda <miranda@adacore.com>
5638 * sem_util.adb (New_Copy_Tree.Visit_Entity): Extend previous change
5639 to generate new entities for subtype declarations located in
5640 Expression_With_Action nodes.
5642 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5644 * sem_elab.adb (Check_A_Call): Remove
5645 local variables Is_DIC_Proc and Issue_In_SPARK. Verify the
5646 need for Elaborate_All when SPARK elaboration checks are
5647 required. Update the checks for instances, variables, and calls
5648 to Default_Initial_Condition procedures.
5650 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5652 * aspects.ads, aspects.adb: Make the GNAT-specific pragma No_Inline
5653 into a boolean aspect, in analogy with the Ada aspect No_Return.
5655 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5657 * exp_ch6.adb, sem_ch13.adb, sem_ch6.adb: Minor reformatting.
5659 2017-04-25 Bob Duff <duff@adacore.com>
5661 * sem_res.adb (Resolve_Actuals): Under -gnatd.q, reset
5662 Is_True_Constant for an array variable that is passed to a
5663 foreign function as an 'in' parameter.
5664 * debug.adb: Document -gnatd.q.
5666 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5668 * sem_ch6.adb (Analyze_Expression_Function): If expression function
5669 is completion and return type is an access type do not freeze
5670 designated type: this will be done in the process of freezing
5671 the expression if needed.
5672 (Freeze_Expr_Types): Check whether type is complete before
5673 creating freeze node, to provide a better error message if
5674 reference is premature.
5675 * sem_ch13.adb (Check_Indexing_Functions): Ignore inherited
5676 functions created by type derivations.
5678 2017-04-25 Pascal Obry <obry@adacore.com>
5680 * g-sercom.ads: Add simple usage of GNAT.Serial_Communication.
5682 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5684 * sem_res.adb (Resolve_Type_Conversion):
5685 When resolving against any fixed type, set the type of the
5686 operand as universal real when the operand is a multiplication
5687 or a division where both operands are of any fixed type.
5688 (Unique_Fixed_Point_Type): Add local variable ErrN. Improve the
5689 placement of an error message by pointing to the operand of a
5690 type conversion rather than the conversion itself.
5692 2017-04-25 Thomas Quinot <quinot@adacore.com>
5694 * sem_ch13.adb (Build_Predicate_Function_Declaration): Set
5695 Needs_Debug_Info when producing SCOs.
5697 2017-04-25 Thomas Quinot <quinot@adacore.com>
5699 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
5700 Always pass a null finalization master for a library level named access
5701 type to which a pragme No_Heap_Finalization applies.
5703 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
5707 * a-ngcoar.adb, a-ngrear.adb (Inverse): call Unit_Matrix with First_1
5708 set to A'First(2) and vice versa.
5710 2017-04-25 Yannick Moy <moy@adacore.com>
5712 * freeze.adb (Freeze_Record_Type): Remove obsolete
5713 rule on volatile tagged record restriction on SPARK code.
5715 2017-04-25 Yannick Moy <moy@adacore.com>
5717 * sem_prag.adb (minor) Fix SPARK RM reference.
5719 2017-04-25 Yannick Moy <moy@adacore.com>
5721 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): Update
5722 comment to reflect which entity is chosen as unique entity.
5723 (Unique_Entity): Return full view instead of private spec for
5724 protected type or task type. Fix possible incorrect access when
5727 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
5729 * sem_res.adb (Set_Slice_Subtype): Treat specially bit-packed
5730 array types only instead of all packed array types.
5732 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5734 * sem_ch6.adb (Conforming_Types): If type of formal as a specified
5735 dimension system, verify that dimensions of both match.
5736 (Check_Conformance): Add error message in case of dimension
5738 * sem_dim.ads, sem_dim.adb (Dimensions_Match): New utility
5741 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
5743 * gnatxref.adb, gnatfind.adb: Avoid using the term project file,
5746 2017-04-25 Yannick Moy <moy@adacore.com>
5748 * sem_util.adb: Minor refactoring.
5749 * freeze.adb (Freeze_Record_Type): Fix checking of SPARK RM 7.1.3(5).
5751 2017-04-25 Claire Dross <dross@adacore.com>
5753 * sem_prag.adb (Collect_Inherited_Class_Wide_Conditions): Go to
5754 ultimate alias when accessing overridden operation. Indeed, if the
5755 overridden operation is itself inherited, it won't have any explicit
5758 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5760 * sem_warn.adb (Warn_On_Overlapping_Actuals): There can be no
5761 overlap if the two formals have different types, because formally
5762 the corresponding actuals cannot designate the same objects.
5764 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5766 * sem_dim.adb (Dimensions_Of_Operand): minot cleanups: a) If
5767 dimensions are present from context, use them. b) If operand is
5768 a static constant rewritten as a literal, obtain the dimensions
5769 from the original declaration, otherwise use dimensions of type
5770 established from context.
5772 2017-04-25 Yannick Moy <moy@adacore.com>
5774 * sem_util.adb (Is_Effectively_Volatile): Protect against base type
5775 of array that is private.
5777 2017-04-25 Gary Dismukes <dismukes@adacore.com>
5779 * sem_ch3.adb, exp_util.adb, sem_prag.adb, exp_ch4.adb: Minor
5782 2017-04-25 Yannick Moy <moy@adacore.com>
5784 * a-ngelfu.adb, a-ngelfu.ads: Add SPARK_Mode On on spec, Off
5787 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5789 * sem_disp.adb (Check_Dispatching_Context): Add guard to refine
5790 the check that recognizes a call to a private overridding and
5791 replaces the called subprogram with its alias.
5793 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5795 * exp_util.adb: Minor reformatting.
5797 2017-04-25 Justin Squirek <squirek@adacore.com>
5799 * exp_ch3.adb (Freeze_Type): Add condition to always treat
5800 interface types as a partial view of a private type for the
5801 generation of invariant procedure bodies.
5802 * exp_util.adb, exp_util.ads (Add_Inherited_Invariants):
5803 Add a condition to get the Corresponding_Record_Type for
5804 concurrent types, add condition to return in the absence of a
5805 class in the pragma, remove call to Replace_Type_References,
5806 and add call to Replace_References.
5807 (Add_Interface_Invariatns),
5808 (Add_Parent_Invariants): Modify call to Add_Inherited_Invariants
5809 to including the working type T.
5810 (Add_Own_Invariants): Remove
5811 legacy condition for separate units, remove dispatching for ASIS
5812 and save a copy of the expression in the pragma expression.
5813 (Build_Invariant_Procedure_Body): Default initalize vars,
5814 remove return condition on interfaces, always use the
5815 private type for interfaces, and move the processing of types
5816 until after the processing of invariants for the full view.
5817 (Build_Invariant_Procedure_Declaration): Remove condition
5818 to return if an interface type is encountered and add
5819 condition to convert the formal parameter to its class-wide
5820 counterpart if Work_Typ is abstract.
5821 (Replace_Type): Add call to Remove_Controlling_Arguments.
5822 (Replace_Type_Ref): Remove class-wide dispatching for the current
5823 instance of the type.
5824 (Replace_Type_References): Remove parameter "Derived"
5825 (Remove_Controlling_Arguments): Created in order to removing
5826 the controlliong argument from calls to primitives in the case
5827 of the formal parameter being an class-wide abstract type.
5828 * sem_ch3.adb (Build_Assertion_Bodies_For_Type): Almost identical
5829 to the change made to Freeze_Type in exp_ch3. Add a condition
5830 to treat interface types as a partial view.
5831 * sem_prag.adb (Analyze_Pragma): Modify parameters in the call
5832 to Build_Invariant_Procedure_Declaration to properly generate a
5833 "partial" invariant procedure when Typ is an interface.
5835 2017-04-25 Bob Duff <duff@adacore.com>
5837 * a-numeri.ads: Go back to using brackets encoding for the Greek
5840 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5842 * sem_ch3.adb (Derive_Subprogram): Implement rule in RM 6.1.1
5843 (10-15): if derived type T with progenitors is abstract,
5844 and primitive P of this type inherits non-trivial classwide
5845 preconditions from both a parent operation and from an interface
5846 operation, then the inherited operation is abstract if the parent
5847 operation is not null.
5848 * sem_disp.ads, sem_disp.adb: replace function Covers_Some_Interface
5849 with Covered_Interface_Op to yield the actual interface operation
5850 that is implemented by a given inherited operation.
5852 2017-04-25 Javier Miranda <miranda@adacore.com>
5854 * exp_ch4.adb (Expand_N_Op_Expon): Relocate left
5855 and right operands after performing the validity checks. Required
5856 because validity checks may remove side effects from the operands.
5858 2017-04-25 Javier Miranda <miranda@adacore.com>
5860 * exp_attr.adb (Attribute_Unrestricted_Access):
5861 Do not disable implicit type conversion. Required to generate
5862 code that displaces the pointer to reference the secondary
5865 2017-04-25 Pascal Obry <obry@adacore.com>
5867 * prj-attr.adb, snames.ads-tmpl: Add package Install's
5868 Required_Artifacts attribute.
5870 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5872 * sem_util.adb (Same_Value): String literals are compile-time
5873 values, and comparing them must use Expr_Value_S.
5875 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5877 * sem_ch4.adb (Complete_Object_Interpretation): If an explicit
5878 dereference is introduced for the object, and the object is
5879 overloaded, do not check whether it is aliased, because it may
5880 include an implicit dereference.
5881 * sem_type.adb (Disambiguate): If two interpretations are access
5882 attribute types with the same designated type keep either of
5883 them and do not report an ambiguity. A true ambiguity will be
5886 2017-04-25 Bob Duff <duff@adacore.com>
5888 * a-numeri.ads: Change the encoding of Greek letter Pi from
5889 brackets encoding to UTF-8. Use pragma Wide_Character_Encoding
5890 to indicate the encoding. We considered using a byte order mark
5891 (BOM), but that causes various trouble (misc software eats the
5892 BOM, if you have a patch with a BOM, then it's not at the start
5893 of the patch, so it's not a BOM, the BOM affects with-ing files,
5895 * scng.adb, s-wchcnv.adb: Minor.
5897 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5899 * sem_ch3.adb, sem_ch8.adb, sem_disp.adb: Minor reformatting.
5900 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5902 * sem_ch3.adb (Add_Internal_Interface_Entities): Move
5903 Has_Non_Trivial_Precondition to sem_util. for use elsewhere.
5904 Improve error message on operations that inherit non-conforming
5905 classwide preconditions from ancestor and progenitor.
5906 * sem_util.ads, sem_util.adb (Has_Non_Trivial_Precondition):
5907 moved here from sem_ch3.
5908 * sem_ch8.adb (Analyze_Subprogram_Renaming): Implement legality
5909 check given in RM 6.1.1 (17) concerning renamings of overriding
5910 operations that inherits class-wide preconditions from ancestor
5913 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5915 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Code cleanup.
5916 (Build_Adjust_Statements): Code cleanup.
5917 (Build_Finalizer): Update the initialization of
5919 (Build_Finalize_Statements): Code cleanup.
5920 (Build_Initialize_Statements): Code cleanup.
5921 (Make_Deep_Array_Body): Update the initialization of
5923 (Make_Deep_Record_Body): Update the initialization of Exceptions_OK.
5924 (Process_Object_Declaration): Generate a null exception handler only
5925 when exceptions are allowed.
5926 (Process_Transients_In_Scope): Update the initialization of
5928 * exp_util.ads, exp_util.adb (Exceptions_In_Finalization_OK): New
5930 * sem_ch11.adb (Analyze_Exception_Handlers): Do not check any
5931 restrictions when the handler is internally generated and the
5934 2017-04-25 Ed Schonberg <schonberg@adacore.com>
5936 * sem_ch3.adb (Has_Non_Trivial_Precondition): New predicate to
5937 enforce legality rule on classwide preconditions inherited from
5938 both an ancestor and a progenitor (RM 6.1.1 (10-13).
5939 * sem_disp.adb (Check_Dispatching_Context): A call to an abstract
5940 subprogram need not be dispatching if it appears in a precondition
5941 for an abstract or null subprogram.
5943 2017-04-25 Gary Dismukes <dismukes@adacore.com>
5945 * sem_ch10.adb: Minor typo fix.
5947 2017-04-25 Arnaud Charlet <charlet@adacore.com>
5949 * gcc-interface/Makefile.in: Cleanup VxWorks targets.
5951 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
5953 * fname.adb (Is_Internal_File_Name): Arrange for the slices to
5954 have a length which is a power of 2.
5955 (Is_Predefined_File_Name): Likewise. Adjust comment.
5957 2017-04-25 Bob Duff <duff@adacore.com>
5959 * exp_aggr.adb (Component_Count): Protect the
5960 arithmetic from attempting to convert a value >= 2**31 to Int,
5961 which would otherwise raise Constraint_Error.
5963 2017-04-25 Bob Duff <duff@adacore.com>
5965 * opt.ads (Locking_Policy): Fix incorrect documentation. The
5966 first character of the policy name is not unique.
5968 2017-04-25 Bob Duff <duff@adacore.com>
5970 * s-fileio.adb (Name): Raise Use_Error if the file is a temp file.
5971 * s-ficobl.ads (Is_Temporary_File): Remove incorrect comment
5972 about this flag not being used. It was already used, and it is
5975 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
5977 * einfo.adb Flag301 is now known as Ignore_SPARK_Mode_Pragmas.
5978 (Ignore_SPARK_Mode_Pragmas): New routine.
5979 (Set_Ignore_SPARK_Mode_Pragmas): New routine.
5980 (Write_Entity_Flags): Add an entry for Ignore_SPARK_Mode_Pragmas.
5981 * einfo.ads Add new attribute Ignore_SPARK_Mode_Pragmas and update
5983 (Ignore_SPARK_Mode_Pragmas): New routine
5984 along with pragma Inline.
5985 (Set_Ignore_SPARK_Mode_Pragmas): New routine along with pragma Inline.
5986 * opt.ads Rename flag Ignore_Pragma_SPARK_Mode to
5987 Ignore_SPARK_Mode_Pragmas_In_Instance.
5988 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
5989 Save and restore the value of global flag
5990 Ignore_SPARK_Mode_Pragmas_In_Instance. Set or reinstate the value
5991 of global flag Ignore_SPARK_Mode_Pragmas_In_Instance when either
5992 the corresponding spec or the body must ignore all SPARK_Mode
5993 pragmas found within.
5994 (Analyze_Subprogram_Declaration): Mark
5995 the spec when it needs to ignore all SPARK_Mode pragmas found
5996 within to allow the body to infer this property in case it is
5997 instantiated or inlined later.
5998 * sem_ch7.adb (Analyze_Package_Body_Helper): Save and restore the
5999 value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set
6000 the value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance
6001 when the corresponding spec also ignored all SPARK_Mode pragmas
6003 (Analyze_Package_Declaration): Mark the spec when
6004 it needs to ignore all SPARK_Mode pragmas found within to allow
6005 the body to infer this property in case it is instantiated or
6007 * sem_ch12.adb (Analyze_Formal_Package_Declaration):
6008 Save and restore the value of flag
6009 Ignore_SPARK_Mode_Pragmas_In_Instance. Mark the
6010 formal spec when it needs to ignore all SPARK_Mode
6011 pragmas found within to allow the body to infer this
6012 property in case it is instantiated or inlined later.
6013 (Analyze_Package_Instantiation): Save and restore the value
6014 of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Mark
6015 the instance spec when it needs to ignore all SPARK_Mode
6016 pragmas found within to allow the body to infer this
6017 property in case it is instantiated or inlined later.
6018 (Analyze_Subprogram_Instantiation): Save and restore the value
6019 of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Mark the
6020 instance spec and anonymous package when they need to ignore
6021 all SPARK_Mode pragmas found within to allow the body to infer
6022 this property in case it is instantiated or inlined later.
6023 (Instantiate_Package_Body): Save and restore the value of global
6024 flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set the value of
6025 global flag Ignore_SPARK_Mode_Pragmas_In_Instance when the
6026 corresponding instance spec also ignored all SPARK_Mode pragmas
6028 (Instantiate_Subprogram_Body): Save and restore the
6029 value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set
6030 the value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance
6031 when the corresponding instance spec also ignored all SPARK_Mode
6032 pragmas found within.
6033 * sem_prag.adb (Analyze_Pragma): Update the reference to
6034 Ignore_Pragma_SPARK_Mode.
6035 * sem_util.adb (SPARK_Mode_Is_Off): A construct which ignored
6036 all SPARK_Mode pragmas defined within yields mode "off".
6038 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6040 * bindgen.adb, exp_dbug.adb, errout.adb, fname.adb: Minor reformatting.
6042 2017-04-25 Bob Duff <duff@adacore.com>
6044 * exp_atag.adb (Build_CW_Membership): Add "Suppress =>
6045 All_Checks" to avoid generating unnecessary checks.
6046 * exp_ch4.adb (Expand_N_In, Make_Tag_Check): Add "Suppress =>
6048 * sem.ads: Fix comment.
6049 * expander.ads: Fix comment.
6050 * exp_atag.ads: Fix comment: "Index = 0" should be
6053 2017-04-25 Gary Dismukes <dismukes@adacore.com>
6055 * s-taprop-linux.adb: Minor editorial fixes.
6057 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
6059 * sem_util.adb (New_Copy_Tree): Put back the declarations of the
6060 hash tables at library level. Reinstate the NCT_Hash_Tables_Used
6061 variable and set it to True whenever the main hash table is
6062 populated. Short- circuit the Assoc function if it is false
6063 and add associated guards.
6065 2017-04-25 Olivier Hainque <hainque@adacore.com>
6067 * bindgen.adb (Gen_Elab_Calls): Also update counter of lone
6068 specs without elaboration code that have an elaboration counter
6069 nevertheless, e.g. when compiled with -fpreserve-control-flow.
6070 * sem_ch10.adb (Analyze_Compilation_Unit):
6071 Set_Elaboration_Entity_Required when requested to preserve
6072 control flow, to ensure the unit elaboration is materialized at
6073 bind time, resulting in the inclusion of the unit object file
6074 in the executable closure at link time.
6076 2017-04-25 Pierre-Marie de Rodat <derodat@adacore.com>
6078 * exp_dbug.adb: In Debug_Renaming_Declaration,
6079 when dealing with indexed component, accept to produce a renaming
6080 symbol when the index is an IN parameter or when it is a name
6081 defined in an outer scope.
6083 2017-04-25 Yannick Moy <moy@adacore.com>
6085 * errout.adb (Error_Msg): Adapt continuation
6086 message in instantiations and inlined bodies for info messages.
6088 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
6090 * fname.adb (Has_Internal_Extension): Add pragma Inline.
6091 Use direct 4-character slice comparisons.
6093 pragma Inline. (Has_Suffix): Delete.
6094 (Is_Internal_File_Name):
6095 Test Is_Predefined_File_Name first.
6096 (Is_Predefined_File_Name):
6097 Use direct slice comparisons as much as possible and limit all
6098 comparisons to at most 8 characters.
6100 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6102 * checks.adb (Insert_Valid_Check): Code cleanup.
6103 * exp_ch6.adb (Add_Validation_Call_By_Copy_Code): New routine.
6104 (Expand_Actuals): Generate proper copy-back for a validation
6105 variable when it acts as the argument of a type conversion.
6106 * sem_util.adb (Is_Validation_Variable_Reference): Augment the
6107 predicate to operate on type qualifications.
6109 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6111 * sem_prag.adb, exp_ch6.adb, binde.adb, sem_disp.adb, s-fileio.adb:
6114 2017-04-25 Bob Duff <duff@adacore.com>
6116 * sem_prag.adb (No_Return): Give an error if the pragma applies
6117 to a body. Specialize the error for the specless body case,
6118 as is done for (e.g.) pragma Convention.
6119 * debug.adb: Add switch -gnatd.J to disable the above legality
6120 checks. This is mainly for use in our test suite, to avoid
6121 rewriting a lot of illegal (but working) code. It might also
6122 be useful to customers. Under this switch, if a pragma No_Return
6123 applies to a body, and the procedure raises an exception (as it
6124 should), the pragma has no effect. If the procedure does return,
6125 execution is erroneous.
6127 2017-04-25 Bob Duff <duff@adacore.com>
6129 * exp_ch6.adb (Expand_Actuals): This is the
6130 root of the problem. It took N as an 'in out' parameter, and in
6131 some cases, rewrote N, but then set N to Original_Node(N). So
6132 the node returned in N had no Parent. The caller continued
6133 processing of this orphaned node. In some cases that caused a
6134 crash (e.g. Remove_Side_Effects climbs up Parents in a loop,
6135 and trips over the Empty Parent). The solution is to make N an
6136 'in' parameter. Instead of rewriting it, return the list of
6137 post-call actions, so the caller can do the rewriting later,
6138 after N has been fully processed.
6139 (Expand_Call_Helper): Move most of Expand_Call here. It has
6140 too many premature 'return' statements, and we want to do the
6141 rewriting on return.
6142 (Insert_Post_Call_Actions): New procedure to insert the post-call
6143 actions in the appropriate place. In the problematic case,
6144 that involves rewriting N as an Expression_With_Actions.
6145 (Expand_Call): Call the new procedures Expand_Call_Helper and
6146 Insert_Post_Call_Actions.
6148 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6150 * sem_prag.adb (Inherits_Class_Wide_Pre): Cleanup code, handle
6151 properly type derived from generic formal types, to handle
6152 properly modified version of ACATS 4.1B B611017.
6154 2017-04-25 Javier Miranda <miranda@adacore.com>
6156 * exp_unst.adb (Subp_Index): Adding missing
6157 support for renamings and functions that return a constrained
6158 array type (i.e. functions for which the frontend built a
6159 procedure with an extra out parameter).
6161 2017-04-25 Pascal Obry <obry@adacore.com>
6163 * s-string.adb: Minor code clean-up.
6165 2017-04-25 Bob Duff <duff@adacore.com>
6167 * s-os_lib.ads, s-os_lib.adb (Non_Blocking_Wait_Process): New
6169 * adaint.h, adaint.c (__gnat_portable_no_block_wait): C support
6170 function for Non_Blocking_Wait_Process.
6172 2017-04-25 Bob Duff <duff@adacore.com>
6174 * prep.adb (Preprocess): Remove incorrect
6175 Assert. Current character can be ASCII.CR.
6177 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6179 * sem_prag.adb (Set_Convention_From_Pragma): Cleanup code for
6180 convention Stdcall, which has a number of exceptions. Convention
6181 is legal on a component declaration whose type is an anonymous
6182 access to subprogram.
6184 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6186 * sem_ch4.adb: sem_ch4.adb Various reformattings.
6187 (Try_One_Prefix_Interpretation): Use the base type when dealing
6188 with a subtype created for purposes of constraining a private
6189 type with discriminants.
6191 2017-04-25 Javier Miranda <miranda@adacore.com>
6193 * einfo.ads, einfo.adb (Has_Private_Extension): new attribute.
6194 * warnsw.ads, warnsw.adb (All_Warnings): Set warning on late
6195 dispatching primitives (Restore_Warnings): Restore warning on
6196 late dispatching primitives (Save_Warnings): Save warning on late
6197 dispatching primitives (Do_Warning_Switch): Use -gnatw.j/-gnatw.J
6198 to enable/disable this warning.
6199 (WA_Warnings): Set warning on late dispatching primitives.
6200 * sem_ch3.adb (Analyze_Private_Extension_Declaration): Remember
6201 that its parent type has a private extension.
6202 * sem_disp.adb (Warn_On_Late_Primitive_After_Private_Extension):
6204 * usage.adb: Document -gnatw.j and -gnatw.J.
6206 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6208 * exp_ch7.adb, checks.adb, sem_prag.adb, eval_fat.adb: Minor
6211 2017-04-25 Bob Duff <duff@adacore.com>
6213 * binde.adb (Validate): Do not pass dynamic strings
6214 to pragma Assert, because older compilers do not support that.
6216 2017-04-25 Bob Duff <duff@adacore.com>
6218 * s-fileio.adb (Close): When a temp file is
6219 closed, delete it and clean up its Temp_File_Record immediately,
6220 rather than waiting until later.
6221 (Temp_File_Record): Add File
6222 component, so Close can know which Temp_File_Record corresponds
6223 to the file being closed.
6224 (Delete): Don't delete temp files,
6225 because they are deleted by Close.
6226 (Open): Set the File component
6227 of Temp_File_Record. This requires moving the creation of the
6228 Temp_File_Record to the end, after the AFCB has been created.
6230 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6232 * checks.adb (Insert_Valid_Check): Do not generate
6233 a validity check when inside a generic.
6235 2017-04-25 Yannick Moy <moy@adacore.com>
6237 * sem_res.adb (Resolve_Type_Conversion): Fix bad logic.
6239 2017-04-25 Arnaud Charlet <charlet@adacore.com>
6241 * snames.ads-tmpl (Snames): More names for detecting predefined
6242 potentially blocking subprograms.
6244 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6246 * sem_prag.adb (Analyze_Pre_Post_Condition): The rules
6247 concerning inheritance of class-wide preconditions do not apply
6250 2017-04-25 Bob Duff <duff@adacore.com>
6252 * s-ficobl.ads: Minor comment fix.
6254 2017-04-25 Yannick Moy <moy@adacore.com>
6256 * checks.adb (Apply_Scalar_Range_Check): Analyze precisely
6257 conversions from float to integer in GNATprove mode.
6258 (Apply_Type_Conversion_Checks): Make sure in GNATprove mode
6259 to call Apply_Type_Conversion_Checks, so that range checks
6260 are properly positioned when needed on conversions, including
6261 when converting from float to integer. (Determine_Range): In
6262 GNATprove mode, take into account the possibility of conversion
6263 from float to integer.
6264 * sem_res.adb (Resolve_Type_Conversion): Only enforce range
6265 check on conversions from fixed-point to integer, not anymore
6266 on conversions from floating-point to integer, when in GNATprove
6269 2017-04-25 Yannick Moy <moy@adacore.com>
6271 * checks.adb (Determine_Range_R): Special case type conversions
6272 from integer to float in order to get bounds in that case too.
6273 * eval_fat.adb (Machine): Avoid issuing warnings in GNATprove
6274 mode, for computations involved in interval checking.
6276 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6278 * checks.adb (Insert_Valid_Check): Partially reimplement validity
6280 * einfo.adb Node36 is now used as Validated_Object.
6281 (Validated_Object): New routine.
6282 (Set_Validated_Object): New routine.
6283 (Write_Field36_Name): Add an entry for Validated_Object.
6284 * einfo.ads Add new attribute Validated_Object along with
6286 (Validated_Object): New routine along with pragma Inline.
6287 (Set_Validated_Object): New routine along with pragma Inline.
6288 * exp_attr.adb (Make_Range_Test): Add processing for validation
6289 variables to avoid extra reads and copies of the prefix.
6290 * exp_ch6.adb (Expand_Actuals): Add copy-back for validation
6291 variables in order to reflect any changes done in the variable
6292 back into the original object.
6293 * sem_util.adb (Is_Validation_Variable_Reference): New routine.
6294 * sem_util.ads (Is_Validation_Variable_Reference): New routine.
6296 2017-04-25 Steve Baird <baird@adacore.com>
6298 * exp_ch7.adb (Build_Array_Deep_Procs,
6299 Build_Record_Deep_Procs, Make_Finalize_Address_Body): Don't
6300 generate Finalize_Address routines for CodePeer.
6302 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6304 * sem_prag.adb (Inherits_Class_Wide_Pre): subsidiary of
6305 Analyze_Pre_Post_Condition, to implement the legality checks
6306 mandated by AI12-0131: Pre'Class shall not be specified for an
6307 overriding primitive subprogram of a tagged type T unless the
6308 Pre'Class aspect is specified for the corresponding primitive
6309 subprogram of some ancestor of T.
6311 2017-04-25 Bob Duff <duff@adacore.com>
6313 * sem_ch8.adb (Use_One_Type): If a use_type_clause
6314 is redundant, set its Used_Operations to empty. This is only
6315 necessary for use clauses that appear in the parent of a generic
6316 child unit, because those use clauses get reanalyzed when we
6317 instantiate the generic, and we don't want the Used_Operations
6318 carried over from the original context (where it was probably
6321 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6323 * exp_ch6.adb: Minor reformatting.
6325 2017-04-25 Bob Duff <duff@adacore.com>
6327 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
6328 Use Source_Index (Current_Sem_Unit) to find the correct casing.
6329 * exp_prag.adb (Expand_Pragma_Check): Use Source_Index
6330 (Current_Sem_Unit) to find the correct casing.
6331 * par.adb (Par): Null out Current_Source_File, to ensure that
6332 the above bugs won't rear their ugly heads again.
6334 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6336 * sem_ch8.adb (Find_Type): For an attribute reference
6337 'Class, if prefix type is synchronized and previous errors
6338 have suppressed the creation of the corresponding record type,
6339 create a spurious class-wide for the synchonized type itself,
6340 to catch other misuses of the attribute
6342 2017-04-25 Steve Baird <baird@adacore.com>
6344 * exp_ch6.adb (Expand_Simple_Function_Return): if CodePeer_Mode
6345 is True, then don't generate the accessibility check for the
6346 tag of a tagged result.
6347 * exp_intr.adb (Expand_Dispatching_Constructor_Call):
6348 if CodePeer_Mode is True, then don't generate the
6349 tag checks for the result of call to an instance of
6350 Ada.Tags.Generic_Dispatching_Constructor (i.e., both the "is a
6351 descendant of" check and the accessibility check).
6353 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6355 * sem_ch13.adb: Code cleanups.
6356 * a-strbou.ads: minor whitespace fix in Trim for bounded strings.
6357 * sem_ch8.ads: Minor comment fix.
6359 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
6361 * exp_ch4.adb (Library_Level_Target): New function.
6362 (Expand_Concatenate): When optimization is enabled, also expand
6363 the operation out-of-line if the concatenation is present within
6364 the expression of the declaration of a library-level object and
6365 not only if it is the expression of the declaration.
6367 2017-04-25 Bob Duff <duff@adacore.com>
6369 * freeze.adb (Freeze_Object_Declaration): Do
6370 not Remove_Side_Effects if there is a pragma Linker_Section,
6371 because in that case we want static initialization in the
6372 appropriate section.
6374 2017-04-25 Gary Dismukes <dismukes@adacore.com>
6376 * exp_dbug.adb: Minor rewording and reformatting.
6378 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6380 * sem_attr.adb (Statically_Denotes_Object): New predicate, to
6381 handle the proposed changes to rules concerning potentially
6382 unevaluated expressions, to include selected components that
6383 do not depend on discriminants, and indexed components with
6385 * sem_util.adb (Is_Potentially_Unevaluated): Add check for
6386 predicate in quantified expression, and fix bugs in the handling
6387 of case expressions and membership test.
6388 (Analyze_Attribute_Old_Result): use new predicate.
6389 (Analyze_Attribute, case Loop_Entry): ditto.
6391 2017-04-25 Bob Duff <duff@adacore.com>
6393 * s-secsta.adb (SS_Info): Add a comment
6394 explaining why we don't need to walk all the chunks in order to
6395 compute the total size.
6397 2017-04-25 Bob Duff <duff@adacore.com>
6399 * namet.ads, namet.adb (Global_Name_Buffer): Increase the length
6400 of the global name buffer to 4*Max_Line_Length.
6402 2017-04-25 Javier Miranda <miranda@adacore.com>
6404 * exp_ch8.adb (Expand_N_Object_Renaming_Declaration): When creating a
6405 renaming entity for debug information, mark the entity as needing debug
6406 info if it comes from sources.
6408 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6410 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Remove the
6411 restriction converning the use of 'Address where the prefix is
6412 of a controlled type.
6414 2017-04-25 Pierre-Marie de Rodat <derodat@adacore.com>
6416 * exp_dbug.adb: In Debug_Renaming_Declaration,
6417 skip slices that are made redundant by an indexed component
6419 * atree.h: New definition for Original_Node.
6421 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6423 * sem_prag.adb, sem_prag.ads: Minor reformatting.
6425 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6427 * sem_ch3.adb (Check_Entry_Contract): Call
6428 Preanalyze_Spec_Expression so that resolution takes place as well.
6429 * sem_util.adb (Check_Internal_Protected_Use): Reject properly
6430 internal calls that appear in preconditions of protected
6431 operations, in default values for same, and in contract guards
6432 for contract cases in SPARK.
6434 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
6436 * a-numaux.ads: Fix description of a-numaux-darwin
6438 (Double): Define to Long_Float.
6439 * a-numaux-vxworks.ads (Double): Likewise.
6440 * a-numaux-darwin.ads
6442 * a-numaux-libc-x86.ads (Double): Define to Long_Long_Float.
6443 * a-numaux-x86.ads: Fix package description.
6444 * a-numaux-x86.adb (Is_Nan): Minor tweak.
6445 (Reduce): Adjust and complete description. Call Is_Nan instead of
6446 testing manually. Use an integer temporary to hold rounded value.
6447 * a-numaux-darwin.adb (Reduce): Likewise.
6448 (Is_Nan): New function.
6450 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6452 * sem_ch4.adb (Analyze_Selected_Component): Additional refinement
6453 on analysis of prefix whose type is a current instance of a
6454 synchronized type, but where the prefix itself is an entity that
6457 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6459 * exp_ch5.adb (Replace_Target): When rewriting the RHS, preserve
6460 the identity of callable entities therein, because they have been
6461 properly resolved, and prefixed calls may have been rewritten
6464 2017-04-25 Patrick Bernardi <bernardi@adacore.com>
6466 * exp_ch3.adb (Build_Init_Statements): Convert
6467 the expression of the pragma/aspect Secondary_Stack_Size to
6468 internal type System.Parameters.Size_Type before assigning
6469 it to the Secondary_Stack_Size component of the task type's
6470 corresponding record.
6472 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
6474 * sem_eval.adb (Compile_Time_Compare): Reinstate the expr+literal
6475 (etc) optimizations when the type is modular and the offsets
6478 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
6480 * s-osinte-freebsd.ads: Minor comment tweaks
6482 2017-04-25 Javier Miranda <miranda@adacore.com>
6484 * urealp.adb (UR_Write): Reverse previous patch
6485 adding documentation on why we generate multiplications instead
6486 of divisions (needed to avoid expressions whose computation with
6487 large numbers may cause division by 0).
6489 2017-04-25 Bob Duff <duff@adacore.com>
6491 * erroutc.adb (Set_Specific_Warning_Off,
6492 Set_Warnings_Mode_Off): Use the correct source file for
6493 Stop. Was using Current_Source_File, which is only valid during
6494 parsing. Current_Source_File will have a leftover value from
6495 whatever file happened to be parsed last, because of a with_clause
6498 2017-04-25 Bob Duff <duff@adacore.com>
6500 * lib.ads, lib.adb (In_Internal_Unit): New functions similar
6501 to In_Predefined_Unit, but including GNAT units.
6502 * sem_util.ads, sem_util.adb (Should_Ignore_Pragma): Replace
6503 with Should_Ignore_Pragma_Par and Should_Ignore_Pragma_Sem,
6504 because Should_Ignore_Pragma was not working reliably outside
6505 the parser, because Current_Source_File is not valid.
6506 * sem_prag.adb, exp_prag.adb: Call Should_Ignore_Pragma_Sem.
6507 * par-prag.adb: Call Should_Ignore_Pragma_Par.
6509 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
6511 * gnat1drv.adb (Gnat1Drv): Disable Generate_Processed_File in
6514 2017-04-25 Javier Miranda <miranda@adacore.com>
6516 * urealp.adb (UR_Write): Fix output of constants with a base other
6519 2017-04-25 Justin Squirek <squirek@adacore.com>
6521 * sem_ch13.adb (Get_Interfacing_Aspects): Moved to sem_util.adb.
6522 * sem_prag.adb (Analyze_Pragma, Process_Import_Or_Interface):
6523 Add extra parameter for Process_Interface_Name.
6524 (Process_Interface_Name): Add parameter for pragma to analyze
6525 corresponding aspect.
6526 * sem_util.ads, sem_util.adb (Get_Interfacing_Aspects): Added
6529 2017-04-25 Gary Dismukes <dismukes@adacore.com>
6531 * exp_ch7.adb, einfo.ads, sem_prag.adb: Minor reformatting and typo
6534 2017-04-25 Yannick Moy <moy@adacore.com>
6536 * sem_res.adb (Resolve_Comparison_Op): Do not
6537 attempt evaluation of relational operations inside assertions.
6539 2017-04-25 Justin Squirek <squirek@adacore.com>
6541 * exp_util.adb (Add_Interface_Invariants):
6542 Restored, code moved back from Build_Invariant_Procedure_Body.
6543 (Add_Parent_Invariants): Restored, code moved back from
6544 Build_Invariant_Procedure_Body.
6545 (Build_Invariant_Procedure_Body):
6546 Remove refactored calls and integrated code from
6547 Add_Parent_Invariants and Add_Interface_Invariants.
6549 2017-04-25 Johannes Kanig <kanig@adacore.com>
6551 * errout.adb (Output_Messages): Adjust computation of total
6553 * erroutc.adb (Error_Msg): In statistics counts, deal
6554 correctly with informational messages that are not warnings.
6555 * errutil.adb (Finalize): adjust computation of total errors.
6557 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
6559 * terminals.c (__gnat_terminate_pid): New.
6560 * g-exptty.ads (Terminate_Process): New. Update comments.
6562 2017-04-25 Arnaud Charlet <charlet@adacore.com>
6564 * a-cfinve.ads, a-cofove.ads (Empty_Vector): add Global contract.
6566 2017-04-25 Justin Squirek <squirek@adacore.com>
6568 * sem_ch3.adb (Analyze_Declarations): Minor
6569 correction to comments, move out large conditional and scope
6570 traversal into a predicate.
6571 (Uses_Unseen_Lib_Unit_Priv): Predicate function made from extracted
6574 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6576 * sem_ch4.adb (Analyze_Selected_Component): Refine analysis
6577 of prefix whose type is a current instance of a synchronized
6578 type. If the prefix is an object this is an external call (or
6579 requeue) that can only access public operations of the object. The
6580 previous predicate was too restrictive, and did not allow public
6581 protected operations, only task entries.
6583 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6585 * sem_ch5.adb, fname.adb: Minor reformatting.
6587 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6589 * einfo.adb (Is_Anonymous_Access_Type): New routine.
6590 * einfo.ads Update the placement of
6591 E_Anonymous_Access_Subprogram_Type along with all subtypes that
6593 (Is_Anonymous_Access_Type): New routine.
6594 * exp_ch7.adb (Allows_Finalization_Master): Do not generate a
6595 master for an access type subject to pragma No_Heap_Finalization.
6596 * exp_util.adb (Build_Allocate_Deallocate_Proc): An object being
6597 allocated or deallocated does not finalization actions if the
6598 associated access type is subject to pragma No_Heap_Finalization.
6599 * opt.ads Add new global variable No_Heap_Finalization_Pragma.
6600 * par-prag.adb Pragma No_Heap_Finalization does not need special
6601 processing from the parser.
6602 * sem_ch6.adb (Check_Return_Subtype_Indication): Remove ancient
6603 ??? comments. Use the new predicate Is_Anonymous_Access_Type.
6604 * sem_prag.adb Add an entry in table Sig_Flags for pragma
6605 No_Heap_Finalization.
6606 (Analyze_Pragma): Add processing for
6607 pragma No_Heap_Finalization. Update various error messages to
6608 use Duplication_Error.
6609 * sem_util.ads, sem_util.adb (No_Heap_Finalization): New routine.
6610 * snames.ads-tmpl: Add new predefined name No_Heap_Finalization
6611 and corresponding pragma id.
6613 2017-04-25 Bob Duff <duff@adacore.com>
6615 * freeze.adb (Freeze_Record_Type): Use the
6616 underlying type of the component type to determine whether it's
6617 elementary. For representation clause purposes, a private type
6618 should behave the same as its full type.
6619 * fname.ads, fname.adb (Is_Predefined_File_Name):
6620 Make sure things like "system.ali" are recognized as predefined.
6622 2017-04-25 Javier Miranda <miranda@adacore.com>
6624 * debug.adb: Update documentation of -gnatd.6.
6626 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6628 * sem_ch5.adb (Preanalyze_Range): Handle properly an Ada2012
6629 element iterator when the name is an overloaded function call,
6630 one of whose interpretations yields an array.
6632 2017-04-25 Bob Duff <duff@adacore.com>
6634 * uname.ads, uname.adb (Is_Predefined_Unit_Name,
6635 Is_Internal_Unit_Name): New functions for operating on unit
6636 names, as opposed to file names. There's some duplicated code
6637 with fname.adb, which is unfortunate, but it seems like we don't
6638 want to add dependencies here.
6639 * fname-uf.adb (Get_File_Name): Change Is_Predefined_File_Name
6640 to Is_Predefined_Unit_Name; the former was wrong, because Uname
6641 is not a file name at all.
6642 * fname.ads, fname.adb: Document the fact that
6643 Is_Predefined_File_Name and Is_Internal_File_Name can be called
6644 for ALI files, and fix the code so it works properly for ALI
6645 files. E.g. these should return True for "system.ali".
6647 2017-04-25 Justin Squirek <squirek@adacore.com>
6649 * exp_util.adb (Add_Invariant): Removed,
6650 code moved to Add_Invariant_Check, Add_Inherited_Invariant,
6651 and Add_Own_Invariant. (Add_Invariant_Check): Used
6652 for adding runtime checks from any kind of invariant.
6653 (Add_Inherited_Invariant): Generates invariant checks for
6654 class-wide invariants (Add_Interface_Invariants): Removed, code
6655 moved to Build_Invariant_Procedure_Body (Add_Own_Invariant):
6656 Create a types own invariant procedure (Add_Parent_Invariants):
6657 Removed, code moved to Build_Invariant_Procedure_Body
6658 (Build_Invariant_Procedure_Body): Add refactored calls
6659 and integrated code from Add_Parent_Invariants and
6660 Add_Interface_Invariants.
6661 (Process_Type): Removed, the
6662 relavant code was inlined into both Add_Own_Invariant and
6663 Add_Inherited_Invariant.
6665 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6667 * make.adb, par-ch2.adb, sem_util.adb, scans.ads, sem_ch8.adb,
6668 scn.adb, osint.adb, fname.adb: Minor reformatting.
6670 2017-04-25 Pascal Obry <obry@adacore.com>
6672 * s-taprop-mingw.adb: Do not check for CloseHandle in
6675 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6677 * sem_util.adb (Check_Part_Of_Reference):
6678 Continue to examine the context if the reference appears within
6679 an expression function.
6681 2017-04-25 Justin Squirek <squirek@adacore.com>
6683 * exp_ch7.adb, exp_ch7.ads Remove Build_Invariant_Procedure_Body
6684 and Build_Invariant_Procedure_Declaration.
6685 * exp_util.ads, exp_util.adb Add Build_Invariant_Procedure_Body
6686 and Build_Invariant_Procedure_Declaration from exp_ch7
6687 and break-out Is_Untagged_Private_Derivation from
6688 Build_Invariant_Procedure_Body.
6689 (Replace_Type_References):
6690 Append an extra parameter to allow for dispatching replacements
6691 and add the corrasponding logic.
6692 (Type_Invariant): Remove
6693 Replace_Typ_Refs and replace its references with calls to
6694 Replace_Type_References.
6695 * sem_ch3.adb, sem_prag.adb: Remove with and use of exp_ch7.
6697 2017-04-25 Bob Duff <duff@adacore.com>
6699 * sem_util.ads, sem_util.adb (Should_Ignore_Pragma): New function
6700 that returns True when appropriate.
6701 * par-prag.adb, exp_prag.adb, sem_prag.adb: Do not ignore pragmas
6702 when compiling predefined files.
6703 * fname.ads, fname.adb (Is_Predefined_File_Name): Fix bug:
6704 "gnat.adc" should not be considered a predefined file name.
6705 That required (or at least encouraged) a lot of cleanup of global
6706 variable usage. We shouldn't be communicating information via
6707 the global name buffer.
6708 * bindgen.adb, errout.adb, fname-uf.adb, lib-load.adb, make.adb,
6709 * restrict.adb, sem_ch10.adb, sem_ch6.adb, sem_ch8.adb: Changes
6710 required by the above-mentioned cleanup.
6712 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6714 * osint.adb (Find_File): Handle properly a request for a
6715 configuration file whose name is a directory.
6717 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6719 * sem_attr.adb, sem_ch5.adb: Minor reformatting.
6721 2017-04-25 Bob Duff <duff@adacore.com>
6723 * types.ads: Minor: Fix '???' comment.
6724 * sem_ch8.adb: Minor comment fix.
6726 2017-04-25 Bob Duff <duff@adacore.com>
6728 * sem_prag.adb: Remove suspicious uses of Name_Buf.
6729 * stringt.ads, stringt.adb, exp_dbug.adb, sem_dim.adb: Remove
6730 Add_String_To_Name_Buffer, to avoid using the global Name_Buf.
6731 Add String_To_Name with no side effects.
6733 2017-04-25 Justin Squirek <squirek@adacore.com>
6735 * sem_ch3.adb (Analyze_Declarations): Add
6736 additional condition for edge case.
6738 2017-04-25 Bob Duff <duff@adacore.com>
6740 * par-ch2.adb, scans.ads, scn.adb: Do not give an error for
6741 reserved words inside pragmas. This is necessary to allow the
6742 pragma name Interface to be used in pragma Ignore_Pragma.
6743 * par.adb: Minor comment fix.
6745 2017-04-25 Javier Miranda <miranda@adacore.com>
6747 * a-tags.ads, a-tags.adb (Type_Is_Abstract): Renamed as Is_Abstract.
6748 * rtsfind.ads (RE_Type_Is_Abstract): Renamed as Is_Abstract.
6749 * exp_disp.adb (Make_DT): Update occurrences of RE_Type_Is_Abstract.
6750 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Update
6751 occurrences of RE_Type_Is_Abstract
6753 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6755 * exp_util.adb (Build_Chain): Account for ancestor
6756 subtypes while traversing the derivation chain.
6758 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6760 * sem_attr.adb: minor reformatting.
6762 2017-04-25 Doug Rupp <rupp@adacore.com>
6764 * sigtramp-vxworks-target.inc [PPC64]: Add a .localentry pseudo-op.
6766 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6768 * sem_ch5.adb (Analyze_Assignment): Reset Full_Analysis flag on
6769 the first pass over an assignment statement with target names,
6770 to prevent the generation of subtypes (such as discriminated
6771 record components)that may carry the target name outside of the
6772 tree for the assignment. The subtypes will be generated when
6773 the assignment is reanalyzed in full.
6774 (Analyze_Target_Name): Handle properly class-wide types.
6776 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6778 * elists.ads, elists.adb (Prepend_Unique_Elmt): New routine.
6779 * exp_ch3.adb (Freeze_Type): Signal the DIC body is created for
6780 the purposes of freezing.
6781 * exp_util.adb Update the documentation and structure of the
6782 type map used in class-wide semantics of assertion expressions.
6783 (Add_Inherited_Tagged_DIC): There is really no need to preanalyze
6784 and resolve the triaged expression because all substitutions
6785 refer to the proper entities. Update the replacement of
6787 (Build_DIC_Procedure_Body): Add formal parameter
6788 For_Freeze. Add local variable Build_Body. Inherited DIC pragmas
6789 are now only processed when freezing occurs. Build a body only
6791 (Entity_Hash): Removed.
6792 (Map_Types): New routine.
6793 (Replace_Object_And_Primitive_References): Removed.
6794 (Replace_References): New routine.
6795 (Replace_Type_References): Moved to the library level of Exp_Util.
6796 (Type_Map_Hash): New routine.
6797 (Update_Primitives_Mapping): Update the mapping call.
6798 (Update_Primitives_Mapping_Of_Types): Removed.
6799 * exp_util.ads (Build_DIC_Procedure_Body): Add formal
6800 parameter For_Freeze and update the comment on usage.
6801 (Map_Types): New routine.
6802 (Replace_References): New routine.
6803 (Replace_Type_References): Moved to the library level of Exp_Util.
6804 (Update_Primitives_Mapping_Of_Types): Removed.
6805 * sem_ch7.adb (Preserve_Full_Attributes): Propagate the DIC
6806 properties of the private type to the full view in case the full
6807 view derives from a parent type and inherits a DIC pragma.
6808 * sem_prag.adb (Analyze_Pragma): Guard against a case where a
6809 DIC pragma is placed at the top of a declarative region.
6811 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
6813 * a-tasatt.adb: Complete previous change and use an unsigned
6814 int to avoid overflow checks.
6816 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6818 * sem_attr.adb (Analyze_Attribute, case 'Access): Specialize
6819 the error message when the attribute reference is an actual in
6820 a call to a subprogram inherited from a generic formal type with
6821 unknown discriminants, which makes the subprogram and its formal
6822 parameters intrinsic (see RM 6.3.1 (8) and (13)).
6824 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6826 * sem_aggr.adb, inline.adb, einfo.adb, einfo.ads, scng.adb,
6827 sem_prag.adb: Minor reformatting.
6829 2017-04-25 Bob Duff <duff@adacore.com>
6831 * sem_attr.adb (Type_Key): Add code in the
6832 recursive Compute_Type_Key to protect against fetching the source
6833 code for Standard, in case a component of the type is declared
6834 in Standard. There was already code to do this for the original
6835 type, but not for its components.
6837 2017-04-25 Javier Miranda <miranda@adacore.com>
6839 * exp_ch3.adb (Build_Initialization_Call): Handle
6840 subtypes of private types when searching for the underlying full
6841 view of a private type.
6843 2017-04-25 Javier Miranda <miranda@adacore.com>
6845 * sem_res.adb (Set_Mixed_Mode_Operand): A universal
6846 real conditional expression can appear in a fixed-type context
6847 and must be resolved with that context to facilitate the code
6848 generation to the backend.
6850 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6852 * einfo.adb, einfo.ads (Body_Needed_For_Inlining): New flag,
6853 to indicate whether during inline processing, when some unit U1
6854 appears in the context of a unit U2 compiled for instantiation
6855 or inlining purposes, the body of U1 needs to be compiled as well.
6856 * sem_prag.adb (Process_Inline): Set Body_Needed_For_Inlining if
6857 context is a package declaration.
6858 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration,
6859 Analyze_Generic_Package_Declaration): ditto.
6860 * inline.adb (Analyze_Inlined_Bodies): Check
6861 Body_Needed_For_Inlining.
6863 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6865 * par.adb (Current_Assign_Node): Global variable use to record
6866 the presence of a target_name in the right hand side of the
6867 assignment being parsed.
6868 * par-ch4.adb (P_Name): If the name is a target_name, mark the
6869 enclosing assignment node accordingly.
6870 * par-ch5.adb (P_Assignment_Statement): Set Current_Assign_Node
6872 * sem_ch5.adb (Analyze_Assignment): Disable expansion before
6873 analyzing RHS if the statement has target_names.
6874 * sem_aggr.adb (Resolve_Iterated_Component_Association): Handle
6875 properly choices that are subtype marks.
6876 * exp_ch5.adb: Code cleanup.
6878 2017-04-25 Bob Duff <duff@adacore.com>
6880 * s-memory.adb: Add a comment regarding efficiency.
6881 * atree.adb: Fix the assertion, and combine 2 assertions into one,
6882 "the source has an extension if and only if the destination does."
6883 * sem_ch3.adb, sem_ch13.adb: Address ??? comments.
6885 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
6887 * a-tasatt.adb (Set_Value): Fix handling of 32bits -> 64bits
6890 2017-04-25 Doug Rupp <rupp@adacore.com>
6892 * init.c (__gnat_error_handler) [vxworks]: Turn on sigtramp
6893 handling for ppc64-vx7.
6894 * sigtramp-vxworks-target.inc
6895 [SIGTRAMP_BODY]: Add section for ppc64-vx7.
6897 2017-04-25 Arnaud Charlet <charlet@adacore.com>
6899 * ada_get_targ.adb: New file.
6901 2017-04-25 Bob Duff <duff@adacore.com>
6903 * uintp.adb (Most_Sig_2_Digits): In case Direct (Right), fetch
6904 Direct_Val (Right), instead of the incorrect Direct_Val (Left).
6905 (UI_GCD): Remove ??? comment involving possible efficiency
6906 improvements. This just isn't important after all these years.
6908 * uintp.ads: Minor cleanup.
6910 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6912 * exp_util.adb, exp_util.ads, sem_ch7.adb, sem_prag.adb, exp_ch3.adb:
6913 Revert previous changes.
6914 * scng.adb: Minor reformatting.
6915 * s-stratt.ads: Fix unbalanced parens in comment.
6917 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6919 * sem_ch3.adb, exp_util.adb, sem_prag.adb, freeze.adb, sem_util.adb:
6922 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6924 * scng.adb (Scan): Handle '@' appropriately.
6925 * sem_ch5.adb: Code cleanup.
6927 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6929 * freeze.adb (Check_Expression_Function): Do not check for the
6930 use of deferred constants if the freezing of the expression
6931 function is triggered by its generated body, rather than a
6934 2017-04-25 Javier Miranda <miranda@adacore.com>
6936 * exp_attr.adb (Rewrite_Stream_Proc_Call): Handle
6937 subtypes of private types when performing the view conversion.
6939 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6941 * exp_ch3.adb (Freeze_Type): Signal the DIC body is created for
6942 the purposes of freezing.
6943 * exp_util.adb Update the documentation and structure of the
6944 type map used in class-wide semantics of assertion expressions.
6945 (Add_Inherited_Tagged_DIC): There is really no need to preanalyze
6946 and resolve the triaged expression because all substitutions
6947 refer to the proper entities. Update the replacement of
6949 (Build_DIC_Procedure_Body): Add formal parameter
6950 For_Freeze. Add local variable Build_Body. Inherited DIC pragmas
6951 are now only processed when freezing occurs. Build a body only
6953 (Entity_Hash): Removed.
6954 (Map_Types): New routine.
6955 (Replace_Object_And_Primitive_References): Removed.
6956 (Replace_References): New routine.
6957 (Replace_Type_References): Moved to the library level of Exp_Util.
6958 (Type_Map_Hash): New routine.
6959 (Update_Primitives_Mapping): Update the mapping call.
6960 (Update_Primitives_Mapping_Of_Types): Removed.
6961 * exp_util.ads (Build_DIC_Procedure_Body): Add formal
6962 parameter For_Freeze and update the comment on usage.
6963 (Map_Types): New routine.
6964 (Replace_References): New routine.
6965 (Replace_Type_References): Moved to the library level of Exp_Util.
6966 (Update_Primitives_Mapping_Of_Types): Removed.
6967 * sem_ch7.adb (Preserve_Full_Attributes): Propagate the DIC
6968 properties of the private type to the full view in case the full
6969 view derives from a parent type and inherits a DIC pragma.
6970 * sem_prag.adb (Analyze_Pragma): Guard against a case where a
6971 DIC pragma is placed at the top of a declarative region.
6973 2017-04-25 Tristan Gingold <gingold@adacore.com>
6975 * s-mmap.ads (Data): Add pragma Inline.
6977 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6979 * checks.adb (Insert_Valid_Check): Do not use
6980 a renaming to alias a volatile name because this will lead to
6981 multiple evaluations of the volatile name. Use a constant to
6982 capture the value instead.
6984 2017-04-25 Doug Rupp <rupp@adacore.com>
6986 * init.c [VxWorks Section]: Disable sigtramp for ppc64-vx7.
6988 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6990 * exp_util.adb, exp_util.ads (Build_Class_Wide_Expression):
6991 Add out parameter to indicate to caller that a wrapper must
6992 be constructed for an inherited primitive whose inherited
6993 pre/postcondition has called to overridden primitives.
6994 * freeze.adb (Check_Inherited_Conditions): Build wrapper body
6995 for inherited primitive that requires it.
6996 * sem_disp.adb (Check_Dispatching_Operation): Such wrappers are
6997 legal primitive operations and belong to the list of bodies
6998 generated after the freeze point of a type.
6999 * sem_prag.adb (Build_Pragma_Check_Equivalent): Use new signature
7000 of Build_Class_Wide_Expression.
7001 * sem_util.adb, sem_util.ads (Build_Overriding_Spec): New procedure
7002 to construct the specification of the wrapper subprogram created
7003 for an inherited operation.
7005 2017-04-25 Bob Duff <duff@adacore.com>
7007 * s-osinte-linux.ads (pthread_mutexattr_setprotocol,
7008 pthread_mutexattr_setprioceiling): Add new interfaces for these
7010 * s-taprop-linux.adb (Initialize_Lock, Initialize_TCB): Set
7011 protocols as appropriate for Locking_Policy 'C' and 'I'.
7012 * s-taprop-posix.adb: Minor reformatting to make it more similar
7013 to s-taprop-linux.adb.
7015 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7017 * sem_ch3.adb (Get_Discriminant_Value, Search_Derivation_Levels):
7018 Handle properly a multi- level derivation involving both renamed
7019 and constrained parent discriminants, when the type to be
7020 constrained has fewer discriminants that the ultimate ancestor.
7022 2017-04-25 Bob Duff <duff@adacore.com>
7024 * sem_util.adb (Is_Object_Reference): In the
7025 case of N_Explicit_Dereference, return False if it came from a
7026 conditional expression.
7028 2017-04-25 Bob Duff <duff@adacore.com>
7030 * par-ch4.adb (P_Case_Expression): If a semicolon
7031 is followed by "when", assume that ";" was meant to be ",".
7033 2017-04-25 Gary Dismukes <dismukes@adacore.com>
7035 * sem_ch9.adb, sem_ch10.adb, sem_util.adb: Minor reformatting and typo
7038 2017-04-25 Arnaud Charlet <charlet@adacore.com>
7040 * rtsfind.ads (SPARK_Implicit_Load): New procedure for forced
7041 loading of an entity.
7042 * rtsfind.adb (SPARK_Implicit_Load): Body with a pattern
7043 previously repeated in the analysis.
7044 * sem_ch9.adb (Analyze_Protected_Type_Declaration): use new
7045 procedure SPARK_Implicit_Load. (Analyze_Task_Type_Declaration):
7046 use new procedure SPARK_Implicit_Load.
7047 * sem_ch10.adb (Analyze_Compilation_Unit): Use new procedure
7048 SPARK_Implicit_Load.
7050 2017-04-25 Javier Miranda <miranda@adacore.com>
7052 * sem_util.adb (New_Copy_Tree): By default
7053 copying of defining identifiers is prohibited because
7054 this would introduce an entirely new entity into the
7055 tree. This patch introduces an exception to this general
7056 rule: the declaration of constants and variables located in
7057 Expression_With_Action nodes.
7058 (Copy_Itype_With_Replacement): Renamed as Copy_Entity_With_Replacement.
7059 (In_Map): New subprogram.
7060 (Visit_Entity): New subprogram.
7061 (Visit_Node): Handle EWA_Level,
7062 EWA_Inner_Scope_Level, and take care of defining entities defined
7063 in Expression_With_Action nodes.
7065 2017-04-25 Thomas Quinot <quinot@adacore.com>
7067 * exp_ch6.adb: minor comment edit.
7068 * sinfo.ads, sinfo.adb: New Null_Statement attribute for null
7069 procedure specifications that come from source.
7070 * par-ch6.adb (P_Subprogram, case of a null procedure): Set new
7071 Null_Statement attribute.
7072 * par_sco.adb (Traverse_Declarations_Or_Statements): For a null
7073 procedure, generate statement SCO for the generated NULL statement.
7074 * sem_ch6.adb (Analyze_Null_Procedure): Use null statement from
7075 parser, if available.
7077 2017-04-04 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
7079 * system-linux-s390.ads: Use Long_Integer'Size to define
7082 2017-04-04 Eric Botcazou <ebotcazou@adacore.com>
7084 * sem_ch3.adb (Build_Derived_Record_Type): Fix long line.
7086 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
7088 * doc/gnat_ugn/gnat_and_program_execution.rst: Fix typo.
7089 * g-socket.adb (To_Host_Entry): Fix typo in comment.
7090 * gnat_ugn.texi: Fix typo.
7091 * raise.c (_gnat_builtin_longjmp): Fix capitalization in comment.
7092 * s-stposu.adb (Allocate_Any_Controlled): Fix typo in comment.
7093 * sem_ch3.adb (Build_Derived_Record_Type): Likewise.
7094 * sem_util.adb (Mark_Coextensions): Likewise.
7095 * sem_util.ads (Available_Full_View_Of_Component): Likewise.
7097 2017-03-28 Andreas Schwab <schwab@suse.de>
7100 * system-linux-aarch64-ilp32.ads: New file.
7101 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS_COMMON): Rename
7102 from LIBGNAT_TARGET_PAIRS.
7103 (LIBGNAT_TARGET_PAIRS_32, LIBGNAT_TARGET_PAIRS_64): Define.
7104 (LIBGNAT_TARGET_PAIRS): Use LIBGNAT_TARGET_PAIRS_COMMON, and
7105 LIBGNAT_TARGET_PAIRS_64 or LIBGNAT_TARGET_PAIRS_32 for -mabi=lp64
7106 or -mabi=ilp32, resp.
7108 2017-03-14 James Cowgill <James.Cowgill@imgtec.com>
7110 * s-osinte-linux.ads (struct_sigaction): Use correct type for sa_flags.
7112 2017-03-08 Thanassis Tsiodras <ttsiodras@gmail.com>
7115 * socket.c (__gnat_gethostbyaddr): Add missing test for __rtems__.
7117 2017-03-08 Eric Botcazou <ebotcazou@adacore.com>
7120 * system-linux-ppc.ads (Default_Bit_Order): Use Standard's setting.
7122 * system-linux-arm.ads (Default_Bit_Order): Likewise.
7123 * system-linux-mips.ads (Default_Bit_Order): Likewise.
7124 * system-linux-armeb.ads: Delete.
7125 * system-linux-mipsel.ads: Likewise.
7126 * gcc-interface/Makefile.in (MIPS/Linux): Adjust.
7127 (ARM/Linux): Likewise.
7129 2017-02-24 Jakub Jelinek <jakub@redhat.com>
7132 * gcc-interface/misc.c (gnat_handle_option): Pass true to
7133 handle_generated_option GENERATED_P.
7135 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
7137 * gcc-interface/decl.c (gnat_to_gnu_field): Do not remove the wrapper
7138 around a justified modular type if it doesn't have the same scalar
7139 storage order as the enclosing record type.
7141 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
7143 * gcc-interface/trans.c (gnat_to_gnu): Do not apply special handling
7144 of boolean rvalues to function calls.
7146 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
7148 * gcc-interface/utils.c (fold_bit_position): New function.
7149 (rest_of_record_type_compilation): Call it instead of bit_position to
7150 compute the field position and remove the call to remove_conversions.
7151 (compute_related_constant): Factor out the multiplication in both
7152 operands, if any, and streamline the final test.
7154 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
7156 * gcc-interface/trans.c (return_value_ok_for_nrv_p): Add sanity check.
7158 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
7160 * gcc-interface/decl.c: Include demangle.h.
7161 (is_cplusplus_method): Return again true for a primitive operation
7162 only if it is dispatching. For a subprogram with an interface name,
7163 call the demangler to get the number of C++ parameters and compare it
7164 with the number of Ada parameters.
7166 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
7168 * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): If
7169 there is no end label, put the location of the At_End procedure on
7170 the call to the procedure.
7172 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
7174 * gcc-interface/misc.c (gnat_type_max_size): Try to return a meaningful
7175 value for array types with TYPE_INDEX_TYPE set on their domain type.
7176 * gcc-interface/utils.c (max_size): For operations and expressions, do
7177 not build a new node if the operands have not changed or are missing.
7179 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
7181 * gcc-interface/utils.c (max_size) <tcc_expression>: Flip the second
7182 argument when recursing on TRUTH_NOT_EXPR.
7184 2017-02-12 John Marino <gnugcc@marino.st>
7186 * system-freebsd-x86.ads: Rename into...
7187 * system-freebsd.ads: ...this.
7188 (Default_Bit_Order): Define using Standard'Default_Bit_Order.
7189 * gcc-interface/Makefile.in: Support aarch64-freebsd.
7190 (x86-64/FreeBSD): Adjust to above renaming.
7191 (i386/FreeBSD): Likewise.
7193 2017-02-09 Gerald Pfeifer <gerald@pfeifer.com>
7195 * comperr.adb: Update FSF bug reporting URL.
7197 2017-02-01 Eric Botcazou <ebotcazou@adacore.com>
7198 Jakub Jelinek <jakub@redhat.com>
7201 * adaint.c (__gnat_killprocesstree): Fix broken string handling.
7203 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
7206 * gcc-interface/utils.c (get_global_context): Pass main_input_filename
7207 to build_translation_unit_decl.
7209 2017-01-23 Javier Miranda <miranda@adacore.com>
7211 * sem_util.adb (New_Copy_Tree): Code cleanup:
7212 removal of the internal map (ie. variable Actual_Map, its
7213 associated local variables, and all the code handling it).
7214 * sem_ch9.adb (Analyze_Task_Type_Declaration): in GNATprove mode
7215 force loading of the System package when processing a task type.
7216 (Analyze_Protected_Type_Declaration): in GNATprove mode force
7217 loading of the System package when processing a protected type.
7218 * sem_ch10.adb (Analyze_Compilation_Unit): in GNATprove mode
7219 force loading of the System package when processing compilation
7220 unit with a main-like subprogram.
7221 * frontend.adb (Frontend): remove forced loading of the System
7224 2017-01-23 Ed Schonberg <schonberg@adacore.com>
7226 * sem_prag.adb (Default_Initial_Condition): If the desired type
7227 declaration is a derived type declaration with discriminants,
7228 it is rewritten as a private type declaration.
7229 * sem_ch13.adb (Replace_Type_References_Generic,
7230 Visible_Component): A discriminated private type with descriminnts
7231 has components that must be rewritten as selected components
7232 if they appear as identifiers in an aspect expression such as
7233 a Default_Initial_Condition.
7234 * sem_util.adb (Defining_Entity): support N_Iterator_Specification
7237 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
7239 * ghost.ads, ghost.adb (Is_Ignored_Ghost_Unit): New routine.
7240 * gnat1drv.adb Generate an empty object file for an ignored
7241 Ghost compilation unit.
7242 * inline.adb, sem_util.adb, sem_ch4.adb: Minor reformatting.
7244 2017-01-23 Yannick Moy <moy@adacore.com>
7246 * sem_ch4.adb (Analyze_Indexed_Component_Form):
7247 Adapt to inlined prefix with string literal subtype.
7248 * inline.adb (Expand_Inlined_Call): Keep unchecked
7249 conversion inside inlined call when formal type is constrained.
7251 2017-01-23 Javier Miranda <miranda@adacore.com>
7253 * sem_util.adb (New_Copy_Tree): Code cleanup:
7254 removal of global variables. All the global variables, global
7255 functions and tables of this subprogram are now declared locally.
7257 2017-01-23 Gary Dismukes <dismukes@adacore.com>
7259 * exp_strm.ads: Minor reformatting and typo fixes.
7261 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
7263 * sem_aggr.adb, par_sco.adb, exp_util.adb, sem.adb, sem_ch4.adb,
7264 exp_aggr.adb: Minor reformatting.
7265 * g-diopit.adb: minor grammar/punctuation fix in comment.
7266 * g-byorma.ads: minor fix of unbalanced parens in comment.
7268 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
7270 * par.adb: Update the documentation of component Labl.
7271 * par-ch6.adb (P_Return_Statement): Set the expected label of
7272 an extended return statement to Error.
7274 2017-01-23 Tristan Gingold <gingold@adacore.com>
7276 * s-boustr.ads, s-boustr.adb (Is_Full): New function.
7278 2017-01-23 Ed Schonberg <schonberg@adacore.com>
7280 * expander.adb: Handle N_Delta_Aggregate.
7282 2017-01-23 Javier Miranda <miranda@adacore.com>
7284 * exp_ch6.adb (Expand_Call): Improve the code that
7285 checks if some formal of the called subprogram is a class-wide
7286 interface, to handle subtypes of class-wide interfaces.
7288 2017-01-23 Javier Miranda <miranda@adacore.com>
7290 * checks.adb (Apply_Parameter_Aliasing_Checks):
7291 Remove side effects of the actuals before generating the overlap
7294 2017-01-23 Justin Squirek <squirek@adacore.com>
7296 * exp_strm.ads, exp_strm.ads
7297 (Build_Record_Or_Elementary_Input_Function): Add an extra parameter so
7298 as to avoid getting the underlying type by default.
7299 * exp_attr.adb (Expand_N_Attribute_Reference): Remove use of
7300 underlying type in the Iiput and output attribute cases when
7301 building their respective functions.
7303 2017-01-23 Gary Dismukes <dismukes@adacore.com>
7305 * scng.adb: Minor reformatting of error message.
7307 2017-01-23 Ed Schonberg <schonberg@adacore.com>
7309 * sem_ch6.adb (Analyze_Expression_Function): Do not attempt
7310 to freeze the return type of an expression funxtion that is a
7311 completion, if the type is a limited view and the non-limited
7314 2017-01-23 Ed Schonberg <schonberg@adacore.com>
7316 * par-ch4.adb (P_Aggregate_Or_Parent_Expr): Recognize delta
7317 aggregate construct.
7318 (P_Record_Or_Array_Component_Association): An array aggregate
7319 can start with an Iterated_Component_Association.
7320 * scng.adb: Modify error message on improper use of @ in earlier
7321 versions of the language.
7322 * sinfo.ads: New node kind N_Delta_Aggregate.
7323 * sinfo.adb: An N_Delta_Aggregate has component associations and
7325 * sem_res.adb (Resolve): Call Resolve_Delta_Aggregate.
7326 * sem_aggr.ads, sem_aggr.adb (Resolve_Iterated_Component_Association):
7327 Create a new index for each one of the choices in the association,
7328 to prevent spurious homonyms in the scope.
7329 (Resolve_Delta_Aggregate): New.
7330 * sem.adb: An N_Delta_Aggregate is analyzed like an aggregate.
7331 * exp_util.adb (Insert_Actions): Take into account
7333 * exp_aggr.ads: New procedure Expand_N_Delta_Aggregate.
7334 * exp_aggr.adb: New procedure Expand_N_Delta_Aggregate,
7335 and local procedures Expand_Delta_Array_Aggregate and
7336 expand_Delta_Record_Aggregate.
7337 * sprint.adb: Handle N_Delta_Aggregate.
7339 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
7341 * exp_ch11.adb (Expand_N_Exception_Declaration): Generate an
7342 empty name when the exception declaration is subject to pragma
7344 (Null_String): New routine.
7346 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
7348 * par-ch9.adb (P_Protected_Definition): Parse
7349 any optional and potentially illegal pragmas which appear in
7350 a protected operation declaration list.
7351 (P_Task_Items): Parse
7352 any optional and potentially illegal pragmas which appear in a
7355 2017-01-23 Pascal Obry <obry@adacore.com>
7357 * s-taprop-mingw.adb (Enter_Task): Initialize the Thread handle which
7358 is needed when a foreign thread call a Win32 API using a thread handle
7359 like GetThreadTimes() for example.
7361 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
7363 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
7364 allow an 'Address clause to be specified on a prefix of a
7367 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
7369 * checks.adb (Insert_Valid_Check): Ensure that the prefix of
7370 attribute 'Valid is a renaming of the original expression when
7371 the expression denotes a name. For all other kinds of expression,
7372 use a constant to capture the value.
7373 * exp_util.adb (Is_Name_Reference): Moved to Sem_Util.
7374 * sem_util.ads, sem_util.adb (Is_Name_Reference): Moved from Exp_Util.
7376 2017-01-23 Justin Squirek <squirek@adacore.com>
7378 * sem_eval.adb (Eval_Integer_Literal): Add special
7379 case to avoid optimizing out check if the literal appears in
7382 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
7384 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
7385 allow an 'Address clause to be specified on a prefix of a
7388 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
7390 * checks.adb (Insert_Valid_Check): Ensure that the prefix of
7391 attribute 'Valid is a renaming of the original expression when
7392 the expression denotes a name. For all other kinds of expression,
7393 use a constant to capture the value.
7394 * exp_util.adb (Is_Name_Reference): Moved to Sem_Util.
7395 * sem_util.ads, sem_util.adb (Is_Name_Reference): Moved from Exp_Util.
7397 2017-01-23 Justin Squirek <squirek@adacore.com>
7399 * sem_eval.adb (Eval_Integer_Literal): Add special
7400 case to avoid optimizing out check if the literal appears in
7403 2017-01-23 Ed Schonberg <schonberg@adacore.com>
7405 * sem_ch4.adb (Try_Primitive_Operations,
7406 Is_Valid_First_Argument_Of): argument is valid if it is a derived
7407 type with unknown discriminants that matches its underlying
7409 * exp_util.adb (Expand_Subtype_From_Expr): Do not expand
7410 expression if its type is derived from a limited type with
7411 unknown discriminants, because the expansion (which is a call)
7412 must be expanded in the enclosing context to add the proper build-
7413 in-place parameters to the call.
7414 * lib.ads, exp_ch9.adb: Minor fixes in comments.
7416 2017-01-23 Yannick Moy <moy@adacore.com>
7418 * frontend.adb (Frontend): Do not load runtime
7419 unit for GNATprove when parsing failed.
7420 * exp_ch9.adb: minor removal of extra whitespace
7421 * exp_ch6.adb: minor typo in comment
7422 * sem_util.adb: Code cleanup.
7423 * exp_ch9.ads, par-ch2.adb: minor style fixes in whitespace and comment
7424 * a-ngcefu.adb: minor style fix in whitespace
7426 2017-01-23 Thomas Quinot <quinot@adacore.com>
7428 * scos.ads: Document usage of 'd' as default SCO kind for
7430 * par_sco.adb (Traverse_Declarations_Or_Statements.
7431 Traverse_Degenerate_Subprogram): New supporting routine for expression
7432 functions and null procedures.
7433 (Traverse_Declarations_Or_Statements.Traverse_One): Add
7434 N_Expression_Function to the subprogram case; add required
7435 support for null procedures and expression functions.
7437 2017-01-23 Bob Duff <duff@adacore.com>
7439 * namet.ads (Bounded_String): Decrease the size of type
7440 Bounded_String to avoid running out of stack space.
7441 * namet.ads (Append): Don't ignore buffer overflow; raise
7442 Program_Error instead.
7444 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
7446 * exp_ch5.adb, freeze.adb, par-ch4.adb, scng.adb, sem_ch13.adb,
7447 sem_ch3.adb, sem_ch5.adb, sem_ch5.ads, sem_util.adb, sinfo.ads: Minor
7449 * exp_ch9.adb: minor style fix in comment.
7451 2017-01-23 Ed Schonberg <schonberg@adacore.com>
7453 * sem_ch4.adb (Analyze_Allocator): Handle properly a type derived
7454 for a limited record extension with unknown discriminants whose
7455 full view has no discriminants.
7457 2017-01-23 Yannick Moy <moy@adacore.com>
7459 * exp_spark.adb: Alphabetize with clauses.
7461 2017-01-23 Yannick Moy <moy@adacore.com>
7463 * sem_util.adb (Has_Enabled_Property): Treat
7464 protected objects and variables differently from other variables.
7466 2017-01-23 Thomas Quinot <quinot@adacore.com>
7468 * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order):
7469 Split original Ada 95 part off into new subprogram
7470 below. Call that subprogram (instead of proceeding with
7471 AI95-0133 behaviour) if debug switch -gnatd.p is in use.
7472 (Adjust_Record_For_Reverse_Bit_Order_Ada_95): ... new subprogram
7473 * debug.adb Document new switch -gnatd.p
7474 * freeze.adb (Freeze_Entity.Freeze_Record_Type): Do not adjust
7475 record for reverse bit order if an error has already been posted
7476 on the record type. This avoids generating extraneous "info:"
7477 messages for illegal code.
7479 2017-01-23 Justin Squirek <squirek@adacore.com>
7481 * sem_ch3.adb (Analyze_Declarations): Correct comments
7482 * freeze.adb (Find_Constant): Add detection of deferred constants
7483 so they are not incorrectly flagged as premature.
7485 2017-01-23 Ed Schonberg <schonberg@adacore.com>
7487 * scans.ads: New token At_Sign. Remove '@' from list of illegal
7488 characters for future version of the language. '@' is legal name.
7489 * scng.ads, scng.adb (Scan): Handle '@' appropriately.
7490 * scn.adb (Scan_Reserved_Identifier): An occurrence of '@'
7491 denotes a Target_Name.
7492 * par-ch4.adb (P_Name, P_Primary): Handle Target_Name.
7493 * sinfo.ads, sinfo.adb (N_Target_Name): New non-terminal node.
7494 (Has_Target_Names): New flag on N_Assignment_Statement, to
7495 indicate that RHS has occurrences of N_Target_Name.
7496 * sem.adb: Call Analyze_Target_Name.
7497 * sem_ch5.ads, sem_ch5.adb (Analyze_Target_Name): New subpogram.
7498 (urrent_LHS): Global variable that denotes LHS of assignment,
7499 used in the analysis of Target_Name nodes.
7500 * sem_res.adb (Resolve_Target_Name): New procedure.
7501 * exp_ch5.adb (Expand_Assign_With_Target_Names): (AI12-0125):
7502 N is an assignment statement whose RHS contains occurences of @
7503 that designate the value of the LHS of the assignment. If the
7504 LHS is side-effect free the target names can be replaced with
7505 a copy of the LHS; otherwise the semantics of the assignment
7506 is described in terms of a procedure with an in-out parameter,
7507 and expanded as such.
7508 (Expand_N_Assignment_Statement): Call
7509 Expand_Assign_With_Target_Names when needed.
7510 * exp_util.adb (Insert_Actions): Take into account N_Target_Name.
7511 * sprint.adb: Handle N_Target_Name.
7513 2017-01-23 Eric Botcazou <ebotcazou@adacore.com>
7515 * checks.adb: Minor fix in comment.
7517 2017-01-23 Philippe Gil <gil@adacore.com>
7519 * g-debpoo.adb (Do_Report) remove freed chunks from chunks
7520 count in Sort = Memory_Usage or Allocations_Count
7522 2017-01-23 Justin Squirek <squirek@adacore.com>
7524 * sem_ch3.adb: Code cleanup.
7526 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
7528 * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Move all global
7529 variables to the local variable section. Update the profile
7530 of various nested routine that previously had visibility
7531 of those globals. One the matching phase has completed,
7532 remove certain classes of clauses which are considered noise.
7533 (Check_Dependency_Clause): Properly detect a match between two
7534 'Result attributes. Update the various post-match cases to use
7535 Is_Already_Matched as this routine now automatically recognizes
7536 a previously matched 'Result attribute.
7537 (Is_Already_Matched): New routine.
7538 (Remove_Extra_Clauses): New routine.
7539 (Report_Extra_Clauses): Remove the detection of ... => null
7540 clauses as this is now done in Remove_Extra_Clauses.
7542 2017-01-23 Ed Schonberg <schonberg@adacore.com>
7544 * sem_aggr.adb (Resolve_Array_Aggregate): In ASIS mode do not
7545 report on spurious overlaps between values involving a subtype
7546 with a static predicate, because the expansion of such a subtype
7547 into individual ranges in inhibited in ASIS mode.
7549 2017-01-23 Justin Squirek <squirek@adacore.com>
7551 * sem_ch3.adb (Analyze_Declarations): Add detection
7552 of an edge case and delay freezing if it is present.
7554 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
7556 * sem_ch3.adb, exp_spark.adb, exp_attr.adb, sem_ch9.adb, sem_prag.adb,
7557 sem_util.adb, sem_warn.adb, exp_ch3.adb: Minor reformatting.
7559 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
7561 * freeze.adb (Freeze_Subprogram): Ensure that all anonymous
7562 access-to-subprogram types inherit the convention of the
7563 associated subprogram. (Set_Profile_Convention): New routine.
7564 * sem_ch6.adb (Check_Conformance): Do not compare the conventions
7565 of the two entities directly, use Conventions_Match to account
7566 for anonymous access-to-subprogram and subprogram types.
7567 (Conventions_Match): New routine.
7569 2017-01-23 Claire Dross <dross@adacore.com>
7571 * exp_spark.adb (Expand_SPARK_Attribute_Reference): For attributes
7572 which return Universal_Integer, force the overflow check flag for
7573 Length and Range_Length for types as big as Long_Long_Integer.
7575 2017-01-23 Claire Dross <dross@adacore.com>
7577 * exp_spark.adb (Expand_SPARK_Attribute_Reference): For
7578 attributes which return Universal_Integer, introduce a conversion
7579 to the expected type with the appropriate check flags set.
7580 * sem_res.adb (Resolve_Range): The higher bound can be in Typ's
7581 base type if the range is null. It may still be invalid if it
7582 is higher than the lower bound. This is checked later in the
7583 context in which the range appears.
7585 2017-01-23 Pierre-Marie de Rodat <derodat@adacore.com>
7587 * scos.ads: Introduce a constant to represent ignored
7588 dependencies in SCO_Unit_Table_Entry.
7590 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
7592 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Remove extra
7593 spaces from error messages.
7595 2017-01-23 Ed Schonberg <schonberg@adacore.com>
7597 * exp_ch3.adb (Check_Large_Modular_Array): New procedure,
7598 subsidiary to Expand_N_Object_ Declaration, to compute a guard on
7599 an object declaration for an array type with a modular index type
7600 with the size of Long_Long_Integer. Special processing is needed
7601 in this case to compute reliably the size of the object, and
7602 eventually to raise Storage_Error, when wrap-around arithmetic
7603 might compute a meangingless size for the object.
7605 2017-01-23 Justin Squirek <squirek@adacore.com>
7607 * a-wtenau.adb, par-endh.adb, sem_prag.adb,
7608 sem_type.adb: Code cleanups.
7610 2017-01-23 Bob Duff <duff@adacore.com>
7612 * sem_res.adb (Resolve_Call): In the part of the code where
7613 it is deciding whether to turn the call into an indexed
7614 component, avoid doing so if the call is to an instance of
7615 Unchecked_Conversion. Otherwise, the compiler turns it into an
7616 indexed component, and resolution of that turns it back into a
7617 function call, and so on, resulting in infinite recursion.
7618 * sem_util.adb (Needs_One_Actual): If the first formal has a
7619 default, then return False.
7621 2017-01-21 Eric Botcazou <ebotcazou@adacore.com>
7623 * sem_eval.adb (Compile_Time_Compare): Reinstate the expr+literal (etc)
7624 optimizations when the type is modular and the offsets are equal.
7626 2017-01-20 Thomas Quinot <quinot@adacore.com>
7628 * sem_warn.adb (Warn_On_Useless_Assignment): Adjust wording of warning
7631 2017-01-20 Nicolas Roche <roche@adacore.com>
7633 * terminals.c: Ignore failures on setpgid and tcsetpgrp commands.
7635 2017-01-20 Bob Duff <duff@adacore.com>
7637 * sem_eval.adb (Compile_Time_Compare): Disable the expr+literal
7638 (etc) optimizations when the type is modular.
7640 2017-01-20 Yannick Moy <moy@adacore.com>
7642 * sem_ch6.adb (Move_Pragmas): move some pragmas,
7643 but copy the SPARK_Mode pragma instead of moving it.
7644 (Build_Subprogram_Declaration): Ensure that the generated spec
7645 and original body share the same SPARK_Pragma aspect/pragma.
7646 * sem_util.adb, sem_util.ads (Copy_SPARK_Mode_Aspect): New
7647 procedure to copy SPARK_Mode aspect.
7649 2017-01-20 Bob Duff <duff@adacore.com>
7651 * sem_ch3.adb (Analyze_Declarations): Disable Resolve_Aspects
7653 * sem_ch13.adb (Resolve_Name): Enable setting the entity to
7654 Empty even in ASIS mode.
7656 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7658 * exp_ch9.adb: minor style fixes in comments.
7659 * sem_ch9.adb (Analyze_Delay_Relative): in GNATprove mode a delay
7660 relative statement introduces an implicit dependency on
7661 Ada.Real_Time.Clock_Time.
7662 * sem_util.adb: Minor reformatting.
7664 2017-01-20 Ed Schonberg <schonberg@adacore.com>
7666 * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect Alignment
7667 must be treated as delayed aspect even if the expression is
7668 a literal, because the aspect affects the freezing and the
7669 elaboration of the object to which it applies.
7671 2017-01-20 Tristan Gingold <gingold@adacore.com>
7673 * s-osinte-vxworks.ads (Interrup_Range): New subtype.
7675 2017-01-20 Ed Schonberg <schonberg@adacore.com>
7677 * lib-xref.adb (Generate_Reference): Do not warn about the
7678 presence of a pragma Unreferenced if the entity appears as the
7679 actual in a procedure call that does not come from source.
7681 2017-01-20 Pascal Obry <obry@adacore.com>
7683 * expect.c, terminals.c: Fix some warnings about unused variables.
7684 * gsocket.h, adaint.c, adaint.h: Fix some more warnings in the C part
7687 2017-01-20 Bob Duff <duff@adacore.com>
7689 * exp_attr.adb (Constrained): Apply an access check (check that
7690 the prefix is not null) when the prefix denotes an object of an
7691 access type; that is, when there is an implicit dereference.
7693 2017-01-20 Gary Dismukes <dismukes@adacore.com>
7695 * s-rident.ads (constant Profile_Info): Remove
7696 No_Calendar from GNAT_Extended_Ravenscar restrictions.
7698 2017-01-20 Tristan Gingold <gingold@adacore.com>
7700 * s-maccod.ads: Add pragma No_Elaboration_Code_All
7702 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7704 * ghost.adb (Mark_Ghost_Clause): New routine.
7705 (Prune_Node): Do not prune compilation unit nodes.
7706 (Remove_Ignored_Ghost_Code): Prune the compilation unit node directly.
7707 This does not touch the node itself, but does prune all its fields.
7708 * ghost.ads (Mark_Ghost_Clause): New routine.
7709 * sem_ch8.adb (Analyze_Use_Package): Emit an error when a use
7710 package clause mentions Ghost and non-Ghost packages. Mark a
7711 use package clause as Ghost when it mentions a Ghost package.
7712 (Analyze_Use_Type): Emit an error when a use type clause mentions
7713 Ghost and non-Ghost types. Mark a use type clause as Ghost when
7714 it mentions a Ghost type.
7715 * sem_ch10.adb (Analyze_With_Clause): Mark a with clause as
7716 Ghost when it withs a Ghost unit.
7718 2017-01-20 Javier Miranda <miranda@adacore.com>
7720 * sem_res.adb (Resolve_Call): If a function call
7721 returns a limited view of a type and at the point of the call the
7722 function is not declared in the extended main unit then replace
7723 it with the non-limited view, which must be available. If the
7724 called function is in the extended main unit then no action is
7725 needed since the back-end handles this case.
7727 2017-01-20 Eric Botcazou <ebotcazou@adacore.com>
7729 * sem_ch7.adb (Contains_Subp_Or_Const_Refs): Rename into...
7730 (Contains_Subprograms_Refs): ...this. Adjust comment
7731 for constants. (Is_Subp_Or_Const_Ref): Rename into...
7732 (Is_Subprogram_Ref): ...this.
7733 (Has_Referencer): Rename Has_Non_Subp_Const_Referencer variable into
7734 Has_Non_Subprograms_Referencer and adjust comment. Remove
7735 incorrect shortcut for package declarations and bodies.
7737 2017-01-20 Ed Schonberg <schonberg@adacore.com>
7739 * sem_ch3.adb (Complete_Private_Subtype): If the scope of the
7740 base type differs from that of the completion and the private
7741 subtype is an itype (created for a constraint on an access
7742 type e.g.), set Delayed_Freeze on both to prevent out-of-scope
7745 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7747 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
7748 When inheriting the SPARK_Mode of a prior expression function,
7749 look at the properly resolved entity rather than the initial
7750 candidate which may denote a homonym.
7752 2017-01-20 Ed Schonberg <schonberg@adacore.com>
7754 * sem_prag.adb (Rewrite_Assertion_Kind): If the name is
7755 Precondition or Postcondition, and the context is pragma
7756 Check_Policy, indicate that this Pre-Ada2012 usage is deprecated
7757 and suggest the standard names Assertion_Policy /Pre /Post
7760 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7762 * sem_ch10.adb, sem_cat.adb: Minor reformatting.
7764 2017-01-20 Javier Miranda <miranda@adacore.com>
7766 * sem_ch3.adb (Access_Type_Declaration): Protect access to the
7768 * sem_ch10.adb (Install_Siblings): Skip processing malformed trees.
7769 * sem_cat.adb (Validate_Categoriztion_Dependency): Skip processing
7772 2017-01-20 Ed Schonberg <schonberg@adacore.com>
7774 * sem_ch13.adb (Analyze_Aspect_Specification, case
7775 Dynamic_Predicate): If the entity E is a subtype that inherits
7776 a static predicate for its parent P,, the inherited and the
7777 new predicate combine in the generated predicate function,
7778 and E only has a dynamic predicate.
7780 2017-01-20 Tristan Gingold <gingold@adacore.com>
7782 * s-boustr.ads, s-boustr.adb: New package.
7783 * Makefile.rtl: Add s-boustr.
7785 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7787 * inline.adb (Process_Formals): Qualify the
7788 expression of a return statement when it yields a universal type.
7790 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7792 * freeze.adb (Freeze_All): Freeze the default
7793 expressions of all eligible formal parameters that appear in
7794 entries, entry families, and protected subprograms.
7796 2017-01-20 Ed Schonberg <schonberg@adacore.com>
7798 * sem_ch3.adb (Check_Nonoverridable_Aspects); Refine check
7799 for illegal inherited Implicit_Dereference aspects with renamed
7802 2017-01-20 Javier Miranda <miranda@adacore.com>
7804 * debug.adb (switch d.6): do not avoid declaring unreferenced itypes.
7805 * nlists.ads (Lock_Lists, Unlock_Lists): New subprograms.
7806 * nlists.adb (Lock_Lists, Unlock_Lists): New subprograms.
7807 (Set_First, Set_Last, Set_List_Link, Set_Next, Set_Parent,
7808 Set_Prev, Tree_Read): Adding assertion.
7809 * atree.ads (Lock_Nodes, Unlock_Nodes): New subprograms.
7810 * atree.adb (Lock_Nodes, Unlock_Nodes): New subprograms.
7811 (Set_Analyzed, Set_Check_Actuals, Set_Comes_From_Source,
7812 Set_Ekind, Set_Error_Posted, Set_Has_Aspects,
7813 Set_Is_Ignored_Ghost_Node, Set_Original_Node, Set_Paren_Count,
7814 Set_Parent, Set_Sloc, Set_Nkind, Set_FieldNN, Set_NodeNN,
7815 Set_ListNN, Set_ElistNN, Set_NameN, Set_StrN, Set_UintNN,
7816 Set_UrealNN, Set_FlagNNN, Set_NodeN_With_Parent,
7817 Set_ListN_With_Parent): Adding assertion.
7819 2017-01-20 Ed Schonberg <schonberg@adacore.com>
7821 * sem_prag.adb (Process_Convention): Diagnose properly a pragma
7822 import that applies to several homograph subprograms. when one
7823 of them is declared by a subprogram body.
7825 2017-01-20 Justin Squirek <squirek@adacore.com>
7827 * exp_ch6.adb (Expand_Call): Remove optimization
7828 that nulls out calls to null procedures.
7830 2017-01-20 Yannick Moy <moy@adacore.com>
7832 * inline.adb (Expand_Inlined_Call): Keep more
7833 precise type of actual for inlining whenever possible. In
7834 particular, do not switch to the formal type in GNATprove mode in
7835 some case where the GNAT backend might require it for visibility.
7837 2017-01-20 Ed Schonberg <schonberg@adacore.com>
7839 * sem_ch3.adb (Check_Non_Overridable_Aspects): An inherited
7840 aspect Implicit_Dereference can be inherited by a full view if
7841 the partial view has no discriminants, because there is no way
7842 to apply the aspect to the partial view.
7843 (Build_Derived_Record_Type): If derived type renames discriminants
7844 of the parent, the new discriminant inherits the aspect from
7846 * sem_ch4.adb (Analyze_Call): Handle properly a parameterless
7847 call through an access discriminant designating a subprogram.
7848 * sem_ch5.adb (Analyze_Assignment): (Analyze_Call): Handle
7849 properly a parameterless call through an access discriminant on
7850 the left-hand side of an assignment.
7851 * sem_res.adb (resolve): If an interpreation involves a
7852 discriminant with an implicit dereference and the expression is an
7853 entity, resolution takes place later in the appropriate routine.
7854 * sem_ch13.adb (Analyze_Aspect_Implicit_Dereference): Recognize
7855 access discriminants that designate a subprogram type.
7857 2017-01-20 Pascal Obry <obry@adacore.com>
7859 * a-locale.adb, a-locale.ads: Update Ada.Locales for RM 2012 COR:1:2016
7861 2017-01-20 Yannick Moy <moy@adacore.com>
7863 * sem_ch10.adb (Check_No_Elab_Code_All): Do not issue an error
7864 on implicitly with'ed units in GNATprove mode.
7865 * sinfo.ads (Implicit_With): Document use of flag for implicitly
7866 with'ed units in GNATprove mode.
7868 2017-01-20 Ed Schonberg <schonberg@adacore.com>
7870 * sem_cat.adb (Validate_Static_Object_Name): In a preelaborated
7871 unit Do not report an error on a non-static entity that appears
7872 in the context of a spec expression, such as an aspect expression.
7874 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
7876 * einfo.adb: Flag298 now denotes Is_Underlying_Full_View.
7877 (Is_Underlying_Full_View): New routine.
7878 (Set_Is_Underlying_Full_View): New routine.
7879 (Write_Entity_Flags): Add an entry for Is_Underlying_Full_View.
7880 * einfo.ads Add new attribute Is_Underlying_Full_View.
7881 (Is_Underlying_Full_View): New routine along with pragma Inline.
7882 (Set_Is_Underlying_Full_View): New routine along with pragma Inline.
7883 * exp_util.adb (Build_DIC_Procedure_Body): Do not consider
7884 class-wide types and underlying full views. The first subtype
7885 is used as the working type for all Itypes, not just array base types.
7886 (Build_DIC_Procedure_Declaration): Do not consider
7887 class-wide types and underlying full views. The first subtype
7888 is used as the working type for all Itypes, not just array
7890 * freeze.adb (Freeze_Entity): Inherit the freeze node of a full
7891 view or an underlying full view without clobbering the attributes
7892 of a previous freeze node.
7893 (Inherit_Freeze_Node): New routine.
7894 * sem_ch3.adb (Build_Derived_Private_Type): Mark an underlying
7896 (Build_Underlying_Full_View): Mark an underlying full view as such.
7897 * sem_ch7.adb (Install_Private_Declarations): Mark an underlying
7900 2017-01-20 Yannick Moy <moy@adacore.com>
7902 * sinfo.ads: Document lack of Do_Division_Check flag
7903 on float exponentiation.
7905 2017-01-19 Javier Miranda <miranda@adacore.com>
7907 * ghost.adb (Propagate_Ignored_Ghost_Code): Protect access to the
7908 identifier attribute of a block-statement node. Required to avoid
7909 assertion failure when building the new containers library.
7911 2017-01-19 Bob Duff <duff@adacore.com>
7913 * exp_ch3.adb: Update comment.
7915 2017-01-19 Vincent Celier <celier@adacore.com>
7917 * gprep.adb (Gnatprep): Parse the definition file without
7918 "replace in comments" even when switch -C is used.
7920 2017-01-19 Justin Squirek <squirek@adacore.com>
7922 * exp_ch9.adb (Is_Pure_Barrier): Create function
7923 Is_Count_Attribute to identify an expansion of the 'Count
7926 2017-01-19 Ed Schonberg <schonberg@adacore.com>
7928 * sem_ch5.adb (Analyze_Loop_Statement): In GNATprove mode the
7929 statements within an element iterator loop are only analyzed
7930 agter the loop is rewritten. Within a generic the analysis must
7931 be performed in any case to complete name capture.
7933 2017-01-19 Bob Duff <duff@adacore.com>
7935 * sem_prag.adb (Analyze_Pragma): Check for ignored pragmas first,
7936 before checking for unrecognized pragmas.
7937 Initialize Pname on its declarations; that's always good style.
7939 2017-01-19 Claire Dross <dross@adacore.com>
7941 * exp_ch7.adb (Build_Invariant_Procedure_Body): Semi-insert the
7942 body into the tree for GNATprove by setting its Parent field. The
7943 components invariants of composite types are not checked by
7944 the composite type's invariant procedure in GNATprove mode.
7945 (Build_Invariant_Procedure_Declaration): Semi-insert the
7946 declaration into the tree for GNATprove by setting its Parent
7948 * freeze.adb (Freeze_Arry_Type):In GNATprove mode, do not add
7949 the component invariants to the array type invariant procedure
7950 so that the procedure can be used to check the array type
7952 (Freeze_Record_Type): In GNATprove mode, do
7953 not add the component invariants to the record type invariant
7954 procedure so that the procedure can be used to check the record
7955 type invariants if any.
7957 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
7959 * lib-xref-spark_specific.adb: Minor reformatting.
7960 * exp_ch7.adb (Add_Parent_Invariants): Do not process array types.
7962 2017-01-19 Javier Miranda <miranda@adacore.com>
7964 * exp_aggr.adb (Pass_Aggregate_To_Back_End): Renamed as
7965 Build_Back_End_Aggregate.
7966 (Generate_Aggregate_For_Derived_Type): Code cleanup.
7967 (Prepend_Stored_Values): Code cleanup.
7969 2017-01-19 Ed Schonberg <schonberg@adacore.com>
7971 * sem_ch6.adb (Analyze_Expression_Function): Check for an
7972 incomplete return type after attempting to freeze it, so that
7973 other freeze actiona are generated in the proper order.
7975 2017-01-19 Ed Schonberg <schonberg@adacore.com>
7977 * sem_aggr.adb (Resolve_Aggregate): If the type is a string
7978 type, ie. a type whose component is a character type, and the
7979 aggregate is positional, do not convert into a string literal
7980 if the index type is not an integer type, because the original
7981 type may be required in an enclosing operation.
7983 2017-01-19 Bob Duff <duff@adacore.com>
7985 * binde.adb, debug.adb: Enable new elaboration order algorithm
7986 by default. -dp switch reverts to the old algorithm.
7988 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
7990 * sem_ch3.adb Add with and use clauses for Exp_Ch7.
7991 (Analyze_Declarations): Create the DIC and Invariant
7992 procedure bodies s after all freezing has taken place.
7993 (Build_Assertion_Bodies): New routine.
7994 * sem_ch7.adb Remove the with and use clauses for Exp_Ch7
7996 (Analyze_Package_Specification): Remove the
7997 generation of the DIC and Invariant procedure bodies. This is
7998 now done by Analyze_Declarations.
7999 * sem_disp.adb (Check_Dispatching_Operation): DIC and Invariant
8000 procedures are never treated as primitives.
8002 2017-01-19 Yannick Moy <moy@adacore.com>
8004 * frontend.adb: Analyze inlined bodies and check elaboration
8005 rules in GNATprove mode too.
8006 * sem_elab.adb (Delay_Element): Add Boolean component to save
8007 indication that call is in SPARK code. (Check_Elab_Calls):
8008 Check elaboration rules in GNATprove mode, and correctly set
8009 the current value of SPARK_Mode.
8010 * lib-xref-spark_specific.adb
8011 (Add_SPARK_Xrefs): Simplify iteration over dereferences.
8013 2017-01-19 Ed Schonberg <schonberg@adacore.com>
8015 * exp_ch4.adb (Expand_Concatenate): Do no enable overflow
8016 checks on the expression for the high bound of concatenation
8017 when checks are disabled, to suppress warnings about potential
8018 constraint errors in restricted runtimes.
8020 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
8022 * exp_ch3.adb (Expand_Freeze_Enumeration_Type): Mark the
8023 representation-to-position function as inlined.
8024 * sem_cat.adb (Set_Categorization_From_Scope): Do not modify
8025 the purity of an internally generated entity if it has been
8026 explicitly marked as pure for optimization purposes.
8027 * exp_aggr.adb: Minor reformatting.
8029 2017-01-19 Javier Miranda <miranda@adacore.com>
8031 * exp_ch6.adb (Expand_Call): Remove side effects on
8032 actuals that are allocators with qualified expression since the
8033 initialization of the object is performed by means of individual
8034 statements (and hence it must be done before the call).
8036 2017-01-19 Ed Schonberg <schonberg@adacore.com>
8038 * sem_ch3.adb (Analyze_Declarations): Minor reformatting.
8039 (Build_Derived_Enumeration_Type): If the derived type inherits a
8040 dynamic predicate from its parent, the bounds of the type must
8041 freeze because an explicit constraint is constructed for the
8042 type and the corresponding range is elaborated now.
8044 2017-01-19 Arnaud Charlet <charlet@adacore.com>
8046 * sem_attr.ads: minor fix of inconsistent casing in comment
8047 * lib-writ.ads: minor align comments in columns
8048 * sem_ch3.adb: Minor reformatting.
8049 * spark_xrefs.ads: minor fix typo in SPARK-related comment
8050 * table.ads: minor style fix in comment
8051 * lib-xref-spark_specific.adb
8052 (Add_SPARK_Xrefs): simplify processing of SPARK cross-references.
8053 * sem_ch12.adb: minor whitespace fix
8054 * freeze.adb: Add comment.
8055 * sem_util.adb (Unique_Name): for instances of
8056 generic subprograms ignore the name of the wrapper package.
8058 2017-01-19 Javier Miranda <miranda@adacore.com>
8060 * exp_aggr.adb (Resolve_Record_Aggregate):
8061 Factorize code needed for aggregates of limited and unlimited
8062 types in a new routine.
8063 (Pass_Aggregate_To_Back_End): New subprogram.
8065 2017-01-19 Yannick Moy <moy@adacore.com>
8067 * sinfo.adb (Pragma_Name): Only access up to Last_Pair of Pragma_Map.
8069 2017-01-19 Ed Schonberg <schonberg@adacore.com>
8071 * sem_ch4.ads, sem_ch4.adb (Try_Object_Operation): Make subprogram
8072 public, for use elsewhere.
8073 * sem_ch6.adb (Analyze_Procedure_Call): In SPARK_Mode and within
8074 an Inlined_body, recognize a call that uses object notation
8075 and has not been rewritten as a regular call because regular
8076 expansion has not taken place.
8078 2017-01-19 Bob Duff <duff@adacore.com>
8080 * checks.adb (Apply_Type_Conversion_Checks): Disable small optimization
8081 in case of generic formal discrete types, because it causes crashes in
8082 the compiler when built with assertions on.
8084 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
8086 * lib-xref-spark_specific.adb, sem_util.adb, sem_util.ads,
8087 sem_ch4.adb, sem_ch8.adb, lib-xref.ads: Minor reformatting.
8089 2017-01-19 Bob Duff <duff@adacore.com>
8091 * bcheck.adb (Check_Consistent_Dynamic_Elaboration_Checking):
8092 Increment Warnings_Detected. It was decrementing, which is
8093 wrong since we just issued a warning message.
8094 * binderr.ads (Errors_Detected, Warnings_Detected): Declare
8095 these variables to be of subtype Nat instead of Int, because
8096 they should never be negative.
8098 2017-01-19 Javier Miranda <miranda@adacore.com>
8100 * contracts.adb (Build_Postconditions_Procedure): Replace
8101 Generate_C_Code by Modify_Tree_For_C.
8102 * exp_aggr.adb (Build_Record_Aggr_Code, Expand_Array_Aggregate):
8103 Replace Generate_C_Code by Modify_Tree_For_C.
8104 * exp_attr.adb (Float_Valid, Is_GCC_Target): Replace Generate_C_Code by
8106 * exp_ch11.adb (Expand_N_Exception_Declaration): Replace
8107 Generate_C_Code by Modify_Tree_For_C.
8108 * exp_ch4.adb (Expand_Allocator_Expression): Replace
8109 Generate_C_Code by Modify_Tree_For_C.
8110 * exp_dbug.adb (Qualify_Entity_Name): Replace Generate_C_Code
8111 by Modify_Tree_For_C.
8112 * exp_util.adb (Remove_Side_Effects, Side_Effect_Free): Replace
8113 Generate_C_Code by Modify_Tree_For_C.
8114 * sem_res.adb (Resolve_Type_Conversion): Replace Generate_C_Code
8115 by Modify_Tree_For_C.
8116 * sinfo.ads (Modify_Tree_For_C): Adding documentation.
8118 2017-01-19 Javier Miranda <miranda@adacore.com>
8120 * sem_util.ads, sem_util.adb (Expression_Of_Expression_Function): New
8122 (Is_Inlinable_Expression_Function): New subprogram.
8123 * exp_ch6.ads, exp_ch6.adb (Expression_Of_Expression_Function): Moved
8125 (Is_Inlinable_Expression_Function): Moved to Sem_Util.
8127 2017-01-19 Ed Schonberg <schonberg@adacore.com>
8129 * sem_ch4.adb (Diagnose_Call): Improve error message when a
8130 selected component has a prefix that might be interpreted
8131 as a parameterless function call, but none of the candidate
8132 interpretations is parameterless, and there is a hidden homonym
8133 of the prefix that is a package.
8134 * sem_ch8.adb (Find_Selected_Component): If the prefix might be
8135 interpreted as a parameterless function call and its analysis
8136 fails, do not call Analyze_Selected_Component.
8138 2017-01-19 Steve Baird <baird@adacore.com>
8140 * sem_util.ads: Add new Use_Full_View Boolean parameter to
8142 * sem_util.adb (Get_Index_Bounds): replace calls to Scalar_Range with
8143 calls to a newly-defined Scalar_Range_Of_Right_View function.
8145 2017-01-19 Arnaud Charlet <charlet@adacore.com>
8147 * gnat1drv.adb: minor fix of unbalanced parens in comment
8148 * lib-xref.ads (Traverse_Compilation_Unit): declaration moved
8149 to visible part of the package to allow re-use in GNATprove.
8150 * lib-xref-spark_specific.adb (Traverse_Stub): routine refactored
8151 from repeated code of Traverse_Compilation_Unit.
8152 (Traverse_Declaration_Or_Statement): fixed detection of
8153 generic subprograms and packages; also, iteration over case
8154 statement alternatives rewritten to avoid testing if the first
8155 alternative is present (since it must be present due to Ada
8156 syntax restrictions).
8158 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
8160 * exp_ch6.adb (Expand_N_Subprogram_Body): Mark the spec as
8161 returning by reference not just for subprogram body stubs,
8162 but for all subprogram cases.
8163 * sem_util.adb: Code reformatting.
8164 (Requires_Transient_Scope): Update the call to Results_Differ.
8165 (Results_Differ): Update the parameter profile and the associated
8168 2017-01-19 Ed Schonberg <schonberg@adacore.com>
8170 * sem_dim.adb (Analyze_Dimension): Analyze object declaration and
8171 identifier nodes that do not come from source, to handle properly
8172 dimensionality check within an inlined body which inclddes both
8173 original operands and rewritten operands. This removes spurious
8174 dimensionality errors in the presence of front-end inlining,
8175 as well as in SPARK mode.
8177 2017-01-16 Jakub Jelinek <jakub@redhat.com>
8180 * gcc-interface/lang.opt (gant, gnatO, gnat): Add Driver flag.
8182 2017-01-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8184 * gcc-interface/Makefile.in (SPARC/Solaris): Fix typo.
8186 2017-01-13 Arnaud Charlet <charlet@adacore.com>
8188 * doc/gnat_ugn/getting_started_with_gnat.rst,
8189 doc/gnat_ugn/inline_assembler.rst,
8190 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
8191 doc/gnat_ugn/elaboration_order_handling_in_gnat.rst,
8192 doc/gnat_ugn/about_this_guide.rst,
8193 doc/gnat_ugn/platform_specific_information.rst,
8194 doc/gnat_ugn/example_of_binder_output.rst,
8195 doc/gnat_ugn/gnat_and_program_execution.rst,
8196 doc/gnat_ugn/gnat_utility_programs.rst,
8197 doc/gnat_ugn/the_gnat_compilation_model.rst,
8198 doc/gnat_rm/implementation_defined_attributes.rst,
8199 doc/gnat_rm/compatibility_and_porting_guide.rst,
8200 doc/gnat_rm/standard_library_routines.rst,
8201 doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
8202 doc/gnat_rm/implementation_defined_pragmas.rst,
8203 doc/gnat_rm/the_gnat_library.rst,
8204 doc/gnat_rm/obsolescent_features.rst,
8205 doc/gnat_rm/about_this_guide.rst,
8206 doc/gnat_rm/the_implementation_of_standard_i_o.rst,
8207 doc/gnat_rm/implementation_of_ada_2012_features.rst,
8208 doc/gnat_rm/interfacing_to_other_languages.rst,
8209 doc/gnat_rm/implementation_defined_aspects.rst,
8210 doc/gnat_rm.rst: Update documentation.
8211 * gnat_rm.texi, gnat_ugn.texi: Regenerated.
8213 2017-01-13 Ed Schonberg <schonberg@adacore.com>
8215 * einfo.ads: minor grammar fixes in comment of Normalized_Position_Max.
8216 * scil_ll.adb: Minor style fix in comment.
8217 * sem_ch8.adb (Analyze_Expanded_Name): Perform dimension analysis
8218 even if entity is already set, because the node may be renalyzed
8219 after inlining transformations.
8221 2017-01-13 Javier Miranda <miranda@adacore.com>
8223 * sem_res.adb (Resolve_Call): Do not establish a transient scope
8224 for a call to inlinable expression function (since the call will
8225 be replaced by its returned object).
8226 * exp_ch6.ads (Is_Inlinable_Expression_Function): New subprogram.
8227 * exp_ch6.adb (Expression_Of_Expression_Function): New subprogram.
8228 (Expand_Call): For inlinable expression function call replace the
8229 call by its returned object.
8230 (Is_Inlinable_Expression_Function): New subprogram.
8232 2017-01-13 Gary Dismukes <dismukes@adacore.com>
8234 * checks.adb: Minor typo fix and reformatting.
8236 2017-01-13 Javier Miranda <miranda@adacore.com>
8238 * contracts.adb (Contract_Only_Subprograms): Remove formal.
8239 (Copy_Original_Specification): Removed.
8240 (Skip_Contract_Only_Subprogram): Move here checks previously
8241 located in the caller of this routine (to leave the code more clean).
8242 (Build_Contract_Only_Subprogram): Code cleanup.
8243 * scil_ll.ads, scil_ll.adb (Get_Contract_Only_Body_Name): Removed.
8244 (Get_Contract_Only_Missing_Body_Name): Removed.
8246 2017-01-13 Javier Miranda <miranda@adacore.com>
8248 * sem_ch6.adb (Cloned_Expression): New subprogram.
8249 (Freeze_Expr_Types): Complete previous patch since the expression
8250 of an expression-function may have iterators and loops with
8251 defining identifiers which, as part of the preanalysis of the
8252 expression, may be left decorated with itypes that will not be
8253 available in the tree passed to the backend.
8255 2017-01-13 Ed Schonberg <schonberg@adacore.com>
8257 * checks.adb (Apply_Type_Conversion_Checks): Optimize a type
8258 conversion to Integer of an expression that is an attribute
8259 reference 'Pos on an enumeration type.
8261 2017-01-13 Bob Duff <duff@adacore.com>
8263 * atree.ads: Minor comment fix.
8265 2017-01-13 Justin Squirek <squirek@adacore.com>
8267 * sem_ch6.adb (Check_Aggregate_Accessibility): Ignore function
8268 calls in accessibility check on return statement.
8270 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
8272 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
8273 Ensure that the input body is a subprogram body before trying to
8274 determine whether it denoted an expression function. Note that
8275 subprogram body stubs cannot denote expression functions.
8277 2017-01-13 Gary Dismukes <dismukes@adacore.com>
8279 * bindgen.adb, sem_ch6.adb, binde.adb, exp_ch3.adb: Minor reformatting
8282 2017-01-13 Javier Miranda <miranda@adacore.com>
8284 * einfo.ads (Component_Bit_Offset): Fix documentation.
8285 * sem_ch13.adb (Check_Record_Representation_Clause): Skip check
8286 on record holes for components with unknown compile-time offsets.
8288 2017-01-13 Bob Duff <duff@adacore.com>
8290 * ali.ads, ali.adb (Static_Elaboration_Model_Used): Remove unused flag.
8291 * g-locfil.ads: Minor comment fix.
8293 2017-01-13 Bob Duff <duff@adacore.com>
8295 * binde.adb (Elab_New): New elaboration order algorithm
8296 that is expected to cause fewer ABE issues. This is a work in
8297 progress. The new algorithm is currently disabled, and can be
8298 enable by the -dp switch, or by modifying the Do_Old and Do_New
8299 etc. flags and rebuilding. Experimental code is included to
8300 compare the results of the old and new algorithms.
8301 * binde.ads: Use GNAT.Dynamic_Tables instead of Table, so we
8302 can have multiple of these tables, so the old and new algorithms
8304 * bindgen.ads (Gen_Output_File): Pass Elab_Order as an 'in'
8305 parameter of type array. This avoids the global variable, and
8306 allows bounds checking (which is normally defeated by the tables
8307 packages). It also ensures that the Elab_Order is read-only
8309 * bindgen.adb: Pass Elab_Order as an 'in' parameter to all
8310 subprograms that need it, as above.
8311 * debug.adb: Document new -dp switch. Modify doc of old -do
8313 * gnatbind.adb (Gnatbind): Make use of new interfaces to Binde
8314 and Bindgen. Move writing of closure (-R and -Ra switches)
8315 to Binde; that's more convenient.
8317 2017-01-13 Ed Schonberg <schonberg@adacore.com>
8319 * sem_ch6.adb (Analyze_Expression_Function): If the expression
8320 function is a completion, all entities referenced in the
8321 expression are frozen. As a consequence, a reference to an
8322 uncompleted private type from an enclosing scope is illegal.
8324 2017-01-13 Javier Miranda <miranda@adacore.com>
8326 * sem_ch6.adb (Freeze_Expr_Types): New subprogram.
8327 (Analyze_Subprogram_Body_Helper): At the occurrence of an
8328 expression function declaration that is a completion, its
8329 expression causes freezing (AI12-0103).
8331 2017-01-13 Vadim Godunko <godunko@adacore.com>
8333 * a-coinho-shared.adb: Fix memory leaks in Constant_Reference and
8334 Reference functions of Ada.Containers.Indefinite_Holders.
8336 2017-01-13 Bob Duff <duff@adacore.com>
8338 * s-os_lib.ads: Minor comment fixes.
8340 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
8342 * exp_ch3.adb (Default_Initialize_Object): Do not default
8343 initialize an object when it is of a task type and restriction
8344 No_Tasking is in effect because the initialization is obsolete.
8345 * exp_ch9.adb (Build_Master_Entity): Do not generate a master when
8346 restriction No_Tasking is in effect.
8347 (Build_Master_Renaming): Do not rename a master when restriction
8348 No_Tasking is in effect.
8350 2017-01-13 Ed Schonberg <schonberg@adacore.com>
8352 * sem_aggr.adb (Resolve_Array_Aggregate): The code that verifies
8353 the legality of An others clause applies as well to a choice in
8354 an Iterated_component_ association.
8355 (Resolve_Iterated_Component_Association): An others choice
8357 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): An
8358 Iterated_Component_Association is not static.
8360 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
8362 * exp_ch3.adb (Freeze_Type): Mark the Ghost mode as set in case
8363 control is passed to the expresion handler before the new mode
8365 * sem_ch12.adb (Analyze_Package_Instantiation,
8366 Analyze_Subprogram_Instantiation): Mark the Ghost mode as set
8367 in case control is passed to the expresion handler before the
8370 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
8372 * sem_aggr.adb, sem_ch3.adb, inline.adb, sem_util.adb, exp_ch4.adb,
8373 exp_aggr.adb: Minor reformatting.
8375 2017-01-13 Gary Dismukes <dismukes@adacore.com>
8377 * inline.adb: Minor reformatting and typo fix.
8379 2017-01-13 Ed Schonberg <schonberg@adacore.com>
8381 * sem_util.ads, sem_util.adb (Choice_List): Move function here
8382 from sem_aggr.adb, for use elsewhere.
8383 * sem_ch3.adb (Analyze_Object_Declaration): Use Choice_List.
8384 * sem_aggr.adb (Resolve_Array_Aggregate): Remove
8385 Iterated_Component_Present.
8386 * exp_aggr.adb: Use Choice_List throughout, to handle
8387 Iterated_Component_Associations.
8388 (Gen_Loop): Generate proper loop for an
8389 Iterated_Component_Association: loop variable has the identifier
8390 of the original association. Generate a loop even for a single
8391 component choice, in order to make loop parameter visible in
8393 (Flatten): An Iterated_Component_Association is not static.
8395 2017-01-13 Yannick Moy <moy@adacore.com>
8397 * exp_ch4.adb (Expand_N_Op_Expon): Ensure that the value of
8398 float exponentiation for statically known small negative values
8399 is the reciprocal of the exponentiation for the opposite value
8401 * s-exnllf.adb (Exn_Float, Exn_Long_Float, Exn_Long_Long_Float):
8402 Ensure that the value of float exponentiation for negative values
8403 is the reciprocal of the exponentiation for the opposite value
8405 * inline.adb (Expand_Inlined_Call): Fix the count
8406 for the number of generated gotos.
8408 2017-01-13 Yannick Moy <moy@adacore.com>
8410 * inline.adb: Code cleanup.
8411 * sem_util.adb (Is_OK_Volatile_Context): Add
8412 expression in delay statement as OK for volatile context.
8414 2017-01-13 Ed Schonberg <schonberg@adacore.com>
8416 * sem_aggr.adb (Resolve_Array_Aggregate): In normal compilation
8417 mode a choice that is a subtype with a static predicate is
8418 replaced by the values it covers. This transformation must not
8419 be performed in ASIS mode, to preserve the source for analysis.
8421 2017-01-13 Justin Squirek <squirek@adacore.com>
8423 * nlists.ads: Correct minor typo.
8425 2017-01-13 Gary Dismukes <dismukes@adacore.com>
8427 * sem_ch13.adb: Minor reformatting and typo fix.
8429 2017-01-13 Ed Schonberg <schonberg@adacore.com>
8431 * par-ch4.adb (P_Aggregate_Or_Parent_Expr): An
8432 Iterated_Component_Association is a named association in an
8434 * sem_aggr.adb (Resolve_Iterated_Component_Association): New
8435 procedure, subsidiary of Resolve_Array_Aggregate, to analyze
8436 and resolve the discrete choices and the expression of the
8438 * sinfo.adb, sinfo.ads: In analogy with N_Component_Association,
8439 Loop_Actions and Box_Present are attributes of
8440 N_Iterated_Component_Association nodes. Box_Present is always
8442 * sprint.adb (Sprint_Node): An Iterated_Component_Association
8443 has a Discrete_Choices list, as specified in the RM. A
8444 Component_Association for aggregate uses instead a Choices list.
8445 We have to live with this small inconsistency because the new
8446 construct also has a defining identifier, and there is no way
8447 to merge the two node structures.
8449 2017-01-13 Yannick Moy <moy@adacore.com>
8451 * inline.adb (Remove_Aspects_And_Pragmas): Add Unused to the
8452 list of pragmas to remove. Remove pragmas from the list of
8453 statements in the body to inline.
8454 * namet.adb, namet.ads (Nam_In): New version with 12 parameters.
8456 2017-01-13 Ed Schonberg <schonberg@adacore.com>
8458 * sem_ch3.adb (Resolve_Aspects): New procedure, subsidiary of
8459 Analyze_Declarations, to analyze and resolve the expressions of
8460 aspect specifications in the current declarative list, so that
8461 the expressions have proper entity and type info. This is needed
8462 for ASIS when there is no subsequent expansion to generate this
8463 semantic information.
8464 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Use Etype of
8465 original expression, to suppress cascaded errors when expression
8466 has been constant-folded.
8467 (Resolve_Aspect_Expressions, Resolve_Name): Preserve entities in
8468 ASIS mode, because there is no subsequent expansion to decorate
8471 2017-01-13 Yannick Moy <moy@adacore.com>
8473 * inline.adb, inline.ads (Call_Can_Be_Inlined_In_GNATprove_Mode):
8474 New function to detect when a call may be inlined or not in
8476 (Expand_Inlined_Call): Ensure that a temporary
8477 is always created in the cases where a type conversion may be
8478 needed on an input parameter in GNATprove mode, so that GNATprove
8479 sees the check to perform.
8480 * sem_res.adb (Resolve_Call): In GNATprove mode, skip inlining
8481 when not applicable due to actual requiring type conversion
8482 with possible check but no temporary value can be copied for
8483 GNATprove to see the check.
8485 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
8487 * sem_aggr.adb, par_sco.adb, s-osprim-mingw.adb, exp_ch5.adb,
8488 exp_prag.adb, sem_ch3.adb, xr_tabls.adb, lib-xref-spark_specific.adb,
8489 layout.adb, sem_dist.adb, exp_spark.adb, exp_ch7.adb, gnatcmd.adb,
8490 exp_util.adb, prj-proc.adb, sem_aux.adb, comperr.adb, g-memdum.adb,
8491 exp_attr.adb, s-intman-solaris.adb, exp_ch9.adb, make.adb, live.adb,
8492 g-sercom-linux.adb, sem_dim.adb, mlib-prj.adb, s-intman-posix.adb,
8493 sem_ch9.adb, sem_ch10.adb, prep.adb, einfo.adb, scng.adb, checks.adb,
8494 prj-strt.adb, sem_prag.adb, eval_fat.adb, sem_ch12.adb, sem.adb,
8495 a-numaux-x86.adb, a-stwifi.adb, i-cobol.adb, prj.adb,
8496 get_spark_xrefs.adb, s-tasini.adb, rtsfind.adb, freeze.adb,
8497 g-arrspl.adb, par-ch4.adb, sem_util.adb, sem_res.adb, expander.adb,
8498 sem_attr.adb, exp_dbug.adb, prj-pp.adb, a-stzfix.adb, s-interr.adb,
8499 s-wchcnv.adb, switch-m.adb, gnat1drv.adb, sinput-l.adb, stylesw.adb,
8500 contracts.adb, s-intman-android.adb, g-expect.adb, exp_ch4.adb,
8501 g-comlin.adb, errout.adb, sinput.adb, s-exctra.adb, repinfo.adb,
8502 g-spipat.adb, g-debpoo.adb, exp_ch6.adb, sem_ch4.adb, exp_ch13.adb,
8503 a-wtedit.adb, validsw.adb, pprint.adb, widechar.adb, makeutl.adb,
8504 ali.adb, set_targ.adb, sem_mech.adb, sem_ch6.adb, gnatdll.adb,
8505 get_scos.adb, g-pehage.adb, s-tratas-default.adb, gnatbind.adb,
8506 prj-dect.adb, g-socthi-mingw.adb, par-prag.adb, prj-nmsc.adb,
8507 exp_disp.adb, par-ch12.adb, binde.adb, sem_ch8.adb,
8508 s-tfsetr-default.adb, s-regexp.adb, gprep.adb, s-tpobop.adb,
8509 a-teioed.adb, sem_warn.adb, sem_eval.adb, g-awk.adb, s-io.adb,
8510 a-ztedit.adb, xoscons.adb, exp_intr.adb, sem_cat.adb, sprint.adb,
8511 g-socket.adb, exp_dist.adb, sem_ch13.adb, s-tfsetr-vxworks.adb,
8512 par-ch3.adb, treepr.adb, g-forstr.adb, g-catiio.adb, par-ch5.adb,
8513 uname.adb, osint.adb, exp_ch3.adb, prj-env.adb, a-strfix.adb,
8514 a-stzsup.adb, prj-tree.adb, s-fileio.adb: Update all eligible case
8515 statements to reflect the new style for case alternatives. Various
8516 code clean up and reformatting.
8518 2017-01-13 Gary Dismukes <dismukes@adacore.com>
8520 * exp_util.adb: Minor reformatting.
8522 2017-01-13 Yannick Moy <moy@adacore.com>
8524 * exp_spark.adb: Code cleanup.
8525 * sem_ch9.adb (Analyze_Delay_Until): Resolve
8526 expression so that calls are identified as such inside delay
8529 2017-01-13 Ed Schonberg <schonberg@adacore.com>
8531 * exp_util.adb (Insert_Actions): Handle Iterated_Component_Association.
8532 * par-ch3.adb (P_Discrete_Choice_List): An
8533 Iterated_Component_Association is an array aggregate component.
8534 * par-ch4.adb (P_Iterated_Component_Association): New procedure.
8535 (Is_Quantified_Expression): New function that performs a lookahead
8536 to distinguish quantified expressions from iterated component
8538 (P_Aggregate_Or_Paren_Expr): Recognize iterated component
8540 (P_Unparen_Cond_Case_Quant_Expression, P_Primary): Ditto.
8541 * sem.adb (Analyze): Handle Iterated_Component_Association.
8542 * sem_aggr.adb (Resolve_Array_Aggregate): Dummy handling of iterated
8543 component associations.
8544 * sinfo.ads, sinfo.adb: Entries for for
8545 N_Iterated_Component_Association and its fields.
8546 * sprint.adb (Sprint_Node_Actual): Handle
8547 N_Iterated_Component_Association.
8549 2017-01-13 Justin Squirek <squirek@adacore.com>
8551 * sem_ch12.adb (Analyze_Package_Instantiation): Move disabiling
8552 of the style check until after preanalysis of acutals.
8554 2017-01-13 Yannick Moy <moy@adacore.com>
8556 * sem_ch13.adb: Minor reformatting.
8557 * par-ch11.adb: minor style fix in whitespace
8558 * gnatbind.adb (Gnatbind): Scope of Std_Lib_File
8559 reduced to Add_Artificial_ALI_File; style fix in declaration of
8560 Text; grammar fix in comment.
8561 * osint-c.adb (Read_Library_Info): strip trailing NUL from result.
8562 * freeze.adb: Cleanup to pass pragma instead of
8564 * exp_spark.adb (Expand_SPARK_Attribute_Reference): New procedure to
8565 replace System'To_Address by equivalent call.
8567 2017-01-13 Arnaud Charlet <charlet@adacore.com>
8569 * bindusg.adb: Improve usage output for -f switch.
8571 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
8573 * frontend.adb, freeze.adb, sem_res.adb, sem_attr.adb, sem_ch8.adb:
8576 2017-01-13 Ed Schonberg <schonberg@adacore.com>
8578 * sem_ch13.adb (Is_Predicate_Static): Following the intent of the RM,
8579 treat comparisons on strings as legal in a Static_Predicate.
8580 (Is_Predicate_Static, Is_Type_Ref): Predicate also returns true on
8581 a function call that is the expansion of a string comparison.The
8582 function call is built when compiling the corresponding predicate
8583 function, but the expression has been found legal as a static
8584 predicate during earlier analysis.
8585 * sem_eval.adb (Real_Or_String_Static_Predicate_Matches): Handle
8586 properly a function call that is the expansion of a string
8587 comparison operation, in order to recover the Static_Predicate
8588 expression and apply it to a static argument when needed.
8590 2017-01-13 Tristan Gingold <gingold@adacore.com>
8592 * s-mmap.adb, s-mmap.ads (Open_Read_No_Exception): New function.
8593 (Open_Read): Re-implement using Open_Read_No_Exception.
8594 (Open_Write): Raise exception in case of error.
8595 * s-mmosin-mingw.adb (Open_Common): Do not raise exception.
8596 * s-mmosin-unix.adb (Open_Read, Open_Write): Do not
8598 * s-mmosin-mingw.ads, s-mmosin-unix.ads (Open_Read): Adjust comment.
8600 2017-01-13 Yannick Moy <moy@adacore.com>
8602 * checks.adb: Code cleanup.
8604 2017-01-13 Yannick Moy <moy@adacore.com>
8606 * freeze.adb (Check_Inherited_Conditions): Use analyzed pragma
8607 expression instead of unanalyzed aspect expression for checking
8608 the validity of inheriting an operation. Also copy the expression
8609 being passing it to Build_Class_Wide_Expression, as this call
8610 modifies its argument.
8611 * sem_util.ads Fix comment to reference correct function name
8614 2017-01-13 Javier Miranda <miranda@adacore.com>
8616 * sem_res.adb (Resolve_Generalized_Indexing): Compiling in ASIS mode,
8617 when we propagate information about the indexes back to the original
8618 indexing mode and the prefix of the index is a function call, do not
8619 remove any parameter from such call.
8621 2017-01-13 Gary Dismukes <dismukes@adacore.com>
8623 * exp_ch6.ads (Needs_BIP_Finalization_Master): Update comment.
8624 * exp_ch6.adb (Needs_BIP_Finalization_Master): Return True for
8625 a build-in-place function whose result type is tagged.
8627 2017-01-13 Yannick Moy <moy@adacore.com>
8629 * sem_ch8.adb (Analyze_Subprogram_Renaming.Build_Class_Wide_Wrapper):
8630 Do not generate a wrapper when the only candidate is a class-wide
8632 (Analyze_Subprogram_Renaming): Do not freeze the renaming or renamed
8633 inside a generic context.
8635 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
8637 * exp_util.adb (Add_Inherited_Tagged_DIC):
8638 Pass the object parameters of both the parent and the derived
8639 type DIC procedure to the reference replacement circuitry.
8640 (Find_DIC_Type): Modify the circuitry to present the partial
8641 view of a private type in case the private type defines its own
8643 (Replace_Object_And_Primitive_References): Add two
8644 optional formal parameters. Update the comment on usage. Update
8645 the replacement of references to object parameters.
8647 2017-01-13 Gary Dismukes <dismukes@adacore.com>
8649 * einfo.adb, sem_ch6.adb, atree.adb: Minor reformatting and typo fix.
8651 2017-01-13 Ed Schonberg <schonberg@adacore.com>
8653 * sem_res.adb (Resolve_Actuals): Apply Scalar_Range_Check to
8654 an out parameter that is a type conversion, independently of th
8655 range check that may apply to the expression of the conversion,
8656 for use in GNATProve.
8658 2017-01-13 Yannick Moy <moy@adacore.com>
8660 * gnat1drv.adb (Gnat1drv): Move the implicit with for System in
8661 GNATprove_Mode here to Frontend.
8662 * frontend.adb (Frontend): Move the implicit with for System
8663 in GNATprove_Mode here as it ismore correct this way; the old
8664 place only worked by chance, since there were no overloaded names.
8665 * rtsfind.ads (RE_Id, RE_Unit_Table): Add RE_Tasking_State.
8666 * sem_attr.adb (Analyze_Attribute): In GNATprove_Mode, for the
8667 four attributes identified in SRM 9(18), add an implicit with
8668 to Ada.Task_Identification.
8669 * sem_ch8.adb (Analyze_Subprogram_Renaming.Build_Class_Wide_Wrapper):
8670 Deal specially with the wrapper introduced for AI05-0071 in GNATprove
8672 * checks.adb (Apply_Discriminant_Check,
8673 Apply_Selected_Length_Checks, Apply_Selected_Range_Checks):
8674 In GNATprove mode, we do not apply the checks, but we still
8675 analyze the expression to possibly issue errors on SPARK
8676 code when a run-time error can be detected at compile time.
8677 (Selected_Length_Checks, Selected_Range_Checks): Perform analysis
8680 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
8682 * expander.adb (Expand): Add a warning about using return
8683 statements in Ghost management code.
8684 * exp_ch3.adb (Freeze_Type): Add a warning about using return
8685 statements in Ghost management code.
8686 * exp_ch7.adb (Build_Invariant_Procedure_Body,
8687 Build_Invariant_Procedure_Declaration): Add a warning about
8688 using return statements in Ghost management code.
8689 * exp_disp.adb (Make_DT): Add a warning about using return
8690 statements in Ghost management code.
8691 * exp_util.adb (Build_DIC_Procedure_Body,
8692 Build_DIC_Procedure_Declaration, Make_Predicated_Call): Add a
8693 warning about using return statements in Ghost management code.
8694 * freeze.adb (Freeze_Entity): Add a warning about using return
8695 statements in Ghost management code.
8696 * sem.adb (Analyze, Do_Analyze): Add a warning about using return
8697 statements in Ghost management code.
8698 * sem_ch3.adb (Analyze_Object_Declaration, Process_Full_View): Add
8699 a warning about using return statements in Ghost management code.
8700 * sem_ch5.adb (Analyze_Assignment): Add a warning about using
8701 return statements in Ghost management code.
8702 * sem_ch6.adb (Analyze_Procedure_Call,
8703 Analyze_Subprogram_Body_Helper): Add a warning about using return
8704 statements in Ghost management code.
8705 * sem_ch7.adb (Analyze_Package_Body_Helper): Add a warning about
8706 using return statements in Ghost management code.
8707 * sem_ch12.adb (Analyze_Package_Instantiation,
8708 Analyze_Subprogram_Instantiation, Instantiate_Package_Body,
8709 Instantiate_Subprogram_Body): Add a warning about using return
8710 statements in Ghost management code.
8711 * sem_ch13.adb (Build_Predicate_Functions,
8712 Build_Predicate_Function_Declarations): Add a warning about
8713 using return statements in Ghost management code.
8714 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part,
8715 Analyze_Initial_Condition_In_Decl_Part, Analyze_Pragma,
8716 Analyze_Pre_Post_Condition_In_Decl_Part): Add a warning about
8717 using return statements in Ghost management code.
8719 2017-01-13 Tristan Gingold <gingold@adacore.com>
8721 * s-mmosin-mingw.adb: Fix pragma import.
8723 2017-01-13 Arnaud Charlet <charlet@adacore.com>
8725 * gnat1drv.adb (Adjust_Global_Switches): Ignore -gnateE in
8728 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
8730 * atree.adb (Allocate_Initialize_Node): A newly created node is
8731 no longer marked as Ghost at this level.
8732 (Mark_New_Ghost_Node): New routine.
8733 (New_Copy): Mark the copy as Ghost.
8734 (New_Entity): Mark the entity as Ghost.
8735 (New_Node): Mark the node as Ghost.
8736 * einfo.adb (Is_Checked_Ghost_Entity): This attribute can now
8737 apply to unanalyzed entities.
8738 (Is_Ignored_Ghost_Entity): This attribute can now apply to unanalyzed
8740 (Set_Is_Checked_Ghost_Entity): This attribute now
8741 applies to all entities as well as unanalyzed entities.
8742 (Set_Is_Ignored_Ghost_Entity): This attribute now applies to
8743 all entities as well as unanalyzed entities.
8744 * expander.adb Add with and use clauses for Ghost.
8745 (Expand): Install and revert the Ghost region associated with the node
8747 * exp_ch3.adb (Expand_Freeze_Array_Type): Remove all Ghost-related code.
8748 (Expand_Freeze_Class_Wide_Type): Remoe all Ghost-related code.
8749 (Expand_Freeze_Enumeration_Type): Remove all Ghost-related code.
8750 (Expand_Freeze_Record_Type): Remove all Ghost-related code.
8751 (Freeze_Type): Install and revert the Ghost region associated
8752 with the type being frozen.
8753 * exp_ch5.adb Remove with and use clauses for Ghost.
8754 (Expand_N_Assignment_Statement): Remove all Ghost-related code.
8755 * exp_ch6.adb Remove with and use clauses for Ghost.
8756 (Expand_N_Procedure_Call_Statement): Remove all Ghost-relatd code.
8757 (Expand_N_Subprogram_Body): Remove all Ghost-related code.
8758 * exp_ch7.adb (Build_Invariant_Procedure_Body): Install and revert the
8759 Ghost region of the working type.
8760 (Build_Invariant_Procedure_Declaration): Install and revert
8761 the Ghost region of the working type.
8762 (Expand_N_Package_Body): Remove all Ghost-related code.
8763 * exp_ch8.adb Remove with and use clauses for Ghost.
8764 (Expand_N_Exception_Renaming_Declaration): Remove all Ghost-related
8766 (Expand_N_Object_Renaming_Declaration): Remove all Ghost-related code.
8767 (Expand_N_Package_Renaming_Declaration): Remove all Ghost-related code.
8768 (Expand_N_Subprogram_Renaming_Declaration): Remove all Ghost-related
8770 * exp_ch13.adb Remove with and use clauses for Ghost.
8771 (Expand_N_Freeze_Entity): Remove all Ghost-related code.
8772 * exp_disp.adb (Make_DT): Install and revert the Ghost region of
8773 the tagged type. Move the generation of various entities within
8774 the Ghost region of the type.
8775 * exp_prag.adb Remove with and use clauses for Ghost.
8776 (Expand_Pragma_Check): Remove all Ghost-related code.
8777 (Expand_Pragma_Contract_Cases): Remove all Ghost-related code.
8778 (Expand_Pragma_Initial_Condition): Remove all Ghost-related code.
8779 (Expand_Pragma_Loop_Variant): Remove all Ghost-related code.
8780 * exp_util.adb (Build_DIC_Procedure_Body): Install
8781 and revert the Ghost region of the working types.
8782 (Build_DIC_Procedure_Declaration): Install and revert the
8783 Ghost region of the working type.
8784 (Make_Invariant_Call): Install and revert the Ghost region of the
8786 (Make_Predicate_Call): Reimplemented. Install and revert the
8787 Ghost region of the associated type.
8788 * freeze.adb (Freeze_Entity): Install and revert the Ghost region
8789 of the entity being frozen.
8790 (New_Freeze_Node): Removed.
8791 * ghost.adb Remove with and use clauses for Opt.
8792 (Check_Ghost_Completion): Update the parameter profile
8793 and all references to formal parameters.
8794 (Ghost_Entity): Update the comment on usage.
8795 (Install_Ghost_Mode): New routines.
8796 (Is_Ghost_Assignment): New routine.
8797 (Is_Ghost_Declaration): New routine.
8798 (Is_Ghost_Pragma): New routine.
8799 (Is_Ghost_Procedure_Call): New routine.
8800 (Is_Ghost_Renaming): Removed.
8801 (Is_OK_Declaration): Reimplemented.
8802 (Is_OK_Pragma): Reimplemented.
8803 (Is_OK_Statement): Reimplemented.
8804 (Is_Subject_To_Ghost): Update the comment on usage.
8805 (Mark_And_Set_Ghost_Assignment): New routine.
8806 (Mark_And_Set_Ghost_Body): New routine.
8807 (Mark_And_Set_Ghost_Completion): New routine.
8808 (Mark_And_Set_Ghost_Declaration): New routine.
8809 (Mark_And_Set_Ghost_Instantiation): New routine.
8810 (Mark_And_Set_Ghost_Procedure_Call): New routine.
8811 (Mark_Full_View_As_Ghost): Removed.
8812 (Mark_Ghost_Declaration_Or_Body): New routine.
8813 (Mark_Ghost_Pragma): New routine.
8814 (Mark_Ghost_Renaming): New routine.
8815 (Mark_Pragma_As_Ghost): Removed.
8816 (Mark_Renaming_As_Ghost): Removed.
8817 (Propagate_Ignored_Ghost_Code): Update the comment on usage.
8818 (Prune_Node): Freeze nodes no longer need special pruning, they
8819 are processed by the general ignored Ghost code mechanism.
8820 (Restore_Ghost_Mode): New routine.
8821 (Set_Ghost_Mode): Reimplemented.
8822 (Set_Ghost_Mode_From_Entity): Removed.
8823 * ghost.ads Add with and use clauses for Ghost.
8824 (Check_Ghost_Completion): Update the parameter profile
8825 along with the comment on usage.
8826 (Install_Ghost_Mode): New routine.
8827 (Is_Ghost_Assignment): New routine.
8828 (Is_Ghost_Declaration): New routine.
8829 (Is_Ghost_Pragma): New routine.
8830 (Is_Ghost_Procedure_Call): New routine.
8831 (Mark_And_Set_Ghost_Assignment): New routine.
8832 (Mark_And_Set_Ghost_Body): New routine.
8833 (Mark_And_Set_Ghost_Completion): New routine.
8834 (Mark_And_Set_Ghost_Declaration): New routine.
8835 (Mark_And_Set_Ghost_Instantiation): New routine.
8836 (Mark_And_Set_Ghost_Procedure_Call): New routine.
8837 (Mark_Full_View_As_Ghost): Removed.
8838 (Mark_Ghost_Pragma): New routine.
8839 (Mark_Ghost_Renaming): New routine.
8840 (Mark_Pragma_As_Ghost): Removed.
8841 (Mark_Renaming_As_Ghost): Removed.
8842 (Restore_Ghost_Mode): New routine.
8843 (Set_Ghost_Mode): Redefined.
8844 (Set_Ghost_Mode_From_Entity): Removed.
8845 * sem.adb (Analyze): Install and revert the Ghost region of the
8846 node being analyzed.
8847 (Do_Analyze): Change the way a clean Ghost
8848 region is installed and reverted.
8849 * sem_ch3.adb (Analyze_Full_Type_Declaration): Remove
8850 all Ghost-related code.
8851 (Analyze_Incomplete_Type_Decl): Remove all Ghost-related code.
8852 (Analyze_Number_Declaration): Remove all Ghost-related code.
8853 (Analyze_Object_Declaration): Install and revert the Ghost region of
8854 a deferred object declaration's completion.
8855 (Array_Type_Declaration): Remove all Ghost-related code.
8856 (Build_Derived_Type): Update the comment on
8857 the propagation of Ghost attributes from a parent to a derived type.
8858 (Derive_Subprogram): Remove all Ghost-related code.
8859 (Make_Class_Wide_Type): Remove all Ghost-related code.
8860 (Make_Implicit_Base): Remove all Ghost-related code.
8861 (Process_Full_View): Install and revert the Ghost region of
8862 the partial view. There is no longer need to check the Ghost
8864 * sem_ch5.adb (Analyze_Assignment): Install and revert the Ghost
8865 region of the left hand side.
8866 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Remove
8867 all Ghost-related code.
8868 (Analyze_Expression_Function): Remove all Ghost-related code.
8869 (Analyze_Generic_Subprogram_Body): Remove all Ghost-related code.
8870 (Analyze_Procedure_Call): Install and revert the Ghost region of
8871 the procedure being called.
8872 (Analyze_Subprogram_Body_Helper): Install and revert the Ghost
8873 region of the spec or body.
8874 (Analyze_Subprogram_Declaration): Remove all Ghost-related code.
8875 (Build_Subprogram_Declaration): Remove all Ghost-related code.
8876 (Find_Corresponding_Spec): Remove all Ghost-related code.
8877 (Process_Formals): Remove all Ghost-related code.
8878 * sem_ch7.adb (Analyze_Package_Body_Helper): Install and revert
8879 the Ghost region of the spec.
8880 (Analyze_Package_Declaration): Remove all Ghost-related code.
8881 * sem_ch8.adb (Analyze_Exception_Renaming): Mark a renaming as
8882 Ghost when it aliases a Ghost entity.
8883 (Analyze_Generic_Renaming): Mark a renaming as Ghost when it aliases
8885 (Analyze_Object_Renaming): Mark a renaming as Ghost when
8886 it aliases a Ghost entity.
8887 (Analyze_Package_Renaming): Mark a renaming as Ghost when it aliases
8889 (Analyze_Subprogram_Renaming): Mark a renaming as Ghost when it
8890 aliases a Ghost entity.
8891 * sem_ch11.adb Remove with and use clauses for Ghost.
8892 (Analyze_Exception_Declaration): Remove all Ghost-related code.
8893 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Remove all
8895 (Analyze_Generic_Subprogram_Declaration): Remove all Ghost-related
8897 (Analyze_Package_Instantiation): Install and revert the Ghost region
8898 of the package instantiation.
8899 (Analyze_Subprogram_Instantiation): Install
8900 and revert the Ghost region of the subprogram instantiation.
8901 (Instantiate_Package_Body): Code clean up. Install and revert the
8902 Ghost region of the package body.
8903 (Instantiate_Subprogram_Body): Code clean up. Install and revert the
8904 Ghost region of the subprogram body.
8905 * sem_ch13.adb (Build_Predicate_Functions): Install
8906 and revert the Ghost region of the related type.
8907 (Build_Predicate_Function_Declaration): Code clean up. Install
8908 and rever the Ghost region of the related type.
8909 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
8910 Install and revert the Ghost region of the pragma.
8911 (Analyze_Initial_Condition_In_Decl_Part): Install and revert the
8912 Ghost region of the pragma.
8913 (Analyze_Pragma): Install and revert the Ghost region of various
8914 pragmas. Mark a pragma as Ghost when it is related to a Ghost entity
8915 or encloses a Ghost entity.
8916 (Analyze_Pre_Post_Condition): Install and revert the Ghost
8917 region of the pragma.
8918 (Analyze_Pre_Post_Condition_In_Decl_Part): Install and revert the
8919 Ghost region of the pragma.
8920 * sem_res.adb (Resolve): Remove all Ghost-related code.
8921 * sem_util.adb (Is_Declaration): Reimplemented.
8922 (Is_Declaration_Other_Than_Renaming): New routine.
8923 * sem_util.ads (Is_Declaration_Other_Than_Renaming): New routine.
8924 * sinfo.adb (Is_Checked_Ghost_Pragma): New routine.
8925 (Is_Ghost_Pragma): Removed.
8926 (Is_Ignored_Ghost_Pragma): New routine.
8927 (Set_Is_Checked_Ghost_Pragma): New routine.
8928 (Set_Is_Ghost_Pragma): Removed.
8929 (Set_Is_Ignored_Ghost_Pragma): New routine.
8930 * sinfo.ads: Update the documentation on Ghost mode and
8931 Ghost regions. New attributes Is_Checked_Ghost_Pragma
8932 and Is_Ignored_Ghost_Pragma along with usages in nodes.
8933 Remove attribute Is_Ghost_Pragma along with usages in nodes.
8934 (Is_Checked_Ghost_Pragma): New routine along with pragma Inline.
8935 (Is_Ghost_Pragma): Removed along with pragma Inline.
8936 (Is_Ignored_Ghost_Pragma): New routine along with pragma Inline.
8937 (Set_Is_Checked_Ghost_Pragma): New routine along with pragma Inline.
8938 (Set_Is_Ghost_Pragma): Removed along with pragma Inline.
8939 (Set_Is_Ignored_Ghost_Pragma): New routine along with pragma Inline.
8941 2017-01-12 Tristan Gingold <gingold@adacore.com>
8943 * s-mmap.ads, s-mmap.adb, s-mmosin-unix.ads, s-mmosin-unix.adb,
8944 s-mmauni-long.ads, s-mmosin-mingw.ads, s-mmosin-mingw.adb: New files.
8946 2017-01-12 Yannick Moy <moy@adacore.com>
8948 * errout.adb, errout.ads (Initialize): Factor common treatment
8950 (Reset_Warnings): New procedure to reset counts related to warnings.
8951 (Record_Compilation_Errors): New variable to store the presence of an
8952 error, used in gnat2why to allow changing the Warning_Mode.
8953 (Compilation_Errors): Use new variable Record_Compilation_Errors to
8954 store the presence of an error.
8956 2017-01-12 Javier Miranda <miranda@adacore.com>
8958 * sem_ch13.adb (Analyze_Aspect_Specifications):
8959 For Interrupt_Handler and Attach_ Handler aspects, decorate the
8960 internally built reference to the protected procedure as coming
8961 from sources and force its analysis.
8963 2017-01-12 Ed Schonberg <schonberg@adacore.com>
8965 * sem_ch3.adb (Build_Derived_Type): For a scalar derived type,
8966 inherit predicates if any from the first_subtype of the parent,
8967 not from the anonymous parent type.
8968 * sem_eval.adb (Is_Static_Subtype): A type that inherits a dynamic
8969 predicate is not a static subtype.
8971 2017-01-12 Gary Dismukes <dismukes@adacore.com>
8973 * freeze.adb (Check_Suspicious_Convention): New procedure
8974 performing a warning check on discriminated record types with
8975 convention C or C++. Factored out of procedure Freeze_Record_Type,
8976 and changed to only apply to base types (to avoid spurious
8977 warnings on subtypes). Minor improvement of warning messages
8978 to refer to discriminated rather than variant record types.
8979 (Freeze_Record_Type): Remove code for performing a suspicious
8981 (Freeze_Entity): Only call Freeze_Record_Type
8982 on types that aren't declared within any enclosing generic units
8983 (rather than just excluding the type when the innermost scope
8984 is generic). Call Check_Suspicious_Convention whether or not
8985 the type is declared within a generic unit.
8986 * sem_ch8.adb (In_Generic_Scope): Move this function to Sem_Util.
8987 * sem_util.ads, sem_util.adb (In_Generic_Scope): New function (moved
8990 2017-01-12 Tristan Gingold <gingold@adacore.com>
8992 * sysdep.c, adaint.c, rtinit.c, ming32.h:
8993 (__gnat_current_codepage): Renamed from CurrentCodePage
8994 (__gnat_current_ccs_encoding): Renamed from CurrentCCSEncoding
8996 2017-01-12 Ed Schonberg <schonberg@adacore.com>
8998 * sem_ch6.adb (Fully_Conformant_Expressions): Handle properly
8999 quantified expressions, following AI12-050: the loop parameters
9000 of two quantified expressions are conformant if they have the
9003 2017-01-12 Arnaud Charlet <charlet@adacore.com>
9005 * gcc-interface/Makefile.in: Clean up VxWorks targets.
9007 2017-01-12 Ed Schonberg <schonberg@adacore.com>
9009 * sem_attr.adb (Analyze_Attribute_Reference, case Loop_Entry):
9010 Hnadle properly the attribute reference when it appears as part
9011 of an expression in another loop aspect.
9013 2017-01-12 Ed Schonberg <schonberg@adacore.com>
9015 * exp_ch3.adb (Check_Predicated_Discriminant): New procedure,
9016 subsidiary of Build_Initialization_Call, to complete generation
9017 of predicate checks on discriminants whose (sub)types have
9018 predicates, and to add checks on variants that do not have an
9020 * sem_util.adb (Gather_Components): A missing Others alternative is
9021 not an error when the type of the discriminant is a static predicate
9022 (and coverage has been checked when analyzing the case statement). A
9023 runtime check is generated to verify that a given discriminant
9024 satisfies the predicate (RM 3.8.1. (21.1/2)).
9026 2017-01-12 Yannick Moy <moy@adacore.com>
9028 * gnat1drv.adb (Adjust_Global_Switches): Only
9029 perform checking of exception mechanism when generating code.
9031 2017-01-12 Justin Squirek <squirek@adacore.com>
9033 * exp_ch7.adb (Add_Type_Invariants, Process_Array_Component):
9034 Remove handling of access component with invariant.
9035 (Build_Invariant_Procedure_Declaration): Remove return on class
9037 * freeze.adb (Freeze_Array_Type, Freeze_Record_Type): Remove
9038 conditional exception for component or array so Has_Own_Invariants
9039 flag is not falsly set.
9040 * sem_ch3.adb (Make_Class_Wide_Type): Initialize copy of class
9041 wide type to have no invariant flags.
9043 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
9045 * exp_ch9.adb, sem_prag.adb, s-tassta.adb, sem_util.adb, s-tarest.adb,
9046 sem_ch13.adb: Minor reformatting.
9048 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
9050 * exp_aggr.adb (Build_Record_Aggr_Code): Guard against a missing
9051 adjustment primitive when the ancestor type was not properly frozen.
9052 (Gen_Assign): Guard against a missing initialization
9053 primitive when the component type was not properly frozen.
9054 (Initialize_Array_Component): Guard against a missing adjustment
9055 primitive when the component type was not properly frozen.
9056 (Initialize_Record_Component): Guard against a missing adjustment
9057 primitive when the component type was not properly frozen.
9058 (Process_Transient_Component_Completion): The transient object may
9059 not be finalized when its associated type was not properly frozen.
9060 * exp_ch3.adb (Build_Assignment): Guard against a missing
9061 adjustment primitive when the component type was not properly frozen.
9062 (Build_Initialization_Call): Guard against a missing
9063 initialization primitive when the associated type was not properly
9065 (Expand_N_Object_Declaration): Guard against a missing
9066 adjustment primitive when the base type was not properly frozen.
9067 (Predefined_Primitive_Bodies): Create an empty Deep_Adjust
9068 body when there is no adjustment primitive available. Create an
9069 empty Deep_Finalize body when there is no finalization primitive
9071 * exp_ch4.adb (Apply_Accessibility_Check): Guard against a
9072 missing finalization primitive when the designated type was
9073 not properly frozen.
9074 (Expand_N_Allocator): Guard against a missing initialization primitive
9075 when the designated type was not properly frozen.
9076 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add the adjustment call
9077 only when the corresponding adjustment primitive is available.
9078 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Generate the
9079 adjustment/finalization statements only when there is an available
9080 primitive to carry out the action.
9081 (Build_Initialize_Statements): Generate the initialization/finalization
9082 statements only when there is an available primitive to carry out the
9084 (Make_Adjust_Call): Do not generate a call when the underlying
9085 type is not present due to a possible missing full view.
9086 (Make_Final_Call): Do not generate a call when the underlying
9087 type is not present due to a possible missing full view.
9088 (Make_Finalize_Address_Stmts): Generate an empty body when the
9089 designated type lacks a finalization primitive.
9090 (Make_Init_Call): Do not generate a call when the underlying type is
9091 not present due to a possible missing full view.
9092 (Process_Component_For_Adjust): Add the adjustment call only when the
9093 corresponding adjustment primitive is available.
9094 (Process_Component_For_Finalize): Add the finalization call only when
9095 the corresponding finalization primitive is available.
9096 (Process_Object_Declaration): Use a null statement to emulate a
9097 missing call to the finalization primitive of the object type.
9098 * exp_ch7.ads (Make_Adjust_Call): Update the comment on usage.
9099 (Make_Final_Call): Update the comment on usage.
9100 (Make_Init_Call): Update the comment on usage.
9101 * exp_util.adb (Build_Transient_Object_Statements): Code reformatting.
9103 2017-01-12 Arnaud Charlet <charlet@adacore.com>
9105 * einfo.ads: Update documentation of Address_Taken.
9106 * sem_attr.adb (Analyze_Access_Attribute, Resolve_Attribute
9107 [Access_Attribute]): Only consider 'Access/'Unchecked_Access
9108 for subprograms when setting Address_Taken flag.
9110 2017-01-12 Patrick Bernardi <bernardi@adacore.com>
9112 * sem_ch10.adb (Analyze_With_Clause): Removed code that turned
9113 Configurable_Run_Time_Mode off when analysing with'ed predefined
9116 2017-01-12 Gary Dismukes <dismukes@adacore.com>
9118 * sem_prag.adb: Minor reformatting.
9119 * sem_util.adb (Unique_Entity): fix result for
9120 bodies of entry families.
9122 2017-01-12 Justin Squirek <squirek@adacore.com>
9124 * sem_prag.adb (Analyze_Pragma): Add appropriate calls to
9125 Resolve_Suppressible in the pragma Assertion_Policy case.
9126 (Resolve_Suppressible): Created this function to factor out
9127 common code used to resolve Suppress to either Ignore or Check
9128 * snames.ads-tmpl: Add name for Suppressible.
9130 2017-01-12 Gary Dismukes <dismukes@adacore.com>
9132 * exp_ch9.adb, s-secsta.adb, snames.ads-tmpl, exp_ch3.adb: Minor
9134 * debug.adb: Minor comment fixes.
9136 2017-01-12 Arnaud Charlet <charlet@adacore.com>
9138 * sem_util.adb (Unique_Entity): For concurrent
9139 bodies that are defined with stubs and complete a declaration
9140 of a single concurrent object return the entity of an implicit
9141 concurrent type, not the entity of the anonymous concurrent
9143 * debug.adb: -gnatd.J is no longer used.
9144 * make.adb (Globalize): Removed, no longer used.
9145 * sem_ch9.adb: minor typo in comment for entry index
9147 2017-01-12 Patrick Bernardi <bernardi@adacore.com>
9149 * aspect.adb, aspect.ads: Added new aspect Secondary_Stack_Size.
9150 * exp_ch3.adb (Build_Init_Statements): As part of initialising
9151 the value record of a task, set its _Secondary_Stack_Size field
9153 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Create
9154 a _Secondary_Stack_Size field in the value record of
9155 the task if a Secondary_Stack_Size rep item is present.
9156 (Make_Task_Create_Call): Include secondary stack size
9157 parameter. If No_Secondary_Stack restriction is in place, passes
9159 * par-prag.adb, sem_prag.adb, sem_prag.ads: Added new pragma
9160 Secondary_Stack_Size.
9161 * s-secsta.adb, s-secsta.ads (Minimum_Secondary_Stack_Size): New
9162 function to define the overhead of the secondary stack.
9163 * s-tarest.adb (Create_Restricted_Task,
9164 Create_Restricted_Task_Sequential): Functions now include
9165 Secondary_Stack_Size parameter to pass to Initialize_ATCB.
9166 * s-tarest.adb (Create_Restricted_Task,
9167 Create_Restricted_Task_Sequential): Calls to Initialize_ATCB now
9168 include Secondary_Stack_Size parameter.
9169 (Task_Wrapper): Secondary stack now allocated to the size specified by
9170 the Secondary_Stack_Size parameter in the task's ATCB.
9171 * s-taskin.adb, s-taskin.adb (Common_ATCB, Initialize_ATCB): New
9172 Secondary_Stack_Size component.
9173 * s-tassta.adb, s-tassta.ads (Create_Restricted_Task,
9174 Create_Restricted_Task_Sequential): Function now include
9175 Secondary_Stack_Size parameter.
9176 (Task_Wrapper): Secondary stack now allocated to the size
9177 specified by the Secondary_Stack_Size parameter in the task's
9179 * s-tproft.adb (Register_Foreign_Thread): Amended Initialize_ATCB call
9180 to include Secondary_Stack_Size parameter.
9181 * sem_ch13.adb (Analyze_Aspect_Specification): Add support for
9182 Secondary_Stack_Size aspect, turning the aspect into its corresponding
9184 (Analyze_Attribute_Definition): Process Secondary_Stack_Size attribute.
9185 * snames.adb-tmpl, snames.ads-tmpl: Added names
9186 Name_Secondary_Stack_Size, Name_uSecondary_Stack_Size,
9187 Attribute_Secondary_Stack_Size and Pragma_Secondary_Stack_Size.
9189 2017-01-12 Yannick Moy <moy@adacore.com>
9191 * exp_spark.adb (Expand_SPARK_Potential_Renaming): Fix sloc of copied
9194 2017-01-12 Justin Squirek <squirek@adacore.com>
9196 * exp_attr.adb (Expand_N_Attribute_Reference):
9197 Fix Finalization_Size case by properly resolving the type after
9198 rewritting the node.
9200 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
9202 * exp_util.adb (Build_DIC_Procedure_Body): Semi-insert the body into
9204 (Build_DIC_Procedure_Declaration): Semi-insert the body into the tree.
9205 * binde.adb, exp_ch5.adb, sem_type.adb, sem.ads, sem_res.adb,
9206 exp_sel.ads: Minor reformatting.
9208 2017-01-12 Justin Squirek <squirek@adacore.com>
9210 * exp_ch6.adb (Expand_Call): Add guard to prevent
9211 invariant checks from being created for internally generated
9214 2017-01-12 Bob Duff <duff@adacore.com>
9216 * lib-writ.ads: Remove incorrect comment.
9218 2017-01-12 Javier Miranda <miranda@adacore.com>
9220 * debug.adb (-gnatd.K): Enable generation of contract-only
9221 procedures in CodePeer mode.
9222 * contracts.adb (Build_And_Analyze_Contract_Only_Subprograms):
9224 (Analyze_Contracts): Generate contract-only procedures if -gnatdK is
9226 * scil_ll.ads, scil_ll.adb (Get_Contract_Only_Body_Name): New
9228 (Get_Contract_Only_Missing_Body_Name): New subprogram.
9229 (Get_Contract_Only_Body): New subprogram.
9230 (Set_Contract_Only_Body): New subprogram.
9231 (Is_Contract_Only_Body): New subprogram.
9232 (Set_Is_Contract_Only_Body): New subprogram.
9233 (SCIL_Nodes): Replace table by hash-table.
9235 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
9237 * exp_ch6.adb: Minor reformatting.
9238 * spark_xrefs.ads: minor cleanup of comments for SPARK xrefs
9240 2017-01-12 Bob Duff <duff@adacore.com>
9242 * binde.adb (Forced): New reason for a dependence.
9243 (Force_Elab_Order): Implementation of the new switch.
9244 * binde.ads: Minor comment fixes.
9245 * bindusg.adb: Add -f switch. Apparently, there was an -f switch
9246 long ago that is no longer supported; removed comment about that.
9247 * opt.ads (Force_Elab_Order_File): Name of file specified for
9249 * switch-b.adb: Parse -f switch.
9251 2017-01-12 Justin Squirek <squirek@adacore.com>
9253 * exp_ch6.adb (Check_View_Conversion): Created this function
9254 to properly chain calls to check type invariants that may be
9255 present in a subprogram call after the subprogram.
9256 (Expand_Call): Add a conditional to identify when a view conversion
9257 needs to be checked.
9258 * nlists.adb, nlists.ads (Prepend_New): New routine.
9259 (Prepend_New_To): New routine.
9261 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
9263 * sinfo.ads: Minor reformatting.
9265 2017-01-12 Gary Dismukes <dismukes@adacore.com>
9267 * exp_util.adb, exp_util.ads, einfo.ads: Minor typo fixes and
9270 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
9272 * exp_ch6.adb (Make_Build_In_Place_Call_In_Anonymous_Context): Add new
9273 variable Definite. Create a local object and pass its 'Access to the
9274 BIP function when the result type is either definite or it does not
9275 require any finalization or secondary stack management.
9277 2017-01-12 Bob Duff <duff@adacore.com>
9279 * contracts.adb, einfo.adb, errout.adb, exp_attr.adb,
9280 exp_ch3.adb, exp_ch7.adb, exp_ch9.adb, exp_prag.adb, freeze.adb,
9281 frontend.adb, ghost.adb, inline.adb, lib-writ.adb, lib-xref.adb,
9282 par.adb, par-ch10.adb, par-ch2.adb, par-prag.adb, par_sco.adb,
9283 sem_attr.adb, sem_aux.adb, sem_ch10.adb, sem_ch12.adb,
9284 sem_ch13.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb, sem_elab.adb,
9285 sem_prag.adb, sem_res.adb, sem_util.adb, sem_util.ads,
9286 sem_warn.adb, sinfo.adb, sinfo.ads, sprint.adb (Pragma_Name):
9287 Change name to Pragma_Name_Unmapped.
9288 (Pragma_Name_Mapped): Change name to Pragma_Name.
9289 This is because the "mapped" version should be the usual case.
9291 2017-01-09 Hristian Kirtchev <kirtchev@adacore.com>
9293 * einfo.ads, einfo.adb: Remove uses of flags Has_Default_Init_Cond,
9294 Is_Default_Init_Cond_Procedure, and
9295 Has_Inherited_Default_Init_Cond. Add uses of flags
9296 Has_Own_DIC, Is_DIC_Procedure, and Has_Inherited_DIC.
9297 (Default_Init_Cond_Procedure): Removed.
9298 (DIC_Procedure): New routine.
9299 (Has_Default_Init_Cond): Removed.
9300 (Has_DIC): New routine.
9301 (Has_Inheritable_Invariants): The attribute applies to the base type.
9302 (Has_Inherited_Default_Init_Cond): Removed.
9303 (Has_Inherited_DIC): New routine.
9304 (Has_Inherited_Invariants): The attribute applies to the base type.
9305 (Has_Own_DIC): New routine.
9306 (Has_Own_Invariants): The attribute applies to the base type.
9307 (Is_Default_Init_Cond_Procedure): Removed.
9308 (Is_DIC_Procedure): New routine.
9309 (Set_Default_Init_Cond_Procedure): Removed.
9310 (Set_DIC_Procedure): New routine.
9311 (Set_Has_Default_Init_Cond): Removed.
9312 (Set_Has_Inheritable_Invariants): The attribute applies
9314 (Set_Has_Inherited_Default_Init_Cond): Removed.
9315 (Set_Has_Inherited_DIC): New routine.
9316 (Set_Has_Inherited_Invariants): The attribute applies to the base type.
9317 (Set_Has_Own_DIC): New routine.
9318 (Set_Has_Own_Invariants): The attribute applies to the base type.
9319 (Set_Is_Default_Init_Cond_Procedure): Removed.
9320 (Set_Is_DIC_Procedure): New routine.
9321 (Write_Entity_Flags): Update the output of all flags related to
9322 default initial condition.
9323 * exp_ch3.adb (Expand_N_Object_Declaration): Update the generation
9324 of the call to the DIC procedure.
9325 (Freeze_Type): Generate the body of the DIC procedure.
9326 * exp_ch7.adb (Build_Invariant_Procedure_Body): Replace
9327 all occurrences of Create_Append with Append_New_To. Do
9328 not generate an invariant procedure for a class-wide type.
9329 The generated body acts as a freeze action of the working type.
9330 (Build_Invariant_Procedure_Declaration): Do not generate an
9331 invariant procedure for a class-wide type.
9332 (Create_Append): Removed.
9333 * exp_util.adb: Add with and use clauses for Sem_Ch3, sem_ch6,
9334 sem_Ch12, Sem_Disp, and GNAT.HTable. Move the handling of
9335 class-wide pre/postcondition description and data structures from
9337 (Build_Class_Wide_Expression): Moved from Sem_Prag.
9338 (Build_DIC_Call): New routine.
9339 (Build_DIC_Procedure_Body): New routine.
9340 (Build_DIC_Procedure_Declaration): New routine.
9341 (Entity_Hash): Moved from Sem_Prag.
9342 (Find_DIC_Type): New routine.
9343 (Update_Primitives_Mapping): Reimplemented.
9344 (Update_Primitives_Mapping_Of_Types): New routine.
9345 * exp_util.ads (Build_Class_Wide_Expression): Moved from Sem_Prag.
9346 (Build_DIC_Call): New routine.
9347 (Build_DIC_Procedure_Body): New routine.
9348 (Build_DIC_Procedure_Declaration): New routine.
9349 (Update_Primitives_Mapping): Moved from Sem_Prag.
9350 (Update_Primitives_Mapping_Of_Types): New routine.
9351 * nlists.adb (Append_New): New routine.
9352 (Append_New_To): New routine.
9353 * nlists.ads (Append_New): New routine.
9354 (Append_New_To): New routine.
9355 * sem_ch3.adb (Analyze_Declarations): Do not generate the bodies
9356 of DIC procedures here. This is now done at the end of the
9357 visible declarations, private declarations, and at the freeze
9359 (Analyze_Private_Extension_Declaration):
9360 A private extension inherits the DIC pragma of a parent type.
9361 (Analyze_Subtype_Declaration): No need to propagate invariant
9362 attributes to a subtype as those apply to the base type.
9363 (Build_Derived_Record_Type): No need to inherit invariants here
9364 as this is now done in Build_Derived_Type.
9365 (Build_Derived_Type): Inherit both the DIC pragma and invariants from
9367 (Process_Full_View): Update the propagation of DIC attributes.
9368 (Propagate_Default_Init_Cond_Attributes): Removed.
9369 * sem_ch7.adb Add with and use clauses for Exp_Util.
9370 (Analyze_Package_Specification): Create the body of the DIC
9371 procedure at the end of the visible and private declarations.
9372 (Preserve_Full_Attributes): Propagate DIC attributes.
9373 * sem_ch9.adb (Analyze_Protected_Type_Declaration): Propagate
9375 (Analyze_Task_Type_Declaration): Propagate DIC attributes.
9376 * sem_elab.adb (Check_A_Call): Update the call to
9377 Is_Nontrivial_Default_Init_Cond_Procedure.
9378 * sem_prag.adb Remove the with and use clauses for
9379 GNAT.HTable. Move the handling of class- wide pre/postcondition
9380 description and data structures to Exp_Util.
9381 (Analyze_Pragma): Create the declaration of the DIC procedure. There
9382 is no need to propagate invariant-related attributes at this point
9383 as this is done in Build_Invariant_Procedure_Declaration.
9384 (Build_Class_Wide_Expression): Moved to Exp_Util.
9385 (Entity_Hash): Moved to Exp_Util.
9386 (Update_Primitives_Mapping): Moved to Exp_Util.
9387 * sem_prag.ads (Build_Class_Wide_Expression): Moved to Exp_Util.
9388 (Update_Primitives_Mapping): Moved to Exp_Util.
9389 * sem_util.adb: Remove with and use clauses for Ghost
9391 (Build_Default_Init_Cond_Call): Removed.
9392 (Build_Default_Init_Cond_Procedure_Bodies): Removed.
9393 (Build_Default_Init_Cond_Procedure_Declaration): Removed.
9394 (Get_Views): Reimplemented.
9395 (Has_Full_Default_Initialization): Reimplement the section on DIC.
9396 (Inherit_Default_Init_Cond_Procedure): Removed.
9397 (Is_Nontrivial_Default_Init_Cond_Procedure): Removed.
9398 (Is_Nontrivial_DIC_Procedure): New routine.
9399 (Is_Verifiable_DIC_Pragma): New routine.
9400 (Propagate_DIC_Attributes): New routine.
9401 * sem_util.ads (Build_Default_Init_Cond_Call): Removed.
9402 (Build_Default_Init_Cond_Procedure_Bodies): Removed.
9403 (Build_Default_Init_Cond_Procedure_Declaration): Removed.
9404 (Inherit_Default_Init_Cond_Procedure): Removed.
9405 (Is_Nontrivial_Default_Init_Cond_Procedure): Removed.
9406 (Is_Nontrivial_DIC_Procedure): New routine.
9407 (Is_Verifiable_DIC_Pragma): New routine.
9408 (Propagate_DIC_Attributes): New routine.
9409 * sem_warn.adb (Is_OK_Fully_Initialized): Reimplement the section
9411 * sinfo.ads, sinfo.adb: Add new attribute Expression_Copy along with
9413 (Expression_Copy): New routine along with pragma Inline.
9414 (Set_Expression_Copy): New routine along with pragma Inline.
9416 2017-01-06 Bob Duff <duff@adacore.com>
9418 * bindgen.adb (Gen_Adainit, Gen_Adafinal): Change
9419 "Bind_Main_Program" to "not Bind_For_Library", because otherwise
9420 we won't generate the call to s_stalib_adafinal when the main
9421 is not written in Ada.
9423 2017-01-06 Bob Duff <duff@adacore.com>
9425 * sem_prag.adb: Minor: remove pragma Warnings.
9427 2017-01-06 Tristan Gingold <gingold@adacore.com>
9429 * Makefile.rtl: Do not compile s-stchop by default.
9431 2017-01-06 Patrick Bernardi <bernardi@adacore.com>
9433 * aspects.adb, aspects.ads, exp_ch3.adb, exp_ch9.adb, par-prag.adb,
9434 sem_ch13.adb, sem_prag.adb, sem_prag.ads, snames.adb-tmpl,
9435 snames.ads-tmpl, s-secsta.adb, s-secsta.ads, s-tarest.adb,
9436 s-tarest.ads, s-taskin.adb, s-taskin.ads, s-tassta.adb, s-tassta.ads:
9437 Reverted previous change for now.
9439 2017-01-06 Ed Schonberg <schonberg@adacore.com>
9441 * exp_ch3.adb (Build_Initialization_Call): Apply predicate
9442 check to default discriminant value if checks are enabled.
9443 (Build_Assignment): If type of component has static predicate,
9444 apply check to its default value, if any.
9446 2017-01-06 Patrick Bernardi <bernardi@adacore.com>
9448 * aspect.adb, aspect.ads: Added new aspect Secondary_Stack_Size.
9449 * exp_ch3.adb (Build_Init_Statements): As part of initialising
9450 the value record of a task, set its _Secondary_Stack_Size field
9452 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Create
9453 a _Secondary_Stack_Size field in the value record of
9454 the task if a Secondary_Stack_Size rep item is present.
9455 (Make_Task_Create_Call): Include secondary stack size
9456 parameter. If No_Secondary_Stack restriction is in place, passes
9458 * par-prag.adb, sem_prag.adb, sem_prag.ads: Added new pragma
9459 Secondary_Stack_Size.
9460 * s-secsta.adb, s-secsta.ads (Minimum_Secondary_Stack_Size): New
9461 function to define the overhead of the secondary stack.
9462 * s-tarest.adb (Create_Restricted_Task,
9463 Create_Restricted_Task_Sequential): Functions now include
9464 Secondary_Stack_Size parameter to pass to Initialize_ATCB.
9465 * s-tarest.adb (Create_Restricted_Task,
9466 Create_Restricted_Task_Sequential): Calls to Initialize_ATCB
9467 now include Secondary_Stack_Size parameter.
9469 Secondary stack now allocated to the size specified by the
9470 Secondary_Stack_Size parameter in the task's ATCB.
9471 * s-taskin.adb, s-taskin.adb (Common_ATCB, Initialise_ATCB): New
9472 Secondary_Stack_Size component.
9473 * s-tassta.adb, s-tassta.ads (Create_Restricted_Task,
9474 Create_Restricted_Task_Sequential): Function now include
9475 Secondary_Stack_Size parameter.
9476 (Task_Wrapper): Secondary stack
9477 now allocated to the size specified by the Secondary_Stack_Size
9478 parameter in the task's ATCB.
9479 * sem_ch13.adb (Analyze_Aspect_Specification): Add support
9480 for Secondary_Stack_Size aspect, turning the aspect into its
9481 corresponding internal attribute.
9482 (Analyze_Attribute_Definition):
9483 Process Secondary_Stack_Size attribute.
9484 * snames.adb-tmpl, snames.ads-tmpl: Added names
9485 Name_Secondary_Stack_Size, Name_uSecondary_Stack_Size,
9486 Attribute_Secondary_Stack_Size and Pragma_Secondary_Stack_Size.
9488 2017-01-06 Pascal Obry <obry@adacore.com>
9490 * a-direio.adb, a-direio.ads, a-sequio.adb, a-sequio.ads: Add Flush to
9491 Sequential_IO and Direct_IO.
9493 2017-01-06 Bob Duff <duff@adacore.com>
9495 * snames.ads-tmpl (Renamed): New name for the pragma argument.
9496 * par-ch2.adb: Allow the new pragma (with analysis deferred
9498 * sinfo.ads, sinfo.adb (Map_Pragma_Name, Pragma_Name_Mapped):
9499 Keep a mapping from new pragma names to old names.
9500 * sem_prag.adb: Check legality of pragma Rename_Pragma, and
9501 implement it by calling Map_Pragma_Name.
9502 * checks.adb, contracts.adb, einfo.adb, errout.adb,
9503 * exp_attr.adb, exp_ch3.adb, exp_ch6.adb, exp_ch7.adb, exp_ch9.adb,
9504 * exp_prag.adb, exp_util.adb, freeze.adb, frontend.adb, ghost.adb,
9505 * inline.adb, lib-writ.adb, scans.adb, scans.ads, sem_attr.adb,
9506 * sem_aux.adb, sem_ch10.adb, sem_ch13.adb, sem_ch6.adb, sem_ch9.adb,
9507 * sem_elab.adb, sem_res.adb, sem_util.adb, sem_util.ads,
9508 * sem_warn.adb: Call Pragma_Name_Mapped instead of Pragma_Name
9511 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
9513 * exp_ch9.adb: Minor reformatting.
9515 2017-01-06 Tristan Gingold <gingold@adacore.com>
9517 * exp_ch9.ads, exp_ch9.adb (Build_Entry_Names): Remove (unused).
9518 * rtsfind.ads (RE_Task_Entry_Names_Array, RO_ST_Set_Entry_Names)
9519 (RE_Protected_Entry_Names_Array, RO_PE_Set_Entry_Names): Remove
9521 * s-taskin.ads, s-taskin.adb (Set_Entry_Names,
9522 Task_Entry_Names_Array, Task_Entry_Names_Access): Remove.
9523 * s-tpoben.ads, s-tpoben.adb (Set_Entry_Names,
9524 Protected_Entry_Names_Array, Protected_Entry_Names_Access): Remove.
9526 2017-01-06 Bob Duff <duff@adacore.com>
9528 * sinfo.ads, sinfo.adb (Map_Pragma_Name): Preparation work,
9529 dummy implementation of Map_Pragma_Name.
9531 2017-01-06 Tristan Gingold <gingold@adacore.com>
9533 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Make the
9534 entry_body variable constant.
9535 * s-taprob.ads (Entry_Body_Access): Move to s-tposen.
9536 * s-tpoben.ads (Protected_Entry_Body_Access): Now access
9538 * s-tposen.ads (Entry_Body_Access): Moved from s-taprob,
9539 now access to constant.
9541 2017-01-06 Gary Dismukes <dismukes@adacore.com>
9543 * einfo.ads, sem_res.adb, sem_attr.adb, sem_ch6.adb: Minor
9544 reformatting and typo fixes.
9546 2017-01-06 Bob Duff <duff@adacore.com>
9548 * snames.ads-tmpl: New names for pragma renaming.
9549 * snames.adb-tmpl (Is_Configuration_Pragma_Name): Minor cleanup.
9550 * par-prag.adb: Add new pragma name to case statement.
9551 * sem_prag.adb (Rename_Pragma): Initial cut at semantic analysis
9553 * sinfo.ads, sinfo.adb (Pragma_Name_Mapped): Preparation work,
9554 Dummy implementation of Pragma_Name_Mapped.
9556 2017-01-06 Ed Schonberg <schonberg@adacore.com>
9558 * exp_ch6.adb (Expand_Protected_Subprogram_Call): Add guard to
9559 better detect call within an entry_wrapper.
9560 * sem_res.adb (Resolve_Call): A protected call within an
9561 entity_wrapper is analyzed in the context of the protected
9562 object but corresponds to a pre-analysis and is not an access
9564 * sem_attr.adb: Minor reformatting.
9566 2017-01-06 Justin Squirek <squirek@adacore.com>
9568 * sem_attr.adb (Analyze_Attribute): Modify semantic checks for
9569 Finalization_Size to allow a prefix of any non-class-wide type.
9570 * sem_attr.ads Modify comment for Finalization_Size to include
9571 definite type use case.
9573 2017-01-06 Ed Schonberg <schonberg@adacore.com>
9575 * einfo.ads, einfo.adb (Is_Entry_Wrapper): New flag, defined
9576 on procedures that are wrappers created for entries that have
9578 * sem_ch6.adb (Analyze_Subrogram_Body_Helper): If the subprogram
9579 body is an entry_wrapper, compile it in the context of the
9580 synchronized type, because a precondition may refer to funtions
9582 * exp_ch9.adb (Build_Contract_Wrapper): Set Is_Entry_Wrapper on
9584 * exp_ch6.adb (Expand_Protected_Subprogram_Call): if the call is
9585 within an Entry_Wrapper this is an external call whose target
9586 is the synchronized object that is the actual in the call to
9589 2017-01-06 Yannick Moy <moy@adacore.com>
9591 * sem_attr.adb (Analyze_Attribute/Attribute_Loop_Entry): Analyze node
9592 in tree, which means not analyzing the previous prefix if the node has
9593 been rewritten into its prefix.
9595 2017-01-06 Gary Dismukes <dismukes@adacore.com>
9597 * s-tpobop.adb: Minor reformatting.
9599 2017-01-06 Ed Schonberg <schonberg@adacore.com>
9601 * checks.adb (Ensure_Valid): Do not generate a validity check
9602 within a generated predicate function, validity checks will have
9603 been applied earlier when required.
9605 2017-01-06 Tristan Gingold <gingold@adacore.com>
9607 * s-tpoben.ads (Protection_Entries): Add comment and reorder
9608 components for performances.
9609 * s-tpobop.adb (PO_Do_Or_Queue): Implement Max_Queue_Length runtime
9612 2017-01-06 Ed Schonberg <schonberg@adacore.com>
9614 * sem_eval.adb (Check_Expression_Against_Static_Predicate):
9615 If expression is compile-time known and obeys a static predicate
9616 it must be labelled as static, to prevent spurious warnings and
9617 run-time errors, e.g. in case statements. This is relevant when
9618 the expression is the result of constant-folding a type conversion
9619 whose expression is a variable with a known static value.
9621 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
9623 * exp_attr.adb, sem_attr.ads: Minor reformatting.
9625 2017-01-06 Justin Squirek <squirek@adacore.com>
9627 * exp_attr.adb (Expand_N_Attribute_Reference): Add entry for
9628 expansion of Finalization_Size attribute.
9629 * sem_attr.adb (Analyze_Attribute): Add entry to check the
9630 semantics of Finalization_Size.
9631 (Eval_Attribute): Add null entry for Finalization_Size.
9632 * sem_attr.ads: Add Finalization_Size to the implementation
9633 dependent attribute list.
9634 * snames.ads-tmpl: Add name entry for Finalization_Size attribute.
9636 2017-01-06 Ed Schonberg <schonberg@adacore.com>
9638 * sem_ch5.adb (Analyze_Loop_Statement): If the loop includes an
9639 iterator specification with a serious syntactic error, transform
9640 construct into an infinite loop in order to continue analysis
9641 and prevent a compiler abort.
9643 2017-01-06 Tristan Gingold <gingold@adacore.com>
9645 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Do not generate
9646 max_queue_lengths_array if unused.
9648 2017-01-06 Bob Duff <duff@adacore.com>
9650 * errout.adb (Set_Msg_Text): Protect against out-of-bounds
9651 array access, in case "\" is at the end of Text.
9652 * stylesw.adb (Set_Style_Check_Options): Don't include input
9653 characters in the error message template, because they could
9654 be control characters such as "\", which Errout will try to
9657 2017-01-06 Ed Schonberg <schonberg@adacore.com>
9659 * sem_ch4.adb (Find_Indexing_Operations, Inspect_Declarations):
9660 For a private type examine the visible declarations that follow
9661 the partial view, not just the private declarations that follow
9664 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
9666 * exp_ch5.adb, sem_ch3.adb, checks.adb: Minor reformatting and
9669 2017-01-06 Ed Schonberg <schonberg@adacore.com>
9671 * exp_ch5.adb (Get_Default_Iterator): For a derived type, the
9672 alias of the inherited op is the parent iterator, no need to
9673 examine dispatch table positions which might not be established
9674 yet if type is not frozen.
9675 * sem_disp.adb (Check_Controlling_Formals): The formal of a
9676 predicate function may be a subtype of a tagged type.
9677 * sem_ch3.adb (Complete_Private_Subtype): Adjust inheritance
9678 of representation items for the completion of a type extension
9679 where a predicate applies to the partial view.
9680 * checks.ads, checks.adb (Apply_Predicate_Check): Add optional
9681 parameter that designates function whose actual receives a
9682 predicate check, to improve warning message when the check will
9683 lead to infinite recursion.
9684 * sem_res.adb (Resolve_Actuals): Pass additional parameter to
9685 Apply_Predicate_Check.
9687 2017-01-06 Tristan Gingold <gingold@adacore.com>
9689 * s-rident.ads (Profile_Info): Remove No_Entry_Queue from
9690 Gnat_Extended_Ravenscar.
9691 * exp_ch9.adb, s-tpoben.adb, s-tpoben.ads: Fix spelling.
9693 2017-01-06 Gary Dismukes <dismukes@adacore.com>
9695 * sem_util.ads: Minor typo fix and reformatting.
9697 2017-01-06 Yannick Moy <moy@adacore.com>
9699 * ghost.adb Minor fixing of references to SPARK RM.
9700 (Check_Ghost_Context): Check whether reference is to a lvalue
9701 before issuing an error about violation of SPARK RM 6.9(13)
9702 when declaration has Ghost policy Check and reference has Ghost
9704 * sem_util.adb Minor indentation.
9705 * sem_ch10.adb (Analyze_Package_Body_Stub, Analyze_Protected_Body_Stub,
9706 Analyze_Task_Body_Stub): Set Ekind of the defining identifier.
9707 * sem_util.ads (Unique_Defining_Entity): Document the result
9708 for package body stubs.
9710 2017-01-06 Tristan Gingold <gingold@adacore.com>
9712 * raise-gcc.c (abort): Macro to call Abort_Propagation.
9713 * s-tpoben.ads (Protected_Entry_Queue_Max_Access): Make it access
9715 * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
9716 Do not generate the Entry_Max_Queue_Lengths_Array if all default
9718 * exp_util.adb (Corresponding_Runtime_Package): Consider
9719 Max_Queue_Length pragma.
9721 2017-01-06 Justin Squirek <squirek@adacore.com>
9723 * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
9724 Remove declaration generation in the case of
9725 System_Tasking_Protected_Objects_Single_Entry being used,
9726 and add a warning message when this is detected to occur.
9727 (Make_Initialize_Protection): Remove reference pass in the case
9728 of System_Tasking_Protected_Objects_Single_Entry.
9729 * rtsfind.ads: Remove RE_Protected_Entry_Queue_Max
9730 * s-tposen.adb (Initialize_Protection_Entry): Remove
9731 Entry_Queue_Max parameter.
9732 * s-tposen.ads: Remove the types use to store the entry queue
9734 * sem_prag.adb (Analyze_Pragma): Remove entry families restriction
9736 2017-01-06 Yannick Moy <moy@adacore.com>
9738 * sem_util.adb, sem_util.ads (Get_Enum_Lit_From_Pos): Strengthen
9739 behavior of function, to also accept out of range positions
9740 and raise Constraint_Error in such case, and to copy sloc from
9741 literal if No_Location passed as location.
9742 * uintp.adb, uintp.ads (UI_To_Int, UI_To_CC): Strengthen behavior
9743 of functions to raise Constraint_Error in case of value not in
9746 2017-01-06 Tristan Gingold <gingold@adacore.com>
9748 * sem_util.adb, s-taprop-linux.adb (Finalize_TCB): Remove call to
9749 Invalidate_Stack_Cache.
9751 2017-01-06 Eric Botcazou <ebotcazou@adacore.com>
9753 * s-os_lib.adb: Minor fix to the signature of Readlink.
9755 2017-01-06 Javier Miranda <miranda@adacore.com>
9757 * sem_ch6.adb (Conforming_Types): Handle another
9758 confusion between views in a nested instance with an actual
9759 private type whose full view is not in scope.
9761 2017-01-06 Arnaud Charlet <charlet@adacore.com>
9763 * exp_ch5.adb (Expand_N_If_Statement): Obey existing comment and
9764 mark a rewritten if statement as explicit (Comes_From_Source).
9766 2017-01-06 Gary Dismukes <dismukes@adacore.com>
9768 * sem_prag.adb, rtsfind.adb, sem_util.adb: Minor typo fixes.
9770 2017-01-06 Tristan Gingold <gingold@adacore.com>
9772 * ada.ads, a-unccon.ads: Add pragma No_Elaboration_Code_All.
9774 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
9776 * sem_case.adb: Minor reformatting.
9778 2017-01-06 Thomas Quinot <quinot@adacore.com>
9780 * g-socthi-mingw.adb: Remove now extraneous USE TYPE clause
9782 2017-01-06 Justin Squirek <squirek@adacore.com>
9784 * aspects.adb: Register aspect in Canonical_Aspect.
9785 * aspects.ads: Associate qualities of Aspect_Max_Queue_Length
9786 into respective tables.
9787 * einfo.ads, einfo.adb: Add a new attribute for
9788 handling the parameters for Pragma_Max_Entry_Queue
9789 (Entry_Max_Queue_Lengths_Array) in E_Protected_Type. Subprograms
9790 for accessing and setting were added as well.
9791 * par-prag.adb (Prag): Register Pramga_Max_Entry_Queue.
9792 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Emit
9793 declaration for pramga arguments and store them in the protected
9795 (Make_Initialize_Protection): Pass a reference to
9796 the Entry_Max_Queue_Lengths_Array in the protected type node to
9798 * rtsfind.adb: Minor grammar fix.
9799 * rtsfind.ads: Register new types taken from the
9800 runtime libraries RE_Protected_Entry_Queue_Max and
9801 RE_Protected_Entry_Queue_Max_Array
9802 * s-tposen.adb, s-tpoben.adb
9803 (Initialize_Protection_Entry/Initialize_Protection_Entries):
9804 Add extra parameter and add assignment to local object.
9805 * s-tposen.ads, s-tpoben.ads: Add new types to
9806 store entry queue maximums and a field to the entry object record.
9807 * sem_ch13.adb (Analyze_Aspect_Specifications): Add case statement
9808 for Aspect_Max_Queue_Length.
9809 (Check_Aspect_At_Freeze_Point):
9810 Add aspect to list of aspects that don't require delayed analysis.
9811 * sem_prag.adb (Analyze_Pragma): Add case statement for
9812 Pragma_Max_Queue_Length, check semantics, and register arugments
9813 in the respective entry nodes.
9814 * sem_util.adb, sem_util.ads Add functions Get_Max_Queue_Length
9815 and Has_Max_Queue_Length
9816 * snames.ads-tmpl: Add constant for the new aspect-name
9817 Name_Max_Queue_Length and corrasponding pragma.
9819 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
9821 * exp_util.adb (Is_Controlled_Function_Call):
9822 Reimplemented. Consider any node which has an entity as the
9823 function call may appear in various ways.
9825 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
9827 * exp_attr.adb (Rewrite_Stream_Proc_Call): Use
9828 an unchecked type conversion when performing a view conversion
9829 to/from a private type. In all other cases use a regular type
9830 conversion to ensure that any relevant checks are properly
9833 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
9835 * sem_prag.adb, sem_ch8.adb: Minor reformatting.
9837 2017-01-06 Ed Schonberg <schonberg@adacore.com>
9839 * sem_case.adb (Explain_Non_Static_Bound): Suppress cascaded
9840 error on case expression that is an entity, when coverage is
9841 incomplete and entity has a static value obtained by local
9843 (Handle_Static_Predicate): New procedure, subsidiary of
9844 Check_Choices, to handle case alternatives that are either
9845 subtype names or subtype indications involving subtypes that
9846 have static predicates.
9848 2017-01-06 Thomas Quinot <quinot@adacore.com>
9850 * s-oscons-tmplt.c, g-socket.adb, g-socket.ads, g-sothco.ads:
9851 (GNAT.Socket): Add support for Busy_Polling and Generic_Option
9853 2017-01-06 Bob Duff <duff@adacore.com>
9855 * sem_elab.adb (Activate_Elaborate_All_Desirable): Don't add
9856 Elaborate_All(P) to P itself. That could happen in obscure cases,
9857 and always introduced a cycle (P body must be elaborated before
9859 * lib-writ.ads: Comment clarification.
9860 * ali-util.ads: Minor comment fix.
9861 * ali.adb: Minor reformatting.
9863 2017-01-06 Tristan Gingold <gingold@adacore.com>
9865 * a-exexpr-gcc.adb: Improve comment.
9867 2017-01-03 James Cowgill <James.Cowgill@imgtec.com>
9869 * s-linux-mips.ads: Use correct signal and errno constants.
9870 (sa_handler_pos, sa_mask_pos): Fix offsets for 64-bit MIPS.
9872 2017-01-03 James Cowgill <James.Cowgill@imgtec.com>
9874 * s-linux-mips.ads: Rename from s-linux-mipsel.ads.
9875 * gcc-interface/Makefile.in (MIPS/Linux): Merge mips and mipsel
9878 2017-01-01 Eric Botcazou <ebotcazou@adacore.com>
9880 * gnatvsn.ads: Bump copyright year.
9882 2017-01-01 Jakub Jelinek <jakub@redhat.com>
9884 * gnat_ugn.texi: Bump @copying's copyright year.
9885 * gnat_rm.texi: Likewise.
9887 Copyright (C) 2017 Free Software Foundation, Inc.
9889 Copying and distribution of this file, with or without modification,
9890 are permitted in any medium without royalty provided the copyright
9891 notice and this notice are preserved.