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