5667112694db844104c3d14e87a5db6b0fd01f6b
[gcc.git] / gcc / ada / ChangeLog
1 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
2
3 * sem_ch3.adb, sem_ch7.adb, sem_util.adb, g-debpoo.adb, sem_ch4.adb,
4 sem_ch6.adb, sem_ch8.adb: Minor reformatting.
5 * exp_util.adb (Is_Source_Object): Account for
6 the cases where the source object may appear as a dereference
7 or within a type conversion.
8 * exp_ch6.adb: Fix missing space in error message.
9
10 2017-09-06 Ed Schonberg <schonberg@adacore.com>
11
12 * sem_prag.adb: Update description of Eliminate.
13
14
15 2017-09-06 Ed Schonberg <schonberg@adacore.com>
16
17 * sem_attr.adb (Analyze_Attribute, case 'Loop_Entry): Handle
18 properly an attribute reference 'Loop_Entry that appears in the
19 list of indices of an indexed expression, to prevent an infinite
20 loop in the compiler.
21
22 2017-09-06 Bob Duff <duff@adacore.com>
23
24 * s-fileio.adb (Name): Do not raise Use_Error for temp files.
25
26 2017-09-06 Ed Schonberg <schonberg@adacore.com>
27
28 * sem_ch4.adb (Analyze_Set_Membership): If an alternative
29 in a set membership is an overloaded enumeration literal, and
30 the type of the alternative is resolved from a previous one,
31 replace the entity of the alternative as well as the type,
32 to prevent inconsistencies between the entity and the type.
33
34 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
35
36 * ali.ads (ALIs_Record): Add No_Component_Reordering component.
37 (No_Component_Reordering_Specified): New switch.
38 * ali.adb (Initialize_ALI): Set No_Component_Reordering_Specified.
39 (Scan_ALI): Set No_Component_Reordering and deal with NC marker.
40 * bcheck.adb (Check_Consistent_No_Component_Reordering):
41 New check.
42 (Check_Configuration_Consistency): Invoke it.
43 * debug.adb (d.r): Toggle the effect of the switch.
44 (d.v): Change to no-op.
45 * einfo.ads (Has_Complex_Representation):
46 Restrict to record types.
47 (No_Reordering): New alias for Flag239.
48 (OK_To_Reorder_Components): Delete.
49 (No_Reordering): Declare.
50 (Set_No_Reordering): Likewise.
51 (OK_To_Reorder_Components): Delete.
52 (Set_OK_To_Reorder_Components): Likewise.
53 * einfo.adb (Has_Complex_Representation): Expect record types.
54 (No_Reordering): New function.
55 (OK_To_Reorder_Components): Delete.
56 (Set_Has_Complex_Representation): Expect base record types.
57 (Set_No_Reordering): New procedure.
58 (Set_OK_To_Reorder_Components): Delete.
59 (Write_Entity_Flags): Adjust to above change.
60 * fe.h (Debug_Flag_Dot_R): New macro and declaration.
61 * freeze.adb (Freeze_Record_Type): Remove conditional code setting
62 OK_To_Reorder_Components on record types with convention Ada.
63 * lib-writ.adb (Write_ALI): Deal with NC marker.
64 * opt.ads (No_Component_Reordering): New flag.
65 (No_Component_Reordering_Config): Likewise.
66 (Config_Switches_Type): Add No_Component_Reordering component.
67 * opt.adb (Register_Opt_Config_Switches): Copy
68 No_Component_Reordering onto No_Component_Reordering_Config.
69 (Restore_Opt_Config_Switches): Restore No_Component_Reordering.
70 (Save_Opt_Config_Switches): Save No_Component_Reordering.
71 (Set_Opt_Config_Switches): Set No_Component_Reordering.
72 * par-prag.adb (Prag): Deal with Pragma_No_Component_Reordering.
73 * sem_ch3.adb (Analyze_Private_Extension_Declaration): Also set the
74 No_Reordering flag from the default.
75 (Build_Derived_Private_Type): Likewise.
76 (Build_Derived_Record_Type): Likewise. Then inherit it
77 for untagged types and clean up handling of similar flags.
78 (Record_Type_Declaration): Likewise.
79 * sem_ch13.adb (Same_Representation): Deal with No_Reordering and
80 remove redundant test on Is_Tagged_Type.
81 * sem_prag.adb (Analyze_Pragma): Handle No_Component_Reordering.
82 (Sig_Flags): Likewise.
83 * snames.ads-tmpl (Name_No_Component_Reordering): New name.
84 (Pragma_Id): Add Pragma_No_Component_Reordering value.
85 * warnsw.adb (Set_GNAT_Mode_Warnings): Enable -gnatw.q as well.
86 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>:
87 Copy the layout of the parent type only if the No_Reordering
88 settings match.
89 (components_to_record): Reorder record types with
90 convention Ada by default unless No_Reordering is set or -gnatd.r
91 is specified and do not warn if No_Reordering is set in GNAT mode.
92
93 2017-09-06 Ed Schonberg <schonberg@adacore.com>
94
95 * sem_util.ads, sem_util.adb (Check_Previous_Null_Procedure):
96 new predicate to reject declarations that can be completions,
97 when there is a visible prior homograph that is a null procedure.
98 * sem_ch6.adb (Analyze_Null_Procedure): use it.
99 * sem_ch8.adb (Analyze_Subprogram_Renaming): ditto.
100
101 2017-09-06 Thomas Quinot <quinot@adacore.com>
102
103 * s-regpat.adb (Compile.Parse_Literal): Fix handling of literal
104 run of 253 characters or more.
105
106 2017-09-06 Ed Schonberg <schonberg@adacore.com>
107
108 * einfo.adb (Designated_Type): Use Is_Incomplete_Type to handle
109 properly incomplete subtypes that may be created by explicit or
110 implicit declarations.
111 (Is_Base_Type): Take E_Incomplete_Subtype into account.
112 (Subtype_Kind): Ditto.
113 * sem_ch3.adb (Build_Discriminated_Subtype): Set properly the
114 Ekind of a subtype of a discriminated incomplete type.
115 (Fixup_Bad_Constraint): Use Subtype_Kind in all cases, including
116 incomplete types, to preserve error reporting.
117 (Process_Incomplete_Dependents): Do not create a subtype
118 declaration for an incomplete subtype that is created internally.
119 * sem_ch7.adb (Analyze_Package_Specification): Handle properly
120 incomplete subtypes that do not require a completion, either
121 because they are limited views, of they are generic actuals.
122
123 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
124
125 * checks.adb (Insert_Valid_Check): Remove the
126 suspicious manipulation of the Do_Range_Check flag as ths is
127 no linger needed. Suppress validity check when analysing the
128 validation variable.
129
130 2017-09-06 Philippe Gil <gil@adacore.com>
131
132 * g-debpoo.adb: adapt GNAT.Debug_Pools to allow safe thread
133 GNATCOLL.Memory
134
135 2017-09-06 Bob Duff <duff@adacore.com>
136
137 * sem_elim.adb: Minor comment fix.
138
139 2017-09-06 Ed Schonberg <schonberg@adacore.com>
140
141 * sem_util.adb (Is_Object_Reference): A function call is an
142 object reference, and thus attribute references for attributes
143 that are functions (such as Pred and Succ) as well as predefined
144 operators are legal in contexts that require an object, such as
145 the prefix of attribute Img and the Ada2020 version of 'Image.
146
147 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
148
149 * exp_util.adb, einfo.adb, sem_attr.adb, exp_ch4.adb, gnatls.adb,
150 exp_ch3.adb, xoscons.adb: Minor reformatting.
151
152 2017-09-06 Raphael Amiard <amiard@adacore.com>
153
154 * a-chtgop.ads, a-chtgop.adb: Add versions of First and Next with
155 Position parameter. If supplied, use it to provide efficient iteration.
156 * a-cohase.ads, a-cohase.adb, a-cihama.ads, a-cihama.adb,
157 a-cohama.ads, a-cohama.adb: Add/Use Position to provide efficient
158 iteration.
159
160 2017-09-06 Ed Schonberg <schonberg@adacore.com>
161
162 * exp_util.adb (Build_Allocate_Deallocate_Proc): If the
163 designated type is class-wide and the expression is an unchecked
164 conversion, preserve the conversion when checking the tag of the
165 designated object, to prevent spurious semantic errors when the
166 expression in the conversion has an untagged type (for example
167 an address attribute).
168
169 2017-09-06 Ed Schonberg <schonberg@adacore.com>
170
171 * sem_res.adb (Resolve_Entry_Call): Check whether a protected
172 operation is subject to a pragma Eliminate.
173
174 2017-09-06 Ed Schonberg <schonberg@adacore.com>
175
176 * sem_elim.ads, exp_ch4.adb: Minor reformatting.
177
178 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
179
180 * fe.h (Eliminate_Error_Msg): Remove.
181
182
183 2017-09-05 Richard Sandiford <richard.sandiford@linaro.org>
184
185 * gcc-interface/utils.c (make_packable_type): Update call to
186 mode_for_size_tree.
187
188 2017-09-05 Richard Sandiford <richard.sandiford@linaro.org>
189
190 * gcc-interface/utils2.c (build_load_modify_store):
191 Use int_mode_for_size.
192
193 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
194
195 PR ada/62235
196 * gcc-interface/decl.c (gnat_to_gnu_entity): Skip regular processing
197 for Itypes that are E_Record_Subtype with a cloned subtype.
198 <E_Record_Subtype>: Use the DECL of the cloned type directly, if any.
199
200 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
201
202 * gcc-interface/trans.c (convert_with_check): Use a custom base type
203 if the base type of the expression has a different machine mode.
204 Rename a couple of parameters and local variable.
205
206 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
207
208 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Address>: Do not strip
209 conversions around prefixes that are not references.
210
211 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
212
213 * gcc-interface/utils.c (unchecked_convert): When the result type is a
214 non-biased integral type with size 0, set the result to 0 directly.
215
216 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
217
218 * gcc-interface/gigi.h (renaming_from_generic_instantiation_p): Turn to
219 (renaming_from_instantiation_p): ...this.
220 * gcc-interface/decl.c (gnat_to_gnu_entity): Use inline predicate
221 instead of explicit tests on kind of entities. Adjust for renaming.
222 (gnat_to_gnu_profile_type): Likewise.
223 (gnat_to_gnu_subprog_type): Likewise.
224 * gcc-interface/trans.c (Identifier_to_gnu): Likewise.
225 (Case_Statement_to_gnu): Likewise.
226 (gnat_to_gnu): Likewise.
227 (process_freeze_entity): Likewise.
228 (process_type): Likewise.
229 (add_stmt_with_node): Adjust for renaming.
230 * gcc-interface/utils.c (gnat_pushdecl): Adjust for renaming.
231 (renaming_from_generic_instantiation_p): Rename to...
232 (renaming_from_instantiation_p): ...this. Use inline predicate.
233 (pad_type_hasher::keep_cache_entry): Fold.
234
235 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
236
237 * gcc-interface/trans.c (adjust_for_implicit_deref): New function.
238 (gnat_to_gnu) <N_Explicit_Dereference>: Translate result type first.
239 (N_Indexed_Component): Invoke adjust_for_implicit_deref on the prefix.
240 (N_Slice): Likewise.
241 (N_Selected_Component): Likewise. Do not try again to translate it.
242 (N_Free_Statement): Invoke adjust_for_implicit_deref on the expression.
243
244 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
245
246 * repinfo.ads: Document new treatment of dynamic values.
247 (TCode): Bump upper bound to 29.
248 (Dynamic_Val): New constant set to 29.
249 * repinfo.adb (Print_Expr) <Dynamic_Val>: New case.
250 (Rep_Value) <Dynamic_Val>: Likewise.
251 * repinfo.h (Dynamic_Val): New macro.
252 * gcc-interface/decl.c (annotate_value): Tidy up and cache result for
253 DECL_P nodes too.
254 <INTEGER_CST>: Set TCODE instead of recursing.
255 <COMPONENT_REF>: Set TCODE instead of calling Create_Node manually.
256 <VAR_DECL>: New case.
257 <MULT_EXPR, PLUS_EXPR>: Fold conversions into inner operations.
258 <BIT_AND_EXPR>: Adjust.
259 <CALL_EXPR>: Do not fall through.
260
261 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
262
263 * gcc-interface/trans.c (Call_to_gnu): If this is a function call and
264 there is no target, do not create a temporary for the return value for
265 an allocator either.
266
267 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
268
269 * gcc-interface/trans.c (pos_to_constructor): Skip conversions to an
270 unconstrained array type.
271
272 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
273 Alan Hayward <alan.hayward@arm.com>
274 David Sherwood <david.sherwood@arm.com>
275
276 * gcc-interface/decl.c (validate_size): Use NARROWEST_INT_MODE
277 instead of GET_CLASS_NARROWEST_MODE (MODE_INT).
278
279 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
280 Alan Hayward <alan.hayward@arm.com>
281 David Sherwood <david.sherwood@arm.com>
282
283 * gcc-interface/decl.c (check_ok_for_atomic_type): Use
284 is_a <scalar_int_mode>.
285 * gcc-interface/trans.c (Pragma_to_gnu): Likewise.
286 * gcc-interface/utils.c (gnat_type_for_mode): Likewise.
287
288 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
289 Alan Hayward <alan.hayward@arm.com>
290 David Sherwood <david.sherwood@arm.com>
291
292 * gcc-interface/decl.c (gnat_to_gnu_entity): Use int_mode_for_size
293 instead of mode_for_size.
294 (gnat_to_gnu_subprog_type): Likewise.
295 * gcc-interface/utils.c (make_type_from_size): Likewise.
296
297 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
298 Alan Hayward <alan.hayward@arm.com>
299 David Sherwood <david.sherwood@arm.com>
300
301 * gcc-interface/misc.c (fp_prec_to_size): Use opt_scalar_float_mode.
302 (fp_size_to_prec): Likewise.
303
304 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
305 Alan Hayward <alan.hayward@arm.com>
306 David Sherwood <david.sherwood@arm.com>
307
308 * gcc-interface/utils.c (gnat_type_for_mode): Use is_a
309 <scalar_float_mode> instead of SCALAR_FLOAT_MODE_P.
310
311 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
312 Alan Hayward <alan.hayward@arm.com>
313 David Sherwood <david.sherwood@arm.com>
314
315 * gcc-interface/decl.c (validate_size): Update use of
316 GET_MODE_WIDER_MODE, forcing a wider mode to exist.
317
318 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
319 Alan Hayward <alan.hayward@arm.com>
320 David Sherwood <david.sherwood@arm.com>
321
322 * gcc-interface/misc.c (fp_prec_to_size): Use new mode iterators.
323 (fp_size_to_prec): Likewise.
324
325 2017-08-29 Martin Liska <mliska@suse.cz>
326
327 PR other/39851
328 * gcc-interface/trans.c (Pragma_to_gnu): Set argument to NULL.
329
330 2017-08-08 Martin Liska <mliska@suse.cz>
331
332 * gcc-interface/trans.c: Include header files.
333
334 2017-07-29 Jakub Jelinek <jakub@redhat.com>
335
336 * gcc-interface/utils.c (gnat_write_global_declarations): Pass false
337 as new argument to the imported_module_or_decl debug hook.
338
339 2017-07-25 Javier Miranda <miranda@adacore.com>
340
341 * checks.adb (Apply_Divide_Checks): Ensure that operands are not
342 evaluated twice.
343
344 2017-07-19 Jakub Jelinek <jakub@redhat.com>
345
346 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE,
347 TYPE_GCC_MIN_VALUE): Use TYPE_MIN_VALUE_RAW instead of TYPE_MINVAL.
348 (TYPE_GCC_MAX_VALUE): Use TYPE_MAX_VALUE_RAW instead of TYPE_MAXVAL.
349
350 2017-07-18 Mike Frysinger <vapier@chromium.org>
351
352 * gcc-interface/Makefile.in (../../gnatmake$(exeext)): Delete $(P).
353 (../../gnatlink$(exeext)): Likewise.
354
355 2017-07-15 John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
356
357 PR ada/81446
358 * system-linux-m68k.ads: Add pragma No_Elaboration_Code_All.
359 (Backend_Overflow_Checks): Set to True.
360
361 2017-06-23 Jakub Jelinek <jakub@redhat.com>
362
363 * gcc-interface/trans.c (gnat_to_gnu): Initialize sync to false.
364
365 2017-06-21 Pierre-Marie de Rodat <derodat@adacore.com>
366
367 * gcc-interface/ada-tree.h (DECL_FUNCTION_IS_DEF): Update copyright
368 notice. New macro.
369 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Tag the subprogram
370 as a definition.
371 (Compilation_Unit_to_gnu): Tag the elaboration procedure as a
372 definition.
373 * gcc-interface/decl.c (gnat_to_gnu_entity): Tag declarations of
374 imported subprograms for the current compilation unit as
375 definitions. Disable debug info for references to variables.
376 * gcc-interface/gigi.h (create_subprog_decl): Update declaration.
377 * gcc-interface/utils.c (gnat_pushdecl): Add external DECLs that are
378 not built-in functions to their binding scope.
379 (create_subprog_decl): Add a DEFINITION parameter. If it is true, tag
380 the function as a definition. Update all callers.
381 (gnat_write_global_declarations): Emit debug info for imported
382 functions. Filter out external variables for which debug info
383 is disabled.
384
385 2017-06-15 Nicolas Boulenguez <nicolas.boulenguez@free.fr>
386
387 PR ada/81105
388 * gcc-interface/Makefile.in (x86 kfreebsd): Adjust system.ads setting.
389 (i[3456]86-pc-gnu): Likewise.
390 (x86_64 kfreebsd): Likewise.
391
392 2017-06-12 Eric Botcazou <ebotcazou@adacore.com>
393
394 PR bootstrap/80897
395 * exp_ch3.adb (Make_Predefined_Primitive_Specs): Use Positive index.
396
397 2017-06-12 Eric Botcazou <ebotcazou@adacore.com>
398
399 PR ada/81070
400 * s-interr-hwint.adb: Reinstate.
401 * gcc-interface/Makefile.in (RTEMS): Use it again.
402
403 2017-06-08 Olivier Hainque <hainque@adacore.com>
404
405 * vx_crtbegin_auto.c: Update year in copyright notice.
406 * vx_crtbegin.c: Likewise.
407 * vx_crtbegin.inc: Likewise.
408 * vx_crtend.c: Likewise.
409
410 2017-06-07 Sebastian Huber <sebastian.huber@embedded-brains.de>
411
412 * Makefile.in (rtems): Use TLS implementation for s-tpopsp.adb.
413 * s-tpopsp-rtems.adb: Delete.
414
415 2017-06-02 Olivier Hainque <hainque@adacore.com>
416
417 * vx_crtbegin_auto.c: New file.
418 * vx_crtbegin.c: New file.
419 * vx_crtbegin.inc: New file.
420 * vx_crtend.c: New file.
421
422 2017-05-25 Jonathan Wakely <jwakely@redhat.com>
423
424 * gcc-interface/utils2.c (compare_elmt_bitpos): Remove redundant
425 const qualifiers that cause -Wignored-qualifiers warnings.
426
427 2017-05-22 Eric Botcazou <ebotcazou@adacore.com>
428
429 * gcc-interface/decl.c (gnat_to_gnu_entity): Skip regular processing
430 for Itypes that are E_Access_Subtype.
431 <E_Access_Subtype>: Use the DECL of the base type directly.
432
433 2017-05-22 Ed Schonberg <schonberg@adacore.com>
434 Eric Botcazou <ebotcazou@adacore.com>
435
436 * sem_ch4.adb (Analyze_Call): In Ada2012 an incomplete type from a
437 limited view may appear in the profile of a function, and a call to
438 that function in another unit in which the full view is available must
439 use this full view to spurious type errors at the point of call.
440 * inline.adb (Analyze_Inlined_Bodies): Remove restriction on loading
441 of parent body with a with clause for the main unit.
442 * gcc-interface/decl.c (defer_limited_with_list): Document new usage.
443 (gnat_to_gnu_entity) <E_Access_Type>: Handle completed Taft Amendment
444 types declared in external units like types from limited with clauses.
445 Adjust final processing of defer_limited_with_list accordingly.
446 * gcc-interface/trans.c (gnat_to_gnu) < N_Selected_Component>: Try
447 again to translate the prefix after the field if it is incomplete.
448
449 2017-05-22 Eric Botcazou <ebotcazou@adacore.com>
450
451 * gcc-interface/decl.c (gnat_to_gnu_field): Do not enforce strict
452 alignment for simple volatile fields and remove associated errors.
453
454 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
455
456 * gcc-interface/gigi.h (get_elaboration_procedure): Delete.
457 * gcc-interface/trans.c (get_elaboration_procedure): Make static.
458
459 2017-05-15 Pierre-Marie de Rodat <derodat@adacore.com>
460
461 * gcc-interface/utils.c (can_materialize_object_renaming_p):
462 Synchronize with GNAT's Exp_Dbug.Debug_Renaming_Declaration:
463 process Original_Node instead of expanded names.
464
465 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
466
467 * gcc-interface/trans.c (return_value_ok_for_nrv_p): Only apply the
468 addressability check in the constrained case.
469
470 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
471
472 * gcc-interface/trans.c (Identifier_to_gnu): Also accept incomplete
473 types not coming from a limited context.
474
475 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
476
477 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Skip subprograms on
478 the inlined list that are not public.
479 * gcc-interface/utils.c (create_subprog_decl): Clear TREE_PUBLIC if
480 there is a pragma Inline_Always on the subprogram.
481
482 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
483
484 * gcc-interface/trans.c (gnat_to_gnu) <N_Aggregate>: Fix formatting.
485 <N_Allocator>: Use properly typed constants.
486 (extract_values): Move around.
487 (pos_to_constructor): Minor tweaks.
488 (Sloc_to_locus): Fix formatting.
489 * gcc-interface/utils.c (process_deferred_decl_context): Minor tweaks.
490 * gcc-interface/gigi.h (MARK_VISITED): Remove blank line.
491 (Gigi_Equivalent_Type): Adjust head comment.
492 * gcc-interface/decl.c (Gigi_Equivalent_Type): Likewise.
493
494 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
495
496 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: When there
497 is a representation clause on an extension, propagate the alignment of
498 the parent type only if the platform requires strict alignment.
499
500 2017-05-12 Eric Botcazou <ebotcazou@adacore.com>
501
502 * system-linux-arm.ads (Memory_Size): Use Long_Integer'Size
503 instead of Word_Size.
504
505 Revert
506 2017-03-28 Andreas Schwab <schwab@suse.de>
507
508 PR ada/80117
509 * system-linux-aarch64-ilp32.ads: New file.
510 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS_COMMON): Rename
511 from LIBGNAT_TARGET_PAIRS.
512 (LIBGNAT_TARGET_PAIRS_32, LIBGNAT_TARGET_PAIRS_64): Define.
513 (LIBGNAT_TARGET_PAIRS): Use LIBGNAT_TARGET_PAIRS_COMMON, and
514 LIBGNAT_TARGET_PAIRS_64 or LIBGNAT_TARGET_PAIRS_32 for -mabi=lp64
515 or -mabi=ilp32, resp.
516
517 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
518
519 PR ada/80626
520 * system-linux-x86.ads (Memory_Size): Use Long_Integer'Size
521 instead of Word_Size.
522
523 2017-05-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
524
525 * raise-gcc.c (exception_class_eq): Make ec parameter const.
526
527 2017-05-02 Richard Biener <rguenther@suse.de>
528
529 * gcc-interface/misc.c (gnat_post_options): Do not set
530 -fstrict-overflow.
531
532 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
533
534 * gcc-interface/trans.c (assoc_to_constructor): Make sure
535 Corresponding_Discriminant is only called on discriminants.
536 Skip the saving of the result only for them.
537 (gnat_to_gnu) <N_Selected_Component>: Likewise.
538 <N_Unchecked_Type_Conversion>: Translate the result type first.
539 (gigi): Set TREE_NOTHROW on Begin_Handler.
540 (stmt_list_cannot_raise_p): New predicate.
541 (Exception_Handler_to_gnu_gcc): Emit a simple final call instead of
542 a cleanup if the statements of the handler cannot raise.
543 (process_freeze_entity): Use Is_Record_Type.
544 (process_type): Likewise.
545
546 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
547
548 * einfo.ads (Corresponding_Record_Component): New alias
549 for Node21 used for E_Component and E_Discriminant.
550 * einfo.adb (Corresponding_Record_Component): New function.
551 (Set_Corresponding_Record_Component): New procedure.
552 (Write_Field21_Name): Handle Corresponding_Record_Component.
553 * sem_ch3.adb (Inherit_Component): Set
554 Corresponding_Record_Component for every component in
555 the untagged case. Clear it afterwards for non-girder
556 discriminants.
557 * gcc-interface/decl.c (gnat_to_gnu_entity)
558 <E_Record_Type>: For a derived untagged type with discriminants
559 and constraints, apply the constraints to the layout of the
560 parent type to deduce the layout.
561 (field_is_aliased): Delete.
562 (components_to_record): Test DECL_ALIASED_P directly.
563 (annotate_rep): Check that fields are present except for
564 an extension.
565 (create_field_decl_from): Add DEBUG_INFO_P
566 parameter and pass it in recursive and other calls. Add guard
567 for the manual CSE on the size.
568 (is_stored_discriminant): New predicate.
569 (copy_and_substitute_in_layout): Consider only
570 stored discriminants and check that original fields are present
571 in the old type. Deal with derived types. Adjust call to
572 create_variant_part_from.
573
574 2017-05-02 Ed Schonberg <schonberg@adacore.com>
575
576 * exp_ch6.adb (Expand_Call_Helper): When locating the
577 accessibility entity created for an access parameter, handle
578 properly a reference to a formal of an enclosing subprogram. if
579 the reference appears in an inherited class-wide condition, it
580 is the rewriting of the reference in the ancestor expression,
581 but the accessibility entity must be that of the current formal.
582
583 2017-05-02 Javier Miranda <miranda@adacore.com>
584
585 * exp_ch4.adb (Expand_Non_Binary_Modular_Op): New subprogram.
586 (Expand_N_Op_Add, Expand_N_Op_Divide, Expand_N_Op_Minus,
587 Expand_N_Op_Multiply, Expand_N_Op_Or, Expand_N_Op_Subtract):
588 Call Expand_Non_Binary_Modular_Op.
589
590 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
591
592 * sem_ch3.adb (Build_Derived_Private_Type): If the parent type
593 has discriminants, do not override the Stored_Constraint list of
594 the full view of the derived type with that of the derived type.
595
596 2017-05-02 Bob Duff <duff@adacore.com>
597
598 * sem_attr.adb (Attribute_Enum_Rep): Disallow T'Enum_Rep.
599
600 2017-05-02 Vasiliy Fofanov <fofanov@adacore.com>
601
602 * s-os_lib.ads: Minor typo fix.
603
604 2017-05-02 Vasiliy Fofanov <fofanov@adacore.com>
605
606 * gnatls.adb: Merge and refactor code from Prj.Env and remove
607 this deprecated dependency.
608
609 2017-05-02 Ed Schonberg <schonberg@adacore.com>
610
611 * exp_util.ads: minor comment addition.
612
613 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
614
615 * sem_ch3.adb (Build_Derived_Record_Type): Fix a few typos and
616 pastos in part #3 of the head comment.
617
618 2017-05-02 Ed Schonberg <schonberg@adacore.com>
619
620 * exp_ch3.adb (Freeze_Type): Do not generate an invariant
621 procedure body for a local (sub)type declaration within a
622 predicate function. Invariant checks do not apply to these, and
623 the expansion of the procedure will happen in the wrong scope,
624 leading to misplaced freeze nodes.
625
626 2017-05-02 Ed Schonberg <schonberg@adacore.com>
627
628 * exp_util.adb (Insert_Library_Level_Action): Use proper scope
629 to analyze generated actions. If the main unit is a body,
630 the required scope is that of the corresponding unit declaration.
631
632 2017-05-02 Arnaud Charlet <charlet@adacore.com>
633
634 * einfo.adb (Declaration_Node): flip branches of
635 an IF statement to avoid repeated negations in its condition;
636 no change in semantics, only to improve readability.
637
638 2017-05-02 Arnaud Charlet <charlet@adacore.com>
639
640 * sem_case.adb: Remove extra spaces in parameter declarations.
641
642 2017-05-02 Justin Squirek <squirek@adacore.com>
643
644 * usage.adb: Replace space with hyphen ("run time" -> "run-time")
645 in usage line for new -gnatwE switch.
646
647 2017-05-02 Claire Dross <dross@adacore.com>
648
649 * a-cofuve.ads (Remove): Remove unnecessary
650 conditions in precondition.
651
652 2017-05-02 Vasiliy Fofanov <fofanov@adacore.com>
653
654 * a-stream.ads, exp_imgv.adb, sem_ch10.adb,
655 sem_attr.adb, s-finmas.ads, osint.adb: Minor typo fix.
656
657 2017-05-02 Justin Squirek <squirek@adacore.com>
658
659 * sem_ch4.adb (Analyze_Case_Expression): Add check for valid
660 alternative expression.
661 * sem_res.adb (Resolve_Case_Expression): Ditto.
662
663 2017-05-02 Ed Schonberg <schonberg@adacore.com>
664
665 * exp_disp.adb (Set_All_DT_Position, In_Predef_Prim_DT):
666 Refine predicate for the case where the primitive operation
667 is a renaming of equality. An overriding operation that is
668 a user-defined renaming of predefined equality inherits its
669 slot from the overridden operation. Otherwise it is treated
670 as a predefined op and occupies the same predefined slot as
671 equality. A call to it is transformed into a call to its alias,
672 which is the predefined equality. A dispatching call thus uses
673 the proper slot if operation is further inherited and called
674 with class-wide arguments.
675
676 2017-05-02 Justin Squirek <squirek@adacore.com>
677
678 * errout.adb (Set_Msg_Text): Add a case to switch the message
679 type when the character '[' is detected signifying a warning
680 about a run-time exception.
681 * opt.ads Add a new Warning_Mode value for new switch
682 * switch-b.adb (Scan_Binder_Switches): Add case for the binder
683 to handle new warning mode
684 * usage.adb (Usage): Add usage entry for -gnatwE
685 * warnsw.adb (Set_Warning_Switch): Add case for the new switch
686
687 2017-05-02 Ed Schonberg <schonberg@adacore.com>
688
689 * sem_prag.adb (Process_Conversion): Reject an intrinsic operator
690 declaration that operates on some fixed point type.
691
692 2017-05-02 Justin Squirek <squirek@adacore.com>
693
694 * a-crbtgo.adb, s-taasde.adb: Remove unused use-type clauses.
695
696 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
697
698 * sem_ch6.adb (Analyze_Null_Procedure): Revert previous change.
699
700 2017-05-02 Justin Squirek <squirek@adacore.com>
701
702 * sem_ch4.adb (Analyze_Case_Expression): Add check for valid
703 expression (Analyze_If_Expression): Add check for valid condition
704 * sem_eval.adb (Eval_Case_Expression): Add check for error posted
705 on case-expression
706 * sem_res.adb (Resolve_If_Expression): Add check for valid
707 condition and then-expression.
708
709 2017-05-02 Ed Schonberg <schonberg@adacore.com>
710
711 * exp_ch3.adb (Build_Initialization_Call): Generate a null
712 statement if the initialization call is a null procedure, as
713 can happen with a controlled type with no explicit Initialize
714 procedure, or an array of such.
715 * exp_ch7.adb (Process_Object_Declaration): For a type with
716 controlled components that has a trivial Initialize procedure,
717 insert declaration for finalization counter after object
718 declaration itself.
719 (Make_Deep_Array_Body, Build_Initialize_statements): Do not create
720 finalization block and attendant declarations if component has
721 a trivial Initialize procedure.
722 (Make_Init_Call): Do not generate a call if controlled type has
723 a trivial Initialize procedure.
724
725 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
726
727 * g-forstr.ads (Data): Move Format component last.
728 * g-forstr.adb ("+"): Adjust for above change.
729 * g-rewdat.ads (Buffer): Move Buffer, Current, Pattern and Value last.
730 * g-sechas.ads (Context): Move Key last.
731 * g-socket.ads (Service_Entry_Type): Move Aliases last.
732 * s-fileio.adb (Temp_File_Record): Move Name last.
733 * s-regexp.adb (Regexp_Value): Move Case_Sensitive last.
734 * xr_tabls.ads (Project_File): Move Src_Dir and Obj_Dir last.
735
736 2017-05-02 Jerome Lambourg <lambourg@adacore.com>
737
738 * bindusg.adb, bindgen.adb, gnatbind.adb, opt.ads: Remove the -nognarl
739 switch introduced recently. finally not needed.
740
741 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
742
743 * sem_ch6.adb (Analyze_Null_Procedure): Set the
744 Corresponding_Body link for a null procedure declaration.
745
746 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
747
748 * atree.h (Flag290): Add missing terminating parenthesis.
749 * einfo.adb (Is_Class_Wide_Clone): Use Flag290.
750 (Set_Is_Class_Wide_Clone): Likewise.
751 * einfo.ads (Is_Class_Wide_Clone): Likewise.
752
753 2017-05-02 Gary Dismukes <dismukes@adacore.com>
754
755 * checks.ads (Null_Exclusion_Static_Checks): Add Boolean
756 parameter Array_Comp to indicate the case of an array object
757 with null-excluding components.
758 * checks.adb (Null_Exclusion_Static_Checks):
759 Call Compile_Time_Constraint_Error instead of
760 Apply_Compile_Time_Constraint_Error in the component case. Also
761 call that when Array_Comp is True, with an appropriate warning for
762 the array component case. Only create an explicit initialization
763 by null in the case of an object of a null-excluding access type
764 (and no longer do that in the component case).
765 * sem_ch3.adb (Check_Component): Add a Boolean parameter
766 Array_Comp defaulted to False. Pass Empty for the Comp
767 actual when calling Null_Exclusion_Static_Checks in the case
768 where Comp_Decl matches Object_Decl, because we don't have a
769 component in that case. In the case of an object or component
770 of an array type, pass True for Array_Comp on the recursive call
771 to Check_Component.
772
773 2017-05-02 Bob Duff <duff@adacore.com>
774
775 * s-taprop-linux.adb (Prio_To_Linux_Prio): New function to correctly
776 compute the linux priority from the Ada priority. Call this everywhere
777 required. In particular, the previous version was not doing this
778 computation when setting the ceiling priority in various places. It
779 was just converting to C.int, which results in a ceiling that is off
780 by 1.
781
782 2017-05-02 Ed Schonberg <schonberg@adacore.com>
783
784 * sem_ch3.adb: Comment predicate inheritance.
785
786 2017-05-02 Tristan Gingold <gingold@adacore.com>
787
788 * s-trasym.ads: Add comment.
789
790 2017-05-02 Bob Duff <duff@adacore.com>
791
792 * sem_elab.adb, sem_elab.ads: Minor comment fixes.
793 * sem_ch4.adb: Minor reformatting.
794 * s-taprop-linux.adb, s-taspri-posix.ads: Code refactoring.
795 * s-taspri-posix-noaltstack.ads: Minor refactoring.
796 * sinput.ads: Minor typo fix.
797
798 2017-05-02 Ed Schonberg <schonberg@adacore.com>
799
800 * exp_ch9.adb (Discriminated_Size): Moved to sem_util.
801 * sem_util.ads, sem_util.adb (Discriminated_Size): Predicate moved
802 here from exp_ch9, to recognize objects whose creation requires
803 dynamic allocation, so that the proper warning can be emitted
804 when restriction No_Implicit_Heap_Allocation is in effect.
805 * sem_ch3.adb (Analyze_Object_Declaration): Use Discriminated_Size
806 to emit proper warning when an object that requires dynamic
807 allocation is declared.
808
809 2017-05-02 Tristan Gingold <gingold@adacore.com>
810
811 * s-trasym.ads, s-trasym.adb (Enable_Cache): New.
812
813 2017-05-02 Ed Schonberg <schonberg@adacore.com>
814
815 * sem_ch4.adb (Find_Equality_Types, Try_One_Interp): The same relaxed
816 visibility rules for equality operators that apply within an
817 instantiation apply within an inlined body.
818 * sem_type.adb (Add_One_Interp): ditto.
819
820 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
821
822 * sem_prag.adb (Analyze_Pragma): Forbid pragma Contract_Cases on null
823 procedures.
824
825 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
826
827 * snames.ads-tmpl
828 (Name_Assume, Name_Attribute_Definition, Name_Loop_Optimize,
829 Name_No_Tagged_Streams): Move to regular pragmas. Add
830 placeholders for Default_Scalar_Storage_Order, Dispatching_Domain,
831 and Secondary_Stack_Size.
832 (Pragma_Id): Move Pragma_Assume,
833 Pragma_Attribute_Definition, Pragma_Loop_Optimize and
834 Pragma_No_Tagged_Streams to second part.
835
836 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
837
838 * exp_attr.adb: Minor reformatting.
839
840 2017-05-02 Ed Schonberg <schonberg@adacore.com>
841
842 * sem_ch4.adb (Analyze_Selected_Component): Improve error
843 detection for illegal references to private components or
844 operations of a protected type in the body of the type.
845
846 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
847
848 * opt.ads: Add missing GNAT markers in comments.
849 * opt.adb (Set_Opt_Config_Switches): Do not override earlier
850 settings of Optimize_Alignment at the end.
851
852 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
853
854 * checks.adb (Apply_Constraint_Check): Do not apply
855 a discriminant check when the associated type is a constrained
856 subtype created for an unconstrained nominal type.
857 * exp_attr.adb: Minor reformatting.
858
859 2017-05-02 Bob Duff <duff@adacore.com>
860
861 * sem_ch3.adb (OK_For_Limited_Init_In_05): Handle correctly
862 the N_Raise_Expression case.
863 * sem_ch6.adb (Check_Limited_Return): Minor: clarify comment,
864 and add assertions.
865
866 2017-05-02 Yannick Moy <moy@adacore.com>
867
868 * exp_ch4.adb (Expand_N_Op_Ne): Do not bump parenthese level and
869 optimize length comparison in GNATprove mode.
870 * exp_spark.adb (Expand_SPARK_Op_Ne): New function to rewrite
871 operator /= into negation of operator = when needed.
872 (Expand_SPARK): Call new
873 function to expand operator /=.
874
875 2017-05-02 Ed Schonberg <schonberg@adacore.com>
876
877 * exp_fixd.adb (Expand_Divide_Fixed_By_Fixed_Giving_Fixed):
878 Simplify the expression for a fixed-fixed division to remove
879 divisions by constants whenever possible, as an optimization
880 for restricted targets.
881
882 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
883
884 * checks.adb, sem_ch3.adb, sem_ch6.adb: Minor reformatting.
885
886 2017-05-02 Bob Duff <duff@adacore.com>
887
888 * exp_attr.adb (Callable, Identity, Terminated): Use Find_Prim_Op
889 to find primitive ops, instead of using an Identifier that will
890 later be looked up. This is necessary because these ops are not
891 necessarily visible at all places where we need to call them.
892 * exp_util.ads: Minor comment fix.
893
894 2017-05-02 Ed Schonberg <schonberg@adacore.com>
895
896 * sem_ch6.adb (Fully_Conformant_Expressions): Two entity
897 references are fully conformant if they are both expansions
898 of the discriminant of a protected type, within one of the
899 protected operations. One occurrence may be expanded into a
900 constant declaration while the other is an input parameter to
901 the corresponding generated subprogram.
902
903 2017-05-02 Justin Squirek <squirek@adacore.com>
904
905 * sem_ch3.adb (Check_For_Null_Excluding_Components): Created for
906 recursivly searching composite-types for null-excluding access
907 types and verifying them.
908 (Analyze_Object_Declaration): Add a
909 call to Check_Null_Excluding_Components for static verification
910 of non-initialized objects.
911 * checks.adb, checks.ads (Null_Exclusion_Static_Checks): Added
912 a parameter for a composite-type's component and an extra case
913 for printing component information.
914
915 2017-05-02 Yannick Moy <moy@adacore.com>
916
917 * sem_ch10.adb (Analyze_Subunit): Take
918 configuration pragma into account when restoring appropriate
919 pragma for analysis of subunit.
920
921 2017-05-02 Justin Squirek <squirek@adacore.com>
922
923 * s-tasren.adb, s-tasini.adb, s-taprop-linux.adb,
924 s-mudido-affinity.adb,, a-exetim-posix.adb, a-direio.adb,
925 g-socket.adb, s-taenca.adb, s-fileio.adb: Remove unused use-type
926 clauses from the runtime.
927
928 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
929
930 * freeze.adb (Check_Component_Storage_Order): Do not treat bit-packed
931 array components specially.
932
933 2017-05-02 Ed Schonberg <schonberg@adacore.com>
934
935 * sem_ch8.adb (Premature_Usage): If the premature usage of
936 an entity is as the expression in its own object decaration,
937 rewrite the reference as Any_Id to prevent cascaded errors or
938 compiler loops when such an entity is used in an address clause.
939
940 2017-05-01 Eric Botcazou <ebotcazou@adacore.com>
941
942 * gcc-interface/decl.c (components_to_record): Add missing guard.
943
944 2017-05-01 Eric Botcazou <ebotcazou@adacore.com>
945
946 * gcc-interface/decl.c (components_to_record): Add more comments.
947 Put back pending fields onto the regular list if the misalignment
948 happens to cancel itself.
949
950 2017-04-28 Ed Schonberg <schonberg@adacore.com>
951
952 * sem_ch4.adb (Complete_Object_Operation): When rewriting the
953 controlling actual in a prefixed call, preserve the original node
954 information if the prefix itself has been rewritten, for ASIS use.
955
956 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
957
958 * exp_ch6.adb (Insert_Post_Call_Actions):
959 Code clean up. Insert the post-call actions after an enclosing
960 procedure call when N denotes a function call and appears as an
961 actual parameter in the procedure call.
962
963 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
964
965 * freeze.adb (Check_Component_Storage_Order): If there is a clause
966 for the component, also reject the attribute if the component
967 doesn't end on a byte boundary and its scalar storage order is
968 different from that of the enclosing record type.
969
970 2017-04-28 Javier Miranda <miranda@adacore.com>
971
972 * atree.ads (Info_Messages): Removed.
973 (Warning_Info_Messages): New counter.
974 (Report_Info_Messages): New counter.
975 * err_vars.ads Update documentation.
976 * errout.adb (Delete_Warning_And_Continuations): Update
977 Info_Message occurrences.
978 (Error_Msg_Internal): Update Info_Message occurrences.
979 (Delete_Warning): Update Info_Message occurrences.
980 (Write_Error_Summary): Update Info_Message occurrences.
981 (Output_Messages): Update Info_Message occurrences.
982 (To_Be_Removed): Update Info_Message occurrences.
983 (Reset_Warnings): Update Info_Message occurrences.
984 * errutil.adb (Error_Msg): Update Info_Message occurrences.
985 (Finalize): Update Info_Message occurrences.
986 (Initialize): Update Info_Message occurrences.
987 * erroutc.adb (Delete_Msg): Update Info_Message occurrences.
988 (Compilation_Errors): Update Info_Message_Occurences.
989
990 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
991
992 * exp_ch3.adb (Build_Init_Statements): Likewise on Nam.
993 * freeze.adb (Check_Component_Storage_Order): And on Comp_Byte_Aligned.
994 * sem_aggr.adb (Resolve_Record_Aggregate): Initialize Box_Node.
995 * sem_attr.adb (Loop_Entry): Initialize Encl_Loop.
996 * sem_ch12.adb (Build_Operator_Wrapper): Add pragma Warnings on Expr.
997 * sem_ch13.adb (Validate_Address_Clauses): Initialize Y_Alignment and
998 Y_Size.
999 * sem_eval.adb (Why_Not_Static): Initialize Typ.
1000 * sem_prag.adb (Analyze_Pragma): Add pragma Warnings on Str.
1001
1002 2017-04-28 Bob Duff <duff@adacore.com>
1003
1004 * sem_util.ads, sem_util.adb (Might_Raise): New function
1005 that replaces Is_Exception_Safe, but has the opposite
1006 sense. Is_Exception_Safe was missing various cases -- calls inside
1007 a pragma Debug, calls inside an 'if' or assignment statement,
1008 etc. Might_Raise now walks the entire subtree looking for things
1009 that can raise.
1010 * exp_ch9.adb (Is_Exception_Safe): Remove.
1011 (Build_Protected_Subprogram_Body): Replace call to
1012 Is_Exception_Safe with "not Might_Raise". Misc cleanup (use
1013 constants where possible).
1014 * exp_ch7.adb: Rename Is_Protected_Body -->
1015 Is_Protected_Subp_Body. A protected_body is something different
1016 in the grammar.
1017
1018 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
1019
1020 * inline.adb (Expand_Inlined_Call): Initialize Targ1 variable.
1021 * par-ch3.adb (P_Component_Items): Initialize Decl_Node variable.
1022 (P_Discrete_Choice_List): Initialize Expr_Node variable.
1023 * par-ch9.adb (P_Task): Initialize Aspect_Sloc variable.
1024 (P_Protected): Likewise.
1025 * sem_case.adb (Check_Duplicates):
1026 Add pragma Warnings on variable.
1027 * sem_ch12.adb (Preanalyze_Actuals): Initialize Vis variable.
1028 * sem_ch4.adb (List_Operand_Interps): Add pragma Warnings on variable.
1029 * sem_ch5.adb (Analyze_Assignment): Initialize Save_Full_Analysis.
1030 (Analyze_Exit_Statement): Initialize Scope_Id variable.
1031 (Analyze_Iterator_Specification): Initialize Bas variable.
1032 * sem_ch9.adb (Allows_Lock_Free_Implementation): Initialize
1033 Error_Count (Satisfies_Lock_Free_Requirements): Likewise.
1034 (Analyze_Accept_Statement): Initialize Task_Nam.
1035
1036 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
1037
1038 * checks.adb (Install_Primitive_Elaboration_Check):
1039 Do not generate an elaboration check if all checks have been
1040 suppressed.
1041
1042 2017-04-28 Ed Schonberg <schonberg@adacore.com>
1043
1044 * sem_ch13.adb (Analyze_Aspect_Specifications, case
1045 Interrupt_Handler and Attach_Handler): Generate reference
1046 to protected operation to prevent spurious warnings about
1047 unreferenced entities. Previous scheme failed with style checks
1048 enabled.
1049
1050 2017-04-28 Ed Schonberg <schonberg@adacore.com>
1051
1052 * sem_prag.adb (Relocate_Pragmas_To_Body): A pragma Warnings
1053 that follows an expression function must not be relocated to
1054 the generated body, because it applies to the code that follows.
1055
1056 2017-04-28 Gary Dismukes <dismukes@adacore.com>
1057
1058 * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object): Test
1059 Relaxed_RM_Semantics to avoid having CodePeer issue errors on
1060 code that might violate the more stringent checking for 'Access
1061 introduced in Ada 2005.
1062
1063 2017-04-28 Arnaud Charlet <charlet@adacore.com>
1064
1065 * a-cforse.adb: minor style fix in comment.
1066
1067 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
1068
1069 * exp_ch9.adb (Build_Lock_Free_Unprotected_Subprogram_Body): Also
1070 initialize Block_Decls variable.
1071 (Expand_Entry_Barrier): Add pragma Warnings on Func_Body variable.
1072 (Build_Dispatching_Requeue): Add pragma Warnings on Op variable.
1073 * exp_disp.adb (Expand_Interface_Actuals): Initialize
1074 Formal_DDT and Actual_DDT variables.
1075 (Expand_Interface_Thunk): Initialize Iface_Formal.
1076 (Make_DT): Initialize Size_Comp.
1077 (Make_Select_Specific_Data_Table): Initialize Decls.
1078 * exp_dist.adb (Add_RACW_Primitive_Declarations_And_Bodies):
1079 Also initialize more RPC_Receiver_* variables.
1080 (Build_To_Any_Function): Initialize Cstr_Formal.
1081 * exp_prag.adb (Expand_Pragma_Contract_Cases): Initialize Msg_Str.
1082
1083 2017-04-28 Ed Schonberg <schonberg@adacore.com>
1084
1085 * sem_ch6.adb (Freeze_Type_Refs): For an interface conversion
1086 node between access types, freeze the designated type as well,
1087 so that dispatch table pointers are created in the proper scope,
1088 and not in the constructed body of the expression function.
1089
1090 2017-04-28 Bob Duff <duff@adacore.com>
1091
1092 * alloc.ads (Nodes_Initial): Go back to previous value. The large
1093 value makes large compilations faster, but small compilations slower.
1094
1095 2017-04-28 Arnaud Charlet <charlet@adacore.com>
1096
1097 * sem_util.adb: minor typos in Is_Child_Or_Sibling.
1098
1099 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
1100
1101 * erroutc.adb (Compilation_Errors): Do not consider info messages
1102 as suitable warnings when warnings must be treated as errors.
1103 * sem_ch7.adb (Analyze_Package_Specification): Do not consider
1104 internally-generated packages when outputting completion
1105 information.
1106 * errout.adb (Output_Messages): Do not consider info messages as
1107 suitable warnings when warnings must be treated as errors.
1108 * errutil.adb (Finalize): Do not consider info messages as
1109 suitable warnings when warnings must be treated as errors.
1110
1111 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
1112
1113 * warnsw.ads: Minor fix for incorrect wording in comment.
1114
1115 2017-04-28 Ed Schonberg <schonberg@adacore.com>
1116
1117 * sem_res.adb (In_Instance_Code): New predicate in
1118 Valid_Conversion, to determine whether a type conversion appears
1119 as (or within) an actual for a formal object. Type conversions
1120 in instances are not rechecked in Valid_Conversion because
1121 visibility changes between generic location andi instance may
1122 lead to spurious errors, but conversions within an actual must be
1123 fully checked, and they are not fully resolved when pre-analyzing
1124 the actuals.
1125
1126 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
1127
1128 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Use
1129 New_Copy_Tree instead of Relocate_Node as any subsequent copies
1130 of the relocated node will have mangled Parent pointers.
1131 * sem_util.adb (Build_NCT_Hash_Tables): Reset both hash
1132 tables used in conjunction with entity and itype replication.
1133 (Visit_Entity): Rewrite the restriction on which entities
1134 require duplication. The restriction now includes all types.
1135
1136 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
1137
1138 * a-cofuse.ads, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfinve.adb,
1139 a-cfinve.ads, a-cforma.adb, a-cforma.ads, a-cofuma.adb, a-cofuma.ads,
1140 a-cfhama.adb, a-cfhama.ads, a-cforse.adb: Minor reformatting and code
1141 cleanups.
1142
1143 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
1144
1145 * exp_util.adb, g-dyntab.adb, par-ch4.adb, sem_util.adb, sem_attr.adb,
1146 gnat1drv.adb, exp_disp.adb, namet.adb, alloc.ads: Minor reformatting.
1147
1148 2017-04-28 Gary Dismukes <dismukes@adacore.com>
1149
1150 * exp_util.adb: Minor reformatting.
1151
1152 2017-04-28 Ed Schonberg <schonberg@adacore.com>
1153
1154 * sem_ch4.adb: Fix copy/pasto.
1155
1156 2017-04-27 Tristan Gingold <gingold@adacore.com>
1157
1158 * gcc-interface/Make-lang.in: Define EH_MECHANISM while building
1159 raise-gcc.c. Fix include search path for raise-gcc.c
1160
1161 2017-04-27 Eric Botcazou <ebotcazou@adacore.com>
1162
1163 * fe.h (Warn_On_Questionable_Layout): Declare.
1164 * warnsw.ads (Warn_On_Record_Holes): Move down.
1165 (Warn_On_Questionable_Layout): New boolean variable.
1166 (Warning_Record): Add Warn_On_Questionable_Layout field.
1167 * warnsw.adb (All_Warnings): Set Warn_On_Questionable_Layout.
1168 (Restore_Warnings): Likewise.
1169 (Save_Warnings): Likewise.
1170 (Set_Dot_Warning_Switch): Handle 'q' and 'Q' letters.
1171 * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust call to
1172 components_to_record.
1173 (gnu_field_to_gnat): New function.
1174 (warn_on_field_placement): Likewise.
1175 (components_to_record): Add GNAT_RECORD_TYPE and remove REORDER
1176 parameters. Rename local variables and adjust recursive call.
1177 Rework final scan of the field list and implement warnings on the
1178 problematic placement of specific sorts of fields.
1179
1180 2017-04-27 Bob Duff <duff@adacore.com>
1181
1182 * errout.adb, exp_aggr.adb, exp_attr.adb, exp_code.adb, fname.adb,
1183 * fname.ads, freeze.adb, inline.adb, lib.adb, lib.ads, lib-list.adb,
1184 * lib-load.adb, lib-writ.adb, par.adb, restrict.adb, rtsfind.adb,
1185 * sem.adb, sem_cat.adb, sem_ch10.adb, sem_ch12.adb, sem_ch3.adb,
1186 * sem_ch4.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb, sem_elab.adb,
1187 * sem_intr.adb, sem_res.adb, sem_util.adb, sem_warn.adb, sprint.adb:
1188 For efficiency, cache results of Is_Internal_File_Name and
1189 Is_Predefined_File_Name in the Units table. This avoids a lot
1190 of repeated text processing.
1191
1192 2017-04-27 Emmanuel Briot <briot@adacore.com>
1193
1194 * g-comlin.adb (Sort_Sections): remove useless test.
1195
1196 2017-04-27 Claire Dross <dross@adacore.com>
1197
1198 * a-cfhase.adb, a-cfhase.ads (=): Generic parameter removed to
1199 allow the use of regular equality over elements in contracts.
1200 (Formal_Model): Ghost package containing model functions that are
1201 used in subprogram contracts.
1202 (Current_To_Last): Removed, model functions should be used instead.
1203 (First_To_Previous): Removed, model functions should be used instead.
1204 (Strict_Equal): Removed, model functions should be used instead.
1205 (No_Overlap): Removed, model functions should be used instead.
1206 (Equivalent_Keys): Functions over cursors are removed. They were
1207 awkward with explicit container parameters.
1208 * a-cforse.adb, a-cforse.ads (=): Generic parameter removed to
1209 allow the use of regular equality over elements in contracts.
1210 (Formal_Model): Ghost package containing model functions that
1211 are used in subprogram contracts.
1212 (Current_To_Last): Removed, model functions should be used instead.
1213 (First_To_Previous): Removed, model functions should be used instead.
1214 (Strict_Equal): Removed, model functions should be used instead.
1215 (No_Overlap): Removed, model functions should be used instead.
1216
1217 2017-04-27 Yannick Moy <moy@adacore.com>
1218
1219 * gnat1drv.adb: Code cleanup.
1220
1221 2017-04-27 Ed Schonberg <schonberg@adacore.com>
1222
1223 * exp_util.adb (Replace_Entity): The prefix of a 'Result
1224 attribute reference in a post- condition is the subprogram to
1225 which the condition applies. If the condition is inherited
1226 by a type extension, the prefix becomes a reference to the
1227 inherited operation, but there is no need to create a wrapper
1228 for this operation, because 'Result is expanded independently
1229 when elaborating the postconditions.
1230
1231 2017-04-27 Bob Duff <duff@adacore.com>
1232
1233 * sinput.adb: Minor code cleanup.
1234 * namet.adb (Append): Create faster versions of
1235 Append(String) and Append(Name_Id) by using slice assignment
1236 instead of loops.
1237 * sem_util.adb (In_Instance): Speed this up by removing
1238 unnecessary tests; Is_Generic_Instance is defined for all
1239 entities.
1240 * sem_util.ads, sem_util.adb (In_Parameter_Specification):
1241 Remove unused function.
1242 * alloc.ads (Nodes_Initial): Use a much larger value, because
1243 the compiler was spending a lot of time copying the nodes table
1244 when it grows. This number was chosen in 1996, so is rather out
1245 of date with current memory sizes. Anyway, it's virtual memory.
1246 Get rid of Orig_Nodes_...; use Node_... instead.
1247 * atree.adb (Lock): Do not release the Nodes tables; it's a
1248 waste of time.
1249 Orig_Nodes_ ==> Nodes_
1250 * nlists.adb: Orig_Nodes_ ==> Nodes_
1251 * g-table.adb: Remove unused "with" clause.
1252 * g-table.ads, table.ads: Remove Big_Table_Type, which should
1253 not be used by clients.
1254 * g-dyntab.adb (Last_Allocated): New function
1255 to encapsulate T.P.Last_Allocated, which I'm thinking of changing.
1256
1257 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1258
1259 * sem_eval.adb (Subtypes_Statically_Compatible): Remove duplicated
1260 check.
1261 (Subtypes_Statically_Match): Remove duplicate check.
1262 * sem_prag.adb (Check_Arg_Is_External_Name): Remove duplicate check.
1263
1264 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1265
1266 * exp_aggr.adb (Replace_Type): Remove the special processing
1267 for selected components.
1268 * exp_attr.adb (Expand_N_Attribute_Reference): Merge the
1269 processing for attributes Fixed_Value and Integer_Value.
1270 * exp_util.adb (Side_Effect_Free): Merge the processing for
1271 qualified expressions, type conversions, and unchecked type
1272 conversions.
1273 * g-comlin.adb (Is_In_Config): Merge the processing for No_Space
1274 and Optional.
1275 * par-ch3.adb (P_Declarative_Items): Merge the processing for
1276 tokens function, not, overriding, and procedure.
1277 * sem_ch6.adb (Fully_Conformant_Expressions): Merge the processing
1278 for qualified expressions, type conversions, and unchecked
1279 type conversions.
1280 * sem_util.adb (Compile_Time_Constraint_Error): Merge the
1281 processing for Ada 83 and instances.
1282 (Object_Access_Level): Merge the processing for indexed components
1283 and selected components.
1284 * uname.adb (Add_Node_Name): Merge the processing for stubs.
1285
1286 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1287
1288 * checks.adb (Install_Primitive_Elaboration_Check):
1289 Do not generate the check when restriction No_Elaboration_Code
1290 is in effect.
1291
1292 2017-04-27 Ed Schonberg <schonberg@adacore.com>
1293
1294 * exp_disp.adb (Build_Class_Wide_Check): New subsidiary
1295 of Expand_Dispatching_Call. If the denoted subprogram has a
1296 class-wide precondition, this is the only precondition that
1297 applies to the call, rather that the class-wide preconditions
1298 that may apply to the body that is executed. (This is specified
1299 in AI12-0195).
1300
1301 2017-04-27 Yannick Moy <moy@adacore.com>
1302
1303 * gnat1drv.adb (Adjust_Global_Switches): Issue
1304 a warning in GNATprove mode if the runtime library does not
1305 support IEEE-754 floats.
1306
1307 2017-04-27 Ed Schonberg <schonberg@adacore.com>
1308
1309 * sem_prag.adb (Inherit_Class_Wide_Pre): If the parent operation
1310 is itself inherited it does not carry any contract information,
1311 so examine its parent operation which is its Alias.
1312
1313 2017-04-27 Ed Schonberg <schonberg@adacore.com>
1314
1315 * sem_attr.adb (Analyze_Attribute, case 'Image): In Ada2012 the
1316 prefix can be an object reference in which case Obj'Image (X)
1317 can only be interpreted as an indexing of the parameterless
1318 version of the attribute.
1319 * par-ch4.adb (P_Name): An attribute reference can be the prefix of
1320 an indexing or a slice operation if the attribute does not require
1321 parameters. In Ada2012 'Image also belongs in this category,
1322 and A'Image (lo .. hi) is legal and must be parsed as a slice.
1323
1324 2017-04-27 Yannick Moy <moy@adacore.com>
1325
1326 * exp_ch4.adb: Minor reformatting.
1327 * gnat1drv.adb (Adjust_Global_Switches): When in GNATprove mode,
1328 disable the CodePeer and C generation modes. Similar to the
1329 opposite actions done in CodePeer mode.
1330
1331 2017-04-27 Yannick Moy <moy@adacore.com>
1332
1333 * sem_res.adb: Remove duplicate code.
1334 * sem_attr.adb: Delete duplicate code.
1335
1336 2017-04-27 Bob Duff <duff@adacore.com>
1337
1338 * g-dyntab.adb: Reduce the amount of copying in
1339 Release. No need to copy items past Last.
1340
1341 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1342
1343 * checks.adb Add with and use clauses for Sem_Disp.
1344 (Install_Primitive_Elaboration_Check): New routine.
1345 * checks.ads (Install_Primitive_Elaboration_Check): New routine.
1346 * exp_attr.adb (Expand_N_Attribute_Reference): Clean up the
1347 processing of 'Elaborated.
1348 * exp_ch6.adb (Expand_N_Subprogram_Body): Install a primitive
1349 elaboration check.
1350
1351 2017-04-27 Bob Duff <duff@adacore.com>
1352
1353 * g-dyntab.ads, g-dyntab.adb, g-table.ads: Remove incorrect assertion.
1354 If the table grows and then shrinks back to empty, we won't necessarily
1355 point back to the empty array. Code cleanups.
1356 * sinput.ads: Add 'Base to Size clause to match the declared
1357 component subtypes.
1358
1359 2017-04-27 Claire Dross <dross@adacore.com>
1360
1361 * a-cforma.adb, a-cforma.ads (=): Generic parameter removed to
1362 allow the use of regular equality over elements in contracts.
1363 (Formal_Model): Ghost package containing model functions that
1364 are used in subprogram contracts.
1365 (Current_To_Last): Removed, model functions should be used instead.
1366 (First_To_Previous): Removed, model functions should be used instead.
1367 (Strict_Equal): Removed, model functions should be used instead.
1368 (No_Overlap): Removed, model functions should be used instead.
1369 * a-cofuma.adb, a-cofuma.ads (Enable_Handling_Of_Equivalence)
1370 Boolean generic parameter to disable contracts for equivalence
1371 between keys.
1372 (Witness): Create a witness of a key that is used for handling of
1373 equivalence between keys.
1374 (Has_Witness): Check whether a witness is contained in a map.
1375 (W_Get): Get the element associated to a witness.
1376 (Lift_Equivalent_Keys): Removed, equivalence between keys is handled
1377 directly.
1378 * a-cofuse.adb, a-cofuse.ads (Enable_Handling_Of_Equivalence)
1379 Boolean generic parameter to disable contracts for equivalence
1380 between keys.
1381 * a-cfhama.adb, a-cfhama.ads (Formal_Model.P) Disable handling
1382 of equivalence on functional maps.
1383 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model.P) Disable handling
1384 of equivalence on functional maps.
1385
1386 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1387
1388 * exp_ch9.adb (Expand_Entry_Barrier): Code
1389 cleanup. Do not perform the optimization which removes the
1390 declarations of the discriminant and component renamings when
1391 validity checks on operands and attributes are in effect.
1392
1393 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1394
1395 * exp_spark.adb, exp_util.adb, sem_ch7.adb, g-dyntab.adb, g-dyntab.ads,
1396 freeze.adb, a-cfinve.ads, a-cofuma.adb, a-cofuma.ads, a-cfhama.adb,
1397 a-cfhama.ads, a-cofove.ads: Minor reformatting.
1398
1399 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1400
1401 * g-debpoo.adb (Dump_Gnatmem): Protect against a possible null
1402 pointer dereference.
1403 * g-spipat.adb (Dump): Code clean up. Protect against a possible
1404 null pointer dereference.
1405
1406 2017-04-27 Bob Duff <duff@adacore.com>
1407
1408 * g-dyntab.ads, g-dyntab.adb: Default for Table_Low_Bound.
1409 Rename Empty --> Empty_Table_Ptr, and don't duplicate code for it.
1410 Free renames Init, since they do the same thing.
1411 * g-table.ads: Default for Table_Low_Bound.
1412 * table.ads: Default for Table_Low_Bound, Table_Initial, and
1413 Table_Increment.
1414
1415 2017-04-27 Bob Duff <duff@adacore.com>
1416
1417 * g-dyntab.ads, g-dyntab.adb: Add assertions to subprograms that
1418 can reallocate.
1419 * atree.adb, elists.adb, fname-uf.adb, ghost.adb, inline.adb,
1420 * lib.adb, namet.adb, nlists.adb, sem.adb, sinput.adb, stringt.adb:
1421 Reorder code so that above assertions do not fail.
1422 * table.ads: Remove obsolete comment on Locked.
1423
1424 2017-04-27 Claire Dross <dross@adacore.com>
1425
1426 * a-cfdlli.ads: Code cleanup.
1427
1428 2017-04-27 Yannick Moy <moy@adacore.com>
1429
1430 * exp_spark.adb (Expand_SPARK_Freeze_Type): Build a DIC procedure
1431 when needed for proof. (Expand_SPARK): Call the new procedure.
1432 * exp_util.ads Fix typo.
1433
1434 2017-04-27 Gary Dismukes <dismukes@adacore.com>
1435
1436 * a-cofuma.ads, a-cfhama.ads: Minor reformatting, grammar, and typo
1437 fixes.
1438
1439 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1440
1441 * sem_elab.adb Add new type Visited_Element
1442 and update the contents of table Elab_Visited. Various code clean up.
1443 (Check_Elab_Call): Determine whether a prior call to
1444 the same subprogram was already examined within the same context.
1445 (Check_Internal_Call_Continue): Register the subprogram being
1446 called as examined within a particular context. Do not suppress
1447 elaboration warnings.
1448
1449 2017-04-27 Gary Dismukes <dismukes@adacore.com>
1450
1451 * xoscons.adb, osint.ads: Minor reformatting.
1452
1453 2017-04-27 Bob Duff <duff@adacore.com>
1454
1455 * g-dyntab.ads, g-dyntab.adb: Misc cleanup. Rename
1456 Table_Count_Type --> Table_Last_Type, because the name
1457 was confusing (a "count" usually starts at zero). Add
1458 functionality supported or needed by other tables packages
1459 (Move, Release_Threshold).
1460 * g-table.ads, g-table.adb: This is now just a thin wrapper
1461 around g-dyntab.ads/g-dyntab.adb. Add functionality supported
1462 or needed by other tables packages (Save, Restore).
1463 * table.ads, table.adb: This is now just a thin wrapper around
1464 * g-table.ads/g-table.adb.
1465 * namet.h, scos.h, uintp.h: These files are reaching into the
1466 private data of some instances of g-table, whose names changed,
1467 so the above change requires some adjustment here. It now uses
1468 public interfaces.
1469
1470 2017-04-27 Bob Duff <duff@adacore.com>
1471
1472 * namet.adb, namet.ads: Minor: remove unused procedures.
1473
1474 2017-04-27 Eric Botcazou <ebotcazou@adacore.com>
1475
1476 * checks.adb (Apply_Scalar_Range_Check): Initialize Ok variable too.
1477 (Minimize_Eliminate_Overflows): Initialize Llo and Lhi.
1478 Add pragma Warnings on Rtype variable in nested block. *
1479 * exp_ch3.adb (Build_Init_Statements): Initialize VAR_LOC.
1480 * exp_ch4.adb (Expand_Concatenate): Initialize 3 variables.
1481 (Size_In_Storage_Elements): Add pragma Warnings on Res variable.
1482 * exp_ch7.adb (Build_Adjust_Statements): Initialize Bod_Stmts.
1483 (Process_Component_List_For_Finalize): Initialize Counter_Id.
1484 (Build_Finalize_Statements): Initialize Bod_Stmts.
1485 * exp_disp.adb (Expand_Dispatching_Call): Initialize SCIL_Node.
1486
1487 2017-04-27 Claire Dross <dross@adacore.com>
1488
1489 * a-cfhama.adb, a-cfhamai.ads (=): Generic parameter removed to
1490 allow the use of regular equality over elements in contracts.
1491 (Formal_Model): Ghost package containing model functions that are
1492 used in subprogram contracts.
1493 (Current_To_Last): Removed, model
1494 functions should be used instead.
1495 (First_To_Previous): Removed, model functions should be used instead.
1496 (Strict_Equal): Removed, model functions should be used instead.
1497 (No_Overlap): Removed, model functions should be used instead.
1498 (Equivalent_Keys): Functions over cursors are removed. They were
1499 awkward with explicit container parameters.
1500 * a-cofuma.adb, a-cofuma.ads (Lift_Equivalent_Keys): New lemma
1501 (proof only) procedure to help GNATprove when equivalence over
1502 keys is not equality.
1503
1504 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1505
1506 * exp_util.adb, a-cfdlli.adb, a-cfdlli.ads, exp_ch9.adb, g-dyntab.adb,
1507 sem_dim.adb, a-cfinve.adb, a-cfinve.ads, a-cofove.adb, a-cofove.ads:
1508 Minor reformatting and code cleanups.
1509
1510 2017-04-27 Ed Schonberg <schonberg@adacore.com>
1511
1512 * freeze.adb (Build_Inherited_Condition_Pragmas): New procedure,
1513 subsidiary of Check_Inherited_Conditions, to build pragmas for an
1514 operation whose ancestor has classwide pre/postconditions. This
1515 is used both to check the legality of the inheritance in Ada
1516 and in SPARK, and to determine whether a wrapper is needed for
1517 an inherited operation.
1518 * exp_util.adb (Build_Class_Wide_Expression, Replace_Entity):
1519 Improve placement of error message for inherited classwide
1520 conditions that become illegal on type derivation.
1521
1522 2017-04-27 Yannick Moy <moy@adacore.com>
1523
1524 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Set
1525 SPARK_Mode from context on generic package.
1526 * sem_ch7.adb (Analyze_Package_Declaration): Simplify code to remove
1527 useless test.
1528
1529 2017-04-27 Claire Dross <dross@adacore.com>
1530
1531 * a-cofuve.ads (Range_Shifted): Rewrite precondition to avoid
1532 overflows in computations.
1533 * a-cofove.ads (Capacity_Range): Rewrite last bound to avoid
1534 overflows in computations.
1535 (Insert): Rewrite precondition to avoid overflows in computations.
1536 * a-cfinve.ads (Capacity_Range): Rewrite last bound to avoid
1537 overflows in computations.
1538 (Insert): Rewrite precondition to avoid overflows in computations.
1539
1540 2017-04-27 Steve Baird <baird@adacore.com>
1541
1542 * exp_ch9.adb (Expand_N_Asynchronous_Select): Initialize the Cancel
1543 flag when it is declared in order to avoid confusing CodePeer about
1544 the possibility of an uninitialized variable read.
1545
1546 2017-04-27 Ed Schonberg <schonberg@adacore.com>
1547
1548 * sem_dim.adb (Analyze_Dimension_Object_Declaration): There is
1549 no dimensionality error if the subtype of the expression is
1550 identical to the nominal subtype in the declaration, even though
1551 the expression itself may have been constant-folded and lack a
1552 dimension vector.
1553 * sem_dim.ads: Add comments on setting of dimension vectors and
1554 its interaction with node rewritings and side-effect removal.
1555
1556 2017-04-27 Bob Duff <duff@adacore.com>
1557
1558 * debug.adb: Minor comment correction.
1559 * sem_dim.ads: Minor reformatting and typo fixes.
1560
1561 2017-04-27 Bob Duff <duff@adacore.com>
1562
1563 * g-table.adb, g-table.adsa, scos.h: From the C side, access First and
1564 Last of the tables via function calls, rather than relying on layout
1565 of data structures.
1566
1567 2017-04-27 Ed Schonberg <schonberg@adacore.com>
1568
1569 * exp_util.adb: No wrapper in GNATprove mode.
1570
1571 2017-04-27 Yannick Moy <moy@adacore.com>
1572
1573 * sem_res.adb (Resolve_Comparison_Op): Always
1574 evaluate comparisons between values of universal types.
1575
1576 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1577
1578 * sem_elab.adb (Check_Internal_Call_Continue): Do not generate
1579 an elaboration counter nor a check when in GNATprove mode.
1580 * sem_util.adb (Build_Elaboration_Entity): Do not create an
1581 elaboration counter when in GNATprove mode.
1582
1583 2017-04-27 Ed Schonberg <schonberg@adacore.com>
1584
1585 * freeze.adb: copy-paste typo.
1586
1587 2017-04-27 Yannick Moy <moy@adacore.com>
1588
1589 * sem_prag.adb (Analyze_Pre_Post_In_Decl_Part):
1590 Use correct test to detect call in GNATprove mode instead of
1591 compilation.
1592
1593 2017-04-27 Claire Dross <dross@adacore.com>
1594
1595 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model.M_Elements_In_Union):
1596 New property function expressing that the element of a
1597 sequence are contained in the union of two sequences.
1598 (Formal_Model.M_Elements_Included): New property function
1599 expressing that the element of a sequence are another sequence.
1600 (Generic_Sorting): Use new property functions to state that
1601 elements are preserved by Sort and Merge.
1602 * a-cofove.adb, a-cofove.ads (=): Generic parameter removed to
1603 allow the use of regular equality over elements in contracts.
1604 (Formal_Model): Ghost package containing model functions
1605 that are used in subprogram contracts. (Capacity):
1606 On unbounded containers, return the maximal capacity.
1607 (Current_To_Last): Removed, model functions should be used instead.
1608 (First_To_Previous): Removed, model functions should be used instead.
1609 (Append): Default parameter value replaced
1610 by new wrapper to allow more precise contracts.
1611 (Insert): Subprogram restored, it seems it was useful to users even if
1612 it is inefficient.
1613 (Delete): Subprogram restored, it seems it was useful to users even if
1614 it is inefficient.
1615 (Prepend): Subprogram restored, it seems it was useful to users even
1616 if it is inefficient.
1617 (Delete_First): Subprogram restored, it seems it
1618 was useful to users even if it is inefficient. (Delete_Last):
1619 Default parameter value replaced by new wrapper to allow more
1620 precise contracts.
1621 (Generic_Sorting.Merge): Subprogram restored.
1622 * a-cfinve.adb, a-cfinve.ads (=): Generic parameter removed to
1623 allow the use of regular equality over elements in contracts.
1624 (Formal_Model): Ghost package containing model functions
1625 that are used in subprogram contracts. (Capacity):
1626 On unbounded containers, return the maximal capacity.
1627 (Current_To_Last): Removed, model functions should be used
1628 instead.
1629 (First_To_Previous): Removed, model functions should be used instead.
1630 (Append): Default parameter value replaced
1631 by new wrapper to allow more precise contracts.
1632 (Insert): Subprogram restored, it seems it was useful to users even if
1633 it is inefficient.
1634 (Delete): Subprogram restored, it seems it was useful to users even if
1635 it is inefficient.
1636 (Prepend): Subprogram restored, it seems it was useful to users even
1637 if it is inefficient.
1638 (Delete_First): Subprogram restored, it seems it
1639 was useful to users even if it is inefficient. (Delete_Last):
1640 Default parameter value replaced by new wrapper to allow more
1641 precise contracts.
1642 (Generic_Sorting.Merge): Subprogram restored.
1643 (Vector): Do not reuse formal vectors, as it is no longer possible
1644 to supply them with an equality function over elements.
1645
1646 2017-04-27 Bob Duff <duff@adacore.com>
1647
1648 * g-dyntab.adb (Release): When allocating the new
1649 table, use the correct slice of the old table to initialize it.
1650
1651 2017-04-27 Eric Botcazou <ebotcazou@adacore.com>
1652
1653 * einfo.ads: Minor fixes in comments.
1654
1655 2017-04-27 Ed Schonberg <schonberg@adacore.com>
1656
1657 * sem_prag.adb: disable clones in SPARK_Mode.
1658
1659 2017-04-27 Gary Dismukes <dismukes@adacore.com>
1660
1661 * sem_util.ads, contracts.adb: Minor reformatting.
1662
1663 2017-04-27 Ed Schonberg <schonberg@adacore.com>
1664
1665 * sem_util.adb, sem_util.ads (Build_Class_Wide_Clone_Body):
1666 Build body of subprogram that has a class-wide condition that
1667 contains calls to other primitives.
1668 (Build_Class_Wide_Clone_Call); Build a call to the common
1669 class-wide clone of a subprogram with classwide conditions. The
1670 body of the subprogram becomes a wrapper for a call to the
1671 clone. The inherited operation becomes a similar wrapper to which
1672 modified conditions apply, and the call to the clone includes
1673 the proper conversion in a call the parent operation.
1674 (Build_Class_Wide_Clone_Decl (Spec_Id : Entity_Id): For a
1675 subprogram that has a classwide condition that contains calls to
1676 other primitives, build an internal subprogram that is invoked
1677 through a type-specific wrapper for all inherited subprograms
1678 that may have a modified condition.
1679 * sem_prag.adb (Check_References): If subprogram has a classwide
1680 condition, create entity for corresponding clone, to be invoked
1681 through wrapper subprograns.
1682 (Analyze_Pre_Post_Condition_In_Decl_Part): Do not emit error
1683 message about placement if pragma isi internally generated.
1684 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If subprogram has
1685 a classwide clone, build body of clone as copy of original body,
1686 and rewrite original body as a wrapper as a wrapper for a call to
1687 the clone, so that it incorporates the original pre/postconditions
1688 of the subprogram.
1689 * freeze.adb (Check_Inherited_Conditions): For an inherited
1690 subprogram that inherits a classwide condition, build spec and
1691 body of corresponding wrapper so that call to inherited operation
1692 gets the modified conditions.
1693 * contracts.adb (Analyze_Contracts): If analysis of classwide
1694 condition has created a clone for a primitive operation, analyze
1695 declaration of clone.
1696
1697 2017-04-27 Steve Baird <baird@adacore.com>
1698
1699 * exp_util.adb (Build_Allocate_Deallocate_Proc):
1700 Add "Suppress => All_Checks" to avoid generating unnecessary
1701 checks.
1702
1703 2017-04-27 Yannick Moy <moy@adacore.com>
1704
1705 * debug.adb: Reserve debug flag 'm' for no inlining in GNATprove.
1706 * sem_ch6.adb (Anayze_Subprogram_Body_Helper): Skip creation of
1707 inlining body in GNATprove mode when switch -gnatdm used.
1708 * sem_res.adb (Resolve_Call): Skip detection of lack of inlining
1709 in GNATprove mode when switch -gnatdm used.
1710
1711 2017-04-27 Arnaud Charlet <charlet@adacore.com>
1712
1713 * sem_ch13.adb (Analyze_Attribute_Definition_Clause
1714 [Attribute_Address]): Call Set_Address_Taken when ignoring rep
1715 clauses, so that we keep an indication of the address clause
1716 before removing it from the tree.
1717
1718 2017-04-27 Yannick Moy <moy@adacore.com>
1719
1720 * exp_util.ads, exp_util.adb (Evaluate_Name): Force evaluation
1721 of expression being qualified, when not an object name, or else
1722 evaluate the underlying name.
1723
1724 2017-04-27 Jerome Lambourg <lambourg@adacore.com>
1725
1726 * bindusg.adb, bindgen.adb, gnatbind.adb, opt.ads: add -nognarl switch.
1727
1728 2017-04-27 Justin Squirek <squirek@adacore.com>
1729
1730 * exp_ch7.adb (Build_Finalize_Statements): Move Num_Comps to
1731 Process_Component_List_For_Finalization as a local variable.
1732 (Process_Component_For_Finalize): Add an extra parameter to avoid
1733 global references.
1734 (Process_Component_List_For_Finalization): Correct calls to
1735 Process_Component_For_Finalize to take Num_Comps as a parameter.
1736
1737 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1738
1739 * sem_ch8.adb (Find_Direct_Name): Account for the case where
1740 a use-visible entity is defined within a nested scope of an
1741 instance when giving priority to entities which were visible in
1742 the original generic.
1743 * sem_util.ads, sem_util.adb (Nearest_Enclosing_Instance): New routine.
1744
1745 2017-04-27 Tristan Gingold <gingold@adacore.com>
1746
1747 * raise-gcc.c: Don't use unwind.h while compiling
1748 for the frontend, but mimic host behavior.
1749
1750 2017-04-27 Javier Miranda <miranda@adacore.com>
1751
1752 * sem_ch3.adb (Build_Discriminated_Subtype):
1753 Propagate Has_Pragma_Unreferenced_Objects to the built subtype.
1754
1755 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1756
1757 * sem_prag.adb (Analyze_Global_Item):
1758 Do not consider discriminants because they are not "entire
1759 objects". Remove the discriminant-related checks because they are
1760 obsolete.
1761 (Analyze_Input_Output): Do not consider discriminants
1762 because they are not "entire objects".
1763
1764 2017-04-27 Ed Schonberg <schonberg@adacore.com>
1765
1766 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Do not
1767 perform check if the current scope does not come from source,
1768 as is the case for a rewritten task body, because check has
1769 been performed already, and may not be doable because of changed
1770 visibility.
1771
1772 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1773
1774 * a-cofuse.adb, a-cfdlli.adb, a-cofuse.ads, a-cfdlli.ads, a-cofuve.adb,
1775 a-cofuve.ads, a-cofuma.adb, a-cofuma.ads, sem_eval.adb, a-cofuba.adb:
1776 Minor reformatting.
1777
1778 2017-04-27 Ed Schonberg <schonberg@adacore.com>
1779
1780 * sem_ch4.adb (Analyze_Call): If the return type of a function
1781 is incomplete in an context in which the full view is available,
1782 replace the type of the call by the full view, to prevent spurious
1783 type errors.
1784 * exp_disp.adb (Check_Premature_Freezing): Disable check on an
1785 abstract subprogram so that compiler does not reject a parameter
1786 of a primitive operation of a tagged type being frozen, when
1787 the untagged type of that parameter cannot be frozen.
1788
1789 2017-04-27 Bob Duff <duff@adacore.com>
1790
1791 * sem_attr.adb (Compute_Type_Key): Don't walk
1792 representation items for irrelevant types, which could be in a
1793 different source file.
1794
1795 2017-04-27 Steve Baird <baird@adacore.com>
1796
1797 * exp_attr.adb (Expand_N_Attribute_Reference):
1798 Don't expand Image, Wide_Image, Wide_Wide_Image attributes
1799 for CodePeer.
1800
1801 2017-04-27 Yannick Moy <moy@adacore.com>
1802
1803 * exp_unst.ads: Fix typos in comments.
1804
1805 2017-04-27 Ed Schonberg <schonberg@adacore.com>
1806
1807 * sem_eval.adb (Choice_Matches): Handle properly a real literal
1808 whose type has a defined static predicate.
1809
1810 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1811
1812 * exp_ch4.adb (Insert_Dereference_Action):
1813 Do not adjust the address of a controlled object when the
1814 associated access type is subject to pragma No_Heap_Finalization.
1815 Code reformatting.
1816
1817 2017-04-27 Pierre-Marie de Rodat <derodat@adacore.com>
1818
1819 * gcc-interface/utils.c (gnat_type_for_size): Set
1820 TYPE_ARTIFICIAL on created types.
1821
1822 2017-04-27 Claire Dross <dross@adacore.com>
1823
1824 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model): Adapt to
1825 modifications in functional containers.
1826 * a-cofuba.ads, a-cofuma.ads, a-cofuse.ads, a-cofuve.ads Reformat
1827 to improve readablity. Subprograms are separated between basic
1828 operations, constructors and properties. Universally quantified
1829 formulas in contracts are factorized in independant functions
1830 with a name and a comment. Names of parameters are improved.
1831
1832 2017-04-27 Gary Dismukes <dismukes@adacore.com>
1833
1834 * exp_spark.adb, sem_elab.adb: Minor reformatting and typo fix.
1835
1836 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1837
1838 * sem_res.adb (Resolve_Type_Conversion): Do not
1839 install a predicate check here since this is already done during
1840 the expansion phase. Verify whether the operand satisfies the
1841 static predicate (if any) of the target type.
1842 * sem_ch3.adb (Analyze_Object_Declaration): Do
1843 not install a predicate check if the object is initialized by
1844 means of a type conversion because the conversion is subjected
1845 to the same check.
1846
1847 2017-04-27 Tristan Gingold <gingold@adacore.com>
1848
1849 * raise.c (__gnat_builtin_longjmp): Remove.
1850 (__gnat_bracktrace):
1851 Add a dummy definition for the compiler (__gnat_eh_personality,
1852 __gnat_rcheck_04, __gnat_rcheck_10) (__gnat_rcheck_19,
1853 __gnat_rcheck_20, __gnat_rcheck_21) (__gnat_rcheck_30,
1854 __gnat_rcheck_31, __gnat_rcheck_32): Likewise.
1855 * a-exexpr.adb: Renamed from a-exexpr-gcc.adb
1856 * a-except.ads, a-except.adb: Renamed from a-except-2005.ads
1857 and a-except-2005.adb.
1858 * raise-gcc.c: Allow build in compiler, compiled as a C++
1859 file.
1860 (__gnat_Unwind_ForcedUnwind): Adjust prototype.
1861 (db): Constify msg_format.
1862 (get_call_site_action_for): Don't use void arithmetic.
1863 * system.ads (Frontend_Exceptions): Set to False.
1864 (ZCX_By_Default): Set to True.
1865 (GCC_ZC_Support): Set to True.
1866 * gcc-interface/Makefile.in: No more variants for a-exexpr.adb and
1867 a-except.ad[sb].
1868 * gcc-interface/Make-lang.in: Add support for backend zcx exceptions
1869 in gnat1 and gnatbind.
1870 * gnat1, gnatbind: link with raise-gcc.o, a-exctra.o, s-addima.o,
1871 s-excmac.o, s-imgint.o, s-traceb.o, s-trasym.o, s-wchstw.o
1872 * s-excmac.ads, s-excmac.adb: Copy of variants.
1873 * a-except.o: Adjust preequisites.
1874 Add handling of s-excmac-arm.adb and s-excmac-gcc.adb.
1875
1876 2017-04-27 Claire Dross <dross@adacore.com>
1877
1878 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model): Adapt to
1879 modifications in functional containers.
1880 * a-cofuba.ads, a-cofuma.ads, a-cofuse.ads, a-cofuve.ads Reformat
1881 to improve readablity. Subprograms are separated between basic
1882 operations, constructors and properties. Universally quantified
1883 formulas in contracts are factorized in independant functions
1884 with a name and a comment. Names of parameters are improved.
1885
1886 2017-04-27 Gary Dismukes <dismukes@adacore.com>
1887
1888 * exp_spark.adb, sem_elab.adb: Minor reformatting and typo fix.
1889
1890 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1891
1892 * sem_res.adb (Resolve_Type_Conversion): Do not
1893 install a predicate check here since this is already done during
1894 the expansion phase. Verify whether the operand satisfies the
1895 static predicate (if any) of the target type.
1896 * sem_ch3.adb (Analyze_Object_Declaration): Do
1897 not install a predicate check if the object is initialized by
1898 means of a type conversion because the conversion is subjected
1899 to the same check.
1900
1901 2017-04-27 Tristan Gingold <gingold@adacore.com>
1902
1903 * a-except.ads, a-except.adb, a-exexpr.adb: Removed (will be
1904 replaced by their variants).
1905
1906 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1907
1908 * exp_prag.adb, a-cofuse.adb, a-cofuse.ads, einfo.adb, sem_prag.adb,
1909 cstand.adb, par-prag.adb, a-cofuve.adb, a-cofuve.ads, a-cofuma.adb,
1910 a-cofuma.ads, a-cofuba.adb, a-cofuba.ads: Minor reformatting.
1911
1912 2017-04-27 Tristan Gingold <gingold@adacore.com>
1913
1914 * s-excmac-gcc.ads, s-excmac-gcc.adb,
1915 s-excmac-arm.ads, s-excmac-arm.adb (New_Occurrence): Rewrite it in
1916 Ada95.
1917
1918 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1919
1920 * exp_ch7.adb (Establish_Transient_Scope): Rewrite
1921 the loop which detects potential enclosing transient scopes. The
1922 loop now terminates much earlier as transient scopes are bounded
1923 by packages and subprograms.
1924
1925 2017-04-27 Claire Dross <dross@adacore.com>
1926
1927 * a-cfdlli.adb, a-cfdlli.ads (=): Generic parameter removed to
1928 allow the use of regular equality over elements in contracts.
1929 (Cursor): Type is now public so that it can be used in
1930 model functions.
1931 (Formal_Model): Ghost package containing
1932 model functions that are used in subprogram contracts.
1933 (Current_To_Last): Removed, model functions should be used
1934 instead.
1935 (First_To_Previous): Removed, model functions should
1936 be used instead.
1937 (Strict_Equal): Removed, model functions
1938 should be used instead.
1939 (Append): Default parameter value
1940 replaced by new wrapper to allow more precise contracts.
1941 (Insert): Default parameter value replaced by new wrapper to
1942 allow more precise contracts.
1943 (Delete): Default parameter
1944 value replaced by new wrapper to allow more precise contracts.
1945 (Prepend): Default parameter value replaced by new wrapper to
1946 allow more precise contracts.
1947 (Delete_First): Default parameter
1948 value replaced by new wrapper to allow more precise contracts.
1949 (Delete_Last): Default parameter value replaced by new wrapper
1950 to allow more precise contracts.
1951
1952 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1953
1954 * exp_spark.adb (Expand_SPARK): Perform specialized expansion
1955 for object declarations.
1956 (Expand_SPARK_N_Object_Declaration): New routine.
1957 * sem_elab.adb (Check_A_Call): Include calls to the
1958 Default_Initial_Condition procedure of a type under the SPARK
1959 elaboration checks umbrella.
1960
1961 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1962
1963 * sem.adb (Analyze): Diagnose an illegal iterated component
1964 association.
1965 * sem_util.ads, sem_util.adb
1966 (Diagnose_Iterated_Component_Association): New routine.
1967
1968 2017-04-27 Bob Duff <duff@adacore.com>
1969
1970 * adaint.c (__gnat_get_current_dir): Return 0 in length if
1971 getcwd fails.
1972 * a-direct.adb, g-dirope.adb, osint.adb, s-os_lib.adb: Raise
1973 exception if getcwd failed.
1974
1975 2017-04-27 Yannick Moy <moy@adacore.com>
1976
1977 * exp_dbug.adb, exp_dbug.ads (Get_External_Name): Prefix ghost
1978 entities with special prefix.
1979
1980 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1981
1982 * debug.adb Change the documentation of switch -gnatd.s.
1983 * exp_ch7.adb (Make_Transient_Block): Transient blocks do not need
1984 to manage the secondary stack when an enclosing scope already
1985 performs this functionality (aka relaxed management). Switch
1986 -gnatd.s may be used to force strict management in which case
1987 the block will manage the secondary stack unconditionally. Add
1988 a guard to stop the traversal when encountering a package or a
1989 subprogram scope.
1990
1991 2017-04-27 Ed Schonberg <schonberg@adacore.com>
1992
1993 * sem_res.adb (Resolve_Call): Refine further the handling of
1994 limited views of return types in function calls. If the function
1995 that returns a limited view appears in the current unit,
1996 we do not replace its type by the non-limited view because
1997 this transformation is performed int the back-end. However,
1998 the type of the call itself must be the non-limited view, to
1999 prevent spurious resolution errors.
2000
2001 2017-04-27 Ed Schonberg <schonberg@adacore.com>
2002
2003 * einfo,ads, einfo.adb (Class_Wide_Preconds, Class_Wide_Postconds):
2004 Removed, proposed implementation using generics for class-wide
2005 preconditions proved impractical.
2006 (Class_Wide_Clone): New attribute of subprogram. Designates
2007 subprogram created for primitive operations with class-wide
2008 pre/postconditions that contain calls to other primitives. The
2009 clone holds the body of the original primitive, but the
2010 pre/postonditions do not apply to it. The original body is
2011 rewritten as a wrapper for a call to the clone.
2012 (Is_Class_Wide_Clone): New flag to identify a Class_Wide_Clone. If
2013 the flag is set, no code for the corresponding pre/postconditions
2014 is inserted into its body.
2015
2016 2017-04-27 Bob Duff <duff@adacore.com>
2017
2018 * exp_prag.adb, par-prag.adb, sem_ch13.adb: Ignore
2019 Scalar_Storage_Order if -gnatI is given.
2020 * sem_prag.adb (Analyze_Pragma): Ignore
2021 Default_Scalar_Storage_Order if -gnatI is given.
2022
2023 2017-04-27 Claire Dross <dross@adacore.com>
2024
2025 * a-cofuba.ads (Add): Take as an additional input parameter
2026 the position where the element should be inserted.
2027 (Remove): New function that removes an element from the container.
2028 * a-cofuma.ads (Add): Adapt to the new API of Base.Add.
2029 * a-cofuse.ads (Add): Adapt to the new API of Base.Add.
2030 (Remove): New function that removes an element from a set.
2031 * a-cofuve.ads (Add): Adapt to the new API of Base.Add.
2032 (Remove): New function that removes an element from a sequence.
2033 (Insert): New function that adds anywhere in a sequence.
2034
2035 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
2036
2037 * checks.adb (Generate_Range_Check): Revert previous change.
2038
2039 2017-04-27 Gary Dismukes <dismukes@adacore.com>
2040
2041 * sem_util.adb: Minor reformatting/rewording.
2042
2043 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
2044
2045 * lib-xref.adb (Generate_Reference): The use
2046 of attribute 'Result is not considered a violation of pragma
2047 Unreferenced.
2048
2049 2017-04-27 Justin Squirek <squirek@adacore.com>
2050
2051 * cstand.adb (Create_Standard): Correctly set
2052 Directly_Designated_Type for Any_Access.
2053 * sem_type.adb (Covers): Minor grammar fixes.
2054
2055 2017-04-27 Bob Duff <duff@adacore.com>
2056
2057 * sem_attr.adb: Minor cleanup.
2058
2059 2017-04-27 Claire Dross <dross@adacore.com>
2060
2061 * a-cofuba.ads, a-cofuba.adb (Ada.Containers.Functional_Base): New
2062 private child of Ada.Containers used to implement all functional
2063 containers.
2064 * a-cofuma.ads, a-cofuma.adb (Ada.Containers.Functional_Maps): New
2065 child of Ada.Containers. It provides functional indefinite unbounded
2066 maps which can be used as high level models for specification
2067 of data structures.
2068 * a-cofuse.ads, a-cofuse.adb (Ada.Containers.Functional_Sets): New
2069 child of Ada.Containers. It provides functional indefinite unbounded
2070 sets which can be used as high level models for specification
2071 of data structures.
2072 * a-cofuve.ads, a-cofuve.adb (Ada.Containers.Functional_Vectors): New
2073 child of Ada.Containers. It provides functional indefinite unbounded
2074 vectors which can be used as high level models for specification
2075 of data structures.
2076 * Makefile.rtl: Add new packages.
2077 * impunit.adb: Add new packages.
2078
2079 2017-04-27 Gary Dismukes <dismukes@adacore.com>
2080
2081 * sem_ch4.adb: Minor reformatting.
2082
2083 2017-04-27 Ed Schonberg <schonberg@adacore.com>
2084
2085 * sem_ch12.adb (Analyze_Associations): minor reformatting.
2086 (Check_Fixed_Point_Actual): Do not emit a warning on a fixed
2087 point type actual that has user-defined arithmetic primitives,
2088 when there is a previous actual for a formal package that defines
2089 a fixed-point type with the parent user-defined operator.
2090
2091 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
2092
2093 * checks.adb (Generate_Range_Check): Reinstate part of previous change.
2094 * sem_attr.adb (Resolve_Attribute): Generate a range check when
2095 the component type allows range checks.
2096
2097 2017-04-27 Ed Schonberg <schonberg@adacore.com>
2098
2099 * sem_aux.adb (Is_Generic_Formal): Use original node to locate
2100 corresponding declaration, because formal derived types are
2101 rewritten as private extensions.
2102
2103 2017-04-27 Ed Schonberg <schonberg@adacore.com>
2104
2105 * sem_dim.adb (Analyze_Dimension_Binary_Op): Do not check
2106 dimensions of operands if node has been analyzed already, because
2107 previous analysis and dimension checking will have removed the
2108 dimension information from the operands.
2109
2110 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
2111
2112 * debug.adb: Document the use of switch -gnatd.s.
2113 * einfo.ads Update the documentation on attribute
2114 Sec_Stack_Needed_For_Return and attribute Uses_Sec_Stack. Remove
2115 the uses of these attributes from certain entities.
2116 * exp_ch7.adb (Make_Transient_Block): Reimplement the circuitry
2117 which determines whether the block should continue to manage
2118 the secondary stack.
2119 (Manages_Sec_Stack): New routine.
2120
2121 2017-04-27 Bob Duff <duff@adacore.com>
2122
2123 * atree.ads: Minor edit.
2124
2125 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
2126
2127 * sinfo.ads: Update the section on Ghost mode. Add
2128 a section on SPARK mode. Update the placement of section on
2129 expression functions.
2130
2131 2017-04-27 Bob Duff <duff@adacore.com>
2132
2133 * sinput.adb (Get_Source_File_Index): Don't
2134 assert that S is in the right range in the case where this is
2135 a .dg file under construction.
2136
2137 2017-04-27 Yannick Moy <moy@adacore.com>
2138
2139 * sem_util.adb (Check_Result_And_Post_State):
2140 Handle more precisely each conjunct in expressions formed by
2141 and'ing sub-expressions.
2142
2143 2017-04-27 Gary Dismukes <dismukes@adacore.com>
2144
2145 * exp_ch4.adb, sem_ch4.adb: Minor typo fix and reformatting.
2146
2147 2017-04-25 Arnaud Charlet <charlet@adacore.com>
2148
2149 * gnat_rm.texi, gnat_ugn.texi,
2150 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
2151 doc/gnat_ugn/platform_specific_information.rst,
2152 doc/gnat_ugn/gnat_and_program_execution.rst,
2153 doc/gnat_ugn/gnat_utility_programs.rst,
2154 doc/gnat_ugn/the_gnat_compilation_model.rst,
2155 doc/gnat_rm/implementation_defined_attributes.rst,
2156 doc/gnat_rm/the_gnat_library.rst,
2157 doc/gnat_rm/implementation_defined_pragmas.rst,
2158 doc/gnat_rm/representation_clauses_and_pragmas.rst,
2159 doc/gnat_rm/implementation_of_specific_ada_features.rst,
2160 doc/gnat_rm/implementation_defined_aspects.rst,
2161 doc/gnat_rm/implementation_defined_characteristics.rst: Update
2162 documentation.
2163
2164 2017-04-25 Arnaud Charlet <charlet@adacore.com>
2165
2166 * exp_ch4.adb (Expand_N_Case_Expression): Emit error message when
2167 generating C code on complex case expressions.
2168
2169 2017-04-25 Arnaud Charlet <charlet@adacore.com>
2170
2171 * sem_prag.adb (Analyze_Pragma): Generate a warning instead
2172 of silently ignoring pragma Ada_xxx in Latest_Ada_Only mode.
2173 * directio.ads, ioexcept.ads, sequenio.ads, text_io.ads: Use
2174 Ada_2012 instead of Ada_2005 to be compatible with the above
2175 change.
2176 * bindgen.adb: Silence new warning on pragma Ada_95.
2177
2178 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2179
2180 * checks.adb (Generate_Range_Check): Revert part of previous change.
2181
2182 2017-04-25 Ed Schonberg <schonberg@adacore.com>
2183
2184 * sem_ch4.adb (Try_Container_Indexing): Handle properly a
2185 container indexing operation that appears as a an actual in a
2186 parameter association in a procedure call.
2187
2188 2017-04-25 Olivier Ramonat <ramonat@adacore.com>
2189
2190 * prj-proc.adb, sem_util.adb, s-stposu.adb, sem_attr.adb, prj-conf.ads:
2191 Fix spelling mistakes.
2192
2193 2017-04-25 Bob Duff <duff@adacore.com>
2194
2195 * types.ads, osint.adb, sinput-c.adb, sinput-d.adb, sinput-l.adb,
2196 * sinput-p.adb: Use regular fat pointers, with bounds checking,
2197 for source buffers. Fix misc obscure bugs.
2198 * sinput.ads, sinput.adb: Use regular fat pointers, with bounds
2199 checking, for source buffers. Modify representation clause for
2200 Source_File_Record as appropriate. Move Source_File_Index_Table
2201 from spec to body, because it is not used outside the body.
2202 Move Set_Source_File_Index_Table into the private part, because
2203 it is used only in the body and in children. Use trickery to
2204 modify the dope in the generic instantiation case. It's ugly,
2205 but not as ugly as the previous method. Fix documentation.
2206 Remove obsolete code.
2207 * fname-sf.adb, targparm.adb: Fix misc out-of-bounds
2208 indexing in source buffers.
2209 * fmap.adb: Avoid conversions from one string type to another.
2210 Remove a use of global name buffer.
2211 * osint.ads, sfn_scan.ads, sfn_scan.adb, sinput-c.ads: Comment
2212 fixes.
2213
2214 2017-04-25 Gary Dismukes <dismukes@adacore.com>
2215
2216 * exp_util.adb, exp_ch4.adb: Minor reformatting.
2217
2218 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2219
2220 * checks.adb: Code clean up in various routines.
2221 (Generate_Range_Check): Do not generate a range check when the
2222 expander is not active or when index/range checks are suppressed
2223 on the target type.
2224 (Insert_List_After_And_Analyze, Insert_List_Before_And_Analyze):
2225 Remove variants that include a Supress parameter. These routines
2226 are never used, and were introduced before the current scope-based
2227 check suppression method.
2228
2229 2017-04-25 Vasiliy Fofanov <fofanov@adacore.com>
2230
2231 * prj-part.adb, cstreams.c, osint.adb, osint.ads: Remove VMS specific
2232 code and some subprogram calls that are now noop.
2233
2234 2017-04-25 Arnaud Charlet <charlet@adacore.com>
2235
2236 * exp_ch4.adb (Expand_N_Case_Expression): Take
2237 Minimize_Expression_With_Actions into account when possible.
2238
2239 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2240
2241 * exp_util.adb (Known_Non_Null): Moved to Sem_Util.
2242 (Known_Null): Moved to Sem_Util.
2243 * exp_util.ads (Known_Non_Null): Moved to Sem_Util.
2244 (Known_Null): Moved to Sem_Util.
2245 * sem_util.adb Add new enumeration type Null_Status_Kind.
2246 (Known_Non_Null): Moved from Exp_Util. Most of the logic in
2247 this routine is now carried out by Null_Status.
2248 (Known_Null): Moved from Exp_Util. Most of the logic in this routine
2249 is now carried out by Null_Status.
2250 (Null_Status): New routine.
2251 * sem_util.ads (Known_Non_Null): Moved from Exp_Util.
2252 (Known_Null): Moved from Exp_Util.
2253
2254 2017-04-25 Ed Schonberg <schonberg@adacore.com>
2255
2256 * sem_ch6.adb (Analyze_Expression_Function): Do not report an
2257 error on the return type of an expression function that is a
2258 completion, if the type is derived from a generic formal type.
2259
2260 2017-04-25 Ed Schonberg <schonberg@adacore.com>
2261
2262 * sem_dim.adb (Dimensions_Of_Operand): The dimensions of a type
2263 conversion are those of the target type.
2264
2265 2017-04-25 Bob Duff <duff@adacore.com>
2266
2267 * a-clrefi.adb: Minor cleanup.
2268
2269 2017-04-25 Gary Dismukes <dismukes@adacore.com>
2270
2271 * exp_util.adb, exp_util.ads, types.ads: Minor reformatting.
2272
2273 2017-04-25 Bob Duff <duff@adacore.com>
2274
2275 * err_vars.ads, fmap.adb, fmap.ads, comperr.adb, fname-sf.adb,
2276 types.adb, types.ads, types.h, sinput-l.adb, targparm.adb,
2277 errout.adb, sinput.adb, sinput.ads, cstand.adb, scn.adb,
2278 scn.ads, gnatls.adb: Eliminate the vestigial Internal_Source_File and
2279 the Internal_Source buffer. This removes the incorrect call to "="
2280 the customer noticed.
2281 Wrap remaining calls to "=" in Null_Source_Buffer_Ptr. We
2282 eventually need to eliminate them altogether. Or else get rid
2283 of zero-origin addressing.
2284
2285 2017-04-25 Claire Dross <dross@adacore.com>
2286
2287 * exp_util.ads (Expression_Contains_Primitives_Calls_Of): New
2288 function used in GNATprove to know if an expression contains
2289 non-dispatching calls on primitives of a tagged type.
2290
2291 2017-04-25 Bob Duff <duff@adacore.com>
2292
2293 * rtsfind.adb (Initialize): Initialize
2294 First_Implicit_With. Building the compiler with Normalize_Scalars
2295 and validity checking finds this being used as an uninitialized
2296 variable.
2297
2298 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2299
2300 * contracts.adb (Analyze_Entry_Or_Subprogram_Body_Contract):
2301 Add a warning about SPARK mode management. The routine now
2302 saves and restores both the mode and associated pragma.
2303 (Analyze_Entry_Or_Subprogram_Contract): Add a warning about
2304 SPARK mode management. The routine now saves and restores both
2305 the mode and associated pragma.
2306 (Analyze_Object_Contract):
2307 Add a warning about SPARK mode management. The routine
2308 now saves and restores both the mode and associated pragma.
2309 (Analyze_Package_Body_Contract): Add a warning about SPARK mode
2310 management. The routine now saves and restores both the mode
2311 and associated pragma. (Analyze_Package_Contract): Add a warning
2312 about SPARK mode management. The routine now saves and restores
2313 both the mode and associated pragma.
2314 (Analyze_Task_Contract):
2315 Add a warning about SPARK mode management. The routine now saves
2316 and restores both the mode and associated pragma.
2317 * expander.adb (Expand): Change the way the Ghost mode is saved
2318 and restored.
2319 * exp_ch3.adb (Freeze_Type): Change the way the Ghost mode is
2320 saved and restored.
2321 * exp_disp.adb (Make_DT): Change the way the Ghost mode is saved
2322 and restored.
2323 * exp_util.adb (Build_DIC_Procedure_Body):
2324 Change the way the Ghost mode is saved and restored.
2325 (Build_DIC_Procedure_Declaration): Change the way the Ghost
2326 mode is saved and restored.
2327 (Build_Invariant_Procedure_Body):
2328 Change the way the Ghost mode is saved and restored.
2329 (Build_Invariant_Procedure_Declaration): Change the way the Ghost
2330 mode is saved and restored.
2331 (Make_Predicate_Call): Change the
2332 way the Ghost mode is saved and restored.
2333 * freeze.adb (Freeze_Entity): Change the way the Ghost mode is
2334 saved and restored.
2335 * ghost.adb (Mark_And_Set_Ghost_Assignment): Remove parameter Mode
2336 and its assignment.
2337 (Mark_And_Set_Ghost_Body): Remove parameter
2338 Mode and its assignment.
2339 (Mark_And_Set_Ghost_Completion):
2340 Remove parameter Mode and its assignment.
2341 (Mark_And_Set_Ghost_Declaration): Remove parameter Mode and its
2342 assignment.
2343 (Mark_And_Set_Ghost_Instantiation): Remove parameter
2344 Mode and its assignment.
2345 (Mark_And_Set_Ghost_Procedure_Call):
2346 Remove parameter Mode and its assignment.
2347 (Set_Ghost_Mode):
2348 Remove parameter Mode and its assignment.
2349 * ghost.ads (Mark_And_Set_Ghost_Assignment): Remove parameter Mode
2350 and update the comment on usage.
2351 (Mark_And_Set_Ghost_Body):
2352 Remove parameter Mode and update the comment on usage.
2353 (Mark_And_Set_Ghost_Completion): Remove parameter Mode and
2354 update the comment on usage.
2355 (Mark_And_Set_Ghost_Declaration):
2356 Remove parameter Mode and update the comment on usage.
2357 (Mark_And_Set_Ghost_Instantiation): Remove parameter Mode and
2358 update the comment on usage.
2359 (Mark_And_Set_Ghost_Procedure_Call):
2360 Remove parameter Mode and update the comment on usage.
2361 (Set_Ghost_Mode): Remove parameter Mode and update the comment
2362 on usage.
2363 * lib.ads Remove obsolete fields SPARK_Mode_Pragma from various
2364 types.
2365 * lib-load.adb (Create_Dummy_Package_Unit): Remove the assignment
2366 of obsolete field SPARK_Mode_Pragma.
2367 (Load_Main_Source): Remove
2368 the assignment of obsolete field SPARK_Mode_Pragma.
2369 (Load_Unit): Remove the assignment of obsolete field SPARK_Mode_Pragma.
2370 * lib-writ.adb (Add_Preprocessing_Dependency): Remove
2371 the assignment of obsolete field SPARK_Mode_Pragma.
2372 (Ensure_System_Dependency): Remove the assignment of obsolete
2373 field SPARK_Mode_Pragma.
2374 * rtsfind.adb (Load_RTU): Add a warning about Ghost and SPARK
2375 mode management. Change the way Ghost and SPARK modes are saved
2376 and restored.
2377 * sem.adb (Analyze): Change the way the Ghost mode is saved
2378 and restored.
2379 * sem_ch3.adb (Analyze_Object_Declaration): Change the way the
2380 Ghost mode is saved and restored.
2381 (Process_Full_View): Change
2382 the way the Ghost mode is saved and restored.
2383 * sem_ch5.adb (Analyze_Assignment): Change the way the Ghost
2384 mode is saved and restored.
2385 * sem_ch6.adb (Analyze_Procedure_Call): Change the way the Ghost
2386 mode is saved and restored.
2387 (Analyze_Subprogram_Body_Helper):
2388 Change the way the Ghost mode is saved and restored.
2389 * sem_ch7.adb (Analyze_Package_Body_Helper): Change the way the
2390 Ghost mode is saved and restored.
2391 * sem_ch10.adb (Analyze_Subunit): Add a warning about SPARK mode
2392 management. Save the SPARK mode-related data prior to any changes
2393 to the scope stack and contexts. The mode is then reinstalled
2394 before the subunit is analyzed in order to restore the original
2395 view of the subunit.
2396 * sem_ch12.adb (Analyze_Package_Instantiation): Update the
2397 warning on region management. Change the way the Ghost and
2398 SPARK modes are saved and restored.
2399 (Inline_Instance_Body):
2400 Add a warning about SPARK mode management. Code clean up.
2401 (Analyze_Subprogram_Instantiation): Update the warning on region
2402 management. Change the way the Ghost and SPARK modes are saved
2403 and restored.
2404 (Instantiate_Package_Body): Update the warning
2405 on region management. Change the way the Ghost and SPARK modes
2406 are saved and restored.
2407 (Instantiate_Subprogram_Body): Update
2408 the warning on region management. Change the way the Ghost and
2409 SPARK modes are saved and restored.
2410 (Set_Instance_Env): Add a
2411 warning about SPARK mode management. Change the way SPARK mode
2412 is saved and restored.
2413 * sem_ch13.adb (Build_Predicate_Functions):
2414 Change the way the Ghost mode is saved and restored.
2415 (Build_Predicate_Function_Declaration): Change the way the Ghost
2416 mode is saved and restored.
2417 * sem_elab.adb (Check_Elab_Calls): Add a warning about SPARK
2418 mode management. Change the way SPARK mode is saved and restored.
2419 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
2420 Change the way the Ghost mode is saved and restored.
2421 (Analyze_Initial_Condition_In_Decl_Part): Change the way
2422 the Ghost mode is saved and restored.
2423 (Analyze_Pragma):
2424 Change the way the Ghost mode is saved and restored.
2425 (Analyze_Pre_Post_Condition_In_Decl_Part): Change the way the
2426 Ghost mode is saved and restored.
2427 * sem_util.adb (Install_SPARK_Mode): New routine.
2428 (Restore_SPARK_Mode): New routine.
2429 (Save_SPARK_Mode_And_Set): Removed.
2430 (Set_SPARK_Mode): New routine.
2431 * sem_util.ads (Install_SPARK_Mode): New routine.
2432 (Restore_SPARK_Mode): New routine.
2433 (Save_SPARK_Mode_And_Set): Removed.
2434 (Set_SPARK_Mode): New routine.
2435
2436 2017-04-25 Ed Schonberg <schonberg@adacore.com>
2437
2438 * sem_util.adb, sem_util.ads (From_Nested_Package): New predicate
2439 to determine whether a type is declared in a local package that
2440 has not yet been frozen.
2441 * freeze.adb (Freeze_Before): Use new predicate to determine
2442 whether a local package must be installed on the scope stack
2443 in order to evaluate in the proper scope actions generated by
2444 aspect specifications, such as Predicate
2445 * sem_ch13.adb: Simplify code in Analyze_Aspects_At_Freeze_Point
2446 using new predicate.
2447
2448 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2449
2450 * sem_warn.adb (Warn_On_Constant_Valid_Condition): Do not consider
2451 comparisons between non- scalar expressions expressions because
2452 their values cannot be invalidated.
2453 * sem_warn.ads (Warn_On_Constant_Valid_Condition): Update the
2454 comment on usage.
2455
2456 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2457
2458 * par_sco.adb: Minor reformatting.
2459
2460 2017-04-25 Ed Schonberg <schonberg@adacore.com>
2461
2462 * sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): If entity
2463 is a type from an unfrozen local package, install package to
2464 complete the analysis of delayed aspects of the type.
2465
2466 2017-04-25 Tristan Gingold <gingold@adacore.com>
2467
2468 * bingen.adb (System_Version_Control_Used): New variable.
2469 (Resolve_Binder_Options): Set the above variable.
2470 (Gen_Output_File_Ada): Conditionally call Gen_Versions.
2471 (Gen_Elab_Order): Emit blank line before.
2472
2473 2017-04-25 Justin Squirek <squirek@adacore.com>
2474
2475 * sem_cat.adb (Validate_RT_RAT_Component): Added
2476 an extra check to ignore incomplete types.
2477
2478 2017-04-25 Thomas Quinot <quinot@adacore.com>
2479
2480 * sem_prag.adb (Analyze_Pragma, case Pragma_Check): Remove
2481 bogus circuitry for the case where Name is Predicate.
2482
2483 2017-04-25 Thomas Quinot <quinot@adacore.com>
2484
2485 * par_sco.adb(Traverse_Declarations_Or_Statements.Traverse_Aspects):
2486 Create SCOs for Predicate aspects in disabled
2487 state initially, to be enabled later on by...
2488 * sem_ch13.adb (Build_Predicate_Functions.Add_Predicates): Mark
2489 SCO for predicate as enabled.
2490
2491 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2492
2493 * comperr.adb (Compiler_Abort): Remove now obsolete pair of
2494 pragmas Warnings Off / On.
2495 * namet.adb (Finalize): Remove now obsolete pair of pragmas
2496 Warnings Off / On.
2497 * output.adb: Remove now obsolete pair of pragmas Warnings Off / On.
2498 * sem_warn.adb (Warn_On_Constant_Valid_Condition): Do not
2499 consider comparisons between static expressions because their
2500 values cannot be invalidated.
2501 * urealp.adb (Tree_Read): Remove now obsolete pair of pragmas
2502 Warnings Off / On.
2503 (Tree_Write): Remove now obsolete pair of pragmas Warnings Off / On.
2504 * usage.adb Remove now obsolete pair of pragmas Warnings Off / On.
2505
2506 2017-04-25 Bob Duff <duff@adacore.com>
2507
2508 * sem_elab.adb (In_Task_Activation): Trace internal calls in
2509 task bodies.
2510
2511 2017-04-25 Gary Dismukes <dismukes@adacore.com>
2512
2513 * sem_prag.adb, sem_warn.adb, sem_eval.adb: Minor reformatting and
2514 typo fixes.
2515
2516 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2517
2518 * comperr.adb (Compiler_Abort): Add a pair of pragma Warnings
2519 On/Off to defend against a spurious warning in conditional
2520 compilation.
2521 * exp_ch4.adb (Rewrite_Comparison): Reimplemented.
2522 * namet.adb (Finalize): Add a pair of pragma Warnings On/Off to
2523 defend against a spurious warning in conditional compilation.
2524 * output.adb Add a pair of pragma Warnings On/Off to defend
2525 against a spurious warning in conditional compilation.
2526 * sem_eval.adb (Eval_Relational_Op): Major code clean up.
2527 (Fold_General_Op): New routine.
2528 (Fold_Static_Real_Op): New routine.
2529 (Test_Comparison): New routine.
2530 * sem_eval.ads (Test_Comparison): New routine.
2531 * sem_warn.adb (Is_Attribute_Constant_Comparison): New routine.
2532 (Warn_On_Constant_Valid_Condition): New routine.
2533 (Warn_On_Known_Condition): Use Is_Attribute_Constant_Comparison
2534 to detect a specific case.
2535 * sem_warn.adb (Warn_On_Constant_Valid_Condition): New routine.
2536 * urealp.adb (Tree_Read): Add a pair of pragma Warnings On/Off
2537 to defend against a spurious warning in conditional compilation.
2538 (Tree_Write): Add a pair of pragma Warnings On/Off to defend
2539 against a spurious warning in conditional compilation.
2540 * usage.adb Add a pair of pragma Warnings On/Off to defend
2541 against a spurious warning in conditional compilation.
2542
2543 2017-04-25 Arnaud Charlet <charlet@adacore.com>
2544
2545 * sinfo.ads, sem_ch13.adb: Update comment.
2546
2547 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2548
2549 * sem_util.adb (Is_Post_State): A reference to a
2550 generic in out parameter is considered a change in the post-state
2551 of a subprogram.
2552
2553 2017-04-25 Ed Schonberg <schonberg@adacore.com>
2554
2555 * sem_ch12.adb (Load_Parent_Of_Generic); When retrieving the
2556 declaration of a subprogram instance within its wrapper package,
2557 skip over null statements that may result from the rewriting of
2558 ignored pragmas.
2559
2560 2017-04-25 Ed Schonberg <schonberg@adacore.com>
2561
2562 * exp_attr.adb (Expand_Attribute_Reference, case 'Read):
2563 If the type is an unchecked_union, replace the attribute with
2564 a Raise_Program_Error (rather than inserting such before the
2565 attribute reference) to handle properly the case where we are
2566 processing a component of a larger record, and we need to prevent
2567 further expansion for the unchecked union.
2568 (Expand_Attribute_Reference, case 'Write): If the type is
2569 an unchecked_union, check whether enclosing scope is a Write
2570 subprogram. Replace attribute with a Raise_Program_Error if the
2571 discriminants of the unchecked_union type have not default values
2572 because such a use is erroneous..
2573
2574 2017-04-25 Tristan Gingold <gingold@adacore.com>
2575
2576 * exp_ch9.adb (Expand_N_Task_Type_Declaration):
2577 Add relative_deadline to task record on edf profile.
2578 (Make_Initialize_Protection): Pass deadline_floor value on edf profile.
2579 (Make_Task_Create_Call): Pass relative_deadline value.
2580 * par-prag.adb (Prag): Handle Pragma_Deadline_Floor.
2581 * s-rident.ads (Profile_Name): Add GNAT_Ravenscar_EDF.
2582 (Profile_Info): Add info for GNAT_Ravenscar_EDF.
2583 * sem_prag.adb (Set_Ravenscar_Profile): Handle
2584 GNAT_Ravenscar_EDF (set scheduling policy).
2585 (Analyze_Pragma): Handle GNAT_Ravenscar_EDF profile and Deadline_Floor
2586 pragma.
2587 (Sig_Flags): Add choice for Pragma_Deadline_Floor.
2588 * snames.ads-tmpl (Name_Deadline_Floor, Name_Gnat_Ravenscar_EDF):
2589 New names.
2590 (Pragma_Deadline_Floor): New pragma.
2591 * targparm.adb (Get_Target_Parameters): Recognize
2592 GNAT_Ravenscar_EDF profile.
2593
2594 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
2595
2596 * gnatvsn.ads (Library_Version): Bump to 8. Update comment.
2597
2598 2017-04-25 Ed Schonberg <schonberg@adacore.com>
2599
2600 * sem_aux.adb (Nearest_Ancestor): Use original node of type
2601 declaration to locate nearest ancestor, because derived
2602 type declarations for record types are rewritten as record
2603 declarations.
2604 * sem_ch13.adb (Add_Call): Use an unchecked conversion to handle
2605 properly derivations that are completions of private types.
2606 (Add_Predicates): If type is private, examine rep. items of full
2607 view, which may include inherited predicates.
2608 (Build_Predicate_Functions): Ditto.
2609
2610 2017-04-25 Javier Miranda <miranda@adacore.com>
2611
2612 * sem_util.adb (New_Copy_Tree.Visit_Entity): Extend previous change
2613 to generate new entities for subtype declarations located in
2614 Expression_With_Action nodes.
2615
2616 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2617
2618 * sem_elab.adb (Check_A_Call): Remove
2619 local variables Is_DIC_Proc and Issue_In_SPARK. Verify the
2620 need for Elaborate_All when SPARK elaboration checks are
2621 required. Update the checks for instances, variables, and calls
2622 to Default_Initial_Condition procedures.
2623
2624 2017-04-25 Ed Schonberg <schonberg@adacore.com>
2625
2626 * aspects.ads, aspects.adb: Make the GNAT-specific pragma No_Inline
2627 into a boolean aspect, in analogy with the Ada aspect No_Return.
2628
2629 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2630
2631 * exp_ch6.adb, sem_ch13.adb, sem_ch6.adb: Minor reformatting.
2632
2633 2017-04-25 Bob Duff <duff@adacore.com>
2634
2635 * sem_res.adb (Resolve_Actuals): Under -gnatd.q, reset
2636 Is_True_Constant for an array variable that is passed to a
2637 foreign function as an 'in' parameter.
2638 * debug.adb: Document -gnatd.q.
2639
2640 2017-04-25 Ed Schonberg <schonberg@adacore.com>
2641
2642 * sem_ch6.adb (Analyze_Expression_Function): If expression function
2643 is completion and return type is an access type do not freeze
2644 designated type: this will be done in the process of freezing
2645 the expression if needed.
2646 (Freeze_Expr_Types): Check whether type is complete before
2647 creating freeze node, to provide a better error message if
2648 reference is premature.
2649 * sem_ch13.adb (Check_Indexing_Functions): Ignore inherited
2650 functions created by type derivations.
2651
2652 2017-04-25 Pascal Obry <obry@adacore.com>
2653
2654 * g-sercom.ads: Add simple usage of GNAT.Serial_Communication.
2655
2656 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2657
2658 * sem_res.adb (Resolve_Type_Conversion):
2659 When resolving against any fixed type, set the type of the
2660 operand as universal real when the operand is a multiplication
2661 or a division where both operands are of any fixed type.
2662 (Unique_Fixed_Point_Type): Add local variable ErrN. Improve the
2663 placement of an error message by pointing to the operand of a
2664 type conversion rather than the conversion itself.
2665
2666 2017-04-25 Thomas Quinot <quinot@adacore.com>
2667
2668 * sem_ch13.adb (Build_Predicate_Function_Declaration): Set
2669 Needs_Debug_Info when producing SCOs.
2670
2671 2017-04-25 Thomas Quinot <quinot@adacore.com>
2672
2673 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
2674 Always pass a null finalization master for a library level named access
2675 type to which a pragme No_Heap_Finalization applies.
2676
2677 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
2678
2679 PR ada/78845
2680
2681 * a-ngcoar.adb, a-ngrear.adb (Inverse): call Unit_Matrix with First_1
2682 set to A'First(2) and vice versa.
2683
2684 2017-04-25 Yannick Moy <moy@adacore.com>
2685
2686 * freeze.adb (Freeze_Record_Type): Remove obsolete
2687 rule on volatile tagged record restriction on SPARK code.
2688
2689 2017-04-25 Yannick Moy <moy@adacore.com>
2690
2691 * sem_prag.adb (minor) Fix SPARK RM reference.
2692
2693 2017-04-25 Yannick Moy <moy@adacore.com>
2694
2695 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): Update
2696 comment to reflect which entity is chosen as unique entity.
2697 (Unique_Entity): Return full view instead of private spec for
2698 protected type or task type. Fix possible incorrect access when
2699 called on entry.
2700
2701 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
2702
2703 * sem_res.adb (Set_Slice_Subtype): Treat specially bit-packed
2704 array types only instead of all packed array types.
2705
2706 2017-04-25 Ed Schonberg <schonberg@adacore.com>
2707
2708 * sem_ch6.adb (Conforming_Types): If type of formal as a specified
2709 dimension system, verify that dimensions of both match.
2710 (Check_Conformance): Add error message in case of dimension
2711 mismatch.
2712 * sem_dim.ads, sem_dim.adb (Dimensions_Match): New utility
2713 predicate.
2714
2715 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
2716
2717 * gnatxref.adb, gnatfind.adb: Avoid using the term project file,
2718 confusing.
2719
2720 2017-04-25 Yannick Moy <moy@adacore.com>
2721
2722 * sem_util.adb: Minor refactoring.
2723 * freeze.adb (Freeze_Record_Type): Fix checking of SPARK RM 7.1.3(5).
2724
2725 2017-04-25 Claire Dross <dross@adacore.com>
2726
2727 * sem_prag.adb (Collect_Inherited_Class_Wide_Conditions): Go to
2728 ultimate alias when accessing overridden operation. Indeed, if the
2729 overridden operation is itself inherited, it won't have any explicit
2730 contract.
2731
2732 2017-04-25 Ed Schonberg <schonberg@adacore.com>
2733
2734 * sem_warn.adb (Warn_On_Overlapping_Actuals): There can be no
2735 overlap if the two formals have different types, because formally
2736 the corresponding actuals cannot designate the same objects.
2737
2738 2017-04-25 Ed Schonberg <schonberg@adacore.com>
2739
2740 * sem_dim.adb (Dimensions_Of_Operand): minot cleanups: a) If
2741 dimensions are present from context, use them. b) If operand is
2742 a static constant rewritten as a literal, obtain the dimensions
2743 from the original declaration, otherwise use dimensions of type
2744 established from context.
2745
2746 2017-04-25 Yannick Moy <moy@adacore.com>
2747
2748 * sem_util.adb (Is_Effectively_Volatile): Protect against base type
2749 of array that is private.
2750
2751 2017-04-25 Gary Dismukes <dismukes@adacore.com>
2752
2753 * sem_ch3.adb, exp_util.adb, sem_prag.adb, exp_ch4.adb: Minor
2754 reformatting.
2755
2756 2017-04-25 Yannick Moy <moy@adacore.com>
2757
2758 * a-ngelfu.adb, a-ngelfu.ads: Add SPARK_Mode On on spec, Off
2759 on body.
2760
2761 2017-04-25 Ed Schonberg <schonberg@adacore.com>
2762
2763 * sem_disp.adb (Check_Dispatching_Context): Add guard to refine
2764 the check that recognizes a call to a private overridding and
2765 replaces the called subprogram with its alias.
2766
2767 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2768
2769 * exp_util.adb: Minor reformatting.
2770
2771 2017-04-25 Justin Squirek <squirek@adacore.com>
2772
2773 * exp_ch3.adb (Freeze_Type): Add condition to always treat
2774 interface types as a partial view of a private type for the
2775 generation of invariant procedure bodies.
2776 * exp_util.adb, exp_util.ads (Add_Inherited_Invariants):
2777 Add a condition to get the Corresponding_Record_Type for
2778 concurrent types, add condition to return in the absence of a
2779 class in the pragma, remove call to Replace_Type_References,
2780 and add call to Replace_References.
2781 (Add_Interface_Invariatns),
2782 (Add_Parent_Invariants): Modify call to Add_Inherited_Invariants
2783 to including the working type T.
2784 (Add_Own_Invariants): Remove
2785 legacy condition for separate units, remove dispatching for ASIS
2786 and save a copy of the expression in the pragma expression.
2787 (Build_Invariant_Procedure_Body): Default initalize vars,
2788 remove return condition on interfaces, always use the
2789 private type for interfaces, and move the processing of types
2790 until after the processing of invariants for the full view.
2791 (Build_Invariant_Procedure_Declaration): Remove condition
2792 to return if an interface type is encountered and add
2793 condition to convert the formal parameter to its class-wide
2794 counterpart if Work_Typ is abstract.
2795 (Replace_Type): Add call to Remove_Controlling_Arguments.
2796 (Replace_Type_Ref): Remove class-wide dispatching for the current
2797 instance of the type.
2798 (Replace_Type_References): Remove parameter "Derived"
2799 (Remove_Controlling_Arguments): Created in order to removing
2800 the controlliong argument from calls to primitives in the case
2801 of the formal parameter being an class-wide abstract type.
2802 * sem_ch3.adb (Build_Assertion_Bodies_For_Type): Almost identical
2803 to the change made to Freeze_Type in exp_ch3. Add a condition
2804 to treat interface types as a partial view.
2805 * sem_prag.adb (Analyze_Pragma): Modify parameters in the call
2806 to Build_Invariant_Procedure_Declaration to properly generate a
2807 "partial" invariant procedure when Typ is an interface.
2808
2809 2017-04-25 Bob Duff <duff@adacore.com>
2810
2811 * a-numeri.ads: Go back to using brackets encoding for the Greek
2812 letter pi.
2813
2814 2017-04-25 Ed Schonberg <schonberg@adacore.com>
2815
2816 * sem_ch3.adb (Derive_Subprogram): Implement rule in RM 6.1.1
2817 (10-15): if derived type T with progenitors is abstract,
2818 and primitive P of this type inherits non-trivial classwide
2819 preconditions from both a parent operation and from an interface
2820 operation, then the inherited operation is abstract if the parent
2821 operation is not null.
2822 * sem_disp.ads, sem_disp.adb: replace function Covers_Some_Interface
2823 with Covered_Interface_Op to yield the actual interface operation
2824 that is implemented by a given inherited operation.
2825
2826 2017-04-25 Javier Miranda <miranda@adacore.com>
2827
2828 * exp_ch4.adb (Expand_N_Op_Expon): Relocate left
2829 and right operands after performing the validity checks. Required
2830 because validity checks may remove side effects from the operands.
2831
2832 2017-04-25 Javier Miranda <miranda@adacore.com>
2833
2834 * exp_attr.adb (Attribute_Unrestricted_Access):
2835 Do not disable implicit type conversion. Required to generate
2836 code that displaces the pointer to reference the secondary
2837 dispatch table.
2838
2839 2017-04-25 Pascal Obry <obry@adacore.com>
2840
2841 * prj-attr.adb, snames.ads-tmpl: Add package Install's
2842 Required_Artifacts attribute.
2843
2844 2017-04-25 Ed Schonberg <schonberg@adacore.com>
2845
2846 * sem_util.adb (Same_Value): String literals are compile-time
2847 values, and comparing them must use Expr_Value_S.
2848
2849 2017-04-25 Ed Schonberg <schonberg@adacore.com>
2850
2851 * sem_ch4.adb (Complete_Object_Interpretation): If an explicit
2852 dereference is introduced for the object, and the object is
2853 overloaded, do not check whether it is aliased, because it may
2854 include an implicit dereference.
2855 * sem_type.adb (Disambiguate): If two interpretations are access
2856 attribute types with the same designated type keep either of
2857 them and do not report an ambiguity. A true ambiguity will be
2858 reported elsewhere.
2859
2860 2017-04-25 Bob Duff <duff@adacore.com>
2861
2862 * a-numeri.ads: Change the encoding of Greek letter Pi from
2863 brackets encoding to UTF-8. Use pragma Wide_Character_Encoding
2864 to indicate the encoding. We considered using a byte order mark
2865 (BOM), but that causes various trouble (misc software eats the
2866 BOM, if you have a patch with a BOM, then it's not at the start
2867 of the patch, so it's not a BOM, the BOM affects with-ing files,
2868 etc.).
2869 * scng.adb, s-wchcnv.adb: Minor.
2870
2871 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2872
2873 * sem_ch3.adb, sem_ch8.adb, sem_disp.adb: Minor reformatting.
2874 2017-04-25 Ed Schonberg <schonberg@adacore.com>
2875
2876 * sem_ch3.adb (Add_Internal_Interface_Entities): Move
2877 Has_Non_Trivial_Precondition to sem_util. for use elsewhere.
2878 Improve error message on operations that inherit non-conforming
2879 classwide preconditions from ancestor and progenitor.
2880 * sem_util.ads, sem_util.adb (Has_Non_Trivial_Precondition):
2881 moved here from sem_ch3.
2882 * sem_ch8.adb (Analyze_Subprogram_Renaming): Implement legality
2883 check given in RM 6.1.1 (17) concerning renamings of overriding
2884 operations that inherits class-wide preconditions from ancestor
2885 or progenitor.
2886
2887 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2888
2889 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Code cleanup.
2890 (Build_Adjust_Statements): Code cleanup.
2891 (Build_Finalizer): Update the initialization of
2892 Exceptions_OK.
2893 (Build_Finalize_Statements): Code cleanup.
2894 (Build_Initialize_Statements): Code cleanup.
2895 (Make_Deep_Array_Body): Update the initialization of
2896 Exceptions_OK.
2897 (Make_Deep_Record_Body): Update the initialization of Exceptions_OK.
2898 (Process_Object_Declaration): Generate a null exception handler only
2899 when exceptions are allowed.
2900 (Process_Transients_In_Scope): Update the initialization of
2901 Exceptions_OK.
2902 * exp_util.ads, exp_util.adb (Exceptions_In_Finalization_OK): New
2903 routine.
2904 * sem_ch11.adb (Analyze_Exception_Handlers): Do not check any
2905 restrictions when the handler is internally generated and the
2906 mode is warnings.
2907
2908 2017-04-25 Ed Schonberg <schonberg@adacore.com>
2909
2910 * sem_ch3.adb (Has_Non_Trivial_Precondition): New predicate to
2911 enforce legality rule on classwide preconditions inherited from
2912 both an ancestor and a progenitor (RM 6.1.1 (10-13).
2913 * sem_disp.adb (Check_Dispatching_Context): A call to an abstract
2914 subprogram need not be dispatching if it appears in a precondition
2915 for an abstract or null subprogram.
2916
2917 2017-04-25 Gary Dismukes <dismukes@adacore.com>
2918
2919 * sem_ch10.adb: Minor typo fix.
2920
2921 2017-04-25 Arnaud Charlet <charlet@adacore.com>
2922
2923 * gcc-interface/Makefile.in: Cleanup VxWorks targets.
2924
2925 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
2926
2927 * fname.adb (Is_Internal_File_Name): Arrange for the slices to
2928 have a length which is a power of 2.
2929 (Is_Predefined_File_Name): Likewise. Adjust comment.
2930
2931 2017-04-25 Bob Duff <duff@adacore.com>
2932
2933 * exp_aggr.adb (Component_Count): Protect the
2934 arithmetic from attempting to convert a value >= 2**31 to Int,
2935 which would otherwise raise Constraint_Error.
2936
2937 2017-04-25 Bob Duff <duff@adacore.com>
2938
2939 * opt.ads (Locking_Policy): Fix incorrect documentation. The
2940 first character of the policy name is not unique.
2941
2942 2017-04-25 Bob Duff <duff@adacore.com>
2943
2944 * s-fileio.adb (Name): Raise Use_Error if the file is a temp file.
2945 * s-ficobl.ads (Is_Temporary_File): Remove incorrect comment
2946 about this flag not being used. It was already used, and it is
2947 now used more.
2948
2949 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2950
2951 * einfo.adb Flag301 is now known as Ignore_SPARK_Mode_Pragmas.
2952 (Ignore_SPARK_Mode_Pragmas): New routine.
2953 (Set_Ignore_SPARK_Mode_Pragmas): New routine.
2954 (Write_Entity_Flags): Add an entry for Ignore_SPARK_Mode_Pragmas.
2955 * einfo.ads Add new attribute Ignore_SPARK_Mode_Pragmas and update
2956 related entities.
2957 (Ignore_SPARK_Mode_Pragmas): New routine
2958 along with pragma Inline.
2959 (Set_Ignore_SPARK_Mode_Pragmas): New routine along with pragma Inline.
2960 * opt.ads Rename flag Ignore_Pragma_SPARK_Mode to
2961 Ignore_SPARK_Mode_Pragmas_In_Instance.
2962 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
2963 Save and restore the value of global flag
2964 Ignore_SPARK_Mode_Pragmas_In_Instance. Set or reinstate the value
2965 of global flag Ignore_SPARK_Mode_Pragmas_In_Instance when either
2966 the corresponding spec or the body must ignore all SPARK_Mode
2967 pragmas found within.
2968 (Analyze_Subprogram_Declaration): Mark
2969 the spec when it needs to ignore all SPARK_Mode pragmas found
2970 within to allow the body to infer this property in case it is
2971 instantiated or inlined later.
2972 * sem_ch7.adb (Analyze_Package_Body_Helper): Save and restore the
2973 value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set
2974 the value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance
2975 when the corresponding spec also ignored all SPARK_Mode pragmas
2976 found within.
2977 (Analyze_Package_Declaration): Mark the spec when
2978 it needs to ignore all SPARK_Mode pragmas found within to allow
2979 the body to infer this property in case it is instantiated or
2980 inlined later.
2981 * sem_ch12.adb (Analyze_Formal_Package_Declaration):
2982 Save and restore the value of flag
2983 Ignore_SPARK_Mode_Pragmas_In_Instance. Mark the
2984 formal spec when it needs to ignore all SPARK_Mode
2985 pragmas found within to allow the body to infer this
2986 property in case it is instantiated or inlined later.
2987 (Analyze_Package_Instantiation): Save and restore the value
2988 of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Mark
2989 the instance spec when it needs to ignore all SPARK_Mode
2990 pragmas found within to allow the body to infer this
2991 property in case it is instantiated or inlined later.
2992 (Analyze_Subprogram_Instantiation): Save and restore the value
2993 of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Mark the
2994 instance spec and anonymous package when they need to ignore
2995 all SPARK_Mode pragmas found within to allow the body to infer
2996 this property in case it is instantiated or inlined later.
2997 (Instantiate_Package_Body): Save and restore the value of global
2998 flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set the value of
2999 global flag Ignore_SPARK_Mode_Pragmas_In_Instance when the
3000 corresponding instance spec also ignored all SPARK_Mode pragmas
3001 found within.
3002 (Instantiate_Subprogram_Body): Save and restore the
3003 value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set
3004 the value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance
3005 when the corresponding instance spec also ignored all SPARK_Mode
3006 pragmas found within.
3007 * sem_prag.adb (Analyze_Pragma): Update the reference to
3008 Ignore_Pragma_SPARK_Mode.
3009 * sem_util.adb (SPARK_Mode_Is_Off): A construct which ignored
3010 all SPARK_Mode pragmas defined within yields mode "off".
3011
3012 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3013
3014 * bindgen.adb, exp_dbug.adb, errout.adb, fname.adb: Minor reformatting.
3015
3016 2017-04-25 Bob Duff <duff@adacore.com>
3017
3018 * exp_atag.adb (Build_CW_Membership): Add "Suppress =>
3019 All_Checks" to avoid generating unnecessary checks.
3020 * exp_ch4.adb (Expand_N_In, Make_Tag_Check): Add "Suppress =>
3021 All_Checks".
3022 * sem.ads: Fix comment.
3023 * expander.ads: Fix comment.
3024 * exp_atag.ads: Fix comment: "Index = 0" should be
3025 "Index >= 0".
3026
3027 2017-04-25 Gary Dismukes <dismukes@adacore.com>
3028
3029 * s-taprop-linux.adb: Minor editorial fixes.
3030
3031 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
3032
3033 * sem_util.adb (New_Copy_Tree): Put back the declarations of the
3034 hash tables at library level. Reinstate the NCT_Hash_Tables_Used
3035 variable and set it to True whenever the main hash table is
3036 populated. Short- circuit the Assoc function if it is false
3037 and add associated guards.
3038
3039 2017-04-25 Olivier Hainque <hainque@adacore.com>
3040
3041 * bindgen.adb (Gen_Elab_Calls): Also update counter of lone
3042 specs without elaboration code that have an elaboration counter
3043 nevertheless, e.g. when compiled with -fpreserve-control-flow.
3044 * sem_ch10.adb (Analyze_Compilation_Unit):
3045 Set_Elaboration_Entity_Required when requested to preserve
3046 control flow, to ensure the unit elaboration is materialized at
3047 bind time, resulting in the inclusion of the unit object file
3048 in the executable closure at link time.
3049
3050 2017-04-25 Pierre-Marie de Rodat <derodat@adacore.com>
3051
3052 * exp_dbug.adb: In Debug_Renaming_Declaration,
3053 when dealing with indexed component, accept to produce a renaming
3054 symbol when the index is an IN parameter or when it is a name
3055 defined in an outer scope.
3056
3057 2017-04-25 Yannick Moy <moy@adacore.com>
3058
3059 * errout.adb (Error_Msg): Adapt continuation
3060 message in instantiations and inlined bodies for info messages.
3061
3062 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
3063
3064 * fname.adb (Has_Internal_Extension): Add pragma Inline.
3065 Use direct 4-character slice comparisons.
3066 (Has_Prefix): Add
3067 pragma Inline. (Has_Suffix): Delete.
3068 (Is_Internal_File_Name):
3069 Test Is_Predefined_File_Name first.
3070 (Is_Predefined_File_Name):
3071 Use direct slice comparisons as much as possible and limit all
3072 comparisons to at most 8 characters.
3073
3074 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3075
3076 * checks.adb (Insert_Valid_Check): Code cleanup.
3077 * exp_ch6.adb (Add_Validation_Call_By_Copy_Code): New routine.
3078 (Expand_Actuals): Generate proper copy-back for a validation
3079 variable when it acts as the argument of a type conversion.
3080 * sem_util.adb (Is_Validation_Variable_Reference): Augment the
3081 predicate to operate on type qualifications.
3082
3083 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3084
3085 * sem_prag.adb, exp_ch6.adb, binde.adb, sem_disp.adb, s-fileio.adb:
3086 Minor reformatting.
3087
3088 2017-04-25 Bob Duff <duff@adacore.com>
3089
3090 * sem_prag.adb (No_Return): Give an error if the pragma applies
3091 to a body. Specialize the error for the specless body case,
3092 as is done for (e.g.) pragma Convention.
3093 * debug.adb: Add switch -gnatd.J to disable the above legality
3094 checks. This is mainly for use in our test suite, to avoid
3095 rewriting a lot of illegal (but working) code. It might also
3096 be useful to customers. Under this switch, if a pragma No_Return
3097 applies to a body, and the procedure raises an exception (as it
3098 should), the pragma has no effect. If the procedure does return,
3099 execution is erroneous.
3100
3101 2017-04-25 Bob Duff <duff@adacore.com>
3102
3103 * exp_ch6.adb (Expand_Actuals): This is the
3104 root of the problem. It took N as an 'in out' parameter, and in
3105 some cases, rewrote N, but then set N to Original_Node(N). So
3106 the node returned in N had no Parent. The caller continued
3107 processing of this orphaned node. In some cases that caused a
3108 crash (e.g. Remove_Side_Effects climbs up Parents in a loop,
3109 and trips over the Empty Parent). The solution is to make N an
3110 'in' parameter. Instead of rewriting it, return the list of
3111 post-call actions, so the caller can do the rewriting later,
3112 after N has been fully processed.
3113 (Expand_Call_Helper): Move most of Expand_Call here. It has
3114 too many premature 'return' statements, and we want to do the
3115 rewriting on return.
3116 (Insert_Post_Call_Actions): New procedure to insert the post-call
3117 actions in the appropriate place. In the problematic case,
3118 that involves rewriting N as an Expression_With_Actions.
3119 (Expand_Call): Call the new procedures Expand_Call_Helper and
3120 Insert_Post_Call_Actions.
3121
3122 2017-04-25 Ed Schonberg <schonberg@adacore.com>
3123
3124 * sem_prag.adb (Inherits_Class_Wide_Pre): Cleanup code, handle
3125 properly type derived from generic formal types, to handle
3126 properly modified version of ACATS 4.1B B611017.
3127
3128 2017-04-25 Javier Miranda <miranda@adacore.com>
3129
3130 * exp_unst.adb (Subp_Index): Adding missing
3131 support for renamings and functions that return a constrained
3132 array type (i.e. functions for which the frontend built a
3133 procedure with an extra out parameter).
3134
3135 2017-04-25 Pascal Obry <obry@adacore.com>
3136
3137 * s-string.adb: Minor code clean-up.
3138
3139 2017-04-25 Bob Duff <duff@adacore.com>
3140
3141 * s-os_lib.ads, s-os_lib.adb (Non_Blocking_Wait_Process): New
3142 procedure.
3143 * adaint.h, adaint.c (__gnat_portable_no_block_wait): C support
3144 function for Non_Blocking_Wait_Process.
3145
3146 2017-04-25 Bob Duff <duff@adacore.com>
3147
3148 * prep.adb (Preprocess): Remove incorrect
3149 Assert. Current character can be ASCII.CR.
3150
3151 2017-04-25 Ed Schonberg <schonberg@adacore.com>
3152
3153 * sem_prag.adb (Set_Convention_From_Pragma): Cleanup code for
3154 convention Stdcall, which has a number of exceptions. Convention
3155 is legal on a component declaration whose type is an anonymous
3156 access to subprogram.
3157
3158 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3159
3160 * sem_ch4.adb: sem_ch4.adb Various reformattings.
3161 (Try_One_Prefix_Interpretation): Use the base type when dealing
3162 with a subtype created for purposes of constraining a private
3163 type with discriminants.
3164
3165 2017-04-25 Javier Miranda <miranda@adacore.com>
3166
3167 * einfo.ads, einfo.adb (Has_Private_Extension): new attribute.
3168 * warnsw.ads, warnsw.adb (All_Warnings): Set warning on late
3169 dispatching primitives (Restore_Warnings): Restore warning on
3170 late dispatching primitives (Save_Warnings): Save warning on late
3171 dispatching primitives (Do_Warning_Switch): Use -gnatw.j/-gnatw.J
3172 to enable/disable this warning.
3173 (WA_Warnings): Set warning on late dispatching primitives.
3174 * sem_ch3.adb (Analyze_Private_Extension_Declaration): Remember
3175 that its parent type has a private extension.
3176 * sem_disp.adb (Warn_On_Late_Primitive_After_Private_Extension):
3177 New subprogram.
3178 * usage.adb: Document -gnatw.j and -gnatw.J.
3179
3180 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3181
3182 * exp_ch7.adb, checks.adb, sem_prag.adb, eval_fat.adb: Minor
3183 reformatting.
3184
3185 2017-04-25 Bob Duff <duff@adacore.com>
3186
3187 * binde.adb (Validate): Do not pass dynamic strings
3188 to pragma Assert, because older compilers do not support that.
3189
3190 2017-04-25 Bob Duff <duff@adacore.com>
3191
3192 * s-fileio.adb (Close): When a temp file is
3193 closed, delete it and clean up its Temp_File_Record immediately,
3194 rather than waiting until later.
3195 (Temp_File_Record): Add File
3196 component, so Close can know which Temp_File_Record corresponds
3197 to the file being closed.
3198 (Delete): Don't delete temp files,
3199 because they are deleted by Close.
3200 (Open): Set the File component
3201 of Temp_File_Record. This requires moving the creation of the
3202 Temp_File_Record to the end, after the AFCB has been created.
3203
3204 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3205
3206 * checks.adb (Insert_Valid_Check): Do not generate
3207 a validity check when inside a generic.
3208
3209 2017-04-25 Yannick Moy <moy@adacore.com>
3210
3211 * sem_res.adb (Resolve_Type_Conversion): Fix bad logic.
3212
3213 2017-04-25 Arnaud Charlet <charlet@adacore.com>
3214
3215 * snames.ads-tmpl (Snames): More names for detecting predefined
3216 potentially blocking subprograms.
3217
3218 2017-04-25 Ed Schonberg <schonberg@adacore.com>
3219
3220 * sem_prag.adb (Analyze_Pre_Post_Condition): The rules
3221 concerning inheritance of class-wide preconditions do not apply
3222 to postconditions.
3223
3224 2017-04-25 Bob Duff <duff@adacore.com>
3225
3226 * s-ficobl.ads: Minor comment fix.
3227
3228 2017-04-25 Yannick Moy <moy@adacore.com>
3229
3230 * checks.adb (Apply_Scalar_Range_Check): Analyze precisely
3231 conversions from float to integer in GNATprove mode.
3232 (Apply_Type_Conversion_Checks): Make sure in GNATprove mode
3233 to call Apply_Type_Conversion_Checks, so that range checks
3234 are properly positioned when needed on conversions, including
3235 when converting from float to integer. (Determine_Range): In
3236 GNATprove mode, take into account the possibility of conversion
3237 from float to integer.
3238 * sem_res.adb (Resolve_Type_Conversion): Only enforce range
3239 check on conversions from fixed-point to integer, not anymore
3240 on conversions from floating-point to integer, when in GNATprove
3241 mode.
3242
3243 2017-04-25 Yannick Moy <moy@adacore.com>
3244
3245 * checks.adb (Determine_Range_R): Special case type conversions
3246 from integer to float in order to get bounds in that case too.
3247 * eval_fat.adb (Machine): Avoid issuing warnings in GNATprove
3248 mode, for computations involved in interval checking.
3249
3250 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3251
3252 * checks.adb (Insert_Valid_Check): Partially reimplement validity
3253 checks.
3254 * einfo.adb Node36 is now used as Validated_Object.
3255 (Validated_Object): New routine.
3256 (Set_Validated_Object): New routine.
3257 (Write_Field36_Name): Add an entry for Validated_Object.
3258 * einfo.ads Add new attribute Validated_Object along with
3259 usage in entities.
3260 (Validated_Object): New routine along with pragma Inline.
3261 (Set_Validated_Object): New routine along with pragma Inline.
3262 * exp_attr.adb (Make_Range_Test): Add processing for validation
3263 variables to avoid extra reads and copies of the prefix.
3264 * exp_ch6.adb (Expand_Actuals): Add copy-back for validation
3265 variables in order to reflect any changes done in the variable
3266 back into the original object.
3267 * sem_util.adb (Is_Validation_Variable_Reference): New routine.
3268 * sem_util.ads (Is_Validation_Variable_Reference): New routine.
3269
3270 2017-04-25 Steve Baird <baird@adacore.com>
3271
3272 * exp_ch7.adb (Build_Array_Deep_Procs,
3273 Build_Record_Deep_Procs, Make_Finalize_Address_Body): Don't
3274 generate Finalize_Address routines for CodePeer.
3275
3276 2017-04-25 Ed Schonberg <schonberg@adacore.com>
3277
3278 * sem_prag.adb (Inherits_Class_Wide_Pre): subsidiary of
3279 Analyze_Pre_Post_Condition, to implement the legality checks
3280 mandated by AI12-0131: Pre'Class shall not be specified for an
3281 overriding primitive subprogram of a tagged type T unless the
3282 Pre'Class aspect is specified for the corresponding primitive
3283 subprogram of some ancestor of T.
3284
3285 2017-04-25 Bob Duff <duff@adacore.com>
3286
3287 * sem_ch8.adb (Use_One_Type): If a use_type_clause
3288 is redundant, set its Used_Operations to empty. This is only
3289 necessary for use clauses that appear in the parent of a generic
3290 child unit, because those use clauses get reanalyzed when we
3291 instantiate the generic, and we don't want the Used_Operations
3292 carried over from the original context (where it was probably
3293 not redundant).
3294
3295 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3296
3297 * exp_ch6.adb: Minor reformatting.
3298
3299 2017-04-25 Bob Duff <duff@adacore.com>
3300
3301 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
3302 Use Source_Index (Current_Sem_Unit) to find the correct casing.
3303 * exp_prag.adb (Expand_Pragma_Check): Use Source_Index
3304 (Current_Sem_Unit) to find the correct casing.
3305 * par.adb (Par): Null out Current_Source_File, to ensure that
3306 the above bugs won't rear their ugly heads again.
3307
3308 2017-04-25 Ed Schonberg <schonberg@adacore.com>
3309
3310 * sem_ch8.adb (Find_Type): For an attribute reference
3311 'Class, if prefix type is synchronized and previous errors
3312 have suppressed the creation of the corresponding record type,
3313 create a spurious class-wide for the synchonized type itself,
3314 to catch other misuses of the attribute
3315
3316 2017-04-25 Steve Baird <baird@adacore.com>
3317
3318 * exp_ch6.adb (Expand_Simple_Function_Return): if CodePeer_Mode
3319 is True, then don't generate the accessibility check for the
3320 tag of a tagged result.
3321 * exp_intr.adb (Expand_Dispatching_Constructor_Call):
3322 if CodePeer_Mode is True, then don't generate the
3323 tag checks for the result of call to an instance of
3324 Ada.Tags.Generic_Dispatching_Constructor (i.e., both the "is a
3325 descendant of" check and the accessibility check).
3326
3327 2017-04-25 Ed Schonberg <schonberg@adacore.com>
3328
3329 * sem_ch13.adb: Code cleanups.
3330 * a-strbou.ads: minor whitespace fix in Trim for bounded strings.
3331 * sem_ch8.ads: Minor comment fix.
3332
3333 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
3334
3335 * exp_ch4.adb (Library_Level_Target): New function.
3336 (Expand_Concatenate): When optimization is enabled, also expand
3337 the operation out-of-line if the concatenation is present within
3338 the expression of the declaration of a library-level object and
3339 not only if it is the expression of the declaration.
3340
3341 2017-04-25 Bob Duff <duff@adacore.com>
3342
3343 * freeze.adb (Freeze_Object_Declaration): Do
3344 not Remove_Side_Effects if there is a pragma Linker_Section,
3345 because in that case we want static initialization in the
3346 appropriate section.
3347
3348 2017-04-25 Gary Dismukes <dismukes@adacore.com>
3349
3350 * exp_dbug.adb: Minor rewording and reformatting.
3351
3352 2017-04-25 Ed Schonberg <schonberg@adacore.com>
3353
3354 * sem_attr.adb (Statically_Denotes_Object): New predicate, to
3355 handle the proposed changes to rules concerning potentially
3356 unevaluated expressions, to include selected components that
3357 do not depend on discriminants, and indexed components with
3358 static indices.
3359 * sem_util.adb (Is_Potentially_Unevaluated): Add check for
3360 predicate in quantified expression, and fix bugs in the handling
3361 of case expressions and membership test.
3362 (Analyze_Attribute_Old_Result): use new predicate.
3363 (Analyze_Attribute, case Loop_Entry): ditto.
3364
3365 2017-04-25 Bob Duff <duff@adacore.com>
3366
3367 * s-secsta.adb (SS_Info): Add a comment
3368 explaining why we don't need to walk all the chunks in order to
3369 compute the total size.
3370
3371 2017-04-25 Bob Duff <duff@adacore.com>
3372
3373 * namet.ads, namet.adb (Global_Name_Buffer): Increase the length
3374 of the global name buffer to 4*Max_Line_Length.
3375
3376 2017-04-25 Javier Miranda <miranda@adacore.com>
3377
3378 * exp_ch8.adb (Expand_N_Object_Renaming_Declaration): When creating a
3379 renaming entity for debug information, mark the entity as needing debug
3380 info if it comes from sources.
3381
3382 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3383
3384 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Remove the
3385 restriction converning the use of 'Address where the prefix is
3386 of a controlled type.
3387
3388 2017-04-25 Pierre-Marie de Rodat <derodat@adacore.com>
3389
3390 * exp_dbug.adb: In Debug_Renaming_Declaration,
3391 skip slices that are made redundant by an indexed component
3392 access.
3393 * atree.h: New definition for Original_Node.
3394
3395 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3396
3397 * sem_prag.adb, sem_prag.ads: Minor reformatting.
3398
3399 2017-04-25 Ed Schonberg <schonberg@adacore.com>
3400
3401 * sem_ch3.adb (Check_Entry_Contract): Call
3402 Preanalyze_Spec_Expression so that resolution takes place as well.
3403 * sem_util.adb (Check_Internal_Protected_Use): Reject properly
3404 internal calls that appear in preconditions of protected
3405 operations, in default values for same, and in contract guards
3406 for contract cases in SPARK.
3407
3408 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
3409
3410 * a-numaux.ads: Fix description of a-numaux-darwin
3411 and a-numaux-x86.
3412 (Double): Define to Long_Float.
3413 * a-numaux-vxworks.ads (Double): Likewise.
3414 * a-numaux-darwin.ads
3415 (Double): Likewise.
3416 * a-numaux-libc-x86.ads (Double): Define to Long_Long_Float.
3417 * a-numaux-x86.ads: Fix package description.
3418 * a-numaux-x86.adb (Is_Nan): Minor tweak.
3419 (Reduce): Adjust and complete description. Call Is_Nan instead of
3420 testing manually. Use an integer temporary to hold rounded value.
3421 * a-numaux-darwin.adb (Reduce): Likewise.
3422 (Is_Nan): New function.
3423
3424 2017-04-25 Ed Schonberg <schonberg@adacore.com>
3425
3426 * sem_ch4.adb (Analyze_Selected_Component): Additional refinement
3427 on analysis of prefix whose type is a current instance of a
3428 synchronized type, but where the prefix itself is an entity that
3429 is an object.
3430
3431 2017-04-25 Ed Schonberg <schonberg@adacore.com>
3432
3433 * exp_ch5.adb (Replace_Target): When rewriting the RHS, preserve
3434 the identity of callable entities therein, because they have been
3435 properly resolved, and prefixed calls may have been rewritten
3436 as normal calls.
3437
3438 2017-04-25 Patrick Bernardi <bernardi@adacore.com>
3439
3440 * exp_ch3.adb (Build_Init_Statements): Convert
3441 the expression of the pragma/aspect Secondary_Stack_Size to
3442 internal type System.Parameters.Size_Type before assigning
3443 it to the Secondary_Stack_Size component of the task type's
3444 corresponding record.
3445
3446 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
3447
3448 * sem_eval.adb (Compile_Time_Compare): Reinstate the expr+literal
3449 (etc) optimizations when the type is modular and the offsets
3450 are equal.
3451
3452 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
3453
3454 * s-osinte-freebsd.ads: Minor comment tweaks
3455
3456 2017-04-25 Javier Miranda <miranda@adacore.com>
3457
3458 * urealp.adb (UR_Write): Reverse previous patch
3459 adding documentation on why we generate multiplications instead
3460 of divisions (needed to avoid expressions whose computation with
3461 large numbers may cause division by 0).
3462
3463 2017-04-25 Bob Duff <duff@adacore.com>
3464
3465 * erroutc.adb (Set_Specific_Warning_Off,
3466 Set_Warnings_Mode_Off): Use the correct source file for
3467 Stop. Was using Current_Source_File, which is only valid during
3468 parsing. Current_Source_File will have a leftover value from
3469 whatever file happened to be parsed last, because of a with_clause
3470 or something.
3471
3472 2017-04-25 Bob Duff <duff@adacore.com>
3473
3474 * lib.ads, lib.adb (In_Internal_Unit): New functions similar
3475 to In_Predefined_Unit, but including GNAT units.
3476 * sem_util.ads, sem_util.adb (Should_Ignore_Pragma): Replace
3477 with Should_Ignore_Pragma_Par and Should_Ignore_Pragma_Sem,
3478 because Should_Ignore_Pragma was not working reliably outside
3479 the parser, because Current_Source_File is not valid.
3480 * sem_prag.adb, exp_prag.adb: Call Should_Ignore_Pragma_Sem.
3481 * par-prag.adb: Call Should_Ignore_Pragma_Par.
3482
3483 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
3484
3485 * gnat1drv.adb (Gnat1Drv): Disable Generate_Processed_File in
3486 codepeer mode.
3487
3488 2017-04-25 Javier Miranda <miranda@adacore.com>
3489
3490 * urealp.adb (UR_Write): Fix output of constants with a base other
3491 that 10.
3492
3493 2017-04-25 Justin Squirek <squirek@adacore.com>
3494
3495 * sem_ch13.adb (Get_Interfacing_Aspects): Moved to sem_util.adb.
3496 * sem_prag.adb (Analyze_Pragma, Process_Import_Or_Interface):
3497 Add extra parameter for Process_Interface_Name.
3498 (Process_Interface_Name): Add parameter for pragma to analyze
3499 corresponding aspect.
3500 * sem_util.ads, sem_util.adb (Get_Interfacing_Aspects): Added
3501 from sem_ch13.adb
3502
3503 2017-04-25 Gary Dismukes <dismukes@adacore.com>
3504
3505 * exp_ch7.adb, einfo.ads, sem_prag.adb: Minor reformatting and typo
3506 correction.
3507
3508 2017-04-25 Yannick Moy <moy@adacore.com>
3509
3510 * sem_res.adb (Resolve_Comparison_Op): Do not
3511 attempt evaluation of relational operations inside assertions.
3512
3513 2017-04-25 Justin Squirek <squirek@adacore.com>
3514
3515 * exp_util.adb (Add_Interface_Invariants):
3516 Restored, code moved back from Build_Invariant_Procedure_Body.
3517 (Add_Parent_Invariants): Restored, code moved back from
3518 Build_Invariant_Procedure_Body.
3519 (Build_Invariant_Procedure_Body):
3520 Remove refactored calls and integrated code from
3521 Add_Parent_Invariants and Add_Interface_Invariants.
3522
3523 2017-04-25 Johannes Kanig <kanig@adacore.com>
3524
3525 * errout.adb (Output_Messages): Adjust computation of total
3526 errors
3527 * erroutc.adb (Error_Msg): In statistics counts, deal
3528 correctly with informational messages that are not warnings.
3529 * errutil.adb (Finalize): adjust computation of total errors.
3530
3531 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
3532
3533 * terminals.c (__gnat_terminate_pid): New.
3534 * g-exptty.ads (Terminate_Process): New. Update comments.
3535
3536 2017-04-25 Arnaud Charlet <charlet@adacore.com>
3537
3538 * a-cfinve.ads, a-cofove.ads (Empty_Vector): add Global contract.
3539
3540 2017-04-25 Justin Squirek <squirek@adacore.com>
3541
3542 * sem_ch3.adb (Analyze_Declarations): Minor
3543 correction to comments, move out large conditional and scope
3544 traversal into a predicate.
3545 (Uses_Unseen_Lib_Unit_Priv): Predicate function made from extracted
3546 logic.
3547
3548 2017-04-25 Ed Schonberg <schonberg@adacore.com>
3549
3550 * sem_ch4.adb (Analyze_Selected_Component): Refine analysis
3551 of prefix whose type is a current instance of a synchronized
3552 type. If the prefix is an object this is an external call (or
3553 requeue) that can only access public operations of the object. The
3554 previous predicate was too restrictive, and did not allow public
3555 protected operations, only task entries.
3556
3557 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3558
3559 * sem_ch5.adb, fname.adb: Minor reformatting.
3560
3561 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3562
3563 * einfo.adb (Is_Anonymous_Access_Type): New routine.
3564 * einfo.ads Update the placement of
3565 E_Anonymous_Access_Subprogram_Type along with all subtypes that
3566 mention the ekind.
3567 (Is_Anonymous_Access_Type): New routine.
3568 * exp_ch7.adb (Allows_Finalization_Master): Do not generate a
3569 master for an access type subject to pragma No_Heap_Finalization.
3570 * exp_util.adb (Build_Allocate_Deallocate_Proc): An object being
3571 allocated or deallocated does not finalization actions if the
3572 associated access type is subject to pragma No_Heap_Finalization.
3573 * opt.ads Add new global variable No_Heap_Finalization_Pragma.
3574 * par-prag.adb Pragma No_Heap_Finalization does not need special
3575 processing from the parser.
3576 * sem_ch6.adb (Check_Return_Subtype_Indication): Remove ancient
3577 ??? comments. Use the new predicate Is_Anonymous_Access_Type.
3578 * sem_prag.adb Add an entry in table Sig_Flags for pragma
3579 No_Heap_Finalization.
3580 (Analyze_Pragma): Add processing for
3581 pragma No_Heap_Finalization. Update various error messages to
3582 use Duplication_Error.
3583 * sem_util.ads, sem_util.adb (No_Heap_Finalization): New routine.
3584 * snames.ads-tmpl: Add new predefined name No_Heap_Finalization
3585 and corresponding pragma id.
3586
3587 2017-04-25 Bob Duff <duff@adacore.com>
3588
3589 * freeze.adb (Freeze_Record_Type): Use the
3590 underlying type of the component type to determine whether it's
3591 elementary. For representation clause purposes, a private type
3592 should behave the same as its full type.
3593 * fname.ads, fname.adb (Is_Predefined_File_Name):
3594 Make sure things like "system.ali" are recognized as predefined.
3595
3596 2017-04-25 Javier Miranda <miranda@adacore.com>
3597
3598 * debug.adb: Update documentation of -gnatd.6.
3599
3600 2017-04-25 Ed Schonberg <schonberg@adacore.com>
3601
3602 * sem_ch5.adb (Preanalyze_Range): Handle properly an Ada2012
3603 element iterator when the name is an overloaded function call,
3604 one of whose interpretations yields an array.
3605
3606 2017-04-25 Bob Duff <duff@adacore.com>
3607
3608 * uname.ads, uname.adb (Is_Predefined_Unit_Name,
3609 Is_Internal_Unit_Name): New functions for operating on unit
3610 names, as opposed to file names. There's some duplicated code
3611 with fname.adb, which is unfortunate, but it seems like we don't
3612 want to add dependencies here.
3613 * fname-uf.adb (Get_File_Name): Change Is_Predefined_File_Name
3614 to Is_Predefined_Unit_Name; the former was wrong, because Uname
3615 is not a file name at all.
3616 * fname.ads, fname.adb: Document the fact that
3617 Is_Predefined_File_Name and Is_Internal_File_Name can be called
3618 for ALI files, and fix the code so it works properly for ALI
3619 files. E.g. these should return True for "system.ali".
3620
3621 2017-04-25 Justin Squirek <squirek@adacore.com>
3622
3623 * exp_util.adb (Add_Invariant): Removed,
3624 code moved to Add_Invariant_Check, Add_Inherited_Invariant,
3625 and Add_Own_Invariant. (Add_Invariant_Check): Used
3626 for adding runtime checks from any kind of invariant.
3627 (Add_Inherited_Invariant): Generates invariant checks for
3628 class-wide invariants (Add_Interface_Invariants): Removed, code
3629 moved to Build_Invariant_Procedure_Body (Add_Own_Invariant):
3630 Create a types own invariant procedure (Add_Parent_Invariants):
3631 Removed, code moved to Build_Invariant_Procedure_Body
3632 (Build_Invariant_Procedure_Body): Add refactored calls
3633 and integrated code from Add_Parent_Invariants and
3634 Add_Interface_Invariants.
3635 (Process_Type): Removed, the
3636 relavant code was inlined into both Add_Own_Invariant and
3637 Add_Inherited_Invariant.
3638
3639 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3640
3641 * make.adb, par-ch2.adb, sem_util.adb, scans.ads, sem_ch8.adb,
3642 scn.adb, osint.adb, fname.adb: Minor reformatting.
3643
3644 2017-04-25 Pascal Obry <obry@adacore.com>
3645
3646 * s-taprop-mingw.adb: Do not check for CloseHandle in
3647 Finalize_TCB.
3648
3649 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3650
3651 * sem_util.adb (Check_Part_Of_Reference):
3652 Continue to examine the context if the reference appears within
3653 an expression function.
3654
3655 2017-04-25 Justin Squirek <squirek@adacore.com>
3656
3657 * exp_ch7.adb, exp_ch7.ads Remove Build_Invariant_Procedure_Body
3658 and Build_Invariant_Procedure_Declaration.
3659 * exp_util.ads, exp_util.adb Add Build_Invariant_Procedure_Body
3660 and Build_Invariant_Procedure_Declaration from exp_ch7
3661 and break-out Is_Untagged_Private_Derivation from
3662 Build_Invariant_Procedure_Body.
3663 (Replace_Type_References):
3664 Append an extra parameter to allow for dispatching replacements
3665 and add the corrasponding logic.
3666 (Type_Invariant): Remove
3667 Replace_Typ_Refs and replace its references with calls to
3668 Replace_Type_References.
3669 * sem_ch3.adb, sem_prag.adb: Remove with and use of exp_ch7.
3670
3671 2017-04-25 Bob Duff <duff@adacore.com>
3672
3673 * sem_util.ads, sem_util.adb (Should_Ignore_Pragma): New function
3674 that returns True when appropriate.
3675 * par-prag.adb, exp_prag.adb, sem_prag.adb: Do not ignore pragmas
3676 when compiling predefined files.
3677 * fname.ads, fname.adb (Is_Predefined_File_Name): Fix bug:
3678 "gnat.adc" should not be considered a predefined file name.
3679 That required (or at least encouraged) a lot of cleanup of global
3680 variable usage. We shouldn't be communicating information via
3681 the global name buffer.
3682 * bindgen.adb, errout.adb, fname-uf.adb, lib-load.adb, make.adb,
3683 * restrict.adb, sem_ch10.adb, sem_ch6.adb, sem_ch8.adb: Changes
3684 required by the above-mentioned cleanup.
3685
3686 2017-04-25 Ed Schonberg <schonberg@adacore.com>
3687
3688 * osint.adb (Find_File): Handle properly a request for a
3689 configuration file whose name is a directory.
3690
3691 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3692
3693 * sem_attr.adb, sem_ch5.adb: Minor reformatting.
3694
3695 2017-04-25 Bob Duff <duff@adacore.com>
3696
3697 * types.ads: Minor: Fix '???' comment.
3698 * sem_ch8.adb: Minor comment fix.
3699
3700 2017-04-25 Bob Duff <duff@adacore.com>
3701
3702 * sem_prag.adb: Remove suspicious uses of Name_Buf.
3703 * stringt.ads, stringt.adb, exp_dbug.adb, sem_dim.adb: Remove
3704 Add_String_To_Name_Buffer, to avoid using the global Name_Buf.
3705 Add String_To_Name with no side effects.
3706
3707 2017-04-25 Justin Squirek <squirek@adacore.com>
3708
3709 * sem_ch3.adb (Analyze_Declarations): Add
3710 additional condition for edge case.
3711
3712 2017-04-25 Bob Duff <duff@adacore.com>
3713
3714 * par-ch2.adb, scans.ads, scn.adb: Do not give an error for
3715 reserved words inside pragmas. This is necessary to allow the
3716 pragma name Interface to be used in pragma Ignore_Pragma.
3717 * par.adb: Minor comment fix.
3718
3719 2017-04-25 Javier Miranda <miranda@adacore.com>
3720
3721 * a-tags.ads, a-tags.adb (Type_Is_Abstract): Renamed as Is_Abstract.
3722 * rtsfind.ads (RE_Type_Is_Abstract): Renamed as Is_Abstract.
3723 * exp_disp.adb (Make_DT): Update occurrences of RE_Type_Is_Abstract.
3724 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Update
3725 occurrences of RE_Type_Is_Abstract
3726
3727 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3728
3729 * exp_util.adb (Build_Chain): Account for ancestor
3730 subtypes while traversing the derivation chain.
3731
3732 2017-04-25 Ed Schonberg <schonberg@adacore.com>
3733
3734 * sem_attr.adb: minor reformatting.
3735
3736 2017-04-25 Doug Rupp <rupp@adacore.com>
3737
3738 * sigtramp-vxworks-target.inc [PPC64]: Add a .localentry pseudo-op.
3739
3740 2017-04-25 Ed Schonberg <schonberg@adacore.com>
3741
3742 * sem_ch5.adb (Analyze_Assignment): Reset Full_Analysis flag on
3743 the first pass over an assignment statement with target names,
3744 to prevent the generation of subtypes (such as discriminated
3745 record components)that may carry the target name outside of the
3746 tree for the assignment. The subtypes will be generated when
3747 the assignment is reanalyzed in full.
3748 (Analyze_Target_Name): Handle properly class-wide types.
3749
3750 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3751
3752 * elists.ads, elists.adb (Prepend_Unique_Elmt): New routine.
3753 * exp_ch3.adb (Freeze_Type): Signal the DIC body is created for
3754 the purposes of freezing.
3755 * exp_util.adb Update the documentation and structure of the
3756 type map used in class-wide semantics of assertion expressions.
3757 (Add_Inherited_Tagged_DIC): There is really no need to preanalyze
3758 and resolve the triaged expression because all substitutions
3759 refer to the proper entities. Update the replacement of
3760 references.
3761 (Build_DIC_Procedure_Body): Add formal parameter
3762 For_Freeze. Add local variable Build_Body. Inherited DIC pragmas
3763 are now only processed when freezing occurs. Build a body only
3764 when one is needed.
3765 (Entity_Hash): Removed.
3766 (Map_Types): New routine.
3767 (Replace_Object_And_Primitive_References): Removed.
3768 (Replace_References): New routine.
3769 (Replace_Type_References): Moved to the library level of Exp_Util.
3770 (Type_Map_Hash): New routine.
3771 (Update_Primitives_Mapping): Update the mapping call.
3772 (Update_Primitives_Mapping_Of_Types): Removed.
3773 * exp_util.ads (Build_DIC_Procedure_Body): Add formal
3774 parameter For_Freeze and update the comment on usage.
3775 (Map_Types): New routine.
3776 (Replace_References): New routine.
3777 (Replace_Type_References): Moved to the library level of Exp_Util.
3778 (Update_Primitives_Mapping_Of_Types): Removed.
3779 * sem_ch7.adb (Preserve_Full_Attributes): Propagate the DIC
3780 properties of the private type to the full view in case the full
3781 view derives from a parent type and inherits a DIC pragma.
3782 * sem_prag.adb (Analyze_Pragma): Guard against a case where a
3783 DIC pragma is placed at the top of a declarative region.
3784
3785 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
3786
3787 * a-tasatt.adb: Complete previous change and use an unsigned
3788 int to avoid overflow checks.
3789
3790 2017-04-25 Ed Schonberg <schonberg@adacore.com>
3791
3792 * sem_attr.adb (Analyze_Attribute, case 'Access): Specialize
3793 the error message when the attribute reference is an actual in
3794 a call to a subprogram inherited from a generic formal type with
3795 unknown discriminants, which makes the subprogram and its formal
3796 parameters intrinsic (see RM 6.3.1 (8) and (13)).
3797
3798 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3799
3800 * sem_aggr.adb, inline.adb, einfo.adb, einfo.ads, scng.adb,
3801 sem_prag.adb: Minor reformatting.
3802
3803 2017-04-25 Bob Duff <duff@adacore.com>
3804
3805 * sem_attr.adb (Type_Key): Add code in the
3806 recursive Compute_Type_Key to protect against fetching the source
3807 code for Standard, in case a component of the type is declared
3808 in Standard. There was already code to do this for the original
3809 type, but not for its components.
3810
3811 2017-04-25 Javier Miranda <miranda@adacore.com>
3812
3813 * exp_ch3.adb (Build_Initialization_Call): Handle
3814 subtypes of private types when searching for the underlying full
3815 view of a private type.
3816
3817 2017-04-25 Javier Miranda <miranda@adacore.com>
3818
3819 * sem_res.adb (Set_Mixed_Mode_Operand): A universal
3820 real conditional expression can appear in a fixed-type context
3821 and must be resolved with that context to facilitate the code
3822 generation to the backend.
3823
3824 2017-04-25 Ed Schonberg <schonberg@adacore.com>
3825
3826 * einfo.adb, einfo.ads (Body_Needed_For_Inlining): New flag,
3827 to indicate whether during inline processing, when some unit U1
3828 appears in the context of a unit U2 compiled for instantiation
3829 or inlining purposes, the body of U1 needs to be compiled as well.
3830 * sem_prag.adb (Process_Inline): Set Body_Needed_For_Inlining if
3831 context is a package declaration.
3832 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration,
3833 Analyze_Generic_Package_Declaration): ditto.
3834 * inline.adb (Analyze_Inlined_Bodies): Check
3835 Body_Needed_For_Inlining.
3836
3837 2017-04-25 Ed Schonberg <schonberg@adacore.com>
3838
3839 * par.adb (Current_Assign_Node): Global variable use to record
3840 the presence of a target_name in the right hand side of the
3841 assignment being parsed.
3842 * par-ch4.adb (P_Name): If the name is a target_name, mark the
3843 enclosing assignment node accordingly.
3844 * par-ch5.adb (P_Assignment_Statement): Set Current_Assign_Node
3845 appropriately.
3846 * sem_ch5.adb (Analyze_Assignment): Disable expansion before
3847 analyzing RHS if the statement has target_names.
3848 * sem_aggr.adb (Resolve_Iterated_Component_Association): Handle
3849 properly choices that are subtype marks.
3850 * exp_ch5.adb: Code cleanup.
3851
3852 2017-04-25 Bob Duff <duff@adacore.com>
3853
3854 * s-memory.adb: Add a comment regarding efficiency.
3855 * atree.adb: Fix the assertion, and combine 2 assertions into one,
3856 "the source has an extension if and only if the destination does."
3857 * sem_ch3.adb, sem_ch13.adb: Address ??? comments.
3858
3859 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
3860
3861 * a-tasatt.adb (Set_Value): Fix handling of 32bits -> 64bits
3862 conversion.
3863
3864 2017-04-25 Doug Rupp <rupp@adacore.com>
3865
3866 * init.c (__gnat_error_handler) [vxworks]: Turn on sigtramp
3867 handling for ppc64-vx7.
3868 * sigtramp-vxworks-target.inc
3869 [SIGTRAMP_BODY]: Add section for ppc64-vx7.
3870
3871 2017-04-25 Arnaud Charlet <charlet@adacore.com>
3872
3873 * ada_get_targ.adb: New file.
3874
3875 2017-04-25 Bob Duff <duff@adacore.com>
3876
3877 * uintp.adb (Most_Sig_2_Digits): In case Direct (Right), fetch
3878 Direct_Val (Right), instead of the incorrect Direct_Val (Left).
3879 (UI_GCD): Remove ??? comment involving possible efficiency
3880 improvements. This just isn't important after all these years.
3881 Also minor cleanup.
3882 * uintp.ads: Minor cleanup.
3883
3884 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3885
3886 * exp_util.adb, exp_util.ads, sem_ch7.adb, sem_prag.adb, exp_ch3.adb:
3887 Revert previous changes.
3888 * scng.adb: Minor reformatting.
3889 * s-stratt.ads: Fix unbalanced parens in comment.
3890
3891 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3892
3893 * sem_ch3.adb, exp_util.adb, sem_prag.adb, freeze.adb, sem_util.adb:
3894 Minor reformatting.
3895
3896 2017-04-25 Ed Schonberg <schonberg@adacore.com>
3897
3898 * scng.adb (Scan): Handle '@' appropriately.
3899 * sem_ch5.adb: Code cleanup.
3900
3901 2017-04-25 Ed Schonberg <schonberg@adacore.com>
3902
3903 * freeze.adb (Check_Expression_Function): Do not check for the
3904 use of deferred constants if the freezing of the expression
3905 function is triggered by its generated body, rather than a
3906 premature use.
3907
3908 2017-04-25 Javier Miranda <miranda@adacore.com>
3909
3910 * exp_attr.adb (Rewrite_Stream_Proc_Call): Handle
3911 subtypes of private types when performing the view conversion.
3912
3913 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3914
3915 * exp_ch3.adb (Freeze_Type): Signal the DIC body is created for
3916 the purposes of freezing.
3917 * exp_util.adb Update the documentation and structure of the
3918 type map used in class-wide semantics of assertion expressions.
3919 (Add_Inherited_Tagged_DIC): There is really no need to preanalyze
3920 and resolve the triaged expression because all substitutions
3921 refer to the proper entities. Update the replacement of
3922 references.
3923 (Build_DIC_Procedure_Body): Add formal parameter
3924 For_Freeze. Add local variable Build_Body. Inherited DIC pragmas
3925 are now only processed when freezing occurs. Build a body only
3926 when one is needed.
3927 (Entity_Hash): Removed.
3928 (Map_Types): New routine.
3929 (Replace_Object_And_Primitive_References): Removed.
3930 (Replace_References): New routine.
3931 (Replace_Type_References): Moved to the library level of Exp_Util.
3932 (Type_Map_Hash): New routine.
3933 (Update_Primitives_Mapping): Update the mapping call.
3934 (Update_Primitives_Mapping_Of_Types): Removed.
3935 * exp_util.ads (Build_DIC_Procedure_Body): Add formal
3936 parameter For_Freeze and update the comment on usage.
3937 (Map_Types): New routine.
3938 (Replace_References): New routine.
3939 (Replace_Type_References): Moved to the library level of Exp_Util.
3940 (Update_Primitives_Mapping_Of_Types): Removed.
3941 * sem_ch7.adb (Preserve_Full_Attributes): Propagate the DIC
3942 properties of the private type to the full view in case the full
3943 view derives from a parent type and inherits a DIC pragma.
3944 * sem_prag.adb (Analyze_Pragma): Guard against a case where a
3945 DIC pragma is placed at the top of a declarative region.
3946
3947 2017-04-25 Tristan Gingold <gingold@adacore.com>
3948
3949 * s-mmap.ads (Data): Add pragma Inline.
3950
3951 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3952
3953 * checks.adb (Insert_Valid_Check): Do not use
3954 a renaming to alias a volatile name because this will lead to
3955 multiple evaluations of the volatile name. Use a constant to
3956 capture the value instead.
3957
3958 2017-04-25 Doug Rupp <rupp@adacore.com>
3959
3960 * init.c [VxWorks Section]: Disable sigtramp for ppc64-vx7.
3961
3962 2017-04-25 Ed Schonberg <schonberg@adacore.com>
3963
3964 * exp_util.adb, exp_util.ads (Build_Class_Wide_Expression):
3965 Add out parameter to indicate to caller that a wrapper must
3966 be constructed for an inherited primitive whose inherited
3967 pre/postcondition has called to overridden primitives.
3968 * freeze.adb (Check_Inherited_Conditions): Build wrapper body
3969 for inherited primitive that requires it.
3970 * sem_disp.adb (Check_Dispatching_Operation): Such wrappers are
3971 legal primitive operations and belong to the list of bodies
3972 generated after the freeze point of a type.
3973 * sem_prag.adb (Build_Pragma_Check_Equivalent): Use new signature
3974 of Build_Class_Wide_Expression.
3975 * sem_util.adb, sem_util.ads (Build_Overriding_Spec): New procedure
3976 to construct the specification of the wrapper subprogram created
3977 for an inherited operation.
3978
3979 2017-04-25 Bob Duff <duff@adacore.com>
3980
3981 * s-osinte-linux.ads (pthread_mutexattr_setprotocol,
3982 pthread_mutexattr_setprioceiling): Add new interfaces for these
3983 pthread operations.
3984 * s-taprop-linux.adb (Initialize_Lock, Initialize_TCB): Set
3985 protocols as appropriate for Locking_Policy 'C' and 'I'.
3986 * s-taprop-posix.adb: Minor reformatting to make it more similar
3987 to s-taprop-linux.adb.
3988
3989 2017-04-25 Ed Schonberg <schonberg@adacore.com>
3990
3991 * sem_ch3.adb (Get_Discriminant_Value, Search_Derivation_Levels):
3992 Handle properly a multi- level derivation involving both renamed
3993 and constrained parent discriminants, when the type to be
3994 constrained has fewer discriminants that the ultimate ancestor.
3995
3996 2017-04-25 Bob Duff <duff@adacore.com>
3997
3998 * sem_util.adb (Is_Object_Reference): In the
3999 case of N_Explicit_Dereference, return False if it came from a
4000 conditional expression.
4001
4002 2017-04-25 Bob Duff <duff@adacore.com>
4003
4004 * par-ch4.adb (P_Case_Expression): If a semicolon
4005 is followed by "when", assume that ";" was meant to be ",".
4006
4007 2017-04-25 Gary Dismukes <dismukes@adacore.com>
4008
4009 * sem_ch9.adb, sem_ch10.adb, sem_util.adb: Minor reformatting and typo
4010 fixes.
4011
4012 2017-04-25 Arnaud Charlet <charlet@adacore.com>
4013
4014 * rtsfind.ads (SPARK_Implicit_Load): New procedure for forced
4015 loading of an entity.
4016 * rtsfind.adb (SPARK_Implicit_Load): Body with a pattern
4017 previously repeated in the analysis.
4018 * sem_ch9.adb (Analyze_Protected_Type_Declaration): use new
4019 procedure SPARK_Implicit_Load. (Analyze_Task_Type_Declaration):
4020 use new procedure SPARK_Implicit_Load.
4021 * sem_ch10.adb (Analyze_Compilation_Unit): Use new procedure
4022 SPARK_Implicit_Load.
4023
4024 2017-04-25 Javier Miranda <miranda@adacore.com>
4025
4026 * sem_util.adb (New_Copy_Tree): By default
4027 copying of defining identifiers is prohibited because
4028 this would introduce an entirely new entity into the
4029 tree. This patch introduces an exception to this general
4030 rule: the declaration of constants and variables located in
4031 Expression_With_Action nodes.
4032 (Copy_Itype_With_Replacement): Renamed as Copy_Entity_With_Replacement.
4033 (In_Map): New subprogram.
4034 (Visit_Entity): New subprogram.
4035 (Visit_Node): Handle EWA_Level,
4036 EWA_Inner_Scope_Level, and take care of defining entities defined
4037 in Expression_With_Action nodes.
4038
4039 2017-04-25 Thomas Quinot <quinot@adacore.com>
4040
4041 * exp_ch6.adb: minor comment edit.
4042 * sinfo.ads, sinfo.adb: New Null_Statement attribute for null
4043 procedure specifications that come from source.
4044 * par-ch6.adb (P_Subprogram, case of a null procedure): Set new
4045 Null_Statement attribute.
4046 * par_sco.adb (Traverse_Declarations_Or_Statements): For a null
4047 procedure, generate statement SCO for the generated NULL statement.
4048 * sem_ch6.adb (Analyze_Null_Procedure): Use null statement from
4049 parser, if available.
4050
4051 2017-04-04 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
4052
4053 * system-linux-s390.ads: Use Long_Integer'Size to define
4054 Memory_Size.
4055
4056 2017-04-04 Eric Botcazou <ebotcazou@adacore.com>
4057
4058 * sem_ch3.adb (Build_Derived_Record_Type): Fix long line.
4059
4060 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
4061
4062 * doc/gnat_ugn/gnat_and_program_execution.rst: Fix typo.
4063 * g-socket.adb (To_Host_Entry): Fix typo in comment.
4064 * gnat_ugn.texi: Fix typo.
4065 * raise.c (_gnat_builtin_longjmp): Fix capitalization in comment.
4066 * s-stposu.adb (Allocate_Any_Controlled): Fix typo in comment.
4067 * sem_ch3.adb (Build_Derived_Record_Type): Likewise.
4068 * sem_util.adb (Mark_Coextensions): Likewise.
4069 * sem_util.ads (Available_Full_View_Of_Component): Likewise.
4070
4071 2017-03-28 Andreas Schwab <schwab@suse.de>
4072
4073 PR ada/80117
4074 * system-linux-aarch64-ilp32.ads: New file.
4075 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS_COMMON): Rename
4076 from LIBGNAT_TARGET_PAIRS.
4077 (LIBGNAT_TARGET_PAIRS_32, LIBGNAT_TARGET_PAIRS_64): Define.
4078 (LIBGNAT_TARGET_PAIRS): Use LIBGNAT_TARGET_PAIRS_COMMON, and
4079 LIBGNAT_TARGET_PAIRS_64 or LIBGNAT_TARGET_PAIRS_32 for -mabi=lp64
4080 or -mabi=ilp32, resp.
4081
4082 2017-03-14 James Cowgill <James.Cowgill@imgtec.com>
4083
4084 * s-osinte-linux.ads (struct_sigaction): Use correct type for sa_flags.
4085
4086 2017-03-08 Thanassis Tsiodras <ttsiodras@gmail.com>
4087
4088 PR ada/79903
4089 * socket.c (__gnat_gethostbyaddr): Add missing test for __rtems__.
4090
4091 2017-03-08 Eric Botcazou <ebotcazou@adacore.com>
4092
4093 PR ada/79945
4094 * system-linux-ppc.ads (Default_Bit_Order): Use Standard's setting.
4095
4096 * system-linux-arm.ads (Default_Bit_Order): Likewise.
4097 * system-linux-mips.ads (Default_Bit_Order): Likewise.
4098 * system-linux-armeb.ads: Delete.
4099 * system-linux-mipsel.ads: Likewise.
4100 * gcc-interface/Makefile.in (MIPS/Linux): Adjust.
4101 (ARM/Linux): Likewise.
4102
4103 2017-02-24 Jakub Jelinek <jakub@redhat.com>
4104
4105 PR c/79677
4106 * gcc-interface/misc.c (gnat_handle_option): Pass true to
4107 handle_generated_option GENERATED_P.
4108
4109 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
4110
4111 * gcc-interface/decl.c (gnat_to_gnu_field): Do not remove the wrapper
4112 around a justified modular type if it doesn't have the same scalar
4113 storage order as the enclosing record type.
4114
4115 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
4116
4117 * gcc-interface/trans.c (gnat_to_gnu): Do not apply special handling
4118 of boolean rvalues to function calls.
4119
4120 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
4121
4122 * gcc-interface/utils.c (fold_bit_position): New function.
4123 (rest_of_record_type_compilation): Call it instead of bit_position to
4124 compute the field position and remove the call to remove_conversions.
4125 (compute_related_constant): Factor out the multiplication in both
4126 operands, if any, and streamline the final test.
4127
4128 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
4129
4130 * gcc-interface/trans.c (return_value_ok_for_nrv_p): Add sanity check.
4131
4132 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
4133
4134 * gcc-interface/decl.c: Include demangle.h.
4135 (is_cplusplus_method): Return again true for a primitive operation
4136 only if it is dispatching. For a subprogram with an interface name,
4137 call the demangler to get the number of C++ parameters and compare it
4138 with the number of Ada parameters.
4139
4140 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
4141
4142 * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): If
4143 there is no end label, put the location of the At_End procedure on
4144 the call to the procedure.
4145
4146 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
4147
4148 * gcc-interface/misc.c (gnat_type_max_size): Try to return a meaningful
4149 value for array types with TYPE_INDEX_TYPE set on their domain type.
4150 * gcc-interface/utils.c (max_size): For operations and expressions, do
4151 not build a new node if the operands have not changed or are missing.
4152
4153 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
4154
4155 * gcc-interface/utils.c (max_size) <tcc_expression>: Flip the second
4156 argument when recursing on TRUTH_NOT_EXPR.
4157
4158 2017-02-12 John Marino <gnugcc@marino.st>
4159
4160 * system-freebsd-x86.ads: Rename into...
4161 * system-freebsd.ads: ...this.
4162 (Default_Bit_Order): Define using Standard'Default_Bit_Order.
4163 * gcc-interface/Makefile.in: Support aarch64-freebsd.
4164 (x86-64/FreeBSD): Adjust to above renaming.
4165 (i386/FreeBSD): Likewise.
4166
4167 2017-02-09 Gerald Pfeifer <gerald@pfeifer.com>
4168
4169 * comperr.adb: Update FSF bug reporting URL.
4170
4171 2017-02-01 Eric Botcazou <ebotcazou@adacore.com>
4172 Jakub Jelinek <jakub@redhat.com>
4173
4174 PR ada/79309
4175 * adaint.c (__gnat_killprocesstree): Fix broken string handling.
4176
4177 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
4178
4179 PR lto/79061
4180 * gcc-interface/utils.c (get_global_context): Pass main_input_filename
4181 to build_translation_unit_decl.
4182
4183 2017-01-23 Javier Miranda <miranda@adacore.com>
4184
4185 * sem_util.adb (New_Copy_Tree): Code cleanup:
4186 removal of the internal map (ie. variable Actual_Map, its
4187 associated local variables, and all the code handling it).
4188 * sem_ch9.adb (Analyze_Task_Type_Declaration): in GNATprove mode
4189 force loading of the System package when processing a task type.
4190 (Analyze_Protected_Type_Declaration): in GNATprove mode force
4191 loading of the System package when processing a protected type.
4192 * sem_ch10.adb (Analyze_Compilation_Unit): in GNATprove mode
4193 force loading of the System package when processing compilation
4194 unit with a main-like subprogram.
4195 * frontend.adb (Frontend): remove forced loading of the System
4196 package.
4197
4198 2017-01-23 Ed Schonberg <schonberg@adacore.com>
4199
4200 * sem_prag.adb (Default_Initial_Condition): If the desired type
4201 declaration is a derived type declaration with discriminants,
4202 it is rewritten as a private type declaration.
4203 * sem_ch13.adb (Replace_Type_References_Generic,
4204 Visible_Component): A discriminated private type with descriminnts
4205 has components that must be rewritten as selected components
4206 if they appear as identifiers in an aspect expression such as
4207 a Default_Initial_Condition.
4208 * sem_util.adb (Defining_Entity): support N_Iterator_Specification
4209 nodes.
4210
4211 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
4212
4213 * ghost.ads, ghost.adb (Is_Ignored_Ghost_Unit): New routine.
4214 * gnat1drv.adb Generate an empty object file for an ignored
4215 Ghost compilation unit.
4216 * inline.adb, sem_util.adb, sem_ch4.adb: Minor reformatting.
4217
4218 2017-01-23 Yannick Moy <moy@adacore.com>
4219
4220 * sem_ch4.adb (Analyze_Indexed_Component_Form):
4221 Adapt to inlined prefix with string literal subtype.
4222 * inline.adb (Expand_Inlined_Call): Keep unchecked
4223 conversion inside inlined call when formal type is constrained.
4224
4225 2017-01-23 Javier Miranda <miranda@adacore.com>
4226
4227 * sem_util.adb (New_Copy_Tree): Code cleanup:
4228 removal of global variables. All the global variables, global
4229 functions and tables of this subprogram are now declared locally.
4230
4231 2017-01-23 Gary Dismukes <dismukes@adacore.com>
4232
4233 * exp_strm.ads: Minor reformatting and typo fixes.
4234
4235 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
4236
4237 * sem_aggr.adb, par_sco.adb, exp_util.adb, sem.adb, sem_ch4.adb,
4238 exp_aggr.adb: Minor reformatting.
4239 * g-diopit.adb: minor grammar/punctuation fix in comment.
4240 * g-byorma.ads: minor fix of unbalanced parens in comment.
4241
4242 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
4243
4244 * par.adb: Update the documentation of component Labl.
4245 * par-ch6.adb (P_Return_Statement): Set the expected label of
4246 an extended return statement to Error.
4247
4248 2017-01-23 Tristan Gingold <gingold@adacore.com>
4249
4250 * s-boustr.ads, s-boustr.adb (Is_Full): New function.
4251
4252 2017-01-23 Ed Schonberg <schonberg@adacore.com>
4253
4254 * expander.adb: Handle N_Delta_Aggregate.
4255
4256 2017-01-23 Javier Miranda <miranda@adacore.com>
4257
4258 * exp_ch6.adb (Expand_Call): Improve the code that
4259 checks if some formal of the called subprogram is a class-wide
4260 interface, to handle subtypes of class-wide interfaces.
4261
4262 2017-01-23 Javier Miranda <miranda@adacore.com>
4263
4264 * checks.adb (Apply_Parameter_Aliasing_Checks):
4265 Remove side effects of the actuals before generating the overlap
4266 check.
4267
4268 2017-01-23 Justin Squirek <squirek@adacore.com>
4269
4270 * exp_strm.ads, exp_strm.ads
4271 (Build_Record_Or_Elementary_Input_Function): Add an extra parameter so
4272 as to avoid getting the underlying type by default.
4273 * exp_attr.adb (Expand_N_Attribute_Reference): Remove use of
4274 underlying type in the Iiput and output attribute cases when
4275 building their respective functions.
4276
4277 2017-01-23 Gary Dismukes <dismukes@adacore.com>
4278
4279 * scng.adb: Minor reformatting of error message.
4280
4281 2017-01-23 Ed Schonberg <schonberg@adacore.com>
4282
4283 * sem_ch6.adb (Analyze_Expression_Function): Do not attempt
4284 to freeze the return type of an expression funxtion that is a
4285 completion, if the type is a limited view and the non-limited
4286 view is available.
4287
4288 2017-01-23 Ed Schonberg <schonberg@adacore.com>
4289
4290 * par-ch4.adb (P_Aggregate_Or_Parent_Expr): Recognize delta
4291 aggregate construct.
4292 (P_Record_Or_Array_Component_Association): An array aggregate
4293 can start with an Iterated_Component_Association.
4294 * scng.adb: Modify error message on improper use of @ in earlier
4295 versions of the language.
4296 * sinfo.ads: New node kind N_Delta_Aggregate.
4297 * sinfo.adb: An N_Delta_Aggregate has component associations and
4298 an expression.
4299 * sem_res.adb (Resolve): Call Resolve_Delta_Aggregate.
4300 * sem_aggr.ads, sem_aggr.adb (Resolve_Iterated_Component_Association):
4301 Create a new index for each one of the choices in the association,
4302 to prevent spurious homonyms in the scope.
4303 (Resolve_Delta_Aggregate): New.
4304 * sem.adb: An N_Delta_Aggregate is analyzed like an aggregate.
4305 * exp_util.adb (Insert_Actions): Take into account
4306 N_Delta_Aggregate.
4307 * exp_aggr.ads: New procedure Expand_N_Delta_Aggregate.
4308 * exp_aggr.adb: New procedure Expand_N_Delta_Aggregate,
4309 and local procedures Expand_Delta_Array_Aggregate and
4310 expand_Delta_Record_Aggregate.
4311 * sprint.adb: Handle N_Delta_Aggregate.
4312
4313 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
4314
4315 * exp_ch11.adb (Expand_N_Exception_Declaration): Generate an
4316 empty name when the exception declaration is subject to pragma
4317 Discard_Names.
4318 (Null_String): New routine.
4319
4320 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
4321
4322 * par-ch9.adb (P_Protected_Definition): Parse
4323 any optional and potentially illegal pragmas which appear in
4324 a protected operation declaration list.
4325 (P_Task_Items): Parse
4326 any optional and potentially illegal pragmas which appear in a
4327 task item list.
4328
4329 2017-01-23 Pascal Obry <obry@adacore.com>
4330
4331 * s-taprop-mingw.adb (Enter_Task): Initialize the Thread handle which
4332 is needed when a foreign thread call a Win32 API using a thread handle
4333 like GetThreadTimes() for example.
4334
4335 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
4336
4337 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
4338 allow an 'Address clause to be specified on a prefix of a
4339 class-wide type.
4340
4341 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
4342
4343 * checks.adb (Insert_Valid_Check): Ensure that the prefix of
4344 attribute 'Valid is a renaming of the original expression when
4345 the expression denotes a name. For all other kinds of expression,
4346 use a constant to capture the value.
4347 * exp_util.adb (Is_Name_Reference): Moved to Sem_Util.
4348 * sem_util.ads, sem_util.adb (Is_Name_Reference): Moved from Exp_Util.
4349
4350 2017-01-23 Justin Squirek <squirek@adacore.com>
4351
4352 * sem_eval.adb (Eval_Integer_Literal): Add special
4353 case to avoid optimizing out check if the literal appears in
4354 an if-expression.
4355
4356 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
4357
4358 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
4359 allow an 'Address clause to be specified on a prefix of a
4360 class-wide type.
4361
4362 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
4363
4364 * checks.adb (Insert_Valid_Check): Ensure that the prefix of
4365 attribute 'Valid is a renaming of the original expression when
4366 the expression denotes a name. For all other kinds of expression,
4367 use a constant to capture the value.
4368 * exp_util.adb (Is_Name_Reference): Moved to Sem_Util.
4369 * sem_util.ads, sem_util.adb (Is_Name_Reference): Moved from Exp_Util.
4370
4371 2017-01-23 Justin Squirek <squirek@adacore.com>
4372
4373 * sem_eval.adb (Eval_Integer_Literal): Add special
4374 case to avoid optimizing out check if the literal appears in
4375 an if-expression.
4376
4377 2017-01-23 Ed Schonberg <schonberg@adacore.com>
4378
4379 * sem_ch4.adb (Try_Primitive_Operations,
4380 Is_Valid_First_Argument_Of): argument is valid if it is a derived
4381 type with unknown discriminants that matches its underlying
4382 record view.
4383 * exp_util.adb (Expand_Subtype_From_Expr): Do not expand
4384 expression if its type is derived from a limited type with
4385 unknown discriminants, because the expansion (which is a call)
4386 must be expanded in the enclosing context to add the proper build-
4387 in-place parameters to the call.
4388 * lib.ads, exp_ch9.adb: Minor fixes in comments.
4389
4390 2017-01-23 Yannick Moy <moy@adacore.com>
4391
4392 * frontend.adb (Frontend): Do not load runtime
4393 unit for GNATprove when parsing failed.
4394 * exp_ch9.adb: minor removal of extra whitespace
4395 * exp_ch6.adb: minor typo in comment
4396 * sem_util.adb: Code cleanup.
4397 * exp_ch9.ads, par-ch2.adb: minor style fixes in whitespace and comment
4398 * a-ngcefu.adb: minor style fix in whitespace
4399
4400 2017-01-23 Thomas Quinot <quinot@adacore.com>
4401
4402 * scos.ads: Document usage of 'd' as default SCO kind for
4403 declarations.
4404 * par_sco.adb (Traverse_Declarations_Or_Statements.
4405 Traverse_Degenerate_Subprogram): New supporting routine for expression
4406 functions and null procedures.
4407 (Traverse_Declarations_Or_Statements.Traverse_One): Add
4408 N_Expression_Function to the subprogram case; add required
4409 support for null procedures and expression functions.
4410
4411 2017-01-23 Bob Duff <duff@adacore.com>
4412
4413 * namet.ads (Bounded_String): Decrease the size of type
4414 Bounded_String to avoid running out of stack space.
4415 * namet.ads (Append): Don't ignore buffer overflow; raise
4416 Program_Error instead.
4417
4418 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
4419
4420 * exp_ch5.adb, freeze.adb, par-ch4.adb, scng.adb, sem_ch13.adb,
4421 sem_ch3.adb, sem_ch5.adb, sem_ch5.ads, sem_util.adb, sinfo.ads: Minor
4422 reformatting.
4423 * exp_ch9.adb: minor style fix in comment.
4424
4425 2017-01-23 Ed Schonberg <schonberg@adacore.com>
4426
4427 * sem_ch4.adb (Analyze_Allocator): Handle properly a type derived
4428 for a limited record extension with unknown discriminants whose
4429 full view has no discriminants.
4430
4431 2017-01-23 Yannick Moy <moy@adacore.com>
4432
4433 * exp_spark.adb: Alphabetize with clauses.
4434
4435 2017-01-23 Yannick Moy <moy@adacore.com>
4436
4437 * sem_util.adb (Has_Enabled_Property): Treat
4438 protected objects and variables differently from other variables.
4439
4440 2017-01-23 Thomas Quinot <quinot@adacore.com>
4441
4442 * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order):
4443 Split original Ada 95 part off into new subprogram
4444 below. Call that subprogram (instead of proceeding with
4445 AI95-0133 behaviour) if debug switch -gnatd.p is in use.
4446 (Adjust_Record_For_Reverse_Bit_Order_Ada_95): ... new subprogram
4447 * debug.adb Document new switch -gnatd.p
4448 * freeze.adb (Freeze_Entity.Freeze_Record_Type): Do not adjust
4449 record for reverse bit order if an error has already been posted
4450 on the record type. This avoids generating extraneous "info:"
4451 messages for illegal code.
4452
4453 2017-01-23 Justin Squirek <squirek@adacore.com>
4454
4455 * sem_ch3.adb (Analyze_Declarations): Correct comments
4456 * freeze.adb (Find_Constant): Add detection of deferred constants
4457 so they are not incorrectly flagged as premature.
4458
4459 2017-01-23 Ed Schonberg <schonberg@adacore.com>
4460
4461 * scans.ads: New token At_Sign. Remove '@' from list of illegal
4462 characters for future version of the language. '@' is legal name.
4463 * scng.ads, scng.adb (Scan): Handle '@' appropriately.
4464 * scn.adb (Scan_Reserved_Identifier): An occurrence of '@'
4465 denotes a Target_Name.
4466 * par-ch4.adb (P_Name, P_Primary): Handle Target_Name.
4467 * sinfo.ads, sinfo.adb (N_Target_Name): New non-terminal node.
4468 (Has_Target_Names): New flag on N_Assignment_Statement, to
4469 indicate that RHS has occurrences of N_Target_Name.
4470 * sem.adb: Call Analyze_Target_Name.
4471 * sem_ch5.ads, sem_ch5.adb (Analyze_Target_Name): New subpogram.
4472 (urrent_LHS): Global variable that denotes LHS of assignment,
4473 used in the analysis of Target_Name nodes.
4474 * sem_res.adb (Resolve_Target_Name): New procedure.
4475 * exp_ch5.adb (Expand_Assign_With_Target_Names): (AI12-0125):
4476 N is an assignment statement whose RHS contains occurences of @
4477 that designate the value of the LHS of the assignment. If the
4478 LHS is side-effect free the target names can be replaced with
4479 a copy of the LHS; otherwise the semantics of the assignment
4480 is described in terms of a procedure with an in-out parameter,
4481 and expanded as such.
4482 (Expand_N_Assignment_Statement): Call
4483 Expand_Assign_With_Target_Names when needed.
4484 * exp_util.adb (Insert_Actions): Take into account N_Target_Name.
4485 * sprint.adb: Handle N_Target_Name.
4486
4487 2017-01-23 Eric Botcazou <ebotcazou@adacore.com>
4488
4489 * checks.adb: Minor fix in comment.
4490
4491 2017-01-23 Philippe Gil <gil@adacore.com>
4492
4493 * g-debpoo.adb (Do_Report) remove freed chunks from chunks
4494 count in Sort = Memory_Usage or Allocations_Count
4495
4496 2017-01-23 Justin Squirek <squirek@adacore.com>
4497
4498 * sem_ch3.adb: Code cleanup.
4499
4500 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
4501
4502 * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Move all global
4503 variables to the local variable section. Update the profile
4504 of various nested routine that previously had visibility
4505 of those globals. One the matching phase has completed,
4506 remove certain classes of clauses which are considered noise.
4507 (Check_Dependency_Clause): Properly detect a match between two
4508 'Result attributes. Update the various post-match cases to use
4509 Is_Already_Matched as this routine now automatically recognizes
4510 a previously matched 'Result attribute.
4511 (Is_Already_Matched): New routine.
4512 (Remove_Extra_Clauses): New routine.
4513 (Report_Extra_Clauses): Remove the detection of ... => null
4514 clauses as this is now done in Remove_Extra_Clauses.
4515
4516 2017-01-23 Ed Schonberg <schonberg@adacore.com>
4517
4518 * sem_aggr.adb (Resolve_Array_Aggregate): In ASIS mode do not
4519 report on spurious overlaps between values involving a subtype
4520 with a static predicate, because the expansion of such a subtype
4521 into individual ranges in inhibited in ASIS mode.
4522
4523 2017-01-23 Justin Squirek <squirek@adacore.com>
4524
4525 * sem_ch3.adb (Analyze_Declarations): Add detection
4526 of an edge case and delay freezing if it is present.
4527
4528 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
4529
4530 * sem_ch3.adb, exp_spark.adb, exp_attr.adb, sem_ch9.adb, sem_prag.adb,
4531 sem_util.adb, sem_warn.adb, exp_ch3.adb: Minor reformatting.
4532
4533 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
4534
4535 * freeze.adb (Freeze_Subprogram): Ensure that all anonymous
4536 access-to-subprogram types inherit the convention of the
4537 associated subprogram. (Set_Profile_Convention): New routine.
4538 * sem_ch6.adb (Check_Conformance): Do not compare the conventions
4539 of the two entities directly, use Conventions_Match to account
4540 for anonymous access-to-subprogram and subprogram types.
4541 (Conventions_Match): New routine.
4542
4543 2017-01-23 Claire Dross <dross@adacore.com>
4544
4545 * exp_spark.adb (Expand_SPARK_Attribute_Reference): For attributes
4546 which return Universal_Integer, force the overflow check flag for
4547 Length and Range_Length for types as big as Long_Long_Integer.
4548
4549 2017-01-23 Claire Dross <dross@adacore.com>
4550
4551 * exp_spark.adb (Expand_SPARK_Attribute_Reference): For
4552 attributes which return Universal_Integer, introduce a conversion
4553 to the expected type with the appropriate check flags set.
4554 * sem_res.adb (Resolve_Range): The higher bound can be in Typ's
4555 base type if the range is null. It may still be invalid if it
4556 is higher than the lower bound. This is checked later in the
4557 context in which the range appears.
4558
4559 2017-01-23 Pierre-Marie de Rodat <derodat@adacore.com>
4560
4561 * scos.ads: Introduce a constant to represent ignored
4562 dependencies in SCO_Unit_Table_Entry.
4563
4564 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
4565
4566 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Remove extra
4567 spaces from error messages.
4568
4569 2017-01-23 Ed Schonberg <schonberg@adacore.com>
4570
4571 * exp_ch3.adb (Check_Large_Modular_Array): New procedure,
4572 subsidiary to Expand_N_Object_ Declaration, to compute a guard on
4573 an object declaration for an array type with a modular index type
4574 with the size of Long_Long_Integer. Special processing is needed
4575 in this case to compute reliably the size of the object, and
4576 eventually to raise Storage_Error, when wrap-around arithmetic
4577 might compute a meangingless size for the object.
4578
4579 2017-01-23 Justin Squirek <squirek@adacore.com>
4580
4581 * a-wtenau.adb, par-endh.adb, sem_prag.adb,
4582 sem_type.adb: Code cleanups.
4583
4584 2017-01-23 Bob Duff <duff@adacore.com>
4585
4586 * sem_res.adb (Resolve_Call): In the part of the code where
4587 it is deciding whether to turn the call into an indexed
4588 component, avoid doing so if the call is to an instance of
4589 Unchecked_Conversion. Otherwise, the compiler turns it into an
4590 indexed component, and resolution of that turns it back into a
4591 function call, and so on, resulting in infinite recursion.
4592 * sem_util.adb (Needs_One_Actual): If the first formal has a
4593 default, then return False.
4594
4595 2017-01-21 Eric Botcazou <ebotcazou@adacore.com>
4596
4597 * sem_eval.adb (Compile_Time_Compare): Reinstate the expr+literal (etc)
4598 optimizations when the type is modular and the offsets are equal.
4599
4600 2017-01-20 Thomas Quinot <quinot@adacore.com>
4601
4602 * sem_warn.adb (Warn_On_Useless_Assignment): Adjust wording of warning
4603 message.
4604
4605 2017-01-20 Nicolas Roche <roche@adacore.com>
4606
4607 * terminals.c: Ignore failures on setpgid and tcsetpgrp commands.
4608
4609 2017-01-20 Bob Duff <duff@adacore.com>
4610
4611 * sem_eval.adb (Compile_Time_Compare): Disable the expr+literal
4612 (etc) optimizations when the type is modular.
4613
4614 2017-01-20 Yannick Moy <moy@adacore.com>
4615
4616 * sem_ch6.adb (Move_Pragmas): move some pragmas,
4617 but copy the SPARK_Mode pragma instead of moving it.
4618 (Build_Subprogram_Declaration): Ensure that the generated spec
4619 and original body share the same SPARK_Pragma aspect/pragma.
4620 * sem_util.adb, sem_util.ads (Copy_SPARK_Mode_Aspect): New
4621 procedure to copy SPARK_Mode aspect.
4622
4623 2017-01-20 Bob Duff <duff@adacore.com>
4624
4625 * sem_ch3.adb (Analyze_Declarations): Disable Resolve_Aspects
4626 even in ASIS mode.
4627 * sem_ch13.adb (Resolve_Name): Enable setting the entity to
4628 Empty even in ASIS mode.
4629
4630 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
4631
4632 * exp_ch9.adb: minor style fixes in comments.
4633 * sem_ch9.adb (Analyze_Delay_Relative): in GNATprove mode a delay
4634 relative statement introduces an implicit dependency on
4635 Ada.Real_Time.Clock_Time.
4636 * sem_util.adb: Minor reformatting.
4637
4638 2017-01-20 Ed Schonberg <schonberg@adacore.com>
4639
4640 * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect Alignment
4641 must be treated as delayed aspect even if the expression is
4642 a literal, because the aspect affects the freezing and the
4643 elaboration of the object to which it applies.
4644
4645 2017-01-20 Tristan Gingold <gingold@adacore.com>
4646
4647 * s-osinte-vxworks.ads (Interrup_Range): New subtype.
4648
4649 2017-01-20 Ed Schonberg <schonberg@adacore.com>
4650
4651 * lib-xref.adb (Generate_Reference): Do not warn about the
4652 presence of a pragma Unreferenced if the entity appears as the
4653 actual in a procedure call that does not come from source.
4654
4655 2017-01-20 Pascal Obry <obry@adacore.com>
4656
4657 * expect.c, terminals.c: Fix some warnings about unused variables.
4658 * gsocket.h, adaint.c, adaint.h: Fix some more warnings in the C part
4659 of the runtime.
4660
4661 2017-01-20 Bob Duff <duff@adacore.com>
4662
4663 * exp_attr.adb (Constrained): Apply an access check (check that
4664 the prefix is not null) when the prefix denotes an object of an
4665 access type; that is, when there is an implicit dereference.
4666
4667 2017-01-20 Gary Dismukes <dismukes@adacore.com>
4668
4669 * s-rident.ads (constant Profile_Info): Remove
4670 No_Calendar from GNAT_Extended_Ravenscar restrictions.
4671
4672 2017-01-20 Tristan Gingold <gingold@adacore.com>
4673
4674 * s-maccod.ads: Add pragma No_Elaboration_Code_All
4675
4676 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
4677
4678 * ghost.adb (Mark_Ghost_Clause): New routine.
4679 (Prune_Node): Do not prune compilation unit nodes.
4680 (Remove_Ignored_Ghost_Code): Prune the compilation unit node directly.
4681 This does not touch the node itself, but does prune all its fields.
4682 * ghost.ads (Mark_Ghost_Clause): New routine.
4683 * sem_ch8.adb (Analyze_Use_Package): Emit an error when a use
4684 package clause mentions Ghost and non-Ghost packages. Mark a
4685 use package clause as Ghost when it mentions a Ghost package.
4686 (Analyze_Use_Type): Emit an error when a use type clause mentions
4687 Ghost and non-Ghost types. Mark a use type clause as Ghost when
4688 it mentions a Ghost type.
4689 * sem_ch10.adb (Analyze_With_Clause): Mark a with clause as
4690 Ghost when it withs a Ghost unit.
4691
4692 2017-01-20 Javier Miranda <miranda@adacore.com>
4693
4694 * sem_res.adb (Resolve_Call): If a function call
4695 returns a limited view of a type and at the point of the call the
4696 function is not declared in the extended main unit then replace
4697 it with the non-limited view, which must be available. If the
4698 called function is in the extended main unit then no action is
4699 needed since the back-end handles this case.
4700
4701 2017-01-20 Eric Botcazou <ebotcazou@adacore.com>
4702
4703 * sem_ch7.adb (Contains_Subp_Or_Const_Refs): Rename into...
4704 (Contains_Subprograms_Refs): ...this. Adjust comment
4705 for constants. (Is_Subp_Or_Const_Ref): Rename into...
4706 (Is_Subprogram_Ref): ...this.
4707 (Has_Referencer): Rename Has_Non_Subp_Const_Referencer variable into
4708 Has_Non_Subprograms_Referencer and adjust comment. Remove
4709 incorrect shortcut for package declarations and bodies.
4710
4711 2017-01-20 Ed Schonberg <schonberg@adacore.com>
4712
4713 * sem_ch3.adb (Complete_Private_Subtype): If the scope of the
4714 base type differs from that of the completion and the private
4715 subtype is an itype (created for a constraint on an access
4716 type e.g.), set Delayed_Freeze on both to prevent out-of-scope
4717 anomalies in gigi.
4718
4719 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
4720
4721 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
4722 When inheriting the SPARK_Mode of a prior expression function,
4723 look at the properly resolved entity rather than the initial
4724 candidate which may denote a homonym.
4725
4726 2017-01-20 Ed Schonberg <schonberg@adacore.com>
4727
4728 * sem_prag.adb (Rewrite_Assertion_Kind): If the name is
4729 Precondition or Postcondition, and the context is pragma
4730 Check_Policy, indicate that this Pre-Ada2012 usage is deprecated
4731 and suggest the standard names Assertion_Policy /Pre /Post
4732 instead.
4733
4734 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
4735
4736 * sem_ch10.adb, sem_cat.adb: Minor reformatting.
4737
4738 2017-01-20 Javier Miranda <miranda@adacore.com>
4739
4740 * sem_ch3.adb (Access_Type_Declaration): Protect access to the
4741 Entity attribute.
4742 * sem_ch10.adb (Install_Siblings): Skip processing malformed trees.
4743 * sem_cat.adb (Validate_Categoriztion_Dependency): Skip processing
4744 malformed trees.
4745
4746 2017-01-20 Ed Schonberg <schonberg@adacore.com>
4747
4748 * sem_ch13.adb (Analyze_Aspect_Specification, case
4749 Dynamic_Predicate): If the entity E is a subtype that inherits
4750 a static predicate for its parent P,, the inherited and the
4751 new predicate combine in the generated predicate function,
4752 and E only has a dynamic predicate.
4753
4754 2017-01-20 Tristan Gingold <gingold@adacore.com>
4755
4756 * s-boustr.ads, s-boustr.adb: New package.
4757 * Makefile.rtl: Add s-boustr.
4758
4759 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
4760
4761 * inline.adb (Process_Formals): Qualify the
4762 expression of a return statement when it yields a universal type.
4763
4764 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
4765
4766 * freeze.adb (Freeze_All): Freeze the default
4767 expressions of all eligible formal parameters that appear in
4768 entries, entry families, and protected subprograms.
4769
4770 2017-01-20 Ed Schonberg <schonberg@adacore.com>
4771
4772 * sem_ch3.adb (Check_Nonoverridable_Aspects); Refine check
4773 for illegal inherited Implicit_Dereference aspects with renamed
4774 discriminants.
4775
4776 2017-01-20 Javier Miranda <miranda@adacore.com>
4777
4778 * debug.adb (switch d.6): do not avoid declaring unreferenced itypes.
4779 * nlists.ads (Lock_Lists, Unlock_Lists): New subprograms.
4780 * nlists.adb (Lock_Lists, Unlock_Lists): New subprograms.
4781 (Set_First, Set_Last, Set_List_Link, Set_Next, Set_Parent,
4782 Set_Prev, Tree_Read): Adding assertion.
4783 * atree.ads (Lock_Nodes, Unlock_Nodes): New subprograms.
4784 * atree.adb (Lock_Nodes, Unlock_Nodes): New subprograms.
4785 (Set_Analyzed, Set_Check_Actuals, Set_Comes_From_Source,
4786 Set_Ekind, Set_Error_Posted, Set_Has_Aspects,
4787 Set_Is_Ignored_Ghost_Node, Set_Original_Node, Set_Paren_Count,
4788 Set_Parent, Set_Sloc, Set_Nkind, Set_FieldNN, Set_NodeNN,
4789 Set_ListNN, Set_ElistNN, Set_NameN, Set_StrN, Set_UintNN,
4790 Set_UrealNN, Set_FlagNNN, Set_NodeN_With_Parent,
4791 Set_ListN_With_Parent): Adding assertion.
4792
4793 2017-01-20 Ed Schonberg <schonberg@adacore.com>
4794
4795 * sem_prag.adb (Process_Convention): Diagnose properly a pragma
4796 import that applies to several homograph subprograms. when one
4797 of them is declared by a subprogram body.
4798
4799 2017-01-20 Justin Squirek <squirek@adacore.com>
4800
4801 * exp_ch6.adb (Expand_Call): Remove optimization
4802 that nulls out calls to null procedures.
4803
4804 2017-01-20 Yannick Moy <moy@adacore.com>
4805
4806 * inline.adb (Expand_Inlined_Call): Keep more
4807 precise type of actual for inlining whenever possible. In
4808 particular, do not switch to the formal type in GNATprove mode in
4809 some case where the GNAT backend might require it for visibility.
4810
4811 2017-01-20 Ed Schonberg <schonberg@adacore.com>
4812
4813 * sem_ch3.adb (Check_Non_Overridable_Aspects): An inherited
4814 aspect Implicit_Dereference can be inherited by a full view if
4815 the partial view has no discriminants, because there is no way
4816 to apply the aspect to the partial view.
4817 (Build_Derived_Record_Type): If derived type renames discriminants
4818 of the parent, the new discriminant inherits the aspect from
4819 the old one.
4820 * sem_ch4.adb (Analyze_Call): Handle properly a parameterless
4821 call through an access discriminant designating a subprogram.
4822 * sem_ch5.adb (Analyze_Assignment): (Analyze_Call): Handle
4823 properly a parameterless call through an access discriminant on
4824 the left-hand side of an assignment.
4825 * sem_res.adb (resolve): If an interpreation involves a
4826 discriminant with an implicit dereference and the expression is an
4827 entity, resolution takes place later in the appropriate routine.
4828 * sem_ch13.adb (Analyze_Aspect_Implicit_Dereference): Recognize
4829 access discriminants that designate a subprogram type.
4830
4831 2017-01-20 Pascal Obry <obry@adacore.com>
4832
4833 * a-locale.adb, a-locale.ads: Update Ada.Locales for RM 2012 COR:1:2016
4834
4835 2017-01-20 Yannick Moy <moy@adacore.com>
4836
4837 * sem_ch10.adb (Check_No_Elab_Code_All): Do not issue an error
4838 on implicitly with'ed units in GNATprove mode.
4839 * sinfo.ads (Implicit_With): Document use of flag for implicitly
4840 with'ed units in GNATprove mode.
4841
4842 2017-01-20 Ed Schonberg <schonberg@adacore.com>
4843
4844 * sem_cat.adb (Validate_Static_Object_Name): In a preelaborated
4845 unit Do not report an error on a non-static entity that appears
4846 in the context of a spec expression, such as an aspect expression.
4847
4848 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
4849
4850 * einfo.adb: Flag298 now denotes Is_Underlying_Full_View.
4851 (Is_Underlying_Full_View): New routine.
4852 (Set_Is_Underlying_Full_View): New routine.
4853 (Write_Entity_Flags): Add an entry for Is_Underlying_Full_View.
4854 * einfo.ads Add new attribute Is_Underlying_Full_View.
4855 (Is_Underlying_Full_View): New routine along with pragma Inline.
4856 (Set_Is_Underlying_Full_View): New routine along with pragma Inline.
4857 * exp_util.adb (Build_DIC_Procedure_Body): Do not consider
4858 class-wide types and underlying full views. The first subtype
4859 is used as the working type for all Itypes, not just array base types.
4860 (Build_DIC_Procedure_Declaration): Do not consider
4861 class-wide types and underlying full views. The first subtype
4862 is used as the working type for all Itypes, not just array
4863 base types.
4864 * freeze.adb (Freeze_Entity): Inherit the freeze node of a full
4865 view or an underlying full view without clobbering the attributes
4866 of a previous freeze node.
4867 (Inherit_Freeze_Node): New routine.
4868 * sem_ch3.adb (Build_Derived_Private_Type): Mark an underlying
4869 full view as such.
4870 (Build_Underlying_Full_View): Mark an underlying full view as such.
4871 * sem_ch7.adb (Install_Private_Declarations): Mark an underlying
4872 full view as such.
4873
4874 2017-01-20 Yannick Moy <moy@adacore.com>
4875
4876 * sinfo.ads: Document lack of Do_Division_Check flag
4877 on float exponentiation.
4878
4879 2017-01-19 Javier Miranda <miranda@adacore.com>
4880
4881 * ghost.adb (Propagate_Ignored_Ghost_Code): Protect access to the
4882 identifier attribute of a block-statement node. Required to avoid
4883 assertion failure when building the new containers library.
4884
4885 2017-01-19 Bob Duff <duff@adacore.com>
4886
4887 * exp_ch3.adb: Update comment.
4888
4889 2017-01-19 Vincent Celier <celier@adacore.com>
4890
4891 * gprep.adb (Gnatprep): Parse the definition file without
4892 "replace in comments" even when switch -C is used.
4893
4894 2017-01-19 Justin Squirek <squirek@adacore.com>
4895
4896 * exp_ch9.adb (Is_Pure_Barrier): Create function
4897 Is_Count_Attribute to identify an expansion of the 'Count
4898 attribute.
4899
4900 2017-01-19 Ed Schonberg <schonberg@adacore.com>
4901
4902 * sem_ch5.adb (Analyze_Loop_Statement): In GNATprove mode the
4903 statements within an element iterator loop are only analyzed
4904 agter the loop is rewritten. Within a generic the analysis must
4905 be performed in any case to complete name capture.
4906
4907 2017-01-19 Bob Duff <duff@adacore.com>
4908
4909 * sem_prag.adb (Analyze_Pragma): Check for ignored pragmas first,
4910 before checking for unrecognized pragmas.
4911 Initialize Pname on its declarations; that's always good style.
4912
4913 2017-01-19 Claire Dross <dross@adacore.com>
4914
4915 * exp_ch7.adb (Build_Invariant_Procedure_Body): Semi-insert the
4916 body into the tree for GNATprove by setting its Parent field. The
4917 components invariants of composite types are not checked by
4918 the composite type's invariant procedure in GNATprove mode.
4919 (Build_Invariant_Procedure_Declaration): Semi-insert the
4920 declaration into the tree for GNATprove by setting its Parent
4921 field.
4922 * freeze.adb (Freeze_Arry_Type):In GNATprove mode, do not add
4923 the component invariants to the array type invariant procedure
4924 so that the procedure can be used to check the array type
4925 invariants if any.
4926 (Freeze_Record_Type): In GNATprove mode, do
4927 not add the component invariants to the record type invariant
4928 procedure so that the procedure can be used to check the record
4929 type invariants if any.
4930
4931 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
4932
4933 * lib-xref-spark_specific.adb: Minor reformatting.
4934 * exp_ch7.adb (Add_Parent_Invariants): Do not process array types.
4935
4936 2017-01-19 Javier Miranda <miranda@adacore.com>
4937
4938 * exp_aggr.adb (Pass_Aggregate_To_Back_End): Renamed as
4939 Build_Back_End_Aggregate.
4940 (Generate_Aggregate_For_Derived_Type): Code cleanup.
4941 (Prepend_Stored_Values): Code cleanup.
4942
4943 2017-01-19 Ed Schonberg <schonberg@adacore.com>
4944
4945 * sem_ch6.adb (Analyze_Expression_Function): Check for an
4946 incomplete return type after attempting to freeze it, so that
4947 other freeze actiona are generated in the proper order.
4948
4949 2017-01-19 Ed Schonberg <schonberg@adacore.com>
4950
4951 * sem_aggr.adb (Resolve_Aggregate): If the type is a string
4952 type, ie. a type whose component is a character type, and the
4953 aggregate is positional, do not convert into a string literal
4954 if the index type is not an integer type, because the original
4955 type may be required in an enclosing operation.
4956
4957 2017-01-19 Bob Duff <duff@adacore.com>
4958
4959 * binde.adb, debug.adb: Enable new elaboration order algorithm
4960 by default. -dp switch reverts to the old algorithm.
4961
4962 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
4963
4964 * sem_ch3.adb Add with and use clauses for Exp_Ch7.
4965 (Analyze_Declarations): Create the DIC and Invariant
4966 procedure bodies s after all freezing has taken place.
4967 (Build_Assertion_Bodies): New routine.
4968 * sem_ch7.adb Remove the with and use clauses for Exp_Ch7
4969 and Exp_Util.
4970 (Analyze_Package_Specification): Remove the
4971 generation of the DIC and Invariant procedure bodies. This is
4972 now done by Analyze_Declarations.
4973 * sem_disp.adb (Check_Dispatching_Operation): DIC and Invariant
4974 procedures are never treated as primitives.
4975
4976 2017-01-19 Yannick Moy <moy@adacore.com>
4977
4978 * frontend.adb: Analyze inlined bodies and check elaboration
4979 rules in GNATprove mode too.
4980 * sem_elab.adb (Delay_Element): Add Boolean component to save
4981 indication that call is in SPARK code. (Check_Elab_Calls):
4982 Check elaboration rules in GNATprove mode, and correctly set
4983 the current value of SPARK_Mode.
4984 * lib-xref-spark_specific.adb
4985 (Add_SPARK_Xrefs): Simplify iteration over dereferences.
4986
4987 2017-01-19 Ed Schonberg <schonberg@adacore.com>
4988
4989 * exp_ch4.adb (Expand_Concatenate): Do no enable overflow
4990 checks on the expression for the high bound of concatenation
4991 when checks are disabled, to suppress warnings about potential
4992 constraint errors in restricted runtimes.
4993
4994 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
4995
4996 * exp_ch3.adb (Expand_Freeze_Enumeration_Type): Mark the
4997 representation-to-position function as inlined.
4998 * sem_cat.adb (Set_Categorization_From_Scope): Do not modify
4999 the purity of an internally generated entity if it has been
5000 explicitly marked as pure for optimization purposes.
5001 * exp_aggr.adb: Minor reformatting.
5002
5003 2017-01-19 Javier Miranda <miranda@adacore.com>
5004
5005 * exp_ch6.adb (Expand_Call): Remove side effects on
5006 actuals that are allocators with qualified expression since the
5007 initialization of the object is performed by means of individual
5008 statements (and hence it must be done before the call).
5009
5010 2017-01-19 Ed Schonberg <schonberg@adacore.com>
5011
5012 * sem_ch3.adb (Analyze_Declarations): Minor reformatting.
5013 (Build_Derived_Enumeration_Type): If the derived type inherits a
5014 dynamic predicate from its parent, the bounds of the type must
5015 freeze because an explicit constraint is constructed for the
5016 type and the corresponding range is elaborated now.
5017
5018 2017-01-19 Arnaud Charlet <charlet@adacore.com>
5019
5020 * sem_attr.ads: minor fix of inconsistent casing in comment
5021 * lib-writ.ads: minor align comments in columns
5022 * sem_ch3.adb: Minor reformatting.
5023 * spark_xrefs.ads: minor fix typo in SPARK-related comment
5024 * table.ads: minor style fix in comment
5025 * lib-xref-spark_specific.adb
5026 (Add_SPARK_Xrefs): simplify processing of SPARK cross-references.
5027 * sem_ch12.adb: minor whitespace fix
5028 * freeze.adb: Add comment.
5029 * sem_util.adb (Unique_Name): for instances of
5030 generic subprograms ignore the name of the wrapper package.
5031
5032 2017-01-19 Javier Miranda <miranda@adacore.com>
5033
5034 * exp_aggr.adb (Resolve_Record_Aggregate):
5035 Factorize code needed for aggregates of limited and unlimited
5036 types in a new routine.
5037 (Pass_Aggregate_To_Back_End): New subprogram.
5038
5039 2017-01-19 Yannick Moy <moy@adacore.com>
5040
5041 * sinfo.adb (Pragma_Name): Only access up to Last_Pair of Pragma_Map.
5042
5043 2017-01-19 Ed Schonberg <schonberg@adacore.com>
5044
5045 * sem_ch4.ads, sem_ch4.adb (Try_Object_Operation): Make subprogram
5046 public, for use elsewhere.
5047 * sem_ch6.adb (Analyze_Procedure_Call): In SPARK_Mode and within
5048 an Inlined_body, recognize a call that uses object notation
5049 and has not been rewritten as a regular call because regular
5050 expansion has not taken place.
5051
5052 2017-01-19 Bob Duff <duff@adacore.com>
5053
5054 * checks.adb (Apply_Type_Conversion_Checks): Disable small optimization
5055 in case of generic formal discrete types, because it causes crashes in
5056 the compiler when built with assertions on.
5057
5058 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
5059
5060 * lib-xref-spark_specific.adb, sem_util.adb, sem_util.ads,
5061 sem_ch4.adb, sem_ch8.adb, lib-xref.ads: Minor reformatting.
5062
5063 2017-01-19 Bob Duff <duff@adacore.com>
5064
5065 * bcheck.adb (Check_Consistent_Dynamic_Elaboration_Checking):
5066 Increment Warnings_Detected. It was decrementing, which is
5067 wrong since we just issued a warning message.
5068 * binderr.ads (Errors_Detected, Warnings_Detected): Declare
5069 these variables to be of subtype Nat instead of Int, because
5070 they should never be negative.
5071
5072 2017-01-19 Javier Miranda <miranda@adacore.com>
5073
5074 * contracts.adb (Build_Postconditions_Procedure): Replace
5075 Generate_C_Code by Modify_Tree_For_C.
5076 * exp_aggr.adb (Build_Record_Aggr_Code, Expand_Array_Aggregate):
5077 Replace Generate_C_Code by Modify_Tree_For_C.
5078 * exp_attr.adb (Float_Valid, Is_GCC_Target): Replace Generate_C_Code by
5079 Modify_Tree_For_C.
5080 * exp_ch11.adb (Expand_N_Exception_Declaration): Replace
5081 Generate_C_Code by Modify_Tree_For_C.
5082 * exp_ch4.adb (Expand_Allocator_Expression): Replace
5083 Generate_C_Code by Modify_Tree_For_C.
5084 * exp_dbug.adb (Qualify_Entity_Name): Replace Generate_C_Code
5085 by Modify_Tree_For_C.
5086 * exp_util.adb (Remove_Side_Effects, Side_Effect_Free): Replace
5087 Generate_C_Code by Modify_Tree_For_C.
5088 * sem_res.adb (Resolve_Type_Conversion): Replace Generate_C_Code
5089 by Modify_Tree_For_C.
5090 * sinfo.ads (Modify_Tree_For_C): Adding documentation.
5091
5092 2017-01-19 Javier Miranda <miranda@adacore.com>
5093
5094 * sem_util.ads, sem_util.adb (Expression_Of_Expression_Function): New
5095 subprogram.
5096 (Is_Inlinable_Expression_Function): New subprogram.
5097 * exp_ch6.ads, exp_ch6.adb (Expression_Of_Expression_Function): Moved
5098 to Sem_Util.
5099 (Is_Inlinable_Expression_Function): Moved to Sem_Util.
5100
5101 2017-01-19 Ed Schonberg <schonberg@adacore.com>
5102
5103 * sem_ch4.adb (Diagnose_Call): Improve error message when a
5104 selected component has a prefix that might be interpreted
5105 as a parameterless function call, but none of the candidate
5106 interpretations is parameterless, and there is a hidden homonym
5107 of the prefix that is a package.
5108 * sem_ch8.adb (Find_Selected_Component): If the prefix might be
5109 interpreted as a parameterless function call and its analysis
5110 fails, do not call Analyze_Selected_Component.
5111
5112 2017-01-19 Steve Baird <baird@adacore.com>
5113
5114 * sem_util.ads: Add new Use_Full_View Boolean parameter to
5115 Get_Index_Bounds.
5116 * sem_util.adb (Get_Index_Bounds): replace calls to Scalar_Range with
5117 calls to a newly-defined Scalar_Range_Of_Right_View function.
5118
5119 2017-01-19 Arnaud Charlet <charlet@adacore.com>
5120
5121 * gnat1drv.adb: minor fix of unbalanced parens in comment
5122 * lib-xref.ads (Traverse_Compilation_Unit): declaration moved
5123 to visible part of the package to allow re-use in GNATprove.
5124 * lib-xref-spark_specific.adb (Traverse_Stub): routine refactored
5125 from repeated code of Traverse_Compilation_Unit.
5126 (Traverse_Declaration_Or_Statement): fixed detection of
5127 generic subprograms and packages; also, iteration over case
5128 statement alternatives rewritten to avoid testing if the first
5129 alternative is present (since it must be present due to Ada
5130 syntax restrictions).
5131
5132 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
5133
5134 * exp_ch6.adb (Expand_N_Subprogram_Body): Mark the spec as
5135 returning by reference not just for subprogram body stubs,
5136 but for all subprogram cases.
5137 * sem_util.adb: Code reformatting.
5138 (Requires_Transient_Scope): Update the call to Results_Differ.
5139 (Results_Differ): Update the parameter profile and the associated
5140 comment on usage.
5141
5142 2017-01-19 Ed Schonberg <schonberg@adacore.com>
5143
5144 * sem_dim.adb (Analyze_Dimension): Analyze object declaration and
5145 identifier nodes that do not come from source, to handle properly
5146 dimensionality check within an inlined body which inclddes both
5147 original operands and rewritten operands. This removes spurious
5148 dimensionality errors in the presence of front-end inlining,
5149 as well as in SPARK mode.
5150
5151 2017-01-16 Jakub Jelinek <jakub@redhat.com>
5152
5153 PR driver/49726
5154 * gcc-interface/lang.opt (gant, gnatO, gnat): Add Driver flag.
5155
5156 2017-01-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5157
5158 * gcc-interface/Makefile.in (SPARC/Solaris): Fix typo.
5159
5160 2017-01-13 Arnaud Charlet <charlet@adacore.com>
5161
5162 * doc/gnat_ugn/getting_started_with_gnat.rst,
5163 doc/gnat_ugn/inline_assembler.rst,
5164 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
5165 doc/gnat_ugn/elaboration_order_handling_in_gnat.rst,
5166 doc/gnat_ugn/about_this_guide.rst,
5167 doc/gnat_ugn/platform_specific_information.rst,
5168 doc/gnat_ugn/example_of_binder_output.rst,
5169 doc/gnat_ugn/gnat_and_program_execution.rst,
5170 doc/gnat_ugn/gnat_utility_programs.rst,
5171 doc/gnat_ugn/the_gnat_compilation_model.rst,
5172 doc/gnat_rm/implementation_defined_attributes.rst,
5173 doc/gnat_rm/compatibility_and_porting_guide.rst,
5174 doc/gnat_rm/standard_library_routines.rst,
5175 doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
5176 doc/gnat_rm/implementation_defined_pragmas.rst,
5177 doc/gnat_rm/the_gnat_library.rst,
5178 doc/gnat_rm/obsolescent_features.rst,
5179 doc/gnat_rm/about_this_guide.rst,
5180 doc/gnat_rm/the_implementation_of_standard_i_o.rst,
5181 doc/gnat_rm/implementation_of_ada_2012_features.rst,
5182 doc/gnat_rm/interfacing_to_other_languages.rst,
5183 doc/gnat_rm/implementation_defined_aspects.rst,
5184 doc/gnat_rm.rst: Update documentation.
5185 * gnat_rm.texi, gnat_ugn.texi: Regenerated.
5186
5187 2017-01-13 Ed Schonberg <schonberg@adacore.com>
5188
5189 * einfo.ads: minor grammar fixes in comment of Normalized_Position_Max.
5190 * scil_ll.adb: Minor style fix in comment.
5191 * sem_ch8.adb (Analyze_Expanded_Name): Perform dimension analysis
5192 even if entity is already set, because the node may be renalyzed
5193 after inlining transformations.
5194
5195 2017-01-13 Javier Miranda <miranda@adacore.com>
5196
5197 * sem_res.adb (Resolve_Call): Do not establish a transient scope
5198 for a call to inlinable expression function (since the call will
5199 be replaced by its returned object).
5200 * exp_ch6.ads (Is_Inlinable_Expression_Function): New subprogram.
5201 * exp_ch6.adb (Expression_Of_Expression_Function): New subprogram.
5202 (Expand_Call): For inlinable expression function call replace the
5203 call by its returned object.
5204 (Is_Inlinable_Expression_Function): New subprogram.
5205
5206 2017-01-13 Gary Dismukes <dismukes@adacore.com>
5207
5208 * checks.adb: Minor typo fix and reformatting.
5209
5210 2017-01-13 Javier Miranda <miranda@adacore.com>
5211
5212 * contracts.adb (Contract_Only_Subprograms): Remove formal.
5213 (Copy_Original_Specification): Removed.
5214 (Skip_Contract_Only_Subprogram): Move here checks previously
5215 located in the caller of this routine (to leave the code more clean).
5216 (Build_Contract_Only_Subprogram): Code cleanup.
5217 * scil_ll.ads, scil_ll.adb (Get_Contract_Only_Body_Name): Removed.
5218 (Get_Contract_Only_Missing_Body_Name): Removed.
5219
5220 2017-01-13 Javier Miranda <miranda@adacore.com>
5221
5222 * sem_ch6.adb (Cloned_Expression): New subprogram.
5223 (Freeze_Expr_Types): Complete previous patch since the expression
5224 of an expression-function may have iterators and loops with
5225 defining identifiers which, as part of the preanalysis of the
5226 expression, may be left decorated with itypes that will not be
5227 available in the tree passed to the backend.
5228
5229 2017-01-13 Ed Schonberg <schonberg@adacore.com>
5230
5231 * checks.adb (Apply_Type_Conversion_Checks): Optimize a type
5232 conversion to Integer of an expression that is an attribute
5233 reference 'Pos on an enumeration type.
5234
5235 2017-01-13 Bob Duff <duff@adacore.com>
5236
5237 * atree.ads: Minor comment fix.
5238
5239 2017-01-13 Justin Squirek <squirek@adacore.com>
5240
5241 * sem_ch6.adb (Check_Aggregate_Accessibility): Ignore function
5242 calls in accessibility check on return statement.
5243
5244 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
5245
5246 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
5247 Ensure that the input body is a subprogram body before trying to
5248 determine whether it denoted an expression function. Note that
5249 subprogram body stubs cannot denote expression functions.
5250
5251 2017-01-13 Gary Dismukes <dismukes@adacore.com>
5252
5253 * bindgen.adb, sem_ch6.adb, binde.adb, exp_ch3.adb: Minor reformatting
5254 and typo fixes.
5255
5256 2017-01-13 Javier Miranda <miranda@adacore.com>
5257
5258 * einfo.ads (Component_Bit_Offset): Fix documentation.
5259 * sem_ch13.adb (Check_Record_Representation_Clause): Skip check
5260 on record holes for components with unknown compile-time offsets.
5261
5262 2017-01-13 Bob Duff <duff@adacore.com>
5263
5264 * ali.ads, ali.adb (Static_Elaboration_Model_Used): Remove unused flag.
5265 * g-locfil.ads: Minor comment fix.
5266
5267 2017-01-13 Bob Duff <duff@adacore.com>
5268
5269 * binde.adb (Elab_New): New elaboration order algorithm
5270 that is expected to cause fewer ABE issues. This is a work in
5271 progress. The new algorithm is currently disabled, and can be
5272 enable by the -dp switch, or by modifying the Do_Old and Do_New
5273 etc. flags and rebuilding. Experimental code is included to
5274 compare the results of the old and new algorithms.
5275 * binde.ads: Use GNAT.Dynamic_Tables instead of Table, so we
5276 can have multiple of these tables, so the old and new algorithms
5277 can coexist.
5278 * bindgen.ads (Gen_Output_File): Pass Elab_Order as an 'in'
5279 parameter of type array. This avoids the global variable, and
5280 allows bounds checking (which is normally defeated by the tables
5281 packages). It also ensures that the Elab_Order is read-only
5282 to Bindgen.
5283 * bindgen.adb: Pass Elab_Order as an 'in' parameter to all
5284 subprograms that need it, as above.
5285 * debug.adb: Document new -dp switch. Modify doc of old -do
5286 switch.
5287 * gnatbind.adb (Gnatbind): Make use of new interfaces to Binde
5288 and Bindgen. Move writing of closure (-R and -Ra switches)
5289 to Binde; that's more convenient.
5290
5291 2017-01-13 Ed Schonberg <schonberg@adacore.com>
5292
5293 * sem_ch6.adb (Analyze_Expression_Function): If the expression
5294 function is a completion, all entities referenced in the
5295 expression are frozen. As a consequence, a reference to an
5296 uncompleted private type from an enclosing scope is illegal.
5297
5298 2017-01-13 Javier Miranda <miranda@adacore.com>
5299
5300 * sem_ch6.adb (Freeze_Expr_Types): New subprogram.
5301 (Analyze_Subprogram_Body_Helper): At the occurrence of an
5302 expression function declaration that is a completion, its
5303 expression causes freezing (AI12-0103).
5304
5305 2017-01-13 Vadim Godunko <godunko@adacore.com>
5306
5307 * a-coinho-shared.adb: Fix memory leaks in Constant_Reference and
5308 Reference functions of Ada.Containers.Indefinite_Holders.
5309
5310 2017-01-13 Bob Duff <duff@adacore.com>
5311
5312 * s-os_lib.ads: Minor comment fixes.
5313
5314 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
5315
5316 * exp_ch3.adb (Default_Initialize_Object): Do not default
5317 initialize an object when it is of a task type and restriction
5318 No_Tasking is in effect because the initialization is obsolete.
5319 * exp_ch9.adb (Build_Master_Entity): Do not generate a master when
5320 restriction No_Tasking is in effect.
5321 (Build_Master_Renaming): Do not rename a master when restriction
5322 No_Tasking is in effect.
5323
5324 2017-01-13 Ed Schonberg <schonberg@adacore.com>
5325
5326 * sem_aggr.adb (Resolve_Array_Aggregate): The code that verifies
5327 the legality of An others clause applies as well to a choice in
5328 an Iterated_component_ association.
5329 (Resolve_Iterated_Component_Association): An others choice
5330 is legal.
5331 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): An
5332 Iterated_Component_Association is not static.
5333
5334 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
5335
5336 * exp_ch3.adb (Freeze_Type): Mark the Ghost mode as set in case
5337 control is passed to the expresion handler before the new mode
5338 is set.
5339 * sem_ch12.adb (Analyze_Package_Instantiation,
5340 Analyze_Subprogram_Instantiation): Mark the Ghost mode as set
5341 in case control is passed to the expresion handler before the
5342 new mode is set.
5343
5344 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
5345
5346 * sem_aggr.adb, sem_ch3.adb, inline.adb, sem_util.adb, exp_ch4.adb,
5347 exp_aggr.adb: Minor reformatting.
5348
5349 2017-01-13 Gary Dismukes <dismukes@adacore.com>
5350
5351 * inline.adb: Minor reformatting and typo fix.
5352
5353 2017-01-13 Ed Schonberg <schonberg@adacore.com>
5354
5355 * sem_util.ads, sem_util.adb (Choice_List): Move function here
5356 from sem_aggr.adb, for use elsewhere.
5357 * sem_ch3.adb (Analyze_Object_Declaration): Use Choice_List.
5358 * sem_aggr.adb (Resolve_Array_Aggregate): Remove
5359 Iterated_Component_Present.
5360 * exp_aggr.adb: Use Choice_List throughout, to handle
5361 Iterated_Component_Associations.
5362 (Gen_Loop): Generate proper loop for an
5363 Iterated_Component_Association: loop variable has the identifier
5364 of the original association. Generate a loop even for a single
5365 component choice, in order to make loop parameter visible in
5366 expression.
5367 (Flatten): An Iterated_Component_Association is not static.
5368
5369 2017-01-13 Yannick Moy <moy@adacore.com>
5370
5371 * exp_ch4.adb (Expand_N_Op_Expon): Ensure that the value of
5372 float exponentiation for statically known small negative values
5373 is the reciprocal of the exponentiation for the opposite value
5374 of the exponent.
5375 * s-exnllf.adb (Exn_Float, Exn_Long_Float, Exn_Long_Long_Float):
5376 Ensure that the value of float exponentiation for negative values
5377 is the reciprocal of the exponentiation for the opposite value
5378 of the exponent.
5379 * inline.adb (Expand_Inlined_Call): Fix the count
5380 for the number of generated gotos.
5381
5382 2017-01-13 Yannick Moy <moy@adacore.com>
5383
5384 * inline.adb: Code cleanup.
5385 * sem_util.adb (Is_OK_Volatile_Context): Add
5386 expression in delay statement as OK for volatile context.
5387
5388 2017-01-13 Ed Schonberg <schonberg@adacore.com>
5389
5390 * sem_aggr.adb (Resolve_Array_Aggregate): In normal compilation
5391 mode a choice that is a subtype with a static predicate is
5392 replaced by the values it covers. This transformation must not
5393 be performed in ASIS mode, to preserve the source for analysis.
5394
5395 2017-01-13 Justin Squirek <squirek@adacore.com>
5396
5397 * nlists.ads: Correct minor typo.
5398
5399 2017-01-13 Gary Dismukes <dismukes@adacore.com>
5400
5401 * sem_ch13.adb: Minor reformatting and typo fix.
5402
5403 2017-01-13 Ed Schonberg <schonberg@adacore.com>
5404
5405 * par-ch4.adb (P_Aggregate_Or_Parent_Expr): An
5406 Iterated_Component_Association is a named association in an
5407 array aggregate.
5408 * sem_aggr.adb (Resolve_Iterated_Component_Association): New
5409 procedure, subsidiary of Resolve_Array_Aggregate, to analyze
5410 and resolve the discrete choices and the expression of the
5411 new construct.
5412 * sinfo.adb, sinfo.ads: In analogy with N_Component_Association,
5413 Loop_Actions and Box_Present are attributes of
5414 N_Iterated_Component_Association nodes. Box_Present is always
5415 False in this case.
5416 * sprint.adb (Sprint_Node): An Iterated_Component_Association
5417 has a Discrete_Choices list, as specified in the RM. A
5418 Component_Association for aggregate uses instead a Choices list.
5419 We have to live with this small inconsistency because the new
5420 construct also has a defining identifier, and there is no way
5421 to merge the two node structures.
5422
5423 2017-01-13 Yannick Moy <moy@adacore.com>
5424
5425 * inline.adb (Remove_Aspects_And_Pragmas): Add Unused to the
5426 list of pragmas to remove. Remove pragmas from the list of
5427 statements in the body to inline.
5428 * namet.adb, namet.ads (Nam_In): New version with 12 parameters.
5429
5430 2017-01-13 Ed Schonberg <schonberg@adacore.com>
5431
5432 * sem_ch3.adb (Resolve_Aspects): New procedure, subsidiary of
5433 Analyze_Declarations, to analyze and resolve the expressions of
5434 aspect specifications in the current declarative list, so that
5435 the expressions have proper entity and type info. This is needed
5436 for ASIS when there is no subsequent expansion to generate this
5437 semantic information.
5438 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Use Etype of
5439 original expression, to suppress cascaded errors when expression
5440 has been constant-folded.
5441 (Resolve_Aspect_Expressions, Resolve_Name): Preserve entities in
5442 ASIS mode, because there is no subsequent expansion to decorate
5443 the tree.
5444
5445 2017-01-13 Yannick Moy <moy@adacore.com>
5446
5447 * inline.adb, inline.ads (Call_Can_Be_Inlined_In_GNATprove_Mode):
5448 New function to detect when a call may be inlined or not in
5449 GNATprove mode.
5450 (Expand_Inlined_Call): Ensure that a temporary
5451 is always created in the cases where a type conversion may be
5452 needed on an input parameter in GNATprove mode, so that GNATprove
5453 sees the check to perform.
5454 * sem_res.adb (Resolve_Call): In GNATprove mode, skip inlining
5455 when not applicable due to actual requiring type conversion
5456 with possible check but no temporary value can be copied for
5457 GNATprove to see the check.
5458
5459 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
5460
5461 * sem_aggr.adb, par_sco.adb, s-osprim-mingw.adb, exp_ch5.adb,
5462 exp_prag.adb, sem_ch3.adb, xr_tabls.adb, lib-xref-spark_specific.adb,
5463 layout.adb, sem_dist.adb, exp_spark.adb, exp_ch7.adb, gnatcmd.adb,
5464 exp_util.adb, prj-proc.adb, sem_aux.adb, comperr.adb, g-memdum.adb,
5465 exp_attr.adb, s-intman-solaris.adb, exp_ch9.adb, make.adb, live.adb,
5466 g-sercom-linux.adb, sem_dim.adb, mlib-prj.adb, s-intman-posix.adb,
5467 sem_ch9.adb, sem_ch10.adb, prep.adb, einfo.adb, scng.adb, checks.adb,
5468 prj-strt.adb, sem_prag.adb, eval_fat.adb, sem_ch12.adb, sem.adb,
5469 a-numaux-x86.adb, a-stwifi.adb, i-cobol.adb, prj.adb,
5470 get_spark_xrefs.adb, s-tasini.adb, rtsfind.adb, freeze.adb,
5471 g-arrspl.adb, par-ch4.adb, sem_util.adb, sem_res.adb, expander.adb,
5472 sem_attr.adb, exp_dbug.adb, prj-pp.adb, a-stzfix.adb, s-interr.adb,
5473 s-wchcnv.adb, switch-m.adb, gnat1drv.adb, sinput-l.adb, stylesw.adb,
5474 contracts.adb, s-intman-android.adb, g-expect.adb, exp_ch4.adb,
5475 g-comlin.adb, errout.adb, sinput.adb, s-exctra.adb, repinfo.adb,
5476 g-spipat.adb, g-debpoo.adb, exp_ch6.adb, sem_ch4.adb, exp_ch13.adb,
5477 a-wtedit.adb, validsw.adb, pprint.adb, widechar.adb, makeutl.adb,
5478 ali.adb, set_targ.adb, sem_mech.adb, sem_ch6.adb, gnatdll.adb,
5479 get_scos.adb, g-pehage.adb, s-tratas-default.adb, gnatbind.adb,
5480 prj-dect.adb, g-socthi-mingw.adb, par-prag.adb, prj-nmsc.adb,
5481 exp_disp.adb, par-ch12.adb, binde.adb, sem_ch8.adb,
5482 s-tfsetr-default.adb, s-regexp.adb, gprep.adb, s-tpobop.adb,
5483 a-teioed.adb, sem_warn.adb, sem_eval.adb, g-awk.adb, s-io.adb,
5484 a-ztedit.adb, xoscons.adb, exp_intr.adb, sem_cat.adb, sprint.adb,
5485 g-socket.adb, exp_dist.adb, sem_ch13.adb, s-tfsetr-vxworks.adb,
5486 par-ch3.adb, treepr.adb, g-forstr.adb, g-catiio.adb, par-ch5.adb,
5487 uname.adb, osint.adb, exp_ch3.adb, prj-env.adb, a-strfix.adb,
5488 a-stzsup.adb, prj-tree.adb, s-fileio.adb: Update all eligible case
5489 statements to reflect the new style for case alternatives. Various
5490 code clean up and reformatting.
5491
5492 2017-01-13 Gary Dismukes <dismukes@adacore.com>
5493
5494 * exp_util.adb: Minor reformatting.
5495
5496 2017-01-13 Yannick Moy <moy@adacore.com>
5497
5498 * exp_spark.adb: Code cleanup.
5499 * sem_ch9.adb (Analyze_Delay_Until): Resolve
5500 expression so that calls are identified as such inside delay
5501 until.
5502
5503 2017-01-13 Ed Schonberg <schonberg@adacore.com>
5504
5505 * exp_util.adb (Insert_Actions): Handle Iterated_Component_Association.
5506 * par-ch3.adb (P_Discrete_Choice_List): An
5507 Iterated_Component_Association is an array aggregate component.
5508 * par-ch4.adb (P_Iterated_Component_Association): New procedure.
5509 (Is_Quantified_Expression): New function that performs a lookahead
5510 to distinguish quantified expressions from iterated component
5511 associations.
5512 (P_Aggregate_Or_Paren_Expr): Recognize iterated component
5513 associations.
5514 (P_Unparen_Cond_Case_Quant_Expression, P_Primary): Ditto.
5515 * sem.adb (Analyze): Handle Iterated_Component_Association.
5516 * sem_aggr.adb (Resolve_Array_Aggregate): Dummy handling of iterated
5517 component associations.
5518 * sinfo.ads, sinfo.adb: Entries for for
5519 N_Iterated_Component_Association and its fields.
5520 * sprint.adb (Sprint_Node_Actual): Handle
5521 N_Iterated_Component_Association.
5522
5523 2017-01-13 Justin Squirek <squirek@adacore.com>
5524
5525 * sem_ch12.adb (Analyze_Package_Instantiation): Move disabiling
5526 of the style check until after preanalysis of acutals.
5527
5528 2017-01-13 Yannick Moy <moy@adacore.com>
5529
5530 * sem_ch13.adb: Minor reformatting.
5531 * par-ch11.adb: minor style fix in whitespace
5532 * gnatbind.adb (Gnatbind): Scope of Std_Lib_File
5533 reduced to Add_Artificial_ALI_File; style fix in declaration of
5534 Text; grammar fix in comment.
5535 * osint-c.adb (Read_Library_Info): strip trailing NUL from result.
5536 * freeze.adb: Cleanup to pass pragma instead of
5537 expression to call.
5538 * exp_spark.adb (Expand_SPARK_Attribute_Reference): New procedure to
5539 replace System'To_Address by equivalent call.
5540
5541 2017-01-13 Arnaud Charlet <charlet@adacore.com>
5542
5543 * bindusg.adb: Improve usage output for -f switch.
5544
5545 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
5546
5547 * frontend.adb, freeze.adb, sem_res.adb, sem_attr.adb, sem_ch8.adb:
5548 Minor reformatting.
5549
5550 2017-01-13 Ed Schonberg <schonberg@adacore.com>
5551
5552 * sem_ch13.adb (Is_Predicate_Static): Following the intent of the RM,
5553 treat comparisons on strings as legal in a Static_Predicate.
5554 (Is_Predicate_Static, Is_Type_Ref): Predicate also returns true on
5555 a function call that is the expansion of a string comparison.The
5556 function call is built when compiling the corresponding predicate
5557 function, but the expression has been found legal as a static
5558 predicate during earlier analysis.
5559 * sem_eval.adb (Real_Or_String_Static_Predicate_Matches): Handle
5560 properly a function call that is the expansion of a string
5561 comparison operation, in order to recover the Static_Predicate
5562 expression and apply it to a static argument when needed.
5563
5564 2017-01-13 Tristan Gingold <gingold@adacore.com>
5565
5566 * s-mmap.adb, s-mmap.ads (Open_Read_No_Exception): New function.
5567 (Open_Read): Re-implement using Open_Read_No_Exception.
5568 (Open_Write): Raise exception in case of error.
5569 * s-mmosin-mingw.adb (Open_Common): Do not raise exception.
5570 * s-mmosin-unix.adb (Open_Read, Open_Write): Do not
5571 reaise exception.
5572 * s-mmosin-mingw.ads, s-mmosin-unix.ads (Open_Read): Adjust comment.
5573
5574 2017-01-13 Yannick Moy <moy@adacore.com>
5575
5576 * checks.adb: Code cleanup.
5577
5578 2017-01-13 Yannick Moy <moy@adacore.com>
5579
5580 * freeze.adb (Check_Inherited_Conditions): Use analyzed pragma
5581 expression instead of unanalyzed aspect expression for checking
5582 the validity of inheriting an operation. Also copy the expression
5583 being passing it to Build_Class_Wide_Expression, as this call
5584 modifies its argument.
5585 * sem_util.ads Fix comment to reference correct function name
5586 New_Copy_Tree.
5587
5588 2017-01-13 Javier Miranda <miranda@adacore.com>
5589
5590 * sem_res.adb (Resolve_Generalized_Indexing): Compiling in ASIS mode,
5591 when we propagate information about the indexes back to the original
5592 indexing mode and the prefix of the index is a function call, do not
5593 remove any parameter from such call.
5594
5595 2017-01-13 Gary Dismukes <dismukes@adacore.com>
5596
5597 * exp_ch6.ads (Needs_BIP_Finalization_Master): Update comment.
5598 * exp_ch6.adb (Needs_BIP_Finalization_Master): Return True for
5599 a build-in-place function whose result type is tagged.
5600
5601 2017-01-13 Yannick Moy <moy@adacore.com>
5602
5603 * sem_ch8.adb (Analyze_Subprogram_Renaming.Build_Class_Wide_Wrapper):
5604 Do not generate a wrapper when the only candidate is a class-wide
5605 subprogram.
5606 (Analyze_Subprogram_Renaming): Do not freeze the renaming or renamed
5607 inside a generic context.
5608
5609 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
5610
5611 * exp_util.adb (Add_Inherited_Tagged_DIC):
5612 Pass the object parameters of both the parent and the derived
5613 type DIC procedure to the reference replacement circuitry.
5614 (Find_DIC_Type): Modify the circuitry to present the partial
5615 view of a private type in case the private type defines its own
5616 DIC pragma.
5617 (Replace_Object_And_Primitive_References): Add two
5618 optional formal parameters. Update the comment on usage. Update
5619 the replacement of references to object parameters.
5620
5621 2017-01-13 Gary Dismukes <dismukes@adacore.com>
5622
5623 * einfo.adb, sem_ch6.adb, atree.adb: Minor reformatting and typo fix.
5624
5625 2017-01-13 Ed Schonberg <schonberg@adacore.com>
5626
5627 * sem_res.adb (Resolve_Actuals): Apply Scalar_Range_Check to
5628 an out parameter that is a type conversion, independently of th
5629 range check that may apply to the expression of the conversion,
5630 for use in GNATProve.
5631
5632 2017-01-13 Yannick Moy <moy@adacore.com>
5633
5634 * gnat1drv.adb (Gnat1drv): Move the implicit with for System in
5635 GNATprove_Mode here to Frontend.
5636 * frontend.adb (Frontend): Move the implicit with for System
5637 in GNATprove_Mode here as it ismore correct this way; the old
5638 place only worked by chance, since there were no overloaded names.
5639 * rtsfind.ads (RE_Id, RE_Unit_Table): Add RE_Tasking_State.
5640 * sem_attr.adb (Analyze_Attribute): In GNATprove_Mode, for the
5641 four attributes identified in SRM 9(18), add an implicit with
5642 to Ada.Task_Identification.
5643 * sem_ch8.adb (Analyze_Subprogram_Renaming.Build_Class_Wide_Wrapper):
5644 Deal specially with the wrapper introduced for AI05-0071 in GNATprove
5645 mode.
5646 * checks.adb (Apply_Discriminant_Check,
5647 Apply_Selected_Length_Checks, Apply_Selected_Range_Checks):
5648 In GNATprove mode, we do not apply the checks, but we still
5649 analyze the expression to possibly issue errors on SPARK
5650 code when a run-time error can be detected at compile time.
5651 (Selected_Length_Checks, Selected_Range_Checks): Perform analysis
5652 in GNATprove mode.
5653
5654 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
5655
5656 * expander.adb (Expand): Add a warning about using return
5657 statements in Ghost management code.
5658 * exp_ch3.adb (Freeze_Type): Add a warning about using return
5659 statements in Ghost management code.
5660 * exp_ch7.adb (Build_Invariant_Procedure_Body,
5661 Build_Invariant_Procedure_Declaration): Add a warning about
5662 using return statements in Ghost management code.
5663 * exp_disp.adb (Make_DT): Add a warning about using return
5664 statements in Ghost management code.
5665 * exp_util.adb (Build_DIC_Procedure_Body,
5666 Build_DIC_Procedure_Declaration, Make_Predicated_Call): Add a
5667 warning about using return statements in Ghost management code.
5668 * freeze.adb (Freeze_Entity): Add a warning about using return
5669 statements in Ghost management code.
5670 * sem.adb (Analyze, Do_Analyze): Add a warning about using return
5671 statements in Ghost management code.
5672 * sem_ch3.adb (Analyze_Object_Declaration, Process_Full_View): Add
5673 a warning about using return statements in Ghost management code.
5674 * sem_ch5.adb (Analyze_Assignment): Add a warning about using
5675 return statements in Ghost management code.
5676 * sem_ch6.adb (Analyze_Procedure_Call,
5677 Analyze_Subprogram_Body_Helper): Add a warning about using return
5678 statements in Ghost management code.
5679 * sem_ch7.adb (Analyze_Package_Body_Helper): Add a warning about
5680 using return statements in Ghost management code.
5681 * sem_ch12.adb (Analyze_Package_Instantiation,
5682 Analyze_Subprogram_Instantiation, Instantiate_Package_Body,
5683 Instantiate_Subprogram_Body): Add a warning about using return
5684 statements in Ghost management code.
5685 * sem_ch13.adb (Build_Predicate_Functions,
5686 Build_Predicate_Function_Declarations): Add a warning about
5687 using return statements in Ghost management code.
5688 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part,
5689 Analyze_Initial_Condition_In_Decl_Part, Analyze_Pragma,
5690 Analyze_Pre_Post_Condition_In_Decl_Part): Add a warning about
5691 using return statements in Ghost management code.
5692
5693 2017-01-13 Tristan Gingold <gingold@adacore.com>
5694
5695 * s-mmosin-mingw.adb: Fix pragma import.
5696
5697 2017-01-13 Arnaud Charlet <charlet@adacore.com>
5698
5699 * gnat1drv.adb (Adjust_Global_Switches): Ignore -gnateE in
5700 codepeer mode.
5701
5702 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
5703
5704 * atree.adb (Allocate_Initialize_Node): A newly created node is
5705 no longer marked as Ghost at this level.
5706 (Mark_New_Ghost_Node): New routine.
5707 (New_Copy): Mark the copy as Ghost.
5708 (New_Entity): Mark the entity as Ghost.
5709 (New_Node): Mark the node as Ghost.
5710 * einfo.adb (Is_Checked_Ghost_Entity): This attribute can now
5711 apply to unanalyzed entities.
5712 (Is_Ignored_Ghost_Entity): This attribute can now apply to unanalyzed
5713 entities.
5714 (Set_Is_Checked_Ghost_Entity): This attribute now
5715 applies to all entities as well as unanalyzed entities.
5716 (Set_Is_Ignored_Ghost_Entity): This attribute now applies to
5717 all entities as well as unanalyzed entities.
5718 * expander.adb Add with and use clauses for Ghost.
5719 (Expand): Install and revert the Ghost region associated with the node
5720 being expanded.
5721 * exp_ch3.adb (Expand_Freeze_Array_Type): Remove all Ghost-related code.
5722 (Expand_Freeze_Class_Wide_Type): Remoe all Ghost-related code.
5723 (Expand_Freeze_Enumeration_Type): Remove all Ghost-related code.
5724 (Expand_Freeze_Record_Type): Remove all Ghost-related code.
5725 (Freeze_Type): Install and revert the Ghost region associated
5726 with the type being frozen.
5727 * exp_ch5.adb Remove with and use clauses for Ghost.
5728 (Expand_N_Assignment_Statement): Remove all Ghost-related code.
5729 * exp_ch6.adb Remove with and use clauses for Ghost.
5730 (Expand_N_Procedure_Call_Statement): Remove all Ghost-relatd code.
5731 (Expand_N_Subprogram_Body): Remove all Ghost-related code.
5732 * exp_ch7.adb (Build_Invariant_Procedure_Body): Install and revert the
5733 Ghost region of the working type.
5734 (Build_Invariant_Procedure_Declaration): Install and revert
5735 the Ghost region of the working type.
5736 (Expand_N_Package_Body): Remove all Ghost-related code.
5737 * exp_ch8.adb Remove with and use clauses for Ghost.
5738 (Expand_N_Exception_Renaming_Declaration): Remove all Ghost-related
5739 code.
5740 (Expand_N_Object_Renaming_Declaration): Remove all Ghost-related code.
5741 (Expand_N_Package_Renaming_Declaration): Remove all Ghost-related code.
5742 (Expand_N_Subprogram_Renaming_Declaration): Remove all Ghost-related
5743 code.
5744 * exp_ch13.adb Remove with and use clauses for Ghost.
5745 (Expand_N_Freeze_Entity): Remove all Ghost-related code.
5746 * exp_disp.adb (Make_DT): Install and revert the Ghost region of
5747 the tagged type. Move the generation of various entities within
5748 the Ghost region of the type.
5749 * exp_prag.adb Remove with and use clauses for Ghost.
5750 (Expand_Pragma_Check): Remove all Ghost-related code.
5751 (Expand_Pragma_Contract_Cases): Remove all Ghost-related code.
5752 (Expand_Pragma_Initial_Condition): Remove all Ghost-related code.
5753 (Expand_Pragma_Loop_Variant): Remove all Ghost-related code.
5754 * exp_util.adb (Build_DIC_Procedure_Body): Install
5755 and revert the Ghost region of the working types.
5756 (Build_DIC_Procedure_Declaration): Install and revert the
5757 Ghost region of the working type.
5758 (Make_Invariant_Call): Install and revert the Ghost region of the
5759 associated type.
5760 (Make_Predicate_Call): Reimplemented. Install and revert the
5761 Ghost region of the associated type.
5762 * freeze.adb (Freeze_Entity): Install and revert the Ghost region
5763 of the entity being frozen.
5764 (New_Freeze_Node): Removed.
5765 * ghost.adb Remove with and use clauses for Opt.
5766 (Check_Ghost_Completion): Update the parameter profile
5767 and all references to formal parameters.
5768 (Ghost_Entity): Update the comment on usage.
5769 (Install_Ghost_Mode): New routines.
5770 (Is_Ghost_Assignment): New routine.
5771 (Is_Ghost_Declaration): New routine.
5772 (Is_Ghost_Pragma): New routine.
5773 (Is_Ghost_Procedure_Call): New routine.
5774 (Is_Ghost_Renaming): Removed.
5775 (Is_OK_Declaration): Reimplemented.
5776 (Is_OK_Pragma): Reimplemented.
5777 (Is_OK_Statement): Reimplemented.
5778 (Is_Subject_To_Ghost): Update the comment on usage.
5779 (Mark_And_Set_Ghost_Assignment): New routine.
5780 (Mark_And_Set_Ghost_Body): New routine.
5781 (Mark_And_Set_Ghost_Completion): New routine.
5782 (Mark_And_Set_Ghost_Declaration): New routine.
5783 (Mark_And_Set_Ghost_Instantiation): New routine.
5784 (Mark_And_Set_Ghost_Procedure_Call): New routine.
5785 (Mark_Full_View_As_Ghost): Removed.
5786 (Mark_Ghost_Declaration_Or_Body): New routine.
5787 (Mark_Ghost_Pragma): New routine.
5788 (Mark_Ghost_Renaming): New routine.
5789 (Mark_Pragma_As_Ghost): Removed.
5790 (Mark_Renaming_As_Ghost): Removed.
5791 (Propagate_Ignored_Ghost_Code): Update the comment on usage.
5792 (Prune_Node): Freeze nodes no longer need special pruning, they
5793 are processed by the general ignored Ghost code mechanism.
5794 (Restore_Ghost_Mode): New routine.
5795 (Set_Ghost_Mode): Reimplemented.
5796 (Set_Ghost_Mode_From_Entity): Removed.
5797 * ghost.ads Add with and use clauses for Ghost.
5798 (Check_Ghost_Completion): Update the parameter profile
5799 along with the comment on usage.
5800 (Install_Ghost_Mode): New routine.
5801 (Is_Ghost_Assignment): New routine.
5802 (Is_Ghost_Declaration): New routine.
5803 (Is_Ghost_Pragma): New routine.
5804 (Is_Ghost_Procedure_Call): New routine.
5805 (Mark_And_Set_Ghost_Assignment): New routine.
5806 (Mark_And_Set_Ghost_Body): New routine.
5807 (Mark_And_Set_Ghost_Completion): New routine.
5808 (Mark_And_Set_Ghost_Declaration): New routine.
5809 (Mark_And_Set_Ghost_Instantiation): New routine.
5810 (Mark_And_Set_Ghost_Procedure_Call): New routine.
5811 (Mark_Full_View_As_Ghost): Removed.
5812 (Mark_Ghost_Pragma): New routine.
5813 (Mark_Ghost_Renaming): New routine.
5814 (Mark_Pragma_As_Ghost): Removed.
5815 (Mark_Renaming_As_Ghost): Removed.
5816 (Restore_Ghost_Mode): New routine.
5817 (Set_Ghost_Mode): Redefined.
5818 (Set_Ghost_Mode_From_Entity): Removed.
5819 * sem.adb (Analyze): Install and revert the Ghost region of the
5820 node being analyzed.
5821 (Do_Analyze): Change the way a clean Ghost
5822 region is installed and reverted.
5823 * sem_ch3.adb (Analyze_Full_Type_Declaration): Remove
5824 all Ghost-related code.
5825 (Analyze_Incomplete_Type_Decl): Remove all Ghost-related code.
5826 (Analyze_Number_Declaration): Remove all Ghost-related code.
5827 (Analyze_Object_Declaration): Install and revert the Ghost region of
5828 a deferred object declaration's completion.
5829 (Array_Type_Declaration): Remove all Ghost-related code.
5830 (Build_Derived_Type): Update the comment on
5831 the propagation of Ghost attributes from a parent to a derived type.
5832 (Derive_Subprogram): Remove all Ghost-related code.
5833 (Make_Class_Wide_Type): Remove all Ghost-related code.
5834 (Make_Implicit_Base): Remove all Ghost-related code.
5835 (Process_Full_View): Install and revert the Ghost region of
5836 the partial view. There is no longer need to check the Ghost
5837 completion here.
5838 * sem_ch5.adb (Analyze_Assignment): Install and revert the Ghost
5839 region of the left hand side.
5840 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Remove
5841 all Ghost-related code.
5842 (Analyze_Expression_Function): Remove all Ghost-related code.
5843 (Analyze_Generic_Subprogram_Body): Remove all Ghost-related code.
5844 (Analyze_Procedure_Call): Install and revert the Ghost region of
5845 the procedure being called.
5846 (Analyze_Subprogram_Body_Helper): Install and revert the Ghost
5847 region of the spec or body.
5848 (Analyze_Subprogram_Declaration): Remove all Ghost-related code.
5849 (Build_Subprogram_Declaration): Remove all Ghost-related code.
5850 (Find_Corresponding_Spec): Remove all Ghost-related code.
5851 (Process_Formals): Remove all Ghost-related code.
5852 * sem_ch7.adb (Analyze_Package_Body_Helper): Install and revert
5853 the Ghost region of the spec.
5854 (Analyze_Package_Declaration): Remove all Ghost-related code.
5855 * sem_ch8.adb (Analyze_Exception_Renaming): Mark a renaming as
5856 Ghost when it aliases a Ghost entity.
5857 (Analyze_Generic_Renaming): Mark a renaming as Ghost when it aliases
5858 a Ghost entity.
5859 (Analyze_Object_Renaming): Mark a renaming as Ghost when
5860 it aliases a Ghost entity.
5861 (Analyze_Package_Renaming): Mark a renaming as Ghost when it aliases
5862 a Ghost entity.
5863 (Analyze_Subprogram_Renaming): Mark a renaming as Ghost when it
5864 aliases a Ghost entity.
5865 * sem_ch11.adb Remove with and use clauses for Ghost.
5866 (Analyze_Exception_Declaration): Remove all Ghost-related code.
5867 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Remove all
5868 Ghost-related code.
5869 (Analyze_Generic_Subprogram_Declaration): Remove all Ghost-related
5870 code.
5871 (Analyze_Package_Instantiation): Install and revert the Ghost region
5872 of the package instantiation.
5873 (Analyze_Subprogram_Instantiation): Install
5874 and revert the Ghost region of the subprogram instantiation.
5875 (Instantiate_Package_Body): Code clean up. Install and revert the
5876 Ghost region of the package body.
5877 (Instantiate_Subprogram_Body): Code clean up. Install and revert the
5878 Ghost region of the subprogram body.
5879 * sem_ch13.adb (Build_Predicate_Functions): Install
5880 and revert the Ghost region of the related type.
5881 (Build_Predicate_Function_Declaration): Code clean up. Install
5882 and rever the Ghost region of the related type.
5883 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
5884 Install and revert the Ghost region of the pragma.
5885 (Analyze_Initial_Condition_In_Decl_Part): Install and revert the
5886 Ghost region of the pragma.
5887 (Analyze_Pragma): Install and revert the Ghost region of various
5888 pragmas. Mark a pragma as Ghost when it is related to a Ghost entity
5889 or encloses a Ghost entity.
5890 (Analyze_Pre_Post_Condition): Install and revert the Ghost
5891 region of the pragma.
5892 (Analyze_Pre_Post_Condition_In_Decl_Part): Install and revert the
5893 Ghost region of the pragma.
5894 * sem_res.adb (Resolve): Remove all Ghost-related code.
5895 * sem_util.adb (Is_Declaration): Reimplemented.
5896 (Is_Declaration_Other_Than_Renaming): New routine.
5897 * sem_util.ads (Is_Declaration_Other_Than_Renaming): New routine.
5898 * sinfo.adb (Is_Checked_Ghost_Pragma): New routine.
5899 (Is_Ghost_Pragma): Removed.
5900 (Is_Ignored_Ghost_Pragma): New routine.
5901 (Set_Is_Checked_Ghost_Pragma): New routine.
5902 (Set_Is_Ghost_Pragma): Removed.
5903 (Set_Is_Ignored_Ghost_Pragma): New routine.
5904 * sinfo.ads: Update the documentation on Ghost mode and
5905 Ghost regions. New attributes Is_Checked_Ghost_Pragma
5906 and Is_Ignored_Ghost_Pragma along with usages in nodes.
5907 Remove attribute Is_Ghost_Pragma along with usages in nodes.
5908 (Is_Checked_Ghost_Pragma): New routine along with pragma Inline.
5909 (Is_Ghost_Pragma): Removed along with pragma Inline.
5910 (Is_Ignored_Ghost_Pragma): New routine along with pragma Inline.
5911 (Set_Is_Checked_Ghost_Pragma): New routine along with pragma Inline.
5912 (Set_Is_Ghost_Pragma): Removed along with pragma Inline.
5913 (Set_Is_Ignored_Ghost_Pragma): New routine along with pragma Inline.
5914
5915 2017-01-12 Tristan Gingold <gingold@adacore.com>
5916
5917 * s-mmap.ads, s-mmap.adb, s-mmosin-unix.ads, s-mmosin-unix.adb,
5918 s-mmauni-long.ads, s-mmosin-mingw.ads, s-mmosin-mingw.adb: New files.
5919
5920 2017-01-12 Yannick Moy <moy@adacore.com>
5921
5922 * errout.adb, errout.ads (Initialize): Factor common treatment
5923 in Reset_Warnings.
5924 (Reset_Warnings): New procedure to reset counts related to warnings.
5925 (Record_Compilation_Errors): New variable to store the presence of an
5926 error, used in gnat2why to allow changing the Warning_Mode.
5927 (Compilation_Errors): Use new variable Record_Compilation_Errors to
5928 store the presence of an error.
5929
5930 2017-01-12 Javier Miranda <miranda@adacore.com>
5931
5932 * sem_ch13.adb (Analyze_Aspect_Specifications):
5933 For Interrupt_Handler and Attach_ Handler aspects, decorate the
5934 internally built reference to the protected procedure as coming
5935 from sources and force its analysis.
5936
5937 2017-01-12 Ed Schonberg <schonberg@adacore.com>
5938
5939 * sem_ch3.adb (Build_Derived_Type): For a scalar derived type,
5940 inherit predicates if any from the first_subtype of the parent,
5941 not from the anonymous parent type.
5942 * sem_eval.adb (Is_Static_Subtype): A type that inherits a dynamic
5943 predicate is not a static subtype.
5944
5945 2017-01-12 Gary Dismukes <dismukes@adacore.com>
5946
5947 * freeze.adb (Check_Suspicious_Convention): New procedure
5948 performing a warning check on discriminated record types with
5949 convention C or C++. Factored out of procedure Freeze_Record_Type,
5950 and changed to only apply to base types (to avoid spurious
5951 warnings on subtypes). Minor improvement of warning messages
5952 to refer to discriminated rather than variant record types.
5953 (Freeze_Record_Type): Remove code for performing a suspicious
5954 convention check.
5955 (Freeze_Entity): Only call Freeze_Record_Type
5956 on types that aren't declared within any enclosing generic units
5957 (rather than just excluding the type when the innermost scope
5958 is generic). Call Check_Suspicious_Convention whether or not
5959 the type is declared within a generic unit.
5960 * sem_ch8.adb (In_Generic_Scope): Move this function to Sem_Util.
5961 * sem_util.ads, sem_util.adb (In_Generic_Scope): New function (moved
5962 from Sem_Ch8).
5963
5964 2017-01-12 Tristan Gingold <gingold@adacore.com>
5965
5966 * sysdep.c, adaint.c, rtinit.c, ming32.h:
5967 (__gnat_current_codepage): Renamed from CurrentCodePage
5968 (__gnat_current_ccs_encoding): Renamed from CurrentCCSEncoding
5969
5970 2017-01-12 Ed Schonberg <schonberg@adacore.com>
5971
5972 * sem_ch6.adb (Fully_Conformant_Expressions): Handle properly
5973 quantified expressions, following AI12-050: the loop parameters
5974 of two quantified expressions are conformant if they have the
5975 same identifier.
5976
5977 2017-01-12 Arnaud Charlet <charlet@adacore.com>
5978
5979 * gcc-interface/Makefile.in: Clean up VxWorks targets.
5980
5981 2017-01-12 Ed Schonberg <schonberg@adacore.com>
5982
5983 * sem_attr.adb (Analyze_Attribute_Reference, case Loop_Entry):
5984 Hnadle properly the attribute reference when it appears as part
5985 of an expression in another loop aspect.
5986
5987 2017-01-12 Ed Schonberg <schonberg@adacore.com>
5988
5989 * exp_ch3.adb (Check_Predicated_Discriminant): New procedure,
5990 subsidiary of Build_Initialization_Call, to complete generation
5991 of predicate checks on discriminants whose (sub)types have
5992 predicates, and to add checks on variants that do not have an
5993 others clause.
5994 * sem_util.adb (Gather_Components): A missing Others alternative is
5995 not an error when the type of the discriminant is a static predicate
5996 (and coverage has been checked when analyzing the case statement). A
5997 runtime check is generated to verify that a given discriminant
5998 satisfies the predicate (RM 3.8.1. (21.1/2)).
5999
6000 2017-01-12 Yannick Moy <moy@adacore.com>
6001
6002 * gnat1drv.adb (Adjust_Global_Switches): Only
6003 perform checking of exception mechanism when generating code.
6004
6005 2017-01-12 Justin Squirek <squirek@adacore.com>
6006
6007 * exp_ch7.adb (Add_Type_Invariants, Process_Array_Component):
6008 Remove handling of access component with invariant.
6009 (Build_Invariant_Procedure_Declaration): Remove return on class
6010 wide type.
6011 * freeze.adb (Freeze_Array_Type, Freeze_Record_Type): Remove
6012 conditional exception for component or array so Has_Own_Invariants
6013 flag is not falsly set.
6014 * sem_ch3.adb (Make_Class_Wide_Type): Initialize copy of class
6015 wide type to have no invariant flags.
6016
6017 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
6018
6019 * exp_ch9.adb, sem_prag.adb, s-tassta.adb, sem_util.adb, s-tarest.adb,
6020 sem_ch13.adb: Minor reformatting.
6021
6022 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
6023
6024 * exp_aggr.adb (Build_Record_Aggr_Code): Guard against a missing
6025 adjustment primitive when the ancestor type was not properly frozen.
6026 (Gen_Assign): Guard against a missing initialization
6027 primitive when the component type was not properly frozen.
6028 (Initialize_Array_Component): Guard against a missing adjustment
6029 primitive when the component type was not properly frozen.
6030 (Initialize_Record_Component): Guard against a missing adjustment
6031 primitive when the component type was not properly frozen.
6032 (Process_Transient_Component_Completion): The transient object may
6033 not be finalized when its associated type was not properly frozen.
6034 * exp_ch3.adb (Build_Assignment): Guard against a missing
6035 adjustment primitive when the component type was not properly frozen.
6036 (Build_Initialization_Call): Guard against a missing
6037 initialization primitive when the associated type was not properly
6038 frozen.
6039 (Expand_N_Object_Declaration): Guard against a missing
6040 adjustment primitive when the base type was not properly frozen.
6041 (Predefined_Primitive_Bodies): Create an empty Deep_Adjust
6042 body when there is no adjustment primitive available. Create an
6043 empty Deep_Finalize body when there is no finalization primitive
6044 available.
6045 * exp_ch4.adb (Apply_Accessibility_Check): Guard against a
6046 missing finalization primitive when the designated type was
6047 not properly frozen.
6048 (Expand_N_Allocator): Guard against a missing initialization primitive
6049 when the designated type was not properly frozen.
6050 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add the adjustment call
6051 only when the corresponding adjustment primitive is available.
6052 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Generate the
6053 adjustment/finalization statements only when there is an available
6054 primitive to carry out the action.
6055 (Build_Initialize_Statements): Generate the initialization/finalization
6056 statements only when there is an available primitive to carry out the
6057 action.
6058 (Make_Adjust_Call): Do not generate a call when the underlying
6059 type is not present due to a possible missing full view.
6060 (Make_Final_Call): Do not generate a call when the underlying
6061 type is not present due to a possible missing full view.
6062 (Make_Finalize_Address_Stmts): Generate an empty body when the
6063 designated type lacks a finalization primitive.
6064 (Make_Init_Call): Do not generate a call when the underlying type is
6065 not present due to a possible missing full view.
6066 (Process_Component_For_Adjust): Add the adjustment call only when the
6067 corresponding adjustment primitive is available.
6068 (Process_Component_For_Finalize): Add the finalization call only when
6069 the corresponding finalization primitive is available.
6070 (Process_Object_Declaration): Use a null statement to emulate a
6071 missing call to the finalization primitive of the object type.
6072 * exp_ch7.ads (Make_Adjust_Call): Update the comment on usage.
6073 (Make_Final_Call): Update the comment on usage.
6074 (Make_Init_Call): Update the comment on usage.
6075 * exp_util.adb (Build_Transient_Object_Statements): Code reformatting.
6076
6077 2017-01-12 Arnaud Charlet <charlet@adacore.com>
6078
6079 * einfo.ads: Update documentation of Address_Taken.
6080 * sem_attr.adb (Analyze_Access_Attribute, Resolve_Attribute
6081 [Access_Attribute]): Only consider 'Access/'Unchecked_Access
6082 for subprograms when setting Address_Taken flag.
6083
6084 2017-01-12 Patrick Bernardi <bernardi@adacore.com>
6085
6086 * sem_ch10.adb (Analyze_With_Clause): Removed code that turned
6087 Configurable_Run_Time_Mode off when analysing with'ed predefined
6088 libraries.
6089
6090 2017-01-12 Gary Dismukes <dismukes@adacore.com>
6091
6092 * sem_prag.adb: Minor reformatting.
6093 * sem_util.adb (Unique_Entity): fix result for
6094 bodies of entry families.
6095
6096 2017-01-12 Justin Squirek <squirek@adacore.com>
6097
6098 * sem_prag.adb (Analyze_Pragma): Add appropriate calls to
6099 Resolve_Suppressible in the pragma Assertion_Policy case.
6100 (Resolve_Suppressible): Created this function to factor out
6101 common code used to resolve Suppress to either Ignore or Check
6102 * snames.ads-tmpl: Add name for Suppressible.
6103
6104 2017-01-12 Gary Dismukes <dismukes@adacore.com>
6105
6106 * exp_ch9.adb, s-secsta.adb, snames.ads-tmpl, exp_ch3.adb: Minor
6107 reformatting.
6108 * debug.adb: Minor comment fixes.
6109
6110 2017-01-12 Arnaud Charlet <charlet@adacore.com>
6111
6112 * sem_util.adb (Unique_Entity): For concurrent
6113 bodies that are defined with stubs and complete a declaration
6114 of a single concurrent object return the entity of an implicit
6115 concurrent type, not the entity of the anonymous concurrent
6116 object.
6117 * debug.adb: -gnatd.J is no longer used.
6118 * make.adb (Globalize): Removed, no longer used.
6119 * sem_ch9.adb: minor typo in comment for entry index
6120
6121 2017-01-12 Patrick Bernardi <bernardi@adacore.com>
6122
6123 * aspect.adb, aspect.ads: Added new aspect Secondary_Stack_Size.
6124 * exp_ch3.adb (Build_Init_Statements): As part of initialising
6125 the value record of a task, set its _Secondary_Stack_Size field
6126 if present.
6127 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Create
6128 a _Secondary_Stack_Size field in the value record of
6129 the task if a Secondary_Stack_Size rep item is present.
6130 (Make_Task_Create_Call): Include secondary stack size
6131 parameter. If No_Secondary_Stack restriction is in place, passes
6132 stack size of 0.
6133 * par-prag.adb, sem_prag.adb, sem_prag.ads: Added new pragma
6134 Secondary_Stack_Size.
6135 * s-secsta.adb, s-secsta.ads (Minimum_Secondary_Stack_Size): New
6136 function to define the overhead of the secondary stack.
6137 * s-tarest.adb (Create_Restricted_Task,
6138 Create_Restricted_Task_Sequential): Functions now include
6139 Secondary_Stack_Size parameter to pass to Initialize_ATCB.
6140 * s-tarest.adb (Create_Restricted_Task,
6141 Create_Restricted_Task_Sequential): Calls to Initialize_ATCB now
6142 include Secondary_Stack_Size parameter.
6143 (Task_Wrapper): Secondary stack now allocated to the size specified by
6144 the Secondary_Stack_Size parameter in the task's ATCB.
6145 * s-taskin.adb, s-taskin.adb (Common_ATCB, Initialize_ATCB): New
6146 Secondary_Stack_Size component.
6147 * s-tassta.adb, s-tassta.ads (Create_Restricted_Task,
6148 Create_Restricted_Task_Sequential): Function now include
6149 Secondary_Stack_Size parameter.
6150 (Task_Wrapper): Secondary stack now allocated to the size
6151 specified by the Secondary_Stack_Size parameter in the task's
6152 ATCB.
6153 * s-tproft.adb (Register_Foreign_Thread): Amended Initialize_ATCB call
6154 to include Secondary_Stack_Size parameter.
6155 * sem_ch13.adb (Analyze_Aspect_Specification): Add support for
6156 Secondary_Stack_Size aspect, turning the aspect into its corresponding
6157 internal attribute.
6158 (Analyze_Attribute_Definition): Process Secondary_Stack_Size attribute.
6159 * snames.adb-tmpl, snames.ads-tmpl: Added names
6160 Name_Secondary_Stack_Size, Name_uSecondary_Stack_Size,
6161 Attribute_Secondary_Stack_Size and Pragma_Secondary_Stack_Size.
6162
6163 2017-01-12 Yannick Moy <moy@adacore.com>
6164
6165 * exp_spark.adb (Expand_SPARK_Potential_Renaming): Fix sloc of copied
6166 subtree.
6167
6168 2017-01-12 Justin Squirek <squirek@adacore.com>
6169
6170 * exp_attr.adb (Expand_N_Attribute_Reference):
6171 Fix Finalization_Size case by properly resolving the type after
6172 rewritting the node.
6173
6174 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
6175
6176 * exp_util.adb (Build_DIC_Procedure_Body): Semi-insert the body into
6177 the tree.
6178 (Build_DIC_Procedure_Declaration): Semi-insert the body into the tree.
6179 * binde.adb, exp_ch5.adb, sem_type.adb, sem.ads, sem_res.adb,
6180 exp_sel.ads: Minor reformatting.
6181
6182 2017-01-12 Justin Squirek <squirek@adacore.com>
6183
6184 * exp_ch6.adb (Expand_Call): Add guard to prevent
6185 invariant checks from being created for internally generated
6186 subprograms.
6187
6188 2017-01-12 Bob Duff <duff@adacore.com>
6189
6190 * lib-writ.ads: Remove incorrect comment.
6191
6192 2017-01-12 Javier Miranda <miranda@adacore.com>
6193
6194 * debug.adb (-gnatd.K): Enable generation of contract-only
6195 procedures in CodePeer mode.
6196 * contracts.adb (Build_And_Analyze_Contract_Only_Subprograms):
6197 New subprogram.
6198 (Analyze_Contracts): Generate contract-only procedures if -gnatdK is
6199 set.
6200 * scil_ll.ads, scil_ll.adb (Get_Contract_Only_Body_Name): New
6201 subprogram.
6202 (Get_Contract_Only_Missing_Body_Name): New subprogram.
6203 (Get_Contract_Only_Body): New subprogram.
6204 (Set_Contract_Only_Body): New subprogram.
6205 (Is_Contract_Only_Body): New subprogram.
6206 (Set_Is_Contract_Only_Body): New subprogram.
6207 (SCIL_Nodes): Replace table by hash-table.
6208
6209 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
6210
6211 * exp_ch6.adb: Minor reformatting.
6212 * spark_xrefs.ads: minor cleanup of comments for SPARK xrefs
6213
6214 2017-01-12 Bob Duff <duff@adacore.com>
6215
6216 * binde.adb (Forced): New reason for a dependence.
6217 (Force_Elab_Order): Implementation of the new switch.
6218 * binde.ads: Minor comment fixes.
6219 * bindusg.adb: Add -f switch. Apparently, there was an -f switch
6220 long ago that is no longer supported; removed comment about that.
6221 * opt.ads (Force_Elab_Order_File): Name of file specified for
6222 -f switch.
6223 * switch-b.adb: Parse -f switch.
6224
6225 2017-01-12 Justin Squirek <squirek@adacore.com>
6226
6227 * exp_ch6.adb (Check_View_Conversion): Created this function
6228 to properly chain calls to check type invariants that may be
6229 present in a subprogram call after the subprogram.
6230 (Expand_Call): Add a conditional to identify when a view conversion
6231 needs to be checked.
6232 * nlists.adb, nlists.ads (Prepend_New): New routine.
6233 (Prepend_New_To): New routine.
6234
6235 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
6236
6237 * sinfo.ads: Minor reformatting.
6238
6239 2017-01-12 Gary Dismukes <dismukes@adacore.com>
6240
6241 * exp_util.adb, exp_util.ads, einfo.ads: Minor typo fixes and
6242 reformatting.
6243
6244 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
6245
6246 * exp_ch6.adb (Make_Build_In_Place_Call_In_Anonymous_Context): Add new
6247 variable Definite. Create a local object and pass its 'Access to the
6248 BIP function when the result type is either definite or it does not
6249 require any finalization or secondary stack management.
6250
6251 2017-01-12 Bob Duff <duff@adacore.com>
6252
6253 * contracts.adb, einfo.adb, errout.adb, exp_attr.adb,
6254 exp_ch3.adb, exp_ch7.adb, exp_ch9.adb, exp_prag.adb, freeze.adb,
6255 frontend.adb, ghost.adb, inline.adb, lib-writ.adb, lib-xref.adb,
6256 par.adb, par-ch10.adb, par-ch2.adb, par-prag.adb, par_sco.adb,
6257 sem_attr.adb, sem_aux.adb, sem_ch10.adb, sem_ch12.adb,
6258 sem_ch13.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb, sem_elab.adb,
6259 sem_prag.adb, sem_res.adb, sem_util.adb, sem_util.ads,
6260 sem_warn.adb, sinfo.adb, sinfo.ads, sprint.adb (Pragma_Name):
6261 Change name to Pragma_Name_Unmapped.
6262 (Pragma_Name_Mapped): Change name to Pragma_Name.
6263 This is because the "mapped" version should be the usual case.
6264
6265 2017-01-09 Hristian Kirtchev <kirtchev@adacore.com>
6266
6267 * einfo.ads, einfo.adb: Remove uses of flags Has_Default_Init_Cond,
6268 Is_Default_Init_Cond_Procedure, and
6269 Has_Inherited_Default_Init_Cond. Add uses of flags
6270 Has_Own_DIC, Is_DIC_Procedure, and Has_Inherited_DIC.
6271 (Default_Init_Cond_Procedure): Removed.
6272 (DIC_Procedure): New routine.
6273 (Has_Default_Init_Cond): Removed.
6274 (Has_DIC): New routine.
6275 (Has_Inheritable_Invariants): The attribute applies to the base type.
6276 (Has_Inherited_Default_Init_Cond): Removed.
6277 (Has_Inherited_DIC): New routine.
6278 (Has_Inherited_Invariants): The attribute applies to the base type.
6279 (Has_Own_DIC): New routine.
6280 (Has_Own_Invariants): The attribute applies to the base type.
6281 (Is_Default_Init_Cond_Procedure): Removed.
6282 (Is_DIC_Procedure): New routine.
6283 (Set_Default_Init_Cond_Procedure): Removed.
6284 (Set_DIC_Procedure): New routine.
6285 (Set_Has_Default_Init_Cond): Removed.
6286 (Set_Has_Inheritable_Invariants): The attribute applies
6287 to the base type.
6288 (Set_Has_Inherited_Default_Init_Cond): Removed.
6289 (Set_Has_Inherited_DIC): New routine.
6290 (Set_Has_Inherited_Invariants): The attribute applies to the base type.
6291 (Set_Has_Own_DIC): New routine.
6292 (Set_Has_Own_Invariants): The attribute applies to the base type.
6293 (Set_Is_Default_Init_Cond_Procedure): Removed.
6294 (Set_Is_DIC_Procedure): New routine.
6295 (Write_Entity_Flags): Update the output of all flags related to
6296 default initial condition.
6297 * exp_ch3.adb (Expand_N_Object_Declaration): Update the generation
6298 of the call to the DIC procedure.
6299 (Freeze_Type): Generate the body of the DIC procedure.
6300 * exp_ch7.adb (Build_Invariant_Procedure_Body): Replace
6301 all occurrences of Create_Append with Append_New_To. Do
6302 not generate an invariant procedure for a class-wide type.
6303 The generated body acts as a freeze action of the working type.
6304 (Build_Invariant_Procedure_Declaration): Do not generate an
6305 invariant procedure for a class-wide type.
6306 (Create_Append): Removed.
6307 * exp_util.adb: Add with and use clauses for Sem_Ch3, sem_ch6,
6308 sem_Ch12, Sem_Disp, and GNAT.HTable. Move the handling of
6309 class-wide pre/postcondition description and data structures from
6310 Sem_Prag.
6311 (Build_Class_Wide_Expression): Moved from Sem_Prag.
6312 (Build_DIC_Call): New routine.
6313 (Build_DIC_Procedure_Body): New routine.
6314 (Build_DIC_Procedure_Declaration): New routine.
6315 (Entity_Hash): Moved from Sem_Prag.
6316 (Find_DIC_Type): New routine.
6317 (Update_Primitives_Mapping): Reimplemented.
6318 (Update_Primitives_Mapping_Of_Types): New routine.
6319 * exp_util.ads (Build_Class_Wide_Expression): Moved from Sem_Prag.
6320 (Build_DIC_Call): New routine.
6321 (Build_DIC_Procedure_Body): New routine.
6322 (Build_DIC_Procedure_Declaration): New routine.
6323 (Update_Primitives_Mapping): Moved from Sem_Prag.
6324 (Update_Primitives_Mapping_Of_Types): New routine.
6325 * nlists.adb (Append_New): New routine.
6326 (Append_New_To): New routine.
6327 * nlists.ads (Append_New): New routine.
6328 (Append_New_To): New routine.
6329 * sem_ch3.adb (Analyze_Declarations): Do not generate the bodies
6330 of DIC procedures here. This is now done at the end of the
6331 visible declarations, private declarations, and at the freeze
6332 point of a type.
6333 (Analyze_Private_Extension_Declaration):
6334 A private extension inherits the DIC pragma of a parent type.
6335 (Analyze_Subtype_Declaration): No need to propagate invariant
6336 attributes to a subtype as those apply to the base type.
6337 (Build_Derived_Record_Type): No need to inherit invariants here
6338 as this is now done in Build_Derived_Type.
6339 (Build_Derived_Type): Inherit both the DIC pragma and invariants from
6340 a parent type.
6341 (Process_Full_View): Update the propagation of DIC attributes.
6342 (Propagate_Default_Init_Cond_Attributes): Removed.
6343 * sem_ch7.adb Add with and use clauses for Exp_Util.
6344 (Analyze_Package_Specification): Create the body of the DIC
6345 procedure at the end of the visible and private declarations.
6346 (Preserve_Full_Attributes): Propagate DIC attributes.
6347 * sem_ch9.adb (Analyze_Protected_Type_Declaration): Propagate
6348 DIC attributes.
6349 (Analyze_Task_Type_Declaration): Propagate DIC attributes.
6350 * sem_elab.adb (Check_A_Call): Update the call to
6351 Is_Nontrivial_Default_Init_Cond_Procedure.
6352 * sem_prag.adb Remove the with and use clauses for
6353 GNAT.HTable. Move the handling of class- wide pre/postcondition
6354 description and data structures to Exp_Util.
6355 (Analyze_Pragma): Create the declaration of the DIC procedure. There
6356 is no need to propagate invariant-related attributes at this point
6357 as this is done in Build_Invariant_Procedure_Declaration.
6358 (Build_Class_Wide_Expression): Moved to Exp_Util.
6359 (Entity_Hash): Moved to Exp_Util.
6360 (Update_Primitives_Mapping): Moved to Exp_Util.
6361 * sem_prag.ads (Build_Class_Wide_Expression): Moved to Exp_Util.
6362 (Update_Primitives_Mapping): Moved to Exp_Util.
6363 * sem_util.adb: Remove with and use clauses for Ghost
6364 and Sem_Ch13.
6365 (Build_Default_Init_Cond_Call): Removed.
6366 (Build_Default_Init_Cond_Procedure_Bodies): Removed.
6367 (Build_Default_Init_Cond_Procedure_Declaration): Removed.
6368 (Get_Views): Reimplemented.
6369 (Has_Full_Default_Initialization): Reimplement the section on DIC.
6370 (Inherit_Default_Init_Cond_Procedure): Removed.
6371 (Is_Nontrivial_Default_Init_Cond_Procedure): Removed.
6372 (Is_Nontrivial_DIC_Procedure): New routine.
6373 (Is_Verifiable_DIC_Pragma): New routine.
6374 (Propagate_DIC_Attributes): New routine.
6375 * sem_util.ads (Build_Default_Init_Cond_Call): Removed.
6376 (Build_Default_Init_Cond_Procedure_Bodies): Removed.
6377 (Build_Default_Init_Cond_Procedure_Declaration): Removed.
6378 (Inherit_Default_Init_Cond_Procedure): Removed.
6379 (Is_Nontrivial_Default_Init_Cond_Procedure): Removed.
6380 (Is_Nontrivial_DIC_Procedure): New routine.
6381 (Is_Verifiable_DIC_Pragma): New routine.
6382 (Propagate_DIC_Attributes): New routine.
6383 * sem_warn.adb (Is_OK_Fully_Initialized): Reimplement the section
6384 on DIC.
6385 * sinfo.ads, sinfo.adb: Add new attribute Expression_Copy along with
6386 usage in nodes.
6387 (Expression_Copy): New routine along with pragma Inline.
6388 (Set_Expression_Copy): New routine along with pragma Inline.
6389
6390 2017-01-06 Bob Duff <duff@adacore.com>
6391
6392 * bindgen.adb (Gen_Adainit, Gen_Adafinal): Change
6393 "Bind_Main_Program" to "not Bind_For_Library", because otherwise
6394 we won't generate the call to s_stalib_adafinal when the main
6395 is not written in Ada.
6396
6397 2017-01-06 Bob Duff <duff@adacore.com>
6398
6399 * sem_prag.adb: Minor: remove pragma Warnings.
6400
6401 2017-01-06 Tristan Gingold <gingold@adacore.com>
6402
6403 * Makefile.rtl: Do not compile s-stchop by default.
6404
6405 2017-01-06 Patrick Bernardi <bernardi@adacore.com>
6406
6407 * aspects.adb, aspects.ads, exp_ch3.adb, exp_ch9.adb, par-prag.adb,
6408 sem_ch13.adb, sem_prag.adb, sem_prag.ads, snames.adb-tmpl,
6409 snames.ads-tmpl, s-secsta.adb, s-secsta.ads, s-tarest.adb,
6410 s-tarest.ads, s-taskin.adb, s-taskin.ads, s-tassta.adb, s-tassta.ads:
6411 Reverted previous change for now.
6412
6413 2017-01-06 Ed Schonberg <schonberg@adacore.com>
6414
6415 * exp_ch3.adb (Build_Initialization_Call): Apply predicate
6416 check to default discriminant value if checks are enabled.
6417 (Build_Assignment): If type of component has static predicate,
6418 apply check to its default value, if any.
6419
6420 2017-01-06 Patrick Bernardi <bernardi@adacore.com>
6421
6422 * aspect.adb, aspect.ads: Added new aspect Secondary_Stack_Size.
6423 * exp_ch3.adb (Build_Init_Statements): As part of initialising
6424 the value record of a task, set its _Secondary_Stack_Size field
6425 if present.
6426 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Create
6427 a _Secondary_Stack_Size field in the value record of
6428 the task if a Secondary_Stack_Size rep item is present.
6429 (Make_Task_Create_Call): Include secondary stack size
6430 parameter. If No_Secondary_Stack restriction is in place, passes
6431 stack size of 0.
6432 * par-prag.adb, sem_prag.adb, sem_prag.ads: Added new pragma
6433 Secondary_Stack_Size.
6434 * s-secsta.adb, s-secsta.ads (Minimum_Secondary_Stack_Size): New
6435 function to define the overhead of the secondary stack.
6436 * s-tarest.adb (Create_Restricted_Task,
6437 Create_Restricted_Task_Sequential): Functions now include
6438 Secondary_Stack_Size parameter to pass to Initialize_ATCB.
6439 * s-tarest.adb (Create_Restricted_Task,
6440 Create_Restricted_Task_Sequential): Calls to Initialize_ATCB
6441 now include Secondary_Stack_Size parameter.
6442 (Task_Wrapper):
6443 Secondary stack now allocated to the size specified by the
6444 Secondary_Stack_Size parameter in the task's ATCB.
6445 * s-taskin.adb, s-taskin.adb (Common_ATCB, Initialise_ATCB): New
6446 Secondary_Stack_Size component.
6447 * s-tassta.adb, s-tassta.ads (Create_Restricted_Task,
6448 Create_Restricted_Task_Sequential): Function now include
6449 Secondary_Stack_Size parameter.
6450 (Task_Wrapper): Secondary stack
6451 now allocated to the size specified by the Secondary_Stack_Size
6452 parameter in the task's ATCB.
6453 * sem_ch13.adb (Analyze_Aspect_Specification): Add support
6454 for Secondary_Stack_Size aspect, turning the aspect into its
6455 corresponding internal attribute.
6456 (Analyze_Attribute_Definition):
6457 Process Secondary_Stack_Size attribute.
6458 * snames.adb-tmpl, snames.ads-tmpl: Added names
6459 Name_Secondary_Stack_Size, Name_uSecondary_Stack_Size,
6460 Attribute_Secondary_Stack_Size and Pragma_Secondary_Stack_Size.
6461
6462 2017-01-06 Pascal Obry <obry@adacore.com>
6463
6464 * a-direio.adb, a-direio.ads, a-sequio.adb, a-sequio.ads: Add Flush to
6465 Sequential_IO and Direct_IO.
6466
6467 2017-01-06 Bob Duff <duff@adacore.com>
6468
6469 * snames.ads-tmpl (Renamed): New name for the pragma argument.
6470 * par-ch2.adb: Allow the new pragma (with analysis deferred
6471 to Sem_Prag).
6472 * sinfo.ads, sinfo.adb (Map_Pragma_Name, Pragma_Name_Mapped):
6473 Keep a mapping from new pragma names to old names.
6474 * sem_prag.adb: Check legality of pragma Rename_Pragma, and
6475 implement it by calling Map_Pragma_Name.
6476 * checks.adb, contracts.adb, einfo.adb, errout.adb,
6477 * exp_attr.adb, exp_ch3.adb, exp_ch6.adb, exp_ch7.adb, exp_ch9.adb,
6478 * exp_prag.adb, exp_util.adb, freeze.adb, frontend.adb, ghost.adb,
6479 * inline.adb, lib-writ.adb, scans.adb, scans.ads, sem_attr.adb,
6480 * sem_aux.adb, sem_ch10.adb, sem_ch13.adb, sem_ch6.adb, sem_ch9.adb,
6481 * sem_elab.adb, sem_res.adb, sem_util.adb, sem_util.ads,
6482 * sem_warn.adb: Call Pragma_Name_Mapped instead of Pragma_Name
6483 as appropriate.
6484
6485 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
6486
6487 * exp_ch9.adb: Minor reformatting.
6488
6489 2017-01-06 Tristan Gingold <gingold@adacore.com>
6490
6491 * exp_ch9.ads, exp_ch9.adb (Build_Entry_Names): Remove (unused).
6492 * rtsfind.ads (RE_Task_Entry_Names_Array, RO_ST_Set_Entry_Names)
6493 (RE_Protected_Entry_Names_Array, RO_PE_Set_Entry_Names): Remove
6494 (unused).
6495 * s-taskin.ads, s-taskin.adb (Set_Entry_Names,
6496 Task_Entry_Names_Array, Task_Entry_Names_Access): Remove.
6497 * s-tpoben.ads, s-tpoben.adb (Set_Entry_Names,
6498 Protected_Entry_Names_Array, Protected_Entry_Names_Access): Remove.
6499
6500 2017-01-06 Bob Duff <duff@adacore.com>
6501
6502 * sinfo.ads, sinfo.adb (Map_Pragma_Name): Preparation work,
6503 dummy implementation of Map_Pragma_Name.
6504
6505 2017-01-06 Tristan Gingold <gingold@adacore.com>
6506
6507 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Make the
6508 entry_body variable constant.
6509 * s-taprob.ads (Entry_Body_Access): Move to s-tposen.
6510 * s-tpoben.ads (Protected_Entry_Body_Access): Now access
6511 to constant.
6512 * s-tposen.ads (Entry_Body_Access): Moved from s-taprob,
6513 now access to constant.
6514
6515 2017-01-06 Gary Dismukes <dismukes@adacore.com>
6516
6517 * einfo.ads, sem_res.adb, sem_attr.adb, sem_ch6.adb: Minor
6518 reformatting and typo fixes.
6519
6520 2017-01-06 Bob Duff <duff@adacore.com>
6521
6522 * snames.ads-tmpl: New names for pragma renaming.
6523 * snames.adb-tmpl (Is_Configuration_Pragma_Name): Minor cleanup.
6524 * par-prag.adb: Add new pragma name to case statement.
6525 * sem_prag.adb (Rename_Pragma): Initial cut at semantic analysis
6526 of the pragma.
6527 * sinfo.ads, sinfo.adb (Pragma_Name_Mapped): Preparation work,
6528 Dummy implementation of Pragma_Name_Mapped.
6529
6530 2017-01-06 Ed Schonberg <schonberg@adacore.com>
6531
6532 * exp_ch6.adb (Expand_Protected_Subprogram_Call): Add guard to
6533 better detect call within an entry_wrapper.
6534 * sem_res.adb (Resolve_Call): A protected call within an
6535 entity_wrapper is analyzed in the context of the protected
6536 object but corresponds to a pre-analysis and is not an access
6537 before elaboration.
6538 * sem_attr.adb: Minor reformatting.
6539
6540 2017-01-06 Justin Squirek <squirek@adacore.com>
6541
6542 * sem_attr.adb (Analyze_Attribute): Modify semantic checks for
6543 Finalization_Size to allow a prefix of any non-class-wide type.
6544 * sem_attr.ads Modify comment for Finalization_Size to include
6545 definite type use case.
6546
6547 2017-01-06 Ed Schonberg <schonberg@adacore.com>
6548
6549 * einfo.ads, einfo.adb (Is_Entry_Wrapper): New flag, defined
6550 on procedures that are wrappers created for entries that have
6551 preconditions.
6552 * sem_ch6.adb (Analyze_Subrogram_Body_Helper): If the subprogram
6553 body is an entry_wrapper, compile it in the context of the
6554 synchronized type, because a precondition may refer to funtions
6555 of the type.
6556 * exp_ch9.adb (Build_Contract_Wrapper): Set Is_Entry_Wrapper on
6557 body entity.
6558 * exp_ch6.adb (Expand_Protected_Subprogram_Call): if the call is
6559 within an Entry_Wrapper this is an external call whose target
6560 is the synchronized object that is the actual in the call to
6561 the wrapper.
6562
6563 2017-01-06 Yannick Moy <moy@adacore.com>
6564
6565 * sem_attr.adb (Analyze_Attribute/Attribute_Loop_Entry): Analyze node
6566 in tree, which means not analyzing the previous prefix if the node has
6567 been rewritten into its prefix.
6568
6569 2017-01-06 Gary Dismukes <dismukes@adacore.com>
6570
6571 * s-tpobop.adb: Minor reformatting.
6572
6573 2017-01-06 Ed Schonberg <schonberg@adacore.com>
6574
6575 * checks.adb (Ensure_Valid): Do not generate a validity check
6576 within a generated predicate function, validity checks will have
6577 been applied earlier when required.
6578
6579 2017-01-06 Tristan Gingold <gingold@adacore.com>
6580
6581 * s-tpoben.ads (Protection_Entries): Add comment and reorder
6582 components for performances.
6583 * s-tpobop.adb (PO_Do_Or_Queue): Implement Max_Queue_Length runtime
6584 semantic.
6585
6586 2017-01-06 Ed Schonberg <schonberg@adacore.com>
6587
6588 * sem_eval.adb (Check_Expression_Against_Static_Predicate):
6589 If expression is compile-time known and obeys a static predicate
6590 it must be labelled as static, to prevent spurious warnings and
6591 run-time errors, e.g. in case statements. This is relevant when
6592 the expression is the result of constant-folding a type conversion
6593 whose expression is a variable with a known static value.
6594
6595 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
6596
6597 * exp_attr.adb, sem_attr.ads: Minor reformatting.
6598
6599 2017-01-06 Justin Squirek <squirek@adacore.com>
6600
6601 * exp_attr.adb (Expand_N_Attribute_Reference): Add entry for
6602 expansion of Finalization_Size attribute.
6603 * sem_attr.adb (Analyze_Attribute): Add entry to check the
6604 semantics of Finalization_Size.
6605 (Eval_Attribute): Add null entry for Finalization_Size.
6606 * sem_attr.ads: Add Finalization_Size to the implementation
6607 dependent attribute list.
6608 * snames.ads-tmpl: Add name entry for Finalization_Size attribute.
6609
6610 2017-01-06 Ed Schonberg <schonberg@adacore.com>
6611
6612 * sem_ch5.adb (Analyze_Loop_Statement): If the loop includes an
6613 iterator specification with a serious syntactic error, transform
6614 construct into an infinite loop in order to continue analysis
6615 and prevent a compiler abort.
6616
6617 2017-01-06 Tristan Gingold <gingold@adacore.com>
6618
6619 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Do not generate
6620 max_queue_lengths_array if unused.
6621
6622 2017-01-06 Bob Duff <duff@adacore.com>
6623
6624 * errout.adb (Set_Msg_Text): Protect against out-of-bounds
6625 array access, in case "\" is at the end of Text.
6626 * stylesw.adb (Set_Style_Check_Options): Don't include input
6627 characters in the error message template, because they could
6628 be control characters such as "\", which Errout will try to
6629 interpret.
6630
6631 2017-01-06 Ed Schonberg <schonberg@adacore.com>
6632
6633 * sem_ch4.adb (Find_Indexing_Operations, Inspect_Declarations):
6634 For a private type examine the visible declarations that follow
6635 the partial view, not just the private declarations that follow
6636 the full view.
6637
6638 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
6639
6640 * exp_ch5.adb, sem_ch3.adb, checks.adb: Minor reformatting and
6641 code cleanup.
6642
6643 2017-01-06 Ed Schonberg <schonberg@adacore.com>
6644
6645 * exp_ch5.adb (Get_Default_Iterator): For a derived type, the
6646 alias of the inherited op is the parent iterator, no need to
6647 examine dispatch table positions which might not be established
6648 yet if type is not frozen.
6649 * sem_disp.adb (Check_Controlling_Formals): The formal of a
6650 predicate function may be a subtype of a tagged type.
6651 * sem_ch3.adb (Complete_Private_Subtype): Adjust inheritance
6652 of representation items for the completion of a type extension
6653 where a predicate applies to the partial view.
6654 * checks.ads, checks.adb (Apply_Predicate_Check): Add optional
6655 parameter that designates function whose actual receives a
6656 predicate check, to improve warning message when the check will
6657 lead to infinite recursion.
6658 * sem_res.adb (Resolve_Actuals): Pass additional parameter to
6659 Apply_Predicate_Check.
6660
6661 2017-01-06 Tristan Gingold <gingold@adacore.com>
6662
6663 * s-rident.ads (Profile_Info): Remove No_Entry_Queue from
6664 Gnat_Extended_Ravenscar.
6665 * exp_ch9.adb, s-tpoben.adb, s-tpoben.ads: Fix spelling.
6666
6667 2017-01-06 Gary Dismukes <dismukes@adacore.com>
6668
6669 * sem_util.ads: Minor typo fix and reformatting.
6670
6671 2017-01-06 Yannick Moy <moy@adacore.com>
6672
6673 * ghost.adb Minor fixing of references to SPARK RM.
6674 (Check_Ghost_Context): Check whether reference is to a lvalue
6675 before issuing an error about violation of SPARK RM 6.9(13)
6676 when declaration has Ghost policy Check and reference has Ghost
6677 policy Ignore.
6678 * sem_util.adb Minor indentation.
6679 * sem_ch10.adb (Analyze_Package_Body_Stub, Analyze_Protected_Body_Stub,
6680 Analyze_Task_Body_Stub): Set Ekind of the defining identifier.
6681 * sem_util.ads (Unique_Defining_Entity): Document the result
6682 for package body stubs.
6683
6684 2017-01-06 Tristan Gingold <gingold@adacore.com>
6685
6686 * raise-gcc.c (abort): Macro to call Abort_Propagation.
6687 * s-tpoben.ads (Protected_Entry_Queue_Max_Access): Make it access
6688 constant.
6689 * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
6690 Do not generate the Entry_Max_Queue_Lengths_Array if all default
6691 values.
6692 * exp_util.adb (Corresponding_Runtime_Package): Consider
6693 Max_Queue_Length pragma.
6694
6695 2017-01-06 Justin Squirek <squirek@adacore.com>
6696
6697 * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
6698 Remove declaration generation in the case of
6699 System_Tasking_Protected_Objects_Single_Entry being used,
6700 and add a warning message when this is detected to occur.
6701 (Make_Initialize_Protection): Remove reference pass in the case
6702 of System_Tasking_Protected_Objects_Single_Entry.
6703 * rtsfind.ads: Remove RE_Protected_Entry_Queue_Max
6704 * s-tposen.adb (Initialize_Protection_Entry): Remove
6705 Entry_Queue_Max parameter.
6706 * s-tposen.ads: Remove the types use to store the entry queue
6707 maximum.
6708 * sem_prag.adb (Analyze_Pragma): Remove entry families restriction
6709
6710 2017-01-06 Yannick Moy <moy@adacore.com>
6711
6712 * sem_util.adb, sem_util.ads (Get_Enum_Lit_From_Pos): Strengthen
6713 behavior of function, to also accept out of range positions
6714 and raise Constraint_Error in such case, and to copy sloc from
6715 literal if No_Location passed as location.
6716 * uintp.adb, uintp.ads (UI_To_Int, UI_To_CC): Strengthen behavior
6717 of functions to raise Constraint_Error in case of value not in
6718 appropriate range.
6719
6720 2017-01-06 Tristan Gingold <gingold@adacore.com>
6721
6722 * sem_util.adb, s-taprop-linux.adb (Finalize_TCB): Remove call to
6723 Invalidate_Stack_Cache.
6724
6725 2017-01-06 Eric Botcazou <ebotcazou@adacore.com>
6726
6727 * s-os_lib.adb: Minor fix to the signature of Readlink.
6728
6729 2017-01-06 Javier Miranda <miranda@adacore.com>
6730
6731 * sem_ch6.adb (Conforming_Types): Handle another
6732 confusion between views in a nested instance with an actual
6733 private type whose full view is not in scope.
6734
6735 2017-01-06 Arnaud Charlet <charlet@adacore.com>
6736
6737 * exp_ch5.adb (Expand_N_If_Statement): Obey existing comment and
6738 mark a rewritten if statement as explicit (Comes_From_Source).
6739
6740 2017-01-06 Gary Dismukes <dismukes@adacore.com>
6741
6742 * sem_prag.adb, rtsfind.adb, sem_util.adb: Minor typo fixes.
6743
6744 2017-01-06 Tristan Gingold <gingold@adacore.com>
6745
6746 * ada.ads, a-unccon.ads: Add pragma No_Elaboration_Code_All.
6747
6748 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
6749
6750 * sem_case.adb: Minor reformatting.
6751
6752 2017-01-06 Thomas Quinot <quinot@adacore.com>
6753
6754 * g-socthi-mingw.adb: Remove now extraneous USE TYPE clause
6755
6756 2017-01-06 Justin Squirek <squirek@adacore.com>
6757
6758 * aspects.adb: Register aspect in Canonical_Aspect.
6759 * aspects.ads: Associate qualities of Aspect_Max_Queue_Length
6760 into respective tables.
6761 * einfo.ads, einfo.adb: Add a new attribute for
6762 handling the parameters for Pragma_Max_Entry_Queue
6763 (Entry_Max_Queue_Lengths_Array) in E_Protected_Type. Subprograms
6764 for accessing and setting were added as well.
6765 * par-prag.adb (Prag): Register Pramga_Max_Entry_Queue.
6766 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Emit
6767 declaration for pramga arguments and store them in the protected
6768 type node.
6769 (Make_Initialize_Protection): Pass a reference to
6770 the Entry_Max_Queue_Lengths_Array in the protected type node to
6771 the runtime.
6772 * rtsfind.adb: Minor grammar fix.
6773 * rtsfind.ads: Register new types taken from the
6774 runtime libraries RE_Protected_Entry_Queue_Max and
6775 RE_Protected_Entry_Queue_Max_Array
6776 * s-tposen.adb, s-tpoben.adb
6777 (Initialize_Protection_Entry/Initialize_Protection_Entries):
6778 Add extra parameter and add assignment to local object.
6779 * s-tposen.ads, s-tpoben.ads: Add new types to
6780 store entry queue maximums and a field to the entry object record.
6781 * sem_ch13.adb (Analyze_Aspect_Specifications): Add case statement
6782 for Aspect_Max_Queue_Length.
6783 (Check_Aspect_At_Freeze_Point):
6784 Add aspect to list of aspects that don't require delayed analysis.
6785 * sem_prag.adb (Analyze_Pragma): Add case statement for
6786 Pragma_Max_Queue_Length, check semantics, and register arugments
6787 in the respective entry nodes.
6788 * sem_util.adb, sem_util.ads Add functions Get_Max_Queue_Length
6789 and Has_Max_Queue_Length
6790 * snames.ads-tmpl: Add constant for the new aspect-name
6791 Name_Max_Queue_Length and corrasponding pragma.
6792
6793 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
6794
6795 * exp_util.adb (Is_Controlled_Function_Call):
6796 Reimplemented. Consider any node which has an entity as the
6797 function call may appear in various ways.
6798
6799 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
6800
6801 * exp_attr.adb (Rewrite_Stream_Proc_Call): Use
6802 an unchecked type conversion when performing a view conversion
6803 to/from a private type. In all other cases use a regular type
6804 conversion to ensure that any relevant checks are properly
6805 installed.
6806
6807 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
6808
6809 * sem_prag.adb, sem_ch8.adb: Minor reformatting.
6810
6811 2017-01-06 Ed Schonberg <schonberg@adacore.com>
6812
6813 * sem_case.adb (Explain_Non_Static_Bound): Suppress cascaded
6814 error on case expression that is an entity, when coverage is
6815 incomplete and entity has a static value obtained by local
6816 propagation.
6817 (Handle_Static_Predicate): New procedure, subsidiary of
6818 Check_Choices, to handle case alternatives that are either
6819 subtype names or subtype indications involving subtypes that
6820 have static predicates.
6821
6822 2017-01-06 Thomas Quinot <quinot@adacore.com>
6823
6824 * s-oscons-tmplt.c, g-socket.adb, g-socket.ads, g-sothco.ads:
6825 (GNAT.Socket): Add support for Busy_Polling and Generic_Option
6826
6827 2017-01-06 Bob Duff <duff@adacore.com>
6828
6829 * sem_elab.adb (Activate_Elaborate_All_Desirable): Don't add
6830 Elaborate_All(P) to P itself. That could happen in obscure cases,
6831 and always introduced a cycle (P body must be elaborated before
6832 P body).
6833 * lib-writ.ads: Comment clarification.
6834 * ali-util.ads: Minor comment fix.
6835 * ali.adb: Minor reformatting.
6836
6837 2017-01-06 Tristan Gingold <gingold@adacore.com>
6838
6839 * a-exexpr-gcc.adb: Improve comment.
6840
6841 2017-01-03 James Cowgill <James.Cowgill@imgtec.com>
6842
6843 * s-linux-mips.ads: Use correct signal and errno constants.
6844 (sa_handler_pos, sa_mask_pos): Fix offsets for 64-bit MIPS.
6845
6846 2017-01-03 James Cowgill <James.Cowgill@imgtec.com>
6847
6848 * s-linux-mips.ads: Rename from s-linux-mipsel.ads.
6849 * gcc-interface/Makefile.in (MIPS/Linux): Merge mips and mipsel
6850 sections.
6851
6852 2017-01-01 Eric Botcazou <ebotcazou@adacore.com>
6853
6854 * gnatvsn.ads: Bump copyright year.
6855
6856 2017-01-01 Jakub Jelinek <jakub@redhat.com>
6857
6858 * gnat_ugn.texi: Bump @copying's copyright year.
6859 * gnat_rm.texi: Likewise.
6860 \f
6861 Copyright (C) 2017 Free Software Foundation, Inc.
6862
6863 Copying and distribution of this file, with or without modification,
6864 are permitted in any medium without royalty provided the copyright
6865 notice and this notice are preserved.