]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/ada/ChangeLog
Fix double word typos.
[thirdparty/gcc.git] / gcc / ada / ChangeLog
CommitLineData
026c3cfd
AH
12015-07-12 Aldy Hernandez <aldyh@redhat.com>
2
3 * gcc-interface/utils.c: Fix double word typos.
4 * gnat_ugn.texi: Same.
5 * init.c: Same.
6 * par.adb: Same.
7 * projects.texi: Same.
8 * sem_ch4.adb: Same.
9 * sem_ch6.adb: Same.
10 * sem_dim.adb: Same.
11 * sem_eval.adb: Same.
12 * sem_prag.adb: Same.
13 * sem_warn.adb: Same.
14
c7131fb2
AM
152015-07-07 Andrew MacLeod <amacleod@redhat.com>
16
17 * gcc-interface/cuintp.c: Adjust includes.
18 * gcc-interface/decl.c: Likewise.
19 * gcc-interface/misc.c: Likewise.
20 * gcc-interface/targtyps.c: Likewise.
21 * gcc-interface/trans.c: Likewise.
22 * gcc-interface/utils.c: Likewise.
23 * gcc-interface/utils2.c: Likewise.
24
766a1e55
JM
252015-07-06 John Marino <gnugcc@marino.st>
26
27 * s-oscons-tmplt.c: Add support for DragonFly alongside FreeBSD.
28
755c71fa
EB
292015-06-29 Eric Botcazou <ebotcazou@adacore.com>
30
31 PR ada/63310
32 * gcc-interface/utils.c (gnat_write_global_declarations): Always
33 build the dummy global variable if code was generated.
34
da2e71c9
MLI
352015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
36
37 PR fortran/66605
38 * gcc-interface/misc.c (gnat_post_options): No need to disable
39 warn_unused_parameter anymore.
40
bc583f7a
EB
412015-06-26 Eric Botcazou <ebotcazou@adacore.com>
42
43 * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): When
44 not optimizing the CFG, clear the DECL_DECLARED_INLINE_P flag on the
45 at-end procedures.
46
a22b794d
EB
472015-06-26 Eric Botcazou <ebotcazou@adacore.com>
48
49 * gcc-interface/gigi.h (note_types_used_by_globals): Delete.
50 (gnat_write_global_declarations): New prototype.
51 * gcc-interface/utils.c (type_decls): Rename back to...
52 (global_decls): ...this.
53 (gnat_pushdecls): Revert previous change.
54 (create_var_decl): Do not output global variables.
55 (note_types_used_by_globals): Rename back to...
56 (gnat_write_global_declarations): ...this. Output variables on the
57 global_decls vector.
58 * gcc-interface/misc.c (gnat_parse_file): Adjust to above renaming.
59
6249559b
EB
602015-06-26 Eric Botcazou <ebotcazou@adacore.com>
61
62 * gcc-interface/gigi.h (create_var_decl_1): Rename into...
63 (create_var_decl): ...this. Add default value for last parameter.
64 (create_type_stub_decl): Adjust.
65 (create_type_decl): Likewise.
66 (create_field_decl): Likewise.
67 (create_param_decl): Likewise.
68 (create_label_decl): Likewise.
69 (create_subprog_decl): Likewise.
70 * gcc-interface/utils.c (create_var_decl_1): Rename into...
71 (create_var_decl): ...this. Rename var_name into name and var_init
72 into init, move const_decl_allowed_p last and adjust accordingly.
73 (create_type_stub_decl): Rename type_name into name and adjust.
74 (create_type_decl): Likewise.
75 (create_field_decl): Likewise for field_name and field_type.
76 (create_param_decl): Likewise for param_name and param_type.
77 (create_label_decl): Likewise for label_name.
78 (create_subprog_decl): Likewise for subprog_name and subprog_type.
79 * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust couple of calls
80 to create_var_decl_1.
81
87ab2b04
EB
822015-06-26 Eric Botcazou <ebotcazou@adacore.com>
83
84 * gcc-interface/trans.c (loop_info_d): Add low_bound, high_bound,
85 artificial, has_checks and warned_aggressive_loop_optimizations.
86 (gigi): Set warn_aggressive_loop_optimizations to 0.
87 (inside_loop_p): New inline predicate.
88 (push_range_check_info): Rename into...
89 (find_loop_for): ...this and do not push range_check_info_d object.
90 (Loop_Statement_to_gnu): Set artificial, low_bound and high_bound
91 fields of gnu_loop_info. Adjust detection of checks enabled by
92 -funswitch-loops and adds one for -faggressive-loop-optimizations.
93 (gnat_to_gnu) <N_Indexed_Component>: If aggressive loop optimizations
94 are enabled, warn for loops overrunning an array of size 1 not at the
95 end of a record.
96
f0889939
AM
972015-06-25 Andrew MacLeod <amacleod@redhat.com>
98
99 * gcc-interface/trans.c: Remove ipa-ref.h and plugin-api.h from include
100 list.
101 * gcc-interface/utils.c: Likewise.
102
6c907cff
RS
1032015-06-25 Richard Sandiford <richard.sandiford@arm.com>
104
105 * gcc-interface/decl.c (value_annotation_hasher): Inherit from
106 ggc_cache_ptr_hash rather than ggc_cache_hasher.
107 * gcc-interface/utils.c (pad_type_hasher): Likewise.
108
08ec2754
RS
1092015-06-25 Richard Sandiford <richard.sandiford@arm.com>
110
111 * gcc-interface/decl.c (value_annotation_hasher::handle_cache_entry):
112 Delete.
113 (value_annotation_hasher::keep_cache_entry): New function.
114 * gcc-interface/utils.c (pad_type_hasher::handle_cache_entry):
115 Delete.
116 (pad_type_hasher::keep_cache_entry): New function.
117
16a16ec7
AM
1182015-06-25 Andrew MacLeod <amacleod@redhat.com>
119
120 * gcc-interface/misc.c: Include calls.h not function.h.
121
c1a569ef
EB
1222015-06-19 Eric Botcazou <ebotcazou@adacore.com>
123
124 * gcc-interface/gigi.h (record_builtin_type): Adjust comment.
125 (tree create_type_decl): Likewise.
126 (create_var_decl_1): Add artificial_p and debug_info_p parameters.
127 (create_var_decl): Likewise.
128 (create_true_var_decl): Delete.
129 (create_subprog_decl): Add debug_info_p parameter.
130 * gcc-interface/decl.c (gnat_to_gnu_entity): Add artificial_p local
131 variable and use it throughout. Remove DECL_ARTIFICIAL settings.
132 <E_Variable>: Adjust calls to create_var_decl and create_var_decl_1.
133 Remove DECL_IGNORED_P settings.
134 <E_Enumeration_Type>: Likewise.
135 <E_Record_Type>: Likewise.
136 <E_Subprogram_Type>: Likewise. Remove artificial_flag local variable.
137 Adjust call to create_subprog_decl.
138 (get_minimal_subprog_decl): Likewise.
139 (elaborate_expression_1): Adjust call to create_var_decl.
140 * gcc-interface/trans.c (gigi): Adjust calls to create_var_decl and
141 create_subprog_decl. Remove DECL_ARTIFICIAL & DECL_IGNORED_P settings.
142 * gcc-interface/utils.c (maybe_pad_type): Likewise.
143 (record_builtin_type): Adjust comment.
144 (create_type_stub_decl): Remove obsolete comment.
145 (create_var_decl_1): Add artificial_p and debug_info_p parameters.
146 Set DECL_ARTIFICIAL and DECL_IGNORED_P accordingly.
147 (create_subprog_decl): Add debug_info_p parameter. Set DECL_IGNORED_P
148 accordingly.
149
1502015-06-19 Eric Botcazou <ebotcazou@adacore.com>
151
152 * gcc-interface/misc.c (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): Define.
153
b24f7345
EB
1542015-06-19 Eric Botcazou <ebotcazou@adacore.com>
155
156 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Make sure
157 the size of a padding type built around the return type is positive.
158 * gcc-interface/trans.c (gnat_to_gnu) <N_Simple_Return_Statement>:
159 Use INIT_EXPR instead of MODIFY_EXPR to assign to the return object.
160
abb226c9
AM
1612015-06-17 Andrew MacLeod <amacleod@redhat.com>
162
163 * gcc-interface/cuintp.c: Do not include input.h, line-map.h or is-a.h.
164 * gcc-interface/decl.c: Likewise.
165 * gcc-interface/misc.c: Likewise.
166 * gcc-interface/targtyps.c: Likewise.
167 * gcc-interface/trans.c: Likewise.
168 * gcc-interface/utils.c: Likewise.
169 * gcc-interface/utils2.c: Likewise.
170
881a5e60
PMR
1712015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
172
173 * gcc-interface/utils.c (get_global_context): Register the main
174 translation unit through the new debug hook.
175
ed51d0c5
EB
1762015-06-09 Eric Botcazou <ebotcazou@adacore.com>
177
178 * gcc-interface/misc.c: Remove duplicate include directives.
179 * gcc-interface/trans.c: Likewise.
180 * gcc-interface/utils.c: Likewise.
181
13fdf2e2
AM
1822015-06-08 Andrew MacLeod <amacleod@redhat.com>
183
184 * gcc-interface/cuintp.c : Adjust include files.
185 * gcc-interface/decl.c : Likewise.
186 * gcc-interface/misc.c : Likewise.
187 * gcc-interface/targtyps.c : Likewise.
188 * gcc-interface/trans.c : Likewise.
189 * gcc-interface/utils.c : Likewise.
190 * gcc-interface/utils2.c : Likewise.
191
90af5990
JM
1922015-06-08 John Marino <gnugcc@marino.st>
193
194 * a-intnam-dragonfly.ads: New.
195 * s-osinte-dragonfly.adb: Likewise.
196 * s-osinte-dragonfly.ads: Likewise.
197 * system-dragonfly-x86_64.ads: Likewise.
198 * adaint.c: Add BSD macros.
199 * cstreams.c: Likewise.
200 * gsocket.h: Likewise.
201 * link.c: Likewise.
202 * socket.c: Likewise.
203 * env.c: Add __DragonFly__, remove __FreeBSD__ macro.
204 * init.c: Add __DragonFly__, change __gnat_install_handler
205 prototype from empty to void.
206 * initialize.c: Add __DragonFly__.
207 * sysdep.c: Likewise.
208 * s-osinte-freebsd.adb: Use __get_errno instead of __error.
209 * tracebak.c: Set unwinder for i386 BSD.
210 * gcc-interface/Makefile.in: Add x86_64 DragonFly, tweak
211 x86_64 FreeBSD and x86 FreeBSD.
212
ad42dbbe
EB
2132015-06-06 Eric Botcazou <ebotcazou@adacore.com>
214
215 * gcc-interface/utils.c (note_types_used_by_globals): Tweak comment.
216 * gcc-interface/decl.c (gnat_to_gnu_entity): Likewise.
217
d7438551
AH
2182015-06-05 Aldy Hernandez <aldyh@redhat.com>
219
220 * gcc-interface/gigi.h (note_types_used_by_globals): Rename from
221 gnat_write_global_declarations.
222 * gcc-interface/misc.c (gnat_parse_file): Call
223 note_types_used_by_globals.
224 Remove LANG_HOOKS_WRITE_GLOBALS.
225 * gcc-interface/utils.c: Rename global_decls to type_decls.
226 (gnat_write_global_declarations): Rename
227 to note_types_used_by_globals.
228 Remove call to finalize_compilation_unit.
ad42dbbe 229 Remove call to debug_hooks->global_decl for globals.
d7438551
AH
230 (gnat_pushdecls): Only insert into type_decls if TYPE_DECL.
231
ecb9f223
AM
2322015-06-04 Andrew MacLeod <amacleod@redhat.com>
233
234 * gcc-interface/cuintp.c: Adjust includes for restructured coretypes.h.
235 * gcc-interface/decl.c: Likewise.
236 * gcc-interface/misc.c: Likewise.
237 * gcc-interface/targtyps.c: Likewise.
238 * gcc-interface/trans.c: Likewise.
239 * gcc-interface/utils.c: Likewise.
240 * gcc-interface/utils2.c: Likewise.
241
3e7e725b
PMR
2422015-06-04 Pierre-Marie de Rodat <derodat@adacore.com>
243
244 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: If
245 processing a definition, create definitions for padding types
246 around return types.
247
4b7bd260
EB
2482015-06-03 Eric Botcazou <ebotcazou@adacore.com>
249
250 * gcc-interface/utils.c (copy_type): Also set TYPE_CANONICAL.
251
d020df06
EB
2522015-06-03 Eric Botcazou <ebotcazou@adacore.com>
253
254 * gcc-interface/trans.c (gnat_to_gnu) <N_Simple_Return_Statement>: Fix
255 typo in latest change.
256
b4900b37
EB
2572015-06-01 Eric Botcazou <ebotcazou@adacore.com>
258
259 * gcc-interface/Makefile.in: Fix ARM/Darwin configuration.
260
3b5d86ec
PMR
2612015-06-01 Pierre-Marie de Rodat <derodat@adacore.com>
262
263 * gcc-interface/utils.c (scale_by_factor_of): When handling a function
264 call expression, process the corresponding function body. Also handle
265 potential addends.
266
66dc4b95
PMR
2672015-06-01 Pierre-Marie de Rodat <derodat@adacore.com>
268
269 * gcc-interface/decl.c (gnat_to_gnu_entity): Replace pointer types with
270 references ones for functions that return references.
271
bd769c83
EB
2722015-06-01 Eric Botcazou <ebotcazou@adacore.com>
273
274 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: For a
275 definition of a type coming from a limited_with, get to the full view
276 if it is not in the main code unit.
277
2b50232a
EB
2782015-06-01 Eric Botcazou <ebotcazou@adacore.com>
279
280 * gcc-interface/utils.c (create_var_decl_1): If an assembler name is
281 specified, let the target mangle it before settting.
282 (create_subprog_decl): Likewise and move this treatment last.
283
cfa936d4
EB
2842015-06-01 Eric Botcazou <ebotcazou@adacore.com>
285
286 * gcc-interface/lang-specs.h (TARGET_VXWORKS_RTP): Move substitution to
b2fbb27f 287 before first -gnatez switch. Simplify and add trailing space.
cfa936d4 288
8c41a1c8
EB
2892015-06-01 Eric Botcazou <ebotcazou@adacore.com>
290
291 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: If the
292 record has a parent field and a representation clause, make sure that
293 it is properly aligned.
294
ed98eed8
EB
2952015-06-01 Eric Botcazou <ebotcazou@adacore.com>
296
297 * gcc-interface/trans.c (lvalue_required_p) <N_Indexed_Component>: Deal
298 with character and enumeration literals as index values.
299
73a1a803
EB
3002015-06-01 Eric Botcazou <ebotcazou@adacore.com>
301
302 * gcc-interface/gigi.h (build_simple_component_ref): Declare.
303 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Deal with
304 address clause on aliased object with unconstrained nominal subtype.
305 Mark the aligning variable as artificial, do not convert the address
306 expression immediately but mark it as constant instead.
307 * gcc-interface/utils.c (convert): If the target type contains a
308 template, be prepared for an empty array.
309 (maybe_unconstrained_array): Likewise.
310 * gcc-interface/utils2.c (known_alignment) <POINTER_PLUS_EXPR>: Deal
311 with the pattern built for aligning types.
312 <INTEGER_CST>: Do not cap the value at BIGGEST_ALIGNMENT.
313 (build_simple_component_ref): Make public.
314 If the base object is a constructor that contains a template, fold the
315 result field by field.
316
ce8cddc1
EB
3172015-05-31 Eric Botcazou <ebotcazou@adacore.com>
318
319 * s-oscons-tmplt.c: Add explicit tests for Android alongside Linux.
320
329be64b
EB
3212015-05-30 Eric Botcazou <ebotcazou@adacore.com>
322
323 * adaint.c: Test for __linux__ instead of linux and __sun__ instead
324 of sun. Add missing leading underscore to AIX. Remove #elif 0.
325 * adaint.h: Likewise.
326 * cio.c: Likewise.
327 * cstreams.c: Likewise.
328 * env.c: Likewise.
329 * gsocket.h: Likewise.
330 * init.c: Likewise. Test for __i386__ instead of i386.
331 * link.c: Likewise.
332 * s-oscons-tmplt.c: Likewise.
333 * sysdep.c: Likewise.
334 * terminals.c: Likewise. Use BSD symbol instead of FREEBSD.
335 * tracebak.c: Likewise. Test for __sparc__ instead of sparc.
336
396e67d2
EB
3372015-05-28 Eric Botcazou <ebotcazou@adacore.com>
338
339 * gcc-interface/utils.c (max_size) <tcc_binary>: Add special code to
340 deal with the subtraction of a "negative" value in an unsigned type.
341
afd6f702
EB
3422015-05-28 Eric Botcazou <ebotcazou@adacore.com>
343
344 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Do
345 not error out on a return type which has a size that overflows if the
346 return is done by invisible reference.
347
79714815
EB
3482015-05-28 Eric Botcazou <ebotcazou@adacore.com>
349
350 * gcc-interface/utils.c (gnat_pushdecl): Reunify the handling of array
351 and pointer types wrt DECL_ORIGINAL_TYPE and adjust left and right.
352
fc7a823e
EB
3532015-05-28 Eric Botcazou <ebotcazou@adacore.com>
354
355 * gcc-interface/gigi.h (gnat_stabilize_reference): Adjust.
356 (rewrite_fn): Remove third parameter.
357 (type_is_padding_self_referential): New inline predicate.
358 (return_type_with_variable_size_p): Likewise.
359 * gcc-interface/decl.c (allocatable_size_p): More around.
360 (cannot_be_superflat_p): Rename into...
361 (cannot_be_superflat ): ...this.
362 (initial_value_needs_conversion): New predicate.
363 (gnat_to_gnu_entity): Invoke type_is_padding_self_referential,
364 initial_value_needs_conversion and adjust to above renaming.
365 For a renaming, force the materialization if the inner expression
366 is compound. Adjust calls to elaborate_reference and build a
367 compound expression if needed.
368 (struct er_dat): Add N field.
369 (elaborate_reference_1): Remove N parameter and adjust.
370 (elaborate_reference): Add INIT parameter and pass it in the call to
371 gnat_rewrite_reference. Adjust initial expression.
372 * gcc-interface/trans.c (Call_to_gnu): Treat renamings the same way as
373 regular object declarations when it comes to creating a temporary.
374 Adjust call to gnat_stabilize_reference and build a compound expression
375 if needed. Invoke return_type_with_variable_size_p.
376 (gnat_to_gnu): Invoke type_is_padding_self_referential. In case #4,
377 return a call to a function unmodified if it returns with variable size
378 and is also the initial expression in an object declaration.
379 * gcc-interface/utils2.c (build_binary_op) <INIT_EXPR>: Use the RHS'
380 type if it is a call to a function that returns with variable size.
381 (build_unary_op): Invoke type_is_padding_self_referential.
382 (gnat_stabilize_reference_1): Remove N parameter and adjust.
383 (gnat_stabilize_reference): Add INIT parameter and pass it in the call
384 to gnat_rewrite_reference.
385 (gnat_rewrite_reference): Remove N, add INIT parameter and adjust.
386 <COMPOUND_EXPR>: New case.
387
22872224
AC
3882015-05-28 Ed Schonberg <schonberg@adacore.com>
389
390 * sem_ch3.adb (Is_Visible_Component): Component is visible
391 in a derived type if inherited through an ancestor that has a
392 partial view of the original type holding the component, if the
393 full view of that original type is in scope.
394 * sem_util.ads (Get_Body_From_Stub): Works for all kinds of stubs.
395
3962015-05-28 Bob Duff <duff@adacore.com>
397
398 * sem_util.adb (Requires_Transient_Scope): For definite untagged
399 subtypes, we should never have to use the secondary stack. This moves
400 toward that goal. But there are still cases that don't work.
401 Here, we move the check for Is_Definite first, but add a
402 special-purpose check for Has_Discrim_Dep_Array.
403
d3b1cbdd
BD
4042015-05-28 Bob Duff <duff@adacore.com>
405
406 * sem_util.adb (Requires_Transient_Scope): Avoid returning
407 function results on the secondary stack in so many cases.
408
4d6a38a5
ES
4092015-05-28 Ed Schonberg <schonberg@adacore.com>
410
411 * sem_util.adb (Wrong_Type): In any instance, do not emit error
412 if type of expression is the partial view of the expected type.
413
4142015-05-28 Ed Schonberg <schonberg@adacore.com>
415
416 * sem_res.adb (Resolve_Actuals): a) The replacement of formal
417 names in named associations only needs to be done within an
418 instance, on a call to a primitive of a formal derived type,
419 where the actual subprogram may have different formal names than
420 those of the primitive operation of the formal type.
421 b) Defaulted parameters must be taken into account when obtaining
422 the names of the formals of the actual subprogram being called.
423
7d9880c9
AC
4242015-05-28 Robert Dewar <dewar@adacore.com>
425
426 * sem_ch13.adb, sem_disp.ads: Minor reformatting.
427
4282015-05-28 Ed Schonberg <schonberg@adacore.com>
429
430 * sem_util.adb (Set_Debug_Info_Needed): For a private type
431 whose full view is itself a derived private type, set flag on
432 underlying full view as well, for proper gdb display.
433
4342015-05-28 Bob Duff <duff@adacore.com>
435
436 * exp_tss.ads: Minor comment fix.
437 * exp_ch3.adb (Build_Array_Init_Proc, Build_Record_Init_Proc):
438 Inline init_procs when the type has controlled parts. Remove
439 obsolete comments about those init_procs -- init_procs for
440 such types are no longer complex. A typical init_proc just
441 initializes the 'Tag field, and calls the parent init_proc
442 (e.g. for Limited_Controlled), which calls the grandparent
443 (for Root_Controlled), which does nothing. This all boils down
444 to one instruction when inlined.
445 * exp_ch7.adb (Create_Finalizer): Inline the finalizer.
446
4472015-05-28 Ed Schonberg <schonberg@adacore.com>
448
449 * sem_ch4.adb (Analyze_Selected_Component): If the type to use
450 is a derived type and is a generic actual, the selected component
451 appears within an instance body, and the check over the type
452 has failed, examine ancestor types for the desired component.
453 (Find_Component_In_Instance): If record type is a derived type,
454 examine all ancestors in order to locate desired component.
455
428b3812
L
4562015-05-27 H.J. Lu <hongjiu.lu@intel.com>
457
458 * gcc-interface/Makefile.in (TOOLS_LIBS): Add @NO_PIE_FLAG@.
459
73b4a60f
EB
4602015-05-27 Eric Botcazou <ebotcazou@adacore.com>
461
462 * gcc-interface/trans.c (elaborate_all_entities): Do not elaborate an
463 incomplete type coming from a limited_with and whose non-limited view
464 comes from the main unit.
465
e590690e
EB
4662015-05-27 Eric Botcazou <ebotcazou@adacore.com>
467
468 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Move down
469 code applying atomic checks to the object.
470
50ef946c
AC
4712015-05-27 Robert Dewar <dewar@adacore.com>
472
473 * sem_aux.adb: Minor rewording.
474
4752015-05-27 Bob Duff <duff@adacore.com>
476
477 * exp_prag.adb (Expand_Pragma_Abort_Defer): Make
478 pragma Abort_Defer do nothing if Abort_Allowed is False.
479
4802015-05-27 Arnaud Charlet <charlet@adacore.com>
481
482 * exp_ch9.adb, sem_util.adb, sem_util.ads, s-stposu.adb, s-spsufi.ads,
483 sem_elab.ads, g-comlin.ads, errout.ads, exp_ch6.adb, sem_ch4.adb,
484 opt.ads, s-bignum.adb, output.ads, sem_ch13.adb, erroutc.ads,
485 sem_disp.ads, exp_ch3.adb: Minor fixes of duplicate words in comments.
486
4872015-05-27 Doug Rupp <rupp@adacore.com>
488
489 * adaint.c (__gnat_tmp_name) [vxworks]: Robustify and use for rtp as
490 well as kernel.
491
4922015-05-27 Pierre-Marie de Rodat <derodat@adacore.com>
493
494 * par_sco.adb (Process_Decision): Store sloc to
495 condition/pragmas SCOs associations into a temporary table before
496 moving them to the SCO_Raw_Hash_Table so that we can back them
497 out just like we do for SCO entries that are simple decisions
498 in an expression context.
499
66371f94
AC
5002015-05-27 Ed Schonberg <schonberg@adacore.com>
501
502 * sem_ch6.adb (Process_Formals): A non-private formal type that
503 is a limited view does not have a list of private dependents.
504
5052015-05-27 Ed Schonberg <schonberg@adacore.com>
506
507 * exp_ch5.adb (Expand_N_Case_Statement): If the expression in
508 the case statement is a compile-time known value, we look for a
509 corresponding alternative to optimize the case statement into a
510 single case. If the type has a static predicate and the expression
511 does not satisfy the predicate, there is no legal alternative and
512 this optimization is not applicable. Excecution is erroneous,
513 or else if assertions are enabled, an exception will be raised
514 earlier, at the point the expression is elaborated.
515
5162015-05-27 Robert Dewar <dewar@adacore.com>
517
518 * sem_elab.adb (Check_Internal_Call_Continue): Suppress
519 warning on Finalize, Adjust, or Initialize if type involved has
520 Warnings_Off set.
521
5222015-05-27 Ed Schonberg <schonberg@adacore.com>
523
524 * sem_aux.adb, sem_aux.ads (First_Discriminant): Return empty when
525 applied to a type with no known discriminants.
526
0c6826a5
AC
5272015-05-26 Robert Dewar <dewar@adacore.com>
528
529 * errout.ads, sem_ch4.adb, sem_ch6.adb: Minor reformatting.
530
5312015-05-26 Bob Duff <duff@adacore.com>
532
533 * sem_elab.adb (Check_A_Call): In the case where we're
534 calling something in an instance of a generic package that is
535 within this same unit (as the call), make sure we treat it
536 as a call to an entity within the same unit. That is, call
537 Check_Internal_Call, rather than putting "Elaborate_All(X)"
538 on X, which would necessarily result in an elaboration cycle in
539 static-elaboration mode.
540
5412015-05-26 Eric Botcazou <ebotcazou@adacore.com>
542
543 * freeze.ads (Is_Atomic_VFA_Aggregate): Adjust profile.
544 * freeze.adb (Is_Atomic_VFA_Aggregate): Change Entity
545 parameter into Node parameter and remove Type parameter.
546 Look at Is_Atomic_Or_VFA both on the type and on the object.
547 (Freeze_Entity): Adjust call to Is_Atomic_VFA_Aggregate.
548 * exp_aggr.adb (Expand_Record_Aggregate): Likewise.
549 (Process_Atomic_Independent_Shared_Volatile): Remove code
550 propagating Atomic or VFA from object to locally-defined type.
551
5522015-05-26 Bob Duff <duff@adacore.com>
553
554 * exp_ch7.adb: Minor comment fix.
555
89d5c50b
EB
5562015-05-26 Eric Botcazou <ebotcazou@adacore.com>
557
558 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Min/Attr_Max>: Do not
559 bother about NaN's if Machine_Overflows is true.
560
545b4923
EB
5612015-05-26 Eric Botcazou <ebotcazou@adacore.com>
562
563 * gcc-interface/trans.c (gnat_to_gnu) <N_Object_Declaration>: Really
564 force evaluation of the expression, if any, when the object has its
565 elaboration delayed. Do not create a variable at global level.
566
c68cdfac
EB
5672015-05-26 Eric Botcazou <ebotcazou@adacore.com>
568
569 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Machine>: Do not apply
570 extra-precision trick to literals. Build SAVE_EXPR manually.
571
572 * gcc-interface/misc.c (enumerate_modes): Add bypass for x86/x86-64.
573
241125b2
EB
5742015-05-26 Eric Botcazou <ebotcazou@adacore.com>
575
576 * gcc-interface/ada-tree.h (DECL_GLOBAL_NONCONSTANT_RENAMING_P): Delete
577 (DECL_RENAMED_OBJECT): Adjust comment.
578 * gcc-interface/gigi.h (record_global_nonconstant_renaming): Delete.
579 (invalidate_global_nonconstant_renamings): Likewise.
580 (gnat_constant_reference_p): Likewise.
581 (rewrite_fn): New function type.
582 (gnat_rewrite_reference): Declare.
583 (call_is_atomic_load): New inline predicate.
584 * gcc-interface/decl.c (elaborate_reference_1): New function.
585 (elaborate_reference): Likewise.
586 (gnat_to_gnu_entity): Call elaborate_reference to elaborate renamings
587 and simplify associated code. Set const_flag to true consistently in
588 conjunction with used_by_ref.
589 * gcc-interface/trans.c (Identifier_to_gnu): Always replace renaming
590 pointers by renamed objects.
591 (outer_atomic_access_required_p): Deal with renamings.
592 (Compilation_Unit_to_gnu): Do not call
593 invalidate_global_nonconstant_renamings.
594 (gnat_to_gnu) <N_Object_Renaming_Declaration>: Adjust comment.
595 (gnat_gimplify_expr): Deal with atomic loads.
596 * gcc-interface/utils.c (global_nonconstant_renamings): Delete.
597 (destroy_gnat_utils): Do not call
598 invalidate_global_nonconstant_renamings.
599 (record_global_nonconstant_renaming): Delete.
600 (invalidate_global_nonconstant_renamings): Likewise.
601 * gcc-interface/utils2.c (call_is_atomic_load): Move to gigi.h.
602 (build_load_modify_store): Build a copy of the destination.
603 (gnat_stabilize_reference_1): Adjust.
604 (gnat_stabilize_reference): Call gnat_stabilize_reference_1 through
605 gnat_rewrite_reference and move bulk of code to...
606 (gnat_rewrite_reference): ...here. New global function.
607 (gnat_constant_reference_p): Delete.
608
7194767c
EB
6092015-05-26 Eric Botcazou <ebotcazou@adacore.com>
610
611 * gcc-interface/gigi.h (gnat_stabilize_reference): Adjust prototype.
612 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not rely on const_flag
613 to detect constant renamings. Be prepared for specific pattern of
614 renamed object based on function calls. Create a constant object
615 for the renaming of a NULL_EXPR or of a CONSTRUCTOR. Adjust calls
616 to gnat_stabilize_reference and tidy up. Remove redundant tests.
617 (elaborate_expression_1): Remove obsolete test and tidy up.
618 * gcc-interface/trans.c (Call_to_gnu): Do not stabilize In/Out or Out
619 parameters passed by reference.
620 (gnat_to_gnu) <N_Selected_Component>: Remove redundant protection again
621 side-effects.
622 Use gnat_protect_expr instead of gnat_stabilize_reference for general
623 protection against side-effects.
624 * gcc-interface/utils2.c (gnat_stable_expr_p): New predicate.
625 (gnat_save_expr): Invoke it.
626 (gnat_protect_expr): Likewise.
627 (gnat_stabilize_reference_1): Likewise. Remove useless propagation
628 of TREE_THIS_NOTRAP.
629 (gnat_stabilize_reference): Remove parameter and adjust throughout.
630 Delete ADDR_EXDR, COMPOUND_EXPR and CONSTRUCTOR cases.
631 Restrict CALL_EXPR case to atomic loads and tweak ERROR_MARK case.
632
bff469f7
AC
6332015-05-26 Ed Schonberg <schonberg@adacore.com>
634
635 * sinfo.ads: Minor reformatting.
636 * sem_aux.ads: Clarify use of First_Discriminant.
637 * sem_ch4.adb (Analyze_Explicit_Dereference): The use of a limited
638 view is replaced with the non-limited view in an instance body,
639 where the enclosing unit must have a regular with_clause on the
640 relevant unit.
641 * sem_ch12.adb (Install_Body): Freeze instantation after its
642 body. Remove useless freeze nodes for incomplete actuals to
643 prevent multiple generation of internal operations.
644 (Instantiate_Package_Body): Set sloc of body appropriately when
645 there are incomplete actuals and the instance body is placed in
646 the body of the enclosing unit.
647 * errout.ads: Consistent punctuation, better alignment and trivial
648 typos in comments.
649 * err_vars.ads: Fix typo.
650
6512015-05-26 Eric Botcazou <ebotcazou@adacore.com>
652
653 * sem_ch8.adb (Analyze_Object_Renaming): Lift restriction on
654 components of Volatile_Full_Access objects.
655
6562015-05-26 Ed Schonberg <schonberg@adacore.com>
657
658 * sem_ch6.adb (Is_Non_Overriding_Operation,
659 Get_Generic_Parent_Type): Handle properly the case of a derived
660 scalar type by using the first subtype rather than its generated
661 anonymous base type.
662
6632015-05-26 Eric Botcazou <ebotcazou@adacore.com>
664
665 * einfo.adb (Write_Field17_Name): Move E_Incomplete_Subtype
666 case to...
667 (Write_Field19_Name): ...here.
668
3a37ecec
AC
6692015-05-26 Ed Schonberg <schonberg@adacore.com>
670
671 * sem_ch13.adb: sem_ch13.adb (Add_Predicates): Undo analysis
672 of original expression in ASIS mode: does not solve the ASIS
673 problem of a usable type information, and crashes the back-end
674 when performing type annotations.
675
6762015-05-26 Robert Dewar <dewar@adacore.com>
677
678 * sem_disp.adb (Inherited_Subprograms): Add One_Only parameter.
679 (Is_Overriding_Subprogram): Use One_Only_Parameter.
680 * sem_disp.ads (Inherited_Subprograms): Add One_Only parameter.
681
ad4ba28b
AC
6822015-05-26 Robert Dewar <dewar@adacore.com>
683
684 * exp_prag.adb, sem_ch3.adb, sem_ch5.adb, exp_ch11.adb, ghost.adb,
685 exp_ch6.adb, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb, sem_ch13.adb,
686 exp_ch3.adb: Minor reformatting.
687
6882015-05-26 Bob Duff <duff@adacore.com>
689
690 * treepr.adb: Minor improvement to debugging routines (pp, pn)
691 robustness. Rearrange the code so passing a nonexistent Node_Id
692 prints "No such node" rather than crashing, and causing gdb to
693 generate confusing messages.
694
6952015-05-26 Gary Dismukes <dismukes@adacore.com>
696
697 * sem_util.adb: Minor typo fix.
698
6992015-05-26 Yannick Moy <moy@adacore.com>
700
701 * sem_aux.adb (Subprogram_Body_Entity): Deal with subprogram stubs.
702
241ebe89
HK
7032015-05-26 Hristian Kirtchev <kirtchev@adacore.com>
704
705 * exp_ch3.adb (Expand_N_Full_Type_Declaration): Capture, set and
706 restore the Ghost mode.
707 (Expand_N_Object_Declaration): Capture, set and restore the Ghost mode.
708 (Freeze_Type): Update the call to Set_Ghost_Mode.
709 (Restore_Globals): New routine.
710 * exp_ch5.adb Add with and use clauses for Ghost.
711 (Expand_N_Assignment_Statement): Capture, set and restore the
712 Ghost mode.
713 (Restore_Globals): New routine.
714 * exp_ch6.adb Add with and use clauses for Ghost.
715 (Expand_N_Procedure_Call_Statement): Capture, set and
716 restore the Ghost mode.
717 (Expand_N_Subprogram_Body):
718 Code cleanup. Capture, set and restore the Ghost mode.
719 (Expand_N_Subprogram_Declaration): Capture, set and restore the
720 Ghost mode.
721 (Restore_Globals): New routine.
722 * exp_ch7.adb Add with and use clauses for Ghost.
723 (Expand_N_Package_Body): Capture, set and restore the Ghost mode.
724 (Expand_N_Package_Declaration): Capture, set and restore the
725 Ghost mode.
726 (Wrap_HSS_In_Block): Create a proper identifier for the block.
727 * exp_ch8.adb Add with and use clauses for Ghost.
728 (Expand_N_Exception_Renaming_Declaration): Code
729 cleanup. Capture, set and restore the Ghost mode.
730 (Expand_N_Object_Renaming_Declaration): Capture, set and restore
731 the Ghost mode.
732 (Expand_N_Package_Renaming_Declaration): Capture, set and restore the
733 Ghost mode.
734 (Expand_N_Subprogram_Renaming_Declaration): Capture, set and
735 restore the Ghost mode.
736 * exp_ch11.adb (Expand_N_Exception_Declaration): Code
737 cleanup. Capture, set and restore the Ghost mode.
738 * exp_disp.adb (Make_DT): Update the call to Set_Ghost_Mode. Do
739 not initialize the dispatch table slot of a Ghost subprogram.
740 * exp_prag.adb Add with and use clauses for Ghost.
741 (Expand_Pragma_Check): Capture, set and restore the Ghost mode.
742 (Expand_Pragma_Contract_Cases): Capture, set and restore the
743 Ghost mode.
744 (Expand_Pragma_Initial_Condition): Capture, set and
745 restore the Ghost mode.
746 (Expand_Pragma_Loop_Variant): Capture,
747 set and restore the Ghost mode.
748 (Restore_Globals): New routine.
749 * exp_util.adb Add with and use clauses for Ghost.
750 (Make_Predicate_Call): Code cleanup. Capture, set and restore
751 the Ghost mode.
752 (Restore_Globals): New routine.
753 * freeze.adb (Freeze_Entity): Code cleanup. Update the call
754 to Set_Ghost_Mode.
755 * ghost.adb Add with and use clause for Sem_Prag.
756 (Check_Ghost_Completion): Code cleanup.
757 (Check_Ghost_Overriding): New routine.
758 (Check_Ghost_Policy): Code cleanup.
759 (Ghost_Entity): New routine.
760 (Is_Ghost_Declaration): Removed.
761 (Is_Ghost_Statement_Or_Pragma): Removed.
762 (Is_OK_Context): Reimplemented.
763 (Is_OK_Declaration): New routine.
764 (Is_OK_Pragma): New routine.
765 (Is_OK_Statement): New routine.
766 (Mark_Full_View_As_Ghost): New routine.
767 (Mark_Pragma_As_Ghost): New routine.
768 (Mark_Renaming_As_Ghost): New routine.
769 (Propagate_Ignored_Ghost_Code): Update the comment on usage.
770 (Set_From_Entity): New routine.
771 (Set_From_Policy): New routine.
772 (Set_Ghost_Mode): This routine now handles pragmas and freeze nodes.
773 (Set_Ghost_Mode_For_Freeze): Removed.
774 (Set_Ghost_Mode_From_Entity): New routine.
775 (Set_Ghost_Mode_From_Policy): Removed.
776 * ghost.ads (Check_Ghost_Overriding): New routine.
777 (Mark_Full_View_As_Ghost): New routine.
778 (Mark_Pragma_As_Ghost): New routine.
779 (Mark_Renaming_As_Ghost): New routine.
780 (Set_Ghost_Mode): Update the parameter profile. Update the
781 comment on usage.
782 (Set_Ghost_Mode_For_Freeze): Removed.
783 (Set_Ghost_Mode_From_Entity): New routine.
784 * sem_ch3.adb (Analyze_Full_Type_Declaration):
785 Capture and restore the Ghost mode. Mark a type
786 as Ghost regardless of whether it comes from source.
787 (Analyze_Incomplete_Type_Decl): Capture, set and restore the
788 Ghost mode.
789 (Analyze_Number_Declaration): Capture and restore the Ghost mode.
790 (Analyze_Object_Declaration): Capture and restore the Ghost mode.
791 (Analyze_Private_Extension_Declaration): Capture and
792 restore the Ghost mode.
793 (Analyze_Subtype_Declaration): Capture and restore the Ghost mode.
794 (Process_Full_View): The full view inherits all Ghost-related
795 attributes from the private view.
796 (Restore_Globals): New routine.
797 * sem_ch5.adb (Analyze_Assignment): Capture and restore the
798 Ghost mode.
799 (Restore_Globals): New routine.
800 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration):
801 Code cleanup. Capture and restore the Ghost mode. Mark a
802 subprogram as Ghost regarless of whether it comes from source.
803 (Analyze_Procedure_Call): Capture and restore the Ghost mode.
804 (Analyze_Subprogram_Body_Helper): Capture and restore the Ghost mode.
805 (Analyze_Subprogram_Declaration): Capture and restore the Ghost mode.
806 (New_Overloaded_Entity): Ensure that a
807 parent subprogram and an overriding subprogram have compatible
808 Ghost policies.
809 * sem_ch7.adb (Analyze_Package_Body_Helper): Capture and restore
810 the Ghost mode.
811 (Analyze_Package_Declaration): Capture and
812 restore the Ghost mode. Mark a package as Ghost when it is
813 declared in a Ghost region.
814 (Analyze_Private_Type_Declaration): Capture and restore the Ghost mode.
815 (Restore_Globals): New routine.
816 * sem_ch8.adb (Analyze_Exception_Renaming): Code
817 reformatting. Capture and restore the Ghost mode. A renaming
818 becomes Ghost when its name references a Ghost entity.
819 (Analyze_Generic_Renaming): Capture and restore the Ghost mode. A
820 renaming becomes Ghost when its name references a Ghost entity.
821 (Analyze_Object_Renaming): Capture and restore the Ghost mode. A
822 renaming becomes Ghost when its name references a Ghost entity.
823 (Analyze_Package_Renaming): Capture and restore the Ghost mode. A
824 renaming becomes Ghost when its name references a Ghost entity.
825 (Analyze_Subprogram_Renaming): Capture and restore the Ghost
826 mode. A renaming becomes Ghost when its name references a
827 Ghost entity.
828 * sem_ch11.adb (Analyze_Exception_Declaration): Capture, set
829 and restore the Ghost mode.
830 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Capture and
831 restore the Ghost mode.
832 (Analyze_Generic_Subprogram_Declaration):
833 Capture and restore the Ghost mode.
834 * sem_ch13.adb Add with and use clauses for Ghost.
835 (Add_Invariant): New routine.
836 (Add_Invariants): Factor out code.
837 (Add_Predicate): New routine.
838 (Add_Predicates): Factor out code.
839 (Build_Invariant_Procedure_Declaration): Code cleanup. Capture,
840 set and restore the Ghost mode.
841 (Build_Invariant_Procedure): Code cleanup.
842 (Build_Predicate_Functions): Capture, set and
843 restore the Ghost mode. Mark the generated functions as Ghost.
844 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
845 Capture, set and restore the Ghost mode.
846 (Analyze_External_Property_In_Decl_Part): Capture, set and restore
847 the Ghost mode.
848 (Analyze_Initial_Condition_In_Decl_Part):
849 Capture, set and restore the Ghost mode.
850 (Analyze_Pragma):
851 Code cleanup. Capture, set and restore the Ghost mode. Flag
852 pragmas Linker_Section, No_Return, Unmodified, Unreferenced and
853 Unreferenced_Objects as illegal when it applies to both Ghost
854 and living arguments. Pragma Ghost cannot apply to synchronized
855 objects.
856 (Check_Kind): Moved to the spec of Sem_Prag.
857 (Process_Inline): Flag the pragma as illegal when it applies to
858 both Ghost and living arguments.
859 (Restore_Globals): New routine.
860 * sem_prag.ads Add pragma Default_Initial_Condition
861 to table Assertion_Expression_Pragma. Add new table
862 Is_Aspect_Specifying_Pragma.
863 (Check_Kind): Moved from body of Sem_Prag.
864 * sem_util.adb Add with and use clauses for Ghost.
865 (Build_Default_Init_Cond_Procedure_Body): Capture, set and restore
866 the Ghost mode.
867 (Build_Default_Init_Cond_Procedure_Declaration):
868 Capture, set and restore the Ghost mode. Mark the default
869 initial condition procedure as Ghost when it is declared
870 in a Ghost region.
871 (Is_Renaming_Declaration): New routine.
872 (Policy_In_List): Account for the single argument version of
873 Check_Pragma.
874 * sem_util.ads (Is_Renaming_Declaration): New routine.
875 * sinfo.adb (Is_Ghost_Pragma): New routine.
876 (Set_Is_Ghost_Pragma): New routine.
877 * sinfo.ads New attribute Is_Ghost_Pragma.
878 (Is_Ghost_Pragma): New routine along with pragma Inline.
879 (Set_Is_Ghost_Pragma): New routine along with pragma Inline.
880
b68cf874
AC
8812015-05-26 Robert Dewar <dewar@adacore.com>
882
883 * sem_ch3.adb, sem_aux.adb, sem_aux.ads, exp_ch6.adb, sprint.adb:
884 Minor reformatting.
885
8862015-05-26 Gary Dismukes <dismukes@adacore.com>
887
888 * gnat1drv.adb, targparm.adb, targparm.ads, restrict.adb: Minor
889 reformatting and typo fixes in comments.
890
8912015-05-26 Ed Schonberg <schonberg@adacore.com>
892
893 * sem_ch7.adb (Swap_Private_Dependets): Set visibility of
894 the two views of a private dependent in two separate steps,
895 to ensure proper visibility in parent units analyzed for inlining.
896
ff1bedac
YM
8972015-05-26 Yannick Moy <moy@adacore.com>
898
899 * sem_aux.adb, sem_aux.ads (Get_Low_Bound): Use Type_Low_Bound.
900 (Package_Body, Package_Spec): New queries moved
901 here from GNATprove.
902 (Package_Specification): Simplify query to remove use of loop.
903 * sem_util.adb, sem_util.ads (Enclosing_Declaration,
904 Enclosing_Package_Or_Subprogram, Is_Attribute_Update): New
905 queries moved here from GNATprove.
906
a7b37927
AC
9072015-05-26 Bob Duff <duff@adacore.com>
908
909 * einfo.adb, einfo.ads, sprint.adb, lib-xref.ads: Minor cleanup: Remove
910 obsolete Entity_Kinds E_String_Type and E_String_Subtype. Update
911 redundant assertions.
912
9132015-05-26 Gary Dismukes <dismukes@adacore.com>
914
915 * sem_util.adb, sem_util.ads, sem_ch13.adb: Minor typo fixes.
916
83496138
AC
9172015-05-26 Doug Rupp <rupp@adacore.com>
918
919 * init.c [vxworks]: Refine previous checkin.
920
9212015-05-26 Robert Dewar <dewar@adacore.com>
922
923 * exp_ch4.adb (Wrap_MA): New function.
924 (Expand_N_Op_Expon): Use Wrap_MA.
925
9262015-05-26 Bob Duff <duff@adacore.com>
927
928 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
929 Do not use secondary stack to return limited records with
930 defaulted discriminants. This is an efficiency improvement.
931 * exp_ch6.adb, exp_dist.adb, sem_attr.adb, sem_aux.adb, sem_aux.ads,
932 sem_ch12.adb, sem_ch3.adb, sem_ch4.adb, sem_ch6.adb, sem_ch7.adb,
933 sem_util.adb: Change the sense of Is_Indefinite_Subtype to be
934 Is_Definite_Subtype. This is an improvement to readability (the double
935 negative in "not Is_Indefinite_Subtype" was slightly confusing). Also
936 disallow passing non-[sub]type entities, an unnecessary and slightly
937 bug-prone flexibility.
938
596b25f9
AC
9392015-05-26 Robert Dewar <dewar@adacore.com>
940
941 * sem_aggr.adb (Resolve_Array_Aggregate): Defend against
942 bad bounds.
943 * debug.adb: Document -gnatd.k.
944 * erroutc.adb (Set_Msg_Insertion_Line_Number): Implement -gnatd.k.
945
9462015-05-26 Robert Dewar <dewar@adacore.com>
947
948 * gnat1drv.adb (Gnat1drv): Provide new arguments for
949 Get_Target_Parameters.
950 * restrict.adb (Set_Restriction_No_Specification_Of_Aspect):
951 new procedure.
952 (Set_Restriction_No_Use_Of_Attribute): new procedure.
953 * restrict.ads (Set_Restriction_No_Specification_Of_Aspect):
954 new procedure.
955 (Set_Restriction_No_Use_Of_Attribute): new procedure.
956 * s-rident.ads (Integer_Parameter_Restrictions): New subtype.
957 * targparm.adb (Get_Target_Parameters): Allow new restriction
958 pragmas No_Specification_Of_Aspect No_Use_Of_Attribute
959 No_Use_Of_Pragma.
960 * targparm.ads: New parameters for Get_Target_Parameters.
961 * tbuild.adb (Set_NOD): New name for Set_RND.
962 (Set_NSA): New procedure.
963 (Set_NUA): New procedure.
964 (Set_NUP): New procedure.
965 * tbuild.ads (Make_SC): Minor reformatting.
966 (Set_NOD): New name for Set_RND.
967 (Set_NSA, Set_NUA, Set_NUP): New procedure.
968
9692015-05-26 Ed Schonberg <schonberg@adacore.com>
970
971 * a-stwise.adb (Find_Token): If source'first is not positive,
972 an exception must be raised, as specified by RM 2005 A.4.3
973 (68/1). This must be checked explicitly, given that run-time
974 files are normally compiled without constraint checks.
975 * a-stzsea.adb (Find_Token): Ditto.
976
9772015-05-26 Ed Schonberg <schonberg@adacore.com>
978
979 * sem_util.ads sem_util.adb (Is_Current_Instance): New predicate
980 to fully implement RM 8.6 (17/3). which earlier only applied
981 to synchronized types. Used to preanalyze aspects that include
982 current instances of types, such as Predicate and Invariant.
983 * sem_res.adb (Resolve_Entity_Name): Use Is_Current_Instance.
984 * sem_ch13.adb (Add_Predicates): In ASIS mode, preserve original
985 expression of aspect and analyze it to provide proper type
986 information.
987
9882015-05-26 Robert Dewar <dewar@adacore.com>
989
990 * rtsfind.ads: Add entries for RE_Exn[_Long]_Float.
991 * s-exnllf.adb (Exn_Float): New function.
992 (Exn_Long_Float): New function.
993 (Exn_Long_Long_Float): Rewritten interface.
994 (Exp): New name for what used to be Exn_Long_Long_Float.
995 * s-exnllf.ads (Exn_Float): New function.
996 (Exn_Long_Float): New function.
997
9982015-05-26 Ed Schonberg <schonberg@adacore.com>
999
1000 * sem_ch8.adb (Find_Selected_Component): Do not emit an error
1001 on a selected component when the prefix is a type name that is
1002 a Current_Instance.
1003 * einfo.ads: Minor grammar fix.
1004
10052015-05-26 Doug Rupp <rupp@adacore.com>
1006
1007 * init.c [vxworks] (sysLib.h): Only for x86.
1008
556d1a44
AC
10092015-05-26 Doug Rupp <rupp@adacore.com>
1010
1011 * init-vxsim.c (CPU): define as __VXSIM_CPU__
1012 * sigtramp-vxworks-vxsim.c (CPU): Likewise.
1013 sigtramp-vxworks-target.inc: Add check for SIMLINUX.
1014 * sigtramp.h: Likewise.
1015
10162015-05-26 Robert Dewar <dewar@adacore.com>
1017
1018 * sem_aux.adb, sem_disp.adb, sem_util.ads: Add comment.
1019 * sem_util.adb: Minor reformatting
1020
90a4b336
YM
10212015-05-26 Yannick Moy <moy@adacore.com>
1022
1023 * inline.adb (Has_Initialized_Type): Adapt to new names.
1024 * sem_aux.adb, sem_aux.ads (Get_Low_Bound, Number_Components,
1025 Subprogram_Body, Subprogram_Body_Entity, Subprogram_Spec,
1026 Subprogram_Specification): New query functions used in GNATprove.
1027 * sem_disp.adb, sem_disp.ads (Is_Overriding_Subprogram): New
1028 query functions used in GNATprove.
1029 * sem_util.adb, sem_util.adso (Enclosing_Lib_Unit_Node,
1030 Get_Cursor_Type, Get_Return_Object, Get_User_Defined_Eq,
1031 Is_Double_Precision_Floating_Point_Type,
1032 Is_Single_Precision_Floating_Point_Type): New query functions
1033 used in GNATprove.
1034
35fd12d8
AC
10352015-05-26 Bob Duff <duff@adacore.com>
1036
1037 * s-rpc.ads (Partition_ID): Increase maximum Partition_ID to
1038 some huge number.
1039 * a-except-2005.adb, a-except-2005.ads, a-except.adb,
1040 a-except.ads, a-exexda.adb, a-exstat.adb: Minor comment fixes.
1041
10422015-05-26 Robert Dewar <dewar@adacore.com>
1043
1044 * sinfo.adb: Minor comment addition.
1045 * einfo.adb: Minor whitespace and punctuation fix.
1046 * sem_util.adb: Minor editing of comments.
1047
e8c84c8f
AC
10482015-05-26 Ed Schonberg <schonberg@adacore.com>
1049
1050 * sem_ch7.adb (Install_Private_Declarations,
1051 Swap_Private_Dependents): Ensure that both views of the dependent
1052 subtype are immediately visible if we are within their scope. This
1053 may be needed when a procedure body is both the parent of an
1054 instantiated child unit, and is itself used to inline a local
1055 function.
1056
10572015-05-26 Gary Dismukes <dismukes@adacore.com>
1058
1059 * exp_prag.adb, gnat1drv.adb: Minor reformatting.
1060
10612015-05-26 Eric Botcazou <ebotcazou@adacore.com>
1062
1063 * exp_ch4.adb (Expand_N_Indexed_Component): In the circuit
1064 detecting exceptions to the rewriting, deal with implicit
1065 dereferences in the selected component case.
1066
10672015-05-26 Bob Duff <duff@adacore.com>
1068
1069 * sem_ch13.adb (Analyze_One_Aspect): Do not
1070 require the expression of the Disable_Controlled aspect to be
1071 static in a generic template, because 'Enabled is not known
1072 until the instance.
1073
10742015-05-26 Doug Rupp <rupp@adacore.com>
1075
1076 * init-vxsim.c: New file for vxsim ZCX
1077 * sigtramp-vxworks-vxsim.c: Likewise.
1078 * sigtramp-vxworks.c: Factor out target dependent bits into ...
1079 * sigtramp-vxworks-target.inc: ... here.
1080 * sigtramp.h: Add vxsim zcx protos.
1081 * init.c [vxworks...] (sysLib.h): Include.
1082 (__gnat_map_signal): Make global.
1083 [...i386] (__gnat_error_handler): Call __gnat_vxsim_error_handler if
1084 on vxsim.
1085 [...i386] (__gnat_install_handler): Test if on vxsim.
1086
10872015-05-26 Ed Schonberg <schonberg@adacore.com>
1088
1089 * sem_ch5.adb (Analyze_Iterator_Specification): For an element
1090 iterator over an array, if the component is aliased, the loop
1091 variable is aliased as well.
1092
10932015-05-26 Ed Schonberg <schonberg@adacore.com>
1094
1095 * exp_ch6.adb (Expand_Actuals): For a function call with in-out
1096 parameters that is rewritten as an expression_with_actions,
1097 we preserve the original function call node for further use by
1098 the caller (typically Expand_Call). In the presence of validity
1099 checks, that function call, though it is labelled Analyzed to
1100 prevent an infinite recursion, may be rewritten as a temporary
1101 by Remove_Side_Effects. Ensure that the caller has access to
1102 the original function call to continue expansion.
1103 * atree.ads: Minor typo in comment.
1104
11052015-05-26 Javier Miranda <miranda@adacore.com>
1106
1107 * sem_util.adb (Check_Function_Writable_Actuals):
1108 Add missing support to check the violation of writable actuals
1109 in array aggregates that have a nonstatic range.
1110
b9eb3aa8
HK
11112015-05-26 Hristian Kirtchev <kirtchev@adacore.com>
1112
1113 * exp_ch6.adb (Process_Contract_Cases_For): Update the call to
1114 Expand_Pragma_Contract_Cases.
1115 * exp_prag.ads, exp_prag.adb (Expand_Contract_Cases): Rename to
1116 Expand_Pragma_Contract_Cases.
1117 * sem_ch13.adb (Add_Invariants): Use the original aspect name
1118 when creating the arguments of pragma Check. This ensures that
1119 'Class is properly recognized and handled.
1120
213999c2
AC
11212015-05-26 Arnaud Charlet <charlet@adacore.com>
1122
1123 * gnat1drv.adb: Minor adjustments.
1124 (Adjust_Global_Switches): Disable some related flags in CodePeer mode.
1125 * sem_ch4.adb (Has_Arbitrary_Evaluation_Order,
1126 Stop_Subtree_Climbind): Code cleanup.
1127 * einfo.ads: Minor comment change.
1128
22e89283
AC
11292015-05-26 Javier Miranda <miranda@adacore.com>
1130
1131 * sem_aggr.adb (Resolve_Aggregate, Resolve_Extension_Aggregate):
1132 Code cleanup.
1133 * sem_ch3.adb (Build_Derived_Record_Type,
1134 Record_Type_Declaration): Code cleanup.
1135 * sem_ch4.adb (Has_Arbitrary_Evaluation_Order,
1136 Stop_Subtree_Climbind): Tables which speed up the identification
1137 of dangerous calls to Ada 2012 functions with writable actuals
1138 (AI05-0144).
1139 (Analyze_Arithmetic_Op, Analyze_Call, Analyze_Comparison_Op,
1140 Analyze_Equality_Op, Analyze_Logical_Op, Analyze_Membership_Op,
1141 Analyze_Range): Code cleanup.
1142 (Is_Arbitrary_Evaluation_Order_Construct): Removed.
1143 (Check_Writable_Actuals): Code cleanup using the added tables.
1144 * sem_util.adb (Check_Function_Writable_Actuals): Return
1145 immediately if the node does not have the flag Check_Actuals
1146 set to True.
1147
11482015-05-26 Eric Botcazou <ebotcazou@adacore.com>
1149
1150 * exp_ch6.adb (Add_Call_By_Copy_Code): Remove restrictive
1151 condition in the detection of the effects of Remove_Side_Effects.
1152 * exp_util.ads (Remove_Side_Effects): Add general and historical note.
1153 * exp_util.adb (Is_Name_Reference): New predicate.
1154 (Remove_Side_Effects): Use it in lieu of Is_Object_Reference
1155 in order to decide whether to use the renaming to capture the
1156 side effects of the subexpression.
1157 (Side_Effect_Free): Remove obsolete test.
1158
c8593453
AC
11592015-05-26 Robert Dewar <dewar@adacore.com>
1160
1161 * aspects.ads, aspects.adb: Add aspect Disable_Controlled.
1162 * einfo.ads, einfo.adb (Disable_Controlled): New flag.
1163 (Is_Controlled_Active): New function.
1164 * exp_ch3.adb (Expand_Freeze_Record_Type): Use
1165 Is_Controlled_Active.
1166 * exp_util.adb (Needs_Finalization): Finalization not needed
1167 if Disable_Controlled set.
1168 * freeze.adb (Freeze_Array_Type): Do not set
1169 Has_Controlled_Component if the component has Disable_Controlled.
1170 (Freeze_Record_Type): ditto.
1171 * sem_ch13.adb (Decorate): Minor reformatting.
1172 (Analyze_Aspect_Specifications): Implement Disable_Controlled.
1173 * sem_ch3.adb (Analyze_Object_Declaration): Handle
1174 Disable_Controlled.
1175 (Array_Type_Declaration): ditto.
1176 (Build_Derived_Private_Type): ditto.
1177 (Build_Derived_Type): ditto.
1178 (Record_Type_Definition): ditto.
1179 * snames.ads-tmpl: Add Name_Disable_Controlled.
1180
11812015-05-26 Eric Botcazou <ebotcazou@adacore.com>
1182
1183 * exp_ch6.adb (Expand_Actuals): Use a constant declaration instead
1184 of a renaming to capture the return value of a function call.
1185 (Expand_Simple_Function_Return): Call Remove_Side_Effects
1186 instead of removing side effects manually before the call to
1187 _Postconditions.
1188
5389e4ae
RD
11892015-05-26 Robert Dewar <dewar@adacore.com>
1190
1191 * exp_ch4.adb (Expand_N_Op_Expon): Deal with problem of wrong
1192 order in calling Duplicate_Subexpr.
1193 * einfo.ads: Fix documentation of Object/Value size for scalar types.
1194
ffcfb997
ES
11952015-05-26 Ed Schonberg <schonberg@adacore.com>
1196
1197 * exp_aggr.adb (Build_Array_Aggr_Code, Gen_Assign):
1198 If a component is default-initialized and its type has an
1199 invariant procedure, insert an invariant test after code for
1200 default-initialization of the component.
1201
551e1935
AC
12022015-05-26 Gary Dismukes <dismukes@adacore.com>
1203
1204 * einfo.ads, sem_util.adb, sem_ch4.adb: Minor reformatting.
1205
12062015-05-26 Robert Dewar <dewar@adacore.com>
1207
1208 * exp_unst.adb, exp_unst.ads: Change to using Subps table index for
1209 making AREC entity names unique.
1210
12112015-05-26 Ed Schonberg <schonberg@adacore.com>
1212
1213 * sem_cat.adb (Has_Stream_Attribute_Definition): If the type
1214 has aspect specifications, examine the corresponding list of
1215 representation items to determine whether there is a visible
1216 stream operation. The attribute definition clause generated from
1217 the aspect will be inserted at the freeze point of the type,
1218 which may be in the private part and not directly visible,
1219 but the aspect makes the operation available to a client.
1220
07aa5e6f
RD
12212015-05-26 Robert Dewar <dewar@adacore.com>
1222
1223 * sem_util.adb: Minor code reorganization.
1224 * sem_ch6.adb: Minor reformatting.
1225
1366ba41
EB
12262015-05-25 Eric Botcazou <ebotcazou@adacore.com>
1227
f42dd37f
EB
1228 * gcc-interface/utils.c (maybe_pad_type): Do not apply adjustment to
1229 original size for elementary types before issuing the size warning.
1230
12312015-05-25 Eric Botcazou <ebotcazou@adacore.com>
1232
1233 * get_targ.adb (C_Get_Float_Words_BE): Adjust import name.
1234 (C_Get_Words_BE): Likewise.
1235 (C_Get_Bytes_BE): Likewise.
1236 (C_Get_Bits_BE): Likewise.
1237 (Width_From_Size): Remove superfluous space.
1366ba41
EB
1238 * gcc-interface/targtyps.c (get_float_words_be): Rename into...
1239 (get_target_float_words_be): ...this.
1240 (get_words_be): Rename into...
1241 (get_target_words_be): ...this.
1242 (get_bytes_be): Rename into...
1243 (get_target_bytes_be): ...this.
1244 (get_bits_be): Rename into...
1245 (get_target_bits_be): ...this.
1246 * gcc-interface/gigi.h (standard_datatypes): Remove ADT_ptr_void_type.
1247 (ptr_void_type_node): Delete.
1248 (get_target_float_size): Likewise.
1249 (get_target_double_size): Likewise.
1250 (get_target_long_double_size): Likewise.
1251 (get_float_words_be): Likewise.
1252 (get_words_be): Likewise.
1253 (get_bytes_be): Likewise.
1254 (get_bits_be): Likewise.
1255 (get_target_float_words_be): Declare.
1256 (get_target_words_be): Likewise.
1257 (get_target_bytes_be): Likewise.
1258 (get_target_bits_be): Likewise.
1259 * gcc-interface/decl.c (gnat_to_gnu_entity): Replace ptr_void_type_node
1260 with ptr_type_node.
1261 (intrin_return_compatible_p): Likewise.
1262 * gcc-interface/trans.c (gigi): Likewise.
1263 * gcc-interface/utils2.c (maybe_wrap_malloc): Likewise.
1264 (maybe_wrap_free): Likewise.
1265 * gcc-interface/utils.c (maybe_pad_type): Remove superfluous space.
1266 * gcc-interface/misc.c (gnat_init): Do not set ptr_void_type_node.
1267
bf44701f
EB
12682015-05-25 Eric Botcazou <ebotcazou@adacore.com>
1269
1270 * gcc-interface/decl.c (elaborate_expression): Take a const string
1271 suffix instead of a tree.
1272 (elaborate_expression_1): Likewise.
1273 (elaborate_expression_2): Likewise.
1274 (gnat_to_gnu_entity): Adjust to above changes.
1275 (build_subst_list): Likewise.
1276 (get_entity_char): New static function.
1277
5277688b
EB
12782015-05-25 Eric Botcazou <ebotcazou@adacore.com>
1279
1280 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: Move around.
1281 <E_Exception>: Merge with E_Variable case.
1282 <E_Variable>: Remove 'object' label.
1283
2117b9bb
EB
12842015-05-25 Eric Botcazou <ebotcazou@adacore.com>
1285
1286 * gcc-interface/decl.c (gnat_to_gnu_entity): Minor tweak.
1287 * gcc-interface/trans.c (finalize_nrv_unc_r): Use CONSTRUCTOR_ELT.
1288 * gcc-interface/utils.c (convert): Likewise and simplify.
1289 (remove_conversions): Likewise.
1290 * gcc-interface/utils2.c (compare_fat_pointers): Likewise.
1291 (build_unary_op): Likewise and simplify.
1292
f797c2b7
EB
12932015-05-25 Eric Botcazou <ebotcazou@adacore.com>
1294
1295 * gcc-interface/gigi.h (build_atomic_load): Adjust prototype.
1296 (build_atomic_store): Likewise.
1297 (build_load_modify_store): Declare.
1298 (VECTOR_TYPE_P): Delete.
1299 * gcc-interface/decl.c (gnat_to_gnu_entity): Replace Is_Atomic with
1300 Is_Atomic_Or_VFA throughout.
1301 <E_Array_Type>: Build a variant of the XUA type instead of forcing
1302 TYPE_VOLATILE on it.
1303 <E_Array_Subtype>: Use the main variant of the base type.
1304 Do not force TYPE_VOLATILE on the type being built.
1305 <E_Record_Type>: Likewise.
1306 <E_Array_Subtype>: Likewise.
1307 <E_Subprogram_Type>: Rename local variable.
1308 Add Atomic qualifier in conjunction with Volatile on types if needed.
1309 Force BLKmode for by-ref types only at the end of the processing.
1310 Change qualifiers only after changing the mode of the type. Set
1311 TYPE_UNIVERSAL_ALIASING_P on the type directly.
1312 (check_ok_for_atomic_type): Issue specific error message for VFA.
1313 (gnat_to_gnu_component_type): Replace Is_Atomic with
1314 Is_Atomic_Or_VFA throughout.
1315 * gcc-interface/misc.c (gnat_get_alias_set): Test
1316 TYPE_UNIVERSAL_ALIASING_P on the type directly.
1317 * gcc-interface/trans.c (lvalue_required_p): Replace Is_Atomic with
1318 Is_Atomic_Or_VFA throughout. Add missing guard.
1319 (node_is_atomic): New predicate.
1320 (node_has_volatile_full_access): Likewise.
1321 (gnat_strip_type_conversion): New function.
1322 (outer_atomic_access_required_p): New predicate.
1323 (atomic_sync_required_p): Rename into...
1324 (atomic_access_required_p): ...this. Add SYNC parameter, scan the
1325 parent node first and then look for the atomic setting. Add support
1326 for Volatile_Full_Access.
1327 (Call_to_gnu): Add atomic_access and outer_atomic_access parameters
1328 and adjusts calls to above functions. Use load-modify-store sequence
1329 for updates of In/Out and Out parameters if required, as well as for
1330 moving the result to the target if required. Add couple of missing
1331 guards.
1332 (gnat_to_gnu): Adjust calls to above functions.
1333 <N_Object_Renaming_Declaration>: If the renamed object has side-effects
1334 evaluate only its address.
1335 <N_Assignment_Statement>: Adjust call to Call_to_gnu. Use load-modify
1336 store sequence if required.
1337 <N_Function_Call>: Adjust call to Call_to_gnu.
1338 (extract_values): Adjust comment.
1339 * gcc-interface/utils2.c (build_atomic_load): Add SYNC parameter and
1340 use relaxed memory model if it is not set.
1341 (build_atomic_store): Likewise.
1342 (call_is_atomic_load): New predicate.
1343 (build_load_modify_store): New function.
1344 (build_binary_op) <MODIFY_EXPR>: Accept SAVE_EXPR on the LHS.
1345 (gnat_stabilize_reference) <CALL_EXPR>: Deal with atomic loads.
1346
ea292448
EB
13472015-05-25 Eric Botcazou <ebotcazou@adacore.com>
1348
1349 * gcc-interface/ada-tree.h (DECL_RENAMING_GLOBAL_P): Rename into...
1350 (DECL_GLOBAL_NONCONSTANT_RENAMING_P): ...this.
1351 * gcc-interface/gigi.h (record_global_renaming_pointer): Delete.
1352 (invalidate_global_renaming_pointers): Likewise.
1353 (record_global_nonconstant_renaming): New.
1354 (invalidate_global_nonconstant_renamings): Likewise.
1355 (get_inner_constant_reference): Likewise.
1356 (gnat_constant_reference_p): Likewise.
1357 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Adjust to above
1358 and register the renaming pointer only if the object is non-constant.
1359 (elaborate_expression_1): Call get_inner_constant_reference instead
1360 of get_inner_reference.
1361 * gcc-interface/trans.c (fold_constant_decl_in_expr): Minor tweak.
1362 (Identifier_to_gnu): Adjust to above and do not recheck the renamed
1363 object before substituting it.
1364 (Compilation_Unit_to_gnu): Adjust to above renaming. Minor tweaks.
1365 (gnat_to_gnu) <N_Object_Renaming_Declaration>: Do not return the
1366 result at the global level.
1367 (N_Exception_Renaming_Declaration): Likewise.
1368 * gcc-interface/utils.c (global_renaming_pointers): Rename into...
1369 (global_nonconstant_renamings): ...this.
1370 (destroy_gnat_utils): Adjust to above renaming.
1371 (record_global_renaming_pointer): Rename into...
1372 (record_global_nonconstant_renaming): ...this.
1373 (invalidate_global_renaming_pointers): Rename into...
1374 (invalidate_global_nonconstant_renamings): ...this and do not recheck
1375 the renamed object before invalidating.
1376 * gcc-interface/utils2.c (gnat_stabilize_reference): Minor tweak.
1377 (get_inner_constant_reference): New public function.
1378 (gnat_constant_reference_p): New predicate.
1379
288cbbbd
JM
13802015-05-25 Javier Miranda <miranda@adacore.com>
1381
1382 * einfo.ads, einfo.adb (Has_Out_Or_In_Out_Parameter): This attribute
1383 is now present in subprograms, generic subprograms, entries and
1384 entry families.
1385 * sem_ch6.adb (Set_Formal_Mode): Set As_Out_Or_In_Out_Parameter
1386 on entries, entry families, subprograms and generic subprograms.
1387 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration):
1388 Minor code reorganization to ensure that the Ekind attribute
1389 of the subprogram entity is set before its formals are
1390 processed. Required to allow the use of the attribute
1391 Has_Out_Or_In_Out_Parameter on the subprogram entity.
1392 * sem_aggr.adb (Resolve_Aggregate, Resolve_Extension_Aggregate):
1393 Perform the check on writable actuals only if the value of some
1394 component of the aggregate involves calling a function with
1395 out-mode parameters.
1396 (Resolve_Record_Aggregate): Propagate the Check_Actuals flag to the
1397 internally built aggregate.
1398 * sem_ch3.adb (Build_Derived_Record_Type, Record_Type_Declaration):
1399 Perform the check on writable actuals only if the initialization of
1400 some component involves calling a function with out-mode parameters.
1401 * sem_ch4.adb (Analyze_Arithmetic_Op, Analyze_Comparison_Op,
1402 Analyze_Equality_Op, Analyze_Logical_Op, Analyze_Membership_Op,
1403 Analyze_Range): Check writable actuals only if the
1404 subtrees have a call to a function with out-mode parameters
1405 (Analyze_Call.Check_Writable_Actuals): New subprogram. If the call
1406 has out or in-out parameters then mark its outermost enclosing
1407 construct as a node on which the writable actuals check must
1408 be performed.
1409 (Analyze_Call): Check if the flag must be set and if the outermost
1410 enclosing construct.
1411 * sem_util.adb (Check_Function_Writable_Actuals): Code cleanup
1412 and reorganization. We skip processing aggregate discriminants
1413 since their precise analysis involves two phases traversal.
1414 * sem_res.adb (Resolve_Actuals, Resolve_Arithmetic_Op,
1415 Resolve_Logical_Op, Resolve_Membership_Op): Remove call to
1416 check_writable_actuals.
1417
088c7e1b
AC
14182015-05-22 Ed Schonberg <schonberg@adacore.com>
1419
1420 * sem_ch3.adb (Constrain_Concurrent): If the context is a
1421 type declaration, generate an Itype_Reference for the anonymous
1422 subtype, to force elaboration at this point in gigi.
1423
14242015-05-22 Gary Dismukes <dismukes@adacore.com>
1425
1426 * layout.adb, einfo.ads, sem_ch12.adb, freeze.adb, sem_util.ads,
1427 exp_ch4.adb, sem_ch6.adb: Minor reformatting and typo fixes.
1428
e6b3f5ba
ES
14292015-05-22 Ed Schonberg <schonberg@adacore.com>
1430
1431 * sem_res.adb (Resolve_Actuals): If the call is to an overridden
1432 operation, replace the names of the actuals in named associations
1433 with the names of the actuals of the subprogram that is eventually
1434 executed. The names of the formals and the defaults can differ
1435 between the two operations when they are operations of a formal
1436 derived type.
1437
d992a425
AC
14382015-05-22 Bob Duff <duff@adacore.com>
1439
1440 * a-convec.ads, a-convec.adb (Append): Check for fast path. Split
1441 out slow path into separate procedure. Inline Append. Fast path
1442 now avoids calling Insert.
1443 (Finalize): Do the busy checking last, so the container gets emptied.
1444 (Insert, Insert_Space): Remove redundancy.
1445
14462015-05-22 Robert Dewar <dewar@adacore.com>
1447
1448 * switch-c.adb (Scan_Front_End_Switches): Insist on -gnatc
1449 for -gnatd.V.
1450
84238eb0
AC
14512015-05-22 Arnaud Charlet <charlet@adacore.com>
1452
1453 * gnatvsn.ads: Minor code reorg to remember more easily to update
1454 variables.
1455
598a56c0
ES
14562015-05-22 Ed Schonberg <schonberg@adacore.com>
1457
1458 * sem_ch10.adb (Analyze_With_Clause): In ASIS_Mode, a
1459 limited_with clause on a predefined unit is not transformed into
1460 a regular with_clause, to preserve the original tree structure.
1461 * sinfo.ads (N_With_Clause): Add comment on handling of
1462 Limited_With.
1463 * sem_ch10.adb: Minor reformatting.
1464
14652015-05-22 Ed Schonberg <schonberg@adacore.com>
1466
1467 * sem_ch8.adb (Freeze_Profile): A limited view of a type in
1468 the profile of a subprogram renaming does not require freezing,
1469 because it is declared in a different unit.
1470
14712015-05-22 Ed Schonberg <schonberg@adacore.com>
1472
1473 * exp_aggr.adb (Get_Constraint_Association): If type (of ancestor
1474 composite type) is private, go to full view. This was previously
1475 done only in an instance context, but is happen whenever a chain
1476 of private extensions includes one inherited discriminant.
1477
ee935273
AC
14782015-05-22 Robert Dewar <dewar@adacore.com>
1479
1480 * einfo.ads: Minor comment updates.
1481 * exp_unst.adb: Move Subps table to spec Don't remove old entries
1482 from table Add Last field to record last entry used.
1483 * exp_unst.ads: Move Subps table here from body So that Cprint
1484 can access saved values.
1485
14862015-05-22 Bob Duff <duff@adacore.com>
1487
1488 * a-cdlili.adb, a-cdlili.ads, a-cohama.adb, a-cohama.ads,
1489 * a-cohase.adb, a-cohase.ads, a-convec.adb, a-convec.ads,
1490 * a-coorma.adb, a-coorma.ads, a-coorse.adb, a-coorse.ads:
1491 (Pseudo_Reference, Element_Access, Get_Element_Access): New
1492 declarations added for use by performance improvements in exp_ch5.adb.
1493 * snames.ads-tmpl: New names referenced by exp_ch5.adb.
1494 * exp_ch5.adb: Speed up "for ... of" loops for predefined containers.
1495 Instead of doing literally what the RM calls for, we do something
1496 equivalent that avoids expensive operations inside the loop. If the
1497 container package has appropriate Next, Pseudo_Reference,
1498 Element_Access, Get_Element_Access declarations, we invoke the
1499 optimization.
1500 * snames.ads-tmpl: Note speed improvement.
1501
5c0c1090
EB
15022015-05-22 Eric Botcazou <ebotcazou@adacore.com>
1503
1504 * einfo.ads (Is_Atomic_Or_VFA): Move to XEINFO INLINES section.
1505 * xeinfo.adb: Replace a-einfo.h with einfo.h throughout.
1506 Add pattern to translate "or else" into "||".
1507
57abdadd
EB
15082015-05-22 Eric Botcazou <ebotcazou@adacore.com>
1509
1510 * einfo.ads (Has_Volatile_Full_Access): Rename into...
1511 (Is_Volatile_Full_Access): ...this.
1512 (Set_Has_Volatile_Full_Access): Rename into...
1513 (Set_Is_Volatile_Full_Access): ...this.
1514 * einfo.adb (Has_Volatile_Full_Access): Rename into...
1515 (Is_Volatile_Full_Access): ...this.
1516 (Set_Has_Volatile_Full_Access): Rename into...
1517 (Set_Is_Volatile_Full_Access): ...this.
1518 (Is_Atomic_Or_VFA): Adjust to above renaming.
1519 * errout.adb (Special_Msg_Delete): Likewise.
1520 * exp_pakd.adb (Install_PAT): Likewise.
1521 * freeze.adb (Freeze_Array_Type): Likewise.
1522 * sem_ch8.adb (Analyze_Object_Renaming): Likewise.
1523 * sem_ch13.adb (Inherit_Delayed_Rep_Aspects): Likewise.
1524 (Inherit_Aspects_At_Freeze_Point): Likewise.
1525 * sem_prag.adb (Set_Atomic_VFA): Likewise.
1526 (Process_Atomic_Independent_Shared_Volatile): Likewise.
1527 * sem_util.adb (Is_Atomic_Or_VFA_Object): Likewise.
1528
f280dd8f
RD
15292015-05-22 Robert Dewar <dewar@adacore.com>
1530
1531 * exp_ch5.adb, layout.adb, einfo.adb, einfo.ads, sem_prag.adb,
1532 freeze.adb, freeze.ads, sem_util.adb, sem_util.ads, exp_ch2.adb,
1533 exp_ch4.adb, errout.adb, exp_aggr.adb, sem_ch13.adb: This is a general
1534 change that deals with the fact that most of the special coding for
1535 Atomic should also apply to the case of Volatile_Full_Access.
1536 A new attribute Is_Atomic_Or_VFA is introduced, and many of the
1537 references to Is_Atomic now use this new attribute.
1538
878e58c8
RD
15392015-05-22 Robert Dewar <dewar@adacore.com>
1540
1541 * exp_ch4.adb (Expand_N_Op_Eq): Introduce 'Machine for 'Result
1542 comparison.
1543
57d22af2
AC
15442015-05-22 Eric Botcazou <ebotcazou@adacore.com>
1545
1546 * sprint.adb (Source_Dump): When generating debug files, deal
1547 with the case of a stand-alone package instantiation by dumping
1548 together the spec and the body in the common debug file.
1549
15502015-05-22 Robert Dewar <dewar@adacore.com>
1551
1552 * sem_ch13.adb (Minimum_Size): Size is zero for null range
1553 discrete subtype.
1554
15552015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1556
1557 * einfo.adb (Anonymous_Master): This attribute now applies
1558 to package and subprogram bodies.
1559 (Set_Anonymous_Master): This attribute now applies to package and
1560 subprogram bodies.
1561 (Write_Field36_Name): Add output for package and subprogram bodies.
1562 * einfo.ads Update the documentation on attribute Anonymous_Master
1563 along with occurrences in entities.
1564 * exp_ch4.adb (Create_Anonymous_Master): Reimplemented to
1565 handle spec and body anonymous masters of the same unit.
1566 (Current_Anonymous_Master): Reimplemented. Handle a
1567 package instantiation that acts as a compilation unit.
1568 (Insert_And_Analyze): Reimplemented.
1569
15702015-05-22 Ed Schonberg <schonberg@adacore.com>
1571
1572 * sem_ch10.adb (Analyze_With_Clause): A limited_with_clause on a
1573 predefined unit is treated as a regular with_clause.
1574
ccd6f414
AC
15752015-05-22 Robert Dewar <dewar@adacore.com>
1576
1577 * sem_ch12.adb, prj.ads, makeutl.ads, sem_ch6.adb, prj-nmsc.adb,
1578 prj-conf.adb, sem_disp.adb: Minor reformatting.
1579
15802015-05-22 Vincent Celier <celier@adacore.com>
1581
1582 * clean.adb (Parse_Cmd_Line): For native gnatclean, check
1583 for switch -P and, if found and gprclean is available, invoke
1584 silently gprclean.
1585 * make.adb (Initialize): For native gnatmake, check for switch -P
1586 and, if found and gprbuild is available, invoke silently gprbuild.
1587
15882015-05-22 Eric Botcazou <ebotcazou@adacore.com>
1589
1590 * sem_ch13.adb (Validate_Unchecked_Conversions): Also issue
1591 specific warning for discrete types when the source is larger
1592 than the target.
1593
167b47d9
AC
15942015-05-22 Ed Schonberg <schonberg@adacore.com>
1595
1596 * einfo.ads, einfo.adb (Incomplete_Actuals): New attribute of
1597 package instantiations. Holds the list of actuals in the instance
1598 that are incomplete types, to determine where the corresponding
1599 instance body must be placed.
1600 * sem_ch6.adb (Conforming_Types): An incomplete type used as an
1601 actual in an instance matches an incomplete formal.
1602 * sem_disp.adb (Check_Dispatching_Call): Handle missing case of
1603 explicit dereference.
1604 (Inherited_Subprograms): In the presence of a limited view there
1605 are no subprograms to inherit.
1606 * sem_ch12.adb (Preanalyze_Actuals): Build list of incomplete
1607 actuals of instance, for later placement of instance body and
1608 freeze nodes for actuals.
1609 (Install_Body): In the presence of actuals that incomplete types
1610 from a limited view, the instance body cannot be placed after
1611 the declaration because full views have not been seen yet. Any
1612 use of the non-limited views in the instance body requires
1613 the presence of a regular with_clause in the enclosing unit,
1614 and will fail if this with_clause is missing. We place the
1615 instance body at the beginning of the enclosing body, which is
1616 the unit being compiled, and ensure that freeze nodes for the
1617 full views of the incomplete types appear before the instance.
1618
16192015-05-22 Pascal Obry <obry@adacore.com>
1620
1621 * makeutl.ads, prj-conf.adb, prj-nmsc.adb, prj.ads
1622 (In_Place_Option): Removed.
1623 (Relocate_Build_Tree_Option): New constant.
1624 (Root_Dir_Option): New constant.
1625 (Obj_Root_Dir): Removed.
1626 (Build_Tree_Dir): New variable.
1627 (Root_Src_Tree): Removed.
1628 (Root_Dir): New variable.
1629 * prj-conf.adb (Get_Or_Create_Configuration_File): Add check
1630 for improper relocation.
1631 * prj-nmsc.adb (Locate_Directory): Add check for improper
1632 relocation.
1633
57ae790f
HK
16342015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1635
caef4e57
HK
1636 * einfo.adb (Default_Init_Cond_Procedure): Code cleanup. The
1637 attribute now applies to the base type.
1638 (Has_Default_Init_Cond): Now applies to the base type.
1639 (Has_Inherited_Default_Init_Cond): Now applies to the base type.
1640 (Set_Default_Init_Cond_Procedure): Code cleanup. The attribute now
1641 applies to the base type.
1642 (Set_Has_Default_Init_Cond): Now applies to the base type.
1643 (Set_Has_Inherited_Default_Init_Cond): Now applies to the base type.
1644 * exp_ch3.adb (Expand_N_Object_Declaration): No need to use the
1645 base type when adding a call to the Default_Initial_Condition.
1646
16472015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1648
1649 * einfo.adb: Node36 is now used as Anonymous_Master. Flag253
57ae790f
HK
1650 is now unused.
1651 (Anonymous_Master): New routine.
1652 (Has_Anonymous_Master): Removed.
1653 (Set_Anonymous_Master): New routine.
1654 (Set_Has_Anonymous_Master): Removed.
1655 (Write_Entity_Flags): Remove the output for Has_Anonymous_Maser.
1656 (Write_Field36_Name): Add output for Anonymous_Master.
1657 * einfo.ads Add new attribute Anonymous_Master along with
1658 occurrences in nodes. Remove attribute Has_Anonymous_Master along
1659 with occurrences in nodes.
1660 (Anonymous_Master): New routine along with pragma Inline.
1661 (Has_Anonymous_Master): Removed along with pragma Inline.
1662 (Set_Anonymous_Master): New routine along with pragma Inline.
1663 (Set_Has_Anonymous_Master): Removed along with pragma Inline.
1664 * exp_ch4.adb (Create_Anonymous_Master): New routine.
1665 (Current_Anonymous_Master): Reimplemented.
1666
a79cdb2c
BD
16672015-05-22 Bob Duff <duff@adacore.com>
1668
1669 * freeze.adb (Freeze_Profile): Suppress warning if imported
1670 subprogram is not at library level.
1671
db222ead
AC
16722015-05-22 Robert Dewar <dewar@adacore.com>
1673
1674 * sem_ch8.adb (Analyze_Object_Renaming): Check for renaming
1675 component of an object to which Volatile_Full_Access applies.
1676
16772015-05-22 Jerome Guitton <guitton@adacore.com>
1678
1679 * exp_dbug.ads: Add note about non bit-packed arrays.
1680
16812015-05-22 Eric Botcazou <ebotcazou@adacore.com>
1682
1683 * sem_prag.adb: Fix typo.
1684 * einfo.ads: Grammar fixes in comments.
1685
16862015-05-22 Bob Duff <duff@adacore.com>
1687
1688 * a-cborma.ads, a-cidlli.ads, a-cimutr.ads, a-ciormu.ads,
1689 * a-cihase.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
1690 * a-cborse.ads, a-comutr.ads, a-ciorma.ads, a-cobove.ads,
1691 * a-coormu.ads, a-convec.ads, a-cohase.ads, a-coinho.ads,
1692 * a-cbdlli.ads, a-cbmutr.ads, a-cbhase.ads, a-cdlili.ads,
1693 * a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
1694 * a-coinho-shared.ads (Constant_Reference_Type, Reference_Type):
1695 Add an initialization expression "raise Program_Error". See,
1696 for example, RM-A.18.2(148.4).
1697
ed05b790
RD
16982015-05-22 Robert Dewar <dewar@adacore.com>
1699
1700 * debug.adb: Update documentation.
1701 * einfo.ads, einfo.adb (Needs_Typedef): New flag
1702 * exp_unst.adb (Unnest_Subprogram): Mark AREC types as needing
1703 typedef's in C.
1704 * frontend.adb: Update comments.
1705 * gnat1drv.adb (Adjust_Global_Switches): Set all needed flags
1706 for -gnatd.V
1707 * opt.ads (Generate_C_Code): New switch.
1708 * osint-c.adb (Write_C_File_Info): Removed, not used
1709 (Write_H_File_Info): Removed, not used
1710 * osint-c.ads (Write_C_File_Info): Removed, not used
1711 (Write_H_File_Info): Removed, not used
1712 * osint.ads (Write_Info): Minor comment updates.
1713 (Output_FD): Moved from private part to public part of spec.
1714 * sem.adb (Semantics): Force expansion on if in Generate_C_Code
1715 mode.
1716 * atree.ads: minor typo in comment.
1717 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
1718 Do not allow VFA on composite object with aliased component.
1719
6eb187f6
AC
17202015-05-22 Arnaud Charlet <charlet@adacore.com>
1721
1722 * osint-c.adb, osint-c.ads (Set_File_Name): Move back to spec.
1723
17242015-05-22 Pascal Obry <obry@adacore.com>
1725
1726 * prj-util.adb: Minor comment editing.
1727
65467a8a
PO
17282015-05-22 Pascal Obry <obry@adacore.com>
1729
1730 * makeutl.ads (In_Place_Option): New constant.
1731 * prj.ads (Obj_Root_Dir): New variable (absolute path to relocate
1732 objects).
1733 (Root_Src_Tree): New variable (absolute path of root source tree).
1734 * prj-conf.adb (Do_Autoconf): Take into account the object root
1735 directory (if defined) to generate configuration project.
1736 * prj-nmsc.adb (Get_Directories): Handle case where Obj_Root_Dir
1737 is defined.
1738 (Locate_Directory): Likewise.
1739
01099e04
PO
17402015-05-22 Pascal Obry <obry@adacore.com>
1741
1742 * prj-util.ads, prj-util.adb (Relative_Path): New routine.
1743
ca811241
BD
17442015-05-22 Bob Duff <duff@adacore.com>
1745
1746 * exp_utils.ads, exp_utils.adb (Find_Optional_Prim_Op): New
1747 interface to return Empty when not found, so we can avoid handling
1748 Program_Error in that case.
1749 (Find_Prim_Op): Fix latent bug: raise Program_Error when there are no
1750 primitives.
1751 * exp_ch7.adb, sem_util.adb: Use Find_Optional_Prim_Op when the
1752 code is expecting Empty.
1753 * sem_ch8.adb: Use Find_Optional_Prim_Op to avoid handling
1754 Program_Error.
1755
a95f708e
RD
17562015-05-22 Robert Dewar <dewar@adacore.com>
1757
1758 * sem_ch3.adb, sem_intr.adb, exp_ch4.adb, s-rannum.adb,
1759 sem_eval.adb, s-fatgen.adb, s-expmod.ads: Remove incorrect hyphen in
1760 non-binary.
1761 * exp_util.adb: Add comment.
1762 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move from spec to
1763 body.
1764 (Set_File_Name): New name for the above.
1765 (Create_C_File, Create_H_File, Write_C_File_Info, Write_H_File_Info,
1766 Close_C_File, Close_H_File): New procedure.
1767 * osint.adb: Minor reformatting.
1768 * osint.ads: Minor comment updates.
1769
c2b2b2d7
RD
17702015-05-22 Robert Dewar <dewar@adacore.com>
1771
1772 * exp_ch4.adb: Minor rewording.
1773 * exp_util.ads: Clarify that Find_Prim_Op is only for
1774 tagged types.
1775
b502ba3c
RD
17762015-05-22 Robert Dewar <dewar@adacore.com>
1777
1778 * atree.adb, atree.ads, treepr.adb: Change name Needs_Actuals_Check to
1779 Check_Actuals.
1780 * exp_ch4.adb (Expand_N_Op_Expon): Optimize 2**x in modular
1781 and overflow cases.
1782
fd957434
AC
17832015-05-22 Eric Botcazou <ebotcazou@adacore.com>
1784
1785 * exp_pakd.adb (Install_PAT): Propagate representation aspects
1786 from the original array type to the PAT.
1787
17882015-05-22 Robert Dewar <dewar@adacore.com>
1789
1790 * treepr.adb (Print_Node_Header): Add output of Needs_Actuals_Check.
1791
a02c5a69
RD
17922015-05-22 Robert Dewar <dewar@adacore.com>
1793
1794 * atree.adb, atree.ads (Needs_Actuals_Check): New flag.
1795
7a391e42
HK
17962015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1797
1798 * sem_prag.adb (Analyze_Pragma): Remove the detection
1799 of a useless Part_Of indicator when the related item is a constant.
1800 (Check_Matching_Constituent): Do not emit an error on a constant.
1801 (Check_Missing_Part_Of): Do not check for a missing Part_Of indicator
1802 when the related item is a constant.
1803 (Collect_Body_States): Code cleanup.
1804 (Collect_Visible_States): Code cleanup.
1805 (Report_Unused_States): Do not emit an error on a constant.
1806 * sem_util.ads, sem_util.adb (Has_Variable_Input): Removed.
1807
c2cfccb1
AC
18082015-05-22 Eric Botcazou <ebotcazou@adacore.com>
1809
1810 * sem_ch8.adb (Analyze_Object_Renaming): Copy
1811 Has_Volatile_Full_Access from renamed to renaming entities.
1812 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
1813 Tidy up and remove redundant setting of Has_Volatile_Full_Access.
1814
18152015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1816
1817 * ghost.adb (Check_Ghost_Completion): Update references to SPARK
1818 RM 6.9 rules.
1819 (Check_Ghost_Policy): Update references to SPARK RM 6.9 rules.
1820 * sem_ch3.adb (Analyze_Object_Declaration): Update references
1821 to SPARK RM 6.9 rules.
1822 (Check_Completion): Ghost entities do not require a special form of
1823 completion.
1824 * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Update references
1825 to SPARK RM 6.9 rules.
1826 (Analyze_Subprogram_Body_Helper): Update references to SPARK RM 6.9
1827 rules.
1828 * sem_ch7.adb (Analyze_Package_Body_Helper): Update references
1829 to SPARK RM 6.9 rules.
1830 (Requires_Completion_In_Body): Ghost entities do not require a special
1831 form of completion.
1832
18332015-05-22 Robert Dewar <dewar@adacore.com>
1834
1835 * a-csquin.ads: Use Ada 2012 notation.
1836 * sem_ch8.adb: Minor reformatting.
1837
18382015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1839
1840 * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect Import
1841 acts as a completion.
1842
30fc80cf
AC
18432015-05-22 Ed Schonberg <schonberg@adacore.com>
1844
1845 * sem_ch13.adb: Minor reformatting.
1846
18472015-05-22 Jose Ruiz <ruiz@adacore.com>
1848
1849 * a-reatim.adb: Minor change, fix typo.
1850
90d6b7bc
RD
18512015-05-22 Robert Dewar <dewar@adacore.com>
1852
1853 * sem_util.ads: Minor addition of ??? comment.
1854 * sem_prag.adb, sem_util.adb: Minor reformatting.
1855 * sem_ch13.adb: minor reformatting.
1856
eb9008b7
AC
18572015-05-22 Robert Dewar <dewar@adacore.com>
1858
1859 * a-reatim.ads: Add Compile_Time_Error to ensure Duration
1860 is 64-bits.
1861 * sem_ch13.adb: Improve error message.
1862 * exp_ch4.adb: Minor reformatting.
1863
18642015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1865
1866 * sem_prag.adb (Analyze_Pragma): Constants without variable
1867 input do not require indicator Part_Of.
1868 (Check_Missing_Part_Of): Constants without variable input do not
1869 requrie indicator Part_Of.
1870 (Collect_Visible_States): Constants without variable input are
1871 not part of the hidden state of a package.
1872 * sem_util.ads, sem_util.adb (Has_Variable_Input): New routine.
1873
18742015-05-22 Robert Dewar <dewar@adacore.com>
6333ad3d
AC
1875
1876 * exp_util.adb (Activate_Atomic_Synchronization): Do not set
1877 Atomic_Sync_Required for an object renaming declaration.
1878 * sem_ch8.adb (Analyze_Object_Renaming): Copy Is_Atomic and
1879 Is_Independent to renaming object.
1880
eb9008b7 18812015-05-22 Ed Schonberg <schonberg@adacore.com>
6333ad3d
AC
1882
1883 * sem_ch5.adb (Analyze_Iterator_Specification): Diagnose
1884 various illegalities in iterators over arrays and containers:
1885 a) New function Get_Cursor_Type, to verify that the cursor is
1886 not a limited type at the point of iteration.
1887 b) If the container is a constant, an element_iterator is illegal
1888 if the container type does not have a Constant_Indexing aspect.
1889 c) If the iterate function has an in-out controlling parameter,
1890 the container cannot be a constant object.
1891 d) Reject additional cases of iterators over a
1892 discriminant-dependent component of a mutable object.
1893
eb7d283d
HK
18942015-05-21 Hristian Kirtchev <kirtchev@adacore.com>
1895
1896 * einfo.adb (Contract): This attribute now applies to constants.
1897 (Set_Contract): This attribute now applies to constants.
1898 (Write_Field34_Name): Add output for constants.
1899 * einfo.ads Attribute Contract now applies to constants.
1900 * sem_ch3.adb (Analyze_Object_Contract): Constants now have
1901 their Part_Of indicator verified.
1902 * sem_prag.adb (Analyze_Constituent): A constant is now a valid
1903 constituent.
1904 (Analyze_Global_Item): A constant cannot act as an output.
1905 (Analyze_Initialization_Item): Constants are now a valid
1906 initialization item.
1907 (Analyze_Initializes_In_Decl_Part): Rename
1908 global variable States_And_Vars to States_And_Objs and update
1909 all its occurrences.
1910 (Analyze_Input_Item): Constants are now a
1911 valid initialization item. Remove SPARM RM references from error
1912 messages.
1913 (Analyze_Pragma): Indicator Part_Of can now apply to a constant.
1914 (Collect_Body_States): Collect both source constants
1915 and variables.
1916 (Collect_States_And_Objects): Collect both source constants and
1917 variables.
1918 (Collect_States_And_Variables): Rename
1919 to Collect_States_And_Objects and update all its occurrences.
1920 (Collect_Visible_States): Do not collect constants and variables
1921 used to map generic formals to actuals.
1922 (Find_Role): The role of a constant is that of an input. Separate the
1923 role of a variable from that of a constant.
1924 (Report_Unused_Constituents): Add specialized wording for constants.
1925 (Report_Unused_States): Add specialized wording for constants.
1926 * sem_util.adb (Add_Contract_Item): Add processing for constants.
1927 * sem_util.ads (Add_Contract_Item): Update the comment on usage.
1928 (Find_Placement_In_State_Space): Update the comment on usage.
1929
1ca46a77
AC
19302015-05-21 Ed Schonberg <schonberg@adacore.com>
1931
1932 * sem_ch5.adb: minor reformatting.
1933
19342015-05-21 Robert Dewar <dewar@adacore.com>
1935
1936 * freeze.adb (Freeze_Entity): Properly tag -gnatw.z messages.
1937
cad97339
AC
19382015-05-21 Robert Dewar <dewar@adacore.com>
1939
1940 * freeze.adb: Minor reformatting.
1941 * cstand.adb (Print_Standard): Fix bad printing of Duration
1942 low bound.
1943 * a-reatim.adb (Time_Of): Complete rewrite to properly detect
1944 out of range args.
1945
19462015-05-21 Ed Schonberg <schonberg@adacore.com>
1947
1948 * sem_ch5.adb: add (useless) initial value.
1949 * sem_ch3.adb (Replace_Anonymous_Access_To_Protected_Subprogram):
1950 Check whether the procedure has parameters before processing
1951 formals in ASIS mode.
1952
4f2cae4a
ES
19532015-05-21 Ed Schonberg <schonberg@adacore.com>
1954
1955 * sem_ch13.adb (Check_Iterator_Functions): Emit error on Iterator
1956 aspect as well when indexing function is illegal.
1957 (Valid_Default_Iterator): Handle properly somme illegal cases
1958 to prevent compilation abandoned messages.
1959 (Check_Primitive_Function): Verify that type and indexing function
1960 are in the same scope.
1961 * freeze.adb (Freeze_Record): Extend patch on the presence of
1962 indexing aspects to aspect Default_Iterator.
1963
0e50b624
DM
19642015-05-19 David Malcolm <dmalcolm@redhat.com>
1965
1966 * gcc-interface/trans.c (Sloc_to_locus1): Strenghthen local "map"
1967 from line_map * to line_map_ordinary *.
1968
fe1814cf
JM
19692015-05-12 Jason Merrill <jason@redhat.com>
1970
1971 * sigtramp-vxworks.c: Add space between string literal and macro
1972 name.
1973
d5d3b217
AC
19742015-05-12 Arnaud Charlet <charlet@adacore.com>
1975
1976 * gnat_rm.texi, gnat_ugn.texi, doc: Documentation updates and clean ups
1977
7166d535
AC
19782015-05-12 Ed Schonberg <schonberg@adacore.com>
1979
1980 * sem_ch5.adb (Analyze_Iterator_Specifications): Additional
1981 legality checks for array and container iterators:
1982 a) The domain of iteration cannot be a component that depends
1983 on discriminants of a mutable object. The check was recently
1984 added for element iterators.
1985 b) The cursor type cannot be a limited type at the point of the
1986 iteration, because the cursor will be assigned to in the body
1987 of the loop.
1988
19892015-05-12 Robert Dewar <dewar@adacore.com>
1990
1991 * freeze.adb (Freeze_Record_Type): Make sure that if we have
1992 aspect Iterator_Element, then we have either Constant_Indexing
1993 or Variable_Indexing.
1994
4b17187f
AC
19952015-05-12 Ed Schonberg <schonberg@adacore.com>
1996
1997 * a-coormu.ads, a-coormu.adb: Add Indexing aspect, Reference_Type,
1998 and Reference_Control_Type to support element iterators over
1999 ordered multisets.
2000 * a-ciormu.ads, a-ciormu.adb: Ditto for
2001 indefinite_ordered_multisets.
2002
20032015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
2004
2005 * exp_ch4.adb (Expand_N_Expression_With_Actions): Force
2006 the evaluation of the EWA expression. Code cleanup.
2007 (Process_Transient_Object): Code cleanup.
2008 * exp_util.adb (Is_Aliased): Controlled transient objects found
2009 within EWA nodes are not aliased.
2010 (Is_Finalizable_Transient): Iterators are not finalizable transients.
2011
7858300e
AC
20122015-05-12 Robert Dewar <dewar@adacore.com>
2013
2014 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
2015 Don't allow Atomic and Volatile_Full_Access for the same entity.
2016
20172015-05-12 Ed Schonberg <schonberg@adacore.com>
2018
2019 * sem_ch5.adb (Analyze_Iterator_Specification): Implement new
2020 semantics and safety checks specified in AI12-0151.
2021
c8d3b4ff
AC
20222015-05-12 Pierre-Marie de Rodat <derodat@adacore.com>
2023
2024 * sem_ch10.adb (Sem_Ch10.Analyze_Proper_Body): Generate SCOs
2025 for subunit in generic units.
2026
20272015-05-12 Robert Dewar <dewar@adacore.com>
2028
2029 * sem_elab.adb (Check_A_Call): Avoid checking internal call
2030 from Valid_Scalars
2031
20322015-05-12 Ed Schonberg <schonberg@adacore.com>
2033
2034 * sem_ch6.adb (Process_Formals): An untagged incomplete type
2035 is legal in the profile of a null procedure.
2036
20372015-05-12 Ed Schonberg <schonberg@adacore.com>
2038
2039 * sem_ch12.adb (Validate_Derived_Type_Instance): Handle properly
2040 the checks on a derived formal whose parent type is a previous
2041 formal that is not a derived type.
2042
20432015-05-12 Robert Dewar <dewar@adacore.com>
2044
2045 * aspects.ads, aspects.adb: Add entries for aspect Volatile_Full_Access
2046 * einfo.adb (Has_Volatile_Full_Access): New flag.
2047 (Has_Volatile_Full_Access): New flag.
2048 * einfo.ads (Has_Volatile_Full_Access): New flag.
2049 * par-prag.adb: Add dummy entry for Volatile_Full_Access.
2050 * sem_prag.adb (Analyze_Pragma, case Volatile_Full_Access):
2051 Implement new pragma.
2052 * snames.ads-tmpl: Add entries for pragma Volatile_Full_Access.
2053
20542015-05-12 Robert Dewar <dewar@adacore.com>
2055
2056 * targparm.ads: Minor reformatting.
2057
20582015-05-12 Robert Dewar <dewar@adacore.com>
2059
2060 * a-reatim.adb (Time_Of): Properly detect overflow when TS = 0.0.
2061 * a-reatim.ads: Minor reformatting.
2062
caf07df9
AC
20632015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
2064
65fe0167
AC
2065 * einfo.ads: Update the documentation of flags
2066 Has_Inherited_Default_Init_Cond and Has_Default_Init_Cond.
2067
20682015-05-12 Robert Dewar <dewar@adacore.com>
2069
2070 * impunit.adb: Add entry for a-dhfina.ads
2071 * a-dhfina.ads: New file.
2072
20732015-05-12 Ed Schonberg <schonberg@adacore.com>
2074
2075 * exp_ch5.adb (Expand_Iterator_Loop_Over_Array): if the array
2076 type has convention Fortran, a multidimensional iterator varies
2077 the first dimension fastest.
2078
20792015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
2080
2081 * einfo.adb: Node32 is now used as Encapsulating_State.
caf07df9
AC
2082 Node37 is now used as Associated_Entity.
2083 (Associated_Entity): New routine.
65fe0167 2084 (Encapsulating_State): Update the assertion guard to include constants.
caf07df9
AC
2085 (Set_Associated_Entity): New routine.
2086 (Set_Encapsulating_State): Update the assertion guard to
2087 include constants.
2088 (Write_Field10_Name): Remove the output for Encapsulating_State.
2089 (Write_Field32_Name): Add output for Encapsulating_State.
2090 (Write_Field37_Name): Add output for Associated_Entity.
2091 * einfo.ads New attribute Associated_Entity along with placement
2092 in entities. Attribute Encapsulating_State now uses Node32.
2093 (Associated_Entity): New routine along with pragma Inline.
2094 (Set_Associated_Entity): New routine along with pragma Inline.
2095 * inline.ads Code reformatting.
2096 * sem_attr.adb (Analyze_Attribute): Correct the prefix of
2097 attribute 'Result when the context is a generic instantiation.
2098 (Analyze_Attribute_Old_Result): Pragmas Depends and
2099 Refined_Depends are a valid context for attribute 'Result.
2100 (Denote_Same_Function): Allow attribute 'Result to denote
2101 generic functions.
2102 * sem_ch3.adb Add with and use clauses for Sem_Ch12.
2103 (Analyze_Declarations): Capture global references within the
2104 contracts of packages, subprograms and their respective bodies.
2105 * sem_ch6.adb (Analyze_Aspects_On_Body_Or_Stub): Removed.
2106 (Analyze_Completion_Contract): Removed.
2107 (Analyze_Generic_Subprogram_Body): Enchange the aspects after
2108 creating the generic copy. Create a generic contract for the
2109 template. Analyze the aspects of the generic body. Analyze the
2110 contract of the generic body when it is a compilation unit and
2111 capture global references.
2112 (Analyze_Subprogram_Body_Contract): Code cleanup.
2113 (Analyze_Subprogram_Contract): Do not save global references here.
2114 (Save_Global_References_In_List): Removed.
2115 * sem_ch7.adb (Analyze_Package_Body_Contract): Code cleanup.
2116 (Analyze_Package_Body_Helper): Create a generic contract for
2117 the template.
2118 (Analyze_Package_Contract): Code cleanup.
2119 * sem_ch10.adb Add with and use clauses for Sem_Ch12.
2120 (Analyze_Compilation_Unit): Capture global references in a
2121 generic subprogram declaration that acts as a compilation unit.
2122 * sem_ch12.adb Add with and use clauses for Sem_Prag. Illustrate
2123 the implementation of generic contracts. Alphabetize various
2124 subprograms.
2125 (Analyze_Generic_Package_Declaration):
2126 Create a generic contract for the template.
2127 (Analyze_Generic_Subprogram_Declaration): Create a generic
2128 contract for the template.
2129 (Analyze_Subprogram_Instantiation): Instantiate the contract of the
2130 subprogram.
2131 (Copy_Generic_Node): Link defining entities of the generic template
2132 with the corresponding defining entities of the generic copy. Update
2133 the processing of pragmas.
2134 (Instantiate_Contract): Removed.
2135 (Instantiate_Subprogram_Contract): New routine.
2136 (Requires_Delayed_Save): New routine.
2137 (Save_Global_References): Rename formal parameter N to Templ. Various
2138 cleanups.
2139 (Save_Global_References_In_Aspects): Moved from the spec.
2140 (Save_Global_References_In_Contract): New routine.
2141 (Save_References_In_Aggregate): New routine.
2142 (Save_References_In_Char_Lit_Or_Op_Symbol): New routine.
2143 (Save_References_In_Descendants): New routine.
2144 (Save_References_In_Identifier): New routine.
2145 (Save_References_In_Operator): New routine.
2146 (Save_References_In_Pragma): New routine.
2147 * sem_ch12.ads (Save_Global_References): Rename formal
2148 parameter N to Templ. Update the comment on usage.
2149 (Save_Global_References_In_Aspects): Moved to the body.
2150 (Save_Global_References_In_Contract): New routine.
2151 * sem_ch13.adb (Analyze_Aspect_Specifications_On_Body_Or_Stub):
2152 New routine.
2153 * sem_ch13.ads (Analyze_Aspect_Specifications_On_Body_Or_Stub):
2154 New routine.
2155 * sem_prag.adb (Add_Item_To_Name_Buffer): Add support for
2156 generic parameters.
2157 (Analyze_Contract_Cases_In_Decl_Part): Code cleanup.
2158 (Analyze_Depends_Global): New routine.
2159 (Analyze_Depends_In_Decl_Part): Code cleanup.
2160 (Analyze_Global_In_Decl_Part): Code cleanup.
2161 (Analyze_Global_Item): Constants are now valid global items. Do
2162 not perform state-related checks in an instance. Change the way
2163 renamings are handled. (Analyze_Initial_Condition_In_Decl_Part):
2164 Code cleanup.
2165 (Analyze_Initializes_In_Decl_Part): Code cleanup.
2166 (Analyze_Input_Output): The analysis of attribute 'Result in
2167 the context of pragmas Depends or Refined_Depends now reuses
2168 the existing attribute analysis machinery. Constants and
2169 generic parameters are now valid dependency items. Do not
2170 perform state-related checks in an instance. Change the way
2171 renamings are handled. (Analyze_Pragma): Add a "characteristics"
2172 section for pragmas Abstract_State, Contract_Cases, Depends,
2173 Extensions_Visible, Global, Initial_Condition, Initializes,
2174 Post, Post_Class, Postcondition, Pre, Pre_Class, Precondition,
2175 Refined_Depends, Refined_Global, Refined_Post, Refined_State, Test_Case.
2176 (Analyze_Pre_Post_Condition): Do not create a generic
2177 template here.
2178 (Analyze_Pre_Post_Condition_In_Decl_Part): Code cleanup.
2179 (Analyze_Refined_Depends_Global_Post): New routine.
2180 (Analyze_Refined_Depends_In_Decl_Part): Code cleanup.
2181 (Analyze_Refined_Global_In_Decl_Part): Code cleanup.
2182 (Analyze_Refined_Pragma): Removed.
2183 (Analyze_Refined_State_In_Decl_Part): Code cleanup.
2184 (Analyze_Test_Case_In_Decl_Part): Code cleanup.
2185 (Check_Dependency_Clause): Do not perform this check in an instance.
2186 (Check_Function_Return): Add support for generic functions.
2187 (Check_In_Out_States): Do not perform this check in an instance.
2188 (Check_Input_States): Do not perform this check in an instance.
2189 (Check_Mode_Restriction_In_Function): Add support for generic functions.
2190 (Check_Output_States): Do not perform this check in an instance.
2191 (Check_Postcondition_Use_In_Inlined_Subprogram): Rename
2192 parameter Subp_Id to Spec_Id and update comment on usage.
2193 (Check_Proof_In_States): Do not perform this check in an instance.
2194 (Check_Refined_Global_Item): Add support for constants.
2195 (Check_Refined_Global_List): Do not perform this check in an instance.
2196 (Collect_Global_Items): Reimplemented.
2197 (Collect_Subprogram_Inputs_Outputs): Add support for generic parameters.
2198 (Create_Generic_Template): Removed.
2199 (Find_Related_Package_Or_Body): Moved to spec.
2200 (Find_Role): Add support for generic parameters and constants.
2201 (Get_Argument): Moved to spec. Rename parameter Spec_Id to Context_Id.
2202 (Match_Item): Add support for constants.
2203 (Preanalyze_Test_Case_Arg): Reimplemented.
2204 (Report_Extra_Clauses): Do not perform this check in an instance.
2205 (Report_Extra_Constituents): Do not perform this check in an instance.
2206 * sem_prag.ads (Collect_Subprogram_Inputs_Outputs): Update
2207 the comment on usage.
2208 (Find_Related_Package_Or_Body): Moved from body.
2209 (Get_Argument): Moved from body.
2210 * sem_util.adb Add with and use clauses for Sem_Ch12.
2211 (Corresponding_Spec_Of): Add support for packages and package bodies.
2212 (Create_Generic_Contract): New routine.
2213 (Is_Contract_Annotation): Reimplemented.
2214 (Is_Generic_Declaration_Or_Body): New routine.
2215 (Is_Package_Contract_Annotation): New routine.
2216 (Is_Subprogram_Contract_Annotation): New routine.
2217 * sem_util.ads (Corresponding_Spec_Of): Update the comment on usage.
2218 (Create_Generic_Contract): New routine.
2219 (Is_Generic_Declaration_Or_Body): New routine.
2220 (Is_Package_Contract_Annotation): New routine.
2221 (Is_Subprogram_Contract_Annotation): New routine.
2222 * sinfo.adb (Is_Generic_Contract_Pragma): New routine.
2223 (Set_Is_Generic_Contract_Pragma): New routine.
2224 * sinfo.ads Add new attribute Is_Generic_Contract_Pragma along
2225 with occurrences in nodes.
2226 (Is_Generic_Contract_Pragma): New routine along with pragma Inline.
2227 (Set_Is_Generic_Contract_Pragma): New routine along with pragma Inline.
2228 * treepr.adb (Print_Entity_Info): Output fields 36 to 41.
2229
22302015-05-12 Robert Dewar <dewar@adacore.com>
2231
2232 * a-taster.ads: Minor comment fix: fix bad header, this is a
2233 pure RM unit.
2234
c944345b
RD
22352015-05-12 Robert Dewar <dewar@adacore.com>
2236
2237 * sem_intr.adb: (Check_Shift): Diagnose bad modulus value.
2238
22392015-05-12 Robert Dewar <dewar@adacore.com>
2240
2241 * gnat1drv.adb (Adjust_Global_Switches): Default to suppressing
2242 Alignment_Checks on non-strict alignment machine.
2243 * sem_ch13.adb (Validate_Address_Clauses): Don't give
2244 compile-time alignment warnings if run time Alignment_Check
2245 is suppressed.
2246
52ea13f2
AC
22472015-05-12 Thomas Quinot <quinot@adacore.com>
2248
2249 * g-sercom.ads, g-sercom-linux.adb (GNAT.Serial_Communications.
2250 Data_Rate): New literals B75, B110, B150, B300, B600.
2251
22522015-05-12 Doug Rupp <rupp@adacore.com>
2253
2254 * init.c (__gnat_init_float) [vxworks]: For e500v2,
2255 do nothing and leave the responsibility to install the handler
2256 and enable the exceptions to the BSP.
2257
fed8bd87
RD
22582015-05-12 Robert Dewar <dewar@adacore.com>
2259
2260 * sem_ch9.adb, einfo.ads, exp_intr.adb: Minor reformatting.
2261 * sem_disp.adb: Minor code reorganization (remove junk redundant
2262 null statement).
2263 * exp_unst.adb (Unnest_Subprogram.Uplev_Refs): Ignore uplevel
2264 references to bounds of types coming from original type reference.
2265 * checks.ads: Minor reformatting.
2266 * checks.adb: Minor reformatting.
2267 * sem_prag.adb (Analyze_Pragma, case Check): If in ignored
2268 assertion, then make sure we do not drag in bignum stuff.
2269
27fd9ad8
ES
22702015-05-12 Ed Schonberg <schonberg@adacore.com>
2271
2272 * sem_ch9.adb (Collect_Interfaces): Initialize
2273 Direct_Primitive_Operations for a tagged synchronized type,
2274 so it can used in ASIS mode.
2275 * sem_disp.adb (Check_Dispatching_Operation): If expansion is
2276 disabled, attach subprogram to list of Direct_Primitive_Operations
2277 of synchronized type itself, for ASIS use, because in this case
2278 Corresponding_Record_Type is not built.
2279 * einfo.ads: Indicate use of Direct_Primitive_Operations on
2280 synchronized type.
2281
7c4d86c9
AC
22822015-05-12 Pierre-Marie de Rodat <derodat@adacore.com>
2283
2284 * exp_pakd.adb: Make clearer the comment in exp_pakd.adb about
2285 ___XP suffixes.
2286
22872015-05-12 Robert Dewar <dewar@adacore.com>
2288
2289 * sem_ch3.adb, sem_util.adb, sem_ch6.adb: Minor reformatting.
2290
22912015-05-12 Robert Dewar <dewar@adacore.com>
2292
2293 * exp_unst.adb (Visit_Node): Deal with subprogram and package stubs.
2294
22952015-05-12 Ed Schonberg <schonberg@adacore.com>
2296
2297 * exp_intr.adb (Expand_Dispatching_Constructor_Call): The
2298 tag to be retrieved for the generated call is the first entry
2299 in the dispatch table for the return type of the instantiated
2300 constructor.
2301
23022015-05-12 Bob Duff <duff@adacore.com>
2303
2304 * exp_ch7.adb, exp_ch7.ads, exp_intr.adb, exp_util.adb,
2305 exp_util.ads: Update comments.
2306
8d1fe980
AC
23072015-05-12 Ed Schonberg <schonberg@adacore.com>
2308
2309 * sem_ch3.adb (Add_Internal_Interface_Entities): Do no generate
2310 freeze nodes for these in ASIS mode, because they lead to
2311 elaoration order issues in gigi.
2312
23132015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
2314
2315 * sem_ch6.adb (Analyze_Expression_Function): Code
2316 cleanup. Use Copy_Subprogram_Spec to create a proper spec.
2317 (Analyze_Subprogram_Body_Helper): Code cleanup. Do not
2318 prepare a stand alone body for inlining in GNATprove mode
2319 when inside a generic. (Body_Has_Contract): Reimplemented.
2320 (Build_Subprogram_Declaration): New routine.
2321 * sem_ch10.adb (Analyze_Compilation_Unit): Capture global
2322 references within generic bodies by loading them.
2323 * sem_util.adb (Copy_Parameter_List): Code cleanup.
2324 (Copy_Subprogram_Spec): New routine.
2325 (Is_Contract_Annotation): New routine.
2326 * sem_util.ads (Copy_Subprogram_Spec): New routine.
2327 (Is_Contract_Annotation): New routine.
2328
23292015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
2330
2331 * sem_attr.adb (Resolve_Attribute): Do not analyze the generated
2332 body of an expression function when the prefix of attribute
2333 'Access is the body.
2334
731261c3
AC
23352015-05-12 Ed Schonberg <schonberg@adacore.com>
2336
2337 * sem_ch3.adb (Build_Derived_Enumeration_Type): The anonymous base
2338 created for a derived enumeration type is not a first subtype,
2339 even though it is defined through a full type declaration.
2340 * sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): Do not process
2341 aspects for the anonymous base type constructed for a derived
2342 scalar type, because they will be set when the first subtype
2343 is frozen.
2344 (Inherit_Aspects_At_Freeze_Point): Fix typos on handling of
2345 Default_Value and Default_Component_Value, that prevented the
2346 proper inheritance of these aspects.
2347
23482015-05-12 Gary Dismukes <dismukes@adacore.com>
2349
2350 * exp_ch6.adb, exp_unst.adb: Minor typo fixes.
2351
f8dae9bb
AC
23522015-05-12 Robert Dewar <dewar@adacore.com>
2353
2354 * sem_ch3.adb: Minor reformatting.
2355
23562015-05-12 Vincent Celier <celier@adacore.com>
2357
2358 * gnatcmd.adb: If we want to invoke gnatmake (gnatclean) with
2359 -P, then check if gprbuild (gprclean) is available; if it is,
2360 use gprbuild (gprclean) instead of gnatmake (gnatclean).
2361
23622015-05-12 Robert Dewar <dewar@adacore.com>
2363
2364 * debug.adb: Add flag -gnatd.3 to output diagnostic info from
2365 Exp_Unst.
2366 * einfo.ad, einfo.adb: Reorganize (and remove most of) flags used by
2367 Exp_Unst.
2368 * exp_ch6.adb (Unest_Bodies): Table for delayed calls to
2369 Unnest_Subprogram (Expand_N_Subprogram_Body): Add entry to table
2370 for later call instead of calling Unnest_Subprogram directly
2371 (Initialize): New procedure (Unnest_Subprograms): New procedure
2372 * exp_ch6.ads (Add_Extra_Actual_To_Call): Move into proper
2373 alpha order.
2374 (Initialize): New procedure.
2375 (Unnest_Subprograms): New procedure.
2376 * exp_unst.adb (Unnest_Subprogram): Major rewrite, moving
2377 all processing to this routine which is now called late
2378 after instantiating bodies. Fully handles the case of generic
2379 instantiations now.
2380 * exp_unst.ads: Major rewrite, moving all processing to
2381 Unnest_Subprogram.
2382 * frontend.adb (Frontend): Add call to Exp_Ch6.Initialize.
2383 (Frontend): Add call to Unnest_Subprograms.
2384 * sem_ch8.adb (Find_Direct_Name): Back to old calling sequence
2385 for Check_Nested_Access.
2386 * sem_util.adb (Build_Default_Subtype): Minor reformatting
2387 (Check_Nested_Access): Back to original VM-only form (we
2388 now do all the processing for Unnest_Subprogram at the time
2389 it is called.
2390 (Denotes_Same_Object): Minor reformatting
2391 (Note_Possible_Modification): Old calling sequence for
2392 Check_Nested_Access.
2393 * sem_util.ads (Check_Nested_Access): Back to original VM-only
2394 form (we now do all the processing for Unnest_Subprogram at the
2395 time it is called.
2396
73cc8f62
RD
23972015-05-12 Robert Dewar <dewar@adacore.com>
2398
2399 * sem_ch3.adb, freeze.adb, sem_ch6.adb: Minor reformatting.
2400
b741083a
ES
24012015-05-12 Ed Schonberg <schonberg@adacore.com>
2402
2403 * sem_ch3.adb (Analyze_Object_Declaration): New function
2404 Has_Delayed_Aspect, used to defer resolution of an aggregate
2405 expression when the object declaration carries aspects Address
2406 and/or Alignment.
2407 * freeze.adb (Freeze_Object_Declaration): New subsidiary procedure
2408 to Freeze_Entity. In addition to the previous processing steps
2409 at the freeze point of an object, this procedure also handles
2410 aggregates in object declarations, when the declaration carries
2411 delayed aspects that require that the initialization of the
2412 object be attached to its freeze actions.
2413
24142015-05-12 Ed Schonberg <schonberg@adacore.com>
2415
2416 * sem_ch6.adb (Analyze_Subprogram_Declaration): Following
2417 AI12-0147, null procedures and expression functions are allowed
2418 in protected bodies.
2419
a0a10853
AC
24202015-05-12 Tristan Gingold <gingold@adacore.com>
2421
2422 * i-cpoint.adb (Copy_Terminated_Array): Copy nothing if Length is 0.
2423
24242015-05-12 Ed Schonberg <schonberg@adacore.com>
2425
2426 * sem_ch3.adb (Complete_Private_Subtype): Propagate
2427 Has_Delayed_Aspects flag from private to full view, to ensure
2428 that predicate functions are constructed.
2429
24302015-05-12 Ed Schonberg <schonberg@adacore.com>
2431
2432 * sem_ch6.adb (Process_Formals): If a tagged formal is an
2433 incomplete class-wide type, the subprogram must have a delayed
2434 freeze even though the opertation is not a primitive of the
2435 type. THis ensures that the backend can recover the full view
2436 when elaborating the subprogram declaration.
2437
24382015-05-12 Ed Schonberg <schonberg@adacore.com>
2439
2440 * exp_util.adb (Get_Current_Value_Condition): Nothing to be
2441 done if an elsif part has been rewritten so that it is not part
2442 of an enclosing if_statement.
2443
e23e04db
AC
24442015-05-12 Robert Dewar <dewar@adacore.com>
2445
2446 * sem_type.adb, sem_ch10.adb, freeze.adb, sem_ch6.adb, exp_disp.adb:
2447 Minor reformatting.
2448
24492015-05-12 Bob Duff <duff@adacore.com>
2450
2451 * exp_attr.adb (Size): Remove unnecessary check for types with
2452 unknown discriminants. That was causing the compiler to build
2453 a function call _size(T), where T is a type, not an object.
2454
24552015-05-12 Ed Schonberg <schonberg@adacore.com>
2456
2457 * sem_ch4.adb (Extended_Primitive_Ops): Exclude overriding
2458 primitive operations of a type extension declared in the package
2459 body, to prevent duplicates in extended list.
2460
24612015-05-12 Ed Schonberg <schonberg@adacore.com>
2462
2463 * sem_ch3.adb (Analyze_Component_Declaration): If the component is
2464 an unconstrained synchronized type with discriminants, create a
2465 constrained default subtype for it, so that the enclosing record
2466 can be given the proper size.
2467 * sem_util.adb (Build_Default_Subtype): If the subtype is created
2468 for a record discriminant, do not analyze the declarztion at
2469 once because it is added to the freezing actions of the enclosing
2470 record type.
2471
47346923
AC
24722015-05-12 Robert Dewar <dewar@adacore.com>
2473
2474 * exp_prag.adb (Expand_N_Pragma): Rewrite ignored pragma as
2475 Null statements.
2476 * namet.ads (Boolean3): Document this flag used for Ignore_Pragma.
2477 * par-prag.adb (Prag): Implement Ignore_Pragma.
2478 * sem_prag.adb: Implement Ignore_Pragma.
2479 * snames.ads-tmpl: Add entries for pragma Ignore_Pragma.
2480
24812015-05-12 Javier Miranda <miranda@adacore.com>
2482
2483 * sem_ch10.adb (Build_Shadow_Entity): Link the class-wide shadow
2484 entity with its corresponding real entity.
2485 (Decorate_Type): Unconditionally build the class-wide shadow entity of
2486 tagged types.
2487 * einfo.ads, einfo.adb (Has_Non_Limited_View): New synthesized
2488 attribute.
2489 (Non_Limited_View): Moved from field 17 to field 19 be available
2490 in class-wide entities.
2491 * exp_attr.adb (Access_Cases): Code cleanup.
2492 * exp_disp.adb (Expand_Interface_Actuals): Ditto.
2493 * exp_util.adb (Non_Limited_Designated_Type): Ditto.
2494 * freeze.adb (Build_Renamed_Bdody): Ditto.
2495 * sem_aux.adb (Available_View): Ditto.
2496 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
2497 (Try_One_Prefix_Interpretation): Ditto.
2498 * sem_ch5.adb (Analyze_Assignment): Ditto.
2499 * sem_ch6.adb (Detect_And_Exchange): Ditto.
2500 * sem_ch8.adb (Find_Expanded_Name): Ditto.
2501 * sem_disp.adb (Check_Controlling_Type): Ditto.
2502 * sem_res.adb (Resolve_Type_Conversion): Ditto.
2503 (Full_Designated_Type): Ditto.
2504 * sem_type.adb (Covers): Ditto.
2505 * sem_util.adb: Fix typo in comment.
2506
84dad556
AC
25072015-05-12 Robert Dewar <dewar@adacore.com>
2508
2509 * exp_unst.adb (Get_Real_Subp): New subprogram.
2510 (Unnest_Subprogram): Use Get_Real_Subp.
2511 (Uplev_Refs_For_One_Subp): Skip if no ARECnU entity.
2512 (Uplev_Refs_For_One_Subp): Use actual subtype in unconstrained case.
2513
25142015-05-12 Robert Dewar <dewar@adacore.com>
2515
2516 * a-reatim.adb ("/"): Add explicit check for Time_Span_First / -1.
2517
25182015-05-12 Ed Schonberg <schonberg@adacore.com>
2519
2520 * sem_ch4.adb (Extended_Primitive_Ops): New subprogram,
2521 auxiliary to Try_Primitive_Operation to handle properly prefixed
2522 calls where the operation is not a primitive of the type, but
2523 is declared in the package body that is in the immediate scope
2524 of the type.
2525
ddbc55d8
AC
25262015-05-12 Robert Dewar <dewar@adacore.com>
2527
2528 * sem_util.adb (Is_Variable): Allow X'Deref(Y) as a variable.
2529
25302015-05-12 Ed Schonberg <schonberg@adacore.com>
2531
2532 * sem_ch8.adb (Find_Expanded_Name): Handle properly a fully
2533 qualified name for an instance of a generic grand-child unit in
2534 the body its parent.
2535
25362015-05-12 Robert Dewar <dewar@adacore.com>
2537
2538 * exp_unst.adb (Upref_Name): New subprogram.
2539 (Unnest_Subprogram): Use Upref_Name.
2540 (Unnest_Subprogram): Use new Deref attribute.
2541 * exp_unst.ads: Doc updates.
2542
25432015-05-12 Thomas Quinot <quinot@adacore.com>
2544
2545 * adaint.c: Enable Large File Support in adaint so that __gnat_readdir
2546 can access files on filesystems mounted from servers that use large
2547 NFS file handles.
2548
1f0e2688
EB
25492015-05-09 Eric Botcazou <ebotcazou@adacore.com>
2550
2551 * gcc-interface/utils.c (gnat_write_global_declarations): Use type_decl
2552 method instead of global_decl for TYPE_DECLs.
2553
46bf0b0a
JW
25542015-04-27 Jim Wilson <jim.wilson@linaro.org>
2555
2556 * gcc-interface/Makefile-lan.in (ada.mostlyclean): Remove gnatbind
2557 and gnat1.
2558
4fa6a2a0
EB
25592015-04-13 Eric Botcazou <ebotcazou@adacore.com>
2560
2561 * gnatvsn.ads (Library_Version): Bump to 6.
2562
febf07f5
IS
25632015-04-09 Iain Sandoe <iain@codesourcery.com>
2564
2565 * gcc-interface/Makefile.in (darwin, powerpc): Enable atomics.
2566
113c69ff
EB
25672015-04-08 Eric Botcazou <ebotcazou@adacore.com>
2568
2569 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Do not make
2570 a function returning an unconstrained type 'const' for the middle-end.
2571
2572 * gcc-interface/trans.c (Pragma_to_gnu) <case Pragma_Warning>: Use
2573 exact condition to detect Reason => "..." pattern.
2574
20f234a8
TV
25752015-03-31 Tom de Vries <tom@codesourcery.com>
2576
2577 PR ada/65490
2578 * terminals.c (child_setup_tty): Fix warning 'argument to sizeof in
2579 bzero call is the same expression as the destination'.
2580
06d75031
EB
25812015-03-26 Eric Botcazou <ebotcazou@adacore.com>
2582
2583 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Deref>: New case.
2584
eaed2a2c
AC
25852015-03-24 Gary Dismukes <dismukes@adacore.com>
2586
2587 * sem_ch3.adb: Minor typo fix (missing paren).
2588
25892015-03-24 Robert Dewar <dewar@adacore.com>
2590
2591 * sinfo.ads: Update comment.
2592
25932015-03-24 Robert Dewar <dewar@adacore.com>
2594
2595 * exp_attr.adb: Add entry for typ'Deref.
2596 * sem_attr.adb (Deref): New GNAT attribute.
2597 * sem_attr.ads: Add entry for new GNAT attribute Deref.
2598 * snames.ads-tmpl: Add entries for new attribute Deref.
2599
5f6061af
AC
26002015-03-24 Ed Schonberg <schonberg@adacore.com>
2601
2602 * sem_ch13.adb (Rep_Item_Too_Early): allow pragma Convention
2603 on generic type.
2604
26052015-03-24 Gary Dismukes <dismukes@adacore.com>
2606
2607 * inline.adb: Minor typo fix.
2608
a62638a3
AC
26092015-03-24 Arnaud Charlet <charlet@adacore.com>
2610
2611 * doc/gnat_ugn/building_executable_programs_with_gnat.rst,
2612 doc/gnat_ugn/gnat_utility_programs.rst
2613 doc/gnat_rm/implementation_defined_attributes.rst
2614 doc/gnat_rm/implementation_defined_pragmas.rst
2615 doc/gnat_rm/representation_clauses_and_pragmas.rst
2616 doc/gnat_rm/about_this_guide.rst
2617 doc/gnat_rm/implementation_of_ada_2012_features.rst: Doc improvements.
2618 * gnat_rm.texi, gnat_ugn.texi: Regenerate.
2619
46848948
JJ
26202015-03-23 Jakub Jelinek <jakub@redhat.com>
2621
2622 PR bootstrap/65522
2623 * adadecode.c (ada_demangle): Guard with IN_RTS instead of IN_GCC.
2624
1e039275
EB
26252015-03-20 Eric Botcazou <ebotcazou@adacore.com>
2626
2627 PR ada/65451
2628 * gcc-interface/utils.c (gnat_pushdecl): Tidy up and improve comment.
2629 Make sure to chain only main variants through TYPE_NEXT_PTR_TO.
2630
2631 * gcc-interface/trans.c (Attribute_to_gnu): Revert latest change.
2632
61e0b233
EB
26332015-03-16 Eric Botcazou <ebotcazou@adacore.com>
2634
2635 * gcc-interface/utils2.c (gnat_invariant_expr): Return null if the type
2636 of the expression ends up being composite.
2637
cb55aefb
EB
26382015-03-16 Eric Botcazou <ebotcazou@adacore.com>
2639
2640 * gcc-interface/decl.c (is_from_limited_with_of_main): New predicate.
2641 (gnat_to_gnu_entity) <E_Subprogram_Type>: Invoke it on return and
2642 parameter types to detect circularities in ASIS mode.
2643 * gcc-interface/trans.c (Attribute_to_gnu): Mention AI05-0151.
2644
c8dbf886
EB
26452015-03-16 Eric Botcazou <ebotcazou@adacore.com>
2646
2647 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Abstract_State>: Do not
2648 short-circuit the regular handling.
2649
57d08392
AC
26502015-03-13 Robert Dewar <dewar@adacore.com>
2651
2652 * exp_unst.adb (Note_Uplevel_Reference): Eliminate duplicate
2653 references.
2654 (Actual_Ref): New function.
2655 (AREC_String): Minor reformatting.
2656 (Unnest_Subprogram): Use Actual_Ref.
2657 * frontend.adb (Frontend): Turn off Unnest_Subprogram_Mode
2658 before call to Instantiate_Bodies.
2659
26602015-03-13 Ed Schonberg <schonberg@adacore.com>
2661
2662 * freeze.adb (Freeze_Profile): If the return type of a function
2663 being frozen is an untagged limited view and the function is
2664 abstract, mark the type as frozen because there is no later
2665 point at which the profile of the subprogram will be elaborated.
2666
26672015-03-13 Robert Dewar <dewar@adacore.com>
2668
2669 * einfo.adb, einfo.ads, atree.adb, atree.ads, atree.h: Add seventh
2670 component to entities. Add new fields Field36-41 and Node36-41.
2671
26722015-03-13 Claire Dross <dross@adacore.com>
2673
2674 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Rewrite after review.
2675
26762015-03-13 Robert Dewar <dewar@adacore.com>
2677
2678 * exp_util.adb (Is_Volatile_Reference): Compile time known
2679 value is never considered to be a volatile reference.
2680
26812015-03-13 Robert Dewar <dewar@adacore.com>
2682
2683 * sem_ch3.adb (Analyze_Object_Contract): Suppress "constant
2684 cannot be volatile" for internally generated object (such as
2685 FIRST and LAST constants).
2686
26872015-03-13 Ed Schonberg <schonberg@adacore.com>
2688
2689 * sem_ch12.adb (Validate_Access_Subprogram_Instance): If a
2690 convention is specified for the formal parameter, verify that
2691 the actual has the same convention.
2692 * sem_prag.adb (Set_Convention_From_Pragma): Allow convention
2693 pragma to be set on a generic formal type.
2694 * sem_util.adb (Set_Convention): Ignore within an instance,
2695 as it has already been verified in the generic unit.
2696
d3ef4bd6
AC
26972015-03-13 Claire Dross <dross@adacore.com>
2698
2699 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do not inline
2700 subprograms with unconstrained record parameters containing
2701 Itype declarations.
2702 * sinfo.ads Document GNATprove assumption that type should match
2703 in the AST.
2704 * sem_ch6.adb (Analyze_Subprogram_Body_Contract):
2705 Do not check for Refined_Depends and Refined_Globals contracts
2706 as they are optional.
2707
27082015-03-13 Ed Schonberg <schonberg@adacore.com>
2709
2710 * sem_ch12.adb (Instantiate_Type): For a floating-point type,
2711 capture dimension info if any, because the generated subtype
2712 declaration does not come from source and will not process dimensions.
2713 * sem_dim,adb (Analyze_Dimension_Extension_Or_Record_Aggregate):
2714 Do not analyze expressions with an initialization procedure
2715 because aggregates will have been checked at the point of record
2716 declaration.
2717
27182015-03-13 Robert Dewar <dewar@adacore.com>
2719
2720 * aspects.ads, aspects.adb: Add entries for aspect Unimplemented.
2721 * einfo.ads, einfo.adb (Is_Unimplemented): New flag.
2722 * sem_ch13.adb: Add dummy entry for aspect Unimplemented.
2723 * snames.ads-tmpl: Add entry for Name_Unimplemented.
2724
9fc0f672
AC
27252015-03-13 Gary Dismukes <dismukes@adacore.com>
2726
2727 * style.adb (Missing_Overriding): Apply the
2728 Comes_From_Source test to the Original_Node of the subprogram
2729 node, to handle the case of a null procedure declaration that
2730 has been rewritten as an empty procedure body.
2731
27322015-03-13 Robert Dewar <dewar@adacore.com>
2733
2734 * exp_util.ads: Minor fix to comment.
2735 * sem_ch3.adb (Constrain_Index): Correct pasto from previous
2736 change.
2737
28c7180f
RD
27382015-03-13 Robert Dewar <dewar@adacore.com>
2739
2740 * exp_util.ads, exp_util.adb (Force_Evaluation): Add Related_Id and
2741 Is_Low/High_Bound params.
2742 * sem_ch3.adb (Constrain_Index): Use new Force_Evaluation calling
2743 sequence to simplify generation of FIRST/LAST temps for bounds.
2744
b72dfb6e
OH
27452015-03-12 Olivier Hainque <hainque@adacore.com>
2746
2747 * gcc-interface/trans.c (Attribute_to_gnu) <Code_Address case>:
2748 On targets where a function symbol designates a function descriptor,
2749 fetch the function code address from the descriptor.
11ecee33 2750 (USE_RUNTIME_DESCRIPTORS): Provide a default definition.
b72dfb6e 2751
d50a26f2
AC
27522015-03-04 Robert Dewar <dewar@adacore.com>
2753
2754 * sem_warn.adb: Minor reformatting.
2755 * init.c: Minor tweaks.
2756
27572015-03-04 Dmitriy Anisimko <anisimko@adacore.com>
2758
2759 * a-coinho-shared.adb: Fix clear of already empty holder.
2760
27612015-03-04 Robert Dewar <dewar@adacore.com>
2762
2763 * exp_unst.adb (Check_Dynamic_Type): Ignore library level types.
2764 (Check_Uplevel_Reference_To_Type): Ignore call inside generic.
2765 (Note_Uplevel_Reference): Ignore call inside generic.
2766 (Note_Uplevel_Reference): Fix check for no entity field.
2767 (Unnest_Subprogram): Ignore call inside generic.
2768 (Find_Current_Subprogram): Use Defining_Entity, not Defining_Unit_Name.
2769 (Visit_Node): Ignore calls to Imported subprograms.
2770 (Visit_Node): Fix problem in finding subprogram body in some cases.
2771 (Add_Form_To_Spec): Use Defining_Entity, not Defining_Unit_Name.
2772
58009744
AC
27732015-03-04 Robert Dewar <dewar@adacore.com>
2774
2775 * einfo.adb (Is_ARECnF_Entity): Removed.
2776 (Last_Formal): Remove special handling of Is_ARECnF_Entity.
2777 (Next_Formal): Remove special handling of Is_ARECnF_Entity.
2778 (Next_Formal_With_Extras): Remove special handling of Is_ARECnF_Entity.
2779 (Number_Entries): Minor reformatting.
2780 * einfo.ads (Is_ARECnF_Entity): Removed.
2781 * exp_unst.adb (Unnest_Subprogram): Remove setting of
2782 Is_ARECnF_Entity.
2783 (Add_Extra_Formal): Use normal Extra_Formal circuit.
2784 * sprint.adb (Write_Param_Specs): Properly handle case where
2785 there are no source formals, but we have at least one Extra_Formal
2786 present.
2787
27882015-03-04 Ed Schonberg <schonberg@adacore.com>
2789
2790 * sem_aggr.adb (Resolve_Record_Aggregate,
2791 Add_Discriminant_Values): If the value is a reference to the
2792 current instance of an enclosing type, use its base type to check
2793 against prefix of attribute reference, because the target type
2794 may be otherwise constrained.
2795
85799cb9
AC
27962015-03-04 Robert Dewar <dewar@adacore.com>
2797
2798 * atree.h: Add entries for Flag287-Flag309.
2799 * einfo.adb: Add (unused) flags Flag287-Flag309.
2800
28012015-03-04 Ed Schonberg <schonberg@adacore.com>
2802
2803 * sem_util.adb (Collect_Interfaces, Collect): When gathering
2804 interfaces of ancestors, handle properly a subtype of a private
2805 extension.
2806
47a6f660
AC
28072015-03-04 Robert Dewar <dewar@adacore.com>
2808
2809 * einfo.adb (Is_ARECnF_Entity): New flag (ARECnF is an extra formal).
2810 (Next_Formal): Don't return ARECnF formal.
2811 (Last_Formal): Don't consider ARECnF formal.
2812 (Next_Formal_With_Extras): Do consider ARECnF formal.
2813 * einfo.ads (Is_ARECnF_Entity): New flag (ARECnF is an extra formal).
2814 * exp_unst.adb (Create_Entities): Set Is_ARECnF_Entity flag.
2815
28162015-03-04 Javier Miranda <miranda@adacore.com>
2817
2818 * exp_ch6.adb (Expand_Simple_Function_Return): When the returned
2819 object is a class-wide interface object and we generate the
2820 accessibility described in RM 6.5(8/3) then displace the pointer
2821 to the object to reference the base of the object (to get access
2822 to the TSD of the object).
2823
203876fc
AC
28242015-03-04 Hristian Kirtchev <kirtchev@adacore.com>
2825
2826 * sem_prag.adb (Analyze_Abstract_State): Use routine
2827 Malformed_State_Error to issue general errors.
2828 (Analyze_Pragma): Diagnose a syntax error related to a state
2829 declaration with a simple option.
2830 (Malformed_State_Error): New routine.
2831
28322015-03-04 Robert Dewar <dewar@adacore.com>
2833
2834 * a-strsup.adb (Super_Slice): Deal with super flat case.
2835 * einfo.ads: Minor reformatting.
2836 * s-imgdec.adb (Set_Decimal_Digits): Add comment about possibly
2837 redundant code.
2838
28392015-03-04 Claire Dross <dross@adacore.com>
2840
2841 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
2842 a-cforse.ads, a-cofove.ads: Use Default_Initial_Condition on formal
2843 containers.
2844
26f36fc9
AC
28452015-03-04 Ed Schonberg <schonberg@adacore.com>
2846
2847 * sem_warn.adb (Check_References): When checking for an unused
2848 in-out parameter of a class- wide type, use its type to determine
2849 whether it is private, in order to avoid a spurious warning when
2850 subprogram spec and body are in different units.
2851
28522015-03-04 Yannick Moy <moy@adacore.com>
2853
2854 * sem_attr.adb: Improve warning messages.
2855
488f9623
RD
28562015-03-04 Robert Dewar <dewar@adacore.com>
2857
2858 * exp_ch6.adb (Expand_N_Subprogram_Body): Avoid trying to unnest
2859 generic subprograms.
2860 * exp_unst.adb (Check_Dynamic_Type): Handle record types properly
2861 (Note_Uplevel_Reference): Ignore uplevel references to non-types
2862 (Get_Level): Consider only subprograms, not blocks.
2863 (Visit_Node): Set proper condition for generating ARECnF entity.
2864 Ignore indirect calls. Ignore calls to subprograms
2865 outside our nest.
2866 (Unnest_Subprogram): Minor changes in dealing with ARECnF entity.
2867 (Add_Form_To_Spec): Properly set Last_Entity field.
2868 (Unnest_Subprogram): Set current subprogram scope for analyze calls.
2869 Handle case of no uplevel refs in outer subprogram
2870 Don't mark uplevel entities as aliased.
2871 Don't deal with calls with no ARECnF requirement.
2872
28732015-03-04 Robert Dewar <dewar@adacore.com>
2874
2875 * s-valrea.adb (Scan_Real): Remove redundant tests from scaling loops.
2876 * s-imgdec.adb (Set_Decimal_Digits): Remove redundant Max
2877 operation in computing LZ.
2878 * sem_attr.adb: Minor typo fix
2879
b6a56408
AC
28802015-03-04 Robert Dewar <dewar@adacore.com>
2881
2882 * exp_ch7.adb: Minor reformatting.
2883 * exp_unst.adb (Build_Tables): Fix minor glitch for no separate
2884 spec case.
2885 * erroutc.adb (Delete_Msg): add missing decrement of info msg counter.
2886
28872015-03-04 Hristian Kirtchev <kirtchev@adacore.com>
2888
2889 * exp_ch6.adb (Build_Pragma_Check_Equivalent): Suppress
2890 references to formal parameters subject to pragma Unreferenced.
2891 (Suppress_Reference): New routine.
2892 * sem_attr.adb (Analyze_Attribute): Reimplement the analysis
2893 of attribute 'Old. Attributes 'Old and 'Result now share
2894 common processing.
2895 (Analyze_Old_Result_Attribute): New routine.
2896 (Check_Placement_In_Check): Removed.
2897 (Check_Placement_In_Contract_Cases): Removed.
2898 (Check_Placement_In_Test_Case): Removed.
2899 (Check_Use_In_Contract_Cases): Removed.
2900 (Check_Use_In_Test_Case): Removed.
2901 (In_Refined_Post): Removed.
2902 (Is_Within): Removed.
2903 * sem_warn.adb (Check_Low_Bound_Tested): Code cleanup.
2904 (Check_Low_Bound_Tested_For): New routine.
2905
29062015-03-04 Hristian Kirtchev <kirtchev@adacore.com>
2907
2908 * exp_ch3.adb (Expand_N_Object_Declaration):
2909 Generate a runtime check to test the expression of pragma
2910 Default_Initial_Condition when the object is default initialized.
2911
cd1a470a
AC
29122015-03-02 Robert Dewar <dewar@adacore.com>
2913
2914 * scng.adb (Scan): Ignore illegal character in relaxed
2915 semantics mode.
2916
29172015-03-02 Ed Schonberg <schonberg@adacore.com>
2918
2919 * sem_ch4.adb (Analyze_Set_Membership); Retain Overloaded flag
2920 on left operand, so it can be properly resolved with type of
2921 alternatives of right operand.
2922 * sem_res.adb (Resolve_Set_Membership): Handle properly an
2923 overloaded left-hand side when the alternatives on the right
2924 hand side are literals of some universal type. Use first
2925 non-overloaded alternative to find expected type.
2926
29272015-03-02 Ed Schonberg <schonberg@adacore.com>
2928
2929 * exp_ch7.adb (Make_Set_Finalize_Address_Call): Use underlying
2930 type to retrieve designated type, because the purported access
2931 type may be a partial (private) view, when it is declared in
2932 the private part of a nested package, and finalization actions
2933 are generated when completing compilation of enclosing unit.
2934
89f0276a
RD
29352015-03-02 Robert Dewar <dewar@adacore.com>
2936
2937 * back_end.adb (Call_Back_End): Remove previous patch,
2938 the back end now gets to see the result of -gnatd.1
2939 (Unnest_Subprogram_Mode) processing.
2940 * elists.ads, elists.adb (List_Length): New function.
2941 * exp_unst.ads, exp_unst.adb: Major changes, first complete version.
2942 * sem_util.adb (Check_Nested_Access): Handle formals in
2943 Unnest_Subprogram_Mode.
2944 (Adjust_Named_Associations): Minor reformatting.
2945 * sprint.adb (Sprint_Node_Actual): Fix failure to print aliased
2946 for parameters.
2947
3830827c
AC
29482015-03-02 Robert Dewar <dewar@adacore.com>
2949
2950 * atree.ads, atree.adb (Uint24): New function
2951 (Set_Uint24): New procedure.
2952 * atree.h (Uint24): New macro for field access.
2953 * back_end.adb (Call_Back_End): For now, don't call back end
2954 if unnesting subprogs.
2955 * einfo.adb (Activation_Record_Component): New field
2956 (Subps_Index): New field.
2957 * einfo.ads (Activation_Record_Component): New field
2958 (Subps_Index): New field Minor reordering of comments into alpha order.
2959 * exp_unst.ads, exp_unst.adb: Continued development.
2960
29612015-03-02 Gary Dismukes <dismukes@adacore.com>
2962
2963 * exp_disp.ads: Minor reformatting.
2964
29652015-03-02 Ed Schonberg <schonberg@adacore.com>
2966
2967 * sem_ch8.adb (Chain_Use_Clause): Do not chain use clause from
2968 ancestor to list of use clauses active in descendant unit if we
2969 are within the private part of an intervening parent, to prevent
2970 circularities in use clause list.
2971
024d33d8
JM
29722015-03-02 Javier Miranda <miranda@adacore.com>
2973
2974 * exp_ch9.adb (Build_Corresponding_Record): Propagate type
2975 invariants to the corresponding record type.
2976 * exp_disp.ad[sb] (Set_DT_Position_Value): New subprogram
2977 which sets the value of the DTC_Entity associated with a given
2978 primitive of a tagged type and propagates the value to the
2979 wrapped subprogram.
2980 (Set_DTC_Entity_Value): Propagate the DTC
2981 value to the wrapped entity.
2982 * sem_ch13.adb (Build_Invariant_Procedure): Append the code
2983 associated with invariants of progenitors.
2984 * sem_ch3.adb (Build_Derived_Record_Type): Inherit type invariants
2985 of parents and progenitors.
2986 (Process_Full_View): Check hidden inheritance of class-wide type
2987 invariants.
2988 * sem_ch7.adb (Analyze_Package_Specification): Do not generate
2989 the invariant procedure for interface types; build the invariant
2990 procedure for tagged types inheriting invariants from their
2991 progenitors.
2992 * sem_prag.adb (Pragma_Invariant) Allow invariants in interface
2993 types but do not build their invariant procedure since their
2994 invariants will be propagated to the invariant procedure of
2995 types covering the interface.
2996 * exp_ch6.adb, exp_disp.adb, sem_ch3.adb, sem_ch7.adb,
2997 sem_ch8.adb, sem_disp.adb: Replace all calls to Set_DT_Position
2998 by calls to Set_DT_Position_Value.
2999
7c76aa3f
HK
30002015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
3001
3002 * sem_attr.adb (Analyze_Attribute): Factor out heavily indented
3003 code in Denote_Same_Function. Do not analyze attribute 'Result
3004 when it is inside procedure _Postconditions. Remove a misplaced
3005 warning diagnostic. Code cleanup.
3006 (Denote_Same_Function): New routine.
3007 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Code
3008 cleanup. Warn on pre/postconditions on an inlined subprogram.
3009 (Analyze_Pragma, Refined_Post case): Warn on pre/postconditions on
3010 an inlined subprogram.
3011 (Analyze_Pre_Post_Condition_In_Decl_Part): Code cleanup. Warn on
3012 pre/post condition on an inlined subprogram.
3013 (Analyze_Test_Case_In_Decl_Part): Code cleanup. Warn on
3014 pre/postconditions on an inlined subprogram.
3015 (Check_Postcondition_Use_In_Inlined_Subprogram): New routine.
3016
aaeb3b3a
AC
30172015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
3018
3019 * sem_prag.adb (Ensure_Aggregate_Form):
3020 Ensure that the name denoted by the Chars of a pragma argument
3021 association has the proper Sloc when converted into an aggregate.
3022
30232015-03-02 Bob Duff <duff@adacore.com>
3024
3025 * sem_ch6.adb (Check_Private_Overriding): Capture
3026 Incomplete_Or_Partial_View in a constant. This is cleaner and
3027 more efficient.
3028
30292015-03-02 Gary Dismukes <dismukes@adacore.com>
3030
3031 * einfo.ads, exp_unst.ads: Minor reformatting.
3032
30332015-03-02 Ed Schonberg <schonberg@adacore.com>
3034
3035 * a-strsea.adb (Find_Token): Ensure that the range of iteration
3036 does not perform any improper character access. This prevents
3037 erroneous access in the unusual case of an empty string target
3038 and a From parameter less than Source'First.
3039
30402015-03-02 Robert Dewar <dewar@adacore.com>
3041
3042 * elists.adb (List_Length): Fix incorrect result.
3043
acf624f2
BD
30442015-03-02 Bob Duff <duff@adacore.com>
3045
3046 * sem_ch6.adb (Check_Private_Overriding): Refine the legality
3047 checks here. It used to check that the function is merely
3048 overriding SOMEthing. Now it checks that the function is
3049 overriding a corresponding public operation. This is a correction
3050 to the implementation of the rule in RM-3.9.3(10).
3051
5a271a7f
RD
30522015-03-02 Robert Dewar <dewar@adacore.com>
3053
3054 * debug.adb: Document new debug flag -gnatd.1.
3055 * einfo.ads, einfo.adb (Has_Nested_Subprogram): New flag.
3056 (Has_Uplevel_Reference): New flag (Is_Static_Type): New flag.
3057 (Uplevel_Reference_Noted):New flag (Uplevel_References): New field.
3058 * elists.ads elists.adb (List_Length): New function.
3059 * exp_ch6.adb (Expand_N_Subprogram_Body): Call Unnest_Subprogram
3060 when appropriate (Process_Preconditions): Minor code
3061 reorganization and reformatting
3062 * exp_unst.ads, exp_unst.adb: New files.
3063 * gnat1drv.adb (Adjust_Global_Switches): Set
3064 Unnest_Subprogram_Mode if -gnatd.1
3065 * namet.ads, namet.adb (Name_Find_Str): New version of Name_Find with
3066 string argument.
3067 * opt.ads (Unnest_Subprogram_Mode): New flag.
3068 * par-ch3.adb (P_Identifier_Declarations): Fixes to -gnatd.2 handling.
3069 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set
3070 Has_Nested_Subprogram flag.
3071 * sem_ch8.adb (Find_Direct_Name): New calling sequence for
3072 Check_Nested_Access.
3073 (Find_Selected_Component): Minor comment addition.
3074 * sem_util.adb (Check_Nested_Access): New version for use with Exp_Unst.
3075 (Note_Possible_Modification): New calling sequence for
3076 Check_Nested_Access.
3077 * sem_util.ads (Check_Nested_Access): New version for use with Exp_Unst.
3078 * gcc-interface/Make-lang.in (GNAT1_OBJS): Add exp_unst.o
3079
aef308d0
PMR
30802015-03-02 Pierre-Marie de Rodat <derodat@adacore.com>
3081
3082 * gcc-interface/utils.c (gnat_pushdecl): For non-artificial pointer
3083 types, preserve the original type and create copies just like the C
3084 front-end does. For artificial ones, do not define a name for
3085 the original type.
3086 (create_type_decl): When gnat_pushdecl made the input type the
3087 original type for the new declaration, do not define a stub
3088 declaration for it.
3089 * gcc-interface/utils2.c (build_binary_op): Accept two different
3090 pointer types when they point to the same type.
3091
184a23e9
HK
30922015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
3093
3094 * exp_util.adb (Possible_Bit_Aligned_Component): Do not process
3095 an unanalyzed node.
3096 * sem_util.adb (Kill_Current_Values): Do not invalidate and
3097 de-null a constant.
3098
e0c23ac7
AC
30992015-03-02 Robert Dewar <dewar@adacore.com>
3100
3101 * sem_ch3.adb, exp_attr.adb, checks.adb, exp_aggr.adb: Minor
3102 reformatting.
3103
31042015-03-02 Ed Schonberg <schonberg@adacore.com>
3105
3106 * sem_ch8.adb: extend use of Available_Subtype.
3107
31082015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
3109
3110 * sem_prag.adb (Duplication_Error): Remove the special handling
3111 of 'Class or _Class in the context of pre/postconditions.
3112 (Process_Class_Wide_Condition): Remove the special handling of
3113 'Class or _Class in the context of pre/postconditions.
3114 * sem_util.adb (Original_Aspect_Pragma_Name): Names Pre_Class
3115 and Post_Class no longer need to be converted to _Pre and _Post.
3116 * sem_util.ads (Original_Aspect_Pragma_Name): Update the comment
3117 on usage.
3118
31192015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
3120
3121 * exp_ch6.adb (Process_Preconditions): Modify the
3122 mechanism that find the first source declaration to correct exit
3123 the loop once it has been found.
3124
31252015-03-02 Gary Dismukes <dismukes@adacore.com>
3126
3127 * a-strsea.adb: Minor typo fix.
3128
31292015-03-02 Bob Duff <duff@adacore.com>
3130
3131 * einfo.ads: Minor comment fixes.
3132
e9999161
AC
31332015-03-02 Gary Dismukes <dismukes@adacore.com>
3134
3135 * einfo.adb, checks.adb: Minor reformatting and typo fixes.
3136
31372015-03-02 Ed Schonberg <schonberg@adacore.com>
3138
3139 * exp_aggr.adb (Get_Assoc_Expr): If the Default_Component_Value
3140 is defined for the array type, use it instead of a Default_Value
3141 specified for the component type itself.
3142
c9d70ab1
AC
31432015-03-02 Thomas Quinot <quinot@adacore.com>
3144
3145 * exp_attr.adb (Expand_N_Attribute_Reference, case Input): When
3146 expanding a 'Input attribute reference for a class-wide type,
3147 do not generate a separate object declaration for the controlling
3148 tag dummy object; instead, generate the expression inline in the
3149 dispatching call. Otherwise, the declaration (which involves a
3150 call to String'Input, returning a dynamically sized value on the
3151 secondary stack) will be expanded outside of proper secondary
3152 stack mark/release operations, and will thus cause a secondary
3153 stack leak.
3154
31552015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
3156
3157 * checks.adb (Add_Validity_Check): Change the names of all
3158 formal parameters to better illustrate their purpose. Update
3159 the subprogram documentation. Update all occurrences of the
3160 formal parameters. Generate a pre/postcondition pragma by
3161 calling Build_Pre_Post_Condition.
3162 (Build_PPC_Pragma): Removed.
3163 (Build_Pre_Post_Condition): New routine.
3164 * einfo.adb Node8 is no longer used as Postcondition_Proc. Node14
3165 is now used as Postconditions_Proc. Flag240 is now renamed to
3166 Has_Expanded_Contract. (First_Formal): The routine can now
3167 operate on generic subprograms.
3168 (First_Formal_With_Extras): The routine can now operate on generic
3169 subprograms.
3170 (Has_Expanded_Contract): New routine.
3171 (Has_Postconditions): Removed.
3172 (Postcondition_Proc): Removed.
3173 (Postconditions_Proc): New routine.
3174 (Set_Has_Expanded_Contract): New routine.
3175 (Set_Has_Postconditions): Removed.
3176 (Set_Postcondition_Proc): Removed.
3177 (Set_Postconditions_Proc): New routine.
3178 (Write_Entity_Flags): Remove the output of Has_Postconditions. Add
3179 the output of Has_Expanded_Contract.
3180 (Write_Field8_Name): Remove the output of Postcondition_Proc.
3181 (Write_Field14_Name): Add the output of Postconditions_Proc.
3182 * einfo.ads New attributes Has_Expanded_Contract and
3183 Postconditions_Proc along with occurrences in entities.
3184 Remove attributes Has_Postconditions and Postcondition_Proc
3185 along with occurrences in entities.
3186 (Has_Expanded_Contract): New routine along with pragma Inline.
3187 (Has_Postconditions): Removed along with pragma Inline.
3188 (Postcondition_Proc): Removed along with pragma Inline.
3189 (Postconditions_Proc): New routine along with pragma Inline.
3190 (Set_Has_Expanded_Contract): New routine along with pragma Inline.
3191 (Set_Has_Postconditions): Removed along with pragma Inline.
3192 (Set_Postcondition_Proc): Removed along with pragma Inline.
3193 (Set_Postconditions_Proc): New routine along with pragma Inline.
3194 * exp_ch6.adb (Add_Return): Code cleanup. Update the
3195 generation of the call to the _Postconditions routine of
3196 the procedure. (Expand_Non_Function_Return): Reformat the
3197 comment on usage. Code cleanup. Update the generation of
3198 the call to the _Postconditions routine of the procedure or
3199 entry [family].
3200 (Expand_Simple_Function_Return): Update the
3201 generation of the _Postconditions routine of the function.
3202 (Expand_Subprogram_Contract): Reimplemented.
3203 * exp_ch6.ads (Expand_Subprogram_Contract): Update the parameter
3204 profile along the comment on usage.
3205 * exp_ch9.adb (Build_PPC_Wrapper): Code cleanup.
3206 (Expand_N_Task_Type_Declaration): Generate pre/postconditions
3207 wrapper when the entry [family] has a contract with
3208 pre/postconditions.
3209 * exp_prag.adb (Expand_Attributes_In_Consequence): New routine.
3210 (Expand_Contract_Cases): This routine and its subsidiaries now
3211 analyze all generated code.
3212 (Expand_Old_In_Consequence): Removed.
3213 * sem_attr.adb Add with and use clause for Sem_Prag.
3214 (Analyze_Attribute): Reimplment the analysis of attribute 'Result.
3215 (Check_Use_In_Test_Case): Use routine Test_Case_Arg to obtain
3216 "Ensures".
3217 * sem_ch3.adb (Analyze_Declarations): Analyze the contract of
3218 a generic subprogram.
3219 (Analyze_Object_Declaration): Do not create a contract node.
3220 (Derive_Subprogram): Do not create a contract node.
3221 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Do
3222 not create a contract node.
3223 (Analyze_Completion_Contract): New routine.
3224 (Analyze_Function_Return): Alphabetize.
3225 (Analyze_Generic_Subprogram_Body): Alphabetize. Do not create a
3226 contract node. Do not copy pre/postconditions to the original
3227 generic template.
3228 (Analyze_Null_Procedure): Do not create a contract node.
3229 (Analyze_Subprogram_Body_Contract): Reimplemented.
3230 (Analyze_Subprogram_Body_Helper): Do not mark the enclosing scope
3231 as having postconditions. Do not create a contract node. Analyze
3232 the subprogram body contract of a body that acts as a compilation
3233 unit. Expand the subprogram contract after the declarations have
3234 been analyzed.
3235 (Analyze_Subprogram_Contract): Reimplemented.
3236 (Analyze_Subprogram_Specification): Do not create a contract node.
3237 (List_Inherited_Pre_Post_Aspects): Code cleanup.
3238 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Update the
3239 comment on usage.
3240 (Analyze_Subprogram_Contract): Update the
3241 parameter profile and the comment on usage.
3242 * sem_ch7.adb (Analyze_Package_Body_Helper): Do not create a
3243 contract node.
3244 (Analyze_Package_Declaration): Do not create a
3245 contract node.
3246 (Is_Subp_Or_Const_Ref): Ensure that the prefix has an entity.
3247 * sem_ch8.adb (Analyze_Subprogram_Renaming): Do not create a
3248 contract node.
3249 * sem_ch9.adb (Analyze_Entry_Declaration): Do not create a
3250 contract node.
3251 * sem_ch10.adb (Analyze_Compilation_Unit): Move local variables to
3252 their proper section and alphabetize them. Analyze the contract of
3253 a [generic] subprogram after all Pragmas_After have been analyzed.
3254 (Analyze_Subprogram_Body_Stub_Contract): Alphabetize.
3255 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Do not
3256 create a contract node.
3257 (Analyze_Generic_Subprogram_Declaration):
3258 Alphabetize local variables. Do not create a contract
3259 node. Do not generate aspects out of pragmas for ASIS.
3260 (Analyze_Subprogram_Instantiation): Instantiate
3261 the contract of the subprogram. Do not create a
3262 contract node. (Instantiate_Contract): New routine.
3263 (Instantiate_Subprogram_Body): Alphabetize local variables.
3264 (Save_Global_References_In_Aspects): New routine.
3265 (Save_References): Do not save the global references found within
3266 the aspects of a generic subprogram.
3267 * sem_ch12.ads (Save_Global_References_In_Aspects): New routine.
3268 * sem_ch13.adb (Analyze_Aspect_Specifications): Do not use
3269 Original_Node for establishing linkages.
3270 (Insert_Pragma): Insertion in a subprogram body takes precedence over
3271 the case where the subprogram body is also a compilation unit.
3272 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Use
3273 Get_Argument to obtain the proper expression. Install the generic
3274 formals when the related context is a generic subprogram.
3275 (Analyze_Depends_In_Decl_Part): Use Get_Argument to obtain
3276 the proper expression. Use Corresponding_Spec_Of to obtain
3277 the spec. Install the generic formal when the related context
3278 is a generic subprogram.
3279 (Analyze_Global_In_Decl_Part): Use Get_Argument to obtain the proper
3280 expression. Use Corresponding_Spec_Of to obtain the spec. Install the
3281 generic formal when the related context is a generic subprogram.
3282 (Analyze_Initial_Condition_In_Decl_Part): Use Get_Argument
3283 to obtain the proper expression. Remove the call to
3284 Check_SPARK_Aspect_For_ASIS as the analysis is now done
3285 automatically.
3286 (Analyze_Pragma): Update all occurrences
3287 to Original_Aspect_Name. Pragmas Contract_Cases, Depends,
3288 Extensions_Visible, Global, Postcondition, Precondition and
3289 Test_Case now carry generic templates when the related context
3290 is a generic subprogram. The same pragmas are no longer
3291 forcefully fully analyzed when the context is a subprogram
3292 that acts as a compilation unit. Pragmas Abstract_State,
3293 Initial_Condition, Initializes and Refined_State have been clean
3294 up. Pragmas Post, Post_Class, Postcondition, Pre, Pre_Class
3295 and Precondition now use the same routine for analysis. Pragma
3296 Refined_Post does not need to check the use of 'Result or
3297 the lack of a post-state in its expression. Reimplement the
3298 analysis of pragma Test_Case.
3299 (Analyze_Pre_Post_Condition): New routine.
3300 (Analyze_Pre_Post_Condition_In_Decl_Part):
3301 Reimplemented.
3302 (Analyze_Refined_Depends_In_Decl_Part): Use Get_Argument to obtain the
3303 proper expression.
3304 (Analyze_Refined_Global_In_Decl_Part): Use Get_Argument to obtain
3305 the proper expression.
3306 (Analyze_Test_Case_In_Decl_Part): Reimplemented.
3307 (Check_Pre_Post): Removed.
3308 (Check_Precondition_Postcondition): Removed.
3309 (Check_SPARK_Aspect_For_ASIS): Removed.
3310 (Check_Test_Case): Removed.
3311 (Collect_Subprogram_Inputs_Outputs): Use Get_Argument
3312 to obtain the proper expression. Use Corresponding_Spec_Of to
3313 find the proper spec.
3314 (Create_Generic_Template): New routine.
3315 (Duplication_Error): New routine.
3316 (Expression_Function_Error): New routine.
3317 (Find_Related_Subprogram_Or_Body): Moved to the spec
3318 of Sem_Prag. Emit precise error messages. Account for cases of
3319 rewritten expression functions, generic instantiations, handled
3320 sequence of statements and pragmas from aspects.
3321 (Get_Argument): New routine.
3322 (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Removed.
3323 (Preanalyze_CTC_Args): Removed.
3324 (Process_Class_Wide_Condition): New routine.
3325 * sem_prag.ads (Analyze_Test_Case_In_Decl_Part): Update
3326 the parameter profile along with the comment on usage.
3327 (Find_Related_Subprogram_Or_Body): Moved from the body of Sem_Prag.
3328 (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Removed.
3329 (Test_Case_Arg): New routine.
3330 * sem_util.adb Add with and use clauses for Sem_Ch6.
3331 (Add_Contract_Item): This routine now creates a contract
3332 node the first time an item is added. Remove the duplicate
3333 aspect/pragma checks.
3334 (Check_Result_And_Post_State): Reimplemented.
3335 (Corresponding_Spec_Of): New routine.
3336 (Get_Ensures_From_CTC_Pragma): Removed.
3337 (Get_Requires_From_CTC_Pragma): Removed.
3338 (Has_Significant_Contract): New routine.
3339 (Inherit_Subprogram_Contract): Inherit only if the source
3340 has a contract.
3341 (Install_Generic_Formals): New routine.
3342 (Original_Aspect_Name): Removed.
3343 (Original_Aspect_Pragma_Name): New routine.
3344 * sem_util.ads (Check_Result_And_Post_State): Reimplemented.
3345 (Corresponding_Spec_Of): New routine.
3346 (Get_Ensures_From_CTC_Pragma): Removed.
3347 (Get_Requires_From_CTC_Pragma): Removed.
3348 (Has_Significant_Contract): New routine.
3349 (Install_Generic_Formals): New routine.
3350 (Original_Aspect_Name): Removed.
3351 (Original_Aspect_Pragma_Name): New routine.
3352 * sem_warn.adb Add with and use clauses for Sem_Prag.
3353 (Within_Postcondition): Use Test_Case_Arg to extract "Ensures".
3354
95e00a3a
ES
33552015-03-02 Ed Schonberg <schonberg@adacore.com>
3356
3357 * sem_ch8.adb (Available_Subtype): Optimization in
3358 Find_Selected_Component: when safe, use existing subtype of
3359 array component, possibly discriminant-dependent, rather than
3360 creating new subtype declaration for it. In this fashion different
3361 occurrences of the component have the same subtype, rather than
3362 just equivalent ones. Simplifies value tracing in GNATProve.
3363
7dff0c74
AC
33642015-03-01 Arnaud Charlet <charlet@adacore.com>
3365
3366 PR ada/65259
3367
3368 * doc/gnat_ugn/gnat_project_manager.rst,
3369 doc/gnat_ugn/platform_specific_information.rst: Remove reference to
3370 image, too troublesome with texi format.
3371 * gnat_ugn.texi: Regenerate.
3372
56a9f6bc
TS
33732015-02-24 Thomas Schwinge <thomas@codesourcery.com>
3374
3375 PR libgomp/64625
18c2bed3
EB
3376 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8): Remove.
3377 (DEF_FUNCTION_TYPE_VAR_12): Likewise.
56a9f6bc
TS
3378 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
3379
5aaa7e4a
TS
33802015-02-23 Thomas Schwinge <thomas@codesourcery.com>
3381
ce551f12
EB
3382 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8): Fix number of
3383 arguments parameter.
3384 (DEF_FUNCTION_TYPE_VAR_12): Likewise.
5aaa7e4a 3385
201f1cce
AC
33862015-02-22 Arnaud Charlet <charlet@adacore.com>
3387
3388 * doc/Makefile: postprocess texinfo files to update @dircategory
3389 and update texi files under gcc/ada.
3390 * gnat_ugn.texi, gnat_rm.texi: Regenerated.
3391
9597aa34
AC
33922015-02-22 Arnaud Charlet <charlet@adacore.com>
3393
3394 * doc/gnat_ugn/project-manager-figure.png,
3395 doc/gnat_ugn/rtlibrary-structure.png: New.
3396
6d38a295
TV
33972015-02-22 Tom de Vries <tom@codesourcery.com>
3398
3399 PR ada/65100
3400 * gnat-style.texi (@subsection Loop Statements): Replace @noindent by
3401 @item, and fix warning '@itemize has text but no @item'.
3402
ab260a3e
ES
34032015-02-20 Ed Schonberg <schonberg@adacore.com>
3404
3405 * sem_prag.adb (Analyze_Pragma, case Obsolescent): Pragma
3406 legally applies to an abstract subprogram declaration.
3407 * freeze.adb: Minor comment addition.
3408
2290a0fe
AC
34092015-02-20 Robert Dewar <dewar@adacore.com>
3410
3411 * errout.ads: Document replacement of Name_uPre/Post/Type_Invariant.
3412 * erroutc.adb (Set_Msg_Str): Replace _xxx.
3413 (Pre/Post/Type_Invariant) by xxx'Class.
3414 * erroutc.ads (Set_Msg_Str): Replace _xxx.
3415 (Pre/Post/Type_Invariant) by xxx'Class.
3416 * sem_prag.adb (Fix_Error): Remove special casing of
3417 Name_uType_Invariant.
3418 (Analyze_Pre_Post_Condition_In_Decl_Part): Remove special casing of
3419 Name_uPre and Name_uPost in aspect case (done in Errout now).
3420
34212015-02-20 Robert Dewar <dewar@adacore.com>
3422
3423 * g-alveop.adb: Minor style fixes.
3424
34252015-02-20 Robert Dewar <dewar@adacore.com>
3426
3427 * freeze.adb (Warn_Overlay): Guard against blow up with address
3428 clause.
3429
34302015-02-20 Bob Duff <duff@adacore.com>
3431
3432 * exp_attr.adb (May_Be_External_Call): Remove this. There is no need
3433 for the compiler to guess whether the call is internal or external --
3434 it is always external.
3435 (Expand_Access_To_Protected_Op): For P'Access, where P
3436 is a protected subprogram, always create a pointer to the
3437 External_Subprogram.
3438
67c0e662
RD
34392015-02-20 Robert Dewar <dewar@adacore.com>
3440
3441 * a-dispat.adb, a-stcoed.ads: Minor reformatting.
3442
34432015-02-20 Robert Dewar <dewar@adacore.com>
3444
3445 * sem_ch13.adb (Build_Discrete_Static_Predicate): Allow static
3446 predicate for non-static subtype.
3447 (Build_Predicate_Functions): Do not assume subtype associated with a
3448 static predicate must be static.
3449
34502015-02-20 Robert Dewar <dewar@adacore.com>
3451
3452 * errout.adb (Set_Msg_Node): Better handling of internal names
3453 (Set_Msg_Node): Kill message when we cannot eliminate internal name.
3454 * errout.ads: Document additional case of message deletion.
3455 * namet.adb (Is_Internal_Name): Refined to consider wide
3456 strings in brackets notation and character literals not to be
3457 internal names.
3458 * sem_ch8.adb (Find_Selected_Component): Give additional error
3459 when selector name is a subprogram whose first parameter has
3460 the same type as the prefix, but that type is untagged.
3461
4060ebd4
RD
34622015-02-20 Robert Dewar <dewar@adacore.com>
3463
3464 * g-allein.ads, g-alveop.adb, g-alveop.ads, opt.ads: Minor reformatting
3465
9ec98e13
AC
34662015-02-20 Tristan Gingold <gingold@adacore.com>
3467
3468 * opt.ads (GNAT_Mode_Config): New variable.
3469 * opt.adb (Set_Opt_Config_Switches): Consider GNAT_Mode_Config
3470 to set Assertions_Enabled.
3471 * switch-c.adb (Scan_Front_End_Switches): Set GNAT_Mode_Config
3472 for -gnatg.
3473
34742015-02-20 Robert Dewar <dewar@adacore.com>
3475
3476 * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Add an additional
3477 comment regarding the handling of unterminated fixed-point
3478 constants.
3479 * s-valuns.ads (Scan_Raw_Unsigned): Add comments
3480 corresponding to those previously added for
3481 System.Val_LLU.Scan_Raw_Long_Long_Unsigned.
3482
9b9e7e8a
OH
34832015-02-20 Olivier Hainque <hainque@adacore.com>
3484
cd8e18e7 3485 * g-allein.ads, g-alveop.ads, g-alveop.adb: Code clean ups.
739b41eb 3486
1098e722
AC
34872015-02-20 Robert Dewar <dewar@adacore.com>
3488
3489 * sem_prag.adb: Minor comment clarification.
3490
34912015-02-20 Olivier Hainque <hainque@adacore.com>
3492
3493 * g-allein.ads (vec_ctf, vec_vcsfx, vec_vcfux): Remove.
3494 * g-alleve.ads, g-alleva.adb (vcfux): Likewise.
3495 * g-alveop.ads (vec_vcfsx, vec_vcfux): Just rename the ll versions.
3496 (vec_ctf): Now renamings as well.
3497
b534f49e
AC
34982015-02-20 Robert Dewar <dewar@adacore.com>
3499
3500 * switch-c.adb, bindgen.adb: Minor reformatting.
3501
35022015-02-20 Ed Schonberg <schonberg@adacore.com>
3503
3504 * sem_prag.adb (Analyze_Pragma, case Type_Invariant):
3505 Invariant'class is allowed on an abstract type.
3506
35072015-02-20 Ed Schonberg <schonberg@adacore.com>
3508
3509 * sem_ch3.adb (Access_Definition): If the access definition is
3510 for a protected component and defines an access to protected
3511 subprogram, do not create an itype reference for it because a
3512 full type declaration will be built in order to generate the
3513 proper equivalent type.
3514 (Analyze_Subtype_Declaration): Add information of incomplete
3515 subtypes, for Ada 2012 extended uses of incomplete types.
3516
e4dc3327
AC
35172015-02-20 Gary Dismukes <dismukes@adacore.com>
3518
3519 * sem_res.adb: Minor reformatting.
3520
35212015-02-20 Vincent Celier <celier@adacore.com>
3522
3523 * switch-c.adb (Scan_Front_End_Switches): When comparing runtime
3524 path name for several switches --RTS, use the normalized path
3525 names.
3526
35272015-02-20 Vincent Celier <celier@adacore.com>
3528
3529 * bindgen.adb: Minor reformatting and code reorganization.
3530
35312015-02-20 Jose Ruiz <ruiz@adacore.com>
3532
3533 * a-stcoed.ads: Add spec for this package (Unimplemented_Unit).
3534 * impunit.adb (Non_Imp_File_Names_12): Mark unit a-stcoed.ads as
3535 defined by Ada 2012.
3536
5ae7c3cf
AC
35372015-02-20 Arnaud Charlet <charlet@adacore.com>
3538
3539 * sysdep.c, expect.c, s-oscons-tmplt.c, gsocket.h, adaint.c: Remove
3540 obsolete references to RTX, nucleus, VMS.
3541
35422015-02-20 Ed Schonberg <schonberg@adacore.com>
3543
3544 * sem_prag.adb (Fix_Error): For an illegal Type_Invariant'Class
3545 aspect, use name that mentions Class explicitly, rather than
3546 compiler-internal name.
3547
35482015-02-20 Robert Dewar <dewar@adacore.com>
3549
3550 * debug.adb: Add documentation for -gnatd.2 (allow statements
3551 in decl sequences).
3552 * par-ch3.adb (P_Identifier_Declarations): Handle
3553 statement appearing where declaration expected more cleanly.
3554 (Statement_When_Declaration_Expected): Implement debug flag
3555 -gnatd.2.
3556
35572015-02-20 Jose Ruiz <ruiz@adacore.com>
3558
3559 * a-dinopr.ads: Add spec for this package (Unimplemented_Unit).
3560 * a-dispat.ads (Yield): Include procedure added in Ada 2012.
3561 * a-dispat.adb (Yield): Implement procedure added in Ada 2012.
3562 * impunit.adb (Non_Imp_File_Names_05): Mark unit a-dinopr.ads as
3563 defined by Ada 2005.
3564 * snames.ads-tmpl (Name_Non_Preemptive_FIFO_Within_Priorities):
3565 This is the correct name for the dispatching policy (FIFO was
3566 missing).
3567
35682015-02-20 Javier Miranda <miranda@adacore.com>
3569
3570 * sem_res.adb (Resolve_Type_Conversion): If the type of the
3571 operand is the limited-view of a class-wide type then recover
3572 the class-wide type of the non-limited view.
3573
5865a63d
AC
35742015-02-20 Arnaud Charlet <charlet@adacore.com>
3575
3576 * gcc-interface/Makefile.in: Remove references to nucleus.
3577 * gcc-interface/decl.c (gnat_to_gnu_entity, case E_Procedure): Set
3578 extern_flag to true for Inline_Always subprograms with
3579 Intrinsic convention.
3580
07aff4e3
AC
35812015-02-20 Yannick Moy <moy@adacore.com>
3582
3583 * sem_prag.ads: Minor typo in comment.
3584
35852015-02-20 Pascal Obry <obry@adacore.com>
3586
3587 * s-osprim-mingw.adb: Fix Get_Base_Time parameter mode.
3588
35892015-02-20 Vincent Celier <celier@adacore.com>
3590
3591 * makeutl.adb (Get_Directories.Add_Dir): Add a directory only
3592 if it exists.
3593
35942015-02-20 Robert Dewar <dewar@adacore.com>
3595
3596 * sem_eval.ads: Minor reformatting.
3597
35982015-02-20 Eric Botcazou <ebotcazou@adacore.com>
3599
3600 * freeze.adb (Size_Known): Do not set the packed size for
3601 independent type or component.
3602 (Freeze_Array_Type): Check for Independent[_Components] with packing
3603 or explicit component size clause.
3604 * gnat1drv.adb (Post_Compilation_Validation_Checks): Do the validation
3605 of independence pragmas only for non-GCC back-ends.
3606 * sem_ch13.adb (Initialize): Likewise for the initialization.
3607 * sem_prag.adb (Record_Independence_Check): New procedure to record an
3608 independence check in the table.
3609 (Analyze_Pragma): Use it throughout instead of doing it manually.
3610 * gcc-interface/decl.c (gnat_to_gnu_field): Add support for
3611 independent type or component.
3612
36132015-02-20 Thomas Quinot <quinot@adacore.com>
3614
3615 * adaint.c (__gnat_readdir): For Solaris, use 64 bit variants of
3616 struct direct and readdir. This is required for NFS filesystems
3617 mounted from servers that use 64-bit cookies.
3618
36192015-02-20 Ed Schonberg <schonberg@adacore.com>
3620
3621 * sem_ch12.adb (Analyze_Subprogram_Instantiaion): New subprogram
3622 Build_Subprogram_Renaming, to create renaming of subprogram
3623 instance in the the declaration of the wrapper package rather
3624 than in its body, so that it is available for analysis of aspects
3625 propagated from generic to instantiation.
3626 (Check_Mismatch): An actual for a formal package that is an
3627 incomplete type matches a formal type that is incomplete.
3628 (Instantiate_Package_Body): Move code that builds subprogram
3629 renaming to Analyze_Subprogram_Instantiation.
3630 (Instantiate_Type): The generated subtype is a limited view if
3631 the actual is a limited view.
3632 (Load_Parent_Of_Generic): Retrieve instance declaration from
3633 its new position within wrapper package.
3634
36352015-02-20 Arnaud Charlet <charlet@adacore.com>
3636
3637 * s-parame-vxworks.adb, s-os_lib.ads: Update comments.
3638
36392015-02-20 Robert Dewar <dewar@adacore.com>
3640
3641 * s-osinte-vxworks.ads (To_Timespec): Add comment about the
3642 issue of negative arguments.
3643
6b66981a
AC
36442015-02-20 Eric Botcazou <ebotcazou@adacore.com>
3645
3646 * gnat1drv.adb: Minor consistency fix.
3647
36482015-02-20 Pascal Obry <obry@adacore.com>
3649
3650 * s-osprim-mingw.adb (Get_Base_Time): Properly release lock in all
3651 paths.
3652
09edc2c2
AC
36532015-02-20 Eric Botcazou <ebotcazou@adacore.com>
3654
3655 * inline.adb (Expand_Inlined_Call): Skip again calls to subprogram
3656 renamings.
3657 * exp_ch6.adb (Expand_Call): Use back-end inlining
3658 instead of expansion for simple subprogram renamings.
3659
36602015-02-20 Robert Dewar <dewar@adacore.com>
3661
3662 * exp_util.adb: Minor reformatting.
3663
22efcab7
AC
36642015-02-20 Vincent Celier <celier@adacore.com>
3665
3666 * switch-c.adb (Scan_Front_End_Switches): Do not fail when --RTS=
3667 is specified several times with different values that indicates
3668 the same runtime directory.
3669
36702015-02-20 Ed Schonberg <schonberg@adacore.com>
3671
3672 * sem_attr.adb (Check_Not_Incomplete_Type): Clean up code to
3673 handle properly illegal uses of attributes on prefixes on an
3674 incomplete type, both when the type of the prefix is locally
3675 incomplete, and when it is a limited view of a type whose
3676 non-limited view is not available.
3677 (Analyze_Attribute): Add calls to Check_Not_Incomplete_Type for
3678 'Address and others.
3679
36802015-02-20 Eric Botcazou <ebotcazou@adacore.com>
3681
3682 * exp_ch6.adb: Fix minor typo in comment.
3683
17ce1f52
AC
36842015-02-20 Eric Botcazou <ebotcazou@adacore.com>
3685
3686 * sinfo.ads: Add comment.
3687
36882015-02-20 Olivier Hainque <hainque@adacore.com>
3689
3690 * opt.ads: Replace Opt.Suppress_All_Inlining by two separate
3691 flags controlling the actual FE inlining out of pragma Inline
3692 and pragma Inline_Always.
3693 * adabkend.adb (Scan_Compiler_Arguments): Set both flags to True
3694 on -fno-inline, which disables all inlining in compilers with
3695 an Ada back-end and without back-end inlining support.
3696 * back_end.adb (Scan_Back_End_Switches): Set the Inline related
3697 flag to True on -fno-inline and leave Inline_Always alone for
3698 gcc back-ends.
3699 * back_end.ads (Scan_Compiler_Arguments): Adjust spec wrt the
3700 names of the Opt flags it sets.
3701 * gnat1drv.adb (Adjust_Global_Switches): Remove test on
3702 Opt.Suppress_All_Inlining in the Back_End_Inlining computation.
3703 * sem_prag.adb (Make_Inline): Remove early return conditioned
3704 on Opt.Suppress_All_Inlining.
3705 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Use the flags to
3706 disable the calls to Build_Body_To_Inline otherwise triggered
3707 by pragma Inline or Inline_Always. This will prevent actual
3708 front-end inlining of the subprogram on calls.
3709
cf27c5a2
EB
37102015-02-20 Eric Botcazou <ebotcazou@adacore.com>
3711
3712 * exp_ch3.adb (Default_Initialize_Object): Call Add_Inlined_Body on the
3713 Abort_Undefer_Direct function.
3714 * exp_ch5.adb (Expand_N_Assignment_Statement): Likewise.
3715 * exp_intr.adb (Expand_Unc_Deallocation): Likewise.
3716 * exp_prag.adb (Expand_Pragma_Abort_Defer): Likewise.
3717 * exp_ch4.adb (Expand_N_Selected_Component): Adjust call to
3718 Add_Inlined_Body.
3719 * exp_ch6.adb (Expand_Call): Adjust calls to Add_Inlined_Body.
3720 Remove call to Register_Backend_Call and move code resetting
3721 Needs_Debug_Info on inlined subprograms to...
3722 * inline.ads (Add_Inlined_Body): Add N parameter.
3723 (Register_Backend_Call): Delete.
3724 * inline.adb (Add_Inlined_Body): ...here and simplify.
3725 Register the call with Backend_Calls directly.
3726 (Register_Backend_Call): Delete.
3727 * s-stalib.ads (Abort_Undefer_Direct): Restore pragma Inline.
3728
2ac4a591
AC
37292015-02-20 Eric Botcazou <ebotcazou@adacore.com>
3730
3731 * s-stalib.ads: Fix typo.
3732
37332015-02-20 Ed Schonberg <schonberg@adacore.com>
3734
3735 * exp_ch3.adb (Default_Initialize_Object): If the object has a
3736 delayed freeze, the actions associated with default initialization
3737 must be part of the freeze actions, rather that being inserted
3738 directly after the object declaration.
3739
37402015-02-20 Robert Dewar <dewar@adacore.com>
3741
3742 * lib-load.adb: Minor comment update.
3743
37442015-02-20 Vincent Celier <celier@adacore.com>
3745
3746 * prj-proc.adb (Process_Case_Construction): When there are
3747 incomplete withed projects and the case variable is unknown,
3748 skip the case construction.
3749
37502015-02-20 Ed Schonberg <schonberg@adacore.com>
3751
3752 * exp_ch6.adb (Expand_Actuals): Add caller-side invariant checks
3753 when an actual is a view conversion, either because the call is
3754 to an inherited operation, or because the actual is an explicit
3755 type conversion to an ancestor type. Fixes ACATS 4.0D: C732001
3756
dacc3457
AC
37572015-02-20 Robert Dewar <dewar@adacore.com>
3758
3759 * einfo.ads: Minor comment updates Fix missing pragma Inline
3760 for Set_Partial_View_Has_Unknown_Discr.
3761 * einfo.adb (Write_Entity_Flags): Add missing entry for
3762 Partial_View_Has_Unknown_Discr.
3763 * sem_ch3.adb: Minor reformatting.
3764
37652015-02-20 Vincent Celier <celier@adacore.com>
3766
3767 * opt.ads: Minor cleanup: remove mention of gprmake.
3768 * s-stalib.ads (Abort_Undefer_Direct): Do not inline.
3769 * s-tataat.adb: Do not call System.Tasking.Self but directly
3770 System.Task_Primitives.Operations.Self.
3771
37722015-02-20 Arnaud Charlet <charlet@adacore.com>
3773
3774 * gnat_rm.texi, gnat_ugn.texi: Now automatically generated from
3775 sphinx in the doc directory.
3776 * doc: New directory containing sphinx versions of gnat_rm and gnat_ugn
3777
07a64c02
AC
37782015-02-20 Robert Dewar <dewar@adacore.com>
3779
3780 * sem_res.adb: Minor reformatting.
3781 * exp_ch9.adb (Build_Protected_Spec): Copy Aliased setting when
3782 building spec.
3783 * sem_ch13.adb (Analyze_Aspect_Specifications): Exclude Boolean
3784 aspects from circuitry setting delay required to false if the
3785 argument is an integer literal.
3786
37872015-02-20 Ed Schonberg <schonberg@adacore.com>
3788
3789 * einfo.ads. einfo.adb (Partial_View_Has_Unknown_Discr): New flag
3790 on type entities, to enforce AI12-0133: default initialization
3791 of types whose partial view has unknown discriminants does not
3792 get an invariant check, because clients of the unit can never
3793 declare objects of such types.
3794 * sem_ch3.adb (Find_Type_Name); Set new flag
3795 Partial_View_Has_Unknown_Discr when needed.
3796 * exp_ch3.adb (Expand_N_Object_Declaration): Use flag to suppress
3797 generation of invariant call on default-initialized object.
3798
57f4f0d5
EB
37992015-02-08 Eric Botcazou <ebotcazou@adacore.com>
3800
3801 * gcc-interface/decl.c (gnat_to_gnu_param): Do not strip the padding
3802 if the parameter either is passed by reference or if the alignment
3803 would be lowered.
3804
86ceee85
EB
38052015-02-08 Eric Botcazou <ebotcazou@adacore.com>
3806
3807 * gcc-interface/decl.c (is_cplusplus_method): Use Is_Primitive flag to
3808 detect primitive operations of tagged and untagged types.
3809
9d11273c
EB
38102015-02-08 Eric Botcazou <ebotcazou@adacore.com>
3811
3812 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not bother about alias
3813 sets in presence of derivation for subprogram types.
3814
e2d13a4a
EB
38152015-02-08 Eric Botcazou <ebotcazou@adacore.com>
3816
3817 * gcc-interface/utils.c (begin_subprog_body): Assert that the body is
3818 present in the same context as the declaration.
3819
c0c91386
JJ
38202015-02-07 Jakub Jelinek <jakub@redhat.com>
3821
3822 PR middle-end/64340
3823 * gcc-interface/trans.c (gigi): Recreate optimization_default_node
3824 and optimization_current_node after tweaking global_options.
3825
c7d22ee7
AC
38262015-02-05 Robert Dewar <dewar@adacore.com>
3827
3828 * prj-proc.adb, sem_aux.adb, exp_ch9.adb, errout.adb, prj-dect.adb,
3829 prj-nmsc.adb: Minor reformatting.
3830
38312015-02-05 Ed Schonberg <schonberg@adacore.com>
3832
3833 * sem_type.adb (Covers): In ASIS_Mode the Corresponding_Record
3834 of a protected type may not be available, so to check conformance
3835 with an interface type, examine the interface list in the type
3836 declaration directly.
3837 (Write_Overloads): Improve information for indirect calls,
3838 for debugger use.
3839
38402015-02-05 Ed Schonberg <schonberg@adacore.com>
3841
3842 * exp_ch3.adb (Make_Tag_Assignment): Do not perform this
3843 expansion activity in ASIS mode.
3844
273123a4
AC
38452015-02-05 Javier Miranda <miranda@adacore.com>
3846
3847 * errout.adb (Error_Msg_PT): Add missing error.
3848 * sem_ch6.adb (Check_Synchronized_Overriding): Check the missing
3849 RM rule. Code cleanup.
3850 * exp_ch9.adb (Build_Wrapper_Spec): Propagate "constant" in
3851 anonymous access types. Found working on the tests. Code cleanup.
3852
38532015-02-05 Vincent Celier <celier@adacore.com>
3854
3855 * prj-dect.adb (Parse_Attribute_Declaration): Continue scanning
3856 when there are incomplete withs.
3857 * prj-nmsc.adb (Process_Naming): Do not try to get the value
3858 of an element when it is nil.
3859 (Check_Naming): Do not check a nil suffix for illegality
3860 * prj-proc.adb (Expression): Do not process an empty term.
3861 * prj-strt.adb (Attribute_Reference): If attribute cannot be
3862 found, parse a possible index to avoid cascading errors.
3863
38642015-02-05 Ed Schonberg <schonberg@adacore.com>
3865
3866 * sem_aux.adb (Is_Derived_Type): A subprogram_type generated
3867 for an access_to_subprogram declaration is not a derived type.
3868
ee7c8ffd
RD
38692015-02-05 Robert Dewar <dewar@adacore.com>
3870
3871 * errout.adb (Error_Msg_Internal): For non-serious error set
3872 Fatal_Error to Ignored.
3873 * lib-load.adb (Load_Unit): Minor comment updates.
3874 * sem_ch10.adb (Analyze_With_Clause): Propagate Fatal_Error
3875 setting from with'ed unit to with'ing unit.
3876 * sem_prag.adb (Analyze_Pragma, case Warnings): Document handling
3877 of ambiguity.
3878
b21d8148
YM
38792015-02-05 Yannick Moy <moy@adacore.com>
3880
3881 * sem_prag.adb, par-prag.adb: Minor code clean up.
3882
6d13d38e
YM
38832015-02-05 Yannick Moy <moy@adacore.com>
3884
3885 * par-prag.adb (Pragma_Warnings): Update for extended form
3886 of pragma Warnings. The "one" argument case may now have 2 or
3887 3 arguments.
3888 * sem_prag.adb (Analyze_Pragma/Pragma_Warnings): Update for
3889 extended form of pragma Warnings. Pragma with tool name is either
3890 rewritten as null or as an equivalent form without tool name,
3891 before reanalysis.
3892 * snames.ads-tmpl (Name_Gnatprove): New name.
3893
ef2c20e7
AC
38942015-02-05 Robert Dewar <dewar@adacore.com>
3895
3896 * sem_ch13.adb (Add_Invariants): Don't assume invariant is
3897 standard Boolean.
3898 * sem_prag.adb (Analyze_Pragma, case Check): Don't assume
3899 condition is standard Boolean, it can be non-standard derived
3900 Boolean.
3901
39022015-02-05 Robert Dewar <dewar@adacore.com>
3903
3904 * checks.adb (Enable_Range_Check): Disconnect attempted
3905 optimization for the case of range check for subscript of
3906 unconstrained array.
3907
39082015-02-05 Robert Dewar <dewar@adacore.com>
3909
3910 * par-ch13.adb (With_Present): New function
3911 (Aspect_Specifications_Present): Handle WHEN in place of WITH
3912 (Get_Aspect_Specifications): Comment update.
3913 * par.adb: Comment updates.
3914
39152015-02-05 Robert Dewar <dewar@adacore.com>
3916
3917 * errout.adb (Handle_Serious_Error): New setting of Fatal_Error.
3918 * frontend.adb (Frontend): New setting of Fatal_Error.
3919 * lib-load.adb (Create_Dummy_Package_Unit): New setting of
3920 Fatal_Error.
3921 (Load_Main_Source): New setting of Fatal_Error
3922 (Load_Unit): New setting of Fatal_Error.
3923 * lib-writ.adb (Add_Preprocessing_Dependency): New setting of
3924 Fatal_Error.
3925 (Ensure_System_Dependency): New setting of Fatal_Error.
3926 * lib.adb (Fatal_Error): New setting of Fatal_Error
3927 (Set_Fatal_Error): New setting of Fatal_Error.
3928 * lib.ads: New definition of Fatal_Error and associated routines.
3929 * par-ch10.adb (P_Compilation_Unit): New setting of Fatal_Error.
3930 * par-load.adb (Load): New setting of Fatal_Error.
3931 * rtsfind.adb (Load_RTU): New setting of Fatal_Error.
3932 * sem_ch10.adb (Analyze_Compilation_Unit): New setting of
3933 Fatal_Error.
3934 (Optional_Subunit): New setting of Fatal_Error.
3935 (Analyze_Proper_Body): New setting of Fatal_Error.
3936 (Load_Needed_Body): New setting of Fatal_Error.
3937
39382015-02-05 Ed Schonberg <schonberg@adacore.com>
3939
3940 * sem_res.adb (Resolve_Call): If the function being called has
3941 out parameters do not check for language version if the function
3942 comes from a predefined unit, as those are always compiled in
3943 Ada 2012 mode.
3944
39452015-02-05 Ed Schonberg <schonberg@adacore.com>
3946
3947 * sem_ch3.adb (Process_Full_View): Verify that the full view
3948 of a type extension must carry an explicit limited keyword if
3949 the partial view does (RM 7.3 (10.1)).
3950
c93f2011
RD
39512015-02-05 Robert Dewar <dewar@adacore.com>
3952
3953 * g-rannum.adb, g-rannum.ads, s-rannum.adb, s-rannum.ads,
3954 sem_warn.ads: Minor reformatting.
3955 * exp_ch13.adb (Expand_N_Freeze_Entity): Add guard for aspect
3956 deleted by -gnatI.
3957 * sem_prag.adb (Analyze_Pragma, case Type_Invariant): Give
3958 error for abstract type.
3959
71140fc6
YM
39602015-02-05 Yannick Moy <moy@adacore.com>
3961
3962 * opt.ads (Warn_On_Suspicious_Contract): Update comment
3963 describing use.
3964 * sem_attr.adb (Analyze_Attribute/Attribute_Update): Warn on
3965 suspicious uses of 'Update.
3966 * sem_warn.adb, sem_warn.ads (Warn_On_Suspicious_Update): New
3967 function issues warning on suspicious uses of 'Update.
3968 * g-rannum.adb, g-rannum.ads, s-rannum.adb, s-rannum.ads: Mark
3969 package spec and body as SPARK_Mode Off.
3970
e0709184
RD
39712015-02-05 Robert Dewar <dewar@adacore.com>
3972
3973 * sem_prag.adb (Set_Elab_Unit_Name): New name for Set_Unit_Name
3974 (Analyze_Pragma): Change Set_Unit_Name to Set_Elab_Unit_Name
3975 (Set_Elab_Unit_Name): Generate reference for Elaborate[_All]
3976 * sem_warn.adb (Warn_On_Unreferenced_Entity): Suppress warning
3977 for exported entity.
3978
57979da1
AC
39792015-02-05 Hristian Kirtchev <kirtchev@adacore.com>
3980
3981 * sem_prag.adb (Check_Pragma_Conformance): Add
3982 local variable Arg. Ensure that all errors are associated with
3983 the pragma if it appears without an argument. Add comments on
3984 various cases.
3985
39862015-02-05 Robert Dewar <dewar@adacore.com>
3987
3988 * lib-xref.adb: Minor reformatting.
3989
aebab21a
TG
39902015-02-05 Tristan Gingold <gingold@adacore.com>
3991
a02a2754 3992 PR ada/64349
aebab21a
TG
3993 * env.c: Fix thinko: handle Darwin case before default one.
3994
622599c6
RD
39952015-01-30 Robert Dewar <dewar@adacore.com>
3996
3997 * a-assert.adb: Minor reformatting.
3998 * sem_ch13.adb: Minor comment clarification.
3999 * types.ads: Minor comment update.
4000 * sem_eval.adb (Real_Or_String_Static_Predicate_Matches): Avoid blow up
4001 when we have a predicate that is nothing but an inherited dynamic
4002 predicate.
4003
0d1476cb
JG
40042015-01-30 Jerome Guitton <guitton@adacore.com>
4005
4006 * gcc-interface/Makefile.in (x86-vxworks): Update GCC_SPEC_FILES to
4007 include cert link spec.
4008
e5cabfac
AC
40092015-01-30 Robert Dewar <dewar@adacore.com>
4010
4011 * einfo.ads: Minor comment fix.
4012 * freeze.adb (Freeze_Profile): Add test for suspicious import
4013 in pure unit.
4014 * sem_prag.adb (Process_Import_Or_Interface): Test for suspicious
4015 use in Pure unit is now moved to Freeze (to properly catch
4016 Pure_Function exemption).
4017
40182015-01-30 Bob Duff <duff@adacore.com>
4019
4020 * sem_res.ads: Minor comment fix.
4021 * sem_type.adb: sem_type.adb (Remove_Conversions): Need to
4022 check both operands of an operator.
4023
40242015-01-30 Yannick Moy <moy@adacore.com>
4025
4026 * a-assert.ads, a-assert.adb: Mark package spec in SPARK. Set assertion
4027 policy for Pre to Ignore.
4028 (Assert): Add precondition.
4029
b7db1149
RD
40302015-01-30 Robert Dewar <dewar@adacore.com>
4031
4032 * sem_prag.adb (Process_Import_Or_Interface): Warn if used in
4033 Pure unit.
4034 * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Clarify
4035 documentation for some special cases of invalid attempts at
4036 based integers.
4037
1db700c3
AC
40382015-01-30 Gary Dismukes <dismukes@adacore.com>
4039
4040 * errout.ads: Minor reformatting.
4041
40422015-01-30 Yannick Moy <moy@adacore.com>
4043
4044 * inline.adb (Process_Formals): Use the sloc of
4045 the inlined node instead of the sloc of the actual parameter,
4046 when replacing formal parameters by the actual one.
4047
40482015-01-30 Arnaud Charlet <charlet@adacore.com>
4049
4050 * g-expect.adb (Get_Command_Output): Use infinite timeout when
4051 calling Expect.
4052
40532015-01-30 Ed Schonberg <schonberg@adacore.com>
4054
4055 * sem_ch12.adb (Analyze_Associations): If an in-parameter is
4056 defaulted in an instantiation, add an entry in the list of actuals
4057 to indicate the default value of the formal (as is already done
4058 for defaulted subprograms).
4059
40602015-01-30 Javier Miranda <miranda@adacore.com>
4061
4062 * errout.adb (Error_Msg_PT): Minor error phrasing update.
4063
40642015-01-30 Robert Dewar <dewar@adacore.com>
4065
4066 * sem_warn.adb (Warn_On_Known_Condition): Improve error message
4067 for object case.
4068
40692015-01-30 Pierre-Marie de Rodat <derodat@adacore.com>
4070
4071 * exp_dbug.adb (Get_Encoded_Name): When
4072 -fgnat-encodings=minimal, do not generate names for biased types.
4073
1de83011
TG
40742015-01-30 Tristan Gingold <gingold@adacore.com>
4075
4076 PR ada/64349
4077 * env.c: Move vxworks and darwin includes out of #ifdef IN_RTS.
4078
2c6336be
AC
40792015-01-30 Gary Dismukes <dismukes@adacore.com>
4080
4081 * freeze.adb: Minor reformatting.
4082
40832015-01-30 Javier Miranda <miranda@adacore.com>
4084
4085 * errout.ads (Error_Msg_PT): Replace Node_Id by Entity_Id and
4086 improve its documentation.
4087 * errout.adb (Error_Msg_PT): Improve the error message.
4088 * sem_ch6.adb (Check_Conformance): Update call to Error_Msg_PT.
4089 (Check_Synchronized_Overriding): Update call to Error_Msg_PT.
4090 * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup.
4091
40922015-01-30 Robert Dewar <dewar@adacore.com>
4093
4094 * sem_warn.adb (Warn_On_Known_Condition): Do special casing of
4095 message for False case.
4096
40972015-01-30 Doug Rupp <rupp@adacore.com>
4098
4099 * s-vxwext-kernel.ads (Task_Cont): Remove imported subprogram body.
4100 * s-vxwext-kernel.adb (Task_Cont): New subpprogram body specialized for
4101 kernel.
4102
46413d9e
AC
41032015-01-30 Gary Dismukes <dismukes@adacore.com>
4104
4105 * sem_attr.adb (Declared_Within_Generic_Unit):
4106 New function to test whether an entity is declared within the
4107 declarative region of a given generic unit.
4108 (Resolve_Attribute): For checking legality of subprogram'Access within
4109 a generic unit, call new Boolean function Declared_Within_Generic_Unit
4110 instead of simply comparing the results of Enclosing_Generic_Unit on
4111 the prefix and access type. Correct minor comment typos.
4112
41132015-01-30 Robert Dewar <dewar@adacore.com>
4114
4115 * freeze.adb, exp_util.ads: Update comment.
4116 * exp_util.adb, exp_ch3.adb: Minor code reorganization and reformatting.
4117 * sem_util.adb: Minor: fix typo.
4118
48b0da2d
AC
41192015-01-30 Hristian Kirtchev <kirtchev@adacore.com>
4120
4121 * sem_attr.adb (Analyze_Attribute): Ensure that
4122 the check concerning Refined_Post takes precedence over the
4123 other cases.
4124
41252015-01-30 Gary Dismukes <dismukes@adacore.com>
4126
4127 * sem_prag.adb: Minor typo fixes and reformatting.
4128
760804f3
AC
41292015-01-30 Yannick Moy <moy@adacore.com>
4130
4131 * sem_attr.adb: Code clean up.
4132
41332015-01-30 Robert Dewar <dewar@adacore.com>
4134
4135 * ali.adb (Scan_ALI): Set Serious_Errors flag in Unit record.
4136 * ali.ads (Unit_Record): Add new field Serious_Errors.
4137 * lib-writ.adb (Write_Unit_Information): Set SE (serious errors)
4138 attribute in U line.
4139 * lib-writ.ads: New attribute SE (serious erors) in unit line.
4140
41412015-01-30 Hristian Kirtchev <kirtchev@adacore.com>
4142
4143 * einfo.adb Update the usage of attributes Entry_Bodies_Array,
4144 Lit_Indexes, Scale_Value, Storage_Size_Variable,
4145 String_Literal_Low_Bound along associated routines and
4146 Write_FieldX_Name.
4147 (Pending_Access_Types): New routine.
4148 (Set_Pending_Access_Types): New routine.
4149 (Write_Field15_Name): Add an entry for Pending_Access_Types.
4150 * einfo.ads Add new attribute Pending_Access_Types along
4151 with usage in nodes. Update the usage of attributes
4152 Entry_Bodies_Array, Lit_Indexes, Scale_Value,
4153 Storage_Size_Variable, String_Literal_Low_Bound.
4154 (Pending_Access_Types): New routine along with pragma Inline.
4155 (Set_Pending_Access_Types): New routine along with pragma Inline.
4156 * exp_ch3.adb (Expand_Freeze_Array_Type): Add new local variable
4157 Ins_Node. Determine the insertion node for anonynous access type
4158 that acts as a component type of an array. Update the call to
4159 Build_Finalization_Master.
4160 (Expand_Freeze_Record_Type): Update
4161 the calls to Build_Finalization_Master.
4162 (Freeze_Type): Remove
4163 local variable RACW_Seen. Factor out the code that deals with
4164 remote access-to-class-wide types. Create a finalization master
4165 when the designated type contains a private component. Fully
4166 initialize all pending access types.
4167 (Process_RACW_Types): New routine.
4168 (Process_Pending_Access_Types): New routine.
4169 * exp_ch4.adb (Expand_Allocator_Expression): Allocation no longer
4170 needs to set primitive Finalize_Address.
4171 (Expand_N_Allocator): Allocation no longer sets primitive
4172 Finalize_Address.
4173 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
4174 Update the call to Build_Finalization_Master.
4175 (Make_Build_In_Place_Call_In_Allocator): Allocation no longer
4176 needs to set primitive Finalize_Address.
4177 * exp_ch7.adb (Add_Pending_Access_Type): New routine.
4178 (Build_Finalization_Master): New parameter profile. Associate
4179 primitive Finalize_Address with the finalization master if the
4180 designated type has been frozen, otherwise treat the access
4181 type as pending. Simplify the insertion of the master and
4182 related initialization code.
4183 (Make_Finalize_Address_Body): Allow Finalize_Address for class-wide
4184 abstract types.
4185 (Make_Set_Finalize_Address_Call): Remove forlam parameter Typ.
4186 Simplify the implementation.
4187 * exp_ch7.ads (Build_Finalization_Master): New parameter profile
4188 along with comment on usage.
4189 (Make_Set_Finalize_Address_Call): Remove formal parameter Typ. Update
4190 the comment on usage.
4191 * exp_util.adb (Build_Allocate_Deallocate_Proc): Use routine
4192 Finalize_Address to retrieve the primitive.
4193 (Finalize_Address): New routine.
4194 (Find_Finalize_Address): Removed.
4195 * exp_util.ads (Finalize_Address): New routine.
4196 * freeze.adb (Freeze_All): Remove the generation of finalization
4197 masters.
4198 * sem_ch3.adb (Analyze_Full_Type_Declaration): Propagate any
4199 pending access types from the partial to the full view.
4200
3b506eef
RD
42012015-01-30 Robert Dewar <dewar@adacore.com>
4202
4203 * sem_disp.adb: Minor reformatting.
4204 * sem_disp.ads: Documentation update.
4205
b6dd03dd
ES
42062015-01-30 Ed Schonberg <schonberg@adacore.com>
4207
4208 * sem_disp.adb (Is_Dynamically_Tagged): when applied to an entity
4209 or a function call, return True if type is class-wide.
4210 * sem_res.adb (Resolve_Case_Expression, Resolve_If_Expression);
4211 Apply RM 4.5.7 (17/3): all or none of the dependent expression
4212 of a conditional expression must be dynamically tagged.
4213
445e5888
AC
42142015-01-30 Ed Schonberg <schonberg@adacore.com>
4215
4216 * sem_ch6.adb (Analyze_Function_Return): In an extended return
4217 statement, apply accessibility check to result object when there
4218 is no initializing expression (Ada 2012 RM 6.5 (5.4/3))
4219
42202015-01-30 Robert Dewar <dewar@adacore.com>
4221
4222 * sem_ch4.adb (Analyze_If_Expression): Allow for non-standard
4223 Boolean for case where ELSE is omitted.
4224 * sem_res.adb: Minor reformatting.
4225
7e8338d8
BE
42262015-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
4227
4228 Fix build under cygwin/64.
4229 * adaint.h: Add check for __CYGWIN__.
4230 * mingw32.h: Prevent windows.h from including x86intrin.h in GCC.
4231
29c38396
BE
42322015-01-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
4233
4234 PR ada/64640
4235 * adaint.c: Handle __CYGWIN__ like __MINGW32__ here.
4236 * mingw32.h: Don't include <tchar.h> under cygwin.
4237 (_O_U8TEXT, _O_U16TEXT, _O_WTEXT): Set to _O_TEXT if not yet defined.
4238
41dbbb37
TS
42392015-01-15 Thomas Schwinge <thomas@codesourcery.com>
4240
4241 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8)
4242 (DEF_FUNCTION_TYPE_VAR_12): New macros.
4243
adfac8df
JJ
42442015-01-09 Michael Collison <michael.collison@linaro.org>
4245
4246 * gcc-interface/cuintp.c: Include hash-set.h, machmode.h,
4247 vec.h, double-int.h, input.h, alias.h, symtab.h,
4248 fold-const.h, wide-int.h, and inchash.h due to
4249 flattening of tree.h.
4250 * gcc-interface/decl.c: Ditto.
4251 * gcc-interface/misc.c: Ditto.
4252 * gcc-interface/targtyps.c: Include hash-set.h, machmode.h,
4253 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h,
4254 fold-const.h, wide-int.h, and inchash.h due to
4255 flattening of tree.h.
4256 * gcc-interface/trans.c: Include hash-set.h, machmode.h,
4257 vec.h, double-int.h, input.h, alias.h, symtab.h, real.h,
4258 fold-const.h, wide-int.h, inchash.h due to
4259 flattening of tree.h.
4260 * gcc-interface/utils.c: Include hash-set.h, machmode.h,
4261 vec.h, double-int.h, input.h, alias.h, symtab.h,
4262 fold-const.h, wide-int.h, and inchash.h due to
4263 flattening of tree.h.
4264 * gcc-interface/utils2.c: Ditto.
4265
4ffafd86
AC
42662015-01-07 Robert Dewar <dewar@adacore.com>
4267
4268 * sem_warn.adb (Check_One_Unit): Don't give unused entities
4269 warning for a package which is used as a generic parameter.
4270
42712015-01-07 Bob Duff <duff@adacore.com>
4272
4273 * usage.adb (Usage): Correct documentation of
4274 -gnatw.f switches.
4275
42762015-01-07 Robert Dewar <dewar@adacore.com>
4277
4278 * s-fileio.adb: Minor reformatting.
4279
42802015-01-07 Ed Schonberg <schonberg@adacore.com>
4281
4282 * sem_ch12.adb (Instantiate_Object): If formal is an anonymous
4283 access to subprogram, replace its formals with new entities when
4284 building the object declaration, both if actual is present and
4285 when it is defaulted.
4286
42872015-01-07 Ed Schonberg <schonberg@adacore.com>
4288
4289 * sem_ch5.adb (Analyze_Assignment): If left-hand side is a view
4290 conversion and type of expression has invariant, apply invariant
4291 check on expression.
4292
42932015-01-07 Ed Schonberg <schonberg@adacore.com>
4294
4295 * sem_ch3.adb (Create_Constrained_Components): A call to
4296 Gather_Components may detect an error if an inherited discriminant
4297 that controls a variant is non-static.
4298 * sem_aggr.adb (Resolve_Record_Aggregate, Step 5): The call to
4299 Gather_Components may report an error if an inherited discriminant
4300 in a variant in non-static.
4301 * sem_util.adb (Gather_Components): If a non-static discriminant
4302 is inherited do not report error here, but let caller handle it.
4303 (Find_Actual): Small optimization.
4304
91669e7e
AC
43052015-01-07 Bob Duff <duff@adacore.com>
4306
4307 * usage.adb (Usage): Document -gnatw.f switch.
4308
43092015-01-07 Ed Schonberg <schonberg@adacore.com>
4310
4311 * sem_ch12.adb: Code clean up and minor reformatting.
4312
43132015-01-07 Robert Dewar <dewar@adacore.com>
4314
4315 * exp_ch4.adb (Expand_N_Type_Conversion): Add guard for
4316 Raise_Accessibility_Error call.
4317 * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Add documentation
4318 on handling of invalid digits in based constants.
4319 * s-fatgen.ads: Minor reformatting.
4320 * sem_attr.adb (Analyze_Attribute, case Unrestricted_Access):
4321 Avoid noting bogus modification for Valid test.
4322 * snames.ads-tmpl (Name_Attr_Long_Float): New Name.
4323 * einfo.ads: Minor reformatting.
4324 * sem_warn.adb: Minor comment clarification.
4325 * sem_ch12.adb: Minor reformatting.
4326
10dfac72
AC
43272015-01-07 Ed Schonberg <schonberg@adacore.com>
4328
4329 * exp_ch5.adb (Expand_Predicated_Loop): Handle properly loops
4330 over static predicates when the loop parameter specification
4331 carries a Reverse indicator.
4332
43332015-01-07 Ed Schonberg <schonberg@adacore.com>
4334
4335 * sem_ch12.adb (Instantiate_Object): If formal has a default,
4336 actual is missing and formal has an anonymous access type, copy
4337 access definition in full so that tree for instance is properly
4338 formatted for ASIS use.
4339
43402015-01-07 Bob Duff <duff@adacore.com>
4341
4342 * sem_elab.adb (Check_Internal_Call_Continue): Give a warning
4343 for P'Access, where P is a subprogram in the same package as
4344 the P'Access, and the P'Access is evaluated at elaboration
4345 time, and occurs before the body of P. For example, "X : T :=
4346 P'Access;" would allow a subsequent call to X.all to be an
4347 access-before-elaboration error; hence the warning. This warning
4348 is enabled by the -gnatw.f switch.
4349 * opt.ads (Warn_On_Elab_Access): New flag for warning switch.
4350 * warnsw.adb (Set_Dot_Warning_Switch): Set Warn_On_Elab_Access.
4351 * gnat_ugn.texi: Document the new warning.
4352
ccfe725b
JK
43532015-01-07 Johannes Kanig <kanig@adacore.com>
4354
4355 * lib-xref-spark_specific.adb (Collect_SPARK_Xrefs): Skip unneeded
4356 cross ref files.
4357
ed09416f
AC
43582015-01-07 Robert Dewar <dewar@adacore.com>
4359
4360 * s-taprop-linux.adb, clean.adb: Minor reformatting.
4361
43622015-01-07 Arnaud Charlet <charlet@adacore.com>
4363
4364 * s-tassta.adb: Relax some overzealous assertions.
4365
43662015-01-07 Ed Schonberg <schonberg@adacore.com>
4367
4368 * sem_ch6.adb (Analyze_Return_Type): An call that returns a limited
4369 view of a type is legal when context is a thunk generated for
4370 operation inherited from an interface.
4371 * exp_ch6.adb (Expand_Simple_Function_Return): If context is
4372 a thunk and return type is an incomplete type do not continue
4373 expansion; thunk will be fully elaborated when generating code.
4374
43752015-01-07 Doug Rupp <rupp@adacore.com>
4376
4377 * s-osinte-mingw.ads (LARGE_INTEGR): New subtype.
4378 (QueryPerformanceFrequency): New imported procedure.
4379 * s-taprop-mingw.adb (RT_Resolution): Call above and return
4380 resolution vice a hardcoded value.
4381 * s-taprop-solaris.adb (RT_Resolution): Call clock_getres and return
4382 resolution vice a hardcoded value.
4383 * s-linux-android.ads (clockid_t): New subtype.
4384 * s-osinte-aix.ads (clock_getres): New imported subprogram.
4385 * s-osinte-android.ads (clock_getres): Likewise.
4386 * s-osinte-freebsd.ads (clock_getres): Likewise.
4387 * s-osinte-solaris-posix.ads (clock_getres): Likewise.
4388 * s-osinte-darwin.ads (clock_getres): New subprogram.
4389 * s-osinte-darwin.adb (clock_getres): New subprogram.
4390 * thread.c (__gnat_clock_get_res) [__APPLE__]: New function.
4391 * s-taprop-posix.adb (RT_Resolution): Call clock_getres to
4392 calculate resolution vice hard coded value.
4393
43942015-01-07 Ed Schonberg <schonberg@adacore.com>
4395
4396 * exp_util.adb (Make_CW_Equivalent_Type): If root type is a
4397 limited view, use non-limited view when available to create
4398 equivalent record type.
4399
44002015-01-07 Vincent Celier <celier@adacore.com>
4401
4402 * gnatcmd.adb: Remove command Sync and any data and processing
4403 related to this command. Remove project processing for gnatstack.
4404 * prj-attr.adb: Remove package Synchonize and its attributes.
4405
6a989c79
AC
44062015-01-07 Vincent Celier <celier@adacore.com>
4407
4408 * clean.adb: Minor error message change.
4409
44102015-01-07 Tristan Gingold <gingold@adacore.com>
4411
4412 PR ada/64349
4413 * env.c (__gnat_environ): Adjust for darwin9/darwin10.
4414
44152015-01-07 Javier Miranda <miranda@adacore.com>
4416
4417 * sem_ch10.adb (Analyze_With_Clause): Compiling under -gnatq
4418 protect the frontend against never ending recursion caused by
4419 circularities in the sources.
4420
1c85591c
AC
44212015-01-07 Robert Dewar <dewar@adacore.com>
4422
4423 * a-reatim.adb, make.adb, exp_pakd.adb, i-cpoint.adb, sem_ch8.adb,
4424 exp_ch3.adb: Minor reformatting.
4425
44262015-01-07 Doug Rupp <rupp@adacore.com>
4427
4428 * s-linux.ads (clockid_t): New subtype.
4429 * s-osinte-linux.ads (pragma Linker Options): Add -lrt.
4430 (clockid_t): New subtype.
4431 (clock_getres): Import system call.
4432 * s-taprop-linux.adb (System.OS_Constants): With and rename.
4433 (RT_Resolution): Remove
4434 hardcoded value and call clock_getres.
4435 * s-linux-sparc.ads, s-linux-mipsel.ads, s-linux-hppa.ads,
4436 s-linux-alpha.ads, s-linux-x32.ads (clockid_t): Add new subtype.
4437
44382015-01-07 Robert Dewar <dewar@adacore.com>
4439
4440 * sem_warn.adb (Check_One_Unit): Guard against context item
4441 with no Entity field.
4442
b6e5a1ec
AC
44432015-01-07 Vincent Celier <celier@adacore.com>
4444
4445 * clean.adb (Gnatclean): Warn that 'gnatclean -P' is obsolete.
4446 * make.adb (Initialize): Warn that 'gnatmake -P' is obsolete.
4447
44482015-01-07 Vincent Celier <celier@adacore.com>
4449
4450 * prj-conf.adb (Parse_Project_And_Apply_Config): Always finalize
4451 errors/warnings in the first parsing of the project files,
4452 to display the warnings when there is no errors.
4453
44542015-01-07 Tristan Gingold <gingold@adacore.com>
4455
4456 * i-cpoint.adb (Copy_Terminated_Array): Nicely handle null target.
4457
44582015-01-07 Doug Rupp <rupp@adacore.com>
4459
4460 * s-taprop-vxworks.adb (Stop_All_Tasks): Pass return
4461 value from Int_Lock as parameter to Int_Unlock.
4462 * s-osinte-vxworks.ads (Int_Unlock): Add parameter.
4463 * s-vxwext.ads (Int_Unlock): Likewise.
4464 * s-vxwext-kernel.adb (intUnlock, Int_Unlock): Likewise.
4465 * s-vxwext-kernel.ads (Int_Unlock): Likewise.
4466 * s-vxwext-rtp.adb (Int_Unlock): Likewise.
4467 * s-vxwext-rtp.ads (Int_Unlock): Likewise.
4468
44692015-01-07 Pierre-Marie de Rodat <derodat@adacore.com>
4470
4471 * exp_pakd.adb: Add a comment in exp_pakd.adb to explain why we
4472 keep ___XP suffixes
4473
c3831524
AC
44742015-01-07 Tristan Gingold <gingold@adacore.com>
4475
4476 * i-cpoint.adb (Copy_Terminated_Array): Use Copy_Array to
4477 handle overlap.
4478
44792015-01-07 Eric Botcazou <ebotcazou@adacore.com>
4480
4481 * sem_ch3.adb (Analyze_Full_Type_Declaration): Do not
4482 automatically set No_Strict_Aliasing on access types.
4483 * fe.h (No_Strict_Aliasing_CP): Declare.
4484 * gcc-interface/trans.c (gigi): Force flag_strict_aliasing to 0 if
4485 No_Strict_Aliasing_CP is set.
4486
44872015-01-07 Johannes Kanig <kanig@adacore.com>
4488
4489 * sem_ch8.adb (Analyze_Subprogram_Renaming) do
4490 not build function wrapper in gnatprove mode when the package
4491 is externally axiomatized.
4492
44932015-01-07 Jose Ruiz <ruiz@adacore.com>
4494
4495 * a-reatim.adb (Time_Of): Reduce the number of spurious overflows in
4496 intermediate computations when the parameters have different signs.
4497
44982015-01-07 Javier Miranda <miranda@adacore.com>
4499
4500 * exp_ch3.adb (Build_Init_Procedure): For derived types,
4501 improve the code which takes care of identifying and moving to
4502 the beginning of the init-proc the call to the init-proc of the
4503 parent type.
4504
1a9ee222
OH
45052015-01-07 Olivier Hainque <hainque@adacore.com>
4506
4507 * gcc-interface/trans.c (gnat_to_gnu, <N_Expression_With_Action>):
4508 Elaborate the expression as part of the same stmt group as the actions.
4509
7d1286f6
AC
45102015-01-07 Robert Dewar <dewar@adacore.com>
4511
4512 * sem_ch3.adb: Minor error message change.
4513
45142015-01-07 Ed Schonberg <schonberg@adacore.com>
4515
4516 * sem_prag.adb (Analyze_Pragma, case Preelaborable_Initialization):
4517 Following AI05-028, the pragam applies legally to any composite type.
4518
95e0ceef
AC
45192015-01-07 Arnaud Charlet <charlet@adacore.com>
4520
4521 * s-osinte-vxworks.adb, s-osinte-vxworks.ads
4522 (sigwait, sigwaitinfo): Removed, not needed after all on any
4523 VxWorks configurations.
4524
45252015-01-07 Robert Dewar <dewar@adacore.com>
4526
4527 * sem_ch3.adb, freeze.adb, exp_disp.adb: Minor reformatting.
4528
2ea3ba25
AC
45292015-01-07 Javier Miranda <miranda@adacore.com>
4530
4531 * exp_disp.adb (Expand_Interface_Conversion): Adding missing
4532 generation of accessibility check.
4533
45342015-01-07 Ed Schonberg <schonberg@adacore.com>
4535
4536 * sem_ch3.adb (Derived_Type_Declaration): In the case of an
4537 illegal completion from a class- wide type, set etype of the
4538 derived type properly to prevent cascaded errors.
4539
18dae814
RD
45402015-01-07 Robert Dewar <dewar@adacore.com>
4541
4542 * prj.ads, i-cpoint.adb, freeze.adb, ghost.adb, prj-err.adb: Minor
4543 reformatting.
4544
45452015-01-07 Robert Dewar <dewar@adacore.com>
4546
4547 * restrict.adb (Check_Restriction_No_Use_Of_Attribute):
4548 New procedure.
4549 (OK_No_Use_Of_Entity_Name): New function.
4550 (Set_Restriction_No_Use_Of_Entity): New procedure.
4551 * restrict.ads (Check_Restriction_No_Use_Of_Attribute):
4552 New procedure.
4553 (OK_No_Use_Of_Entity_Name): New function.
4554 (Set_Restriction_No_Use_Of_Entity): New procedure.
4555 * sem_ch8.adb (Find_Direct_Name): Add check for violation of
4556 No_Use_Of_Entity.
4557 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
4558 Add processing for new restriction No_Use_Of_Entity.
4559
7806a9ed
EB
45602015-01-07 Eric Botcazou <ebotcazou@adacore.com>
4561
4562 * freeze.adb (Freeze_Array_Type): Apply same handling to Is_Atomic
4563 component type as to Has_Atomic_Components type. Remove useless
4564 test on Is_Aliased component type.
4565
8636f52f
HK
45662015-01-07 Hristian Kirtchev <kirtchev@adacore.com>
4567
4568 * alloc.ads Alphabetize several declarations. Add constants
4569 Ignored_Ghost_Units_Initial and Ignored_Ghost_Units_Increment.
4570 * atree.adb Add with and use clauses for Opt.
4571 (Allocate_Initialize_Node): Mark a node as ignored Ghost
4572 if it is created in an ignored Ghost region.
4573 (Ekind_In): New variant.
4574 (Is_Ignored_Ghost_Node): New routine.
4575 (Set_Is_Ignored_Ghost_Node): New routine.
4576 * atree.adb Aplhabetize several subprograms declarations. Flag
4577 Spare0 is now known as Is_Ignored_Ghost_Node.
4578 (Ekind_In): New variant.
4579 (Is_Ignored_Ghost_Node): New routine.
4580 (Set_Is_Ignored_Ghost_Node): New routine.
4581 * einfo.adb: Flag 279 is now known as Contains_Ignored_Ghost_Code.
4582 (Contains_Ignored_Ghost_Code): New routine.
4583 (Set_Contains_Ignored_Ghost_Code): New routine.
4584 (Set_Is_Checked_Ghost_Entity, Set_Is_Ignored_Ghost_Entity):
4585 It is now possible to set this property on an unanalyzed entity.
4586 (Write_Entity_Flags): Output the status of flag
4587 Contains_Ignored_Ghost_Code.
4588 * einfo.ads New attribute Contains_Ignored_Ghost_Code along with
4589 usage in nodes.
4590 (Contains_Ignored_Ghost_Code): New routine
4591 along with pragma Inline.
4592 (Set_Contains_Ignored_Ghost_Code): New routine along with pragma Inline.
4593 * exp_ch3.adb Add with and use clauses for Ghost.
4594 (Freeze_Type): Capture/restore the value of Ghost_Mode on entry/exit.
4595 Set the Ghost_Mode in effect.
4596 (Restore_Globals): New routine.
4597 * exp_ch7.adb (Process_Declarations): Do not process a context
4598 that invoves an ignored Ghost entity.
4599 * exp_dbug.adb (Qualify_All_Entity_Names): Skip an ignored Ghost
4600 construct that has been rewritten as a null statement.
4601 * exp_disp.adb Add with and use clauses for Ghost.
4602 (Make_DT): Capture/restore the value of Ghost_Mode on entry/exit. Set
4603 the Ghost_Mode in effect.
4604 (Restore_Globals): New routine.
4605 * exp_util.adb (Requires_Cleanup_Actions): An ignored Ghost entity
4606 does not require any clean up. Add two missing cases that deal
4607 with block statements.
4608 * freeze.adb Add with and use clauses for Ghost.
4609 (Freeze_Entity): Capture/restore the value of Ghost_Mode on entry/exit.
4610 Set the Ghost_Mode in effect.
4611 (Restore_Globals): New routine.
4612 * frontend.adb Add with and use clauses for Ghost. Remove any
4613 ignored Ghost code from all units that qualify.
4614 * ghost.adb New unit.
4615 * ghost.ads New unit.
4616 * gnat1drv.adb Add with clause for Ghost. Initialize and lock
4617 the table in package Ghost.
4618 * lib.ads: Alphabetize several subprogram declarations.
4619 * lib-xref.adb (Output_References): Do not generate reference
4620 information for ignored Ghost entities.
4621 * opt.ads Add new type Ghost_Mode_Type and new global variable
4622 Ghost_Mode.
4623 * rtsfind.adb (Load_RTU): Provide a clean environment when
4624 loading a runtime unit.
4625 * sem.adb (Analyze): Capture/restore the value of Ghost_Mode on
4626 entry/exit as the node may set a different mode.
4627 (Do_Analyze):
4628 Capture/restore the value of Ghost_Mode on entry/exit as the
4629 unit may be withed from a unit with a different Ghost mode.
4630 * sem_ch3.adb Add with and use clauses for Ghost.
4631 (Analyze_Full_Type_Declaration, Analyze_Incomplete_Type_Decl,
4632 Analyze_Number_Declaration, Analyze_Private_Extension_Declaration,
4633 Analyze_Subtype_Declaration): Set the Ghost_Mode in effect. Mark
4634 the entity as Ghost when there is a Ghost_Mode in effect.
4635 (Array_Type_Declaration): The implicit base type inherits the
4636 "ghostness" from the array type.
4637 (Derive_Subprogram): The
4638 alias inherits the "ghostness" from the parent subprogram.
4639 (Make_Implicit_Base): The implicit base type inherits the
4640 "ghostness" from the parent type.
4641 * sem_ch5.adb Add with and use clauses for Ghost.
4642 (Analyze_Assignment): Set the Ghost_Mode in effect.
4643 * sem_ch6.adb Add with and use clauses for Ghost.
4644 (Analyze_Abstract_Subprogram_Declaration, Analyze_Procedure_Call,
4645 Analyze_Subprogram_Body_Helper, Analyze_Subprogram_Declaration):
4646 Set the Ghost_Mode in effect. Mark the entity as Ghost when
4647 there is a Ghost_Mode in effect.
4648 * sem_ch7.adb Add with and use clauses for Ghost.
4649 (Analyze_Package_Body_Helper, Analyze_Package_Declaration,
4650 Analyze_Private_Type_Declaration): Set the Ghost_Mode in
4651 effect. Mark the entity as Ghost when there is a Ghost_Mode
4652 in effect.
4653 * sem_ch8.adb Add with and use clauses for Ghost.
4654 (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
4655 Analyze_Object_Renaming, Analyze_Package_Renaming,
4656 Analyze_Subprogram_Renaming): Set the Ghost_Mode in effect. Mark
4657 the entity as Ghost when there is a Ghost_Mode in effect.
4658 (Find_Type): Check the Ghost context of a type.
4659 * sem_ch11.adb Add with and use clauses for Ghost.
4660 (Analyze_Exception_Declaration): Set the Ghost_Mode in
4661 effect. Mark the entity as Ghost when there is a Ghost_Mode
4662 in effect.
4663 * sem_ch12.adb Add with and use clauses for Ghost.
4664 (Analyze_Generic_Package_Declaration,
4665 Analyze_Generic_Subprogram_Declaration): Set the Ghost_Mode in effect.
4666 Mark the entity as Ghost when there is a Ghost_Mode in effect.
4667 * sem_prag.adb Add with and use clauses for Ghost.
4668 (Analyze_Pragma): Ghost-related checks are triggered when there
4669 is a Ghost mode in effect.
4670 (Create_Abstract_State): Mark the
4671 entity as Ghost when there is a Ghost_Mode in effect.
4672 * sem_res.adb Add with and use clauses for Ghost.
4673 (Check_Ghost_Context): Removed.
4674 * sem_util.adb (Check_Ghost_Completion): Removed.
4675 (Check_Ghost_Derivation): Removed.
4676 (Incomplete_Or_Partial_View):
4677 Add a guard in case the entity has not been analyzed yet
4678 and does carry a scope.
4679 (Is_Declaration): New routine.
4680 (Is_Ghost_Entity): Removed.
4681 (Is_Ghost_Statement_Or_Pragma):
4682 Removed.
4683 (Is_Subject_To_Ghost): Removed.
4684 (Set_Is_Ghost_Entity):
4685 Removed.
4686 (Within_Ghost_Scope): Removed.
4687 * sem_util.adb (Check_Ghost_Completion): Removed.
4688 (Check_Ghost_Derivation): Removed.
4689 (Is_Declaration): New routine.
4690 (Is_Ghost_Entity): Removed.
4691 (Is_Ghost_Statement_Or_Pragma): Removed.
4692 (Is_Subject_To_Ghost): Removed.
4693 (Set_Is_Ghost_Entity): Removed.
4694 (Within_Ghost_Scope): Removed.
4695 * sinfo.ads Add a section on Ghost mode.
4696 * treepr.adb (Print_Header_Flag): New routine.
4697 (Print_Node_Header): Factor out code. Output flag
4698 Is_Ignored_Ghost_Node.
4699 * gcc-interface/Make-lang.in: Add dependency for unit Ghost.
4700
5dc6778c
EB
47012015-01-06 Eric Botcazou <ebotcazou@adacore.com>
4702
4703 * freeze.adb (Freeze_Array_Type) <Complain_CS>: Remove always
4704 true test and unreachable 'else' arm.
4705
bb6c60f4
AC
47062015-01-06 Vincent Celier <celier@adacore.com>
4707
4708 * prj-conf.adb (Check_Target): Improve error message when
4709 there are mismatched targets between the on in the configuration
4710 project file and the specified one, either in the main project
4711 file or in the --target= switch.
4712
47132015-01-06 Pascal Obry <obry@adacore.com>
4714
4715 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Mode and
4716 Install_Name attribute definitions.
4717
47182015-01-06 Ed Schonberg <schonberg@adacore.com>
4719
4720 * freeze.adb (Wrap_Imported_Subprogram): Indicate that the
4721 generated Import pragma for the internal imported procedure does
4722 not come from an aspect, so that Is_Imported can be properly
4723 set for it.
4724
47252015-01-06 Gary Dismukes <dismukes@adacore.com>
4726
4727 * sem_ch12.adb (Might_Inline_Subp): Record whether
4728 any subprograms in the generic package are marked with
4729 pragma Inline_Always (setting flag Has_Inline_Always).
4730 (Analyze_Package_Instantiation): Add test of Has_Inline_Always
4731 alongside existing test of Front_End_Inlining as alternative
4732 conditions for setting Inline_Now. Also add test of
4733 Has_Inline_Always along with Front_End_Inlining test as an
4734 alternative condition for setting Needs_Body to False.
4735
47362015-01-06 Tristan Gingold <gingold@adacore.com>
4737
4738 * i-cpoint.adb (Copy_Array): Handle overlap.
4739
3dfe4883
AC
47402015-01-06 Pascal Obry <obry@adacore.com>
4741
4742 * bindgen.adb: Minor style fix.
4743
47442015-01-06 Robert Dewar <dewar@adacore.com>
4745
4746 * sem_util.ads, sem_util.adb: Minor reformatting.
4747
47482015-01-06 Vincent Celier <celier@adacore.com>
4749
4750 * prj-conf.adb (Parse_Project_And_Apply_Config): Reset incomplete
4751 with flags before parsing the projects.
4752 * prj-err.adb (Error_Msg): Do nothing if there are incomplete withs.
4753 * prj-part.adb (Post_Parse_Context_Clause): Set Incomplete_Withs
4754 to True in the flags, when Ignore_Missing_With is True and an
4755 imported project cannot be found.
4756 * prj-proc.adb (Expression): When there are incomplete withs and
4757 a variable or attribute is not found, set the variable/attribute
4758 to unknown.
4759 * prj.ads (Processing_Flags): New flag Incomplete_Withs,
4760 defaulted to False.
4761
47622015-01-06 Vasiliy Fofanov <fofanov@adacore.com>
4763
4764 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-conf.adb,
4765 prj-err.adb: Add new switch --no-command-line.
4766
59e9bc0b
AC
47672015-01-06 Ed Schonberg <schonberg@adacore.com>
4768
4769 * sem_ch12.adb: Sloc of wrapper is that of instantiation.
4770
47712015-01-06 Robert Dewar <dewar@adacore.com>
4772
4773 * sem_ch11.adb: Minor reformatting.
4774
47752015-01-06 Ed Schonberg <schonberg@adacore.com>
4776
4777 * exp_aggr.adb (Get_Assoc_Expr): New routine internal to
4778 Build_Array_Aggr_Code, used to initialized components covered
4779 by a box association. If the component type is scalar and has
4780 a default aspect, use it to initialize such components.
4781
47822015-01-06 Pascal Obry <obry@adacore.com>
4783
4784 * rtinit.c (__gnat_runtime_initialize): Add a parameter to
4785 control the setup of the exception handler.
4786 * initialize.c: Remove unused declaration.
4787 * bindgen.adb: Always call __gnat_runtime_initialize and pass
4788 whether the exeception handler must be set or not.
4789
1a779058
AC
47902015-01-06 Thomas Quinot <quinot@adacore.com>
4791
4792 * freeze.adb (Set_SSO_From_Defaults): When setting scalar storage
4793 order to native from default, make sure to also adjust bit order.
4794 * exp_aggr.adb: Minor reformatting.
4795
47962015-01-06 Robert Dewar <dewar@adacore.com>
4797
4798 * s-valllu.adb, s-valllu.ads, s-valuti.ads, s-valuns.adb, s-valuns.ads,
4799 s-valrea.adb, s-valrea.ads: Add some additional guards for
4800 Str'Last = Positive'Last.
4801
48022015-01-06 Ed Schonberg <schonberg@adacore.com>
4803
4804 * sem_ch12.adb, sem_ch8.adb: Ongoing work for wrappers for actual
4805 subprograms.
4806
48072015-01-06 Javier Miranda <miranda@adacore.com>
4808
4809 * exp_disp.adb (Expand_Interface_Conversion): Reapply patch.
4810
375cbc2b
TQ
48112015-01-06 Thomas Quinot <quinot@adacore.com>
4812
4813 * sem_util.ads: Minor reformatting.
4814 * sem_cat.adb (In_RCI_Visible_Declarations): Change back to...
4815 (In_RCI_Declaration) Return to old name, as proper checking of
4816 entity being in the visible part depends on entity kind and must
4817 be done by the caller.
4818
fc6d9796
AC
48192015-01-06 Ed Schonberg <schonberg@adacore.com>
4820
4821 * sem_ch12.adb, sem_ch12.ads, sem_ch8.adb: Ongoing work for wrappers
4822 for operators in SPARK.
4823
fc6d9796
AC
48242015-01-06 Ed Schonberg <schonberg@adacore.com>
4825
4826 * sem_aggr.adb (Get_Value): In ASIS mode, preanalyze the
4827 expression in an others association before making copies for
4828 separate resolution and accessibility checks. This ensures that
4829 the type of the expression is available to ASIS in all cases,
4830 in particular if the expression is itself an aggregate.
4831
28fa5430
AC
48322015-01-06 Eric Botcazou <ebotcazou@adacore.com>
4833
4834 * einfo.ads (Has_Independent_Components): Document extended
4835 usage.
4836 * einfo.adb (Has_Independent_Components): Remove obsolete assertion.
4837 (Set_Has_Independent_Components): Adjust assertion.
4838 * sem_prag.adb (Analyze_Pragma): Also set Has_Independent_Components
4839 for pragma Atomic_Components. Set Has_Independent_Components
4840 on the object instead of the type for an object declaration with
4841 pragma Independent_Components.
4842
48432015-01-06 Olivier Hainque <hainque@adacore.com>
4844
4845 * set_targ.adb (Read_Target_Dependent_Values): Set
4846 Long_Double_Index when "long double" is read.
4847 (elaboration code): Register_Back_End_Types only when not reading from
4848 config files. Doing otherwise is pointless and error prone.
4849
48502015-01-06 Robert Dewar <dewar@adacore.com>
4851
4852 * s-valrea.adb (Value_Real): Check for Str'Last = Positive'Last
4853
48542015-01-06 Robert Dewar <dewar@adacore.com>
4855
4856 * a-wtgeau.adb, a-ztgeau.adb, a-tigeau.adb (String_Skip): Raise PE if
4857 Str'Last = Positive'Last.
4858
48592015-01-06 Ed Schonberg <schonberg@adacore.com>
4860
4861 * sem_ch6.adb (Matches_Limited_View): Handle properly the case
4862 where the non-limited type is a generic actual and appears as
4863 a subtype of the non-limited view of the other.
4864 * freeze.adb (Build_Renamed_Body): If the return type of the
4865 declaration that is being completed is a limited view and the
4866 non-limited view is available, use it in the specification of
4867 the generated body.
4868
28fa5430
AC
48692015-01-06 Ed Schonberg <schonberg@adacore.com>
4870
4871 * sem_ch3.adb (Find_Type_Name): If there is a previous tagged
4872 incomplete view, the type of the classwide type common to both
4873 views is the type being declared.
4874
8a52daee
EB
48752015-01-06 Eric Botcazou <ebotcazou@adacore.com>
4876
4877 * einfo.ads (Is_Independent): Further document extended usage.
4878
6ced6aa2
EB
48792015-01-06 Eric Botcazou <ebotcazou@adacore.com>
4880
4881 * einfo.ads (Is_Independent): Document extended usage.
4882 * einfo.adb (Is_Independent): Remove obsolete assertion.
4883 (Set_Is_Independent): Likewise.
4884 * sem_prag.adb (Process_Atomic_Shared_Volatile): Rename into...
4885 (Process_Atomic_Independent_Shared_Volatile): ...this.
4886 Deal with pragma Independent here.
4887 (Analyze_Pragma): Adjust
4888 to above renaming and also invoke it for pragma Independent.
4889 Adjust comment for Independent_Components.
4890
61ae296d
RD
48912015-01-06 Robert Dewar <dewar@adacore.com>
4892
4893 * snames.ads-tmpl: Remove entries for attribute Enum_Image.
4894 * exp_attr.adb: Remove reference to Attribute_Enum_Image.
4895
48962015-01-06 Robert Dewar <dewar@adacore.com>
4897
4898 * s-vallli.adb (Value_Long_Long_Integer): Handle case of Str'Last
4899 = Positive'Last.
4900 * s-valllu.adb (Value_Long_Long_Unsigned): Handle case of
4901 Str'Last = Positive'Last.
4902
49032015-01-06 Robert Dewar <dewar@adacore.com>
4904
4905 * sem_prag.adb (Process_Inline): Remove redundant construct
4906 warning (-gnatw.r) for an ineffective pragma Inline.
4907
21db8699
RD
49082015-01-06 Robert Dewar <dewar@adacore.com>
4909
4910 * s-valint.adb: Fix typo in last checkin.
4911 * s-valuns.adb (Value_Unsigned): More efficient fix for
4912 Positive'Last case.
4913 * sem_attr.adb (Analyze_Attribute): Minor reformatting
4914 (Eval_Attribute): Static ervaluation of 'Img for enumeration types.
4915
8d1359c7
AC
49162015-01-06 Robert Dewar <dewar@adacore.com>
4917
4918 * s-valint.adb, s-valuns.adb (Value_Integer): Deal with case where
4919 Str'Last = Positive'Last
4920
49212015-01-06 Thomas Quinot <quinot@adacore.com>
4922
4923 * xoscons.adb: Display exception information and return non-zero
4924 exit status in top level exception handler.
4925
a1954e97
AC
49262015-01-06 Ed Schonberg <schonberg@adacore.com>
4927
4928 * sem_ch8.adb: Code clean up.
4929
49302015-01-06 Tristan Gingold <gingold@adacore.com>
4931
4932 * targparm.ads: Remove obsolete comment.
4933
f72a845b
OH
49342015-01-06 Olivier Hainque <hainque@adacore.com>
4935
4936 * gcc-interface/decl.c (gnat_to_gnu_entity, case E_Variable): When
4937 constructing a ref to variable, update inner_const_flag from the
4938 variable TREE_READONLY attribute.
4939 * gcc-interface/targtyps.c (WIDEST_HARDWARE_FP_SIZE): Remove default
4940 definition.
4941 (get_target_float_size): Remove.
4942 (get_target_double_size): Remove.
4943 (get_target_long_double_size): Remove.
4944
07e188be
PO
49452015-01-06 Pascal Obry <obry@adacore.com>
4946
4947 * adaint.c (ProcListEvt): Set to NULL.
4948 * rtinit.c: New file.
4949 (__gnat_rt_init_count): New reference counter set to 0.
4950 (__gnat_runtime_initialize): Move code here from __gnat_initialize when
4951 this code is actually needed for the runtime initialization. This
4952 routine returns immediately if the initialization has already been done.
4953 * final.c: Revert previous change.
4954 * rtfinal.c: New file.
4955 (__gnat_runtime_finalize)[Win32]: Add finalization of the critical
4956 section and event. The default version of this routine is empty (except
4957 for the reference counting code). This routine returns immediately if
4958 some others libraries are referencing the runtime.
4959 * bindgen.adb (Gen_Adainit): Generate call to Runtime_Initialize
4960 remove circuitry to initialize the signal handler as this is
4961 now done by the runtime initialization routine.
4962 (Gen_Adafinal): Generate call to Runtime_Finalize.
4963 * gnat_ugn.texi: Update documentation about concurrency and
4964 initialization/finalization of the run-time.
4965 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Add
4966 references to rtfinal.o and rtinit.o
4967
4199e8c6
RD
49682015-01-06 Robert Dewar <dewar@adacore.com>
4969
4970 * exp_attr.adb (Expand_N_Attribute_Reference): Add dummy entry
4971 for Enum_Image.
4972 * sem_attr.adb: Implement Enum_Image attribute.
4973 * snames.ads-tmpl: Add entries for Enum_Image attribute.
4974
db761fee
AC
49752015-01-06 Robert Dewar <dewar@adacore.com>
4976
4977 * namet.ads: Document use of Boolean2 for No_Use_Of_Entity.
4978 * restrict.ads (No_Use_Of_Entity): New table.
4979 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
4980 Ignore No_Use_Of_Entity (will be processed in parser).
4981 * snames.ads-tmpl: Add entry for Name_No_Use_Of_Entity.
4982
49832015-01-06 Vincent Celier <celier@adacore.com>
4984
4985 * prj-tree.adb (Imported_Or_Extended_Project_Of): Do not try
4986 to check for an extended project, if a project does not have
4987 yet a project declaration.
4988
0566484a
AC
49892015-01-06 Pierre-Marie Derodat <derodat@adacore.com>
4990
4991 * scos.ads: Update documentation about the SCO table build
4992 process and about table records format.
4993 * par_sco.ads (SCO_Record): Rename to SCO_Record_Raw.
4994 (SCO_Record_Filtered): New procedure.
4995 (Set_SCO_Logical_Operator): New procedure.
4996 (dsco): Update documentation.
4997 * par_sco.adb: Update library-level comments.
4998 (SCO_Generation_State_Type): New type.
4999 (SCO_Generation_State): New variable.
5000 (SCO_Raw_Table): New package instanciation.
5001 (Condition_Pragma_Hash_Table): Rename to SCO_Raw_Hash_Table.
5002 ("<"): New.
5003 (Tristate): New type.
5004 (Is_Logical_Operator): Return Tristate and update documentation.
5005 (Has_Decision): Update call to Is_Logical_Operator and complete
5006 documentation.
5007 (Set_Table_Entry): Rename to Set_Raw_Table_Entry, update
5008 comment, add an assertion for state checking and change
5009 references to SCO_Table into SCO_Raw_Table.
5010 (dsco): Refactor to dump the raw and the filtered tables.
5011 (Process_Decisions.Output_Decision_Operand): Handle putative
5012 short-circuit operators.
5013 (Process_Decisions.Output_Element): Update references
5014 to Set_Table_Entry and to Condition_Pragma_Hash_Table.
5015 (Process_Decisions.Process_Decision_Operand): Update call
5016 to Is_Logical_Operator.
5017 (Process_Decisions.Process_Node): Handle putative short-circuit
5018 operators and change references to
5019 SCO_Table into SCO_Raw_Table.
5020 (SCO_Output): Add an assertion
5021 for state checking and remove code that used to stamp out SCO entries.
5022 (SCO_Pragma_Disabled): Change reference to SCO_Table
5023 into SCO_Raw_Table.
5024 (SCO_Record): Rename to SCO_Record_Raw,
5025 add an assertion for state checking and change references
5026 to SCO_Table into SCO_Raw_Table.
5027 (Set_SCO_Condition): Add an assertion for state checking, update
5028 references to Condition_Pragma_Hash_Table and change references to
5029 SCO_Table into SCO_Raw_Table.
5030 (Set_SCO_Pragma_Enabled): Add an assertion for state checking and
5031 change references to SCO_Table into SCO_Raw_Table.
5032 (Set_SCO_Logical_Operator): New procedure.
5033 (Traverse_Declarations_Or_Statements.Set_Statement_Entry): Update
5034 references to Set_Table_Entry and to Condition_Pragma_Hash_Table.
5035 (SCO_Record_Fildered): New procedure.
5036 * gnat1drv.adb (Gnat1drv): Invoke the SCO filtering pass.
5037 * lib-writ.adb (Write_ALI): Invoke the SCO filtering pass and
5038 output SCOs.
5039 * par-load.adb (Load): Update reference to SCO_Record.
5040 * par.adb (Par): Update reference to SCO_Record.
5041 * put_scos.adb (Put_SCOs): Add an assertion to check that no
5042 putative SCO condition reaches this end.
5043 * sem_ch10.adb (Analyze_Proper_Body): Update reference to SCO_Record.
5044 * sem_res.adb (Resolve_Logical_Op): Validate putative SCOs
5045 when corresponding to an "and"/"or" operator affected by the
5046 Short_Circuit_And_Or pragma.
5047
50482015-01-06 Robert Dewar <dewar@adacore.com>
5049
5050 * sem_ch8.adb (Analyze_Use_Package): Give more specific error
5051 msg for attempted USE of generic subprogram or subprogram.
5052
72eaa365
AC
50532015-01-06 Robert Dewar <dewar@adacore.com>
5054
5055 * s-valllu.adb, a-tiinau.adb, a-timoau.adb, a-ztinau.adb, a-ztmoau.adb,
5056 s-valuns.adb, s-valrea.adb, a-wtflau.adb, a-tiflau.adb, a-ztflau.adb,
5057 a-wtinau.adb, a-wtmoau.adb: Document recognition of : in place of #.
5058
50592015-01-06 Ed Schonberg <schonberg@adacore.com>
5060
5061 * sem_ch13.adb (Analyze_Aspect_Specifications): For aspects
5062 that specify stream subprograms, if the prefix is a class-wide
5063 type then the generated attribute definition clause must apply
5064 to the same class-wide type.
5065 (Default_Iterator): An iterator defined by an aspect of some
5066 container type T must have a first parameter of type T, T'class,
5067 or an access to such (from code reading RM 5.5.1 (2/3)).
5068
50692015-01-06 Arnaud Charlet <charlet@adacore.com>
5070
5071 * gnat1drv.adb: Minor: complete previous change.
5072
50732015-01-06 Olivier Hainque <hainque@adacore.com>
5074
5075 * set_targ.ads (C_Type_For): New function. Return the name of
5076 a C type supported by the back-end and suitable as a basis to
5077 construct the standard Ada floating point type identified by
5078 the T parameter. This is used as a common ground to feed both
5079 ttypes values and the GNAT tree nodes for the standard floating
5080 point types.
5081 * set_targ.adb (Long_Double_Index): The index at which "long
5082 double" gets registered in the FPT_Mode_Table. This is useful to
5083 know whether we have a "long double" available at all and get at
5084 it's characteristics without having to search the FPT_Mode_Table
5085 when we need to decide which C type should be used as the
5086 basis for Long_Long_Float in Ada.
5087 (Register_Float_Type): Fill Long_Double_Index.
5088 (FPT_Mode_Index_For): New function. Return the index in
5089 FPT_Mode_Table that designates the entry corresponding to the
5090 provided C type name.
5091 (FPT_Mode_Index_For): New function. Return the index in
5092 FPT_Mode_Table that designates the entry for a back-end type
5093 suitable as a basis to construct the standard Ada floating point
5094 type identified by the input T parameter.
5095 (elaboration code): Register_Back_End_Types unconditionally,
5096 so C_Type_For can operate regardless of -gnateT. Do it
5097 early so we can query it for the floating point sizes, via
5098 FPT_Mode_Index_For. Initialize Float_Size, Double_Size and
5099 Long_Double_Size from the FPT_Mode_Table, as cstand will do.
5100 * cstand.adb (Create_Float_Types): Use C_Type_For to determine
5101 which C type should be used as the basis for the construction
5102 of the Standard Ada floating point types.
5103 * get_targ.ads (Get_Float_Size, Get_Double_Size,
5104 Get_Long_Double_Size): Remove.
5105 * get_targ.adb: Likewise.
5106
51072015-01-06 Thomas Quinot <quinot@adacore.com>
5108
5109 * sem_cat.adb (In_RCI_Declaration): Remove unnecessary
5110 parameter and rename to...
5111 (In_RCI_Visible_Declarations): Fix handling of private part of nested
5112 package.
5113 (Validate_RCI_Subprogram_Declaration): Reject illegal function
5114 returning anonymous access in RCI unit.
5115
948ed277
AC
51162015-01-06 Ed Schonberg <schonberg@adacore.com>
5117
5118 * sem_ch6.adb (New_Overloaded_Entity): In GNATprove mode, a
5119 function wrapper may be a homonym of another local declaration.
5120 * sem_ch8.adb (Analyze_Subprogram_Renaming): In GNATprove mode,
5121 build function and operator wrappers after the actual subprogram
5122 has been resolved, and replace the standard renaming declaration
5123 with the declaration of wrapper.
5124 * sem_ch12.ads (Build_Function_Wrapper, Build_Operator_Wraooer):
5125 make public for use elsewhere.
5126 * sem_ch12.adb (Build_Function_Wrapper, Build_Operator_Wraooer):
5127 rewrite, now that actual is fully resolved when wrapper is
5128 constructed.
5129
51302015-01-06 Javier Miranda <miranda@adacore.com>
5131
5132 * exp_disp.adb: Revert previous change.
5133
a921e83c
AC
51342015-01-06 Robert Dewar <dewar@adacore.com>
5135
5136 * exp_util.adb: Change name Name_Table_Boolean to
5137 Name_Table_Boolean1.
5138 * namet.adb: Change name Name_Table_Boolean to Name_Table_Boolean1
5139 Introduce Name_Table_Boolean2/3.
5140 * namet.ads: Change name Name_Table_Boolean to Name_Table_Boolean1
5141 Introduce Name_Table_Boolean2/3.
5142 * par-ch13.adb: Change name Name_Table_Boolean to
5143 Name_Table_Boolean1.
5144
51452015-01-06 Bob Duff <duff@adacore.com>
5146
5147 * gnat_rm.texi: Improve documentation regarding No_Task_Termination.
5148
51492015-01-06 Ed Schonberg <schonberg@adacore.com>
5150
5151 * sem_aggr.adb (Resolve_Record_Aggregte, Get_Value): For an
5152 others choice that covers multiple components, analyze each
5153 copy with the type of the component even in compile-only mode,
5154 to detect potential accessibility errors.
5155
51562015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
5157
5158 * sem_res.adb (Is_Assignment_Or_Object_Expression): New routine.
5159 (Resolve_Actuals): An effectively volatile out
5160 parameter cannot act as an in or in out actual in a call.
5161 (Resolve_Entity_Name): An effectively volatile out parameter
5162 cannot be read.
5163
51642015-01-06 Ed Schonberg <schonberg@adacore.com>
5165
5166 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If the body is
5167 the expansion of an expression function it may be pre-analyzed
5168 if a 'access attribute is applied to the function, in which case
5169 last_entity may have been assigned already.
5170
51712015-01-06 Ed Schonberg <schonberg@adacore.com>
5172
5173 * sem_ch4.adb (Analyze_One_Call): If formal has an incomplete
5174 type and actual has the corresponding full view, there is no
5175 error, but a case of use of incomplete type in a predicate or
5176 invariant expression.
5177
51782015-01-06 Vincent Celier <celier@adacore.com>
5179
5180 * makeutl.adb (Insert_No_Roots): Make sure that the same source
5181 in two different project tree is checked in both trees, if they
5182 are sources of two different projects, extended or not.
5183
51842015-01-06 Arnaud Charlet <charlet@adacore.com>
5185
5186 * gnat1drv.adb: Minor code clean up.
5187 (Adjust_Global_Switches): Ignore gnatprove_mode in codepeer_mode.
5188
51892015-01-06 Bob Duff <duff@adacore.com>
5190
5191 * osint.adb (Read_Source_File): Don't print out
5192 file name unless T = Source.
5193
51942015-01-06 Ed Schonberg <schonberg@adacore.com>
5195
5196 * sem_util.adb (Is_Variable, Is_OK_Variable_For_Out_Formal):
5197 recognize improper uses of constant_reference types as actuals
5198 for in-out parameters.
5199 (Check_Function_Call): Do not collect identifiers if function
5200 name is missing because of previous error.
5201
ac16e74c
RD
52022015-01-06 Robert Dewar <dewar@adacore.com>
5203
5204 * ali-util.adb, sem_prag.adb, rtsfind.adb, sem_util.adb, sem_res.adb,
5205 ali.adb, binde.adb, namet.adb, namet.ads, gnatls.adb, bcheck.adb:
5206 Minor change of name Name_Table_Info => Name_Table_Int.
5207
4b6f99f5
RD
52082015-01-06 Robert Dewar <dewar@adacore.com>
5209
5210 * exp_strm.adb (Build_Elementary_Input_Call): Clarify comments
5211 in previous checkin.
5212 * freeze.adb (Freeze_Fixed_Point_Type): Add warning for shaving
5213 of bounds.
5214 * sem_prag.adb, sem_ch10.adb, sem_ch6.adb: Minor reformatting.
5215
21f30884
AC
52162015-01-06 Vincent Celier <celier@adacore.com>
5217
5218 * a-strsup.adb (Times (Natural;String;Positive)): Raise
5219 Length_Error, not Index_Error, when the result is too long.
5220
52212015-01-06 Thomas Quinot <quinot@adacore.com>
5222
5223 * a-direct.adb (Create_Path): Minor error handling and
5224 performance improvement.
5225
52262015-01-06 Robert Dewar <dewar@adacore.com>
5227
5228 * checks.ads, sem_ch12.adb: Minor reformatting.
5229 * exp_ch4.adb (Expand_N_Op_Divide): Generate explicit divide by
5230 zero check for fixed-point case if Backend_Divide_Checks_On_Target
5231 is False.
5232
52332015-01-06 Robert Dewar <dewar@adacore.com>
5234
5235 * sem_prag.adb (Analyze_Pragma, case No_Elaboration_Code_All):
5236 Do not set restriction No_Elaboration_Code unless the pragma
5237 appears in the main unit).
5238
52392015-01-06 Ed Schonberg <schonberg@adacore.com>
5240
5241 * sem_ch10.adb (Is_Regular_With_Clause): Add guard to verify
5242 that with clause has already been analyzed before checking kind
5243 of with_clause.
5244
52452015-01-06 Robert Dewar <dewar@adacore.com>
5246
5247 * exp_strm.adb (Build_Elementary_Input_Call): Return base type
5248 (as required by RM).
5249
91afcbfd
AC
52502015-01-06 Arnaud Charlet <charlet@adacore.com>
5251
5252 * a-reatim.adb ("/"): Add explicit pragma Unsuppress (Division_Check).
5253
52542015-01-06 Robert Dewar <dewar@adacore.com>
5255
5256 * sem_prag.adb (Process_Suppress_Unsuppress): Add extra warning
5257 for ignoring pragma Suppress (Elaboration_Check) in SPARK mode.
5258
52592015-01-06 Javier Miranda <miranda@adacore.com>
5260
5261 * exp_disp.adb (Expand_Interface_Conversion): No displacement
5262 of the pointer to the object needed when the type of the operand
5263 is not an interface type and the interface is one of its parent
5264 types (since they share the primary dispatch table).
5265
966fc9c5
AC
52662015-01-06 Vincent Celier <celier@adacore.com>
5267
5268 * prj-env.adb: Minor comment update.
5269
52702015-01-06 Javier Miranda <miranda@adacore.com>
5271
5272 * sem_res.adb (Valid_Conversion): Restrict the checks on anonymous
5273 access types whose target type is an interface type to operands
5274 that are access types; required to report an error when the
5275 operand is not an access type.
5276
4528ead5
AC
52772015-01-06 Bob Duff <duff@adacore.com>
5278
5279 * a-cfinve.adb (Copy): Set the discriminant to the Length when
5280 Capacity = 0.
5281 * a-cofove.ads (Capacity): Add a postcondition.
5282 * a-cfinve.ads (Capacity): Add a postcondition.
5283 (Reserve_Capacity): Correct the postcondition in the case where
5284 Capacity = 0; that means "Capacity => Length (Container)".
5285 * a-cofove.adb (Elems[c]): Add a comment
5286 explaining the dangers and how to avoid them.
5287
52882015-01-06 Ed Schonberg <schonberg@adacore.com>
5289
5290 * sem_ch12.adb: Code clean up.
966fc9c5 5291
6260b90c
AC
52922015-01-06 Arnaud Charlet <charlet@adacore.com>
5293
5294 * gnatvsn.ads: Bump copyright year.
5295
de4ac038
AC
52962015-01-06 Robert Dewar <dewar@adacore.com>
5297
5298 * s-taskin.ads, s-traces.ads: Minor reformatting.
5299 * exp_util.adb: Minor typo fix.
5300
53012015-01-06 Vincent Celier <celier@adacore.com>
5302
5303 * gnatls.adb (Search_RTS): Invoke Initialize_Default_Project_Path
5304 with the runtime name.
5305 * prj-env.adb (Initialize_Default_Project_Path): When both
5306 Target_Name and Runtime_Name are not empty string, add to the
5307 project path the two directories .../lib/gnat and .../share/gpr
5308 related to the runtime.
5309 * prj-env.ads (Initialize_Default_Project_Path): New String
5310 parameter Runtime_Name, defaulted to the empty string.
5311
53122015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
5313
5314 * frontend.adb: Guard against the case where a configuration
5315 pragma may be split into multiple pragmas and the original
5316 rewritten as a null statement.
5317 * sem_prag.adb (Analyze_Pragma): Insert a brand new Check_Policy
5318 pragma using Insert_Before rather than Insert_Action. This
5319 takes care of the configuration pragma case where Insert_Action
5320 would fail.
5321
53222015-01-06 Bob Duff <duff@adacore.com>
5323
5324 * a-coboho.ads (Element_Access): Add "pragma
5325 No_Strict_Aliasing (Element_Access);". This is needed because
5326 we are unchecked-converting from Address to Element_Access.
5327 * a-cofove.ads, a-cofove.adb (Elems,Elemsc): Fix bounds of the
5328 result to be 1.
5329
53302015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
5331
5332 * sem_res.adb (Resolve_Actuals): Remove the
5333 restriction which prohibits volatile actual parameters with
5334 enabled external propery Async_Writers to act appear in procedure
5335 calls where the corresponding formal is of mode OUT.
5336
b67cd4e3
JJ
53372015-01-05 Jakub Jelinek <jakub@redhat.com>
5338
5339 * gnat_ugn.texi: Bump @copying's copyright year.
5340
ef3a7cca
EB
53412015-01-05 Eric Botcazou <ebotcazou@adacore.com>
5342
5343 PR ada/64492
5344 * gcc-interface/Makefile.in (../stamp-tools): Reinstate dropped code.
5345
1a78ef4c
UB
53462015-01-04 Uros Bizjak <ubizjak@gmail.com>
5347
5348 * gcc-interface/misc.c (internal_error_function): Use xasprintf instead
5349 of unchecked asprintf.
5350
ad41bd84 5351\f
b67cd4e3 5352Copyright (C) 2015 Free Software Foundation, Inc.
ad41bd84
JM
5353
5354Copying and distribution of this file, with or without modification,
5355are permitted in any medium without royalty provided the copyright
5356notice and this notice are preserved.