1 2015-10-16 Bob Duff <duff@adacore.com>
3 * debug.adb: Document -gnatdQ switch.
5 2015-10-16 Ed Schonberg <schonberg@adacore.com>
7 * sem_ch12.adb (Analyze_Formal_Subprogram): Implement rule that
8 a formal abstract subprogram cannot have a null default: RM 12.6
11 2015-10-16 Bob Duff <duff@adacore.com>
13 * sem_util.ads, sinput.ads, bcheck.adb: Minor comment fixes.
15 2015-10-16 Javier Miranda <miranda@adacore.com>
17 * inline.adb (Add_Inlined_Body): Ensure that
18 Analyze_Inlined_Bodies will be invoked after completing the
19 analysis of the current unit.
21 2015-10-16 Arnaud Charlet <charlet@adacore.com>
23 * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order): Fix error
24 message for bad last bit position.
25 * sem_ch3.adb, sem_util.adb, sem_util.ads: Minor reformatting.
27 2015-10-16 Ed Schonberg <schonberg@adacore.com>
29 * exp_ch5.adb (Expand_N_Case_Statement): If expression is
30 compile-time known but does not obey a static predicate on
31 its type, replace the case statement with a raise statement,
32 as with other statically detected constraint violations.
34 2015-10-16 Bob Duff <duff@adacore.com>
36 * s-traceb.adb, s-traceb.ads, s-traceb-hpux.adb, s-traceb-mastop.adb:
38 * opt.ads: Minor typo.
40 2015-10-16 Ed Schonberg <schonberg@adacore.com>
42 * sem_util.adb (Gather_Components): When gathering components
43 of a nested variant, the record type used in legality checks is
44 the enclosing record type.
46 2015-10-13 Jakub Jelinek <jakub@redhat.com>
48 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10,
49 DEF_FUNCTION_TYPE_11): Define.
51 2015-10-09 Eric Botcazou <ebotcazou@adacore.com>
53 * gcc-interface/Make-lang.in: Make sure that GNAT1_OBJS and not just
54 GNAT1_ADA_OBJS are compiled only after generated files are created.
56 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
58 * gcc-interface/trans.c (convert_with_check): Use real_arithmetic
59 instead of REAL_ARITHMETIC.
61 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
63 * gcc-interface/trans.c (convert_with_check): Use real_less instead
66 2015-10-02 Doug Rupp <rupp@adacore.com>
67 Olivier Hainque <hainque@adacore.com>
69 * gcc-interface/lang.opt (fbuiltin-printf): Accept.
70 * gcc-interface/misc.c (gnat_handle_option): Ignore it.
71 * gcc-interface/lang-specs.h (@ada, @adawhy, @adascil): Propagate -f*
72 flags as -g* and -m* flags past -gnatez.
74 2015-10-02 Eric Botcazou <ebotcazou@adacore.com>
76 * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Warnings>: Replace
77 linear search with call to find_opt and issue warnings if the -W
78 switch is not appropriate.
80 2015-10-02 Eric Botcazou <ebotcazou@adacore.com>
82 * gcc-interface/ada-tree.h (DECL_RESTRICTED_ALIASING_P): New flag.
83 * gcc-interface/decl.c (gnat_to_gnu_param): For parameters passed by
84 reference but whose type isn't by-ref and whose mechanism hasn't been
85 forced to by-ref, set the DECL_RESTRICTED_ALIASING_P flag directly on
86 them instead of changing their type.
87 * gcc-interface/trans.c (scan_rhs_r): New helper function.
88 (independent_iterations_p): New predicate.
89 (Loop_Statement_to_gnu): For a loop with an iteration scheme, set an
90 ivdep pragma if the iterations are independent.
92 2015-10-02 Eric Botcazou <ebotcazou@adacore.com>
94 * gcc-interface/trans.c (find_loop_for): Use FOR_EACH_VEC_ELT_REVERSE.
95 (Loop_Statement_to_gnu): Use FOR_EACH_VEC_ELT.
96 (finalize_nrv): Use FOR_EACH_VEC_SAFE_ELT and initialize field.
97 (build_stmt_group): Add blank lines.
99 2015-09-30 Thomas Schwinge <thomas@codesourcery.com>
101 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_11): Don't define.
103 2015-09-28 Tom de Vries <tom@codesourcery.com>
105 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_6): Define.
107 2015-09-17 Eric Botcazou <ebotcazou@adacore.com>
109 * gcc-interface/trans.c (emit_check): Do not touch TREE_SIDE_EFFECTS.
111 2015-09-14 Pierre-Marie de Rodat <derodat@adacore.com>
113 * gcc-interface/misc.c (gnat_post_options): Issue a warning if
114 generating STABS debugging information when not the default.
116 2015-09-14 Eric Botcazou <ebotcazou@adacore.com>
118 * gcc-interface/gigi.h (ref_filename): Delete.
119 (Sloc_to_locus): Add clean_column parameter defaulting to false.
120 (build_call_raise): Adjust comment.
121 (build_call_raise_range): Move around.
122 * gcc-interface/trans.c (ref_filename): Delete.
123 (gigi): Fix formatting.
124 (block_end_locus_sink): Delete.
125 (Sloc_to_locus1): Tidy up and reformat. Rename into...
126 (Sloc_to_locus): ...this. Add default for clean_colmun parameter.
127 (set_expr_location_from_node1): Rename into...
128 (set_expr_location_from_node): ...this.
129 (set_end_locus_from_node): Move around. Adjust for renaming.
130 (Handled_Sequence_Of_Statements_to_gnu): Likewise.
131 (add_cleanup): Likewise.
132 * gcc-interface/utils2.c (expand_sloc): New static function.
133 (build_call_raise): Call it.
134 (build_call_raise_column): Likewise.
135 (build_call_raise_range): Likewise. Move around.
137 2015-09-14 Eric Botcazou <ebotcazou@adacore.com>
139 * gcc-interface/utils2.c (gnat_rewrite_reference) <COMPOUND_EXPR>: Add
140 another acceptable pattern for the RHS.
142 2015-07-24 Micahel Darling <darlingm@gmail.com>
145 * prj-nmsc.adb: Reflects renaming of configure.in to configure.ac
146 * gcc-interface/Makefile.in: Likewise
148 2015-07-12 Aldy Hernandez <aldyh@redhat.com>
150 * gcc-interface/utils.c: Fix double word typos.
151 * gnat_ugn.texi: Same.
154 * projects.texi: Same.
158 * sem_eval.adb: Same.
159 * sem_prag.adb: Same.
160 * sem_warn.adb: Same.
162 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
164 * gcc-interface/cuintp.c: Adjust includes.
165 * gcc-interface/decl.c: Likewise.
166 * gcc-interface/misc.c: Likewise.
167 * gcc-interface/targtyps.c: Likewise.
168 * gcc-interface/trans.c: Likewise.
169 * gcc-interface/utils.c: Likewise.
170 * gcc-interface/utils2.c: Likewise.
172 2015-07-06 John Marino <gnugcc@marino.st>
174 * s-oscons-tmplt.c: Add support for DragonFly alongside FreeBSD.
176 2015-06-29 Eric Botcazou <ebotcazou@adacore.com>
179 * gcc-interface/utils.c (gnat_write_global_declarations): Always
180 build the dummy global variable if code was generated.
182 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
185 * gcc-interface/misc.c (gnat_post_options): No need to disable
186 warn_unused_parameter anymore.
188 2015-06-26 Eric Botcazou <ebotcazou@adacore.com>
190 * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): When
191 not optimizing the CFG, clear the DECL_DECLARED_INLINE_P flag on the
194 2015-06-26 Eric Botcazou <ebotcazou@adacore.com>
196 * gcc-interface/gigi.h (note_types_used_by_globals): Delete.
197 (gnat_write_global_declarations): New prototype.
198 * gcc-interface/utils.c (type_decls): Rename back to...
199 (global_decls): ...this.
200 (gnat_pushdecls): Revert previous change.
201 (create_var_decl): Do not output global variables.
202 (note_types_used_by_globals): Rename back to...
203 (gnat_write_global_declarations): ...this. Output variables on the
205 * gcc-interface/misc.c (gnat_parse_file): Adjust to above renaming.
207 2015-06-26 Eric Botcazou <ebotcazou@adacore.com>
209 * gcc-interface/gigi.h (create_var_decl_1): Rename into...
210 (create_var_decl): ...this. Add default value for last parameter.
211 (create_type_stub_decl): Adjust.
212 (create_type_decl): Likewise.
213 (create_field_decl): Likewise.
214 (create_param_decl): Likewise.
215 (create_label_decl): Likewise.
216 (create_subprog_decl): Likewise.
217 * gcc-interface/utils.c (create_var_decl_1): Rename into...
218 (create_var_decl): ...this. Rename var_name into name and var_init
219 into init, move const_decl_allowed_p last and adjust accordingly.
220 (create_type_stub_decl): Rename type_name into name and adjust.
221 (create_type_decl): Likewise.
222 (create_field_decl): Likewise for field_name and field_type.
223 (create_param_decl): Likewise for param_name and param_type.
224 (create_label_decl): Likewise for label_name.
225 (create_subprog_decl): Likewise for subprog_name and subprog_type.
226 * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust couple of calls
227 to create_var_decl_1.
229 2015-06-26 Eric Botcazou <ebotcazou@adacore.com>
231 * gcc-interface/trans.c (loop_info_d): Add low_bound, high_bound,
232 artificial, has_checks and warned_aggressive_loop_optimizations.
233 (gigi): Set warn_aggressive_loop_optimizations to 0.
234 (inside_loop_p): New inline predicate.
235 (push_range_check_info): Rename into...
236 (find_loop_for): ...this and do not push range_check_info_d object.
237 (Loop_Statement_to_gnu): Set artificial, low_bound and high_bound
238 fields of gnu_loop_info. Adjust detection of checks enabled by
239 -funswitch-loops and adds one for -faggressive-loop-optimizations.
240 (gnat_to_gnu) <N_Indexed_Component>: If aggressive loop optimizations
241 are enabled, warn for loops overrunning an array of size 1 not at the
244 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
246 * gcc-interface/trans.c: Remove ipa-ref.h and plugin-api.h from include
248 * gcc-interface/utils.c: Likewise.
250 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
252 * gcc-interface/decl.c (value_annotation_hasher): Inherit from
253 ggc_cache_ptr_hash rather than ggc_cache_hasher.
254 * gcc-interface/utils.c (pad_type_hasher): Likewise.
256 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
258 * gcc-interface/decl.c (value_annotation_hasher::handle_cache_entry):
260 (value_annotation_hasher::keep_cache_entry): New function.
261 * gcc-interface/utils.c (pad_type_hasher::handle_cache_entry):
263 (pad_type_hasher::keep_cache_entry): New function.
265 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
267 * gcc-interface/misc.c: Include calls.h not function.h.
269 2015-06-19 Eric Botcazou <ebotcazou@adacore.com>
271 * gcc-interface/gigi.h (record_builtin_type): Adjust comment.
272 (tree create_type_decl): Likewise.
273 (create_var_decl_1): Add artificial_p and debug_info_p parameters.
274 (create_var_decl): Likewise.
275 (create_true_var_decl): Delete.
276 (create_subprog_decl): Add debug_info_p parameter.
277 * gcc-interface/decl.c (gnat_to_gnu_entity): Add artificial_p local
278 variable and use it throughout. Remove DECL_ARTIFICIAL settings.
279 <E_Variable>: Adjust calls to create_var_decl and create_var_decl_1.
280 Remove DECL_IGNORED_P settings.
281 <E_Enumeration_Type>: Likewise.
282 <E_Record_Type>: Likewise.
283 <E_Subprogram_Type>: Likewise. Remove artificial_flag local variable.
284 Adjust call to create_subprog_decl.
285 (get_minimal_subprog_decl): Likewise.
286 (elaborate_expression_1): Adjust call to create_var_decl.
287 * gcc-interface/trans.c (gigi): Adjust calls to create_var_decl and
288 create_subprog_decl. Remove DECL_ARTIFICIAL & DECL_IGNORED_P settings.
289 * gcc-interface/utils.c (maybe_pad_type): Likewise.
290 (record_builtin_type): Adjust comment.
291 (create_type_stub_decl): Remove obsolete comment.
292 (create_var_decl_1): Add artificial_p and debug_info_p parameters.
293 Set DECL_ARTIFICIAL and DECL_IGNORED_P accordingly.
294 (create_subprog_decl): Add debug_info_p parameter. Set DECL_IGNORED_P
297 2015-06-19 Eric Botcazou <ebotcazou@adacore.com>
299 * gcc-interface/misc.c (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): Define.
301 2015-06-19 Eric Botcazou <ebotcazou@adacore.com>
303 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Make sure
304 the size of a padding type built around the return type is positive.
305 * gcc-interface/trans.c (gnat_to_gnu) <N_Simple_Return_Statement>:
306 Use INIT_EXPR instead of MODIFY_EXPR to assign to the return object.
308 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
310 * gcc-interface/cuintp.c: Do not include input.h, line-map.h or is-a.h.
311 * gcc-interface/decl.c: Likewise.
312 * gcc-interface/misc.c: Likewise.
313 * gcc-interface/targtyps.c: Likewise.
314 * gcc-interface/trans.c: Likewise.
315 * gcc-interface/utils.c: Likewise.
316 * gcc-interface/utils2.c: Likewise.
318 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
320 * gcc-interface/utils.c (get_global_context): Register the main
321 translation unit through the new debug hook.
323 2015-06-09 Eric Botcazou <ebotcazou@adacore.com>
325 * gcc-interface/misc.c: Remove duplicate include directives.
326 * gcc-interface/trans.c: Likewise.
327 * gcc-interface/utils.c: Likewise.
329 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
331 * gcc-interface/cuintp.c : Adjust include files.
332 * gcc-interface/decl.c : Likewise.
333 * gcc-interface/misc.c : Likewise.
334 * gcc-interface/targtyps.c : Likewise.
335 * gcc-interface/trans.c : Likewise.
336 * gcc-interface/utils.c : Likewise.
337 * gcc-interface/utils2.c : Likewise.
339 2015-06-08 John Marino <gnugcc@marino.st>
341 * a-intnam-dragonfly.ads: New.
342 * s-osinte-dragonfly.adb: Likewise.
343 * s-osinte-dragonfly.ads: Likewise.
344 * system-dragonfly-x86_64.ads: Likewise.
345 * adaint.c: Add BSD macros.
346 * cstreams.c: Likewise.
347 * gsocket.h: Likewise.
349 * socket.c: Likewise.
350 * env.c: Add __DragonFly__, remove __FreeBSD__ macro.
351 * init.c: Add __DragonFly__, change __gnat_install_handler
352 prototype from empty to void.
353 * initialize.c: Add __DragonFly__.
354 * sysdep.c: Likewise.
355 * s-osinte-freebsd.adb: Use __get_errno instead of __error.
356 * tracebak.c: Set unwinder for i386 BSD.
357 * gcc-interface/Makefile.in: Add x86_64 DragonFly, tweak
358 x86_64 FreeBSD and x86 FreeBSD.
360 2015-06-06 Eric Botcazou <ebotcazou@adacore.com>
362 * gcc-interface/utils.c (note_types_used_by_globals): Tweak comment.
363 * gcc-interface/decl.c (gnat_to_gnu_entity): Likewise.
365 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
367 * gcc-interface/gigi.h (note_types_used_by_globals): Rename from
368 gnat_write_global_declarations.
369 * gcc-interface/misc.c (gnat_parse_file): Call
370 note_types_used_by_globals.
371 Remove LANG_HOOKS_WRITE_GLOBALS.
372 * gcc-interface/utils.c: Rename global_decls to type_decls.
373 (gnat_write_global_declarations): Rename
374 to note_types_used_by_globals.
375 Remove call to finalize_compilation_unit.
376 Remove call to debug_hooks->global_decl for globals.
377 (gnat_pushdecls): Only insert into type_decls if TYPE_DECL.
379 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
381 * gcc-interface/cuintp.c: Adjust includes for restructured coretypes.h.
382 * gcc-interface/decl.c: Likewise.
383 * gcc-interface/misc.c: Likewise.
384 * gcc-interface/targtyps.c: Likewise.
385 * gcc-interface/trans.c: Likewise.
386 * gcc-interface/utils.c: Likewise.
387 * gcc-interface/utils2.c: Likewise.
389 2015-06-04 Pierre-Marie de Rodat <derodat@adacore.com>
391 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: If
392 processing a definition, create definitions for padding types
395 2015-06-03 Eric Botcazou <ebotcazou@adacore.com>
397 * gcc-interface/utils.c (copy_type): Also set TYPE_CANONICAL.
399 2015-06-03 Eric Botcazou <ebotcazou@adacore.com>
401 * gcc-interface/trans.c (gnat_to_gnu) <N_Simple_Return_Statement>: Fix
402 typo in latest change.
404 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
406 * gcc-interface/Makefile.in: Fix ARM/Darwin configuration.
408 2015-06-01 Pierre-Marie de Rodat <derodat@adacore.com>
410 * gcc-interface/utils.c (scale_by_factor_of): When handling a function
411 call expression, process the corresponding function body. Also handle
414 2015-06-01 Pierre-Marie de Rodat <derodat@adacore.com>
416 * gcc-interface/decl.c (gnat_to_gnu_entity): Replace pointer types with
417 references ones for functions that return references.
419 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
421 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: For a
422 definition of a type coming from a limited_with, get to the full view
423 if it is not in the main code unit.
425 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
427 * gcc-interface/utils.c (create_var_decl_1): If an assembler name is
428 specified, let the target mangle it before settting.
429 (create_subprog_decl): Likewise and move this treatment last.
431 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
433 * gcc-interface/lang-specs.h (TARGET_VXWORKS_RTP): Move substitution to
434 before first -gnatez switch. Simplify and add trailing space.
436 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
438 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: If the
439 record has a parent field and a representation clause, make sure that
440 it is properly aligned.
442 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
444 * gcc-interface/trans.c (lvalue_required_p) <N_Indexed_Component>: Deal
445 with character and enumeration literals as index values.
447 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
449 * gcc-interface/gigi.h (build_simple_component_ref): Declare.
450 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Deal with
451 address clause on aliased object with unconstrained nominal subtype.
452 Mark the aligning variable as artificial, do not convert the address
453 expression immediately but mark it as constant instead.
454 * gcc-interface/utils.c (convert): If the target type contains a
455 template, be prepared for an empty array.
456 (maybe_unconstrained_array): Likewise.
457 * gcc-interface/utils2.c (known_alignment) <POINTER_PLUS_EXPR>: Deal
458 with the pattern built for aligning types.
459 <INTEGER_CST>: Do not cap the value at BIGGEST_ALIGNMENT.
460 (build_simple_component_ref): Make public.
461 If the base object is a constructor that contains a template, fold the
462 result field by field.
464 2015-05-31 Eric Botcazou <ebotcazou@adacore.com>
466 * s-oscons-tmplt.c: Add explicit tests for Android alongside Linux.
468 2015-05-30 Eric Botcazou <ebotcazou@adacore.com>
470 * adaint.c: Test for __linux__ instead of linux and __sun__ instead
471 of sun. Add missing leading underscore to AIX. Remove #elif 0.
472 * adaint.h: Likewise.
474 * cstreams.c: Likewise.
476 * gsocket.h: Likewise.
477 * init.c: Likewise. Test for __i386__ instead of i386.
479 * s-oscons-tmplt.c: Likewise.
480 * sysdep.c: Likewise.
481 * terminals.c: Likewise. Use BSD symbol instead of FREEBSD.
482 * tracebak.c: Likewise. Test for __sparc__ instead of sparc.
484 2015-05-28 Eric Botcazou <ebotcazou@adacore.com>
486 * gcc-interface/utils.c (max_size) <tcc_binary>: Add special code to
487 deal with the subtraction of a "negative" value in an unsigned type.
489 2015-05-28 Eric Botcazou <ebotcazou@adacore.com>
491 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Do
492 not error out on a return type which has a size that overflows if the
493 return is done by invisible reference.
495 2015-05-28 Eric Botcazou <ebotcazou@adacore.com>
497 * gcc-interface/utils.c (gnat_pushdecl): Reunify the handling of array
498 and pointer types wrt DECL_ORIGINAL_TYPE and adjust left and right.
500 2015-05-28 Eric Botcazou <ebotcazou@adacore.com>
502 * gcc-interface/gigi.h (gnat_stabilize_reference): Adjust.
503 (rewrite_fn): Remove third parameter.
504 (type_is_padding_self_referential): New inline predicate.
505 (return_type_with_variable_size_p): Likewise.
506 * gcc-interface/decl.c (allocatable_size_p): More around.
507 (cannot_be_superflat_p): Rename into...
508 (cannot_be_superflat ): ...this.
509 (initial_value_needs_conversion): New predicate.
510 (gnat_to_gnu_entity): Invoke type_is_padding_self_referential,
511 initial_value_needs_conversion and adjust to above renaming.
512 For a renaming, force the materialization if the inner expression
513 is compound. Adjust calls to elaborate_reference and build a
514 compound expression if needed.
515 (struct er_dat): Add N field.
516 (elaborate_reference_1): Remove N parameter and adjust.
517 (elaborate_reference): Add INIT parameter and pass it in the call to
518 gnat_rewrite_reference. Adjust initial expression.
519 * gcc-interface/trans.c (Call_to_gnu): Treat renamings the same way as
520 regular object declarations when it comes to creating a temporary.
521 Adjust call to gnat_stabilize_reference and build a compound expression
522 if needed. Invoke return_type_with_variable_size_p.
523 (gnat_to_gnu): Invoke type_is_padding_self_referential. In case #4,
524 return a call to a function unmodified if it returns with variable size
525 and is also the initial expression in an object declaration.
526 * gcc-interface/utils2.c (build_binary_op) <INIT_EXPR>: Use the RHS'
527 type if it is a call to a function that returns with variable size.
528 (build_unary_op): Invoke type_is_padding_self_referential.
529 (gnat_stabilize_reference_1): Remove N parameter and adjust.
530 (gnat_stabilize_reference): Add INIT parameter and pass it in the call
531 to gnat_rewrite_reference.
532 (gnat_rewrite_reference): Remove N, add INIT parameter and adjust.
533 <COMPOUND_EXPR>: New case.
535 2015-05-28 Ed Schonberg <schonberg@adacore.com>
537 * sem_ch3.adb (Is_Visible_Component): Component is visible
538 in a derived type if inherited through an ancestor that has a
539 partial view of the original type holding the component, if the
540 full view of that original type is in scope.
541 * sem_util.ads (Get_Body_From_Stub): Works for all kinds of stubs.
543 2015-05-28 Bob Duff <duff@adacore.com>
545 * sem_util.adb (Requires_Transient_Scope): For definite untagged
546 subtypes, we should never have to use the secondary stack. This moves
547 toward that goal. But there are still cases that don't work.
548 Here, we move the check for Is_Definite first, but add a
549 special-purpose check for Has_Discrim_Dep_Array.
551 2015-05-28 Bob Duff <duff@adacore.com>
553 * sem_util.adb (Requires_Transient_Scope): Avoid returning
554 function results on the secondary stack in so many cases.
556 2015-05-28 Ed Schonberg <schonberg@adacore.com>
558 * sem_util.adb (Wrong_Type): In any instance, do not emit error
559 if type of expression is the partial view of the expected type.
561 2015-05-28 Ed Schonberg <schonberg@adacore.com>
563 * sem_res.adb (Resolve_Actuals): a) The replacement of formal
564 names in named associations only needs to be done within an
565 instance, on a call to a primitive of a formal derived type,
566 where the actual subprogram may have different formal names than
567 those of the primitive operation of the formal type.
568 b) Defaulted parameters must be taken into account when obtaining
569 the names of the formals of the actual subprogram being called.
571 2015-05-28 Robert Dewar <dewar@adacore.com>
573 * sem_ch13.adb, sem_disp.ads: Minor reformatting.
575 2015-05-28 Ed Schonberg <schonberg@adacore.com>
577 * sem_util.adb (Set_Debug_Info_Needed): For a private type
578 whose full view is itself a derived private type, set flag on
579 underlying full view as well, for proper gdb display.
581 2015-05-28 Bob Duff <duff@adacore.com>
583 * exp_tss.ads: Minor comment fix.
584 * exp_ch3.adb (Build_Array_Init_Proc, Build_Record_Init_Proc):
585 Inline init_procs when the type has controlled parts. Remove
586 obsolete comments about those init_procs -- init_procs for
587 such types are no longer complex. A typical init_proc just
588 initializes the 'Tag field, and calls the parent init_proc
589 (e.g. for Limited_Controlled), which calls the grandparent
590 (for Root_Controlled), which does nothing. This all boils down
591 to one instruction when inlined.
592 * exp_ch7.adb (Create_Finalizer): Inline the finalizer.
594 2015-05-28 Ed Schonberg <schonberg@adacore.com>
596 * sem_ch4.adb (Analyze_Selected_Component): If the type to use
597 is a derived type and is a generic actual, the selected component
598 appears within an instance body, and the check over the type
599 has failed, examine ancestor types for the desired component.
600 (Find_Component_In_Instance): If record type is a derived type,
601 examine all ancestors in order to locate desired component.
603 2015-05-27 H.J. Lu <hongjiu.lu@intel.com>
605 * gcc-interface/Makefile.in (TOOLS_LIBS): Add @NO_PIE_FLAG@.
607 2015-05-27 Eric Botcazou <ebotcazou@adacore.com>
609 * gcc-interface/trans.c (elaborate_all_entities): Do not elaborate an
610 incomplete type coming from a limited_with and whose non-limited view
611 comes from the main unit.
613 2015-05-27 Eric Botcazou <ebotcazou@adacore.com>
615 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Move down
616 code applying atomic checks to the object.
618 2015-05-27 Robert Dewar <dewar@adacore.com>
620 * sem_aux.adb: Minor rewording.
622 2015-05-27 Bob Duff <duff@adacore.com>
624 * exp_prag.adb (Expand_Pragma_Abort_Defer): Make
625 pragma Abort_Defer do nothing if Abort_Allowed is False.
627 2015-05-27 Arnaud Charlet <charlet@adacore.com>
629 * exp_ch9.adb, sem_util.adb, sem_util.ads, s-stposu.adb, s-spsufi.ads,
630 sem_elab.ads, g-comlin.ads, errout.ads, exp_ch6.adb, sem_ch4.adb,
631 opt.ads, s-bignum.adb, output.ads, sem_ch13.adb, erroutc.ads,
632 sem_disp.ads, exp_ch3.adb: Minor fixes of duplicate words in comments.
634 2015-05-27 Doug Rupp <rupp@adacore.com>
636 * adaint.c (__gnat_tmp_name) [vxworks]: Robustify and use for rtp as
639 2015-05-27 Pierre-Marie de Rodat <derodat@adacore.com>
641 * par_sco.adb (Process_Decision): Store sloc to
642 condition/pragmas SCOs associations into a temporary table before
643 moving them to the SCO_Raw_Hash_Table so that we can back them
644 out just like we do for SCO entries that are simple decisions
645 in an expression context.
647 2015-05-27 Ed Schonberg <schonberg@adacore.com>
649 * sem_ch6.adb (Process_Formals): A non-private formal type that
650 is a limited view does not have a list of private dependents.
652 2015-05-27 Ed Schonberg <schonberg@adacore.com>
654 * exp_ch5.adb (Expand_N_Case_Statement): If the expression in
655 the case statement is a compile-time known value, we look for a
656 corresponding alternative to optimize the case statement into a
657 single case. If the type has a static predicate and the expression
658 does not satisfy the predicate, there is no legal alternative and
659 this optimization is not applicable. Excecution is erroneous,
660 or else if assertions are enabled, an exception will be raised
661 earlier, at the point the expression is elaborated.
663 2015-05-27 Robert Dewar <dewar@adacore.com>
665 * sem_elab.adb (Check_Internal_Call_Continue): Suppress
666 warning on Finalize, Adjust, or Initialize if type involved has
669 2015-05-27 Ed Schonberg <schonberg@adacore.com>
671 * sem_aux.adb, sem_aux.ads (First_Discriminant): Return empty when
672 applied to a type with no known discriminants.
674 2015-05-26 Robert Dewar <dewar@adacore.com>
676 * errout.ads, sem_ch4.adb, sem_ch6.adb: Minor reformatting.
678 2015-05-26 Bob Duff <duff@adacore.com>
680 * sem_elab.adb (Check_A_Call): In the case where we're
681 calling something in an instance of a generic package that is
682 within this same unit (as the call), make sure we treat it
683 as a call to an entity within the same unit. That is, call
684 Check_Internal_Call, rather than putting "Elaborate_All(X)"
685 on X, which would necessarily result in an elaboration cycle in
686 static-elaboration mode.
688 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
690 * freeze.ads (Is_Atomic_VFA_Aggregate): Adjust profile.
691 * freeze.adb (Is_Atomic_VFA_Aggregate): Change Entity
692 parameter into Node parameter and remove Type parameter.
693 Look at Is_Atomic_Or_VFA both on the type and on the object.
694 (Freeze_Entity): Adjust call to Is_Atomic_VFA_Aggregate.
695 * exp_aggr.adb (Expand_Record_Aggregate): Likewise.
696 (Process_Atomic_Independent_Shared_Volatile): Remove code
697 propagating Atomic or VFA from object to locally-defined type.
699 2015-05-26 Bob Duff <duff@adacore.com>
701 * exp_ch7.adb: Minor comment fix.
703 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
705 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Min/Attr_Max>: Do not
706 bother about NaN's if Machine_Overflows is true.
708 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
710 * gcc-interface/trans.c (gnat_to_gnu) <N_Object_Declaration>: Really
711 force evaluation of the expression, if any, when the object has its
712 elaboration delayed. Do not create a variable at global level.
714 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
716 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Machine>: Do not apply
717 extra-precision trick to literals. Build SAVE_EXPR manually.
719 * gcc-interface/misc.c (enumerate_modes): Add bypass for x86/x86-64.
721 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
723 * gcc-interface/ada-tree.h (DECL_GLOBAL_NONCONSTANT_RENAMING_P): Delete
724 (DECL_RENAMED_OBJECT): Adjust comment.
725 * gcc-interface/gigi.h (record_global_nonconstant_renaming): Delete.
726 (invalidate_global_nonconstant_renamings): Likewise.
727 (gnat_constant_reference_p): Likewise.
728 (rewrite_fn): New function type.
729 (gnat_rewrite_reference): Declare.
730 (call_is_atomic_load): New inline predicate.
731 * gcc-interface/decl.c (elaborate_reference_1): New function.
732 (elaborate_reference): Likewise.
733 (gnat_to_gnu_entity): Call elaborate_reference to elaborate renamings
734 and simplify associated code. Set const_flag to true consistently in
735 conjunction with used_by_ref.
736 * gcc-interface/trans.c (Identifier_to_gnu): Always replace renaming
737 pointers by renamed objects.
738 (outer_atomic_access_required_p): Deal with renamings.
739 (Compilation_Unit_to_gnu): Do not call
740 invalidate_global_nonconstant_renamings.
741 (gnat_to_gnu) <N_Object_Renaming_Declaration>: Adjust comment.
742 (gnat_gimplify_expr): Deal with atomic loads.
743 * gcc-interface/utils.c (global_nonconstant_renamings): Delete.
744 (destroy_gnat_utils): Do not call
745 invalidate_global_nonconstant_renamings.
746 (record_global_nonconstant_renaming): Delete.
747 (invalidate_global_nonconstant_renamings): Likewise.
748 * gcc-interface/utils2.c (call_is_atomic_load): Move to gigi.h.
749 (build_load_modify_store): Build a copy of the destination.
750 (gnat_stabilize_reference_1): Adjust.
751 (gnat_stabilize_reference): Call gnat_stabilize_reference_1 through
752 gnat_rewrite_reference and move bulk of code to...
753 (gnat_rewrite_reference): ...here. New global function.
754 (gnat_constant_reference_p): Delete.
756 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
758 * gcc-interface/gigi.h (gnat_stabilize_reference): Adjust prototype.
759 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not rely on const_flag
760 to detect constant renamings. Be prepared for specific pattern of
761 renamed object based on function calls. Create a constant object
762 for the renaming of a NULL_EXPR or of a CONSTRUCTOR. Adjust calls
763 to gnat_stabilize_reference and tidy up. Remove redundant tests.
764 (elaborate_expression_1): Remove obsolete test and tidy up.
765 * gcc-interface/trans.c (Call_to_gnu): Do not stabilize In/Out or Out
766 parameters passed by reference.
767 (gnat_to_gnu) <N_Selected_Component>: Remove redundant protection again
769 Use gnat_protect_expr instead of gnat_stabilize_reference for general
770 protection against side-effects.
771 * gcc-interface/utils2.c (gnat_stable_expr_p): New predicate.
772 (gnat_save_expr): Invoke it.
773 (gnat_protect_expr): Likewise.
774 (gnat_stabilize_reference_1): Likewise. Remove useless propagation
776 (gnat_stabilize_reference): Remove parameter and adjust throughout.
777 Delete ADDR_EXDR, COMPOUND_EXPR and CONSTRUCTOR cases.
778 Restrict CALL_EXPR case to atomic loads and tweak ERROR_MARK case.
780 2015-05-26 Ed Schonberg <schonberg@adacore.com>
782 * sinfo.ads: Minor reformatting.
783 * sem_aux.ads: Clarify use of First_Discriminant.
784 * sem_ch4.adb (Analyze_Explicit_Dereference): The use of a limited
785 view is replaced with the non-limited view in an instance body,
786 where the enclosing unit must have a regular with_clause on the
788 * sem_ch12.adb (Install_Body): Freeze instantation after its
789 body. Remove useless freeze nodes for incomplete actuals to
790 prevent multiple generation of internal operations.
791 (Instantiate_Package_Body): Set sloc of body appropriately when
792 there are incomplete actuals and the instance body is placed in
793 the body of the enclosing unit.
794 * errout.ads: Consistent punctuation, better alignment and trivial
796 * err_vars.ads: Fix typo.
798 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
800 * sem_ch8.adb (Analyze_Object_Renaming): Lift restriction on
801 components of Volatile_Full_Access objects.
803 2015-05-26 Ed Schonberg <schonberg@adacore.com>
805 * sem_ch6.adb (Is_Non_Overriding_Operation,
806 Get_Generic_Parent_Type): Handle properly the case of a derived
807 scalar type by using the first subtype rather than its generated
810 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
812 * einfo.adb (Write_Field17_Name): Move E_Incomplete_Subtype
814 (Write_Field19_Name): ...here.
816 2015-05-26 Ed Schonberg <schonberg@adacore.com>
818 * sem_ch13.adb: sem_ch13.adb (Add_Predicates): Undo analysis
819 of original expression in ASIS mode: does not solve the ASIS
820 problem of a usable type information, and crashes the back-end
821 when performing type annotations.
823 2015-05-26 Robert Dewar <dewar@adacore.com>
825 * sem_disp.adb (Inherited_Subprograms): Add One_Only parameter.
826 (Is_Overriding_Subprogram): Use One_Only_Parameter.
827 * sem_disp.ads (Inherited_Subprograms): Add One_Only parameter.
829 2015-05-26 Robert Dewar <dewar@adacore.com>
831 * exp_prag.adb, sem_ch3.adb, sem_ch5.adb, exp_ch11.adb, ghost.adb,
832 exp_ch6.adb, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb, sem_ch13.adb,
833 exp_ch3.adb: Minor reformatting.
835 2015-05-26 Bob Duff <duff@adacore.com>
837 * treepr.adb: Minor improvement to debugging routines (pp, pn)
838 robustness. Rearrange the code so passing a nonexistent Node_Id
839 prints "No such node" rather than crashing, and causing gdb to
840 generate confusing messages.
842 2015-05-26 Gary Dismukes <dismukes@adacore.com>
844 * sem_util.adb: Minor typo fix.
846 2015-05-26 Yannick Moy <moy@adacore.com>
848 * sem_aux.adb (Subprogram_Body_Entity): Deal with subprogram stubs.
850 2015-05-26 Hristian Kirtchev <kirtchev@adacore.com>
852 * exp_ch3.adb (Expand_N_Full_Type_Declaration): Capture, set and
853 restore the Ghost mode.
854 (Expand_N_Object_Declaration): Capture, set and restore the Ghost mode.
855 (Freeze_Type): Update the call to Set_Ghost_Mode.
856 (Restore_Globals): New routine.
857 * exp_ch5.adb Add with and use clauses for Ghost.
858 (Expand_N_Assignment_Statement): Capture, set and restore the
860 (Restore_Globals): New routine.
861 * exp_ch6.adb Add with and use clauses for Ghost.
862 (Expand_N_Procedure_Call_Statement): Capture, set and
863 restore the Ghost mode.
864 (Expand_N_Subprogram_Body):
865 Code cleanup. Capture, set and restore the Ghost mode.
866 (Expand_N_Subprogram_Declaration): Capture, set and restore the
868 (Restore_Globals): New routine.
869 * exp_ch7.adb Add with and use clauses for Ghost.
870 (Expand_N_Package_Body): Capture, set and restore the Ghost mode.
871 (Expand_N_Package_Declaration): Capture, set and restore the
873 (Wrap_HSS_In_Block): Create a proper identifier for the block.
874 * exp_ch8.adb Add with and use clauses for Ghost.
875 (Expand_N_Exception_Renaming_Declaration): Code
876 cleanup. Capture, set and restore the Ghost mode.
877 (Expand_N_Object_Renaming_Declaration): Capture, set and restore
879 (Expand_N_Package_Renaming_Declaration): Capture, set and restore the
881 (Expand_N_Subprogram_Renaming_Declaration): Capture, set and
882 restore the Ghost mode.
883 * exp_ch11.adb (Expand_N_Exception_Declaration): Code
884 cleanup. Capture, set and restore the Ghost mode.
885 * exp_disp.adb (Make_DT): Update the call to Set_Ghost_Mode. Do
886 not initialize the dispatch table slot of a Ghost subprogram.
887 * exp_prag.adb Add with and use clauses for Ghost.
888 (Expand_Pragma_Check): Capture, set and restore the Ghost mode.
889 (Expand_Pragma_Contract_Cases): Capture, set and restore the
891 (Expand_Pragma_Initial_Condition): Capture, set and
892 restore the Ghost mode.
893 (Expand_Pragma_Loop_Variant): Capture,
894 set and restore the Ghost mode.
895 (Restore_Globals): New routine.
896 * exp_util.adb Add with and use clauses for Ghost.
897 (Make_Predicate_Call): Code cleanup. Capture, set and restore
899 (Restore_Globals): New routine.
900 * freeze.adb (Freeze_Entity): Code cleanup. Update the call
902 * ghost.adb Add with and use clause for Sem_Prag.
903 (Check_Ghost_Completion): Code cleanup.
904 (Check_Ghost_Overriding): New routine.
905 (Check_Ghost_Policy): Code cleanup.
906 (Ghost_Entity): New routine.
907 (Is_Ghost_Declaration): Removed.
908 (Is_Ghost_Statement_Or_Pragma): Removed.
909 (Is_OK_Context): Reimplemented.
910 (Is_OK_Declaration): New routine.
911 (Is_OK_Pragma): New routine.
912 (Is_OK_Statement): New routine.
913 (Mark_Full_View_As_Ghost): New routine.
914 (Mark_Pragma_As_Ghost): New routine.
915 (Mark_Renaming_As_Ghost): New routine.
916 (Propagate_Ignored_Ghost_Code): Update the comment on usage.
917 (Set_From_Entity): New routine.
918 (Set_From_Policy): New routine.
919 (Set_Ghost_Mode): This routine now handles pragmas and freeze nodes.
920 (Set_Ghost_Mode_For_Freeze): Removed.
921 (Set_Ghost_Mode_From_Entity): New routine.
922 (Set_Ghost_Mode_From_Policy): Removed.
923 * ghost.ads (Check_Ghost_Overriding): New routine.
924 (Mark_Full_View_As_Ghost): New routine.
925 (Mark_Pragma_As_Ghost): New routine.
926 (Mark_Renaming_As_Ghost): New routine.
927 (Set_Ghost_Mode): Update the parameter profile. Update the
929 (Set_Ghost_Mode_For_Freeze): Removed.
930 (Set_Ghost_Mode_From_Entity): New routine.
931 * sem_ch3.adb (Analyze_Full_Type_Declaration):
932 Capture and restore the Ghost mode. Mark a type
933 as Ghost regardless of whether it comes from source.
934 (Analyze_Incomplete_Type_Decl): Capture, set and restore the
936 (Analyze_Number_Declaration): Capture and restore the Ghost mode.
937 (Analyze_Object_Declaration): Capture and restore the Ghost mode.
938 (Analyze_Private_Extension_Declaration): Capture and
939 restore the Ghost mode.
940 (Analyze_Subtype_Declaration): Capture and restore the Ghost mode.
941 (Process_Full_View): The full view inherits all Ghost-related
942 attributes from the private view.
943 (Restore_Globals): New routine.
944 * sem_ch5.adb (Analyze_Assignment): Capture and restore the
946 (Restore_Globals): New routine.
947 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration):
948 Code cleanup. Capture and restore the Ghost mode. Mark a
949 subprogram as Ghost regarless of whether it comes from source.
950 (Analyze_Procedure_Call): Capture and restore the Ghost mode.
951 (Analyze_Subprogram_Body_Helper): Capture and restore the Ghost mode.
952 (Analyze_Subprogram_Declaration): Capture and restore the Ghost mode.
953 (New_Overloaded_Entity): Ensure that a
954 parent subprogram and an overriding subprogram have compatible
956 * sem_ch7.adb (Analyze_Package_Body_Helper): Capture and restore
958 (Analyze_Package_Declaration): Capture and
959 restore the Ghost mode. Mark a package as Ghost when it is
960 declared in a Ghost region.
961 (Analyze_Private_Type_Declaration): Capture and restore the Ghost mode.
962 (Restore_Globals): New routine.
963 * sem_ch8.adb (Analyze_Exception_Renaming): Code
964 reformatting. Capture and restore the Ghost mode. A renaming
965 becomes Ghost when its name references a Ghost entity.
966 (Analyze_Generic_Renaming): Capture and restore the Ghost mode. A
967 renaming becomes Ghost when its name references a Ghost entity.
968 (Analyze_Object_Renaming): Capture and restore the Ghost mode. A
969 renaming becomes Ghost when its name references a Ghost entity.
970 (Analyze_Package_Renaming): Capture and restore the Ghost mode. A
971 renaming becomes Ghost when its name references a Ghost entity.
972 (Analyze_Subprogram_Renaming): Capture and restore the Ghost
973 mode. A renaming becomes Ghost when its name references a
975 * sem_ch11.adb (Analyze_Exception_Declaration): Capture, set
976 and restore the Ghost mode.
977 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Capture and
978 restore the Ghost mode.
979 (Analyze_Generic_Subprogram_Declaration):
980 Capture and restore the Ghost mode.
981 * sem_ch13.adb Add with and use clauses for Ghost.
982 (Add_Invariant): New routine.
983 (Add_Invariants): Factor out code.
984 (Add_Predicate): New routine.
985 (Add_Predicates): Factor out code.
986 (Build_Invariant_Procedure_Declaration): Code cleanup. Capture,
987 set and restore the Ghost mode.
988 (Build_Invariant_Procedure): Code cleanup.
989 (Build_Predicate_Functions): Capture, set and
990 restore the Ghost mode. Mark the generated functions as Ghost.
991 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
992 Capture, set and restore the Ghost mode.
993 (Analyze_External_Property_In_Decl_Part): Capture, set and restore
995 (Analyze_Initial_Condition_In_Decl_Part):
996 Capture, set and restore the Ghost mode.
998 Code cleanup. Capture, set and restore the Ghost mode. Flag
999 pragmas Linker_Section, No_Return, Unmodified, Unreferenced and
1000 Unreferenced_Objects as illegal when it applies to both Ghost
1001 and living arguments. Pragma Ghost cannot apply to synchronized
1003 (Check_Kind): Moved to the spec of Sem_Prag.
1004 (Process_Inline): Flag the pragma as illegal when it applies to
1005 both Ghost and living arguments.
1006 (Restore_Globals): New routine.
1007 * sem_prag.ads Add pragma Default_Initial_Condition
1008 to table Assertion_Expression_Pragma. Add new table
1009 Is_Aspect_Specifying_Pragma.
1010 (Check_Kind): Moved from body of Sem_Prag.
1011 * sem_util.adb Add with and use clauses for Ghost.
1012 (Build_Default_Init_Cond_Procedure_Body): Capture, set and restore
1014 (Build_Default_Init_Cond_Procedure_Declaration):
1015 Capture, set and restore the Ghost mode. Mark the default
1016 initial condition procedure as Ghost when it is declared
1018 (Is_Renaming_Declaration): New routine.
1019 (Policy_In_List): Account for the single argument version of
1021 * sem_util.ads (Is_Renaming_Declaration): New routine.
1022 * sinfo.adb (Is_Ghost_Pragma): New routine.
1023 (Set_Is_Ghost_Pragma): New routine.
1024 * sinfo.ads New attribute Is_Ghost_Pragma.
1025 (Is_Ghost_Pragma): New routine along with pragma Inline.
1026 (Set_Is_Ghost_Pragma): New routine along with pragma Inline.
1028 2015-05-26 Robert Dewar <dewar@adacore.com>
1030 * sem_ch3.adb, sem_aux.adb, sem_aux.ads, exp_ch6.adb, sprint.adb:
1033 2015-05-26 Gary Dismukes <dismukes@adacore.com>
1035 * gnat1drv.adb, targparm.adb, targparm.ads, restrict.adb: Minor
1036 reformatting and typo fixes in comments.
1038 2015-05-26 Ed Schonberg <schonberg@adacore.com>
1040 * sem_ch7.adb (Swap_Private_Dependets): Set visibility of
1041 the two views of a private dependent in two separate steps,
1042 to ensure proper visibility in parent units analyzed for inlining.
1044 2015-05-26 Yannick Moy <moy@adacore.com>
1046 * sem_aux.adb, sem_aux.ads (Get_Low_Bound): Use Type_Low_Bound.
1047 (Package_Body, Package_Spec): New queries moved
1048 here from GNATprove.
1049 (Package_Specification): Simplify query to remove use of loop.
1050 * sem_util.adb, sem_util.ads (Enclosing_Declaration,
1051 Enclosing_Package_Or_Subprogram, Is_Attribute_Update): New
1052 queries moved here from GNATprove.
1054 2015-05-26 Bob Duff <duff@adacore.com>
1056 * einfo.adb, einfo.ads, sprint.adb, lib-xref.ads: Minor cleanup: Remove
1057 obsolete Entity_Kinds E_String_Type and E_String_Subtype. Update
1058 redundant assertions.
1060 2015-05-26 Gary Dismukes <dismukes@adacore.com>
1062 * sem_util.adb, sem_util.ads, sem_ch13.adb: Minor typo fixes.
1064 2015-05-26 Doug Rupp <rupp@adacore.com>
1066 * init.c [vxworks]: Refine previous checkin.
1068 2015-05-26 Robert Dewar <dewar@adacore.com>
1070 * exp_ch4.adb (Wrap_MA): New function.
1071 (Expand_N_Op_Expon): Use Wrap_MA.
1073 2015-05-26 Bob Duff <duff@adacore.com>
1075 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
1076 Do not use secondary stack to return limited records with
1077 defaulted discriminants. This is an efficiency improvement.
1078 * exp_ch6.adb, exp_dist.adb, sem_attr.adb, sem_aux.adb, sem_aux.ads,
1079 sem_ch12.adb, sem_ch3.adb, sem_ch4.adb, sem_ch6.adb, sem_ch7.adb,
1080 sem_util.adb: Change the sense of Is_Indefinite_Subtype to be
1081 Is_Definite_Subtype. This is an improvement to readability (the double
1082 negative in "not Is_Indefinite_Subtype" was slightly confusing). Also
1083 disallow passing non-[sub]type entities, an unnecessary and slightly
1084 bug-prone flexibility.
1086 2015-05-26 Robert Dewar <dewar@adacore.com>
1088 * sem_aggr.adb (Resolve_Array_Aggregate): Defend against
1090 * debug.adb: Document -gnatd.k.
1091 * erroutc.adb (Set_Msg_Insertion_Line_Number): Implement -gnatd.k.
1093 2015-05-26 Robert Dewar <dewar@adacore.com>
1095 * gnat1drv.adb (Gnat1drv): Provide new arguments for
1096 Get_Target_Parameters.
1097 * restrict.adb (Set_Restriction_No_Specification_Of_Aspect):
1099 (Set_Restriction_No_Use_Of_Attribute): new procedure.
1100 * restrict.ads (Set_Restriction_No_Specification_Of_Aspect):
1102 (Set_Restriction_No_Use_Of_Attribute): new procedure.
1103 * s-rident.ads (Integer_Parameter_Restrictions): New subtype.
1104 * targparm.adb (Get_Target_Parameters): Allow new restriction
1105 pragmas No_Specification_Of_Aspect No_Use_Of_Attribute
1107 * targparm.ads: New parameters for Get_Target_Parameters.
1108 * tbuild.adb (Set_NOD): New name for Set_RND.
1109 (Set_NSA): New procedure.
1110 (Set_NUA): New procedure.
1111 (Set_NUP): New procedure.
1112 * tbuild.ads (Make_SC): Minor reformatting.
1113 (Set_NOD): New name for Set_RND.
1114 (Set_NSA, Set_NUA, Set_NUP): New procedure.
1116 2015-05-26 Ed Schonberg <schonberg@adacore.com>
1118 * a-stwise.adb (Find_Token): If source'first is not positive,
1119 an exception must be raised, as specified by RM 2005 A.4.3
1120 (68/1). This must be checked explicitly, given that run-time
1121 files are normally compiled without constraint checks.
1122 * a-stzsea.adb (Find_Token): Ditto.
1124 2015-05-26 Ed Schonberg <schonberg@adacore.com>
1126 * sem_util.ads sem_util.adb (Is_Current_Instance): New predicate
1127 to fully implement RM 8.6 (17/3). which earlier only applied
1128 to synchronized types. Used to preanalyze aspects that include
1129 current instances of types, such as Predicate and Invariant.
1130 * sem_res.adb (Resolve_Entity_Name): Use Is_Current_Instance.
1131 * sem_ch13.adb (Add_Predicates): In ASIS mode, preserve original
1132 expression of aspect and analyze it to provide proper type
1135 2015-05-26 Robert Dewar <dewar@adacore.com>
1137 * rtsfind.ads: Add entries for RE_Exn[_Long]_Float.
1138 * s-exnllf.adb (Exn_Float): New function.
1139 (Exn_Long_Float): New function.
1140 (Exn_Long_Long_Float): Rewritten interface.
1141 (Exp): New name for what used to be Exn_Long_Long_Float.
1142 * s-exnllf.ads (Exn_Float): New function.
1143 (Exn_Long_Float): New function.
1145 2015-05-26 Ed Schonberg <schonberg@adacore.com>
1147 * sem_ch8.adb (Find_Selected_Component): Do not emit an error
1148 on a selected component when the prefix is a type name that is
1150 * einfo.ads: Minor grammar fix.
1152 2015-05-26 Doug Rupp <rupp@adacore.com>
1154 * init.c [vxworks] (sysLib.h): Only for x86.
1156 2015-05-26 Doug Rupp <rupp@adacore.com>
1158 * init-vxsim.c (CPU): define as __VXSIM_CPU__
1159 * sigtramp-vxworks-vxsim.c (CPU): Likewise.
1160 sigtramp-vxworks-target.inc: Add check for SIMLINUX.
1161 * sigtramp.h: Likewise.
1163 2015-05-26 Robert Dewar <dewar@adacore.com>
1165 * sem_aux.adb, sem_disp.adb, sem_util.ads: Add comment.
1166 * sem_util.adb: Minor reformatting
1168 2015-05-26 Yannick Moy <moy@adacore.com>
1170 * inline.adb (Has_Initialized_Type): Adapt to new names.
1171 * sem_aux.adb, sem_aux.ads (Get_Low_Bound, Number_Components,
1172 Subprogram_Body, Subprogram_Body_Entity, Subprogram_Spec,
1173 Subprogram_Specification): New query functions used in GNATprove.
1174 * sem_disp.adb, sem_disp.ads (Is_Overriding_Subprogram): New
1175 query functions used in GNATprove.
1176 * sem_util.adb, sem_util.adso (Enclosing_Lib_Unit_Node,
1177 Get_Cursor_Type, Get_Return_Object, Get_User_Defined_Eq,
1178 Is_Double_Precision_Floating_Point_Type,
1179 Is_Single_Precision_Floating_Point_Type): New query functions
1182 2015-05-26 Bob Duff <duff@adacore.com>
1184 * s-rpc.ads (Partition_ID): Increase maximum Partition_ID to
1186 * a-except-2005.adb, a-except-2005.ads, a-except.adb,
1187 a-except.ads, a-exexda.adb, a-exstat.adb: Minor comment fixes.
1189 2015-05-26 Robert Dewar <dewar@adacore.com>
1191 * sinfo.adb: Minor comment addition.
1192 * einfo.adb: Minor whitespace and punctuation fix.
1193 * sem_util.adb: Minor editing of comments.
1195 2015-05-26 Ed Schonberg <schonberg@adacore.com>
1197 * sem_ch7.adb (Install_Private_Declarations,
1198 Swap_Private_Dependents): Ensure that both views of the dependent
1199 subtype are immediately visible if we are within their scope. This
1200 may be needed when a procedure body is both the parent of an
1201 instantiated child unit, and is itself used to inline a local
1204 2015-05-26 Gary Dismukes <dismukes@adacore.com>
1206 * exp_prag.adb, gnat1drv.adb: Minor reformatting.
1208 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
1210 * exp_ch4.adb (Expand_N_Indexed_Component): In the circuit
1211 detecting exceptions to the rewriting, deal with implicit
1212 dereferences in the selected component case.
1214 2015-05-26 Bob Duff <duff@adacore.com>
1216 * sem_ch13.adb (Analyze_One_Aspect): Do not
1217 require the expression of the Disable_Controlled aspect to be
1218 static in a generic template, because 'Enabled is not known
1221 2015-05-26 Doug Rupp <rupp@adacore.com>
1223 * init-vxsim.c: New file for vxsim ZCX
1224 * sigtramp-vxworks-vxsim.c: Likewise.
1225 * sigtramp-vxworks.c: Factor out target dependent bits into ...
1226 * sigtramp-vxworks-target.inc: ... here.
1227 * sigtramp.h: Add vxsim zcx protos.
1228 * init.c [vxworks...] (sysLib.h): Include.
1229 (__gnat_map_signal): Make global.
1230 [...i386] (__gnat_error_handler): Call __gnat_vxsim_error_handler if
1232 [...i386] (__gnat_install_handler): Test if on vxsim.
1234 2015-05-26 Ed Schonberg <schonberg@adacore.com>
1236 * sem_ch5.adb (Analyze_Iterator_Specification): For an element
1237 iterator over an array, if the component is aliased, the loop
1238 variable is aliased as well.
1240 2015-05-26 Ed Schonberg <schonberg@adacore.com>
1242 * exp_ch6.adb (Expand_Actuals): For a function call with in-out
1243 parameters that is rewritten as an expression_with_actions,
1244 we preserve the original function call node for further use by
1245 the caller (typically Expand_Call). In the presence of validity
1246 checks, that function call, though it is labelled Analyzed to
1247 prevent an infinite recursion, may be rewritten as a temporary
1248 by Remove_Side_Effects. Ensure that the caller has access to
1249 the original function call to continue expansion.
1250 * atree.ads: Minor typo in comment.
1252 2015-05-26 Javier Miranda <miranda@adacore.com>
1254 * sem_util.adb (Check_Function_Writable_Actuals):
1255 Add missing support to check the violation of writable actuals
1256 in array aggregates that have a nonstatic range.
1258 2015-05-26 Hristian Kirtchev <kirtchev@adacore.com>
1260 * exp_ch6.adb (Process_Contract_Cases_For): Update the call to
1261 Expand_Pragma_Contract_Cases.
1262 * exp_prag.ads, exp_prag.adb (Expand_Contract_Cases): Rename to
1263 Expand_Pragma_Contract_Cases.
1264 * sem_ch13.adb (Add_Invariants): Use the original aspect name
1265 when creating the arguments of pragma Check. This ensures that
1266 'Class is properly recognized and handled.
1268 2015-05-26 Arnaud Charlet <charlet@adacore.com>
1270 * gnat1drv.adb: Minor adjustments.
1271 (Adjust_Global_Switches): Disable some related flags in CodePeer mode.
1272 * sem_ch4.adb (Has_Arbitrary_Evaluation_Order,
1273 Stop_Subtree_Climbind): Code cleanup.
1274 * einfo.ads: Minor comment change.
1276 2015-05-26 Javier Miranda <miranda@adacore.com>
1278 * sem_aggr.adb (Resolve_Aggregate, Resolve_Extension_Aggregate):
1280 * sem_ch3.adb (Build_Derived_Record_Type,
1281 Record_Type_Declaration): Code cleanup.
1282 * sem_ch4.adb (Has_Arbitrary_Evaluation_Order,
1283 Stop_Subtree_Climbind): Tables which speed up the identification
1284 of dangerous calls to Ada 2012 functions with writable actuals
1286 (Analyze_Arithmetic_Op, Analyze_Call, Analyze_Comparison_Op,
1287 Analyze_Equality_Op, Analyze_Logical_Op, Analyze_Membership_Op,
1288 Analyze_Range): Code cleanup.
1289 (Is_Arbitrary_Evaluation_Order_Construct): Removed.
1290 (Check_Writable_Actuals): Code cleanup using the added tables.
1291 * sem_util.adb (Check_Function_Writable_Actuals): Return
1292 immediately if the node does not have the flag Check_Actuals
1295 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
1297 * exp_ch6.adb (Add_Call_By_Copy_Code): Remove restrictive
1298 condition in the detection of the effects of Remove_Side_Effects.
1299 * exp_util.ads (Remove_Side_Effects): Add general and historical note.
1300 * exp_util.adb (Is_Name_Reference): New predicate.
1301 (Remove_Side_Effects): Use it in lieu of Is_Object_Reference
1302 in order to decide whether to use the renaming to capture the
1303 side effects of the subexpression.
1304 (Side_Effect_Free): Remove obsolete test.
1306 2015-05-26 Robert Dewar <dewar@adacore.com>
1308 * aspects.ads, aspects.adb: Add aspect Disable_Controlled.
1309 * einfo.ads, einfo.adb (Disable_Controlled): New flag.
1310 (Is_Controlled_Active): New function.
1311 * exp_ch3.adb (Expand_Freeze_Record_Type): Use
1312 Is_Controlled_Active.
1313 * exp_util.adb (Needs_Finalization): Finalization not needed
1314 if Disable_Controlled set.
1315 * freeze.adb (Freeze_Array_Type): Do not set
1316 Has_Controlled_Component if the component has Disable_Controlled.
1317 (Freeze_Record_Type): ditto.
1318 * sem_ch13.adb (Decorate): Minor reformatting.
1319 (Analyze_Aspect_Specifications): Implement Disable_Controlled.
1320 * sem_ch3.adb (Analyze_Object_Declaration): Handle
1322 (Array_Type_Declaration): ditto.
1323 (Build_Derived_Private_Type): ditto.
1324 (Build_Derived_Type): ditto.
1325 (Record_Type_Definition): ditto.
1326 * snames.ads-tmpl: Add Name_Disable_Controlled.
1328 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
1330 * exp_ch6.adb (Expand_Actuals): Use a constant declaration instead
1331 of a renaming to capture the return value of a function call.
1332 (Expand_Simple_Function_Return): Call Remove_Side_Effects
1333 instead of removing side effects manually before the call to
1336 2015-05-26 Robert Dewar <dewar@adacore.com>
1338 * exp_ch4.adb (Expand_N_Op_Expon): Deal with problem of wrong
1339 order in calling Duplicate_Subexpr.
1340 * einfo.ads: Fix documentation of Object/Value size for scalar types.
1342 2015-05-26 Ed Schonberg <schonberg@adacore.com>
1344 * exp_aggr.adb (Build_Array_Aggr_Code, Gen_Assign):
1345 If a component is default-initialized and its type has an
1346 invariant procedure, insert an invariant test after code for
1347 default-initialization of the component.
1349 2015-05-26 Gary Dismukes <dismukes@adacore.com>
1351 * einfo.ads, sem_util.adb, sem_ch4.adb: Minor reformatting.
1353 2015-05-26 Robert Dewar <dewar@adacore.com>
1355 * exp_unst.adb, exp_unst.ads: Change to using Subps table index for
1356 making AREC entity names unique.
1358 2015-05-26 Ed Schonberg <schonberg@adacore.com>
1360 * sem_cat.adb (Has_Stream_Attribute_Definition): If the type
1361 has aspect specifications, examine the corresponding list of
1362 representation items to determine whether there is a visible
1363 stream operation. The attribute definition clause generated from
1364 the aspect will be inserted at the freeze point of the type,
1365 which may be in the private part and not directly visible,
1366 but the aspect makes the operation available to a client.
1368 2015-05-26 Robert Dewar <dewar@adacore.com>
1370 * sem_util.adb: Minor code reorganization.
1371 * sem_ch6.adb: Minor reformatting.
1373 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
1375 * gcc-interface/utils.c (maybe_pad_type): Do not apply adjustment to
1376 original size for elementary types before issuing the size warning.
1378 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
1380 * get_targ.adb (C_Get_Float_Words_BE): Adjust import name.
1381 (C_Get_Words_BE): Likewise.
1382 (C_Get_Bytes_BE): Likewise.
1383 (C_Get_Bits_BE): Likewise.
1384 (Width_From_Size): Remove superfluous space.
1385 * gcc-interface/targtyps.c (get_float_words_be): Rename into...
1386 (get_target_float_words_be): ...this.
1387 (get_words_be): Rename into...
1388 (get_target_words_be): ...this.
1389 (get_bytes_be): Rename into...
1390 (get_target_bytes_be): ...this.
1391 (get_bits_be): Rename into...
1392 (get_target_bits_be): ...this.
1393 * gcc-interface/gigi.h (standard_datatypes): Remove ADT_ptr_void_type.
1394 (ptr_void_type_node): Delete.
1395 (get_target_float_size): Likewise.
1396 (get_target_double_size): Likewise.
1397 (get_target_long_double_size): Likewise.
1398 (get_float_words_be): Likewise.
1399 (get_words_be): Likewise.
1400 (get_bytes_be): Likewise.
1401 (get_bits_be): Likewise.
1402 (get_target_float_words_be): Declare.
1403 (get_target_words_be): Likewise.
1404 (get_target_bytes_be): Likewise.
1405 (get_target_bits_be): Likewise.
1406 * gcc-interface/decl.c (gnat_to_gnu_entity): Replace ptr_void_type_node
1408 (intrin_return_compatible_p): Likewise.
1409 * gcc-interface/trans.c (gigi): Likewise.
1410 * gcc-interface/utils2.c (maybe_wrap_malloc): Likewise.
1411 (maybe_wrap_free): Likewise.
1412 * gcc-interface/utils.c (maybe_pad_type): Remove superfluous space.
1413 * gcc-interface/misc.c (gnat_init): Do not set ptr_void_type_node.
1415 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
1417 * gcc-interface/decl.c (elaborate_expression): Take a const string
1418 suffix instead of a tree.
1419 (elaborate_expression_1): Likewise.
1420 (elaborate_expression_2): Likewise.
1421 (gnat_to_gnu_entity): Adjust to above changes.
1422 (build_subst_list): Likewise.
1423 (get_entity_char): New static function.
1425 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
1427 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: Move around.
1428 <E_Exception>: Merge with E_Variable case.
1429 <E_Variable>: Remove 'object' label.
1431 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
1433 * gcc-interface/decl.c (gnat_to_gnu_entity): Minor tweak.
1434 * gcc-interface/trans.c (finalize_nrv_unc_r): Use CONSTRUCTOR_ELT.
1435 * gcc-interface/utils.c (convert): Likewise and simplify.
1436 (remove_conversions): Likewise.
1437 * gcc-interface/utils2.c (compare_fat_pointers): Likewise.
1438 (build_unary_op): Likewise and simplify.
1440 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
1442 * gcc-interface/gigi.h (build_atomic_load): Adjust prototype.
1443 (build_atomic_store): Likewise.
1444 (build_load_modify_store): Declare.
1445 (VECTOR_TYPE_P): Delete.
1446 * gcc-interface/decl.c (gnat_to_gnu_entity): Replace Is_Atomic with
1447 Is_Atomic_Or_VFA throughout.
1448 <E_Array_Type>: Build a variant of the XUA type instead of forcing
1449 TYPE_VOLATILE on it.
1450 <E_Array_Subtype>: Use the main variant of the base type.
1451 Do not force TYPE_VOLATILE on the type being built.
1452 <E_Record_Type>: Likewise.
1453 <E_Array_Subtype>: Likewise.
1454 <E_Subprogram_Type>: Rename local variable.
1455 Add Atomic qualifier in conjunction with Volatile on types if needed.
1456 Force BLKmode for by-ref types only at the end of the processing.
1457 Change qualifiers only after changing the mode of the type. Set
1458 TYPE_UNIVERSAL_ALIASING_P on the type directly.
1459 (check_ok_for_atomic_type): Issue specific error message for VFA.
1460 (gnat_to_gnu_component_type): Replace Is_Atomic with
1461 Is_Atomic_Or_VFA throughout.
1462 * gcc-interface/misc.c (gnat_get_alias_set): Test
1463 TYPE_UNIVERSAL_ALIASING_P on the type directly.
1464 * gcc-interface/trans.c (lvalue_required_p): Replace Is_Atomic with
1465 Is_Atomic_Or_VFA throughout. Add missing guard.
1466 (node_is_atomic): New predicate.
1467 (node_has_volatile_full_access): Likewise.
1468 (gnat_strip_type_conversion): New function.
1469 (outer_atomic_access_required_p): New predicate.
1470 (atomic_sync_required_p): Rename into...
1471 (atomic_access_required_p): ...this. Add SYNC parameter, scan the
1472 parent node first and then look for the atomic setting. Add support
1473 for Volatile_Full_Access.
1474 (Call_to_gnu): Add atomic_access and outer_atomic_access parameters
1475 and adjusts calls to above functions. Use load-modify-store sequence
1476 for updates of In/Out and Out parameters if required, as well as for
1477 moving the result to the target if required. Add couple of missing
1479 (gnat_to_gnu): Adjust calls to above functions.
1480 <N_Object_Renaming_Declaration>: If the renamed object has side-effects
1481 evaluate only its address.
1482 <N_Assignment_Statement>: Adjust call to Call_to_gnu. Use load-modify
1483 store sequence if required.
1484 <N_Function_Call>: Adjust call to Call_to_gnu.
1485 (extract_values): Adjust comment.
1486 * gcc-interface/utils2.c (build_atomic_load): Add SYNC parameter and
1487 use relaxed memory model if it is not set.
1488 (build_atomic_store): Likewise.
1489 (call_is_atomic_load): New predicate.
1490 (build_load_modify_store): New function.
1491 (build_binary_op) <MODIFY_EXPR>: Accept SAVE_EXPR on the LHS.
1492 (gnat_stabilize_reference) <CALL_EXPR>: Deal with atomic loads.
1494 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
1496 * gcc-interface/ada-tree.h (DECL_RENAMING_GLOBAL_P): Rename into...
1497 (DECL_GLOBAL_NONCONSTANT_RENAMING_P): ...this.
1498 * gcc-interface/gigi.h (record_global_renaming_pointer): Delete.
1499 (invalidate_global_renaming_pointers): Likewise.
1500 (record_global_nonconstant_renaming): New.
1501 (invalidate_global_nonconstant_renamings): Likewise.
1502 (get_inner_constant_reference): Likewise.
1503 (gnat_constant_reference_p): Likewise.
1504 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Adjust to above
1505 and register the renaming pointer only if the object is non-constant.
1506 (elaborate_expression_1): Call get_inner_constant_reference instead
1507 of get_inner_reference.
1508 * gcc-interface/trans.c (fold_constant_decl_in_expr): Minor tweak.
1509 (Identifier_to_gnu): Adjust to above and do not recheck the renamed
1510 object before substituting it.
1511 (Compilation_Unit_to_gnu): Adjust to above renaming. Minor tweaks.
1512 (gnat_to_gnu) <N_Object_Renaming_Declaration>: Do not return the
1513 result at the global level.
1514 (N_Exception_Renaming_Declaration): Likewise.
1515 * gcc-interface/utils.c (global_renaming_pointers): Rename into...
1516 (global_nonconstant_renamings): ...this.
1517 (destroy_gnat_utils): Adjust to above renaming.
1518 (record_global_renaming_pointer): Rename into...
1519 (record_global_nonconstant_renaming): ...this.
1520 (invalidate_global_renaming_pointers): Rename into...
1521 (invalidate_global_nonconstant_renamings): ...this and do not recheck
1522 the renamed object before invalidating.
1523 * gcc-interface/utils2.c (gnat_stabilize_reference): Minor tweak.
1524 (get_inner_constant_reference): New public function.
1525 (gnat_constant_reference_p): New predicate.
1527 2015-05-25 Javier Miranda <miranda@adacore.com>
1529 * einfo.ads, einfo.adb (Has_Out_Or_In_Out_Parameter): This attribute
1530 is now present in subprograms, generic subprograms, entries and
1532 * sem_ch6.adb (Set_Formal_Mode): Set As_Out_Or_In_Out_Parameter
1533 on entries, entry families, subprograms and generic subprograms.
1534 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration):
1535 Minor code reorganization to ensure that the Ekind attribute
1536 of the subprogram entity is set before its formals are
1537 processed. Required to allow the use of the attribute
1538 Has_Out_Or_In_Out_Parameter on the subprogram entity.
1539 * sem_aggr.adb (Resolve_Aggregate, Resolve_Extension_Aggregate):
1540 Perform the check on writable actuals only if the value of some
1541 component of the aggregate involves calling a function with
1542 out-mode parameters.
1543 (Resolve_Record_Aggregate): Propagate the Check_Actuals flag to the
1544 internally built aggregate.
1545 * sem_ch3.adb (Build_Derived_Record_Type, Record_Type_Declaration):
1546 Perform the check on writable actuals only if the initialization of
1547 some component involves calling a function with out-mode parameters.
1548 * sem_ch4.adb (Analyze_Arithmetic_Op, Analyze_Comparison_Op,
1549 Analyze_Equality_Op, Analyze_Logical_Op, Analyze_Membership_Op,
1550 Analyze_Range): Check writable actuals only if the
1551 subtrees have a call to a function with out-mode parameters
1552 (Analyze_Call.Check_Writable_Actuals): New subprogram. If the call
1553 has out or in-out parameters then mark its outermost enclosing
1554 construct as a node on which the writable actuals check must
1556 (Analyze_Call): Check if the flag must be set and if the outermost
1557 enclosing construct.
1558 * sem_util.adb (Check_Function_Writable_Actuals): Code cleanup
1559 and reorganization. We skip processing aggregate discriminants
1560 since their precise analysis involves two phases traversal.
1561 * sem_res.adb (Resolve_Actuals, Resolve_Arithmetic_Op,
1562 Resolve_Logical_Op, Resolve_Membership_Op): Remove call to
1563 check_writable_actuals.
1565 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1567 * sem_ch3.adb (Constrain_Concurrent): If the context is a
1568 type declaration, generate an Itype_Reference for the anonymous
1569 subtype, to force elaboration at this point in gigi.
1571 2015-05-22 Gary Dismukes <dismukes@adacore.com>
1573 * layout.adb, einfo.ads, sem_ch12.adb, freeze.adb, sem_util.ads,
1574 exp_ch4.adb, sem_ch6.adb: Minor reformatting and typo fixes.
1576 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1578 * sem_res.adb (Resolve_Actuals): If the call is to an overridden
1579 operation, replace the names of the actuals in named associations
1580 with the names of the actuals of the subprogram that is eventually
1581 executed. The names of the formals and the defaults can differ
1582 between the two operations when they are operations of a formal
1585 2015-05-22 Bob Duff <duff@adacore.com>
1587 * a-convec.ads, a-convec.adb (Append): Check for fast path. Split
1588 out slow path into separate procedure. Inline Append. Fast path
1589 now avoids calling Insert.
1590 (Finalize): Do the busy checking last, so the container gets emptied.
1591 (Insert, Insert_Space): Remove redundancy.
1593 2015-05-22 Robert Dewar <dewar@adacore.com>
1595 * switch-c.adb (Scan_Front_End_Switches): Insist on -gnatc
1598 2015-05-22 Arnaud Charlet <charlet@adacore.com>
1600 * gnatvsn.ads: Minor code reorg to remember more easily to update
1603 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1605 * sem_ch10.adb (Analyze_With_Clause): In ASIS_Mode, a
1606 limited_with clause on a predefined unit is not transformed into
1607 a regular with_clause, to preserve the original tree structure.
1608 * sinfo.ads (N_With_Clause): Add comment on handling of
1610 * sem_ch10.adb: Minor reformatting.
1612 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1614 * sem_ch8.adb (Freeze_Profile): A limited view of a type in
1615 the profile of a subprogram renaming does not require freezing,
1616 because it is declared in a different unit.
1618 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1620 * exp_aggr.adb (Get_Constraint_Association): If type (of ancestor
1621 composite type) is private, go to full view. This was previously
1622 done only in an instance context, but is happen whenever a chain
1623 of private extensions includes one inherited discriminant.
1625 2015-05-22 Robert Dewar <dewar@adacore.com>
1627 * einfo.ads: Minor comment updates.
1628 * exp_unst.adb: Move Subps table to spec Don't remove old entries
1629 from table Add Last field to record last entry used.
1630 * exp_unst.ads: Move Subps table here from body So that Cprint
1631 can access saved values.
1633 2015-05-22 Bob Duff <duff@adacore.com>
1635 * a-cdlili.adb, a-cdlili.ads, a-cohama.adb, a-cohama.ads,
1636 * a-cohase.adb, a-cohase.ads, a-convec.adb, a-convec.ads,
1637 * a-coorma.adb, a-coorma.ads, a-coorse.adb, a-coorse.ads:
1638 (Pseudo_Reference, Element_Access, Get_Element_Access): New
1639 declarations added for use by performance improvements in exp_ch5.adb.
1640 * snames.ads-tmpl: New names referenced by exp_ch5.adb.
1641 * exp_ch5.adb: Speed up "for ... of" loops for predefined containers.
1642 Instead of doing literally what the RM calls for, we do something
1643 equivalent that avoids expensive operations inside the loop. If the
1644 container package has appropriate Next, Pseudo_Reference,
1645 Element_Access, Get_Element_Access declarations, we invoke the
1647 * snames.ads-tmpl: Note speed improvement.
1649 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
1651 * einfo.ads (Is_Atomic_Or_VFA): Move to XEINFO INLINES section.
1652 * xeinfo.adb: Replace a-einfo.h with einfo.h throughout.
1653 Add pattern to translate "or else" into "||".
1655 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
1657 * einfo.ads (Has_Volatile_Full_Access): Rename into...
1658 (Is_Volatile_Full_Access): ...this.
1659 (Set_Has_Volatile_Full_Access): Rename into...
1660 (Set_Is_Volatile_Full_Access): ...this.
1661 * einfo.adb (Has_Volatile_Full_Access): Rename into...
1662 (Is_Volatile_Full_Access): ...this.
1663 (Set_Has_Volatile_Full_Access): Rename into...
1664 (Set_Is_Volatile_Full_Access): ...this.
1665 (Is_Atomic_Or_VFA): Adjust to above renaming.
1666 * errout.adb (Special_Msg_Delete): Likewise.
1667 * exp_pakd.adb (Install_PAT): Likewise.
1668 * freeze.adb (Freeze_Array_Type): Likewise.
1669 * sem_ch8.adb (Analyze_Object_Renaming): Likewise.
1670 * sem_ch13.adb (Inherit_Delayed_Rep_Aspects): Likewise.
1671 (Inherit_Aspects_At_Freeze_Point): Likewise.
1672 * sem_prag.adb (Set_Atomic_VFA): Likewise.
1673 (Process_Atomic_Independent_Shared_Volatile): Likewise.
1674 * sem_util.adb (Is_Atomic_Or_VFA_Object): Likewise.
1676 2015-05-22 Robert Dewar <dewar@adacore.com>
1678 * exp_ch5.adb, layout.adb, einfo.adb, einfo.ads, sem_prag.adb,
1679 freeze.adb, freeze.ads, sem_util.adb, sem_util.ads, exp_ch2.adb,
1680 exp_ch4.adb, errout.adb, exp_aggr.adb, sem_ch13.adb: This is a general
1681 change that deals with the fact that most of the special coding for
1682 Atomic should also apply to the case of Volatile_Full_Access.
1683 A new attribute Is_Atomic_Or_VFA is introduced, and many of the
1684 references to Is_Atomic now use this new attribute.
1686 2015-05-22 Robert Dewar <dewar@adacore.com>
1688 * exp_ch4.adb (Expand_N_Op_Eq): Introduce 'Machine for 'Result
1691 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
1693 * sprint.adb (Source_Dump): When generating debug files, deal
1694 with the case of a stand-alone package instantiation by dumping
1695 together the spec and the body in the common debug file.
1697 2015-05-22 Robert Dewar <dewar@adacore.com>
1699 * sem_ch13.adb (Minimum_Size): Size is zero for null range
1702 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1704 * einfo.adb (Anonymous_Master): This attribute now applies
1705 to package and subprogram bodies.
1706 (Set_Anonymous_Master): This attribute now applies to package and
1708 (Write_Field36_Name): Add output for package and subprogram bodies.
1709 * einfo.ads Update the documentation on attribute Anonymous_Master
1710 along with occurrences in entities.
1711 * exp_ch4.adb (Create_Anonymous_Master): Reimplemented to
1712 handle spec and body anonymous masters of the same unit.
1713 (Current_Anonymous_Master): Reimplemented. Handle a
1714 package instantiation that acts as a compilation unit.
1715 (Insert_And_Analyze): Reimplemented.
1717 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1719 * sem_ch10.adb (Analyze_With_Clause): A limited_with_clause on a
1720 predefined unit is treated as a regular with_clause.
1722 2015-05-22 Robert Dewar <dewar@adacore.com>
1724 * sem_ch12.adb, prj.ads, makeutl.ads, sem_ch6.adb, prj-nmsc.adb,
1725 prj-conf.adb, sem_disp.adb: Minor reformatting.
1727 2015-05-22 Vincent Celier <celier@adacore.com>
1729 * clean.adb (Parse_Cmd_Line): For native gnatclean, check
1730 for switch -P and, if found and gprclean is available, invoke
1732 * make.adb (Initialize): For native gnatmake, check for switch -P
1733 and, if found and gprbuild is available, invoke silently gprbuild.
1735 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
1737 * sem_ch13.adb (Validate_Unchecked_Conversions): Also issue
1738 specific warning for discrete types when the source is larger
1741 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1743 * einfo.ads, einfo.adb (Incomplete_Actuals): New attribute of
1744 package instantiations. Holds the list of actuals in the instance
1745 that are incomplete types, to determine where the corresponding
1746 instance body must be placed.
1747 * sem_ch6.adb (Conforming_Types): An incomplete type used as an
1748 actual in an instance matches an incomplete formal.
1749 * sem_disp.adb (Check_Dispatching_Call): Handle missing case of
1750 explicit dereference.
1751 (Inherited_Subprograms): In the presence of a limited view there
1752 are no subprograms to inherit.
1753 * sem_ch12.adb (Preanalyze_Actuals): Build list of incomplete
1754 actuals of instance, for later placement of instance body and
1755 freeze nodes for actuals.
1756 (Install_Body): In the presence of actuals that incomplete types
1757 from a limited view, the instance body cannot be placed after
1758 the declaration because full views have not been seen yet. Any
1759 use of the non-limited views in the instance body requires
1760 the presence of a regular with_clause in the enclosing unit,
1761 and will fail if this with_clause is missing. We place the
1762 instance body at the beginning of the enclosing body, which is
1763 the unit being compiled, and ensure that freeze nodes for the
1764 full views of the incomplete types appear before the instance.
1766 2015-05-22 Pascal Obry <obry@adacore.com>
1768 * makeutl.ads, prj-conf.adb, prj-nmsc.adb, prj.ads
1769 (In_Place_Option): Removed.
1770 (Relocate_Build_Tree_Option): New constant.
1771 (Root_Dir_Option): New constant.
1772 (Obj_Root_Dir): Removed.
1773 (Build_Tree_Dir): New variable.
1774 (Root_Src_Tree): Removed.
1775 (Root_Dir): New variable.
1776 * prj-conf.adb (Get_Or_Create_Configuration_File): Add check
1777 for improper relocation.
1778 * prj-nmsc.adb (Locate_Directory): Add check for improper
1781 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1783 * einfo.adb (Default_Init_Cond_Procedure): Code cleanup. The
1784 attribute now applies to the base type.
1785 (Has_Default_Init_Cond): Now applies to the base type.
1786 (Has_Inherited_Default_Init_Cond): Now applies to the base type.
1787 (Set_Default_Init_Cond_Procedure): Code cleanup. The attribute now
1788 applies to the base type.
1789 (Set_Has_Default_Init_Cond): Now applies to the base type.
1790 (Set_Has_Inherited_Default_Init_Cond): Now applies to the base type.
1791 * exp_ch3.adb (Expand_N_Object_Declaration): No need to use the
1792 base type when adding a call to the Default_Initial_Condition.
1794 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1796 * einfo.adb: Node36 is now used as Anonymous_Master. Flag253
1798 (Anonymous_Master): New routine.
1799 (Has_Anonymous_Master): Removed.
1800 (Set_Anonymous_Master): New routine.
1801 (Set_Has_Anonymous_Master): Removed.
1802 (Write_Entity_Flags): Remove the output for Has_Anonymous_Maser.
1803 (Write_Field36_Name): Add output for Anonymous_Master.
1804 * einfo.ads Add new attribute Anonymous_Master along with
1805 occurrences in nodes. Remove attribute Has_Anonymous_Master along
1806 with occurrences in nodes.
1807 (Anonymous_Master): New routine along with pragma Inline.
1808 (Has_Anonymous_Master): Removed along with pragma Inline.
1809 (Set_Anonymous_Master): New routine along with pragma Inline.
1810 (Set_Has_Anonymous_Master): Removed along with pragma Inline.
1811 * exp_ch4.adb (Create_Anonymous_Master): New routine.
1812 (Current_Anonymous_Master): Reimplemented.
1814 2015-05-22 Bob Duff <duff@adacore.com>
1816 * freeze.adb (Freeze_Profile): Suppress warning if imported
1817 subprogram is not at library level.
1819 2015-05-22 Robert Dewar <dewar@adacore.com>
1821 * sem_ch8.adb (Analyze_Object_Renaming): Check for renaming
1822 component of an object to which Volatile_Full_Access applies.
1824 2015-05-22 Jerome Guitton <guitton@adacore.com>
1826 * exp_dbug.ads: Add note about non bit-packed arrays.
1828 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
1830 * sem_prag.adb: Fix typo.
1831 * einfo.ads: Grammar fixes in comments.
1833 2015-05-22 Bob Duff <duff@adacore.com>
1835 * a-cborma.ads, a-cidlli.ads, a-cimutr.ads, a-ciormu.ads,
1836 * a-cihase.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
1837 * a-cborse.ads, a-comutr.ads, a-ciorma.ads, a-cobove.ads,
1838 * a-coormu.ads, a-convec.ads, a-cohase.ads, a-coinho.ads,
1839 * a-cbdlli.ads, a-cbmutr.ads, a-cbhase.ads, a-cdlili.ads,
1840 * a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
1841 * a-coinho-shared.ads (Constant_Reference_Type, Reference_Type):
1842 Add an initialization expression "raise Program_Error". See,
1843 for example, RM-A.18.2(148.4).
1845 2015-05-22 Robert Dewar <dewar@adacore.com>
1847 * debug.adb: Update documentation.
1848 * einfo.ads, einfo.adb (Needs_Typedef): New flag
1849 * exp_unst.adb (Unnest_Subprogram): Mark AREC types as needing
1851 * frontend.adb: Update comments.
1852 * gnat1drv.adb (Adjust_Global_Switches): Set all needed flags
1854 * opt.ads (Generate_C_Code): New switch.
1855 * osint-c.adb (Write_C_File_Info): Removed, not used
1856 (Write_H_File_Info): Removed, not used
1857 * osint-c.ads (Write_C_File_Info): Removed, not used
1858 (Write_H_File_Info): Removed, not used
1859 * osint.ads (Write_Info): Minor comment updates.
1860 (Output_FD): Moved from private part to public part of spec.
1861 * sem.adb (Semantics): Force expansion on if in Generate_C_Code
1863 * atree.ads: minor typo in comment.
1864 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
1865 Do not allow VFA on composite object with aliased component.
1867 2015-05-22 Arnaud Charlet <charlet@adacore.com>
1869 * osint-c.adb, osint-c.ads (Set_File_Name): Move back to spec.
1871 2015-05-22 Pascal Obry <obry@adacore.com>
1873 * prj-util.adb: Minor comment editing.
1875 2015-05-22 Pascal Obry <obry@adacore.com>
1877 * makeutl.ads (In_Place_Option): New constant.
1878 * prj.ads (Obj_Root_Dir): New variable (absolute path to relocate
1880 (Root_Src_Tree): New variable (absolute path of root source tree).
1881 * prj-conf.adb (Do_Autoconf): Take into account the object root
1882 directory (if defined) to generate configuration project.
1883 * prj-nmsc.adb (Get_Directories): Handle case where Obj_Root_Dir
1885 (Locate_Directory): Likewise.
1887 2015-05-22 Pascal Obry <obry@adacore.com>
1889 * prj-util.ads, prj-util.adb (Relative_Path): New routine.
1891 2015-05-22 Bob Duff <duff@adacore.com>
1893 * exp_utils.ads, exp_utils.adb (Find_Optional_Prim_Op): New
1894 interface to return Empty when not found, so we can avoid handling
1895 Program_Error in that case.
1896 (Find_Prim_Op): Fix latent bug: raise Program_Error when there are no
1898 * exp_ch7.adb, sem_util.adb: Use Find_Optional_Prim_Op when the
1899 code is expecting Empty.
1900 * sem_ch8.adb: Use Find_Optional_Prim_Op to avoid handling
1903 2015-05-22 Robert Dewar <dewar@adacore.com>
1905 * sem_ch3.adb, sem_intr.adb, exp_ch4.adb, s-rannum.adb,
1906 sem_eval.adb, s-fatgen.adb, s-expmod.ads: Remove incorrect hyphen in
1908 * exp_util.adb: Add comment.
1909 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move from spec to
1911 (Set_File_Name): New name for the above.
1912 (Create_C_File, Create_H_File, Write_C_File_Info, Write_H_File_Info,
1913 Close_C_File, Close_H_File): New procedure.
1914 * osint.adb: Minor reformatting.
1915 * osint.ads: Minor comment updates.
1917 2015-05-22 Robert Dewar <dewar@adacore.com>
1919 * exp_ch4.adb: Minor rewording.
1920 * exp_util.ads: Clarify that Find_Prim_Op is only for
1923 2015-05-22 Robert Dewar <dewar@adacore.com>
1925 * atree.adb, atree.ads, treepr.adb: Change name Needs_Actuals_Check to
1927 * exp_ch4.adb (Expand_N_Op_Expon): Optimize 2**x in modular
1930 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
1932 * exp_pakd.adb (Install_PAT): Propagate representation aspects
1933 from the original array type to the PAT.
1935 2015-05-22 Robert Dewar <dewar@adacore.com>
1937 * treepr.adb (Print_Node_Header): Add output of Needs_Actuals_Check.
1939 2015-05-22 Robert Dewar <dewar@adacore.com>
1941 * atree.adb, atree.ads (Needs_Actuals_Check): New flag.
1943 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1945 * sem_prag.adb (Analyze_Pragma): Remove the detection
1946 of a useless Part_Of indicator when the related item is a constant.
1947 (Check_Matching_Constituent): Do not emit an error on a constant.
1948 (Check_Missing_Part_Of): Do not check for a missing Part_Of indicator
1949 when the related item is a constant.
1950 (Collect_Body_States): Code cleanup.
1951 (Collect_Visible_States): Code cleanup.
1952 (Report_Unused_States): Do not emit an error on a constant.
1953 * sem_util.ads, sem_util.adb (Has_Variable_Input): Removed.
1955 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
1957 * sem_ch8.adb (Analyze_Object_Renaming): Copy
1958 Has_Volatile_Full_Access from renamed to renaming entities.
1959 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
1960 Tidy up and remove redundant setting of Has_Volatile_Full_Access.
1962 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1964 * ghost.adb (Check_Ghost_Completion): Update references to SPARK
1966 (Check_Ghost_Policy): Update references to SPARK RM 6.9 rules.
1967 * sem_ch3.adb (Analyze_Object_Declaration): Update references
1968 to SPARK RM 6.9 rules.
1969 (Check_Completion): Ghost entities do not require a special form of
1971 * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Update references
1972 to SPARK RM 6.9 rules.
1973 (Analyze_Subprogram_Body_Helper): Update references to SPARK RM 6.9
1975 * sem_ch7.adb (Analyze_Package_Body_Helper): Update references
1976 to SPARK RM 6.9 rules.
1977 (Requires_Completion_In_Body): Ghost entities do not require a special
1980 2015-05-22 Robert Dewar <dewar@adacore.com>
1982 * a-csquin.ads: Use Ada 2012 notation.
1983 * sem_ch8.adb: Minor reformatting.
1985 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1987 * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect Import
1988 acts as a completion.
1990 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1992 * sem_ch13.adb: Minor reformatting.
1994 2015-05-22 Jose Ruiz <ruiz@adacore.com>
1996 * a-reatim.adb: Minor change, fix typo.
1998 2015-05-22 Robert Dewar <dewar@adacore.com>
2000 * sem_util.ads: Minor addition of ??? comment.
2001 * sem_prag.adb, sem_util.adb: Minor reformatting.
2002 * sem_ch13.adb: minor reformatting.
2004 2015-05-22 Robert Dewar <dewar@adacore.com>
2006 * a-reatim.ads: Add Compile_Time_Error to ensure Duration
2008 * sem_ch13.adb: Improve error message.
2009 * exp_ch4.adb: Minor reformatting.
2011 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
2013 * sem_prag.adb (Analyze_Pragma): Constants without variable
2014 input do not require indicator Part_Of.
2015 (Check_Missing_Part_Of): Constants without variable input do not
2016 requrie indicator Part_Of.
2017 (Collect_Visible_States): Constants without variable input are
2018 not part of the hidden state of a package.
2019 * sem_util.ads, sem_util.adb (Has_Variable_Input): New routine.
2021 2015-05-22 Robert Dewar <dewar@adacore.com>
2023 * exp_util.adb (Activate_Atomic_Synchronization): Do not set
2024 Atomic_Sync_Required for an object renaming declaration.
2025 * sem_ch8.adb (Analyze_Object_Renaming): Copy Is_Atomic and
2026 Is_Independent to renaming object.
2028 2015-05-22 Ed Schonberg <schonberg@adacore.com>
2030 * sem_ch5.adb (Analyze_Iterator_Specification): Diagnose
2031 various illegalities in iterators over arrays and containers:
2032 a) New function Get_Cursor_Type, to verify that the cursor is
2033 not a limited type at the point of iteration.
2034 b) If the container is a constant, an element_iterator is illegal
2035 if the container type does not have a Constant_Indexing aspect.
2036 c) If the iterate function has an in-out controlling parameter,
2037 the container cannot be a constant object.
2038 d) Reject additional cases of iterators over a
2039 discriminant-dependent component of a mutable object.
2041 2015-05-21 Hristian Kirtchev <kirtchev@adacore.com>
2043 * einfo.adb (Contract): This attribute now applies to constants.
2044 (Set_Contract): This attribute now applies to constants.
2045 (Write_Field34_Name): Add output for constants.
2046 * einfo.ads Attribute Contract now applies to constants.
2047 * sem_ch3.adb (Analyze_Object_Contract): Constants now have
2048 their Part_Of indicator verified.
2049 * sem_prag.adb (Analyze_Constituent): A constant is now a valid
2051 (Analyze_Global_Item): A constant cannot act as an output.
2052 (Analyze_Initialization_Item): Constants are now a valid
2053 initialization item.
2054 (Analyze_Initializes_In_Decl_Part): Rename
2055 global variable States_And_Vars to States_And_Objs and update
2056 all its occurrences.
2057 (Analyze_Input_Item): Constants are now a
2058 valid initialization item. Remove SPARM RM references from error
2060 (Analyze_Pragma): Indicator Part_Of can now apply to a constant.
2061 (Collect_Body_States): Collect both source constants
2063 (Collect_States_And_Objects): Collect both source constants and
2065 (Collect_States_And_Variables): Rename
2066 to Collect_States_And_Objects and update all its occurrences.
2067 (Collect_Visible_States): Do not collect constants and variables
2068 used to map generic formals to actuals.
2069 (Find_Role): The role of a constant is that of an input. Separate the
2070 role of a variable from that of a constant.
2071 (Report_Unused_Constituents): Add specialized wording for constants.
2072 (Report_Unused_States): Add specialized wording for constants.
2073 * sem_util.adb (Add_Contract_Item): Add processing for constants.
2074 * sem_util.ads (Add_Contract_Item): Update the comment on usage.
2075 (Find_Placement_In_State_Space): Update the comment on usage.
2077 2015-05-21 Ed Schonberg <schonberg@adacore.com>
2079 * sem_ch5.adb: minor reformatting.
2081 2015-05-21 Robert Dewar <dewar@adacore.com>
2083 * freeze.adb (Freeze_Entity): Properly tag -gnatw.z messages.
2085 2015-05-21 Robert Dewar <dewar@adacore.com>
2087 * freeze.adb: Minor reformatting.
2088 * cstand.adb (Print_Standard): Fix bad printing of Duration
2090 * a-reatim.adb (Time_Of): Complete rewrite to properly detect
2093 2015-05-21 Ed Schonberg <schonberg@adacore.com>
2095 * sem_ch5.adb: add (useless) initial value.
2096 * sem_ch3.adb (Replace_Anonymous_Access_To_Protected_Subprogram):
2097 Check whether the procedure has parameters before processing
2098 formals in ASIS mode.
2100 2015-05-21 Ed Schonberg <schonberg@adacore.com>
2102 * sem_ch13.adb (Check_Iterator_Functions): Emit error on Iterator
2103 aspect as well when indexing function is illegal.
2104 (Valid_Default_Iterator): Handle properly somme illegal cases
2105 to prevent compilation abandoned messages.
2106 (Check_Primitive_Function): Verify that type and indexing function
2107 are in the same scope.
2108 * freeze.adb (Freeze_Record): Extend patch on the presence of
2109 indexing aspects to aspect Default_Iterator.
2111 2015-05-19 David Malcolm <dmalcolm@redhat.com>
2113 * gcc-interface/trans.c (Sloc_to_locus1): Strenghthen local "map"
2114 from line_map * to line_map_ordinary *.
2116 2015-05-12 Jason Merrill <jason@redhat.com>
2118 * sigtramp-vxworks.c: Add space between string literal and macro
2121 2015-05-12 Arnaud Charlet <charlet@adacore.com>
2123 * gnat_rm.texi, gnat_ugn.texi, doc: Documentation updates and clean ups
2125 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2127 * sem_ch5.adb (Analyze_Iterator_Specifications): Additional
2128 legality checks for array and container iterators:
2129 a) The domain of iteration cannot be a component that depends
2130 on discriminants of a mutable object. The check was recently
2131 added for element iterators.
2132 b) The cursor type cannot be a limited type at the point of the
2133 iteration, because the cursor will be assigned to in the body
2136 2015-05-12 Robert Dewar <dewar@adacore.com>
2138 * freeze.adb (Freeze_Record_Type): Make sure that if we have
2139 aspect Iterator_Element, then we have either Constant_Indexing
2140 or Variable_Indexing.
2142 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2144 * a-coormu.ads, a-coormu.adb: Add Indexing aspect, Reference_Type,
2145 and Reference_Control_Type to support element iterators over
2147 * a-ciormu.ads, a-ciormu.adb: Ditto for
2148 indefinite_ordered_multisets.
2150 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
2152 * exp_ch4.adb (Expand_N_Expression_With_Actions): Force
2153 the evaluation of the EWA expression. Code cleanup.
2154 (Process_Transient_Object): Code cleanup.
2155 * exp_util.adb (Is_Aliased): Controlled transient objects found
2156 within EWA nodes are not aliased.
2157 (Is_Finalizable_Transient): Iterators are not finalizable transients.
2159 2015-05-12 Robert Dewar <dewar@adacore.com>
2161 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
2162 Don't allow Atomic and Volatile_Full_Access for the same entity.
2164 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2166 * sem_ch5.adb (Analyze_Iterator_Specification): Implement new
2167 semantics and safety checks specified in AI12-0151.
2169 2015-05-12 Pierre-Marie de Rodat <derodat@adacore.com>
2171 * sem_ch10.adb (Sem_Ch10.Analyze_Proper_Body): Generate SCOs
2172 for subunit in generic units.
2174 2015-05-12 Robert Dewar <dewar@adacore.com>
2176 * sem_elab.adb (Check_A_Call): Avoid checking internal call
2179 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2181 * sem_ch6.adb (Process_Formals): An untagged incomplete type
2182 is legal in the profile of a null procedure.
2184 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2186 * sem_ch12.adb (Validate_Derived_Type_Instance): Handle properly
2187 the checks on a derived formal whose parent type is a previous
2188 formal that is not a derived type.
2190 2015-05-12 Robert Dewar <dewar@adacore.com>
2192 * aspects.ads, aspects.adb: Add entries for aspect Volatile_Full_Access
2193 * einfo.adb (Has_Volatile_Full_Access): New flag.
2194 (Has_Volatile_Full_Access): New flag.
2195 * einfo.ads (Has_Volatile_Full_Access): New flag.
2196 * par-prag.adb: Add dummy entry for Volatile_Full_Access.
2197 * sem_prag.adb (Analyze_Pragma, case Volatile_Full_Access):
2198 Implement new pragma.
2199 * snames.ads-tmpl: Add entries for pragma Volatile_Full_Access.
2201 2015-05-12 Robert Dewar <dewar@adacore.com>
2203 * targparm.ads: Minor reformatting.
2205 2015-05-12 Robert Dewar <dewar@adacore.com>
2207 * a-reatim.adb (Time_Of): Properly detect overflow when TS = 0.0.
2208 * a-reatim.ads: Minor reformatting.
2210 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
2212 * einfo.ads: Update the documentation of flags
2213 Has_Inherited_Default_Init_Cond and Has_Default_Init_Cond.
2215 2015-05-12 Robert Dewar <dewar@adacore.com>
2217 * impunit.adb: Add entry for a-dhfina.ads
2218 * a-dhfina.ads: New file.
2220 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2222 * exp_ch5.adb (Expand_Iterator_Loop_Over_Array): if the array
2223 type has convention Fortran, a multidimensional iterator varies
2224 the first dimension fastest.
2226 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
2228 * einfo.adb: Node32 is now used as Encapsulating_State.
2229 Node37 is now used as Associated_Entity.
2230 (Associated_Entity): New routine.
2231 (Encapsulating_State): Update the assertion guard to include constants.
2232 (Set_Associated_Entity): New routine.
2233 (Set_Encapsulating_State): Update the assertion guard to
2235 (Write_Field10_Name): Remove the output for Encapsulating_State.
2236 (Write_Field32_Name): Add output for Encapsulating_State.
2237 (Write_Field37_Name): Add output for Associated_Entity.
2238 * einfo.ads New attribute Associated_Entity along with placement
2239 in entities. Attribute Encapsulating_State now uses Node32.
2240 (Associated_Entity): New routine along with pragma Inline.
2241 (Set_Associated_Entity): New routine along with pragma Inline.
2242 * inline.ads Code reformatting.
2243 * sem_attr.adb (Analyze_Attribute): Correct the prefix of
2244 attribute 'Result when the context is a generic instantiation.
2245 (Analyze_Attribute_Old_Result): Pragmas Depends and
2246 Refined_Depends are a valid context for attribute 'Result.
2247 (Denote_Same_Function): Allow attribute 'Result to denote
2249 * sem_ch3.adb Add with and use clauses for Sem_Ch12.
2250 (Analyze_Declarations): Capture global references within the
2251 contracts of packages, subprograms and their respective bodies.
2252 * sem_ch6.adb (Analyze_Aspects_On_Body_Or_Stub): Removed.
2253 (Analyze_Completion_Contract): Removed.
2254 (Analyze_Generic_Subprogram_Body): Enchange the aspects after
2255 creating the generic copy. Create a generic contract for the
2256 template. Analyze the aspects of the generic body. Analyze the
2257 contract of the generic body when it is a compilation unit and
2258 capture global references.
2259 (Analyze_Subprogram_Body_Contract): Code cleanup.
2260 (Analyze_Subprogram_Contract): Do not save global references here.
2261 (Save_Global_References_In_List): Removed.
2262 * sem_ch7.adb (Analyze_Package_Body_Contract): Code cleanup.
2263 (Analyze_Package_Body_Helper): Create a generic contract for
2265 (Analyze_Package_Contract): Code cleanup.
2266 * sem_ch10.adb Add with and use clauses for Sem_Ch12.
2267 (Analyze_Compilation_Unit): Capture global references in a
2268 generic subprogram declaration that acts as a compilation unit.
2269 * sem_ch12.adb Add with and use clauses for Sem_Prag. Illustrate
2270 the implementation of generic contracts. Alphabetize various
2272 (Analyze_Generic_Package_Declaration):
2273 Create a generic contract for the template.
2274 (Analyze_Generic_Subprogram_Declaration): Create a generic
2275 contract for the template.
2276 (Analyze_Subprogram_Instantiation): Instantiate the contract of the
2278 (Copy_Generic_Node): Link defining entities of the generic template
2279 with the corresponding defining entities of the generic copy. Update
2280 the processing of pragmas.
2281 (Instantiate_Contract): Removed.
2282 (Instantiate_Subprogram_Contract): New routine.
2283 (Requires_Delayed_Save): New routine.
2284 (Save_Global_References): Rename formal parameter N to Templ. Various
2286 (Save_Global_References_In_Aspects): Moved from the spec.
2287 (Save_Global_References_In_Contract): New routine.
2288 (Save_References_In_Aggregate): New routine.
2289 (Save_References_In_Char_Lit_Or_Op_Symbol): New routine.
2290 (Save_References_In_Descendants): New routine.
2291 (Save_References_In_Identifier): New routine.
2292 (Save_References_In_Operator): New routine.
2293 (Save_References_In_Pragma): New routine.
2294 * sem_ch12.ads (Save_Global_References): Rename formal
2295 parameter N to Templ. Update the comment on usage.
2296 (Save_Global_References_In_Aspects): Moved to the body.
2297 (Save_Global_References_In_Contract): New routine.
2298 * sem_ch13.adb (Analyze_Aspect_Specifications_On_Body_Or_Stub):
2300 * sem_ch13.ads (Analyze_Aspect_Specifications_On_Body_Or_Stub):
2302 * sem_prag.adb (Add_Item_To_Name_Buffer): Add support for
2304 (Analyze_Contract_Cases_In_Decl_Part): Code cleanup.
2305 (Analyze_Depends_Global): New routine.
2306 (Analyze_Depends_In_Decl_Part): Code cleanup.
2307 (Analyze_Global_In_Decl_Part): Code cleanup.
2308 (Analyze_Global_Item): Constants are now valid global items. Do
2309 not perform state-related checks in an instance. Change the way
2310 renamings are handled. (Analyze_Initial_Condition_In_Decl_Part):
2312 (Analyze_Initializes_In_Decl_Part): Code cleanup.
2313 (Analyze_Input_Output): The analysis of attribute 'Result in
2314 the context of pragmas Depends or Refined_Depends now reuses
2315 the existing attribute analysis machinery. Constants and
2316 generic parameters are now valid dependency items. Do not
2317 perform state-related checks in an instance. Change the way
2318 renamings are handled. (Analyze_Pragma): Add a "characteristics"
2319 section for pragmas Abstract_State, Contract_Cases, Depends,
2320 Extensions_Visible, Global, Initial_Condition, Initializes,
2321 Post, Post_Class, Postcondition, Pre, Pre_Class, Precondition,
2322 Refined_Depends, Refined_Global, Refined_Post, Refined_State, Test_Case.
2323 (Analyze_Pre_Post_Condition): Do not create a generic
2325 (Analyze_Pre_Post_Condition_In_Decl_Part): Code cleanup.
2326 (Analyze_Refined_Depends_Global_Post): New routine.
2327 (Analyze_Refined_Depends_In_Decl_Part): Code cleanup.
2328 (Analyze_Refined_Global_In_Decl_Part): Code cleanup.
2329 (Analyze_Refined_Pragma): Removed.
2330 (Analyze_Refined_State_In_Decl_Part): Code cleanup.
2331 (Analyze_Test_Case_In_Decl_Part): Code cleanup.
2332 (Check_Dependency_Clause): Do not perform this check in an instance.
2333 (Check_Function_Return): Add support for generic functions.
2334 (Check_In_Out_States): Do not perform this check in an instance.
2335 (Check_Input_States): Do not perform this check in an instance.
2336 (Check_Mode_Restriction_In_Function): Add support for generic functions.
2337 (Check_Output_States): Do not perform this check in an instance.
2338 (Check_Postcondition_Use_In_Inlined_Subprogram): Rename
2339 parameter Subp_Id to Spec_Id and update comment on usage.
2340 (Check_Proof_In_States): Do not perform this check in an instance.
2341 (Check_Refined_Global_Item): Add support for constants.
2342 (Check_Refined_Global_List): Do not perform this check in an instance.
2343 (Collect_Global_Items): Reimplemented.
2344 (Collect_Subprogram_Inputs_Outputs): Add support for generic parameters.
2345 (Create_Generic_Template): Removed.
2346 (Find_Related_Package_Or_Body): Moved to spec.
2347 (Find_Role): Add support for generic parameters and constants.
2348 (Get_Argument): Moved to spec. Rename parameter Spec_Id to Context_Id.
2349 (Match_Item): Add support for constants.
2350 (Preanalyze_Test_Case_Arg): Reimplemented.
2351 (Report_Extra_Clauses): Do not perform this check in an instance.
2352 (Report_Extra_Constituents): Do not perform this check in an instance.
2353 * sem_prag.ads (Collect_Subprogram_Inputs_Outputs): Update
2354 the comment on usage.
2355 (Find_Related_Package_Or_Body): Moved from body.
2356 (Get_Argument): Moved from body.
2357 * sem_util.adb Add with and use clauses for Sem_Ch12.
2358 (Corresponding_Spec_Of): Add support for packages and package bodies.
2359 (Create_Generic_Contract): New routine.
2360 (Is_Contract_Annotation): Reimplemented.
2361 (Is_Generic_Declaration_Or_Body): New routine.
2362 (Is_Package_Contract_Annotation): New routine.
2363 (Is_Subprogram_Contract_Annotation): New routine.
2364 * sem_util.ads (Corresponding_Spec_Of): Update the comment on usage.
2365 (Create_Generic_Contract): New routine.
2366 (Is_Generic_Declaration_Or_Body): New routine.
2367 (Is_Package_Contract_Annotation): New routine.
2368 (Is_Subprogram_Contract_Annotation): New routine.
2369 * sinfo.adb (Is_Generic_Contract_Pragma): New routine.
2370 (Set_Is_Generic_Contract_Pragma): New routine.
2371 * sinfo.ads Add new attribute Is_Generic_Contract_Pragma along
2372 with occurrences in nodes.
2373 (Is_Generic_Contract_Pragma): New routine along with pragma Inline.
2374 (Set_Is_Generic_Contract_Pragma): New routine along with pragma Inline.
2375 * treepr.adb (Print_Entity_Info): Output fields 36 to 41.
2377 2015-05-12 Robert Dewar <dewar@adacore.com>
2379 * a-taster.ads: Minor comment fix: fix bad header, this is a
2382 2015-05-12 Robert Dewar <dewar@adacore.com>
2384 * sem_intr.adb: (Check_Shift): Diagnose bad modulus value.
2386 2015-05-12 Robert Dewar <dewar@adacore.com>
2388 * gnat1drv.adb (Adjust_Global_Switches): Default to suppressing
2389 Alignment_Checks on non-strict alignment machine.
2390 * sem_ch13.adb (Validate_Address_Clauses): Don't give
2391 compile-time alignment warnings if run time Alignment_Check
2394 2015-05-12 Thomas Quinot <quinot@adacore.com>
2396 * g-sercom.ads, g-sercom-linux.adb (GNAT.Serial_Communications.
2397 Data_Rate): New literals B75, B110, B150, B300, B600.
2399 2015-05-12 Doug Rupp <rupp@adacore.com>
2401 * init.c (__gnat_init_float) [vxworks]: For e500v2,
2402 do nothing and leave the responsibility to install the handler
2403 and enable the exceptions to the BSP.
2405 2015-05-12 Robert Dewar <dewar@adacore.com>
2407 * sem_ch9.adb, einfo.ads, exp_intr.adb: Minor reformatting.
2408 * sem_disp.adb: Minor code reorganization (remove junk redundant
2410 * exp_unst.adb (Unnest_Subprogram.Uplev_Refs): Ignore uplevel
2411 references to bounds of types coming from original type reference.
2412 * checks.ads: Minor reformatting.
2413 * checks.adb: Minor reformatting.
2414 * sem_prag.adb (Analyze_Pragma, case Check): If in ignored
2415 assertion, then make sure we do not drag in bignum stuff.
2417 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2419 * sem_ch9.adb (Collect_Interfaces): Initialize
2420 Direct_Primitive_Operations for a tagged synchronized type,
2421 so it can used in ASIS mode.
2422 * sem_disp.adb (Check_Dispatching_Operation): If expansion is
2423 disabled, attach subprogram to list of Direct_Primitive_Operations
2424 of synchronized type itself, for ASIS use, because in this case
2425 Corresponding_Record_Type is not built.
2426 * einfo.ads: Indicate use of Direct_Primitive_Operations on
2429 2015-05-12 Pierre-Marie de Rodat <derodat@adacore.com>
2431 * exp_pakd.adb: Make clearer the comment in exp_pakd.adb about
2434 2015-05-12 Robert Dewar <dewar@adacore.com>
2436 * sem_ch3.adb, sem_util.adb, sem_ch6.adb: Minor reformatting.
2438 2015-05-12 Robert Dewar <dewar@adacore.com>
2440 * exp_unst.adb (Visit_Node): Deal with subprogram and package stubs.
2442 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2444 * exp_intr.adb (Expand_Dispatching_Constructor_Call): The
2445 tag to be retrieved for the generated call is the first entry
2446 in the dispatch table for the return type of the instantiated
2449 2015-05-12 Bob Duff <duff@adacore.com>
2451 * exp_ch7.adb, exp_ch7.ads, exp_intr.adb, exp_util.adb,
2452 exp_util.ads: Update comments.
2454 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2456 * sem_ch3.adb (Add_Internal_Interface_Entities): Do no generate
2457 freeze nodes for these in ASIS mode, because they lead to
2458 elaoration order issues in gigi.
2460 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
2462 * sem_ch6.adb (Analyze_Expression_Function): Code
2463 cleanup. Use Copy_Subprogram_Spec to create a proper spec.
2464 (Analyze_Subprogram_Body_Helper): Code cleanup. Do not
2465 prepare a stand alone body for inlining in GNATprove mode
2466 when inside a generic. (Body_Has_Contract): Reimplemented.
2467 (Build_Subprogram_Declaration): New routine.
2468 * sem_ch10.adb (Analyze_Compilation_Unit): Capture global
2469 references within generic bodies by loading them.
2470 * sem_util.adb (Copy_Parameter_List): Code cleanup.
2471 (Copy_Subprogram_Spec): New routine.
2472 (Is_Contract_Annotation): New routine.
2473 * sem_util.ads (Copy_Subprogram_Spec): New routine.
2474 (Is_Contract_Annotation): New routine.
2476 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
2478 * sem_attr.adb (Resolve_Attribute): Do not analyze the generated
2479 body of an expression function when the prefix of attribute
2480 'Access is the body.
2482 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2484 * sem_ch3.adb (Build_Derived_Enumeration_Type): The anonymous base
2485 created for a derived enumeration type is not a first subtype,
2486 even though it is defined through a full type declaration.
2487 * sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): Do not process
2488 aspects for the anonymous base type constructed for a derived
2489 scalar type, because they will be set when the first subtype
2491 (Inherit_Aspects_At_Freeze_Point): Fix typos on handling of
2492 Default_Value and Default_Component_Value, that prevented the
2493 proper inheritance of these aspects.
2495 2015-05-12 Gary Dismukes <dismukes@adacore.com>
2497 * exp_ch6.adb, exp_unst.adb: Minor typo fixes.
2499 2015-05-12 Robert Dewar <dewar@adacore.com>
2501 * sem_ch3.adb: Minor reformatting.
2503 2015-05-12 Vincent Celier <celier@adacore.com>
2505 * gnatcmd.adb: If we want to invoke gnatmake (gnatclean) with
2506 -P, then check if gprbuild (gprclean) is available; if it is,
2507 use gprbuild (gprclean) instead of gnatmake (gnatclean).
2509 2015-05-12 Robert Dewar <dewar@adacore.com>
2511 * debug.adb: Add flag -gnatd.3 to output diagnostic info from
2513 * einfo.ad, einfo.adb: Reorganize (and remove most of) flags used by
2515 * exp_ch6.adb (Unest_Bodies): Table for delayed calls to
2516 Unnest_Subprogram (Expand_N_Subprogram_Body): Add entry to table
2517 for later call instead of calling Unnest_Subprogram directly
2518 (Initialize): New procedure (Unnest_Subprograms): New procedure
2519 * exp_ch6.ads (Add_Extra_Actual_To_Call): Move into proper
2521 (Initialize): New procedure.
2522 (Unnest_Subprograms): New procedure.
2523 * exp_unst.adb (Unnest_Subprogram): Major rewrite, moving
2524 all processing to this routine which is now called late
2525 after instantiating bodies. Fully handles the case of generic
2527 * exp_unst.ads: Major rewrite, moving all processing to
2529 * frontend.adb (Frontend): Add call to Exp_Ch6.Initialize.
2530 (Frontend): Add call to Unnest_Subprograms.
2531 * sem_ch8.adb (Find_Direct_Name): Back to old calling sequence
2532 for Check_Nested_Access.
2533 * sem_util.adb (Build_Default_Subtype): Minor reformatting
2534 (Check_Nested_Access): Back to original VM-only form (we
2535 now do all the processing for Unnest_Subprogram at the time
2537 (Denotes_Same_Object): Minor reformatting
2538 (Note_Possible_Modification): Old calling sequence for
2539 Check_Nested_Access.
2540 * sem_util.ads (Check_Nested_Access): Back to original VM-only
2541 form (we now do all the processing for Unnest_Subprogram at the
2544 2015-05-12 Robert Dewar <dewar@adacore.com>
2546 * sem_ch3.adb, freeze.adb, sem_ch6.adb: Minor reformatting.
2548 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2550 * sem_ch3.adb (Analyze_Object_Declaration): New function
2551 Has_Delayed_Aspect, used to defer resolution of an aggregate
2552 expression when the object declaration carries aspects Address
2554 * freeze.adb (Freeze_Object_Declaration): New subsidiary procedure
2555 to Freeze_Entity. In addition to the previous processing steps
2556 at the freeze point of an object, this procedure also handles
2557 aggregates in object declarations, when the declaration carries
2558 delayed aspects that require that the initialization of the
2559 object be attached to its freeze actions.
2561 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2563 * sem_ch6.adb (Analyze_Subprogram_Declaration): Following
2564 AI12-0147, null procedures and expression functions are allowed
2565 in protected bodies.
2567 2015-05-12 Tristan Gingold <gingold@adacore.com>
2569 * i-cpoint.adb (Copy_Terminated_Array): Copy nothing if Length is 0.
2571 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2573 * sem_ch3.adb (Complete_Private_Subtype): Propagate
2574 Has_Delayed_Aspects flag from private to full view, to ensure
2575 that predicate functions are constructed.
2577 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2579 * sem_ch6.adb (Process_Formals): If a tagged formal is an
2580 incomplete class-wide type, the subprogram must have a delayed
2581 freeze even though the opertation is not a primitive of the
2582 type. THis ensures that the backend can recover the full view
2583 when elaborating the subprogram declaration.
2585 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2587 * exp_util.adb (Get_Current_Value_Condition): Nothing to be
2588 done if an elsif part has been rewritten so that it is not part
2589 of an enclosing if_statement.
2591 2015-05-12 Robert Dewar <dewar@adacore.com>
2593 * sem_type.adb, sem_ch10.adb, freeze.adb, sem_ch6.adb, exp_disp.adb:
2596 2015-05-12 Bob Duff <duff@adacore.com>
2598 * exp_attr.adb (Size): Remove unnecessary check for types with
2599 unknown discriminants. That was causing the compiler to build
2600 a function call _size(T), where T is a type, not an object.
2602 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2604 * sem_ch4.adb (Extended_Primitive_Ops): Exclude overriding
2605 primitive operations of a type extension declared in the package
2606 body, to prevent duplicates in extended list.
2608 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2610 * sem_ch3.adb (Analyze_Component_Declaration): If the component is
2611 an unconstrained synchronized type with discriminants, create a
2612 constrained default subtype for it, so that the enclosing record
2613 can be given the proper size.
2614 * sem_util.adb (Build_Default_Subtype): If the subtype is created
2615 for a record discriminant, do not analyze the declarztion at
2616 once because it is added to the freezing actions of the enclosing
2619 2015-05-12 Robert Dewar <dewar@adacore.com>
2621 * exp_prag.adb (Expand_N_Pragma): Rewrite ignored pragma as
2623 * namet.ads (Boolean3): Document this flag used for Ignore_Pragma.
2624 * par-prag.adb (Prag): Implement Ignore_Pragma.
2625 * sem_prag.adb: Implement Ignore_Pragma.
2626 * snames.ads-tmpl: Add entries for pragma Ignore_Pragma.
2628 2015-05-12 Javier Miranda <miranda@adacore.com>
2630 * sem_ch10.adb (Build_Shadow_Entity): Link the class-wide shadow
2631 entity with its corresponding real entity.
2632 (Decorate_Type): Unconditionally build the class-wide shadow entity of
2634 * einfo.ads, einfo.adb (Has_Non_Limited_View): New synthesized
2636 (Non_Limited_View): Moved from field 17 to field 19 be available
2637 in class-wide entities.
2638 * exp_attr.adb (Access_Cases): Code cleanup.
2639 * exp_disp.adb (Expand_Interface_Actuals): Ditto.
2640 * exp_util.adb (Non_Limited_Designated_Type): Ditto.
2641 * freeze.adb (Build_Renamed_Bdody): Ditto.
2642 * sem_aux.adb (Available_View): Ditto.
2643 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
2644 (Try_One_Prefix_Interpretation): Ditto.
2645 * sem_ch5.adb (Analyze_Assignment): Ditto.
2646 * sem_ch6.adb (Detect_And_Exchange): Ditto.
2647 * sem_ch8.adb (Find_Expanded_Name): Ditto.
2648 * sem_disp.adb (Check_Controlling_Type): Ditto.
2649 * sem_res.adb (Resolve_Type_Conversion): Ditto.
2650 (Full_Designated_Type): Ditto.
2651 * sem_type.adb (Covers): Ditto.
2652 * sem_util.adb: Fix typo in comment.
2654 2015-05-12 Robert Dewar <dewar@adacore.com>
2656 * exp_unst.adb (Get_Real_Subp): New subprogram.
2657 (Unnest_Subprogram): Use Get_Real_Subp.
2658 (Uplev_Refs_For_One_Subp): Skip if no ARECnU entity.
2659 (Uplev_Refs_For_One_Subp): Use actual subtype in unconstrained case.
2661 2015-05-12 Robert Dewar <dewar@adacore.com>
2663 * a-reatim.adb ("/"): Add explicit check for Time_Span_First / -1.
2665 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2667 * sem_ch4.adb (Extended_Primitive_Ops): New subprogram,
2668 auxiliary to Try_Primitive_Operation to handle properly prefixed
2669 calls where the operation is not a primitive of the type, but
2670 is declared in the package body that is in the immediate scope
2673 2015-05-12 Robert Dewar <dewar@adacore.com>
2675 * sem_util.adb (Is_Variable): Allow X'Deref(Y) as a variable.
2677 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2679 * sem_ch8.adb (Find_Expanded_Name): Handle properly a fully
2680 qualified name for an instance of a generic grand-child unit in
2681 the body its parent.
2683 2015-05-12 Robert Dewar <dewar@adacore.com>
2685 * exp_unst.adb (Upref_Name): New subprogram.
2686 (Unnest_Subprogram): Use Upref_Name.
2687 (Unnest_Subprogram): Use new Deref attribute.
2688 * exp_unst.ads: Doc updates.
2690 2015-05-12 Thomas Quinot <quinot@adacore.com>
2692 * adaint.c: Enable Large File Support in adaint so that __gnat_readdir
2693 can access files on filesystems mounted from servers that use large
2696 2015-05-09 Eric Botcazou <ebotcazou@adacore.com>
2698 * gcc-interface/utils.c (gnat_write_global_declarations): Use type_decl
2699 method instead of global_decl for TYPE_DECLs.
2701 2015-04-27 Jim Wilson <jim.wilson@linaro.org>
2703 * gcc-interface/Makefile-lan.in (ada.mostlyclean): Remove gnatbind
2706 2015-04-13 Eric Botcazou <ebotcazou@adacore.com>
2708 * gnatvsn.ads (Library_Version): Bump to 6.
2710 2015-04-09 Iain Sandoe <iain@codesourcery.com>
2712 * gcc-interface/Makefile.in (darwin, powerpc): Enable atomics.
2714 2015-04-08 Eric Botcazou <ebotcazou@adacore.com>
2716 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Do not make
2717 a function returning an unconstrained type 'const' for the middle-end.
2719 * gcc-interface/trans.c (Pragma_to_gnu) <case Pragma_Warning>: Use
2720 exact condition to detect Reason => "..." pattern.
2722 2015-03-31 Tom de Vries <tom@codesourcery.com>
2725 * terminals.c (child_setup_tty): Fix warning 'argument to sizeof in
2726 bzero call is the same expression as the destination'.
2728 2015-03-26 Eric Botcazou <ebotcazou@adacore.com>
2730 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Deref>: New case.
2732 2015-03-24 Gary Dismukes <dismukes@adacore.com>
2734 * sem_ch3.adb: Minor typo fix (missing paren).
2736 2015-03-24 Robert Dewar <dewar@adacore.com>
2738 * sinfo.ads: Update comment.
2740 2015-03-24 Robert Dewar <dewar@adacore.com>
2742 * exp_attr.adb: Add entry for typ'Deref.
2743 * sem_attr.adb (Deref): New GNAT attribute.
2744 * sem_attr.ads: Add entry for new GNAT attribute Deref.
2745 * snames.ads-tmpl: Add entries for new attribute Deref.
2747 2015-03-24 Ed Schonberg <schonberg@adacore.com>
2749 * sem_ch13.adb (Rep_Item_Too_Early): allow pragma Convention
2752 2015-03-24 Gary Dismukes <dismukes@adacore.com>
2754 * inline.adb: Minor typo fix.
2756 2015-03-24 Arnaud Charlet <charlet@adacore.com>
2758 * doc/gnat_ugn/building_executable_programs_with_gnat.rst,
2759 doc/gnat_ugn/gnat_utility_programs.rst
2760 doc/gnat_rm/implementation_defined_attributes.rst
2761 doc/gnat_rm/implementation_defined_pragmas.rst
2762 doc/gnat_rm/representation_clauses_and_pragmas.rst
2763 doc/gnat_rm/about_this_guide.rst
2764 doc/gnat_rm/implementation_of_ada_2012_features.rst: Doc improvements.
2765 * gnat_rm.texi, gnat_ugn.texi: Regenerate.
2767 2015-03-23 Jakub Jelinek <jakub@redhat.com>
2770 * adadecode.c (ada_demangle): Guard with IN_RTS instead of IN_GCC.
2772 2015-03-20 Eric Botcazou <ebotcazou@adacore.com>
2775 * gcc-interface/utils.c (gnat_pushdecl): Tidy up and improve comment.
2776 Make sure to chain only main variants through TYPE_NEXT_PTR_TO.
2778 * gcc-interface/trans.c (Attribute_to_gnu): Revert latest change.
2780 2015-03-16 Eric Botcazou <ebotcazou@adacore.com>
2782 * gcc-interface/utils2.c (gnat_invariant_expr): Return null if the type
2783 of the expression ends up being composite.
2785 2015-03-16 Eric Botcazou <ebotcazou@adacore.com>
2787 * gcc-interface/decl.c (is_from_limited_with_of_main): New predicate.
2788 (gnat_to_gnu_entity) <E_Subprogram_Type>: Invoke it on return and
2789 parameter types to detect circularities in ASIS mode.
2790 * gcc-interface/trans.c (Attribute_to_gnu): Mention AI05-0151.
2792 2015-03-16 Eric Botcazou <ebotcazou@adacore.com>
2794 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Abstract_State>: Do not
2795 short-circuit the regular handling.
2797 2015-03-13 Robert Dewar <dewar@adacore.com>
2799 * exp_unst.adb (Note_Uplevel_Reference): Eliminate duplicate
2801 (Actual_Ref): New function.
2802 (AREC_String): Minor reformatting.
2803 (Unnest_Subprogram): Use Actual_Ref.
2804 * frontend.adb (Frontend): Turn off Unnest_Subprogram_Mode
2805 before call to Instantiate_Bodies.
2807 2015-03-13 Ed Schonberg <schonberg@adacore.com>
2809 * freeze.adb (Freeze_Profile): If the return type of a function
2810 being frozen is an untagged limited view and the function is
2811 abstract, mark the type as frozen because there is no later
2812 point at which the profile of the subprogram will be elaborated.
2814 2015-03-13 Robert Dewar <dewar@adacore.com>
2816 * einfo.adb, einfo.ads, atree.adb, atree.ads, atree.h: Add seventh
2817 component to entities. Add new fields Field36-41 and Node36-41.
2819 2015-03-13 Claire Dross <dross@adacore.com>
2821 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Rewrite after review.
2823 2015-03-13 Robert Dewar <dewar@adacore.com>
2825 * exp_util.adb (Is_Volatile_Reference): Compile time known
2826 value is never considered to be a volatile reference.
2828 2015-03-13 Robert Dewar <dewar@adacore.com>
2830 * sem_ch3.adb (Analyze_Object_Contract): Suppress "constant
2831 cannot be volatile" for internally generated object (such as
2832 FIRST and LAST constants).
2834 2015-03-13 Ed Schonberg <schonberg@adacore.com>
2836 * sem_ch12.adb (Validate_Access_Subprogram_Instance): If a
2837 convention is specified for the formal parameter, verify that
2838 the actual has the same convention.
2839 * sem_prag.adb (Set_Convention_From_Pragma): Allow convention
2840 pragma to be set on a generic formal type.
2841 * sem_util.adb (Set_Convention): Ignore within an instance,
2842 as it has already been verified in the generic unit.
2844 2015-03-13 Claire Dross <dross@adacore.com>
2846 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do not inline
2847 subprograms with unconstrained record parameters containing
2849 * sinfo.ads Document GNATprove assumption that type should match
2851 * sem_ch6.adb (Analyze_Subprogram_Body_Contract):
2852 Do not check for Refined_Depends and Refined_Globals contracts
2853 as they are optional.
2855 2015-03-13 Ed Schonberg <schonberg@adacore.com>
2857 * sem_ch12.adb (Instantiate_Type): For a floating-point type,
2858 capture dimension info if any, because the generated subtype
2859 declaration does not come from source and will not process dimensions.
2860 * sem_dim,adb (Analyze_Dimension_Extension_Or_Record_Aggregate):
2861 Do not analyze expressions with an initialization procedure
2862 because aggregates will have been checked at the point of record
2865 2015-03-13 Robert Dewar <dewar@adacore.com>
2867 * aspects.ads, aspects.adb: Add entries for aspect Unimplemented.
2868 * einfo.ads, einfo.adb (Is_Unimplemented): New flag.
2869 * sem_ch13.adb: Add dummy entry for aspect Unimplemented.
2870 * snames.ads-tmpl: Add entry for Name_Unimplemented.
2872 2015-03-13 Gary Dismukes <dismukes@adacore.com>
2874 * style.adb (Missing_Overriding): Apply the
2875 Comes_From_Source test to the Original_Node of the subprogram
2876 node, to handle the case of a null procedure declaration that
2877 has been rewritten as an empty procedure body.
2879 2015-03-13 Robert Dewar <dewar@adacore.com>
2881 * exp_util.ads: Minor fix to comment.
2882 * sem_ch3.adb (Constrain_Index): Correct pasto from previous
2885 2015-03-13 Robert Dewar <dewar@adacore.com>
2887 * exp_util.ads, exp_util.adb (Force_Evaluation): Add Related_Id and
2888 Is_Low/High_Bound params.
2889 * sem_ch3.adb (Constrain_Index): Use new Force_Evaluation calling
2890 sequence to simplify generation of FIRST/LAST temps for bounds.
2892 2015-03-12 Olivier Hainque <hainque@adacore.com>
2894 * gcc-interface/trans.c (Attribute_to_gnu) <Code_Address case>:
2895 On targets where a function symbol designates a function descriptor,
2896 fetch the function code address from the descriptor.
2897 (USE_RUNTIME_DESCRIPTORS): Provide a default definition.
2899 2015-03-04 Robert Dewar <dewar@adacore.com>
2901 * sem_warn.adb: Minor reformatting.
2902 * init.c: Minor tweaks.
2904 2015-03-04 Dmitriy Anisimko <anisimko@adacore.com>
2906 * a-coinho-shared.adb: Fix clear of already empty holder.
2908 2015-03-04 Robert Dewar <dewar@adacore.com>
2910 * exp_unst.adb (Check_Dynamic_Type): Ignore library level types.
2911 (Check_Uplevel_Reference_To_Type): Ignore call inside generic.
2912 (Note_Uplevel_Reference): Ignore call inside generic.
2913 (Note_Uplevel_Reference): Fix check for no entity field.
2914 (Unnest_Subprogram): Ignore call inside generic.
2915 (Find_Current_Subprogram): Use Defining_Entity, not Defining_Unit_Name.
2916 (Visit_Node): Ignore calls to Imported subprograms.
2917 (Visit_Node): Fix problem in finding subprogram body in some cases.
2918 (Add_Form_To_Spec): Use Defining_Entity, not Defining_Unit_Name.
2920 2015-03-04 Robert Dewar <dewar@adacore.com>
2922 * einfo.adb (Is_ARECnF_Entity): Removed.
2923 (Last_Formal): Remove special handling of Is_ARECnF_Entity.
2924 (Next_Formal): Remove special handling of Is_ARECnF_Entity.
2925 (Next_Formal_With_Extras): Remove special handling of Is_ARECnF_Entity.
2926 (Number_Entries): Minor reformatting.
2927 * einfo.ads (Is_ARECnF_Entity): Removed.
2928 * exp_unst.adb (Unnest_Subprogram): Remove setting of
2930 (Add_Extra_Formal): Use normal Extra_Formal circuit.
2931 * sprint.adb (Write_Param_Specs): Properly handle case where
2932 there are no source formals, but we have at least one Extra_Formal
2935 2015-03-04 Ed Schonberg <schonberg@adacore.com>
2937 * sem_aggr.adb (Resolve_Record_Aggregate,
2938 Add_Discriminant_Values): If the value is a reference to the
2939 current instance of an enclosing type, use its base type to check
2940 against prefix of attribute reference, because the target type
2941 may be otherwise constrained.
2943 2015-03-04 Robert Dewar <dewar@adacore.com>
2945 * atree.h: Add entries for Flag287-Flag309.
2946 * einfo.adb: Add (unused) flags Flag287-Flag309.
2948 2015-03-04 Ed Schonberg <schonberg@adacore.com>
2950 * sem_util.adb (Collect_Interfaces, Collect): When gathering
2951 interfaces of ancestors, handle properly a subtype of a private
2954 2015-03-04 Robert Dewar <dewar@adacore.com>
2956 * einfo.adb (Is_ARECnF_Entity): New flag (ARECnF is an extra formal).
2957 (Next_Formal): Don't return ARECnF formal.
2958 (Last_Formal): Don't consider ARECnF formal.
2959 (Next_Formal_With_Extras): Do consider ARECnF formal.
2960 * einfo.ads (Is_ARECnF_Entity): New flag (ARECnF is an extra formal).
2961 * exp_unst.adb (Create_Entities): Set Is_ARECnF_Entity flag.
2963 2015-03-04 Javier Miranda <miranda@adacore.com>
2965 * exp_ch6.adb (Expand_Simple_Function_Return): When the returned
2966 object is a class-wide interface object and we generate the
2967 accessibility described in RM 6.5(8/3) then displace the pointer
2968 to the object to reference the base of the object (to get access
2969 to the TSD of the object).
2971 2015-03-04 Hristian Kirtchev <kirtchev@adacore.com>
2973 * sem_prag.adb (Analyze_Abstract_State): Use routine
2974 Malformed_State_Error to issue general errors.
2975 (Analyze_Pragma): Diagnose a syntax error related to a state
2976 declaration with a simple option.
2977 (Malformed_State_Error): New routine.
2979 2015-03-04 Robert Dewar <dewar@adacore.com>
2981 * a-strsup.adb (Super_Slice): Deal with super flat case.
2982 * einfo.ads: Minor reformatting.
2983 * s-imgdec.adb (Set_Decimal_Digits): Add comment about possibly
2986 2015-03-04 Claire Dross <dross@adacore.com>
2988 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
2989 a-cforse.ads, a-cofove.ads: Use Default_Initial_Condition on formal
2992 2015-03-04 Ed Schonberg <schonberg@adacore.com>
2994 * sem_warn.adb (Check_References): When checking for an unused
2995 in-out parameter of a class- wide type, use its type to determine
2996 whether it is private, in order to avoid a spurious warning when
2997 subprogram spec and body are in different units.
2999 2015-03-04 Yannick Moy <moy@adacore.com>
3001 * sem_attr.adb: Improve warning messages.
3003 2015-03-04 Robert Dewar <dewar@adacore.com>
3005 * exp_ch6.adb (Expand_N_Subprogram_Body): Avoid trying to unnest
3006 generic subprograms.
3007 * exp_unst.adb (Check_Dynamic_Type): Handle record types properly
3008 (Note_Uplevel_Reference): Ignore uplevel references to non-types
3009 (Get_Level): Consider only subprograms, not blocks.
3010 (Visit_Node): Set proper condition for generating ARECnF entity.
3011 Ignore indirect calls. Ignore calls to subprograms
3013 (Unnest_Subprogram): Minor changes in dealing with ARECnF entity.
3014 (Add_Form_To_Spec): Properly set Last_Entity field.
3015 (Unnest_Subprogram): Set current subprogram scope for analyze calls.
3016 Handle case of no uplevel refs in outer subprogram
3017 Don't mark uplevel entities as aliased.
3018 Don't deal with calls with no ARECnF requirement.
3020 2015-03-04 Robert Dewar <dewar@adacore.com>
3022 * s-valrea.adb (Scan_Real): Remove redundant tests from scaling loops.
3023 * s-imgdec.adb (Set_Decimal_Digits): Remove redundant Max
3024 operation in computing LZ.
3025 * sem_attr.adb: Minor typo fix
3027 2015-03-04 Robert Dewar <dewar@adacore.com>
3029 * exp_ch7.adb: Minor reformatting.
3030 * exp_unst.adb (Build_Tables): Fix minor glitch for no separate
3032 * erroutc.adb (Delete_Msg): add missing decrement of info msg counter.
3034 2015-03-04 Hristian Kirtchev <kirtchev@adacore.com>
3036 * exp_ch6.adb (Build_Pragma_Check_Equivalent): Suppress
3037 references to formal parameters subject to pragma Unreferenced.
3038 (Suppress_Reference): New routine.
3039 * sem_attr.adb (Analyze_Attribute): Reimplement the analysis
3040 of attribute 'Old. Attributes 'Old and 'Result now share
3042 (Analyze_Old_Result_Attribute): New routine.
3043 (Check_Placement_In_Check): Removed.
3044 (Check_Placement_In_Contract_Cases): Removed.
3045 (Check_Placement_In_Test_Case): Removed.
3046 (Check_Use_In_Contract_Cases): Removed.
3047 (Check_Use_In_Test_Case): Removed.
3048 (In_Refined_Post): Removed.
3049 (Is_Within): Removed.
3050 * sem_warn.adb (Check_Low_Bound_Tested): Code cleanup.
3051 (Check_Low_Bound_Tested_For): New routine.
3053 2015-03-04 Hristian Kirtchev <kirtchev@adacore.com>
3055 * exp_ch3.adb (Expand_N_Object_Declaration):
3056 Generate a runtime check to test the expression of pragma
3057 Default_Initial_Condition when the object is default initialized.
3059 2015-03-02 Robert Dewar <dewar@adacore.com>
3061 * scng.adb (Scan): Ignore illegal character in relaxed
3064 2015-03-02 Ed Schonberg <schonberg@adacore.com>
3066 * sem_ch4.adb (Analyze_Set_Membership); Retain Overloaded flag
3067 on left operand, so it can be properly resolved with type of
3068 alternatives of right operand.
3069 * sem_res.adb (Resolve_Set_Membership): Handle properly an
3070 overloaded left-hand side when the alternatives on the right
3071 hand side are literals of some universal type. Use first
3072 non-overloaded alternative to find expected type.
3074 2015-03-02 Ed Schonberg <schonberg@adacore.com>
3076 * exp_ch7.adb (Make_Set_Finalize_Address_Call): Use underlying
3077 type to retrieve designated type, because the purported access
3078 type may be a partial (private) view, when it is declared in
3079 the private part of a nested package, and finalization actions
3080 are generated when completing compilation of enclosing unit.
3082 2015-03-02 Robert Dewar <dewar@adacore.com>
3084 * back_end.adb (Call_Back_End): Remove previous patch,
3085 the back end now gets to see the result of -gnatd.1
3086 (Unnest_Subprogram_Mode) processing.
3087 * elists.ads, elists.adb (List_Length): New function.
3088 * exp_unst.ads, exp_unst.adb: Major changes, first complete version.
3089 * sem_util.adb (Check_Nested_Access): Handle formals in
3090 Unnest_Subprogram_Mode.
3091 (Adjust_Named_Associations): Minor reformatting.
3092 * sprint.adb (Sprint_Node_Actual): Fix failure to print aliased
3095 2015-03-02 Robert Dewar <dewar@adacore.com>
3097 * atree.ads, atree.adb (Uint24): New function
3098 (Set_Uint24): New procedure.
3099 * atree.h (Uint24): New macro for field access.
3100 * back_end.adb (Call_Back_End): For now, don't call back end
3101 if unnesting subprogs.
3102 * einfo.adb (Activation_Record_Component): New field
3103 (Subps_Index): New field.
3104 * einfo.ads (Activation_Record_Component): New field
3105 (Subps_Index): New field Minor reordering of comments into alpha order.
3106 * exp_unst.ads, exp_unst.adb: Continued development.
3108 2015-03-02 Gary Dismukes <dismukes@adacore.com>
3110 * exp_disp.ads: Minor reformatting.
3112 2015-03-02 Ed Schonberg <schonberg@adacore.com>
3114 * sem_ch8.adb (Chain_Use_Clause): Do not chain use clause from
3115 ancestor to list of use clauses active in descendant unit if we
3116 are within the private part of an intervening parent, to prevent
3117 circularities in use clause list.
3119 2015-03-02 Javier Miranda <miranda@adacore.com>
3121 * exp_ch9.adb (Build_Corresponding_Record): Propagate type
3122 invariants to the corresponding record type.
3123 * exp_disp.ad[sb] (Set_DT_Position_Value): New subprogram
3124 which sets the value of the DTC_Entity associated with a given
3125 primitive of a tagged type and propagates the value to the
3127 (Set_DTC_Entity_Value): Propagate the DTC
3128 value to the wrapped entity.
3129 * sem_ch13.adb (Build_Invariant_Procedure): Append the code
3130 associated with invariants of progenitors.
3131 * sem_ch3.adb (Build_Derived_Record_Type): Inherit type invariants
3132 of parents and progenitors.
3133 (Process_Full_View): Check hidden inheritance of class-wide type
3135 * sem_ch7.adb (Analyze_Package_Specification): Do not generate
3136 the invariant procedure for interface types; build the invariant
3137 procedure for tagged types inheriting invariants from their
3139 * sem_prag.adb (Pragma_Invariant) Allow invariants in interface
3140 types but do not build their invariant procedure since their
3141 invariants will be propagated to the invariant procedure of
3142 types covering the interface.
3143 * exp_ch6.adb, exp_disp.adb, sem_ch3.adb, sem_ch7.adb,
3144 sem_ch8.adb, sem_disp.adb: Replace all calls to Set_DT_Position
3145 by calls to Set_DT_Position_Value.
3147 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
3149 * sem_attr.adb (Analyze_Attribute): Factor out heavily indented
3150 code in Denote_Same_Function. Do not analyze attribute 'Result
3151 when it is inside procedure _Postconditions. Remove a misplaced
3152 warning diagnostic. Code cleanup.
3153 (Denote_Same_Function): New routine.
3154 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Code
3155 cleanup. Warn on pre/postconditions on an inlined subprogram.
3156 (Analyze_Pragma, Refined_Post case): Warn on pre/postconditions on
3157 an inlined subprogram.
3158 (Analyze_Pre_Post_Condition_In_Decl_Part): Code cleanup. Warn on
3159 pre/post condition on an inlined subprogram.
3160 (Analyze_Test_Case_In_Decl_Part): Code cleanup. Warn on
3161 pre/postconditions on an inlined subprogram.
3162 (Check_Postcondition_Use_In_Inlined_Subprogram): New routine.
3164 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
3166 * sem_prag.adb (Ensure_Aggregate_Form):
3167 Ensure that the name denoted by the Chars of a pragma argument
3168 association has the proper Sloc when converted into an aggregate.
3170 2015-03-02 Bob Duff <duff@adacore.com>
3172 * sem_ch6.adb (Check_Private_Overriding): Capture
3173 Incomplete_Or_Partial_View in a constant. This is cleaner and
3176 2015-03-02 Gary Dismukes <dismukes@adacore.com>
3178 * einfo.ads, exp_unst.ads: Minor reformatting.
3180 2015-03-02 Ed Schonberg <schonberg@adacore.com>
3182 * a-strsea.adb (Find_Token): Ensure that the range of iteration
3183 does not perform any improper character access. This prevents
3184 erroneous access in the unusual case of an empty string target
3185 and a From parameter less than Source'First.
3187 2015-03-02 Robert Dewar <dewar@adacore.com>
3189 * elists.adb (List_Length): Fix incorrect result.
3191 2015-03-02 Bob Duff <duff@adacore.com>
3193 * sem_ch6.adb (Check_Private_Overriding): Refine the legality
3194 checks here. It used to check that the function is merely
3195 overriding SOMEthing. Now it checks that the function is
3196 overriding a corresponding public operation. This is a correction
3197 to the implementation of the rule in RM-3.9.3(10).
3199 2015-03-02 Robert Dewar <dewar@adacore.com>
3201 * debug.adb: Document new debug flag -gnatd.1.
3202 * einfo.ads, einfo.adb (Has_Nested_Subprogram): New flag.
3203 (Has_Uplevel_Reference): New flag (Is_Static_Type): New flag.
3204 (Uplevel_Reference_Noted):New flag (Uplevel_References): New field.
3205 * elists.ads elists.adb (List_Length): New function.
3206 * exp_ch6.adb (Expand_N_Subprogram_Body): Call Unnest_Subprogram
3207 when appropriate (Process_Preconditions): Minor code
3208 reorganization and reformatting
3209 * exp_unst.ads, exp_unst.adb: New files.
3210 * gnat1drv.adb (Adjust_Global_Switches): Set
3211 Unnest_Subprogram_Mode if -gnatd.1
3212 * namet.ads, namet.adb (Name_Find_Str): New version of Name_Find with
3214 * opt.ads (Unnest_Subprogram_Mode): New flag.
3215 * par-ch3.adb (P_Identifier_Declarations): Fixes to -gnatd.2 handling.
3216 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set
3217 Has_Nested_Subprogram flag.
3218 * sem_ch8.adb (Find_Direct_Name): New calling sequence for
3219 Check_Nested_Access.
3220 (Find_Selected_Component): Minor comment addition.
3221 * sem_util.adb (Check_Nested_Access): New version for use with Exp_Unst.
3222 (Note_Possible_Modification): New calling sequence for
3223 Check_Nested_Access.
3224 * sem_util.ads (Check_Nested_Access): New version for use with Exp_Unst.
3225 * gcc-interface/Make-lang.in (GNAT1_OBJS): Add exp_unst.o
3227 2015-03-02 Pierre-Marie de Rodat <derodat@adacore.com>
3229 * gcc-interface/utils.c (gnat_pushdecl): For non-artificial pointer
3230 types, preserve the original type and create copies just like the C
3231 front-end does. For artificial ones, do not define a name for
3233 (create_type_decl): When gnat_pushdecl made the input type the
3234 original type for the new declaration, do not define a stub
3236 * gcc-interface/utils2.c (build_binary_op): Accept two different
3237 pointer types when they point to the same type.
3239 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
3241 * exp_util.adb (Possible_Bit_Aligned_Component): Do not process
3243 * sem_util.adb (Kill_Current_Values): Do not invalidate and
3246 2015-03-02 Robert Dewar <dewar@adacore.com>
3248 * sem_ch3.adb, exp_attr.adb, checks.adb, exp_aggr.adb: Minor
3251 2015-03-02 Ed Schonberg <schonberg@adacore.com>
3253 * sem_ch8.adb: extend use of Available_Subtype.
3255 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
3257 * sem_prag.adb (Duplication_Error): Remove the special handling
3258 of 'Class or _Class in the context of pre/postconditions.
3259 (Process_Class_Wide_Condition): Remove the special handling of
3260 'Class or _Class in the context of pre/postconditions.
3261 * sem_util.adb (Original_Aspect_Pragma_Name): Names Pre_Class
3262 and Post_Class no longer need to be converted to _Pre and _Post.
3263 * sem_util.ads (Original_Aspect_Pragma_Name): Update the comment
3266 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
3268 * exp_ch6.adb (Process_Preconditions): Modify the
3269 mechanism that find the first source declaration to correct exit
3270 the loop once it has been found.
3272 2015-03-02 Gary Dismukes <dismukes@adacore.com>
3274 * a-strsea.adb: Minor typo fix.
3276 2015-03-02 Bob Duff <duff@adacore.com>
3278 * einfo.ads: Minor comment fixes.
3280 2015-03-02 Gary Dismukes <dismukes@adacore.com>
3282 * einfo.adb, checks.adb: Minor reformatting and typo fixes.
3284 2015-03-02 Ed Schonberg <schonberg@adacore.com>
3286 * exp_aggr.adb (Get_Assoc_Expr): If the Default_Component_Value
3287 is defined for the array type, use it instead of a Default_Value
3288 specified for the component type itself.
3290 2015-03-02 Thomas Quinot <quinot@adacore.com>
3292 * exp_attr.adb (Expand_N_Attribute_Reference, case Input): When
3293 expanding a 'Input attribute reference for a class-wide type,
3294 do not generate a separate object declaration for the controlling
3295 tag dummy object; instead, generate the expression inline in the
3296 dispatching call. Otherwise, the declaration (which involves a
3297 call to String'Input, returning a dynamically sized value on the
3298 secondary stack) will be expanded outside of proper secondary
3299 stack mark/release operations, and will thus cause a secondary
3302 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
3304 * checks.adb (Add_Validity_Check): Change the names of all
3305 formal parameters to better illustrate their purpose. Update
3306 the subprogram documentation. Update all occurrences of the
3307 formal parameters. Generate a pre/postcondition pragma by
3308 calling Build_Pre_Post_Condition.
3309 (Build_PPC_Pragma): Removed.
3310 (Build_Pre_Post_Condition): New routine.
3311 * einfo.adb Node8 is no longer used as Postcondition_Proc. Node14
3312 is now used as Postconditions_Proc. Flag240 is now renamed to
3313 Has_Expanded_Contract. (First_Formal): The routine can now
3314 operate on generic subprograms.
3315 (First_Formal_With_Extras): The routine can now operate on generic
3317 (Has_Expanded_Contract): New routine.
3318 (Has_Postconditions): Removed.
3319 (Postcondition_Proc): Removed.
3320 (Postconditions_Proc): New routine.
3321 (Set_Has_Expanded_Contract): New routine.
3322 (Set_Has_Postconditions): Removed.
3323 (Set_Postcondition_Proc): Removed.
3324 (Set_Postconditions_Proc): New routine.
3325 (Write_Entity_Flags): Remove the output of Has_Postconditions. Add
3326 the output of Has_Expanded_Contract.
3327 (Write_Field8_Name): Remove the output of Postcondition_Proc.
3328 (Write_Field14_Name): Add the output of Postconditions_Proc.
3329 * einfo.ads New attributes Has_Expanded_Contract and
3330 Postconditions_Proc along with occurrences in entities.
3331 Remove attributes Has_Postconditions and Postcondition_Proc
3332 along with occurrences in entities.
3333 (Has_Expanded_Contract): New routine along with pragma Inline.
3334 (Has_Postconditions): Removed along with pragma Inline.
3335 (Postcondition_Proc): Removed along with pragma Inline.
3336 (Postconditions_Proc): New routine along with pragma Inline.
3337 (Set_Has_Expanded_Contract): New routine along with pragma Inline.
3338 (Set_Has_Postconditions): Removed along with pragma Inline.
3339 (Set_Postcondition_Proc): Removed along with pragma Inline.
3340 (Set_Postconditions_Proc): New routine along with pragma Inline.
3341 * exp_ch6.adb (Add_Return): Code cleanup. Update the
3342 generation of the call to the _Postconditions routine of
3343 the procedure. (Expand_Non_Function_Return): Reformat the
3344 comment on usage. Code cleanup. Update the generation of
3345 the call to the _Postconditions routine of the procedure or
3347 (Expand_Simple_Function_Return): Update the
3348 generation of the _Postconditions routine of the function.
3349 (Expand_Subprogram_Contract): Reimplemented.
3350 * exp_ch6.ads (Expand_Subprogram_Contract): Update the parameter
3351 profile along the comment on usage.
3352 * exp_ch9.adb (Build_PPC_Wrapper): Code cleanup.
3353 (Expand_N_Task_Type_Declaration): Generate pre/postconditions
3354 wrapper when the entry [family] has a contract with
3356 * exp_prag.adb (Expand_Attributes_In_Consequence): New routine.
3357 (Expand_Contract_Cases): This routine and its subsidiaries now
3358 analyze all generated code.
3359 (Expand_Old_In_Consequence): Removed.
3360 * sem_attr.adb Add with and use clause for Sem_Prag.
3361 (Analyze_Attribute): Reimplment the analysis of attribute 'Result.
3362 (Check_Use_In_Test_Case): Use routine Test_Case_Arg to obtain
3364 * sem_ch3.adb (Analyze_Declarations): Analyze the contract of
3365 a generic subprogram.
3366 (Analyze_Object_Declaration): Do not create a contract node.
3367 (Derive_Subprogram): Do not create a contract node.
3368 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Do
3369 not create a contract node.
3370 (Analyze_Completion_Contract): New routine.
3371 (Analyze_Function_Return): Alphabetize.
3372 (Analyze_Generic_Subprogram_Body): Alphabetize. Do not create a
3373 contract node. Do not copy pre/postconditions to the original
3375 (Analyze_Null_Procedure): Do not create a contract node.
3376 (Analyze_Subprogram_Body_Contract): Reimplemented.
3377 (Analyze_Subprogram_Body_Helper): Do not mark the enclosing scope
3378 as having postconditions. Do not create a contract node. Analyze
3379 the subprogram body contract of a body that acts as a compilation
3380 unit. Expand the subprogram contract after the declarations have
3382 (Analyze_Subprogram_Contract): Reimplemented.
3383 (Analyze_Subprogram_Specification): Do not create a contract node.
3384 (List_Inherited_Pre_Post_Aspects): Code cleanup.
3385 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Update the
3387 (Analyze_Subprogram_Contract): Update the
3388 parameter profile and the comment on usage.
3389 * sem_ch7.adb (Analyze_Package_Body_Helper): Do not create a
3391 (Analyze_Package_Declaration): Do not create a
3393 (Is_Subp_Or_Const_Ref): Ensure that the prefix has an entity.
3394 * sem_ch8.adb (Analyze_Subprogram_Renaming): Do not create a
3396 * sem_ch9.adb (Analyze_Entry_Declaration): Do not create a
3398 * sem_ch10.adb (Analyze_Compilation_Unit): Move local variables to
3399 their proper section and alphabetize them. Analyze the contract of
3400 a [generic] subprogram after all Pragmas_After have been analyzed.
3401 (Analyze_Subprogram_Body_Stub_Contract): Alphabetize.
3402 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Do not
3403 create a contract node.
3404 (Analyze_Generic_Subprogram_Declaration):
3405 Alphabetize local variables. Do not create a contract
3406 node. Do not generate aspects out of pragmas for ASIS.
3407 (Analyze_Subprogram_Instantiation): Instantiate
3408 the contract of the subprogram. Do not create a
3409 contract node. (Instantiate_Contract): New routine.
3410 (Instantiate_Subprogram_Body): Alphabetize local variables.
3411 (Save_Global_References_In_Aspects): New routine.
3412 (Save_References): Do not save the global references found within
3413 the aspects of a generic subprogram.
3414 * sem_ch12.ads (Save_Global_References_In_Aspects): New routine.
3415 * sem_ch13.adb (Analyze_Aspect_Specifications): Do not use
3416 Original_Node for establishing linkages.
3417 (Insert_Pragma): Insertion in a subprogram body takes precedence over
3418 the case where the subprogram body is also a compilation unit.
3419 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Use
3420 Get_Argument to obtain the proper expression. Install the generic
3421 formals when the related context is a generic subprogram.
3422 (Analyze_Depends_In_Decl_Part): Use Get_Argument to obtain
3423 the proper expression. Use Corresponding_Spec_Of to obtain
3424 the spec. Install the generic formal when the related context
3425 is a generic subprogram.
3426 (Analyze_Global_In_Decl_Part): Use Get_Argument to obtain the proper
3427 expression. Use Corresponding_Spec_Of to obtain the spec. Install the
3428 generic formal when the related context is a generic subprogram.
3429 (Analyze_Initial_Condition_In_Decl_Part): Use Get_Argument
3430 to obtain the proper expression. Remove the call to
3431 Check_SPARK_Aspect_For_ASIS as the analysis is now done
3433 (Analyze_Pragma): Update all occurrences
3434 to Original_Aspect_Name. Pragmas Contract_Cases, Depends,
3435 Extensions_Visible, Global, Postcondition, Precondition and
3436 Test_Case now carry generic templates when the related context
3437 is a generic subprogram. The same pragmas are no longer
3438 forcefully fully analyzed when the context is a subprogram
3439 that acts as a compilation unit. Pragmas Abstract_State,
3440 Initial_Condition, Initializes and Refined_State have been clean
3441 up. Pragmas Post, Post_Class, Postcondition, Pre, Pre_Class
3442 and Precondition now use the same routine for analysis. Pragma
3443 Refined_Post does not need to check the use of 'Result or
3444 the lack of a post-state in its expression. Reimplement the
3445 analysis of pragma Test_Case.
3446 (Analyze_Pre_Post_Condition): New routine.
3447 (Analyze_Pre_Post_Condition_In_Decl_Part):
3449 (Analyze_Refined_Depends_In_Decl_Part): Use Get_Argument to obtain the
3451 (Analyze_Refined_Global_In_Decl_Part): Use Get_Argument to obtain
3452 the proper expression.
3453 (Analyze_Test_Case_In_Decl_Part): Reimplemented.
3454 (Check_Pre_Post): Removed.
3455 (Check_Precondition_Postcondition): Removed.
3456 (Check_SPARK_Aspect_For_ASIS): Removed.
3457 (Check_Test_Case): Removed.
3458 (Collect_Subprogram_Inputs_Outputs): Use Get_Argument
3459 to obtain the proper expression. Use Corresponding_Spec_Of to
3460 find the proper spec.
3461 (Create_Generic_Template): New routine.
3462 (Duplication_Error): New routine.
3463 (Expression_Function_Error): New routine.
3464 (Find_Related_Subprogram_Or_Body): Moved to the spec
3465 of Sem_Prag. Emit precise error messages. Account for cases of
3466 rewritten expression functions, generic instantiations, handled
3467 sequence of statements and pragmas from aspects.
3468 (Get_Argument): New routine.
3469 (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Removed.
3470 (Preanalyze_CTC_Args): Removed.
3471 (Process_Class_Wide_Condition): New routine.
3472 * sem_prag.ads (Analyze_Test_Case_In_Decl_Part): Update
3473 the parameter profile along with the comment on usage.
3474 (Find_Related_Subprogram_Or_Body): Moved from the body of Sem_Prag.
3475 (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Removed.
3476 (Test_Case_Arg): New routine.
3477 * sem_util.adb Add with and use clauses for Sem_Ch6.
3478 (Add_Contract_Item): This routine now creates a contract
3479 node the first time an item is added. Remove the duplicate
3480 aspect/pragma checks.
3481 (Check_Result_And_Post_State): Reimplemented.
3482 (Corresponding_Spec_Of): New routine.
3483 (Get_Ensures_From_CTC_Pragma): Removed.
3484 (Get_Requires_From_CTC_Pragma): Removed.
3485 (Has_Significant_Contract): New routine.
3486 (Inherit_Subprogram_Contract): Inherit only if the source
3488 (Install_Generic_Formals): New routine.
3489 (Original_Aspect_Name): Removed.
3490 (Original_Aspect_Pragma_Name): New routine.
3491 * sem_util.ads (Check_Result_And_Post_State): Reimplemented.
3492 (Corresponding_Spec_Of): New routine.
3493 (Get_Ensures_From_CTC_Pragma): Removed.
3494 (Get_Requires_From_CTC_Pragma): Removed.
3495 (Has_Significant_Contract): New routine.
3496 (Install_Generic_Formals): New routine.
3497 (Original_Aspect_Name): Removed.
3498 (Original_Aspect_Pragma_Name): New routine.
3499 * sem_warn.adb Add with and use clauses for Sem_Prag.
3500 (Within_Postcondition): Use Test_Case_Arg to extract "Ensures".
3502 2015-03-02 Ed Schonberg <schonberg@adacore.com>
3504 * sem_ch8.adb (Available_Subtype): Optimization in
3505 Find_Selected_Component: when safe, use existing subtype of
3506 array component, possibly discriminant-dependent, rather than
3507 creating new subtype declaration for it. In this fashion different
3508 occurrences of the component have the same subtype, rather than
3509 just equivalent ones. Simplifies value tracing in GNATProve.
3511 2015-03-01 Arnaud Charlet <charlet@adacore.com>
3515 * doc/gnat_ugn/gnat_project_manager.rst,
3516 doc/gnat_ugn/platform_specific_information.rst: Remove reference to
3517 image, too troublesome with texi format.
3518 * gnat_ugn.texi: Regenerate.
3520 2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
3523 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8): Remove.
3524 (DEF_FUNCTION_TYPE_VAR_12): Likewise.
3525 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
3527 2015-02-23 Thomas Schwinge <thomas@codesourcery.com>
3529 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8): Fix number of
3530 arguments parameter.
3531 (DEF_FUNCTION_TYPE_VAR_12): Likewise.
3533 2015-02-22 Arnaud Charlet <charlet@adacore.com>
3535 * doc/Makefile: postprocess texinfo files to update @dircategory
3536 and update texi files under gcc/ada.
3537 * gnat_ugn.texi, gnat_rm.texi: Regenerated.
3539 2015-02-22 Arnaud Charlet <charlet@adacore.com>
3541 * doc/gnat_ugn/project-manager-figure.png,
3542 doc/gnat_ugn/rtlibrary-structure.png: New.
3544 2015-02-22 Tom de Vries <tom@codesourcery.com>
3547 * gnat-style.texi (@subsection Loop Statements): Replace @noindent by
3548 @item, and fix warning '@itemize has text but no @item'.
3550 2015-02-20 Ed Schonberg <schonberg@adacore.com>
3552 * sem_prag.adb (Analyze_Pragma, case Obsolescent): Pragma
3553 legally applies to an abstract subprogram declaration.
3554 * freeze.adb: Minor comment addition.
3556 2015-02-20 Robert Dewar <dewar@adacore.com>
3558 * errout.ads: Document replacement of Name_uPre/Post/Type_Invariant.
3559 * erroutc.adb (Set_Msg_Str): Replace _xxx.
3560 (Pre/Post/Type_Invariant) by xxx'Class.
3561 * erroutc.ads (Set_Msg_Str): Replace _xxx.
3562 (Pre/Post/Type_Invariant) by xxx'Class.
3563 * sem_prag.adb (Fix_Error): Remove special casing of
3564 Name_uType_Invariant.
3565 (Analyze_Pre_Post_Condition_In_Decl_Part): Remove special casing of
3566 Name_uPre and Name_uPost in aspect case (done in Errout now).
3568 2015-02-20 Robert Dewar <dewar@adacore.com>
3570 * g-alveop.adb: Minor style fixes.
3572 2015-02-20 Robert Dewar <dewar@adacore.com>
3574 * freeze.adb (Warn_Overlay): Guard against blow up with address
3577 2015-02-20 Bob Duff <duff@adacore.com>
3579 * exp_attr.adb (May_Be_External_Call): Remove this. There is no need
3580 for the compiler to guess whether the call is internal or external --
3581 it is always external.
3582 (Expand_Access_To_Protected_Op): For P'Access, where P
3583 is a protected subprogram, always create a pointer to the
3584 External_Subprogram.
3586 2015-02-20 Robert Dewar <dewar@adacore.com>
3588 * a-dispat.adb, a-stcoed.ads: Minor reformatting.
3590 2015-02-20 Robert Dewar <dewar@adacore.com>
3592 * sem_ch13.adb (Build_Discrete_Static_Predicate): Allow static
3593 predicate for non-static subtype.
3594 (Build_Predicate_Functions): Do not assume subtype associated with a
3595 static predicate must be static.
3597 2015-02-20 Robert Dewar <dewar@adacore.com>
3599 * errout.adb (Set_Msg_Node): Better handling of internal names
3600 (Set_Msg_Node): Kill message when we cannot eliminate internal name.
3601 * errout.ads: Document additional case of message deletion.
3602 * namet.adb (Is_Internal_Name): Refined to consider wide
3603 strings in brackets notation and character literals not to be
3605 * sem_ch8.adb (Find_Selected_Component): Give additional error
3606 when selector name is a subprogram whose first parameter has
3607 the same type as the prefix, but that type is untagged.
3609 2015-02-20 Robert Dewar <dewar@adacore.com>
3611 * g-allein.ads, g-alveop.adb, g-alveop.ads, opt.ads: Minor reformatting
3613 2015-02-20 Tristan Gingold <gingold@adacore.com>
3615 * opt.ads (GNAT_Mode_Config): New variable.
3616 * opt.adb (Set_Opt_Config_Switches): Consider GNAT_Mode_Config
3617 to set Assertions_Enabled.
3618 * switch-c.adb (Scan_Front_End_Switches): Set GNAT_Mode_Config
3621 2015-02-20 Robert Dewar <dewar@adacore.com>
3623 * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Add an additional
3624 comment regarding the handling of unterminated fixed-point
3626 * s-valuns.ads (Scan_Raw_Unsigned): Add comments
3627 corresponding to those previously added for
3628 System.Val_LLU.Scan_Raw_Long_Long_Unsigned.
3630 2015-02-20 Olivier Hainque <hainque@adacore.com>
3632 * g-allein.ads, g-alveop.ads, g-alveop.adb: Code clean ups.
3634 2015-02-20 Robert Dewar <dewar@adacore.com>
3636 * sem_prag.adb: Minor comment clarification.
3638 2015-02-20 Olivier Hainque <hainque@adacore.com>
3640 * g-allein.ads (vec_ctf, vec_vcsfx, vec_vcfux): Remove.
3641 * g-alleve.ads, g-alleva.adb (vcfux): Likewise.
3642 * g-alveop.ads (vec_vcfsx, vec_vcfux): Just rename the ll versions.
3643 (vec_ctf): Now renamings as well.
3645 2015-02-20 Robert Dewar <dewar@adacore.com>
3647 * switch-c.adb, bindgen.adb: Minor reformatting.
3649 2015-02-20 Ed Schonberg <schonberg@adacore.com>
3651 * sem_prag.adb (Analyze_Pragma, case Type_Invariant):
3652 Invariant'class is allowed on an abstract type.
3654 2015-02-20 Ed Schonberg <schonberg@adacore.com>
3656 * sem_ch3.adb (Access_Definition): If the access definition is
3657 for a protected component and defines an access to protected
3658 subprogram, do not create an itype reference for it because a
3659 full type declaration will be built in order to generate the
3660 proper equivalent type.
3661 (Analyze_Subtype_Declaration): Add information of incomplete
3662 subtypes, for Ada 2012 extended uses of incomplete types.
3664 2015-02-20 Gary Dismukes <dismukes@adacore.com>
3666 * sem_res.adb: Minor reformatting.
3668 2015-02-20 Vincent Celier <celier@adacore.com>
3670 * switch-c.adb (Scan_Front_End_Switches): When comparing runtime
3671 path name for several switches --RTS, use the normalized path
3674 2015-02-20 Vincent Celier <celier@adacore.com>
3676 * bindgen.adb: Minor reformatting and code reorganization.
3678 2015-02-20 Jose Ruiz <ruiz@adacore.com>
3680 * a-stcoed.ads: Add spec for this package (Unimplemented_Unit).
3681 * impunit.adb (Non_Imp_File_Names_12): Mark unit a-stcoed.ads as
3682 defined by Ada 2012.
3684 2015-02-20 Arnaud Charlet <charlet@adacore.com>
3686 * sysdep.c, expect.c, s-oscons-tmplt.c, gsocket.h, adaint.c: Remove
3687 obsolete references to RTX, nucleus, VMS.
3689 2015-02-20 Ed Schonberg <schonberg@adacore.com>
3691 * sem_prag.adb (Fix_Error): For an illegal Type_Invariant'Class
3692 aspect, use name that mentions Class explicitly, rather than
3693 compiler-internal name.
3695 2015-02-20 Robert Dewar <dewar@adacore.com>
3697 * debug.adb: Add documentation for -gnatd.2 (allow statements
3699 * par-ch3.adb (P_Identifier_Declarations): Handle
3700 statement appearing where declaration expected more cleanly.
3701 (Statement_When_Declaration_Expected): Implement debug flag
3704 2015-02-20 Jose Ruiz <ruiz@adacore.com>
3706 * a-dinopr.ads: Add spec for this package (Unimplemented_Unit).
3707 * a-dispat.ads (Yield): Include procedure added in Ada 2012.
3708 * a-dispat.adb (Yield): Implement procedure added in Ada 2012.
3709 * impunit.adb (Non_Imp_File_Names_05): Mark unit a-dinopr.ads as
3710 defined by Ada 2005.
3711 * snames.ads-tmpl (Name_Non_Preemptive_FIFO_Within_Priorities):
3712 This is the correct name for the dispatching policy (FIFO was
3715 2015-02-20 Javier Miranda <miranda@adacore.com>
3717 * sem_res.adb (Resolve_Type_Conversion): If the type of the
3718 operand is the limited-view of a class-wide type then recover
3719 the class-wide type of the non-limited view.
3721 2015-02-20 Arnaud Charlet <charlet@adacore.com>
3723 * gcc-interface/Makefile.in: Remove references to nucleus.
3724 * gcc-interface/decl.c (gnat_to_gnu_entity, case E_Procedure): Set
3725 extern_flag to true for Inline_Always subprograms with
3726 Intrinsic convention.
3728 2015-02-20 Yannick Moy <moy@adacore.com>
3730 * sem_prag.ads: Minor typo in comment.
3732 2015-02-20 Pascal Obry <obry@adacore.com>
3734 * s-osprim-mingw.adb: Fix Get_Base_Time parameter mode.
3736 2015-02-20 Vincent Celier <celier@adacore.com>
3738 * makeutl.adb (Get_Directories.Add_Dir): Add a directory only
3741 2015-02-20 Robert Dewar <dewar@adacore.com>
3743 * sem_eval.ads: Minor reformatting.
3745 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
3747 * freeze.adb (Size_Known): Do not set the packed size for
3748 independent type or component.
3749 (Freeze_Array_Type): Check for Independent[_Components] with packing
3750 or explicit component size clause.
3751 * gnat1drv.adb (Post_Compilation_Validation_Checks): Do the validation
3752 of independence pragmas only for non-GCC back-ends.
3753 * sem_ch13.adb (Initialize): Likewise for the initialization.
3754 * sem_prag.adb (Record_Independence_Check): New procedure to record an
3755 independence check in the table.
3756 (Analyze_Pragma): Use it throughout instead of doing it manually.
3757 * gcc-interface/decl.c (gnat_to_gnu_field): Add support for
3758 independent type or component.
3760 2015-02-20 Thomas Quinot <quinot@adacore.com>
3762 * adaint.c (__gnat_readdir): For Solaris, use 64 bit variants of
3763 struct direct and readdir. This is required for NFS filesystems
3764 mounted from servers that use 64-bit cookies.
3766 2015-02-20 Ed Schonberg <schonberg@adacore.com>
3768 * sem_ch12.adb (Analyze_Subprogram_Instantiaion): New subprogram
3769 Build_Subprogram_Renaming, to create renaming of subprogram
3770 instance in the the declaration of the wrapper package rather
3771 than in its body, so that it is available for analysis of aspects
3772 propagated from generic to instantiation.
3773 (Check_Mismatch): An actual for a formal package that is an
3774 incomplete type matches a formal type that is incomplete.
3775 (Instantiate_Package_Body): Move code that builds subprogram
3776 renaming to Analyze_Subprogram_Instantiation.
3777 (Instantiate_Type): The generated subtype is a limited view if
3778 the actual is a limited view.
3779 (Load_Parent_Of_Generic): Retrieve instance declaration from
3780 its new position within wrapper package.
3782 2015-02-20 Arnaud Charlet <charlet@adacore.com>
3784 * s-parame-vxworks.adb, s-os_lib.ads: Update comments.
3786 2015-02-20 Robert Dewar <dewar@adacore.com>
3788 * s-osinte-vxworks.ads (To_Timespec): Add comment about the
3789 issue of negative arguments.
3791 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
3793 * gnat1drv.adb: Minor consistency fix.
3795 2015-02-20 Pascal Obry <obry@adacore.com>
3797 * s-osprim-mingw.adb (Get_Base_Time): Properly release lock in all
3800 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
3802 * inline.adb (Expand_Inlined_Call): Skip again calls to subprogram
3804 * exp_ch6.adb (Expand_Call): Use back-end inlining
3805 instead of expansion for simple subprogram renamings.
3807 2015-02-20 Robert Dewar <dewar@adacore.com>
3809 * exp_util.adb: Minor reformatting.
3811 2015-02-20 Vincent Celier <celier@adacore.com>
3813 * switch-c.adb (Scan_Front_End_Switches): Do not fail when --RTS=
3814 is specified several times with different values that indicates
3815 the same runtime directory.
3817 2015-02-20 Ed Schonberg <schonberg@adacore.com>
3819 * sem_attr.adb (Check_Not_Incomplete_Type): Clean up code to
3820 handle properly illegal uses of attributes on prefixes on an
3821 incomplete type, both when the type of the prefix is locally
3822 incomplete, and when it is a limited view of a type whose
3823 non-limited view is not available.
3824 (Analyze_Attribute): Add calls to Check_Not_Incomplete_Type for
3825 'Address and others.
3827 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
3829 * exp_ch6.adb: Fix minor typo in comment.
3831 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
3833 * sinfo.ads: Add comment.
3835 2015-02-20 Olivier Hainque <hainque@adacore.com>
3837 * opt.ads: Replace Opt.Suppress_All_Inlining by two separate
3838 flags controlling the actual FE inlining out of pragma Inline
3839 and pragma Inline_Always.
3840 * adabkend.adb (Scan_Compiler_Arguments): Set both flags to True
3841 on -fno-inline, which disables all inlining in compilers with
3842 an Ada back-end and without back-end inlining support.
3843 * back_end.adb (Scan_Back_End_Switches): Set the Inline related
3844 flag to True on -fno-inline and leave Inline_Always alone for
3846 * back_end.ads (Scan_Compiler_Arguments): Adjust spec wrt the
3847 names of the Opt flags it sets.
3848 * gnat1drv.adb (Adjust_Global_Switches): Remove test on
3849 Opt.Suppress_All_Inlining in the Back_End_Inlining computation.
3850 * sem_prag.adb (Make_Inline): Remove early return conditioned
3851 on Opt.Suppress_All_Inlining.
3852 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Use the flags to
3853 disable the calls to Build_Body_To_Inline otherwise triggered
3854 by pragma Inline or Inline_Always. This will prevent actual
3855 front-end inlining of the subprogram on calls.
3857 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
3859 * exp_ch3.adb (Default_Initialize_Object): Call Add_Inlined_Body on the
3860 Abort_Undefer_Direct function.
3861 * exp_ch5.adb (Expand_N_Assignment_Statement): Likewise.
3862 * exp_intr.adb (Expand_Unc_Deallocation): Likewise.
3863 * exp_prag.adb (Expand_Pragma_Abort_Defer): Likewise.
3864 * exp_ch4.adb (Expand_N_Selected_Component): Adjust call to
3866 * exp_ch6.adb (Expand_Call): Adjust calls to Add_Inlined_Body.
3867 Remove call to Register_Backend_Call and move code resetting
3868 Needs_Debug_Info on inlined subprograms to...
3869 * inline.ads (Add_Inlined_Body): Add N parameter.
3870 (Register_Backend_Call): Delete.
3871 * inline.adb (Add_Inlined_Body): ...here and simplify.
3872 Register the call with Backend_Calls directly.
3873 (Register_Backend_Call): Delete.
3874 * s-stalib.ads (Abort_Undefer_Direct): Restore pragma Inline.
3876 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
3878 * s-stalib.ads: Fix typo.
3880 2015-02-20 Ed Schonberg <schonberg@adacore.com>
3882 * exp_ch3.adb (Default_Initialize_Object): If the object has a
3883 delayed freeze, the actions associated with default initialization
3884 must be part of the freeze actions, rather that being inserted
3885 directly after the object declaration.
3887 2015-02-20 Robert Dewar <dewar@adacore.com>
3889 * lib-load.adb: Minor comment update.
3891 2015-02-20 Vincent Celier <celier@adacore.com>
3893 * prj-proc.adb (Process_Case_Construction): When there are
3894 incomplete withed projects and the case variable is unknown,
3895 skip the case construction.
3897 2015-02-20 Ed Schonberg <schonberg@adacore.com>
3899 * exp_ch6.adb (Expand_Actuals): Add caller-side invariant checks
3900 when an actual is a view conversion, either because the call is
3901 to an inherited operation, or because the actual is an explicit
3902 type conversion to an ancestor type. Fixes ACATS 4.0D: C732001
3904 2015-02-20 Robert Dewar <dewar@adacore.com>
3906 * einfo.ads: Minor comment updates Fix missing pragma Inline
3907 for Set_Partial_View_Has_Unknown_Discr.
3908 * einfo.adb (Write_Entity_Flags): Add missing entry for
3909 Partial_View_Has_Unknown_Discr.
3910 * sem_ch3.adb: Minor reformatting.
3912 2015-02-20 Vincent Celier <celier@adacore.com>
3914 * opt.ads: Minor cleanup: remove mention of gprmake.
3915 * s-stalib.ads (Abort_Undefer_Direct): Do not inline.
3916 * s-tataat.adb: Do not call System.Tasking.Self but directly
3917 System.Task_Primitives.Operations.Self.
3919 2015-02-20 Arnaud Charlet <charlet@adacore.com>
3921 * gnat_rm.texi, gnat_ugn.texi: Now automatically generated from
3922 sphinx in the doc directory.
3923 * doc: New directory containing sphinx versions of gnat_rm and gnat_ugn
3925 2015-02-20 Robert Dewar <dewar@adacore.com>
3927 * sem_res.adb: Minor reformatting.
3928 * exp_ch9.adb (Build_Protected_Spec): Copy Aliased setting when
3930 * sem_ch13.adb (Analyze_Aspect_Specifications): Exclude Boolean
3931 aspects from circuitry setting delay required to false if the
3932 argument is an integer literal.
3934 2015-02-20 Ed Schonberg <schonberg@adacore.com>
3936 * einfo.ads. einfo.adb (Partial_View_Has_Unknown_Discr): New flag
3937 on type entities, to enforce AI12-0133: default initialization
3938 of types whose partial view has unknown discriminants does not
3939 get an invariant check, because clients of the unit can never
3940 declare objects of such types.
3941 * sem_ch3.adb (Find_Type_Name); Set new flag
3942 Partial_View_Has_Unknown_Discr when needed.
3943 * exp_ch3.adb (Expand_N_Object_Declaration): Use flag to suppress
3944 generation of invariant call on default-initialized object.
3946 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
3948 * gcc-interface/decl.c (gnat_to_gnu_param): Do not strip the padding
3949 if the parameter either is passed by reference or if the alignment
3952 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
3954 * gcc-interface/decl.c (is_cplusplus_method): Use Is_Primitive flag to
3955 detect primitive operations of tagged and untagged types.
3957 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
3959 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not bother about alias
3960 sets in presence of derivation for subprogram types.
3962 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
3964 * gcc-interface/utils.c (begin_subprog_body): Assert that the body is
3965 present in the same context as the declaration.
3967 2015-02-07 Jakub Jelinek <jakub@redhat.com>
3970 * gcc-interface/trans.c (gigi): Recreate optimization_default_node
3971 and optimization_current_node after tweaking global_options.
3973 2015-02-05 Robert Dewar <dewar@adacore.com>
3975 * prj-proc.adb, sem_aux.adb, exp_ch9.adb, errout.adb, prj-dect.adb,
3976 prj-nmsc.adb: Minor reformatting.
3978 2015-02-05 Ed Schonberg <schonberg@adacore.com>
3980 * sem_type.adb (Covers): In ASIS_Mode the Corresponding_Record
3981 of a protected type may not be available, so to check conformance
3982 with an interface type, examine the interface list in the type
3983 declaration directly.
3984 (Write_Overloads): Improve information for indirect calls,
3987 2015-02-05 Ed Schonberg <schonberg@adacore.com>
3989 * exp_ch3.adb (Make_Tag_Assignment): Do not perform this
3990 expansion activity in ASIS mode.
3992 2015-02-05 Javier Miranda <miranda@adacore.com>
3994 * errout.adb (Error_Msg_PT): Add missing error.
3995 * sem_ch6.adb (Check_Synchronized_Overriding): Check the missing
3996 RM rule. Code cleanup.
3997 * exp_ch9.adb (Build_Wrapper_Spec): Propagate "constant" in
3998 anonymous access types. Found working on the tests. Code cleanup.
4000 2015-02-05 Vincent Celier <celier@adacore.com>
4002 * prj-dect.adb (Parse_Attribute_Declaration): Continue scanning
4003 when there are incomplete withs.
4004 * prj-nmsc.adb (Process_Naming): Do not try to get the value
4005 of an element when it is nil.
4006 (Check_Naming): Do not check a nil suffix for illegality
4007 * prj-proc.adb (Expression): Do not process an empty term.
4008 * prj-strt.adb (Attribute_Reference): If attribute cannot be
4009 found, parse a possible index to avoid cascading errors.
4011 2015-02-05 Ed Schonberg <schonberg@adacore.com>
4013 * sem_aux.adb (Is_Derived_Type): A subprogram_type generated
4014 for an access_to_subprogram declaration is not a derived type.
4016 2015-02-05 Robert Dewar <dewar@adacore.com>
4018 * errout.adb (Error_Msg_Internal): For non-serious error set
4019 Fatal_Error to Ignored.
4020 * lib-load.adb (Load_Unit): Minor comment updates.
4021 * sem_ch10.adb (Analyze_With_Clause): Propagate Fatal_Error
4022 setting from with'ed unit to with'ing unit.
4023 * sem_prag.adb (Analyze_Pragma, case Warnings): Document handling
4026 2015-02-05 Yannick Moy <moy@adacore.com>
4028 * sem_prag.adb, par-prag.adb: Minor code clean up.
4030 2015-02-05 Yannick Moy <moy@adacore.com>
4032 * par-prag.adb (Pragma_Warnings): Update for extended form
4033 of pragma Warnings. The "one" argument case may now have 2 or
4035 * sem_prag.adb (Analyze_Pragma/Pragma_Warnings): Update for
4036 extended form of pragma Warnings. Pragma with tool name is either
4037 rewritten as null or as an equivalent form without tool name,
4039 * snames.ads-tmpl (Name_Gnatprove): New name.
4041 2015-02-05 Robert Dewar <dewar@adacore.com>
4043 * sem_ch13.adb (Add_Invariants): Don't assume invariant is
4045 * sem_prag.adb (Analyze_Pragma, case Check): Don't assume
4046 condition is standard Boolean, it can be non-standard derived
4049 2015-02-05 Robert Dewar <dewar@adacore.com>
4051 * checks.adb (Enable_Range_Check): Disconnect attempted
4052 optimization for the case of range check for subscript of
4053 unconstrained array.
4055 2015-02-05 Robert Dewar <dewar@adacore.com>
4057 * par-ch13.adb (With_Present): New function
4058 (Aspect_Specifications_Present): Handle WHEN in place of WITH
4059 (Get_Aspect_Specifications): Comment update.
4060 * par.adb: Comment updates.
4062 2015-02-05 Robert Dewar <dewar@adacore.com>
4064 * errout.adb (Handle_Serious_Error): New setting of Fatal_Error.
4065 * frontend.adb (Frontend): New setting of Fatal_Error.
4066 * lib-load.adb (Create_Dummy_Package_Unit): New setting of
4068 (Load_Main_Source): New setting of Fatal_Error
4069 (Load_Unit): New setting of Fatal_Error.
4070 * lib-writ.adb (Add_Preprocessing_Dependency): New setting of
4072 (Ensure_System_Dependency): New setting of Fatal_Error.
4073 * lib.adb (Fatal_Error): New setting of Fatal_Error
4074 (Set_Fatal_Error): New setting of Fatal_Error.
4075 * lib.ads: New definition of Fatal_Error and associated routines.
4076 * par-ch10.adb (P_Compilation_Unit): New setting of Fatal_Error.
4077 * par-load.adb (Load): New setting of Fatal_Error.
4078 * rtsfind.adb (Load_RTU): New setting of Fatal_Error.
4079 * sem_ch10.adb (Analyze_Compilation_Unit): New setting of
4081 (Optional_Subunit): New setting of Fatal_Error.
4082 (Analyze_Proper_Body): New setting of Fatal_Error.
4083 (Load_Needed_Body): New setting of Fatal_Error.
4085 2015-02-05 Ed Schonberg <schonberg@adacore.com>
4087 * sem_res.adb (Resolve_Call): If the function being called has
4088 out parameters do not check for language version if the function
4089 comes from a predefined unit, as those are always compiled in
4092 2015-02-05 Ed Schonberg <schonberg@adacore.com>
4094 * sem_ch3.adb (Process_Full_View): Verify that the full view
4095 of a type extension must carry an explicit limited keyword if
4096 the partial view does (RM 7.3 (10.1)).
4098 2015-02-05 Robert Dewar <dewar@adacore.com>
4100 * g-rannum.adb, g-rannum.ads, s-rannum.adb, s-rannum.ads,
4101 sem_warn.ads: Minor reformatting.
4102 * exp_ch13.adb (Expand_N_Freeze_Entity): Add guard for aspect
4104 * sem_prag.adb (Analyze_Pragma, case Type_Invariant): Give
4105 error for abstract type.
4107 2015-02-05 Yannick Moy <moy@adacore.com>
4109 * opt.ads (Warn_On_Suspicious_Contract): Update comment
4111 * sem_attr.adb (Analyze_Attribute/Attribute_Update): Warn on
4112 suspicious uses of 'Update.
4113 * sem_warn.adb, sem_warn.ads (Warn_On_Suspicious_Update): New
4114 function issues warning on suspicious uses of 'Update.
4115 * g-rannum.adb, g-rannum.ads, s-rannum.adb, s-rannum.ads: Mark
4116 package spec and body as SPARK_Mode Off.
4118 2015-02-05 Robert Dewar <dewar@adacore.com>
4120 * sem_prag.adb (Set_Elab_Unit_Name): New name for Set_Unit_Name
4121 (Analyze_Pragma): Change Set_Unit_Name to Set_Elab_Unit_Name
4122 (Set_Elab_Unit_Name): Generate reference for Elaborate[_All]
4123 * sem_warn.adb (Warn_On_Unreferenced_Entity): Suppress warning
4124 for exported entity.
4126 2015-02-05 Hristian Kirtchev <kirtchev@adacore.com>
4128 * sem_prag.adb (Check_Pragma_Conformance): Add
4129 local variable Arg. Ensure that all errors are associated with
4130 the pragma if it appears without an argument. Add comments on
4133 2015-02-05 Robert Dewar <dewar@adacore.com>
4135 * lib-xref.adb: Minor reformatting.
4137 2015-02-05 Tristan Gingold <gingold@adacore.com>
4140 * env.c: Fix thinko: handle Darwin case before default one.
4142 2015-01-30 Robert Dewar <dewar@adacore.com>
4144 * a-assert.adb: Minor reformatting.
4145 * sem_ch13.adb: Minor comment clarification.
4146 * types.ads: Minor comment update.
4147 * sem_eval.adb (Real_Or_String_Static_Predicate_Matches): Avoid blow up
4148 when we have a predicate that is nothing but an inherited dynamic
4151 2015-01-30 Jerome Guitton <guitton@adacore.com>
4153 * gcc-interface/Makefile.in (x86-vxworks): Update GCC_SPEC_FILES to
4154 include cert link spec.
4156 2015-01-30 Robert Dewar <dewar@adacore.com>
4158 * einfo.ads: Minor comment fix.
4159 * freeze.adb (Freeze_Profile): Add test for suspicious import
4161 * sem_prag.adb (Process_Import_Or_Interface): Test for suspicious
4162 use in Pure unit is now moved to Freeze (to properly catch
4163 Pure_Function exemption).
4165 2015-01-30 Bob Duff <duff@adacore.com>
4167 * sem_res.ads: Minor comment fix.
4168 * sem_type.adb: sem_type.adb (Remove_Conversions): Need to
4169 check both operands of an operator.
4171 2015-01-30 Yannick Moy <moy@adacore.com>
4173 * a-assert.ads, a-assert.adb: Mark package spec in SPARK. Set assertion
4174 policy for Pre to Ignore.
4175 (Assert): Add precondition.
4177 2015-01-30 Robert Dewar <dewar@adacore.com>
4179 * sem_prag.adb (Process_Import_Or_Interface): Warn if used in
4181 * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Clarify
4182 documentation for some special cases of invalid attempts at
4185 2015-01-30 Gary Dismukes <dismukes@adacore.com>
4187 * errout.ads: Minor reformatting.
4189 2015-01-30 Yannick Moy <moy@adacore.com>
4191 * inline.adb (Process_Formals): Use the sloc of
4192 the inlined node instead of the sloc of the actual parameter,
4193 when replacing formal parameters by the actual one.
4195 2015-01-30 Arnaud Charlet <charlet@adacore.com>
4197 * g-expect.adb (Get_Command_Output): Use infinite timeout when
4200 2015-01-30 Ed Schonberg <schonberg@adacore.com>
4202 * sem_ch12.adb (Analyze_Associations): If an in-parameter is
4203 defaulted in an instantiation, add an entry in the list of actuals
4204 to indicate the default value of the formal (as is already done
4205 for defaulted subprograms).
4207 2015-01-30 Javier Miranda <miranda@adacore.com>
4209 * errout.adb (Error_Msg_PT): Minor error phrasing update.
4211 2015-01-30 Robert Dewar <dewar@adacore.com>
4213 * sem_warn.adb (Warn_On_Known_Condition): Improve error message
4216 2015-01-30 Pierre-Marie de Rodat <derodat@adacore.com>
4218 * exp_dbug.adb (Get_Encoded_Name): When
4219 -fgnat-encodings=minimal, do not generate names for biased types.
4221 2015-01-30 Tristan Gingold <gingold@adacore.com>
4224 * env.c: Move vxworks and darwin includes out of #ifdef IN_RTS.
4226 2015-01-30 Gary Dismukes <dismukes@adacore.com>
4228 * freeze.adb: Minor reformatting.
4230 2015-01-30 Javier Miranda <miranda@adacore.com>
4232 * errout.ads (Error_Msg_PT): Replace Node_Id by Entity_Id and
4233 improve its documentation.
4234 * errout.adb (Error_Msg_PT): Improve the error message.
4235 * sem_ch6.adb (Check_Conformance): Update call to Error_Msg_PT.
4236 (Check_Synchronized_Overriding): Update call to Error_Msg_PT.
4237 * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup.
4239 2015-01-30 Robert Dewar <dewar@adacore.com>
4241 * sem_warn.adb (Warn_On_Known_Condition): Do special casing of
4242 message for False case.
4244 2015-01-30 Doug Rupp <rupp@adacore.com>
4246 * s-vxwext-kernel.ads (Task_Cont): Remove imported subprogram body.
4247 * s-vxwext-kernel.adb (Task_Cont): New subpprogram body specialized for
4250 2015-01-30 Gary Dismukes <dismukes@adacore.com>
4252 * sem_attr.adb (Declared_Within_Generic_Unit):
4253 New function to test whether an entity is declared within the
4254 declarative region of a given generic unit.
4255 (Resolve_Attribute): For checking legality of subprogram'Access within
4256 a generic unit, call new Boolean function Declared_Within_Generic_Unit
4257 instead of simply comparing the results of Enclosing_Generic_Unit on
4258 the prefix and access type. Correct minor comment typos.
4260 2015-01-30 Robert Dewar <dewar@adacore.com>
4262 * freeze.adb, exp_util.ads: Update comment.
4263 * exp_util.adb, exp_ch3.adb: Minor code reorganization and reformatting.
4264 * sem_util.adb: Minor: fix typo.
4266 2015-01-30 Hristian Kirtchev <kirtchev@adacore.com>
4268 * sem_attr.adb (Analyze_Attribute): Ensure that
4269 the check concerning Refined_Post takes precedence over the
4272 2015-01-30 Gary Dismukes <dismukes@adacore.com>
4274 * sem_prag.adb: Minor typo fixes and reformatting.
4276 2015-01-30 Yannick Moy <moy@adacore.com>
4278 * sem_attr.adb: Code clean up.
4280 2015-01-30 Robert Dewar <dewar@adacore.com>
4282 * ali.adb (Scan_ALI): Set Serious_Errors flag in Unit record.
4283 * ali.ads (Unit_Record): Add new field Serious_Errors.
4284 * lib-writ.adb (Write_Unit_Information): Set SE (serious errors)
4285 attribute in U line.
4286 * lib-writ.ads: New attribute SE (serious erors) in unit line.
4288 2015-01-30 Hristian Kirtchev <kirtchev@adacore.com>
4290 * einfo.adb Update the usage of attributes Entry_Bodies_Array,
4291 Lit_Indexes, Scale_Value, Storage_Size_Variable,
4292 String_Literal_Low_Bound along associated routines and
4294 (Pending_Access_Types): New routine.
4295 (Set_Pending_Access_Types): New routine.
4296 (Write_Field15_Name): Add an entry for Pending_Access_Types.
4297 * einfo.ads Add new attribute Pending_Access_Types along
4298 with usage in nodes. Update the usage of attributes
4299 Entry_Bodies_Array, Lit_Indexes, Scale_Value,
4300 Storage_Size_Variable, String_Literal_Low_Bound.
4301 (Pending_Access_Types): New routine along with pragma Inline.
4302 (Set_Pending_Access_Types): New routine along with pragma Inline.
4303 * exp_ch3.adb (Expand_Freeze_Array_Type): Add new local variable
4304 Ins_Node. Determine the insertion node for anonynous access type
4305 that acts as a component type of an array. Update the call to
4306 Build_Finalization_Master.
4307 (Expand_Freeze_Record_Type): Update
4308 the calls to Build_Finalization_Master.
4309 (Freeze_Type): Remove
4310 local variable RACW_Seen. Factor out the code that deals with
4311 remote access-to-class-wide types. Create a finalization master
4312 when the designated type contains a private component. Fully
4313 initialize all pending access types.
4314 (Process_RACW_Types): New routine.
4315 (Process_Pending_Access_Types): New routine.
4316 * exp_ch4.adb (Expand_Allocator_Expression): Allocation no longer
4317 needs to set primitive Finalize_Address.
4318 (Expand_N_Allocator): Allocation no longer sets primitive
4320 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
4321 Update the call to Build_Finalization_Master.
4322 (Make_Build_In_Place_Call_In_Allocator): Allocation no longer
4323 needs to set primitive Finalize_Address.
4324 * exp_ch7.adb (Add_Pending_Access_Type): New routine.
4325 (Build_Finalization_Master): New parameter profile. Associate
4326 primitive Finalize_Address with the finalization master if the
4327 designated type has been frozen, otherwise treat the access
4328 type as pending. Simplify the insertion of the master and
4329 related initialization code.
4330 (Make_Finalize_Address_Body): Allow Finalize_Address for class-wide
4332 (Make_Set_Finalize_Address_Call): Remove forlam parameter Typ.
4333 Simplify the implementation.
4334 * exp_ch7.ads (Build_Finalization_Master): New parameter profile
4335 along with comment on usage.
4336 (Make_Set_Finalize_Address_Call): Remove formal parameter Typ. Update
4337 the comment on usage.
4338 * exp_util.adb (Build_Allocate_Deallocate_Proc): Use routine
4339 Finalize_Address to retrieve the primitive.
4340 (Finalize_Address): New routine.
4341 (Find_Finalize_Address): Removed.
4342 * exp_util.ads (Finalize_Address): New routine.
4343 * freeze.adb (Freeze_All): Remove the generation of finalization
4345 * sem_ch3.adb (Analyze_Full_Type_Declaration): Propagate any
4346 pending access types from the partial to the full view.
4348 2015-01-30 Robert Dewar <dewar@adacore.com>
4350 * sem_disp.adb: Minor reformatting.
4351 * sem_disp.ads: Documentation update.
4353 2015-01-30 Ed Schonberg <schonberg@adacore.com>
4355 * sem_disp.adb (Is_Dynamically_Tagged): when applied to an entity
4356 or a function call, return True if type is class-wide.
4357 * sem_res.adb (Resolve_Case_Expression, Resolve_If_Expression);
4358 Apply RM 4.5.7 (17/3): all or none of the dependent expression
4359 of a conditional expression must be dynamically tagged.
4361 2015-01-30 Ed Schonberg <schonberg@adacore.com>
4363 * sem_ch6.adb (Analyze_Function_Return): In an extended return
4364 statement, apply accessibility check to result object when there
4365 is no initializing expression (Ada 2012 RM 6.5 (5.4/3))
4367 2015-01-30 Robert Dewar <dewar@adacore.com>
4369 * sem_ch4.adb (Analyze_If_Expression): Allow for non-standard
4370 Boolean for case where ELSE is omitted.
4371 * sem_res.adb: Minor reformatting.
4373 2015-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
4375 Fix build under cygwin/64.
4376 * adaint.h: Add check for __CYGWIN__.
4377 * mingw32.h: Prevent windows.h from including x86intrin.h in GCC.
4379 2015-01-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
4382 * adaint.c: Handle __CYGWIN__ like __MINGW32__ here.
4383 * mingw32.h: Don't include <tchar.h> under cygwin.
4384 (_O_U8TEXT, _O_U16TEXT, _O_WTEXT): Set to _O_TEXT if not yet defined.
4386 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
4388 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8)
4389 (DEF_FUNCTION_TYPE_VAR_12): New macros.
4391 2015-01-09 Michael Collison <michael.collison@linaro.org>
4393 * gcc-interface/cuintp.c: Include hash-set.h, machmode.h,
4394 vec.h, double-int.h, input.h, alias.h, symtab.h,
4395 fold-const.h, wide-int.h, and inchash.h due to
4396 flattening of tree.h.
4397 * gcc-interface/decl.c: Ditto.
4398 * gcc-interface/misc.c: Ditto.
4399 * gcc-interface/targtyps.c: Include hash-set.h, machmode.h,
4400 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h,
4401 fold-const.h, wide-int.h, and inchash.h due to
4402 flattening of tree.h.
4403 * gcc-interface/trans.c: Include hash-set.h, machmode.h,
4404 vec.h, double-int.h, input.h, alias.h, symtab.h, real.h,
4405 fold-const.h, wide-int.h, inchash.h due to
4406 flattening of tree.h.
4407 * gcc-interface/utils.c: Include hash-set.h, machmode.h,
4408 vec.h, double-int.h, input.h, alias.h, symtab.h,
4409 fold-const.h, wide-int.h, and inchash.h due to
4410 flattening of tree.h.
4411 * gcc-interface/utils2.c: Ditto.
4413 2015-01-07 Robert Dewar <dewar@adacore.com>
4415 * sem_warn.adb (Check_One_Unit): Don't give unused entities
4416 warning for a package which is used as a generic parameter.
4418 2015-01-07 Bob Duff <duff@adacore.com>
4420 * usage.adb (Usage): Correct documentation of
4423 2015-01-07 Robert Dewar <dewar@adacore.com>
4425 * s-fileio.adb: Minor reformatting.
4427 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4429 * sem_ch12.adb (Instantiate_Object): If formal is an anonymous
4430 access to subprogram, replace its formals with new entities when
4431 building the object declaration, both if actual is present and
4432 when it is defaulted.
4434 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4436 * sem_ch5.adb (Analyze_Assignment): If left-hand side is a view
4437 conversion and type of expression has invariant, apply invariant
4438 check on expression.
4440 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4442 * sem_ch3.adb (Create_Constrained_Components): A call to
4443 Gather_Components may detect an error if an inherited discriminant
4444 that controls a variant is non-static.
4445 * sem_aggr.adb (Resolve_Record_Aggregate, Step 5): The call to
4446 Gather_Components may report an error if an inherited discriminant
4447 in a variant in non-static.
4448 * sem_util.adb (Gather_Components): If a non-static discriminant
4449 is inherited do not report error here, but let caller handle it.
4450 (Find_Actual): Small optimization.
4452 2015-01-07 Bob Duff <duff@adacore.com>
4454 * usage.adb (Usage): Document -gnatw.f switch.
4456 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4458 * sem_ch12.adb: Code clean up and minor reformatting.
4460 2015-01-07 Robert Dewar <dewar@adacore.com>
4462 * exp_ch4.adb (Expand_N_Type_Conversion): Add guard for
4463 Raise_Accessibility_Error call.
4464 * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Add documentation
4465 on handling of invalid digits in based constants.
4466 * s-fatgen.ads: Minor reformatting.
4467 * sem_attr.adb (Analyze_Attribute, case Unrestricted_Access):
4468 Avoid noting bogus modification for Valid test.
4469 * snames.ads-tmpl (Name_Attr_Long_Float): New Name.
4470 * einfo.ads: Minor reformatting.
4471 * sem_warn.adb: Minor comment clarification.
4472 * sem_ch12.adb: Minor reformatting.
4474 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4476 * exp_ch5.adb (Expand_Predicated_Loop): Handle properly loops
4477 over static predicates when the loop parameter specification
4478 carries a Reverse indicator.
4480 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4482 * sem_ch12.adb (Instantiate_Object): If formal has a default,
4483 actual is missing and formal has an anonymous access type, copy
4484 access definition in full so that tree for instance is properly
4485 formatted for ASIS use.
4487 2015-01-07 Bob Duff <duff@adacore.com>
4489 * sem_elab.adb (Check_Internal_Call_Continue): Give a warning
4490 for P'Access, where P is a subprogram in the same package as
4491 the P'Access, and the P'Access is evaluated at elaboration
4492 time, and occurs before the body of P. For example, "X : T :=
4493 P'Access;" would allow a subsequent call to X.all to be an
4494 access-before-elaboration error; hence the warning. This warning
4495 is enabled by the -gnatw.f switch.
4496 * opt.ads (Warn_On_Elab_Access): New flag for warning switch.
4497 * warnsw.adb (Set_Dot_Warning_Switch): Set Warn_On_Elab_Access.
4498 * gnat_ugn.texi: Document the new warning.
4500 2015-01-07 Johannes Kanig <kanig@adacore.com>
4502 * lib-xref-spark_specific.adb (Collect_SPARK_Xrefs): Skip unneeded
4505 2015-01-07 Robert Dewar <dewar@adacore.com>
4507 * s-taprop-linux.adb, clean.adb: Minor reformatting.
4509 2015-01-07 Arnaud Charlet <charlet@adacore.com>
4511 * s-tassta.adb: Relax some overzealous assertions.
4513 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4515 * sem_ch6.adb (Analyze_Return_Type): An call that returns a limited
4516 view of a type is legal when context is a thunk generated for
4517 operation inherited from an interface.
4518 * exp_ch6.adb (Expand_Simple_Function_Return): If context is
4519 a thunk and return type is an incomplete type do not continue
4520 expansion; thunk will be fully elaborated when generating code.
4522 2015-01-07 Doug Rupp <rupp@adacore.com>
4524 * s-osinte-mingw.ads (LARGE_INTEGR): New subtype.
4525 (QueryPerformanceFrequency): New imported procedure.
4526 * s-taprop-mingw.adb (RT_Resolution): Call above and return
4527 resolution vice a hardcoded value.
4528 * s-taprop-solaris.adb (RT_Resolution): Call clock_getres and return
4529 resolution vice a hardcoded value.
4530 * s-linux-android.ads (clockid_t): New subtype.
4531 * s-osinte-aix.ads (clock_getres): New imported subprogram.
4532 * s-osinte-android.ads (clock_getres): Likewise.
4533 * s-osinte-freebsd.ads (clock_getres): Likewise.
4534 * s-osinte-solaris-posix.ads (clock_getres): Likewise.
4535 * s-osinte-darwin.ads (clock_getres): New subprogram.
4536 * s-osinte-darwin.adb (clock_getres): New subprogram.
4537 * thread.c (__gnat_clock_get_res) [__APPLE__]: New function.
4538 * s-taprop-posix.adb (RT_Resolution): Call clock_getres to
4539 calculate resolution vice hard coded value.
4541 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4543 * exp_util.adb (Make_CW_Equivalent_Type): If root type is a
4544 limited view, use non-limited view when available to create
4545 equivalent record type.
4547 2015-01-07 Vincent Celier <celier@adacore.com>
4549 * gnatcmd.adb: Remove command Sync and any data and processing
4550 related to this command. Remove project processing for gnatstack.
4551 * prj-attr.adb: Remove package Synchonize and its attributes.
4553 2015-01-07 Vincent Celier <celier@adacore.com>
4555 * clean.adb: Minor error message change.
4557 2015-01-07 Tristan Gingold <gingold@adacore.com>
4560 * env.c (__gnat_environ): Adjust for darwin9/darwin10.
4562 2015-01-07 Javier Miranda <miranda@adacore.com>
4564 * sem_ch10.adb (Analyze_With_Clause): Compiling under -gnatq
4565 protect the frontend against never ending recursion caused by
4566 circularities in the sources.
4568 2015-01-07 Robert Dewar <dewar@adacore.com>
4570 * a-reatim.adb, make.adb, exp_pakd.adb, i-cpoint.adb, sem_ch8.adb,
4571 exp_ch3.adb: Minor reformatting.
4573 2015-01-07 Doug Rupp <rupp@adacore.com>
4575 * s-linux.ads (clockid_t): New subtype.
4576 * s-osinte-linux.ads (pragma Linker Options): Add -lrt.
4577 (clockid_t): New subtype.
4578 (clock_getres): Import system call.
4579 * s-taprop-linux.adb (System.OS_Constants): With and rename.
4580 (RT_Resolution): Remove
4581 hardcoded value and call clock_getres.
4582 * s-linux-sparc.ads, s-linux-mipsel.ads, s-linux-hppa.ads,
4583 s-linux-alpha.ads, s-linux-x32.ads (clockid_t): Add new subtype.
4585 2015-01-07 Robert Dewar <dewar@adacore.com>
4587 * sem_warn.adb (Check_One_Unit): Guard against context item
4588 with no Entity field.
4590 2015-01-07 Vincent Celier <celier@adacore.com>
4592 * clean.adb (Gnatclean): Warn that 'gnatclean -P' is obsolete.
4593 * make.adb (Initialize): Warn that 'gnatmake -P' is obsolete.
4595 2015-01-07 Vincent Celier <celier@adacore.com>
4597 * prj-conf.adb (Parse_Project_And_Apply_Config): Always finalize
4598 errors/warnings in the first parsing of the project files,
4599 to display the warnings when there is no errors.
4601 2015-01-07 Tristan Gingold <gingold@adacore.com>
4603 * i-cpoint.adb (Copy_Terminated_Array): Nicely handle null target.
4605 2015-01-07 Doug Rupp <rupp@adacore.com>
4607 * s-taprop-vxworks.adb (Stop_All_Tasks): Pass return
4608 value from Int_Lock as parameter to Int_Unlock.
4609 * s-osinte-vxworks.ads (Int_Unlock): Add parameter.
4610 * s-vxwext.ads (Int_Unlock): Likewise.
4611 * s-vxwext-kernel.adb (intUnlock, Int_Unlock): Likewise.
4612 * s-vxwext-kernel.ads (Int_Unlock): Likewise.
4613 * s-vxwext-rtp.adb (Int_Unlock): Likewise.
4614 * s-vxwext-rtp.ads (Int_Unlock): Likewise.
4616 2015-01-07 Pierre-Marie de Rodat <derodat@adacore.com>
4618 * exp_pakd.adb: Add a comment in exp_pakd.adb to explain why we
4621 2015-01-07 Tristan Gingold <gingold@adacore.com>
4623 * i-cpoint.adb (Copy_Terminated_Array): Use Copy_Array to
4626 2015-01-07 Eric Botcazou <ebotcazou@adacore.com>
4628 * sem_ch3.adb (Analyze_Full_Type_Declaration): Do not
4629 automatically set No_Strict_Aliasing on access types.
4630 * fe.h (No_Strict_Aliasing_CP): Declare.
4631 * gcc-interface/trans.c (gigi): Force flag_strict_aliasing to 0 if
4632 No_Strict_Aliasing_CP is set.
4634 2015-01-07 Johannes Kanig <kanig@adacore.com>
4636 * sem_ch8.adb (Analyze_Subprogram_Renaming) do
4637 not build function wrapper in gnatprove mode when the package
4638 is externally axiomatized.
4640 2015-01-07 Jose Ruiz <ruiz@adacore.com>
4642 * a-reatim.adb (Time_Of): Reduce the number of spurious overflows in
4643 intermediate computations when the parameters have different signs.
4645 2015-01-07 Javier Miranda <miranda@adacore.com>
4647 * exp_ch3.adb (Build_Init_Procedure): For derived types,
4648 improve the code which takes care of identifying and moving to
4649 the beginning of the init-proc the call to the init-proc of the
4652 2015-01-07 Olivier Hainque <hainque@adacore.com>
4654 * gcc-interface/trans.c (gnat_to_gnu, <N_Expression_With_Action>):
4655 Elaborate the expression as part of the same stmt group as the actions.
4657 2015-01-07 Robert Dewar <dewar@adacore.com>
4659 * sem_ch3.adb: Minor error message change.
4661 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4663 * sem_prag.adb (Analyze_Pragma, case Preelaborable_Initialization):
4664 Following AI05-028, the pragam applies legally to any composite type.
4666 2015-01-07 Arnaud Charlet <charlet@adacore.com>
4668 * s-osinte-vxworks.adb, s-osinte-vxworks.ads
4669 (sigwait, sigwaitinfo): Removed, not needed after all on any
4670 VxWorks configurations.
4672 2015-01-07 Robert Dewar <dewar@adacore.com>
4674 * sem_ch3.adb, freeze.adb, exp_disp.adb: Minor reformatting.
4676 2015-01-07 Javier Miranda <miranda@adacore.com>
4678 * exp_disp.adb (Expand_Interface_Conversion): Adding missing
4679 generation of accessibility check.
4681 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4683 * sem_ch3.adb (Derived_Type_Declaration): In the case of an
4684 illegal completion from a class- wide type, set etype of the
4685 derived type properly to prevent cascaded errors.
4687 2015-01-07 Robert Dewar <dewar@adacore.com>
4689 * prj.ads, i-cpoint.adb, freeze.adb, ghost.adb, prj-err.adb: Minor
4692 2015-01-07 Robert Dewar <dewar@adacore.com>
4694 * restrict.adb (Check_Restriction_No_Use_Of_Attribute):
4696 (OK_No_Use_Of_Entity_Name): New function.
4697 (Set_Restriction_No_Use_Of_Entity): New procedure.
4698 * restrict.ads (Check_Restriction_No_Use_Of_Attribute):
4700 (OK_No_Use_Of_Entity_Name): New function.
4701 (Set_Restriction_No_Use_Of_Entity): New procedure.
4702 * sem_ch8.adb (Find_Direct_Name): Add check for violation of
4704 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
4705 Add processing for new restriction No_Use_Of_Entity.
4707 2015-01-07 Eric Botcazou <ebotcazou@adacore.com>
4709 * freeze.adb (Freeze_Array_Type): Apply same handling to Is_Atomic
4710 component type as to Has_Atomic_Components type. Remove useless
4711 test on Is_Aliased component type.
4713 2015-01-07 Hristian Kirtchev <kirtchev@adacore.com>
4715 * alloc.ads Alphabetize several declarations. Add constants
4716 Ignored_Ghost_Units_Initial and Ignored_Ghost_Units_Increment.
4717 * atree.adb Add with and use clauses for Opt.
4718 (Allocate_Initialize_Node): Mark a node as ignored Ghost
4719 if it is created in an ignored Ghost region.
4720 (Ekind_In): New variant.
4721 (Is_Ignored_Ghost_Node): New routine.
4722 (Set_Is_Ignored_Ghost_Node): New routine.
4723 * atree.adb Aplhabetize several subprograms declarations. Flag
4724 Spare0 is now known as Is_Ignored_Ghost_Node.
4725 (Ekind_In): New variant.
4726 (Is_Ignored_Ghost_Node): New routine.
4727 (Set_Is_Ignored_Ghost_Node): New routine.
4728 * einfo.adb: Flag 279 is now known as Contains_Ignored_Ghost_Code.
4729 (Contains_Ignored_Ghost_Code): New routine.
4730 (Set_Contains_Ignored_Ghost_Code): New routine.
4731 (Set_Is_Checked_Ghost_Entity, Set_Is_Ignored_Ghost_Entity):
4732 It is now possible to set this property on an unanalyzed entity.
4733 (Write_Entity_Flags): Output the status of flag
4734 Contains_Ignored_Ghost_Code.
4735 * einfo.ads New attribute Contains_Ignored_Ghost_Code along with
4737 (Contains_Ignored_Ghost_Code): New routine
4738 along with pragma Inline.
4739 (Set_Contains_Ignored_Ghost_Code): New routine along with pragma Inline.
4740 * exp_ch3.adb Add with and use clauses for Ghost.
4741 (Freeze_Type): Capture/restore the value of Ghost_Mode on entry/exit.
4742 Set the Ghost_Mode in effect.
4743 (Restore_Globals): New routine.
4744 * exp_ch7.adb (Process_Declarations): Do not process a context
4745 that invoves an ignored Ghost entity.
4746 * exp_dbug.adb (Qualify_All_Entity_Names): Skip an ignored Ghost
4747 construct that has been rewritten as a null statement.
4748 * exp_disp.adb Add with and use clauses for Ghost.
4749 (Make_DT): Capture/restore the value of Ghost_Mode on entry/exit. Set
4750 the Ghost_Mode in effect.
4751 (Restore_Globals): New routine.
4752 * exp_util.adb (Requires_Cleanup_Actions): An ignored Ghost entity
4753 does not require any clean up. Add two missing cases that deal
4754 with block statements.
4755 * freeze.adb Add with and use clauses for Ghost.
4756 (Freeze_Entity): Capture/restore the value of Ghost_Mode on entry/exit.
4757 Set the Ghost_Mode in effect.
4758 (Restore_Globals): New routine.
4759 * frontend.adb Add with and use clauses for Ghost. Remove any
4760 ignored Ghost code from all units that qualify.
4761 * ghost.adb New unit.
4762 * ghost.ads New unit.
4763 * gnat1drv.adb Add with clause for Ghost. Initialize and lock
4764 the table in package Ghost.
4765 * lib.ads: Alphabetize several subprogram declarations.
4766 * lib-xref.adb (Output_References): Do not generate reference
4767 information for ignored Ghost entities.
4768 * opt.ads Add new type Ghost_Mode_Type and new global variable
4770 * rtsfind.adb (Load_RTU): Provide a clean environment when
4771 loading a runtime unit.
4772 * sem.adb (Analyze): Capture/restore the value of Ghost_Mode on
4773 entry/exit as the node may set a different mode.
4775 Capture/restore the value of Ghost_Mode on entry/exit as the
4776 unit may be withed from a unit with a different Ghost mode.
4777 * sem_ch3.adb Add with and use clauses for Ghost.
4778 (Analyze_Full_Type_Declaration, Analyze_Incomplete_Type_Decl,
4779 Analyze_Number_Declaration, Analyze_Private_Extension_Declaration,
4780 Analyze_Subtype_Declaration): Set the Ghost_Mode in effect. Mark
4781 the entity as Ghost when there is a Ghost_Mode in effect.
4782 (Array_Type_Declaration): The implicit base type inherits the
4783 "ghostness" from the array type.
4784 (Derive_Subprogram): The
4785 alias inherits the "ghostness" from the parent subprogram.
4786 (Make_Implicit_Base): The implicit base type inherits the
4787 "ghostness" from the parent type.
4788 * sem_ch5.adb Add with and use clauses for Ghost.
4789 (Analyze_Assignment): Set the Ghost_Mode in effect.
4790 * sem_ch6.adb Add with and use clauses for Ghost.
4791 (Analyze_Abstract_Subprogram_Declaration, Analyze_Procedure_Call,
4792 Analyze_Subprogram_Body_Helper, Analyze_Subprogram_Declaration):
4793 Set the Ghost_Mode in effect. Mark the entity as Ghost when
4794 there is a Ghost_Mode in effect.
4795 * sem_ch7.adb Add with and use clauses for Ghost.
4796 (Analyze_Package_Body_Helper, Analyze_Package_Declaration,
4797 Analyze_Private_Type_Declaration): Set the Ghost_Mode in
4798 effect. Mark the entity as Ghost when there is a Ghost_Mode
4800 * sem_ch8.adb Add with and use clauses for Ghost.
4801 (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
4802 Analyze_Object_Renaming, Analyze_Package_Renaming,
4803 Analyze_Subprogram_Renaming): Set the Ghost_Mode in effect. Mark
4804 the entity as Ghost when there is a Ghost_Mode in effect.
4805 (Find_Type): Check the Ghost context of a type.
4806 * sem_ch11.adb Add with and use clauses for Ghost.
4807 (Analyze_Exception_Declaration): Set the Ghost_Mode in
4808 effect. Mark the entity as Ghost when there is a Ghost_Mode
4810 * sem_ch12.adb Add with and use clauses for Ghost.
4811 (Analyze_Generic_Package_Declaration,
4812 Analyze_Generic_Subprogram_Declaration): Set the Ghost_Mode in effect.
4813 Mark the entity as Ghost when there is a Ghost_Mode in effect.
4814 * sem_prag.adb Add with and use clauses for Ghost.
4815 (Analyze_Pragma): Ghost-related checks are triggered when there
4816 is a Ghost mode in effect.
4817 (Create_Abstract_State): Mark the
4818 entity as Ghost when there is a Ghost_Mode in effect.
4819 * sem_res.adb Add with and use clauses for Ghost.
4820 (Check_Ghost_Context): Removed.
4821 * sem_util.adb (Check_Ghost_Completion): Removed.
4822 (Check_Ghost_Derivation): Removed.
4823 (Incomplete_Or_Partial_View):
4824 Add a guard in case the entity has not been analyzed yet
4825 and does carry a scope.
4826 (Is_Declaration): New routine.
4827 (Is_Ghost_Entity): Removed.
4828 (Is_Ghost_Statement_Or_Pragma):
4830 (Is_Subject_To_Ghost): Removed.
4831 (Set_Is_Ghost_Entity):
4833 (Within_Ghost_Scope): Removed.
4834 * sem_util.adb (Check_Ghost_Completion): Removed.
4835 (Check_Ghost_Derivation): Removed.
4836 (Is_Declaration): New routine.
4837 (Is_Ghost_Entity): Removed.
4838 (Is_Ghost_Statement_Or_Pragma): Removed.
4839 (Is_Subject_To_Ghost): Removed.
4840 (Set_Is_Ghost_Entity): Removed.
4841 (Within_Ghost_Scope): Removed.
4842 * sinfo.ads Add a section on Ghost mode.
4843 * treepr.adb (Print_Header_Flag): New routine.
4844 (Print_Node_Header): Factor out code. Output flag
4845 Is_Ignored_Ghost_Node.
4846 * gcc-interface/Make-lang.in: Add dependency for unit Ghost.
4848 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
4850 * freeze.adb (Freeze_Array_Type) <Complain_CS>: Remove always
4851 true test and unreachable 'else' arm.
4853 2015-01-06 Vincent Celier <celier@adacore.com>
4855 * prj-conf.adb (Check_Target): Improve error message when
4856 there are mismatched targets between the on in the configuration
4857 project file and the specified one, either in the main project
4858 file or in the --target= switch.
4860 2015-01-06 Pascal Obry <obry@adacore.com>
4862 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Mode and
4863 Install_Name attribute definitions.
4865 2015-01-06 Ed Schonberg <schonberg@adacore.com>
4867 * freeze.adb (Wrap_Imported_Subprogram): Indicate that the
4868 generated Import pragma for the internal imported procedure does
4869 not come from an aspect, so that Is_Imported can be properly
4872 2015-01-06 Gary Dismukes <dismukes@adacore.com>
4874 * sem_ch12.adb (Might_Inline_Subp): Record whether
4875 any subprograms in the generic package are marked with
4876 pragma Inline_Always (setting flag Has_Inline_Always).
4877 (Analyze_Package_Instantiation): Add test of Has_Inline_Always
4878 alongside existing test of Front_End_Inlining as alternative
4879 conditions for setting Inline_Now. Also add test of
4880 Has_Inline_Always along with Front_End_Inlining test as an
4881 alternative condition for setting Needs_Body to False.
4883 2015-01-06 Tristan Gingold <gingold@adacore.com>
4885 * i-cpoint.adb (Copy_Array): Handle overlap.
4887 2015-01-06 Pascal Obry <obry@adacore.com>
4889 * bindgen.adb: Minor style fix.
4891 2015-01-06 Robert Dewar <dewar@adacore.com>
4893 * sem_util.ads, sem_util.adb: Minor reformatting.
4895 2015-01-06 Vincent Celier <celier@adacore.com>
4897 * prj-conf.adb (Parse_Project_And_Apply_Config): Reset incomplete
4898 with flags before parsing the projects.
4899 * prj-err.adb (Error_Msg): Do nothing if there are incomplete withs.
4900 * prj-part.adb (Post_Parse_Context_Clause): Set Incomplete_Withs
4901 to True in the flags, when Ignore_Missing_With is True and an
4902 imported project cannot be found.
4903 * prj-proc.adb (Expression): When there are incomplete withs and
4904 a variable or attribute is not found, set the variable/attribute
4906 * prj.ads (Processing_Flags): New flag Incomplete_Withs,
4909 2015-01-06 Vasiliy Fofanov <fofanov@adacore.com>
4911 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-conf.adb,
4912 prj-err.adb: Add new switch --no-command-line.
4914 2015-01-06 Ed Schonberg <schonberg@adacore.com>
4916 * sem_ch12.adb: Sloc of wrapper is that of instantiation.
4918 2015-01-06 Robert Dewar <dewar@adacore.com>
4920 * sem_ch11.adb: Minor reformatting.
4922 2015-01-06 Ed Schonberg <schonberg@adacore.com>
4924 * exp_aggr.adb (Get_Assoc_Expr): New routine internal to
4925 Build_Array_Aggr_Code, used to initialized components covered
4926 by a box association. If the component type is scalar and has
4927 a default aspect, use it to initialize such components.
4929 2015-01-06 Pascal Obry <obry@adacore.com>
4931 * rtinit.c (__gnat_runtime_initialize): Add a parameter to
4932 control the setup of the exception handler.
4933 * initialize.c: Remove unused declaration.
4934 * bindgen.adb: Always call __gnat_runtime_initialize and pass
4935 whether the exeception handler must be set or not.
4937 2015-01-06 Thomas Quinot <quinot@adacore.com>
4939 * freeze.adb (Set_SSO_From_Defaults): When setting scalar storage
4940 order to native from default, make sure to also adjust bit order.
4941 * exp_aggr.adb: Minor reformatting.
4943 2015-01-06 Robert Dewar <dewar@adacore.com>
4945 * s-valllu.adb, s-valllu.ads, s-valuti.ads, s-valuns.adb, s-valuns.ads,
4946 s-valrea.adb, s-valrea.ads: Add some additional guards for
4947 Str'Last = Positive'Last.
4949 2015-01-06 Ed Schonberg <schonberg@adacore.com>
4951 * sem_ch12.adb, sem_ch8.adb: Ongoing work for wrappers for actual
4954 2015-01-06 Javier Miranda <miranda@adacore.com>
4956 * exp_disp.adb (Expand_Interface_Conversion): Reapply patch.
4958 2015-01-06 Thomas Quinot <quinot@adacore.com>
4960 * sem_util.ads: Minor reformatting.
4961 * sem_cat.adb (In_RCI_Visible_Declarations): Change back to...
4962 (In_RCI_Declaration) Return to old name, as proper checking of
4963 entity being in the visible part depends on entity kind and must
4964 be done by the caller.
4966 2015-01-06 Ed Schonberg <schonberg@adacore.com>
4968 * sem_ch12.adb, sem_ch12.ads, sem_ch8.adb: Ongoing work for wrappers
4969 for operators in SPARK.
4971 2015-01-06 Ed Schonberg <schonberg@adacore.com>
4973 * sem_aggr.adb (Get_Value): In ASIS mode, preanalyze the
4974 expression in an others association before making copies for
4975 separate resolution and accessibility checks. This ensures that
4976 the type of the expression is available to ASIS in all cases,
4977 in particular if the expression is itself an aggregate.
4979 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
4981 * einfo.ads (Has_Independent_Components): Document extended
4983 * einfo.adb (Has_Independent_Components): Remove obsolete assertion.
4984 (Set_Has_Independent_Components): Adjust assertion.
4985 * sem_prag.adb (Analyze_Pragma): Also set Has_Independent_Components
4986 for pragma Atomic_Components. Set Has_Independent_Components
4987 on the object instead of the type for an object declaration with
4988 pragma Independent_Components.
4990 2015-01-06 Olivier Hainque <hainque@adacore.com>
4992 * set_targ.adb (Read_Target_Dependent_Values): Set
4993 Long_Double_Index when "long double" is read.
4994 (elaboration code): Register_Back_End_Types only when not reading from
4995 config files. Doing otherwise is pointless and error prone.
4997 2015-01-06 Robert Dewar <dewar@adacore.com>
4999 * s-valrea.adb (Value_Real): Check for Str'Last = Positive'Last
5001 2015-01-06 Robert Dewar <dewar@adacore.com>
5003 * a-wtgeau.adb, a-ztgeau.adb, a-tigeau.adb (String_Skip): Raise PE if
5004 Str'Last = Positive'Last.
5006 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5008 * sem_ch6.adb (Matches_Limited_View): Handle properly the case
5009 where the non-limited type is a generic actual and appears as
5010 a subtype of the non-limited view of the other.
5011 * freeze.adb (Build_Renamed_Body): If the return type of the
5012 declaration that is being completed is a limited view and the
5013 non-limited view is available, use it in the specification of
5016 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5018 * sem_ch3.adb (Find_Type_Name): If there is a previous tagged
5019 incomplete view, the type of the classwide type common to both
5020 views is the type being declared.
5022 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
5024 * einfo.ads (Is_Independent): Further document extended usage.
5026 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
5028 * einfo.ads (Is_Independent): Document extended usage.
5029 * einfo.adb (Is_Independent): Remove obsolete assertion.
5030 (Set_Is_Independent): Likewise.
5031 * sem_prag.adb (Process_Atomic_Shared_Volatile): Rename into...
5032 (Process_Atomic_Independent_Shared_Volatile): ...this.
5033 Deal with pragma Independent here.
5034 (Analyze_Pragma): Adjust
5035 to above renaming and also invoke it for pragma Independent.
5036 Adjust comment for Independent_Components.
5038 2015-01-06 Robert Dewar <dewar@adacore.com>
5040 * snames.ads-tmpl: Remove entries for attribute Enum_Image.
5041 * exp_attr.adb: Remove reference to Attribute_Enum_Image.
5043 2015-01-06 Robert Dewar <dewar@adacore.com>
5045 * s-vallli.adb (Value_Long_Long_Integer): Handle case of Str'Last
5047 * s-valllu.adb (Value_Long_Long_Unsigned): Handle case of
5048 Str'Last = Positive'Last.
5050 2015-01-06 Robert Dewar <dewar@adacore.com>
5052 * sem_prag.adb (Process_Inline): Remove redundant construct
5053 warning (-gnatw.r) for an ineffective pragma Inline.
5055 2015-01-06 Robert Dewar <dewar@adacore.com>
5057 * s-valint.adb: Fix typo in last checkin.
5058 * s-valuns.adb (Value_Unsigned): More efficient fix for
5060 * sem_attr.adb (Analyze_Attribute): Minor reformatting
5061 (Eval_Attribute): Static ervaluation of 'Img for enumeration types.
5063 2015-01-06 Robert Dewar <dewar@adacore.com>
5065 * s-valint.adb, s-valuns.adb (Value_Integer): Deal with case where
5066 Str'Last = Positive'Last
5068 2015-01-06 Thomas Quinot <quinot@adacore.com>
5070 * xoscons.adb: Display exception information and return non-zero
5071 exit status in top level exception handler.
5073 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5075 * sem_ch8.adb: Code clean up.
5077 2015-01-06 Tristan Gingold <gingold@adacore.com>
5079 * targparm.ads: Remove obsolete comment.
5081 2015-01-06 Olivier Hainque <hainque@adacore.com>
5083 * gcc-interface/decl.c (gnat_to_gnu_entity, case E_Variable): When
5084 constructing a ref to variable, update inner_const_flag from the
5085 variable TREE_READONLY attribute.
5086 * gcc-interface/targtyps.c (WIDEST_HARDWARE_FP_SIZE): Remove default
5088 (get_target_float_size): Remove.
5089 (get_target_double_size): Remove.
5090 (get_target_long_double_size): Remove.
5092 2015-01-06 Pascal Obry <obry@adacore.com>
5094 * adaint.c (ProcListEvt): Set to NULL.
5095 * rtinit.c: New file.
5096 (__gnat_rt_init_count): New reference counter set to 0.
5097 (__gnat_runtime_initialize): Move code here from __gnat_initialize when
5098 this code is actually needed for the runtime initialization. This
5099 routine returns immediately if the initialization has already been done.
5100 * final.c: Revert previous change.
5101 * rtfinal.c: New file.
5102 (__gnat_runtime_finalize)[Win32]: Add finalization of the critical
5103 section and event. The default version of this routine is empty (except
5104 for the reference counting code). This routine returns immediately if
5105 some others libraries are referencing the runtime.
5106 * bindgen.adb (Gen_Adainit): Generate call to Runtime_Initialize
5107 remove circuitry to initialize the signal handler as this is
5108 now done by the runtime initialization routine.
5109 (Gen_Adafinal): Generate call to Runtime_Finalize.
5110 * gnat_ugn.texi: Update documentation about concurrency and
5111 initialization/finalization of the run-time.
5112 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Add
5113 references to rtfinal.o and rtinit.o
5115 2015-01-06 Robert Dewar <dewar@adacore.com>
5117 * exp_attr.adb (Expand_N_Attribute_Reference): Add dummy entry
5119 * sem_attr.adb: Implement Enum_Image attribute.
5120 * snames.ads-tmpl: Add entries for Enum_Image attribute.
5122 2015-01-06 Robert Dewar <dewar@adacore.com>
5124 * namet.ads: Document use of Boolean2 for No_Use_Of_Entity.
5125 * restrict.ads (No_Use_Of_Entity): New table.
5126 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
5127 Ignore No_Use_Of_Entity (will be processed in parser).
5128 * snames.ads-tmpl: Add entry for Name_No_Use_Of_Entity.
5130 2015-01-06 Vincent Celier <celier@adacore.com>
5132 * prj-tree.adb (Imported_Or_Extended_Project_Of): Do not try
5133 to check for an extended project, if a project does not have
5134 yet a project declaration.
5136 2015-01-06 Pierre-Marie Derodat <derodat@adacore.com>
5138 * scos.ads: Update documentation about the SCO table build
5139 process and about table records format.
5140 * par_sco.ads (SCO_Record): Rename to SCO_Record_Raw.
5141 (SCO_Record_Filtered): New procedure.
5142 (Set_SCO_Logical_Operator): New procedure.
5143 (dsco): Update documentation.
5144 * par_sco.adb: Update library-level comments.
5145 (SCO_Generation_State_Type): New type.
5146 (SCO_Generation_State): New variable.
5147 (SCO_Raw_Table): New package instanciation.
5148 (Condition_Pragma_Hash_Table): Rename to SCO_Raw_Hash_Table.
5150 (Tristate): New type.
5151 (Is_Logical_Operator): Return Tristate and update documentation.
5152 (Has_Decision): Update call to Is_Logical_Operator and complete
5154 (Set_Table_Entry): Rename to Set_Raw_Table_Entry, update
5155 comment, add an assertion for state checking and change
5156 references to SCO_Table into SCO_Raw_Table.
5157 (dsco): Refactor to dump the raw and the filtered tables.
5158 (Process_Decisions.Output_Decision_Operand): Handle putative
5159 short-circuit operators.
5160 (Process_Decisions.Output_Element): Update references
5161 to Set_Table_Entry and to Condition_Pragma_Hash_Table.
5162 (Process_Decisions.Process_Decision_Operand): Update call
5163 to Is_Logical_Operator.
5164 (Process_Decisions.Process_Node): Handle putative short-circuit
5165 operators and change references to
5166 SCO_Table into SCO_Raw_Table.
5167 (SCO_Output): Add an assertion
5168 for state checking and remove code that used to stamp out SCO entries.
5169 (SCO_Pragma_Disabled): Change reference to SCO_Table
5171 (SCO_Record): Rename to SCO_Record_Raw,
5172 add an assertion for state checking and change references
5173 to SCO_Table into SCO_Raw_Table.
5174 (Set_SCO_Condition): Add an assertion for state checking, update
5175 references to Condition_Pragma_Hash_Table and change references to
5176 SCO_Table into SCO_Raw_Table.
5177 (Set_SCO_Pragma_Enabled): Add an assertion for state checking and
5178 change references to SCO_Table into SCO_Raw_Table.
5179 (Set_SCO_Logical_Operator): New procedure.
5180 (Traverse_Declarations_Or_Statements.Set_Statement_Entry): Update
5181 references to Set_Table_Entry and to Condition_Pragma_Hash_Table.
5182 (SCO_Record_Fildered): New procedure.
5183 * gnat1drv.adb (Gnat1drv): Invoke the SCO filtering pass.
5184 * lib-writ.adb (Write_ALI): Invoke the SCO filtering pass and
5186 * par-load.adb (Load): Update reference to SCO_Record.
5187 * par.adb (Par): Update reference to SCO_Record.
5188 * put_scos.adb (Put_SCOs): Add an assertion to check that no
5189 putative SCO condition reaches this end.
5190 * sem_ch10.adb (Analyze_Proper_Body): Update reference to SCO_Record.
5191 * sem_res.adb (Resolve_Logical_Op): Validate putative SCOs
5192 when corresponding to an "and"/"or" operator affected by the
5193 Short_Circuit_And_Or pragma.
5195 2015-01-06 Robert Dewar <dewar@adacore.com>
5197 * sem_ch8.adb (Analyze_Use_Package): Give more specific error
5198 msg for attempted USE of generic subprogram or subprogram.
5200 2015-01-06 Robert Dewar <dewar@adacore.com>
5202 * s-valllu.adb, a-tiinau.adb, a-timoau.adb, a-ztinau.adb, a-ztmoau.adb,
5203 s-valuns.adb, s-valrea.adb, a-wtflau.adb, a-tiflau.adb, a-ztflau.adb,
5204 a-wtinau.adb, a-wtmoau.adb: Document recognition of : in place of #.
5206 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5208 * sem_ch13.adb (Analyze_Aspect_Specifications): For aspects
5209 that specify stream subprograms, if the prefix is a class-wide
5210 type then the generated attribute definition clause must apply
5211 to the same class-wide type.
5212 (Default_Iterator): An iterator defined by an aspect of some
5213 container type T must have a first parameter of type T, T'class,
5214 or an access to such (from code reading RM 5.5.1 (2/3)).
5216 2015-01-06 Arnaud Charlet <charlet@adacore.com>
5218 * gnat1drv.adb: Minor: complete previous change.
5220 2015-01-06 Olivier Hainque <hainque@adacore.com>
5222 * set_targ.ads (C_Type_For): New function. Return the name of
5223 a C type supported by the back-end and suitable as a basis to
5224 construct the standard Ada floating point type identified by
5225 the T parameter. This is used as a common ground to feed both
5226 ttypes values and the GNAT tree nodes for the standard floating
5228 * set_targ.adb (Long_Double_Index): The index at which "long
5229 double" gets registered in the FPT_Mode_Table. This is useful to
5230 know whether we have a "long double" available at all and get at
5231 it's characteristics without having to search the FPT_Mode_Table
5232 when we need to decide which C type should be used as the
5233 basis for Long_Long_Float in Ada.
5234 (Register_Float_Type): Fill Long_Double_Index.
5235 (FPT_Mode_Index_For): New function. Return the index in
5236 FPT_Mode_Table that designates the entry corresponding to the
5237 provided C type name.
5238 (FPT_Mode_Index_For): New function. Return the index in
5239 FPT_Mode_Table that designates the entry for a back-end type
5240 suitable as a basis to construct the standard Ada floating point
5241 type identified by the input T parameter.
5242 (elaboration code): Register_Back_End_Types unconditionally,
5243 so C_Type_For can operate regardless of -gnateT. Do it
5244 early so we can query it for the floating point sizes, via
5245 FPT_Mode_Index_For. Initialize Float_Size, Double_Size and
5246 Long_Double_Size from the FPT_Mode_Table, as cstand will do.
5247 * cstand.adb (Create_Float_Types): Use C_Type_For to determine
5248 which C type should be used as the basis for the construction
5249 of the Standard Ada floating point types.
5250 * get_targ.ads (Get_Float_Size, Get_Double_Size,
5251 Get_Long_Double_Size): Remove.
5252 * get_targ.adb: Likewise.
5254 2015-01-06 Thomas Quinot <quinot@adacore.com>
5256 * sem_cat.adb (In_RCI_Declaration): Remove unnecessary
5257 parameter and rename to...
5258 (In_RCI_Visible_Declarations): Fix handling of private part of nested
5260 (Validate_RCI_Subprogram_Declaration): Reject illegal function
5261 returning anonymous access in RCI unit.
5263 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5265 * sem_ch6.adb (New_Overloaded_Entity): In GNATprove mode, a
5266 function wrapper may be a homonym of another local declaration.
5267 * sem_ch8.adb (Analyze_Subprogram_Renaming): In GNATprove mode,
5268 build function and operator wrappers after the actual subprogram
5269 has been resolved, and replace the standard renaming declaration
5270 with the declaration of wrapper.
5271 * sem_ch12.ads (Build_Function_Wrapper, Build_Operator_Wraooer):
5272 make public for use elsewhere.
5273 * sem_ch12.adb (Build_Function_Wrapper, Build_Operator_Wraooer):
5274 rewrite, now that actual is fully resolved when wrapper is
5277 2015-01-06 Javier Miranda <miranda@adacore.com>
5279 * exp_disp.adb: Revert previous change.
5281 2015-01-06 Robert Dewar <dewar@adacore.com>
5283 * exp_util.adb: Change name Name_Table_Boolean to
5284 Name_Table_Boolean1.
5285 * namet.adb: Change name Name_Table_Boolean to Name_Table_Boolean1
5286 Introduce Name_Table_Boolean2/3.
5287 * namet.ads: Change name Name_Table_Boolean to Name_Table_Boolean1
5288 Introduce Name_Table_Boolean2/3.
5289 * par-ch13.adb: Change name Name_Table_Boolean to
5290 Name_Table_Boolean1.
5292 2015-01-06 Bob Duff <duff@adacore.com>
5294 * gnat_rm.texi: Improve documentation regarding No_Task_Termination.
5296 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5298 * sem_aggr.adb (Resolve_Record_Aggregte, Get_Value): For an
5299 others choice that covers multiple components, analyze each
5300 copy with the type of the component even in compile-only mode,
5301 to detect potential accessibility errors.
5303 2015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
5305 * sem_res.adb (Is_Assignment_Or_Object_Expression): New routine.
5306 (Resolve_Actuals): An effectively volatile out
5307 parameter cannot act as an in or in out actual in a call.
5308 (Resolve_Entity_Name): An effectively volatile out parameter
5311 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5313 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If the body is
5314 the expansion of an expression function it may be pre-analyzed
5315 if a 'access attribute is applied to the function, in which case
5316 last_entity may have been assigned already.
5318 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5320 * sem_ch4.adb (Analyze_One_Call): If formal has an incomplete
5321 type and actual has the corresponding full view, there is no
5322 error, but a case of use of incomplete type in a predicate or
5323 invariant expression.
5325 2015-01-06 Vincent Celier <celier@adacore.com>
5327 * makeutl.adb (Insert_No_Roots): Make sure that the same source
5328 in two different project tree is checked in both trees, if they
5329 are sources of two different projects, extended or not.
5331 2015-01-06 Arnaud Charlet <charlet@adacore.com>
5333 * gnat1drv.adb: Minor code clean up.
5334 (Adjust_Global_Switches): Ignore gnatprove_mode in codepeer_mode.
5336 2015-01-06 Bob Duff <duff@adacore.com>
5338 * osint.adb (Read_Source_File): Don't print out
5339 file name unless T = Source.
5341 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5343 * sem_util.adb (Is_Variable, Is_OK_Variable_For_Out_Formal):
5344 recognize improper uses of constant_reference types as actuals
5345 for in-out parameters.
5346 (Check_Function_Call): Do not collect identifiers if function
5347 name is missing because of previous error.
5349 2015-01-06 Robert Dewar <dewar@adacore.com>
5351 * ali-util.adb, sem_prag.adb, rtsfind.adb, sem_util.adb, sem_res.adb,
5352 ali.adb, binde.adb, namet.adb, namet.ads, gnatls.adb, bcheck.adb:
5353 Minor change of name Name_Table_Info => Name_Table_Int.
5355 2015-01-06 Robert Dewar <dewar@adacore.com>
5357 * exp_strm.adb (Build_Elementary_Input_Call): Clarify comments
5358 in previous checkin.
5359 * freeze.adb (Freeze_Fixed_Point_Type): Add warning for shaving
5361 * sem_prag.adb, sem_ch10.adb, sem_ch6.adb: Minor reformatting.
5363 2015-01-06 Vincent Celier <celier@adacore.com>
5365 * a-strsup.adb (Times (Natural;String;Positive)): Raise
5366 Length_Error, not Index_Error, when the result is too long.
5368 2015-01-06 Thomas Quinot <quinot@adacore.com>
5370 * a-direct.adb (Create_Path): Minor error handling and
5371 performance improvement.
5373 2015-01-06 Robert Dewar <dewar@adacore.com>
5375 * checks.ads, sem_ch12.adb: Minor reformatting.
5376 * exp_ch4.adb (Expand_N_Op_Divide): Generate explicit divide by
5377 zero check for fixed-point case if Backend_Divide_Checks_On_Target
5380 2015-01-06 Robert Dewar <dewar@adacore.com>
5382 * sem_prag.adb (Analyze_Pragma, case No_Elaboration_Code_All):
5383 Do not set restriction No_Elaboration_Code unless the pragma
5384 appears in the main unit).
5386 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5388 * sem_ch10.adb (Is_Regular_With_Clause): Add guard to verify
5389 that with clause has already been analyzed before checking kind
5392 2015-01-06 Robert Dewar <dewar@adacore.com>
5394 * exp_strm.adb (Build_Elementary_Input_Call): Return base type
5395 (as required by RM).
5397 2015-01-06 Arnaud Charlet <charlet@adacore.com>
5399 * a-reatim.adb ("/"): Add explicit pragma Unsuppress (Division_Check).
5401 2015-01-06 Robert Dewar <dewar@adacore.com>
5403 * sem_prag.adb (Process_Suppress_Unsuppress): Add extra warning
5404 for ignoring pragma Suppress (Elaboration_Check) in SPARK mode.
5406 2015-01-06 Javier Miranda <miranda@adacore.com>
5408 * exp_disp.adb (Expand_Interface_Conversion): No displacement
5409 of the pointer to the object needed when the type of the operand
5410 is not an interface type and the interface is one of its parent
5411 types (since they share the primary dispatch table).
5413 2015-01-06 Vincent Celier <celier@adacore.com>
5415 * prj-env.adb: Minor comment update.
5417 2015-01-06 Javier Miranda <miranda@adacore.com>
5419 * sem_res.adb (Valid_Conversion): Restrict the checks on anonymous
5420 access types whose target type is an interface type to operands
5421 that are access types; required to report an error when the
5422 operand is not an access type.
5424 2015-01-06 Bob Duff <duff@adacore.com>
5426 * a-cfinve.adb (Copy): Set the discriminant to the Length when
5428 * a-cofove.ads (Capacity): Add a postcondition.
5429 * a-cfinve.ads (Capacity): Add a postcondition.
5430 (Reserve_Capacity): Correct the postcondition in the case where
5431 Capacity = 0; that means "Capacity => Length (Container)".
5432 * a-cofove.adb (Elems[c]): Add a comment
5433 explaining the dangers and how to avoid them.
5435 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5437 * sem_ch12.adb: Code clean up.
5439 2015-01-06 Arnaud Charlet <charlet@adacore.com>
5441 * gnatvsn.ads: Bump copyright year.
5443 2015-01-06 Robert Dewar <dewar@adacore.com>
5445 * s-taskin.ads, s-traces.ads: Minor reformatting.
5446 * exp_util.adb: Minor typo fix.
5448 2015-01-06 Vincent Celier <celier@adacore.com>
5450 * gnatls.adb (Search_RTS): Invoke Initialize_Default_Project_Path
5451 with the runtime name.
5452 * prj-env.adb (Initialize_Default_Project_Path): When both
5453 Target_Name and Runtime_Name are not empty string, add to the
5454 project path the two directories .../lib/gnat and .../share/gpr
5455 related to the runtime.
5456 * prj-env.ads (Initialize_Default_Project_Path): New String
5457 parameter Runtime_Name, defaulted to the empty string.
5459 2015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
5461 * frontend.adb: Guard against the case where a configuration
5462 pragma may be split into multiple pragmas and the original
5463 rewritten as a null statement.
5464 * sem_prag.adb (Analyze_Pragma): Insert a brand new Check_Policy
5465 pragma using Insert_Before rather than Insert_Action. This
5466 takes care of the configuration pragma case where Insert_Action
5469 2015-01-06 Bob Duff <duff@adacore.com>
5471 * a-coboho.ads (Element_Access): Add "pragma
5472 No_Strict_Aliasing (Element_Access);". This is needed because
5473 we are unchecked-converting from Address to Element_Access.
5474 * a-cofove.ads, a-cofove.adb (Elems,Elemsc): Fix bounds of the
5477 2015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
5479 * sem_res.adb (Resolve_Actuals): Remove the
5480 restriction which prohibits volatile actual parameters with
5481 enabled external propery Async_Writers to act appear in procedure
5482 calls where the corresponding formal is of mode OUT.
5484 2015-01-05 Jakub Jelinek <jakub@redhat.com>
5486 * gnat_ugn.texi: Bump @copying's copyright year.
5488 2015-01-05 Eric Botcazou <ebotcazou@adacore.com>
5491 * gcc-interface/Makefile.in (../stamp-tools): Reinstate dropped code.
5493 2015-01-04 Uros Bizjak <ubizjak@gmail.com>
5495 * gcc-interface/misc.c (internal_error_function): Use xasprintf instead
5496 of unchecked asprintf.
5499 Copyright (C) 2015 Free Software Foundation, Inc.
5501 Copying and distribution of this file, with or without modification,
5502 are permitted in any medium without royalty provided the copyright
5503 notice and this notice are preserved.