1 2015-07-24 Micahel Darling <darlingm@gmail.com>
4 * prj-nmsc.adb: Reflects renaming of configure.in to configure.ac
5 * gcc-interface/Makefile.in: Likewise
7 2015-07-12 Aldy Hernandez <aldyh@redhat.com>
9 * gcc-interface/utils.c: Fix double word typos.
10 * gnat_ugn.texi: Same.
13 * projects.texi: Same.
21 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
23 * gcc-interface/cuintp.c: Adjust includes.
24 * gcc-interface/decl.c: Likewise.
25 * gcc-interface/misc.c: Likewise.
26 * gcc-interface/targtyps.c: Likewise.
27 * gcc-interface/trans.c: Likewise.
28 * gcc-interface/utils.c: Likewise.
29 * gcc-interface/utils2.c: Likewise.
31 2015-07-06 John Marino <gnugcc@marino.st>
33 * s-oscons-tmplt.c: Add support for DragonFly alongside FreeBSD.
35 2015-06-29 Eric Botcazou <ebotcazou@adacore.com>
38 * gcc-interface/utils.c (gnat_write_global_declarations): Always
39 build the dummy global variable if code was generated.
41 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
44 * gcc-interface/misc.c (gnat_post_options): No need to disable
45 warn_unused_parameter anymore.
47 2015-06-26 Eric Botcazou <ebotcazou@adacore.com>
49 * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): When
50 not optimizing the CFG, clear the DECL_DECLARED_INLINE_P flag on the
53 2015-06-26 Eric Botcazou <ebotcazou@adacore.com>
55 * gcc-interface/gigi.h (note_types_used_by_globals): Delete.
56 (gnat_write_global_declarations): New prototype.
57 * gcc-interface/utils.c (type_decls): Rename back to...
58 (global_decls): ...this.
59 (gnat_pushdecls): Revert previous change.
60 (create_var_decl): Do not output global variables.
61 (note_types_used_by_globals): Rename back to...
62 (gnat_write_global_declarations): ...this. Output variables on the
64 * gcc-interface/misc.c (gnat_parse_file): Adjust to above renaming.
66 2015-06-26 Eric Botcazou <ebotcazou@adacore.com>
68 * gcc-interface/gigi.h (create_var_decl_1): Rename into...
69 (create_var_decl): ...this. Add default value for last parameter.
70 (create_type_stub_decl): Adjust.
71 (create_type_decl): Likewise.
72 (create_field_decl): Likewise.
73 (create_param_decl): Likewise.
74 (create_label_decl): Likewise.
75 (create_subprog_decl): Likewise.
76 * gcc-interface/utils.c (create_var_decl_1): Rename into...
77 (create_var_decl): ...this. Rename var_name into name and var_init
78 into init, move const_decl_allowed_p last and adjust accordingly.
79 (create_type_stub_decl): Rename type_name into name and adjust.
80 (create_type_decl): Likewise.
81 (create_field_decl): Likewise for field_name and field_type.
82 (create_param_decl): Likewise for param_name and param_type.
83 (create_label_decl): Likewise for label_name.
84 (create_subprog_decl): Likewise for subprog_name and subprog_type.
85 * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust couple of calls
88 2015-06-26 Eric Botcazou <ebotcazou@adacore.com>
90 * gcc-interface/trans.c (loop_info_d): Add low_bound, high_bound,
91 artificial, has_checks and warned_aggressive_loop_optimizations.
92 (gigi): Set warn_aggressive_loop_optimizations to 0.
93 (inside_loop_p): New inline predicate.
94 (push_range_check_info): Rename into...
95 (find_loop_for): ...this and do not push range_check_info_d object.
96 (Loop_Statement_to_gnu): Set artificial, low_bound and high_bound
97 fields of gnu_loop_info. Adjust detection of checks enabled by
98 -funswitch-loops and adds one for -faggressive-loop-optimizations.
99 (gnat_to_gnu) <N_Indexed_Component>: If aggressive loop optimizations
100 are enabled, warn for loops overrunning an array of size 1 not at the
103 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
105 * gcc-interface/trans.c: Remove ipa-ref.h and plugin-api.h from include
107 * gcc-interface/utils.c: Likewise.
109 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
111 * gcc-interface/decl.c (value_annotation_hasher): Inherit from
112 ggc_cache_ptr_hash rather than ggc_cache_hasher.
113 * gcc-interface/utils.c (pad_type_hasher): Likewise.
115 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
117 * gcc-interface/decl.c (value_annotation_hasher::handle_cache_entry):
119 (value_annotation_hasher::keep_cache_entry): New function.
120 * gcc-interface/utils.c (pad_type_hasher::handle_cache_entry):
122 (pad_type_hasher::keep_cache_entry): New function.
124 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
126 * gcc-interface/misc.c: Include calls.h not function.h.
128 2015-06-19 Eric Botcazou <ebotcazou@adacore.com>
130 * gcc-interface/gigi.h (record_builtin_type): Adjust comment.
131 (tree create_type_decl): Likewise.
132 (create_var_decl_1): Add artificial_p and debug_info_p parameters.
133 (create_var_decl): Likewise.
134 (create_true_var_decl): Delete.
135 (create_subprog_decl): Add debug_info_p parameter.
136 * gcc-interface/decl.c (gnat_to_gnu_entity): Add artificial_p local
137 variable and use it throughout. Remove DECL_ARTIFICIAL settings.
138 <E_Variable>: Adjust calls to create_var_decl and create_var_decl_1.
139 Remove DECL_IGNORED_P settings.
140 <E_Enumeration_Type>: Likewise.
141 <E_Record_Type>: Likewise.
142 <E_Subprogram_Type>: Likewise. Remove artificial_flag local variable.
143 Adjust call to create_subprog_decl.
144 (get_minimal_subprog_decl): Likewise.
145 (elaborate_expression_1): Adjust call to create_var_decl.
146 * gcc-interface/trans.c (gigi): Adjust calls to create_var_decl and
147 create_subprog_decl. Remove DECL_ARTIFICIAL & DECL_IGNORED_P settings.
148 * gcc-interface/utils.c (maybe_pad_type): Likewise.
149 (record_builtin_type): Adjust comment.
150 (create_type_stub_decl): Remove obsolete comment.
151 (create_var_decl_1): Add artificial_p and debug_info_p parameters.
152 Set DECL_ARTIFICIAL and DECL_IGNORED_P accordingly.
153 (create_subprog_decl): Add debug_info_p parameter. Set DECL_IGNORED_P
156 2015-06-19 Eric Botcazou <ebotcazou@adacore.com>
158 * gcc-interface/misc.c (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): Define.
160 2015-06-19 Eric Botcazou <ebotcazou@adacore.com>
162 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Make sure
163 the size of a padding type built around the return type is positive.
164 * gcc-interface/trans.c (gnat_to_gnu) <N_Simple_Return_Statement>:
165 Use INIT_EXPR instead of MODIFY_EXPR to assign to the return object.
167 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
169 * gcc-interface/cuintp.c: Do not include input.h, line-map.h or is-a.h.
170 * gcc-interface/decl.c: Likewise.
171 * gcc-interface/misc.c: Likewise.
172 * gcc-interface/targtyps.c: Likewise.
173 * gcc-interface/trans.c: Likewise.
174 * gcc-interface/utils.c: Likewise.
175 * gcc-interface/utils2.c: Likewise.
177 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
179 * gcc-interface/utils.c (get_global_context): Register the main
180 translation unit through the new debug hook.
182 2015-06-09 Eric Botcazou <ebotcazou@adacore.com>
184 * gcc-interface/misc.c: Remove duplicate include directives.
185 * gcc-interface/trans.c: Likewise.
186 * gcc-interface/utils.c: Likewise.
188 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
190 * gcc-interface/cuintp.c : Adjust include files.
191 * gcc-interface/decl.c : Likewise.
192 * gcc-interface/misc.c : Likewise.
193 * gcc-interface/targtyps.c : Likewise.
194 * gcc-interface/trans.c : Likewise.
195 * gcc-interface/utils.c : Likewise.
196 * gcc-interface/utils2.c : Likewise.
198 2015-06-08 John Marino <gnugcc@marino.st>
200 * a-intnam-dragonfly.ads: New.
201 * s-osinte-dragonfly.adb: Likewise.
202 * s-osinte-dragonfly.ads: Likewise.
203 * system-dragonfly-x86_64.ads: Likewise.
204 * adaint.c: Add BSD macros.
205 * cstreams.c: Likewise.
206 * gsocket.h: Likewise.
208 * socket.c: Likewise.
209 * env.c: Add __DragonFly__, remove __FreeBSD__ macro.
210 * init.c: Add __DragonFly__, change __gnat_install_handler
211 prototype from empty to void.
212 * initialize.c: Add __DragonFly__.
213 * sysdep.c: Likewise.
214 * s-osinte-freebsd.adb: Use __get_errno instead of __error.
215 * tracebak.c: Set unwinder for i386 BSD.
216 * gcc-interface/Makefile.in: Add x86_64 DragonFly, tweak
217 x86_64 FreeBSD and x86 FreeBSD.
219 2015-06-06 Eric Botcazou <ebotcazou@adacore.com>
221 * gcc-interface/utils.c (note_types_used_by_globals): Tweak comment.
222 * gcc-interface/decl.c (gnat_to_gnu_entity): Likewise.
224 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
226 * gcc-interface/gigi.h (note_types_used_by_globals): Rename from
227 gnat_write_global_declarations.
228 * gcc-interface/misc.c (gnat_parse_file): Call
229 note_types_used_by_globals.
230 Remove LANG_HOOKS_WRITE_GLOBALS.
231 * gcc-interface/utils.c: Rename global_decls to type_decls.
232 (gnat_write_global_declarations): Rename
233 to note_types_used_by_globals.
234 Remove call to finalize_compilation_unit.
235 Remove call to debug_hooks->global_decl for globals.
236 (gnat_pushdecls): Only insert into type_decls if TYPE_DECL.
238 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
240 * gcc-interface/cuintp.c: Adjust includes for restructured coretypes.h.
241 * gcc-interface/decl.c: Likewise.
242 * gcc-interface/misc.c: Likewise.
243 * gcc-interface/targtyps.c: Likewise.
244 * gcc-interface/trans.c: Likewise.
245 * gcc-interface/utils.c: Likewise.
246 * gcc-interface/utils2.c: Likewise.
248 2015-06-04 Pierre-Marie de Rodat <derodat@adacore.com>
250 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: If
251 processing a definition, create definitions for padding types
254 2015-06-03 Eric Botcazou <ebotcazou@adacore.com>
256 * gcc-interface/utils.c (copy_type): Also set TYPE_CANONICAL.
258 2015-06-03 Eric Botcazou <ebotcazou@adacore.com>
260 * gcc-interface/trans.c (gnat_to_gnu) <N_Simple_Return_Statement>: Fix
261 typo in latest change.
263 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
265 * gcc-interface/Makefile.in: Fix ARM/Darwin configuration.
267 2015-06-01 Pierre-Marie de Rodat <derodat@adacore.com>
269 * gcc-interface/utils.c (scale_by_factor_of): When handling a function
270 call expression, process the corresponding function body. Also handle
273 2015-06-01 Pierre-Marie de Rodat <derodat@adacore.com>
275 * gcc-interface/decl.c (gnat_to_gnu_entity): Replace pointer types with
276 references ones for functions that return references.
278 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
280 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: For a
281 definition of a type coming from a limited_with, get to the full view
282 if it is not in the main code unit.
284 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
286 * gcc-interface/utils.c (create_var_decl_1): If an assembler name is
287 specified, let the target mangle it before settting.
288 (create_subprog_decl): Likewise and move this treatment last.
290 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
292 * gcc-interface/lang-specs.h (TARGET_VXWORKS_RTP): Move substitution to
293 before first -gnatez switch. Simplify and add trailing space.
295 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
297 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: If the
298 record has a parent field and a representation clause, make sure that
299 it is properly aligned.
301 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
303 * gcc-interface/trans.c (lvalue_required_p) <N_Indexed_Component>: Deal
304 with character and enumeration literals as index values.
306 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
308 * gcc-interface/gigi.h (build_simple_component_ref): Declare.
309 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Deal with
310 address clause on aliased object with unconstrained nominal subtype.
311 Mark the aligning variable as artificial, do not convert the address
312 expression immediately but mark it as constant instead.
313 * gcc-interface/utils.c (convert): If the target type contains a
314 template, be prepared for an empty array.
315 (maybe_unconstrained_array): Likewise.
316 * gcc-interface/utils2.c (known_alignment) <POINTER_PLUS_EXPR>: Deal
317 with the pattern built for aligning types.
318 <INTEGER_CST>: Do not cap the value at BIGGEST_ALIGNMENT.
319 (build_simple_component_ref): Make public.
320 If the base object is a constructor that contains a template, fold the
321 result field by field.
323 2015-05-31 Eric Botcazou <ebotcazou@adacore.com>
325 * s-oscons-tmplt.c: Add explicit tests for Android alongside Linux.
327 2015-05-30 Eric Botcazou <ebotcazou@adacore.com>
329 * adaint.c: Test for __linux__ instead of linux and __sun__ instead
330 of sun. Add missing leading underscore to AIX. Remove #elif 0.
331 * adaint.h: Likewise.
333 * cstreams.c: Likewise.
335 * gsocket.h: Likewise.
336 * init.c: Likewise. Test for __i386__ instead of i386.
338 * s-oscons-tmplt.c: Likewise.
339 * sysdep.c: Likewise.
340 * terminals.c: Likewise. Use BSD symbol instead of FREEBSD.
341 * tracebak.c: Likewise. Test for __sparc__ instead of sparc.
343 2015-05-28 Eric Botcazou <ebotcazou@adacore.com>
345 * gcc-interface/utils.c (max_size) <tcc_binary>: Add special code to
346 deal with the subtraction of a "negative" value in an unsigned type.
348 2015-05-28 Eric Botcazou <ebotcazou@adacore.com>
350 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Do
351 not error out on a return type which has a size that overflows if the
352 return is done by invisible reference.
354 2015-05-28 Eric Botcazou <ebotcazou@adacore.com>
356 * gcc-interface/utils.c (gnat_pushdecl): Reunify the handling of array
357 and pointer types wrt DECL_ORIGINAL_TYPE and adjust left and right.
359 2015-05-28 Eric Botcazou <ebotcazou@adacore.com>
361 * gcc-interface/gigi.h (gnat_stabilize_reference): Adjust.
362 (rewrite_fn): Remove third parameter.
363 (type_is_padding_self_referential): New inline predicate.
364 (return_type_with_variable_size_p): Likewise.
365 * gcc-interface/decl.c (allocatable_size_p): More around.
366 (cannot_be_superflat_p): Rename into...
367 (cannot_be_superflat ): ...this.
368 (initial_value_needs_conversion): New predicate.
369 (gnat_to_gnu_entity): Invoke type_is_padding_self_referential,
370 initial_value_needs_conversion and adjust to above renaming.
371 For a renaming, force the materialization if the inner expression
372 is compound. Adjust calls to elaborate_reference and build a
373 compound expression if needed.
374 (struct er_dat): Add N field.
375 (elaborate_reference_1): Remove N parameter and adjust.
376 (elaborate_reference): Add INIT parameter and pass it in the call to
377 gnat_rewrite_reference. Adjust initial expression.
378 * gcc-interface/trans.c (Call_to_gnu): Treat renamings the same way as
379 regular object declarations when it comes to creating a temporary.
380 Adjust call to gnat_stabilize_reference and build a compound expression
381 if needed. Invoke return_type_with_variable_size_p.
382 (gnat_to_gnu): Invoke type_is_padding_self_referential. In case #4,
383 return a call to a function unmodified if it returns with variable size
384 and is also the initial expression in an object declaration.
385 * gcc-interface/utils2.c (build_binary_op) <INIT_EXPR>: Use the RHS'
386 type if it is a call to a function that returns with variable size.
387 (build_unary_op): Invoke type_is_padding_self_referential.
388 (gnat_stabilize_reference_1): Remove N parameter and adjust.
389 (gnat_stabilize_reference): Add INIT parameter and pass it in the call
390 to gnat_rewrite_reference.
391 (gnat_rewrite_reference): Remove N, add INIT parameter and adjust.
392 <COMPOUND_EXPR>: New case.
394 2015-05-28 Ed Schonberg <schonberg@adacore.com>
396 * sem_ch3.adb (Is_Visible_Component): Component is visible
397 in a derived type if inherited through an ancestor that has a
398 partial view of the original type holding the component, if the
399 full view of that original type is in scope.
400 * sem_util.ads (Get_Body_From_Stub): Works for all kinds of stubs.
402 2015-05-28 Bob Duff <duff@adacore.com>
404 * sem_util.adb (Requires_Transient_Scope): For definite untagged
405 subtypes, we should never have to use the secondary stack. This moves
406 toward that goal. But there are still cases that don't work.
407 Here, we move the check for Is_Definite first, but add a
408 special-purpose check for Has_Discrim_Dep_Array.
410 2015-05-28 Bob Duff <duff@adacore.com>
412 * sem_util.adb (Requires_Transient_Scope): Avoid returning
413 function results on the secondary stack in so many cases.
415 2015-05-28 Ed Schonberg <schonberg@adacore.com>
417 * sem_util.adb (Wrong_Type): In any instance, do not emit error
418 if type of expression is the partial view of the expected type.
420 2015-05-28 Ed Schonberg <schonberg@adacore.com>
422 * sem_res.adb (Resolve_Actuals): a) The replacement of formal
423 names in named associations only needs to be done within an
424 instance, on a call to a primitive of a formal derived type,
425 where the actual subprogram may have different formal names than
426 those of the primitive operation of the formal type.
427 b) Defaulted parameters must be taken into account when obtaining
428 the names of the formals of the actual subprogram being called.
430 2015-05-28 Robert Dewar <dewar@adacore.com>
432 * sem_ch13.adb, sem_disp.ads: Minor reformatting.
434 2015-05-28 Ed Schonberg <schonberg@adacore.com>
436 * sem_util.adb (Set_Debug_Info_Needed): For a private type
437 whose full view is itself a derived private type, set flag on
438 underlying full view as well, for proper gdb display.
440 2015-05-28 Bob Duff <duff@adacore.com>
442 * exp_tss.ads: Minor comment fix.
443 * exp_ch3.adb (Build_Array_Init_Proc, Build_Record_Init_Proc):
444 Inline init_procs when the type has controlled parts. Remove
445 obsolete comments about those init_procs -- init_procs for
446 such types are no longer complex. A typical init_proc just
447 initializes the 'Tag field, and calls the parent init_proc
448 (e.g. for Limited_Controlled), which calls the grandparent
449 (for Root_Controlled), which does nothing. This all boils down
450 to one instruction when inlined.
451 * exp_ch7.adb (Create_Finalizer): Inline the finalizer.
453 2015-05-28 Ed Schonberg <schonberg@adacore.com>
455 * sem_ch4.adb (Analyze_Selected_Component): If the type to use
456 is a derived type and is a generic actual, the selected component
457 appears within an instance body, and the check over the type
458 has failed, examine ancestor types for the desired component.
459 (Find_Component_In_Instance): If record type is a derived type,
460 examine all ancestors in order to locate desired component.
462 2015-05-27 H.J. Lu <hongjiu.lu@intel.com>
464 * gcc-interface/Makefile.in (TOOLS_LIBS): Add @NO_PIE_FLAG@.
466 2015-05-27 Eric Botcazou <ebotcazou@adacore.com>
468 * gcc-interface/trans.c (elaborate_all_entities): Do not elaborate an
469 incomplete type coming from a limited_with and whose non-limited view
470 comes from the main unit.
472 2015-05-27 Eric Botcazou <ebotcazou@adacore.com>
474 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Move down
475 code applying atomic checks to the object.
477 2015-05-27 Robert Dewar <dewar@adacore.com>
479 * sem_aux.adb: Minor rewording.
481 2015-05-27 Bob Duff <duff@adacore.com>
483 * exp_prag.adb (Expand_Pragma_Abort_Defer): Make
484 pragma Abort_Defer do nothing if Abort_Allowed is False.
486 2015-05-27 Arnaud Charlet <charlet@adacore.com>
488 * exp_ch9.adb, sem_util.adb, sem_util.ads, s-stposu.adb, s-spsufi.ads,
489 sem_elab.ads, g-comlin.ads, errout.ads, exp_ch6.adb, sem_ch4.adb,
490 opt.ads, s-bignum.adb, output.ads, sem_ch13.adb, erroutc.ads,
491 sem_disp.ads, exp_ch3.adb: Minor fixes of duplicate words in comments.
493 2015-05-27 Doug Rupp <rupp@adacore.com>
495 * adaint.c (__gnat_tmp_name) [vxworks]: Robustify and use for rtp as
498 2015-05-27 Pierre-Marie de Rodat <derodat@adacore.com>
500 * par_sco.adb (Process_Decision): Store sloc to
501 condition/pragmas SCOs associations into a temporary table before
502 moving them to the SCO_Raw_Hash_Table so that we can back them
503 out just like we do for SCO entries that are simple decisions
504 in an expression context.
506 2015-05-27 Ed Schonberg <schonberg@adacore.com>
508 * sem_ch6.adb (Process_Formals): A non-private formal type that
509 is a limited view does not have a list of private dependents.
511 2015-05-27 Ed Schonberg <schonberg@adacore.com>
513 * exp_ch5.adb (Expand_N_Case_Statement): If the expression in
514 the case statement is a compile-time known value, we look for a
515 corresponding alternative to optimize the case statement into a
516 single case. If the type has a static predicate and the expression
517 does not satisfy the predicate, there is no legal alternative and
518 this optimization is not applicable. Excecution is erroneous,
519 or else if assertions are enabled, an exception will be raised
520 earlier, at the point the expression is elaborated.
522 2015-05-27 Robert Dewar <dewar@adacore.com>
524 * sem_elab.adb (Check_Internal_Call_Continue): Suppress
525 warning on Finalize, Adjust, or Initialize if type involved has
528 2015-05-27 Ed Schonberg <schonberg@adacore.com>
530 * sem_aux.adb, sem_aux.ads (First_Discriminant): Return empty when
531 applied to a type with no known discriminants.
533 2015-05-26 Robert Dewar <dewar@adacore.com>
535 * errout.ads, sem_ch4.adb, sem_ch6.adb: Minor reformatting.
537 2015-05-26 Bob Duff <duff@adacore.com>
539 * sem_elab.adb (Check_A_Call): In the case where we're
540 calling something in an instance of a generic package that is
541 within this same unit (as the call), make sure we treat it
542 as a call to an entity within the same unit. That is, call
543 Check_Internal_Call, rather than putting "Elaborate_All(X)"
544 on X, which would necessarily result in an elaboration cycle in
545 static-elaboration mode.
547 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
549 * freeze.ads (Is_Atomic_VFA_Aggregate): Adjust profile.
550 * freeze.adb (Is_Atomic_VFA_Aggregate): Change Entity
551 parameter into Node parameter and remove Type parameter.
552 Look at Is_Atomic_Or_VFA both on the type and on the object.
553 (Freeze_Entity): Adjust call to Is_Atomic_VFA_Aggregate.
554 * exp_aggr.adb (Expand_Record_Aggregate): Likewise.
555 (Process_Atomic_Independent_Shared_Volatile): Remove code
556 propagating Atomic or VFA from object to locally-defined type.
558 2015-05-26 Bob Duff <duff@adacore.com>
560 * exp_ch7.adb: Minor comment fix.
562 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
564 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Min/Attr_Max>: Do not
565 bother about NaN's if Machine_Overflows is true.
567 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
569 * gcc-interface/trans.c (gnat_to_gnu) <N_Object_Declaration>: Really
570 force evaluation of the expression, if any, when the object has its
571 elaboration delayed. Do not create a variable at global level.
573 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
575 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Machine>: Do not apply
576 extra-precision trick to literals. Build SAVE_EXPR manually.
578 * gcc-interface/misc.c (enumerate_modes): Add bypass for x86/x86-64.
580 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
582 * gcc-interface/ada-tree.h (DECL_GLOBAL_NONCONSTANT_RENAMING_P): Delete
583 (DECL_RENAMED_OBJECT): Adjust comment.
584 * gcc-interface/gigi.h (record_global_nonconstant_renaming): Delete.
585 (invalidate_global_nonconstant_renamings): Likewise.
586 (gnat_constant_reference_p): Likewise.
587 (rewrite_fn): New function type.
588 (gnat_rewrite_reference): Declare.
589 (call_is_atomic_load): New inline predicate.
590 * gcc-interface/decl.c (elaborate_reference_1): New function.
591 (elaborate_reference): Likewise.
592 (gnat_to_gnu_entity): Call elaborate_reference to elaborate renamings
593 and simplify associated code. Set const_flag to true consistently in
594 conjunction with used_by_ref.
595 * gcc-interface/trans.c (Identifier_to_gnu): Always replace renaming
596 pointers by renamed objects.
597 (outer_atomic_access_required_p): Deal with renamings.
598 (Compilation_Unit_to_gnu): Do not call
599 invalidate_global_nonconstant_renamings.
600 (gnat_to_gnu) <N_Object_Renaming_Declaration>: Adjust comment.
601 (gnat_gimplify_expr): Deal with atomic loads.
602 * gcc-interface/utils.c (global_nonconstant_renamings): Delete.
603 (destroy_gnat_utils): Do not call
604 invalidate_global_nonconstant_renamings.
605 (record_global_nonconstant_renaming): Delete.
606 (invalidate_global_nonconstant_renamings): Likewise.
607 * gcc-interface/utils2.c (call_is_atomic_load): Move to gigi.h.
608 (build_load_modify_store): Build a copy of the destination.
609 (gnat_stabilize_reference_1): Adjust.
610 (gnat_stabilize_reference): Call gnat_stabilize_reference_1 through
611 gnat_rewrite_reference and move bulk of code to...
612 (gnat_rewrite_reference): ...here. New global function.
613 (gnat_constant_reference_p): Delete.
615 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
617 * gcc-interface/gigi.h (gnat_stabilize_reference): Adjust prototype.
618 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not rely on const_flag
619 to detect constant renamings. Be prepared for specific pattern of
620 renamed object based on function calls. Create a constant object
621 for the renaming of a NULL_EXPR or of a CONSTRUCTOR. Adjust calls
622 to gnat_stabilize_reference and tidy up. Remove redundant tests.
623 (elaborate_expression_1): Remove obsolete test and tidy up.
624 * gcc-interface/trans.c (Call_to_gnu): Do not stabilize In/Out or Out
625 parameters passed by reference.
626 (gnat_to_gnu) <N_Selected_Component>: Remove redundant protection again
628 Use gnat_protect_expr instead of gnat_stabilize_reference for general
629 protection against side-effects.
630 * gcc-interface/utils2.c (gnat_stable_expr_p): New predicate.
631 (gnat_save_expr): Invoke it.
632 (gnat_protect_expr): Likewise.
633 (gnat_stabilize_reference_1): Likewise. Remove useless propagation
635 (gnat_stabilize_reference): Remove parameter and adjust throughout.
636 Delete ADDR_EXDR, COMPOUND_EXPR and CONSTRUCTOR cases.
637 Restrict CALL_EXPR case to atomic loads and tweak ERROR_MARK case.
639 2015-05-26 Ed Schonberg <schonberg@adacore.com>
641 * sinfo.ads: Minor reformatting.
642 * sem_aux.ads: Clarify use of First_Discriminant.
643 * sem_ch4.adb (Analyze_Explicit_Dereference): The use of a limited
644 view is replaced with the non-limited view in an instance body,
645 where the enclosing unit must have a regular with_clause on the
647 * sem_ch12.adb (Install_Body): Freeze instantation after its
648 body. Remove useless freeze nodes for incomplete actuals to
649 prevent multiple generation of internal operations.
650 (Instantiate_Package_Body): Set sloc of body appropriately when
651 there are incomplete actuals and the instance body is placed in
652 the body of the enclosing unit.
653 * errout.ads: Consistent punctuation, better alignment and trivial
655 * err_vars.ads: Fix typo.
657 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
659 * sem_ch8.adb (Analyze_Object_Renaming): Lift restriction on
660 components of Volatile_Full_Access objects.
662 2015-05-26 Ed Schonberg <schonberg@adacore.com>
664 * sem_ch6.adb (Is_Non_Overriding_Operation,
665 Get_Generic_Parent_Type): Handle properly the case of a derived
666 scalar type by using the first subtype rather than its generated
669 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
671 * einfo.adb (Write_Field17_Name): Move E_Incomplete_Subtype
673 (Write_Field19_Name): ...here.
675 2015-05-26 Ed Schonberg <schonberg@adacore.com>
677 * sem_ch13.adb: sem_ch13.adb (Add_Predicates): Undo analysis
678 of original expression in ASIS mode: does not solve the ASIS
679 problem of a usable type information, and crashes the back-end
680 when performing type annotations.
682 2015-05-26 Robert Dewar <dewar@adacore.com>
684 * sem_disp.adb (Inherited_Subprograms): Add One_Only parameter.
685 (Is_Overriding_Subprogram): Use One_Only_Parameter.
686 * sem_disp.ads (Inherited_Subprograms): Add One_Only parameter.
688 2015-05-26 Robert Dewar <dewar@adacore.com>
690 * exp_prag.adb, sem_ch3.adb, sem_ch5.adb, exp_ch11.adb, ghost.adb,
691 exp_ch6.adb, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb, sem_ch13.adb,
692 exp_ch3.adb: Minor reformatting.
694 2015-05-26 Bob Duff <duff@adacore.com>
696 * treepr.adb: Minor improvement to debugging routines (pp, pn)
697 robustness. Rearrange the code so passing a nonexistent Node_Id
698 prints "No such node" rather than crashing, and causing gdb to
699 generate confusing messages.
701 2015-05-26 Gary Dismukes <dismukes@adacore.com>
703 * sem_util.adb: Minor typo fix.
705 2015-05-26 Yannick Moy <moy@adacore.com>
707 * sem_aux.adb (Subprogram_Body_Entity): Deal with subprogram stubs.
709 2015-05-26 Hristian Kirtchev <kirtchev@adacore.com>
711 * exp_ch3.adb (Expand_N_Full_Type_Declaration): Capture, set and
712 restore the Ghost mode.
713 (Expand_N_Object_Declaration): Capture, set and restore the Ghost mode.
714 (Freeze_Type): Update the call to Set_Ghost_Mode.
715 (Restore_Globals): New routine.
716 * exp_ch5.adb Add with and use clauses for Ghost.
717 (Expand_N_Assignment_Statement): Capture, set and restore the
719 (Restore_Globals): New routine.
720 * exp_ch6.adb Add with and use clauses for Ghost.
721 (Expand_N_Procedure_Call_Statement): Capture, set and
722 restore the Ghost mode.
723 (Expand_N_Subprogram_Body):
724 Code cleanup. Capture, set and restore the Ghost mode.
725 (Expand_N_Subprogram_Declaration): Capture, set and restore the
727 (Restore_Globals): New routine.
728 * exp_ch7.adb Add with and use clauses for Ghost.
729 (Expand_N_Package_Body): Capture, set and restore the Ghost mode.
730 (Expand_N_Package_Declaration): Capture, set and restore the
732 (Wrap_HSS_In_Block): Create a proper identifier for the block.
733 * exp_ch8.adb Add with and use clauses for Ghost.
734 (Expand_N_Exception_Renaming_Declaration): Code
735 cleanup. Capture, set and restore the Ghost mode.
736 (Expand_N_Object_Renaming_Declaration): Capture, set and restore
738 (Expand_N_Package_Renaming_Declaration): Capture, set and restore the
740 (Expand_N_Subprogram_Renaming_Declaration): Capture, set and
741 restore the Ghost mode.
742 * exp_ch11.adb (Expand_N_Exception_Declaration): Code
743 cleanup. Capture, set and restore the Ghost mode.
744 * exp_disp.adb (Make_DT): Update the call to Set_Ghost_Mode. Do
745 not initialize the dispatch table slot of a Ghost subprogram.
746 * exp_prag.adb Add with and use clauses for Ghost.
747 (Expand_Pragma_Check): Capture, set and restore the Ghost mode.
748 (Expand_Pragma_Contract_Cases): Capture, set and restore the
750 (Expand_Pragma_Initial_Condition): Capture, set and
751 restore the Ghost mode.
752 (Expand_Pragma_Loop_Variant): Capture,
753 set and restore the Ghost mode.
754 (Restore_Globals): New routine.
755 * exp_util.adb Add with and use clauses for Ghost.
756 (Make_Predicate_Call): Code cleanup. Capture, set and restore
758 (Restore_Globals): New routine.
759 * freeze.adb (Freeze_Entity): Code cleanup. Update the call
761 * ghost.adb Add with and use clause for Sem_Prag.
762 (Check_Ghost_Completion): Code cleanup.
763 (Check_Ghost_Overriding): New routine.
764 (Check_Ghost_Policy): Code cleanup.
765 (Ghost_Entity): New routine.
766 (Is_Ghost_Declaration): Removed.
767 (Is_Ghost_Statement_Or_Pragma): Removed.
768 (Is_OK_Context): Reimplemented.
769 (Is_OK_Declaration): New routine.
770 (Is_OK_Pragma): New routine.
771 (Is_OK_Statement): New routine.
772 (Mark_Full_View_As_Ghost): New routine.
773 (Mark_Pragma_As_Ghost): New routine.
774 (Mark_Renaming_As_Ghost): New routine.
775 (Propagate_Ignored_Ghost_Code): Update the comment on usage.
776 (Set_From_Entity): New routine.
777 (Set_From_Policy): New routine.
778 (Set_Ghost_Mode): This routine now handles pragmas and freeze nodes.
779 (Set_Ghost_Mode_For_Freeze): Removed.
780 (Set_Ghost_Mode_From_Entity): New routine.
781 (Set_Ghost_Mode_From_Policy): Removed.
782 * ghost.ads (Check_Ghost_Overriding): New routine.
783 (Mark_Full_View_As_Ghost): New routine.
784 (Mark_Pragma_As_Ghost): New routine.
785 (Mark_Renaming_As_Ghost): New routine.
786 (Set_Ghost_Mode): Update the parameter profile. Update the
788 (Set_Ghost_Mode_For_Freeze): Removed.
789 (Set_Ghost_Mode_From_Entity): New routine.
790 * sem_ch3.adb (Analyze_Full_Type_Declaration):
791 Capture and restore the Ghost mode. Mark a type
792 as Ghost regardless of whether it comes from source.
793 (Analyze_Incomplete_Type_Decl): Capture, set and restore the
795 (Analyze_Number_Declaration): Capture and restore the Ghost mode.
796 (Analyze_Object_Declaration): Capture and restore the Ghost mode.
797 (Analyze_Private_Extension_Declaration): Capture and
798 restore the Ghost mode.
799 (Analyze_Subtype_Declaration): Capture and restore the Ghost mode.
800 (Process_Full_View): The full view inherits all Ghost-related
801 attributes from the private view.
802 (Restore_Globals): New routine.
803 * sem_ch5.adb (Analyze_Assignment): Capture and restore the
805 (Restore_Globals): New routine.
806 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration):
807 Code cleanup. Capture and restore the Ghost mode. Mark a
808 subprogram as Ghost regarless of whether it comes from source.
809 (Analyze_Procedure_Call): Capture and restore the Ghost mode.
810 (Analyze_Subprogram_Body_Helper): Capture and restore the Ghost mode.
811 (Analyze_Subprogram_Declaration): Capture and restore the Ghost mode.
812 (New_Overloaded_Entity): Ensure that a
813 parent subprogram and an overriding subprogram have compatible
815 * sem_ch7.adb (Analyze_Package_Body_Helper): Capture and restore
817 (Analyze_Package_Declaration): Capture and
818 restore the Ghost mode. Mark a package as Ghost when it is
819 declared in a Ghost region.
820 (Analyze_Private_Type_Declaration): Capture and restore the Ghost mode.
821 (Restore_Globals): New routine.
822 * sem_ch8.adb (Analyze_Exception_Renaming): Code
823 reformatting. Capture and restore the Ghost mode. A renaming
824 becomes Ghost when its name references a Ghost entity.
825 (Analyze_Generic_Renaming): Capture and restore the Ghost mode. A
826 renaming becomes Ghost when its name references a Ghost entity.
827 (Analyze_Object_Renaming): Capture and restore the Ghost mode. A
828 renaming becomes Ghost when its name references a Ghost entity.
829 (Analyze_Package_Renaming): Capture and restore the Ghost mode. A
830 renaming becomes Ghost when its name references a Ghost entity.
831 (Analyze_Subprogram_Renaming): Capture and restore the Ghost
832 mode. A renaming becomes Ghost when its name references a
834 * sem_ch11.adb (Analyze_Exception_Declaration): Capture, set
835 and restore the Ghost mode.
836 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Capture and
837 restore the Ghost mode.
838 (Analyze_Generic_Subprogram_Declaration):
839 Capture and restore the Ghost mode.
840 * sem_ch13.adb Add with and use clauses for Ghost.
841 (Add_Invariant): New routine.
842 (Add_Invariants): Factor out code.
843 (Add_Predicate): New routine.
844 (Add_Predicates): Factor out code.
845 (Build_Invariant_Procedure_Declaration): Code cleanup. Capture,
846 set and restore the Ghost mode.
847 (Build_Invariant_Procedure): Code cleanup.
848 (Build_Predicate_Functions): Capture, set and
849 restore the Ghost mode. Mark the generated functions as Ghost.
850 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
851 Capture, set and restore the Ghost mode.
852 (Analyze_External_Property_In_Decl_Part): Capture, set and restore
854 (Analyze_Initial_Condition_In_Decl_Part):
855 Capture, set and restore the Ghost mode.
857 Code cleanup. Capture, set and restore the Ghost mode. Flag
858 pragmas Linker_Section, No_Return, Unmodified, Unreferenced and
859 Unreferenced_Objects as illegal when it applies to both Ghost
860 and living arguments. Pragma Ghost cannot apply to synchronized
862 (Check_Kind): Moved to the spec of Sem_Prag.
863 (Process_Inline): Flag the pragma as illegal when it applies to
864 both Ghost and living arguments.
865 (Restore_Globals): New routine.
866 * sem_prag.ads Add pragma Default_Initial_Condition
867 to table Assertion_Expression_Pragma. Add new table
868 Is_Aspect_Specifying_Pragma.
869 (Check_Kind): Moved from body of Sem_Prag.
870 * sem_util.adb Add with and use clauses for Ghost.
871 (Build_Default_Init_Cond_Procedure_Body): Capture, set and restore
873 (Build_Default_Init_Cond_Procedure_Declaration):
874 Capture, set and restore the Ghost mode. Mark the default
875 initial condition procedure as Ghost when it is declared
877 (Is_Renaming_Declaration): New routine.
878 (Policy_In_List): Account for the single argument version of
880 * sem_util.ads (Is_Renaming_Declaration): New routine.
881 * sinfo.adb (Is_Ghost_Pragma): New routine.
882 (Set_Is_Ghost_Pragma): New routine.
883 * sinfo.ads New attribute Is_Ghost_Pragma.
884 (Is_Ghost_Pragma): New routine along with pragma Inline.
885 (Set_Is_Ghost_Pragma): New routine along with pragma Inline.
887 2015-05-26 Robert Dewar <dewar@adacore.com>
889 * sem_ch3.adb, sem_aux.adb, sem_aux.ads, exp_ch6.adb, sprint.adb:
892 2015-05-26 Gary Dismukes <dismukes@adacore.com>
894 * gnat1drv.adb, targparm.adb, targparm.ads, restrict.adb: Minor
895 reformatting and typo fixes in comments.
897 2015-05-26 Ed Schonberg <schonberg@adacore.com>
899 * sem_ch7.adb (Swap_Private_Dependets): Set visibility of
900 the two views of a private dependent in two separate steps,
901 to ensure proper visibility in parent units analyzed for inlining.
903 2015-05-26 Yannick Moy <moy@adacore.com>
905 * sem_aux.adb, sem_aux.ads (Get_Low_Bound): Use Type_Low_Bound.
906 (Package_Body, Package_Spec): New queries moved
908 (Package_Specification): Simplify query to remove use of loop.
909 * sem_util.adb, sem_util.ads (Enclosing_Declaration,
910 Enclosing_Package_Or_Subprogram, Is_Attribute_Update): New
911 queries moved here from GNATprove.
913 2015-05-26 Bob Duff <duff@adacore.com>
915 * einfo.adb, einfo.ads, sprint.adb, lib-xref.ads: Minor cleanup: Remove
916 obsolete Entity_Kinds E_String_Type and E_String_Subtype. Update
917 redundant assertions.
919 2015-05-26 Gary Dismukes <dismukes@adacore.com>
921 * sem_util.adb, sem_util.ads, sem_ch13.adb: Minor typo fixes.
923 2015-05-26 Doug Rupp <rupp@adacore.com>
925 * init.c [vxworks]: Refine previous checkin.
927 2015-05-26 Robert Dewar <dewar@adacore.com>
929 * exp_ch4.adb (Wrap_MA): New function.
930 (Expand_N_Op_Expon): Use Wrap_MA.
932 2015-05-26 Bob Duff <duff@adacore.com>
934 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
935 Do not use secondary stack to return limited records with
936 defaulted discriminants. This is an efficiency improvement.
937 * exp_ch6.adb, exp_dist.adb, sem_attr.adb, sem_aux.adb, sem_aux.ads,
938 sem_ch12.adb, sem_ch3.adb, sem_ch4.adb, sem_ch6.adb, sem_ch7.adb,
939 sem_util.adb: Change the sense of Is_Indefinite_Subtype to be
940 Is_Definite_Subtype. This is an improvement to readability (the double
941 negative in "not Is_Indefinite_Subtype" was slightly confusing). Also
942 disallow passing non-[sub]type entities, an unnecessary and slightly
943 bug-prone flexibility.
945 2015-05-26 Robert Dewar <dewar@adacore.com>
947 * sem_aggr.adb (Resolve_Array_Aggregate): Defend against
949 * debug.adb: Document -gnatd.k.
950 * erroutc.adb (Set_Msg_Insertion_Line_Number): Implement -gnatd.k.
952 2015-05-26 Robert Dewar <dewar@adacore.com>
954 * gnat1drv.adb (Gnat1drv): Provide new arguments for
955 Get_Target_Parameters.
956 * restrict.adb (Set_Restriction_No_Specification_Of_Aspect):
958 (Set_Restriction_No_Use_Of_Attribute): new procedure.
959 * restrict.ads (Set_Restriction_No_Specification_Of_Aspect):
961 (Set_Restriction_No_Use_Of_Attribute): new procedure.
962 * s-rident.ads (Integer_Parameter_Restrictions): New subtype.
963 * targparm.adb (Get_Target_Parameters): Allow new restriction
964 pragmas No_Specification_Of_Aspect No_Use_Of_Attribute
966 * targparm.ads: New parameters for Get_Target_Parameters.
967 * tbuild.adb (Set_NOD): New name for Set_RND.
968 (Set_NSA): New procedure.
969 (Set_NUA): New procedure.
970 (Set_NUP): New procedure.
971 * tbuild.ads (Make_SC): Minor reformatting.
972 (Set_NOD): New name for Set_RND.
973 (Set_NSA, Set_NUA, Set_NUP): New procedure.
975 2015-05-26 Ed Schonberg <schonberg@adacore.com>
977 * a-stwise.adb (Find_Token): If source'first is not positive,
978 an exception must be raised, as specified by RM 2005 A.4.3
979 (68/1). This must be checked explicitly, given that run-time
980 files are normally compiled without constraint checks.
981 * a-stzsea.adb (Find_Token): Ditto.
983 2015-05-26 Ed Schonberg <schonberg@adacore.com>
985 * sem_util.ads sem_util.adb (Is_Current_Instance): New predicate
986 to fully implement RM 8.6 (17/3). which earlier only applied
987 to synchronized types. Used to preanalyze aspects that include
988 current instances of types, such as Predicate and Invariant.
989 * sem_res.adb (Resolve_Entity_Name): Use Is_Current_Instance.
990 * sem_ch13.adb (Add_Predicates): In ASIS mode, preserve original
991 expression of aspect and analyze it to provide proper type
994 2015-05-26 Robert Dewar <dewar@adacore.com>
996 * rtsfind.ads: Add entries for RE_Exn[_Long]_Float.
997 * s-exnllf.adb (Exn_Float): New function.
998 (Exn_Long_Float): New function.
999 (Exn_Long_Long_Float): Rewritten interface.
1000 (Exp): New name for what used to be Exn_Long_Long_Float.
1001 * s-exnllf.ads (Exn_Float): New function.
1002 (Exn_Long_Float): New function.
1004 2015-05-26 Ed Schonberg <schonberg@adacore.com>
1006 * sem_ch8.adb (Find_Selected_Component): Do not emit an error
1007 on a selected component when the prefix is a type name that is
1009 * einfo.ads: Minor grammar fix.
1011 2015-05-26 Doug Rupp <rupp@adacore.com>
1013 * init.c [vxworks] (sysLib.h): Only for x86.
1015 2015-05-26 Doug Rupp <rupp@adacore.com>
1017 * init-vxsim.c (CPU): define as __VXSIM_CPU__
1018 * sigtramp-vxworks-vxsim.c (CPU): Likewise.
1019 sigtramp-vxworks-target.inc: Add check for SIMLINUX.
1020 * sigtramp.h: Likewise.
1022 2015-05-26 Robert Dewar <dewar@adacore.com>
1024 * sem_aux.adb, sem_disp.adb, sem_util.ads: Add comment.
1025 * sem_util.adb: Minor reformatting
1027 2015-05-26 Yannick Moy <moy@adacore.com>
1029 * inline.adb (Has_Initialized_Type): Adapt to new names.
1030 * sem_aux.adb, sem_aux.ads (Get_Low_Bound, Number_Components,
1031 Subprogram_Body, Subprogram_Body_Entity, Subprogram_Spec,
1032 Subprogram_Specification): New query functions used in GNATprove.
1033 * sem_disp.adb, sem_disp.ads (Is_Overriding_Subprogram): New
1034 query functions used in GNATprove.
1035 * sem_util.adb, sem_util.adso (Enclosing_Lib_Unit_Node,
1036 Get_Cursor_Type, Get_Return_Object, Get_User_Defined_Eq,
1037 Is_Double_Precision_Floating_Point_Type,
1038 Is_Single_Precision_Floating_Point_Type): New query functions
1041 2015-05-26 Bob Duff <duff@adacore.com>
1043 * s-rpc.ads (Partition_ID): Increase maximum Partition_ID to
1045 * a-except-2005.adb, a-except-2005.ads, a-except.adb,
1046 a-except.ads, a-exexda.adb, a-exstat.adb: Minor comment fixes.
1048 2015-05-26 Robert Dewar <dewar@adacore.com>
1050 * sinfo.adb: Minor comment addition.
1051 * einfo.adb: Minor whitespace and punctuation fix.
1052 * sem_util.adb: Minor editing of comments.
1054 2015-05-26 Ed Schonberg <schonberg@adacore.com>
1056 * sem_ch7.adb (Install_Private_Declarations,
1057 Swap_Private_Dependents): Ensure that both views of the dependent
1058 subtype are immediately visible if we are within their scope. This
1059 may be needed when a procedure body is both the parent of an
1060 instantiated child unit, and is itself used to inline a local
1063 2015-05-26 Gary Dismukes <dismukes@adacore.com>
1065 * exp_prag.adb, gnat1drv.adb: Minor reformatting.
1067 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
1069 * exp_ch4.adb (Expand_N_Indexed_Component): In the circuit
1070 detecting exceptions to the rewriting, deal with implicit
1071 dereferences in the selected component case.
1073 2015-05-26 Bob Duff <duff@adacore.com>
1075 * sem_ch13.adb (Analyze_One_Aspect): Do not
1076 require the expression of the Disable_Controlled aspect to be
1077 static in a generic template, because 'Enabled is not known
1080 2015-05-26 Doug Rupp <rupp@adacore.com>
1082 * init-vxsim.c: New file for vxsim ZCX
1083 * sigtramp-vxworks-vxsim.c: Likewise.
1084 * sigtramp-vxworks.c: Factor out target dependent bits into ...
1085 * sigtramp-vxworks-target.inc: ... here.
1086 * sigtramp.h: Add vxsim zcx protos.
1087 * init.c [vxworks...] (sysLib.h): Include.
1088 (__gnat_map_signal): Make global.
1089 [...i386] (__gnat_error_handler): Call __gnat_vxsim_error_handler if
1091 [...i386] (__gnat_install_handler): Test if on vxsim.
1093 2015-05-26 Ed Schonberg <schonberg@adacore.com>
1095 * sem_ch5.adb (Analyze_Iterator_Specification): For an element
1096 iterator over an array, if the component is aliased, the loop
1097 variable is aliased as well.
1099 2015-05-26 Ed Schonberg <schonberg@adacore.com>
1101 * exp_ch6.adb (Expand_Actuals): For a function call with in-out
1102 parameters that is rewritten as an expression_with_actions,
1103 we preserve the original function call node for further use by
1104 the caller (typically Expand_Call). In the presence of validity
1105 checks, that function call, though it is labelled Analyzed to
1106 prevent an infinite recursion, may be rewritten as a temporary
1107 by Remove_Side_Effects. Ensure that the caller has access to
1108 the original function call to continue expansion.
1109 * atree.ads: Minor typo in comment.
1111 2015-05-26 Javier Miranda <miranda@adacore.com>
1113 * sem_util.adb (Check_Function_Writable_Actuals):
1114 Add missing support to check the violation of writable actuals
1115 in array aggregates that have a nonstatic range.
1117 2015-05-26 Hristian Kirtchev <kirtchev@adacore.com>
1119 * exp_ch6.adb (Process_Contract_Cases_For): Update the call to
1120 Expand_Pragma_Contract_Cases.
1121 * exp_prag.ads, exp_prag.adb (Expand_Contract_Cases): Rename to
1122 Expand_Pragma_Contract_Cases.
1123 * sem_ch13.adb (Add_Invariants): Use the original aspect name
1124 when creating the arguments of pragma Check. This ensures that
1125 'Class is properly recognized and handled.
1127 2015-05-26 Arnaud Charlet <charlet@adacore.com>
1129 * gnat1drv.adb: Minor adjustments.
1130 (Adjust_Global_Switches): Disable some related flags in CodePeer mode.
1131 * sem_ch4.adb (Has_Arbitrary_Evaluation_Order,
1132 Stop_Subtree_Climbind): Code cleanup.
1133 * einfo.ads: Minor comment change.
1135 2015-05-26 Javier Miranda <miranda@adacore.com>
1137 * sem_aggr.adb (Resolve_Aggregate, Resolve_Extension_Aggregate):
1139 * sem_ch3.adb (Build_Derived_Record_Type,
1140 Record_Type_Declaration): Code cleanup.
1141 * sem_ch4.adb (Has_Arbitrary_Evaluation_Order,
1142 Stop_Subtree_Climbind): Tables which speed up the identification
1143 of dangerous calls to Ada 2012 functions with writable actuals
1145 (Analyze_Arithmetic_Op, Analyze_Call, Analyze_Comparison_Op,
1146 Analyze_Equality_Op, Analyze_Logical_Op, Analyze_Membership_Op,
1147 Analyze_Range): Code cleanup.
1148 (Is_Arbitrary_Evaluation_Order_Construct): Removed.
1149 (Check_Writable_Actuals): Code cleanup using the added tables.
1150 * sem_util.adb (Check_Function_Writable_Actuals): Return
1151 immediately if the node does not have the flag Check_Actuals
1154 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
1156 * exp_ch6.adb (Add_Call_By_Copy_Code): Remove restrictive
1157 condition in the detection of the effects of Remove_Side_Effects.
1158 * exp_util.ads (Remove_Side_Effects): Add general and historical note.
1159 * exp_util.adb (Is_Name_Reference): New predicate.
1160 (Remove_Side_Effects): Use it in lieu of Is_Object_Reference
1161 in order to decide whether to use the renaming to capture the
1162 side effects of the subexpression.
1163 (Side_Effect_Free): Remove obsolete test.
1165 2015-05-26 Robert Dewar <dewar@adacore.com>
1167 * aspects.ads, aspects.adb: Add aspect Disable_Controlled.
1168 * einfo.ads, einfo.adb (Disable_Controlled): New flag.
1169 (Is_Controlled_Active): New function.
1170 * exp_ch3.adb (Expand_Freeze_Record_Type): Use
1171 Is_Controlled_Active.
1172 * exp_util.adb (Needs_Finalization): Finalization not needed
1173 if Disable_Controlled set.
1174 * freeze.adb (Freeze_Array_Type): Do not set
1175 Has_Controlled_Component if the component has Disable_Controlled.
1176 (Freeze_Record_Type): ditto.
1177 * sem_ch13.adb (Decorate): Minor reformatting.
1178 (Analyze_Aspect_Specifications): Implement Disable_Controlled.
1179 * sem_ch3.adb (Analyze_Object_Declaration): Handle
1181 (Array_Type_Declaration): ditto.
1182 (Build_Derived_Private_Type): ditto.
1183 (Build_Derived_Type): ditto.
1184 (Record_Type_Definition): ditto.
1185 * snames.ads-tmpl: Add Name_Disable_Controlled.
1187 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
1189 * exp_ch6.adb (Expand_Actuals): Use a constant declaration instead
1190 of a renaming to capture the return value of a function call.
1191 (Expand_Simple_Function_Return): Call Remove_Side_Effects
1192 instead of removing side effects manually before the call to
1195 2015-05-26 Robert Dewar <dewar@adacore.com>
1197 * exp_ch4.adb (Expand_N_Op_Expon): Deal with problem of wrong
1198 order in calling Duplicate_Subexpr.
1199 * einfo.ads: Fix documentation of Object/Value size for scalar types.
1201 2015-05-26 Ed Schonberg <schonberg@adacore.com>
1203 * exp_aggr.adb (Build_Array_Aggr_Code, Gen_Assign):
1204 If a component is default-initialized and its type has an
1205 invariant procedure, insert an invariant test after code for
1206 default-initialization of the component.
1208 2015-05-26 Gary Dismukes <dismukes@adacore.com>
1210 * einfo.ads, sem_util.adb, sem_ch4.adb: Minor reformatting.
1212 2015-05-26 Robert Dewar <dewar@adacore.com>
1214 * exp_unst.adb, exp_unst.ads: Change to using Subps table index for
1215 making AREC entity names unique.
1217 2015-05-26 Ed Schonberg <schonberg@adacore.com>
1219 * sem_cat.adb (Has_Stream_Attribute_Definition): If the type
1220 has aspect specifications, examine the corresponding list of
1221 representation items to determine whether there is a visible
1222 stream operation. The attribute definition clause generated from
1223 the aspect will be inserted at the freeze point of the type,
1224 which may be in the private part and not directly visible,
1225 but the aspect makes the operation available to a client.
1227 2015-05-26 Robert Dewar <dewar@adacore.com>
1229 * sem_util.adb: Minor code reorganization.
1230 * sem_ch6.adb: Minor reformatting.
1232 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
1234 * gcc-interface/utils.c (maybe_pad_type): Do not apply adjustment to
1235 original size for elementary types before issuing the size warning.
1237 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
1239 * get_targ.adb (C_Get_Float_Words_BE): Adjust import name.
1240 (C_Get_Words_BE): Likewise.
1241 (C_Get_Bytes_BE): Likewise.
1242 (C_Get_Bits_BE): Likewise.
1243 (Width_From_Size): Remove superfluous space.
1244 * gcc-interface/targtyps.c (get_float_words_be): Rename into...
1245 (get_target_float_words_be): ...this.
1246 (get_words_be): Rename into...
1247 (get_target_words_be): ...this.
1248 (get_bytes_be): Rename into...
1249 (get_target_bytes_be): ...this.
1250 (get_bits_be): Rename into...
1251 (get_target_bits_be): ...this.
1252 * gcc-interface/gigi.h (standard_datatypes): Remove ADT_ptr_void_type.
1253 (ptr_void_type_node): Delete.
1254 (get_target_float_size): Likewise.
1255 (get_target_double_size): Likewise.
1256 (get_target_long_double_size): Likewise.
1257 (get_float_words_be): Likewise.
1258 (get_words_be): Likewise.
1259 (get_bytes_be): Likewise.
1260 (get_bits_be): Likewise.
1261 (get_target_float_words_be): Declare.
1262 (get_target_words_be): Likewise.
1263 (get_target_bytes_be): Likewise.
1264 (get_target_bits_be): Likewise.
1265 * gcc-interface/decl.c (gnat_to_gnu_entity): Replace ptr_void_type_node
1267 (intrin_return_compatible_p): Likewise.
1268 * gcc-interface/trans.c (gigi): Likewise.
1269 * gcc-interface/utils2.c (maybe_wrap_malloc): Likewise.
1270 (maybe_wrap_free): Likewise.
1271 * gcc-interface/utils.c (maybe_pad_type): Remove superfluous space.
1272 * gcc-interface/misc.c (gnat_init): Do not set ptr_void_type_node.
1274 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
1276 * gcc-interface/decl.c (elaborate_expression): Take a const string
1277 suffix instead of a tree.
1278 (elaborate_expression_1): Likewise.
1279 (elaborate_expression_2): Likewise.
1280 (gnat_to_gnu_entity): Adjust to above changes.
1281 (build_subst_list): Likewise.
1282 (get_entity_char): New static function.
1284 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
1286 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: Move around.
1287 <E_Exception>: Merge with E_Variable case.
1288 <E_Variable>: Remove 'object' label.
1290 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
1292 * gcc-interface/decl.c (gnat_to_gnu_entity): Minor tweak.
1293 * gcc-interface/trans.c (finalize_nrv_unc_r): Use CONSTRUCTOR_ELT.
1294 * gcc-interface/utils.c (convert): Likewise and simplify.
1295 (remove_conversions): Likewise.
1296 * gcc-interface/utils2.c (compare_fat_pointers): Likewise.
1297 (build_unary_op): Likewise and simplify.
1299 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
1301 * gcc-interface/gigi.h (build_atomic_load): Adjust prototype.
1302 (build_atomic_store): Likewise.
1303 (build_load_modify_store): Declare.
1304 (VECTOR_TYPE_P): Delete.
1305 * gcc-interface/decl.c (gnat_to_gnu_entity): Replace Is_Atomic with
1306 Is_Atomic_Or_VFA throughout.
1307 <E_Array_Type>: Build a variant of the XUA type instead of forcing
1308 TYPE_VOLATILE on it.
1309 <E_Array_Subtype>: Use the main variant of the base type.
1310 Do not force TYPE_VOLATILE on the type being built.
1311 <E_Record_Type>: Likewise.
1312 <E_Array_Subtype>: Likewise.
1313 <E_Subprogram_Type>: Rename local variable.
1314 Add Atomic qualifier in conjunction with Volatile on types if needed.
1315 Force BLKmode for by-ref types only at the end of the processing.
1316 Change qualifiers only after changing the mode of the type. Set
1317 TYPE_UNIVERSAL_ALIASING_P on the type directly.
1318 (check_ok_for_atomic_type): Issue specific error message for VFA.
1319 (gnat_to_gnu_component_type): Replace Is_Atomic with
1320 Is_Atomic_Or_VFA throughout.
1321 * gcc-interface/misc.c (gnat_get_alias_set): Test
1322 TYPE_UNIVERSAL_ALIASING_P on the type directly.
1323 * gcc-interface/trans.c (lvalue_required_p): Replace Is_Atomic with
1324 Is_Atomic_Or_VFA throughout. Add missing guard.
1325 (node_is_atomic): New predicate.
1326 (node_has_volatile_full_access): Likewise.
1327 (gnat_strip_type_conversion): New function.
1328 (outer_atomic_access_required_p): New predicate.
1329 (atomic_sync_required_p): Rename into...
1330 (atomic_access_required_p): ...this. Add SYNC parameter, scan the
1331 parent node first and then look for the atomic setting. Add support
1332 for Volatile_Full_Access.
1333 (Call_to_gnu): Add atomic_access and outer_atomic_access parameters
1334 and adjusts calls to above functions. Use load-modify-store sequence
1335 for updates of In/Out and Out parameters if required, as well as for
1336 moving the result to the target if required. Add couple of missing
1338 (gnat_to_gnu): Adjust calls to above functions.
1339 <N_Object_Renaming_Declaration>: If the renamed object has side-effects
1340 evaluate only its address.
1341 <N_Assignment_Statement>: Adjust call to Call_to_gnu. Use load-modify
1342 store sequence if required.
1343 <N_Function_Call>: Adjust call to Call_to_gnu.
1344 (extract_values): Adjust comment.
1345 * gcc-interface/utils2.c (build_atomic_load): Add SYNC parameter and
1346 use relaxed memory model if it is not set.
1347 (build_atomic_store): Likewise.
1348 (call_is_atomic_load): New predicate.
1349 (build_load_modify_store): New function.
1350 (build_binary_op) <MODIFY_EXPR>: Accept SAVE_EXPR on the LHS.
1351 (gnat_stabilize_reference) <CALL_EXPR>: Deal with atomic loads.
1353 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
1355 * gcc-interface/ada-tree.h (DECL_RENAMING_GLOBAL_P): Rename into...
1356 (DECL_GLOBAL_NONCONSTANT_RENAMING_P): ...this.
1357 * gcc-interface/gigi.h (record_global_renaming_pointer): Delete.
1358 (invalidate_global_renaming_pointers): Likewise.
1359 (record_global_nonconstant_renaming): New.
1360 (invalidate_global_nonconstant_renamings): Likewise.
1361 (get_inner_constant_reference): Likewise.
1362 (gnat_constant_reference_p): Likewise.
1363 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Adjust to above
1364 and register the renaming pointer only if the object is non-constant.
1365 (elaborate_expression_1): Call get_inner_constant_reference instead
1366 of get_inner_reference.
1367 * gcc-interface/trans.c (fold_constant_decl_in_expr): Minor tweak.
1368 (Identifier_to_gnu): Adjust to above and do not recheck the renamed
1369 object before substituting it.
1370 (Compilation_Unit_to_gnu): Adjust to above renaming. Minor tweaks.
1371 (gnat_to_gnu) <N_Object_Renaming_Declaration>: Do not return the
1372 result at the global level.
1373 (N_Exception_Renaming_Declaration): Likewise.
1374 * gcc-interface/utils.c (global_renaming_pointers): Rename into...
1375 (global_nonconstant_renamings): ...this.
1376 (destroy_gnat_utils): Adjust to above renaming.
1377 (record_global_renaming_pointer): Rename into...
1378 (record_global_nonconstant_renaming): ...this.
1379 (invalidate_global_renaming_pointers): Rename into...
1380 (invalidate_global_nonconstant_renamings): ...this and do not recheck
1381 the renamed object before invalidating.
1382 * gcc-interface/utils2.c (gnat_stabilize_reference): Minor tweak.
1383 (get_inner_constant_reference): New public function.
1384 (gnat_constant_reference_p): New predicate.
1386 2015-05-25 Javier Miranda <miranda@adacore.com>
1388 * einfo.ads, einfo.adb (Has_Out_Or_In_Out_Parameter): This attribute
1389 is now present in subprograms, generic subprograms, entries and
1391 * sem_ch6.adb (Set_Formal_Mode): Set As_Out_Or_In_Out_Parameter
1392 on entries, entry families, subprograms and generic subprograms.
1393 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration):
1394 Minor code reorganization to ensure that the Ekind attribute
1395 of the subprogram entity is set before its formals are
1396 processed. Required to allow the use of the attribute
1397 Has_Out_Or_In_Out_Parameter on the subprogram entity.
1398 * sem_aggr.adb (Resolve_Aggregate, Resolve_Extension_Aggregate):
1399 Perform the check on writable actuals only if the value of some
1400 component of the aggregate involves calling a function with
1401 out-mode parameters.
1402 (Resolve_Record_Aggregate): Propagate the Check_Actuals flag to the
1403 internally built aggregate.
1404 * sem_ch3.adb (Build_Derived_Record_Type, Record_Type_Declaration):
1405 Perform the check on writable actuals only if the initialization of
1406 some component involves calling a function with out-mode parameters.
1407 * sem_ch4.adb (Analyze_Arithmetic_Op, Analyze_Comparison_Op,
1408 Analyze_Equality_Op, Analyze_Logical_Op, Analyze_Membership_Op,
1409 Analyze_Range): Check writable actuals only if the
1410 subtrees have a call to a function with out-mode parameters
1411 (Analyze_Call.Check_Writable_Actuals): New subprogram. If the call
1412 has out or in-out parameters then mark its outermost enclosing
1413 construct as a node on which the writable actuals check must
1415 (Analyze_Call): Check if the flag must be set and if the outermost
1416 enclosing construct.
1417 * sem_util.adb (Check_Function_Writable_Actuals): Code cleanup
1418 and reorganization. We skip processing aggregate discriminants
1419 since their precise analysis involves two phases traversal.
1420 * sem_res.adb (Resolve_Actuals, Resolve_Arithmetic_Op,
1421 Resolve_Logical_Op, Resolve_Membership_Op): Remove call to
1422 check_writable_actuals.
1424 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1426 * sem_ch3.adb (Constrain_Concurrent): If the context is a
1427 type declaration, generate an Itype_Reference for the anonymous
1428 subtype, to force elaboration at this point in gigi.
1430 2015-05-22 Gary Dismukes <dismukes@adacore.com>
1432 * layout.adb, einfo.ads, sem_ch12.adb, freeze.adb, sem_util.ads,
1433 exp_ch4.adb, sem_ch6.adb: Minor reformatting and typo fixes.
1435 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1437 * sem_res.adb (Resolve_Actuals): If the call is to an overridden
1438 operation, replace the names of the actuals in named associations
1439 with the names of the actuals of the subprogram that is eventually
1440 executed. The names of the formals and the defaults can differ
1441 between the two operations when they are operations of a formal
1444 2015-05-22 Bob Duff <duff@adacore.com>
1446 * a-convec.ads, a-convec.adb (Append): Check for fast path. Split
1447 out slow path into separate procedure. Inline Append. Fast path
1448 now avoids calling Insert.
1449 (Finalize): Do the busy checking last, so the container gets emptied.
1450 (Insert, Insert_Space): Remove redundancy.
1452 2015-05-22 Robert Dewar <dewar@adacore.com>
1454 * switch-c.adb (Scan_Front_End_Switches): Insist on -gnatc
1457 2015-05-22 Arnaud Charlet <charlet@adacore.com>
1459 * gnatvsn.ads: Minor code reorg to remember more easily to update
1462 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1464 * sem_ch10.adb (Analyze_With_Clause): In ASIS_Mode, a
1465 limited_with clause on a predefined unit is not transformed into
1466 a regular with_clause, to preserve the original tree structure.
1467 * sinfo.ads (N_With_Clause): Add comment on handling of
1469 * sem_ch10.adb: Minor reformatting.
1471 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1473 * sem_ch8.adb (Freeze_Profile): A limited view of a type in
1474 the profile of a subprogram renaming does not require freezing,
1475 because it is declared in a different unit.
1477 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1479 * exp_aggr.adb (Get_Constraint_Association): If type (of ancestor
1480 composite type) is private, go to full view. This was previously
1481 done only in an instance context, but is happen whenever a chain
1482 of private extensions includes one inherited discriminant.
1484 2015-05-22 Robert Dewar <dewar@adacore.com>
1486 * einfo.ads: Minor comment updates.
1487 * exp_unst.adb: Move Subps table to spec Don't remove old entries
1488 from table Add Last field to record last entry used.
1489 * exp_unst.ads: Move Subps table here from body So that Cprint
1490 can access saved values.
1492 2015-05-22 Bob Duff <duff@adacore.com>
1494 * a-cdlili.adb, a-cdlili.ads, a-cohama.adb, a-cohama.ads,
1495 * a-cohase.adb, a-cohase.ads, a-convec.adb, a-convec.ads,
1496 * a-coorma.adb, a-coorma.ads, a-coorse.adb, a-coorse.ads:
1497 (Pseudo_Reference, Element_Access, Get_Element_Access): New
1498 declarations added for use by performance improvements in exp_ch5.adb.
1499 * snames.ads-tmpl: New names referenced by exp_ch5.adb.
1500 * exp_ch5.adb: Speed up "for ... of" loops for predefined containers.
1501 Instead of doing literally what the RM calls for, we do something
1502 equivalent that avoids expensive operations inside the loop. If the
1503 container package has appropriate Next, Pseudo_Reference,
1504 Element_Access, Get_Element_Access declarations, we invoke the
1506 * snames.ads-tmpl: Note speed improvement.
1508 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
1510 * einfo.ads (Is_Atomic_Or_VFA): Move to XEINFO INLINES section.
1511 * xeinfo.adb: Replace a-einfo.h with einfo.h throughout.
1512 Add pattern to translate "or else" into "||".
1514 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
1516 * einfo.ads (Has_Volatile_Full_Access): Rename into...
1517 (Is_Volatile_Full_Access): ...this.
1518 (Set_Has_Volatile_Full_Access): Rename into...
1519 (Set_Is_Volatile_Full_Access): ...this.
1520 * einfo.adb (Has_Volatile_Full_Access): Rename into...
1521 (Is_Volatile_Full_Access): ...this.
1522 (Set_Has_Volatile_Full_Access): Rename into...
1523 (Set_Is_Volatile_Full_Access): ...this.
1524 (Is_Atomic_Or_VFA): Adjust to above renaming.
1525 * errout.adb (Special_Msg_Delete): Likewise.
1526 * exp_pakd.adb (Install_PAT): Likewise.
1527 * freeze.adb (Freeze_Array_Type): Likewise.
1528 * sem_ch8.adb (Analyze_Object_Renaming): Likewise.
1529 * sem_ch13.adb (Inherit_Delayed_Rep_Aspects): Likewise.
1530 (Inherit_Aspects_At_Freeze_Point): Likewise.
1531 * sem_prag.adb (Set_Atomic_VFA): Likewise.
1532 (Process_Atomic_Independent_Shared_Volatile): Likewise.
1533 * sem_util.adb (Is_Atomic_Or_VFA_Object): Likewise.
1535 2015-05-22 Robert Dewar <dewar@adacore.com>
1537 * exp_ch5.adb, layout.adb, einfo.adb, einfo.ads, sem_prag.adb,
1538 freeze.adb, freeze.ads, sem_util.adb, sem_util.ads, exp_ch2.adb,
1539 exp_ch4.adb, errout.adb, exp_aggr.adb, sem_ch13.adb: This is a general
1540 change that deals with the fact that most of the special coding for
1541 Atomic should also apply to the case of Volatile_Full_Access.
1542 A new attribute Is_Atomic_Or_VFA is introduced, and many of the
1543 references to Is_Atomic now use this new attribute.
1545 2015-05-22 Robert Dewar <dewar@adacore.com>
1547 * exp_ch4.adb (Expand_N_Op_Eq): Introduce 'Machine for 'Result
1550 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
1552 * sprint.adb (Source_Dump): When generating debug files, deal
1553 with the case of a stand-alone package instantiation by dumping
1554 together the spec and the body in the common debug file.
1556 2015-05-22 Robert Dewar <dewar@adacore.com>
1558 * sem_ch13.adb (Minimum_Size): Size is zero for null range
1561 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1563 * einfo.adb (Anonymous_Master): This attribute now applies
1564 to package and subprogram bodies.
1565 (Set_Anonymous_Master): This attribute now applies to package and
1567 (Write_Field36_Name): Add output for package and subprogram bodies.
1568 * einfo.ads Update the documentation on attribute Anonymous_Master
1569 along with occurrences in entities.
1570 * exp_ch4.adb (Create_Anonymous_Master): Reimplemented to
1571 handle spec and body anonymous masters of the same unit.
1572 (Current_Anonymous_Master): Reimplemented. Handle a
1573 package instantiation that acts as a compilation unit.
1574 (Insert_And_Analyze): Reimplemented.
1576 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1578 * sem_ch10.adb (Analyze_With_Clause): A limited_with_clause on a
1579 predefined unit is treated as a regular with_clause.
1581 2015-05-22 Robert Dewar <dewar@adacore.com>
1583 * sem_ch12.adb, prj.ads, makeutl.ads, sem_ch6.adb, prj-nmsc.adb,
1584 prj-conf.adb, sem_disp.adb: Minor reformatting.
1586 2015-05-22 Vincent Celier <celier@adacore.com>
1588 * clean.adb (Parse_Cmd_Line): For native gnatclean, check
1589 for switch -P and, if found and gprclean is available, invoke
1591 * make.adb (Initialize): For native gnatmake, check for switch -P
1592 and, if found and gprbuild is available, invoke silently gprbuild.
1594 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
1596 * sem_ch13.adb (Validate_Unchecked_Conversions): Also issue
1597 specific warning for discrete types when the source is larger
1600 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1602 * einfo.ads, einfo.adb (Incomplete_Actuals): New attribute of
1603 package instantiations. Holds the list of actuals in the instance
1604 that are incomplete types, to determine where the corresponding
1605 instance body must be placed.
1606 * sem_ch6.adb (Conforming_Types): An incomplete type used as an
1607 actual in an instance matches an incomplete formal.
1608 * sem_disp.adb (Check_Dispatching_Call): Handle missing case of
1609 explicit dereference.
1610 (Inherited_Subprograms): In the presence of a limited view there
1611 are no subprograms to inherit.
1612 * sem_ch12.adb (Preanalyze_Actuals): Build list of incomplete
1613 actuals of instance, for later placement of instance body and
1614 freeze nodes for actuals.
1615 (Install_Body): In the presence of actuals that incomplete types
1616 from a limited view, the instance body cannot be placed after
1617 the declaration because full views have not been seen yet. Any
1618 use of the non-limited views in the instance body requires
1619 the presence of a regular with_clause in the enclosing unit,
1620 and will fail if this with_clause is missing. We place the
1621 instance body at the beginning of the enclosing body, which is
1622 the unit being compiled, and ensure that freeze nodes for the
1623 full views of the incomplete types appear before the instance.
1625 2015-05-22 Pascal Obry <obry@adacore.com>
1627 * makeutl.ads, prj-conf.adb, prj-nmsc.adb, prj.ads
1628 (In_Place_Option): Removed.
1629 (Relocate_Build_Tree_Option): New constant.
1630 (Root_Dir_Option): New constant.
1631 (Obj_Root_Dir): Removed.
1632 (Build_Tree_Dir): New variable.
1633 (Root_Src_Tree): Removed.
1634 (Root_Dir): New variable.
1635 * prj-conf.adb (Get_Or_Create_Configuration_File): Add check
1636 for improper relocation.
1637 * prj-nmsc.adb (Locate_Directory): Add check for improper
1640 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1642 * einfo.adb (Default_Init_Cond_Procedure): Code cleanup. The
1643 attribute now applies to the base type.
1644 (Has_Default_Init_Cond): Now applies to the base type.
1645 (Has_Inherited_Default_Init_Cond): Now applies to the base type.
1646 (Set_Default_Init_Cond_Procedure): Code cleanup. The attribute now
1647 applies to the base type.
1648 (Set_Has_Default_Init_Cond): Now applies to the base type.
1649 (Set_Has_Inherited_Default_Init_Cond): Now applies to the base type.
1650 * exp_ch3.adb (Expand_N_Object_Declaration): No need to use the
1651 base type when adding a call to the Default_Initial_Condition.
1653 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1655 * einfo.adb: Node36 is now used as Anonymous_Master. Flag253
1657 (Anonymous_Master): New routine.
1658 (Has_Anonymous_Master): Removed.
1659 (Set_Anonymous_Master): New routine.
1660 (Set_Has_Anonymous_Master): Removed.
1661 (Write_Entity_Flags): Remove the output for Has_Anonymous_Maser.
1662 (Write_Field36_Name): Add output for Anonymous_Master.
1663 * einfo.ads Add new attribute Anonymous_Master along with
1664 occurrences in nodes. Remove attribute Has_Anonymous_Master along
1665 with occurrences in nodes.
1666 (Anonymous_Master): New routine along with pragma Inline.
1667 (Has_Anonymous_Master): Removed along with pragma Inline.
1668 (Set_Anonymous_Master): New routine along with pragma Inline.
1669 (Set_Has_Anonymous_Master): Removed along with pragma Inline.
1670 * exp_ch4.adb (Create_Anonymous_Master): New routine.
1671 (Current_Anonymous_Master): Reimplemented.
1673 2015-05-22 Bob Duff <duff@adacore.com>
1675 * freeze.adb (Freeze_Profile): Suppress warning if imported
1676 subprogram is not at library level.
1678 2015-05-22 Robert Dewar <dewar@adacore.com>
1680 * sem_ch8.adb (Analyze_Object_Renaming): Check for renaming
1681 component of an object to which Volatile_Full_Access applies.
1683 2015-05-22 Jerome Guitton <guitton@adacore.com>
1685 * exp_dbug.ads: Add note about non bit-packed arrays.
1687 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
1689 * sem_prag.adb: Fix typo.
1690 * einfo.ads: Grammar fixes in comments.
1692 2015-05-22 Bob Duff <duff@adacore.com>
1694 * a-cborma.ads, a-cidlli.ads, a-cimutr.ads, a-ciormu.ads,
1695 * a-cihase.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
1696 * a-cborse.ads, a-comutr.ads, a-ciorma.ads, a-cobove.ads,
1697 * a-coormu.ads, a-convec.ads, a-cohase.ads, a-coinho.ads,
1698 * a-cbdlli.ads, a-cbmutr.ads, a-cbhase.ads, a-cdlili.ads,
1699 * a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
1700 * a-coinho-shared.ads (Constant_Reference_Type, Reference_Type):
1701 Add an initialization expression "raise Program_Error". See,
1702 for example, RM-A.18.2(148.4).
1704 2015-05-22 Robert Dewar <dewar@adacore.com>
1706 * debug.adb: Update documentation.
1707 * einfo.ads, einfo.adb (Needs_Typedef): New flag
1708 * exp_unst.adb (Unnest_Subprogram): Mark AREC types as needing
1710 * frontend.adb: Update comments.
1711 * gnat1drv.adb (Adjust_Global_Switches): Set all needed flags
1713 * opt.ads (Generate_C_Code): New switch.
1714 * osint-c.adb (Write_C_File_Info): Removed, not used
1715 (Write_H_File_Info): Removed, not used
1716 * osint-c.ads (Write_C_File_Info): Removed, not used
1717 (Write_H_File_Info): Removed, not used
1718 * osint.ads (Write_Info): Minor comment updates.
1719 (Output_FD): Moved from private part to public part of spec.
1720 * sem.adb (Semantics): Force expansion on if in Generate_C_Code
1722 * atree.ads: minor typo in comment.
1723 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
1724 Do not allow VFA on composite object with aliased component.
1726 2015-05-22 Arnaud Charlet <charlet@adacore.com>
1728 * osint-c.adb, osint-c.ads (Set_File_Name): Move back to spec.
1730 2015-05-22 Pascal Obry <obry@adacore.com>
1732 * prj-util.adb: Minor comment editing.
1734 2015-05-22 Pascal Obry <obry@adacore.com>
1736 * makeutl.ads (In_Place_Option): New constant.
1737 * prj.ads (Obj_Root_Dir): New variable (absolute path to relocate
1739 (Root_Src_Tree): New variable (absolute path of root source tree).
1740 * prj-conf.adb (Do_Autoconf): Take into account the object root
1741 directory (if defined) to generate configuration project.
1742 * prj-nmsc.adb (Get_Directories): Handle case where Obj_Root_Dir
1744 (Locate_Directory): Likewise.
1746 2015-05-22 Pascal Obry <obry@adacore.com>
1748 * prj-util.ads, prj-util.adb (Relative_Path): New routine.
1750 2015-05-22 Bob Duff <duff@adacore.com>
1752 * exp_utils.ads, exp_utils.adb (Find_Optional_Prim_Op): New
1753 interface to return Empty when not found, so we can avoid handling
1754 Program_Error in that case.
1755 (Find_Prim_Op): Fix latent bug: raise Program_Error when there are no
1757 * exp_ch7.adb, sem_util.adb: Use Find_Optional_Prim_Op when the
1758 code is expecting Empty.
1759 * sem_ch8.adb: Use Find_Optional_Prim_Op to avoid handling
1762 2015-05-22 Robert Dewar <dewar@adacore.com>
1764 * sem_ch3.adb, sem_intr.adb, exp_ch4.adb, s-rannum.adb,
1765 sem_eval.adb, s-fatgen.adb, s-expmod.ads: Remove incorrect hyphen in
1767 * exp_util.adb: Add comment.
1768 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move from spec to
1770 (Set_File_Name): New name for the above.
1771 (Create_C_File, Create_H_File, Write_C_File_Info, Write_H_File_Info,
1772 Close_C_File, Close_H_File): New procedure.
1773 * osint.adb: Minor reformatting.
1774 * osint.ads: Minor comment updates.
1776 2015-05-22 Robert Dewar <dewar@adacore.com>
1778 * exp_ch4.adb: Minor rewording.
1779 * exp_util.ads: Clarify that Find_Prim_Op is only for
1782 2015-05-22 Robert Dewar <dewar@adacore.com>
1784 * atree.adb, atree.ads, treepr.adb: Change name Needs_Actuals_Check to
1786 * exp_ch4.adb (Expand_N_Op_Expon): Optimize 2**x in modular
1789 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
1791 * exp_pakd.adb (Install_PAT): Propagate representation aspects
1792 from the original array type to the PAT.
1794 2015-05-22 Robert Dewar <dewar@adacore.com>
1796 * treepr.adb (Print_Node_Header): Add output of Needs_Actuals_Check.
1798 2015-05-22 Robert Dewar <dewar@adacore.com>
1800 * atree.adb, atree.ads (Needs_Actuals_Check): New flag.
1802 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1804 * sem_prag.adb (Analyze_Pragma): Remove the detection
1805 of a useless Part_Of indicator when the related item is a constant.
1806 (Check_Matching_Constituent): Do not emit an error on a constant.
1807 (Check_Missing_Part_Of): Do not check for a missing Part_Of indicator
1808 when the related item is a constant.
1809 (Collect_Body_States): Code cleanup.
1810 (Collect_Visible_States): Code cleanup.
1811 (Report_Unused_States): Do not emit an error on a constant.
1812 * sem_util.ads, sem_util.adb (Has_Variable_Input): Removed.
1814 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
1816 * sem_ch8.adb (Analyze_Object_Renaming): Copy
1817 Has_Volatile_Full_Access from renamed to renaming entities.
1818 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
1819 Tidy up and remove redundant setting of Has_Volatile_Full_Access.
1821 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1823 * ghost.adb (Check_Ghost_Completion): Update references to SPARK
1825 (Check_Ghost_Policy): Update references to SPARK RM 6.9 rules.
1826 * sem_ch3.adb (Analyze_Object_Declaration): Update references
1827 to SPARK RM 6.9 rules.
1828 (Check_Completion): Ghost entities do not require a special form of
1830 * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Update references
1831 to SPARK RM 6.9 rules.
1832 (Analyze_Subprogram_Body_Helper): Update references to SPARK RM 6.9
1834 * sem_ch7.adb (Analyze_Package_Body_Helper): Update references
1835 to SPARK RM 6.9 rules.
1836 (Requires_Completion_In_Body): Ghost entities do not require a special
1839 2015-05-22 Robert Dewar <dewar@adacore.com>
1841 * a-csquin.ads: Use Ada 2012 notation.
1842 * sem_ch8.adb: Minor reformatting.
1844 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1846 * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect Import
1847 acts as a completion.
1849 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1851 * sem_ch13.adb: Minor reformatting.
1853 2015-05-22 Jose Ruiz <ruiz@adacore.com>
1855 * a-reatim.adb: Minor change, fix typo.
1857 2015-05-22 Robert Dewar <dewar@adacore.com>
1859 * sem_util.ads: Minor addition of ??? comment.
1860 * sem_prag.adb, sem_util.adb: Minor reformatting.
1861 * sem_ch13.adb: minor reformatting.
1863 2015-05-22 Robert Dewar <dewar@adacore.com>
1865 * a-reatim.ads: Add Compile_Time_Error to ensure Duration
1867 * sem_ch13.adb: Improve error message.
1868 * exp_ch4.adb: Minor reformatting.
1870 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1872 * sem_prag.adb (Analyze_Pragma): Constants without variable
1873 input do not require indicator Part_Of.
1874 (Check_Missing_Part_Of): Constants without variable input do not
1875 requrie indicator Part_Of.
1876 (Collect_Visible_States): Constants without variable input are
1877 not part of the hidden state of a package.
1878 * sem_util.ads, sem_util.adb (Has_Variable_Input): New routine.
1880 2015-05-22 Robert Dewar <dewar@adacore.com>
1882 * exp_util.adb (Activate_Atomic_Synchronization): Do not set
1883 Atomic_Sync_Required for an object renaming declaration.
1884 * sem_ch8.adb (Analyze_Object_Renaming): Copy Is_Atomic and
1885 Is_Independent to renaming object.
1887 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1889 * sem_ch5.adb (Analyze_Iterator_Specification): Diagnose
1890 various illegalities in iterators over arrays and containers:
1891 a) New function Get_Cursor_Type, to verify that the cursor is
1892 not a limited type at the point of iteration.
1893 b) If the container is a constant, an element_iterator is illegal
1894 if the container type does not have a Constant_Indexing aspect.
1895 c) If the iterate function has an in-out controlling parameter,
1896 the container cannot be a constant object.
1897 d) Reject additional cases of iterators over a
1898 discriminant-dependent component of a mutable object.
1900 2015-05-21 Hristian Kirtchev <kirtchev@adacore.com>
1902 * einfo.adb (Contract): This attribute now applies to constants.
1903 (Set_Contract): This attribute now applies to constants.
1904 (Write_Field34_Name): Add output for constants.
1905 * einfo.ads Attribute Contract now applies to constants.
1906 * sem_ch3.adb (Analyze_Object_Contract): Constants now have
1907 their Part_Of indicator verified.
1908 * sem_prag.adb (Analyze_Constituent): A constant is now a valid
1910 (Analyze_Global_Item): A constant cannot act as an output.
1911 (Analyze_Initialization_Item): Constants are now a valid
1912 initialization item.
1913 (Analyze_Initializes_In_Decl_Part): Rename
1914 global variable States_And_Vars to States_And_Objs and update
1915 all its occurrences.
1916 (Analyze_Input_Item): Constants are now a
1917 valid initialization item. Remove SPARM RM references from error
1919 (Analyze_Pragma): Indicator Part_Of can now apply to a constant.
1920 (Collect_Body_States): Collect both source constants
1922 (Collect_States_And_Objects): Collect both source constants and
1924 (Collect_States_And_Variables): Rename
1925 to Collect_States_And_Objects and update all its occurrences.
1926 (Collect_Visible_States): Do not collect constants and variables
1927 used to map generic formals to actuals.
1928 (Find_Role): The role of a constant is that of an input. Separate the
1929 role of a variable from that of a constant.
1930 (Report_Unused_Constituents): Add specialized wording for constants.
1931 (Report_Unused_States): Add specialized wording for constants.
1932 * sem_util.adb (Add_Contract_Item): Add processing for constants.
1933 * sem_util.ads (Add_Contract_Item): Update the comment on usage.
1934 (Find_Placement_In_State_Space): Update the comment on usage.
1936 2015-05-21 Ed Schonberg <schonberg@adacore.com>
1938 * sem_ch5.adb: minor reformatting.
1940 2015-05-21 Robert Dewar <dewar@adacore.com>
1942 * freeze.adb (Freeze_Entity): Properly tag -gnatw.z messages.
1944 2015-05-21 Robert Dewar <dewar@adacore.com>
1946 * freeze.adb: Minor reformatting.
1947 * cstand.adb (Print_Standard): Fix bad printing of Duration
1949 * a-reatim.adb (Time_Of): Complete rewrite to properly detect
1952 2015-05-21 Ed Schonberg <schonberg@adacore.com>
1954 * sem_ch5.adb: add (useless) initial value.
1955 * sem_ch3.adb (Replace_Anonymous_Access_To_Protected_Subprogram):
1956 Check whether the procedure has parameters before processing
1957 formals in ASIS mode.
1959 2015-05-21 Ed Schonberg <schonberg@adacore.com>
1961 * sem_ch13.adb (Check_Iterator_Functions): Emit error on Iterator
1962 aspect as well when indexing function is illegal.
1963 (Valid_Default_Iterator): Handle properly somme illegal cases
1964 to prevent compilation abandoned messages.
1965 (Check_Primitive_Function): Verify that type and indexing function
1966 are in the same scope.
1967 * freeze.adb (Freeze_Record): Extend patch on the presence of
1968 indexing aspects to aspect Default_Iterator.
1970 2015-05-19 David Malcolm <dmalcolm@redhat.com>
1972 * gcc-interface/trans.c (Sloc_to_locus1): Strenghthen local "map"
1973 from line_map * to line_map_ordinary *.
1975 2015-05-12 Jason Merrill <jason@redhat.com>
1977 * sigtramp-vxworks.c: Add space between string literal and macro
1980 2015-05-12 Arnaud Charlet <charlet@adacore.com>
1982 * gnat_rm.texi, gnat_ugn.texi, doc: Documentation updates and clean ups
1984 2015-05-12 Ed Schonberg <schonberg@adacore.com>
1986 * sem_ch5.adb (Analyze_Iterator_Specifications): Additional
1987 legality checks for array and container iterators:
1988 a) The domain of iteration cannot be a component that depends
1989 on discriminants of a mutable object. The check was recently
1990 added for element iterators.
1991 b) The cursor type cannot be a limited type at the point of the
1992 iteration, because the cursor will be assigned to in the body
1995 2015-05-12 Robert Dewar <dewar@adacore.com>
1997 * freeze.adb (Freeze_Record_Type): Make sure that if we have
1998 aspect Iterator_Element, then we have either Constant_Indexing
1999 or Variable_Indexing.
2001 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2003 * a-coormu.ads, a-coormu.adb: Add Indexing aspect, Reference_Type,
2004 and Reference_Control_Type to support element iterators over
2006 * a-ciormu.ads, a-ciormu.adb: Ditto for
2007 indefinite_ordered_multisets.
2009 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
2011 * exp_ch4.adb (Expand_N_Expression_With_Actions): Force
2012 the evaluation of the EWA expression. Code cleanup.
2013 (Process_Transient_Object): Code cleanup.
2014 * exp_util.adb (Is_Aliased): Controlled transient objects found
2015 within EWA nodes are not aliased.
2016 (Is_Finalizable_Transient): Iterators are not finalizable transients.
2018 2015-05-12 Robert Dewar <dewar@adacore.com>
2020 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
2021 Don't allow Atomic and Volatile_Full_Access for the same entity.
2023 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2025 * sem_ch5.adb (Analyze_Iterator_Specification): Implement new
2026 semantics and safety checks specified in AI12-0151.
2028 2015-05-12 Pierre-Marie de Rodat <derodat@adacore.com>
2030 * sem_ch10.adb (Sem_Ch10.Analyze_Proper_Body): Generate SCOs
2031 for subunit in generic units.
2033 2015-05-12 Robert Dewar <dewar@adacore.com>
2035 * sem_elab.adb (Check_A_Call): Avoid checking internal call
2038 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2040 * sem_ch6.adb (Process_Formals): An untagged incomplete type
2041 is legal in the profile of a null procedure.
2043 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2045 * sem_ch12.adb (Validate_Derived_Type_Instance): Handle properly
2046 the checks on a derived formal whose parent type is a previous
2047 formal that is not a derived type.
2049 2015-05-12 Robert Dewar <dewar@adacore.com>
2051 * aspects.ads, aspects.adb: Add entries for aspect Volatile_Full_Access
2052 * einfo.adb (Has_Volatile_Full_Access): New flag.
2053 (Has_Volatile_Full_Access): New flag.
2054 * einfo.ads (Has_Volatile_Full_Access): New flag.
2055 * par-prag.adb: Add dummy entry for Volatile_Full_Access.
2056 * sem_prag.adb (Analyze_Pragma, case Volatile_Full_Access):
2057 Implement new pragma.
2058 * snames.ads-tmpl: Add entries for pragma Volatile_Full_Access.
2060 2015-05-12 Robert Dewar <dewar@adacore.com>
2062 * targparm.ads: Minor reformatting.
2064 2015-05-12 Robert Dewar <dewar@adacore.com>
2066 * a-reatim.adb (Time_Of): Properly detect overflow when TS = 0.0.
2067 * a-reatim.ads: Minor reformatting.
2069 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
2071 * einfo.ads: Update the documentation of flags
2072 Has_Inherited_Default_Init_Cond and Has_Default_Init_Cond.
2074 2015-05-12 Robert Dewar <dewar@adacore.com>
2076 * impunit.adb: Add entry for a-dhfina.ads
2077 * a-dhfina.ads: New file.
2079 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2081 * exp_ch5.adb (Expand_Iterator_Loop_Over_Array): if the array
2082 type has convention Fortran, a multidimensional iterator varies
2083 the first dimension fastest.
2085 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
2087 * einfo.adb: Node32 is now used as Encapsulating_State.
2088 Node37 is now used as Associated_Entity.
2089 (Associated_Entity): New routine.
2090 (Encapsulating_State): Update the assertion guard to include constants.
2091 (Set_Associated_Entity): New routine.
2092 (Set_Encapsulating_State): Update the assertion guard to
2094 (Write_Field10_Name): Remove the output for Encapsulating_State.
2095 (Write_Field32_Name): Add output for Encapsulating_State.
2096 (Write_Field37_Name): Add output for Associated_Entity.
2097 * einfo.ads New attribute Associated_Entity along with placement
2098 in entities. Attribute Encapsulating_State now uses Node32.
2099 (Associated_Entity): New routine along with pragma Inline.
2100 (Set_Associated_Entity): New routine along with pragma Inline.
2101 * inline.ads Code reformatting.
2102 * sem_attr.adb (Analyze_Attribute): Correct the prefix of
2103 attribute 'Result when the context is a generic instantiation.
2104 (Analyze_Attribute_Old_Result): Pragmas Depends and
2105 Refined_Depends are a valid context for attribute 'Result.
2106 (Denote_Same_Function): Allow attribute 'Result to denote
2108 * sem_ch3.adb Add with and use clauses for Sem_Ch12.
2109 (Analyze_Declarations): Capture global references within the
2110 contracts of packages, subprograms and their respective bodies.
2111 * sem_ch6.adb (Analyze_Aspects_On_Body_Or_Stub): Removed.
2112 (Analyze_Completion_Contract): Removed.
2113 (Analyze_Generic_Subprogram_Body): Enchange the aspects after
2114 creating the generic copy. Create a generic contract for the
2115 template. Analyze the aspects of the generic body. Analyze the
2116 contract of the generic body when it is a compilation unit and
2117 capture global references.
2118 (Analyze_Subprogram_Body_Contract): Code cleanup.
2119 (Analyze_Subprogram_Contract): Do not save global references here.
2120 (Save_Global_References_In_List): Removed.
2121 * sem_ch7.adb (Analyze_Package_Body_Contract): Code cleanup.
2122 (Analyze_Package_Body_Helper): Create a generic contract for
2124 (Analyze_Package_Contract): Code cleanup.
2125 * sem_ch10.adb Add with and use clauses for Sem_Ch12.
2126 (Analyze_Compilation_Unit): Capture global references in a
2127 generic subprogram declaration that acts as a compilation unit.
2128 * sem_ch12.adb Add with and use clauses for Sem_Prag. Illustrate
2129 the implementation of generic contracts. Alphabetize various
2131 (Analyze_Generic_Package_Declaration):
2132 Create a generic contract for the template.
2133 (Analyze_Generic_Subprogram_Declaration): Create a generic
2134 contract for the template.
2135 (Analyze_Subprogram_Instantiation): Instantiate the contract of the
2137 (Copy_Generic_Node): Link defining entities of the generic template
2138 with the corresponding defining entities of the generic copy. Update
2139 the processing of pragmas.
2140 (Instantiate_Contract): Removed.
2141 (Instantiate_Subprogram_Contract): New routine.
2142 (Requires_Delayed_Save): New routine.
2143 (Save_Global_References): Rename formal parameter N to Templ. Various
2145 (Save_Global_References_In_Aspects): Moved from the spec.
2146 (Save_Global_References_In_Contract): New routine.
2147 (Save_References_In_Aggregate): New routine.
2148 (Save_References_In_Char_Lit_Or_Op_Symbol): New routine.
2149 (Save_References_In_Descendants): New routine.
2150 (Save_References_In_Identifier): New routine.
2151 (Save_References_In_Operator): New routine.
2152 (Save_References_In_Pragma): New routine.
2153 * sem_ch12.ads (Save_Global_References): Rename formal
2154 parameter N to Templ. Update the comment on usage.
2155 (Save_Global_References_In_Aspects): Moved to the body.
2156 (Save_Global_References_In_Contract): New routine.
2157 * sem_ch13.adb (Analyze_Aspect_Specifications_On_Body_Or_Stub):
2159 * sem_ch13.ads (Analyze_Aspect_Specifications_On_Body_Or_Stub):
2161 * sem_prag.adb (Add_Item_To_Name_Buffer): Add support for
2163 (Analyze_Contract_Cases_In_Decl_Part): Code cleanup.
2164 (Analyze_Depends_Global): New routine.
2165 (Analyze_Depends_In_Decl_Part): Code cleanup.
2166 (Analyze_Global_In_Decl_Part): Code cleanup.
2167 (Analyze_Global_Item): Constants are now valid global items. Do
2168 not perform state-related checks in an instance. Change the way
2169 renamings are handled. (Analyze_Initial_Condition_In_Decl_Part):
2171 (Analyze_Initializes_In_Decl_Part): Code cleanup.
2172 (Analyze_Input_Output): The analysis of attribute 'Result in
2173 the context of pragmas Depends or Refined_Depends now reuses
2174 the existing attribute analysis machinery. Constants and
2175 generic parameters are now valid dependency items. Do not
2176 perform state-related checks in an instance. Change the way
2177 renamings are handled. (Analyze_Pragma): Add a "characteristics"
2178 section for pragmas Abstract_State, Contract_Cases, Depends,
2179 Extensions_Visible, Global, Initial_Condition, Initializes,
2180 Post, Post_Class, Postcondition, Pre, Pre_Class, Precondition,
2181 Refined_Depends, Refined_Global, Refined_Post, Refined_State, Test_Case.
2182 (Analyze_Pre_Post_Condition): Do not create a generic
2184 (Analyze_Pre_Post_Condition_In_Decl_Part): Code cleanup.
2185 (Analyze_Refined_Depends_Global_Post): New routine.
2186 (Analyze_Refined_Depends_In_Decl_Part): Code cleanup.
2187 (Analyze_Refined_Global_In_Decl_Part): Code cleanup.
2188 (Analyze_Refined_Pragma): Removed.
2189 (Analyze_Refined_State_In_Decl_Part): Code cleanup.
2190 (Analyze_Test_Case_In_Decl_Part): Code cleanup.
2191 (Check_Dependency_Clause): Do not perform this check in an instance.
2192 (Check_Function_Return): Add support for generic functions.
2193 (Check_In_Out_States): Do not perform this check in an instance.
2194 (Check_Input_States): Do not perform this check in an instance.
2195 (Check_Mode_Restriction_In_Function): Add support for generic functions.
2196 (Check_Output_States): Do not perform this check in an instance.
2197 (Check_Postcondition_Use_In_Inlined_Subprogram): Rename
2198 parameter Subp_Id to Spec_Id and update comment on usage.
2199 (Check_Proof_In_States): Do not perform this check in an instance.
2200 (Check_Refined_Global_Item): Add support for constants.
2201 (Check_Refined_Global_List): Do not perform this check in an instance.
2202 (Collect_Global_Items): Reimplemented.
2203 (Collect_Subprogram_Inputs_Outputs): Add support for generic parameters.
2204 (Create_Generic_Template): Removed.
2205 (Find_Related_Package_Or_Body): Moved to spec.
2206 (Find_Role): Add support for generic parameters and constants.
2207 (Get_Argument): Moved to spec. Rename parameter Spec_Id to Context_Id.
2208 (Match_Item): Add support for constants.
2209 (Preanalyze_Test_Case_Arg): Reimplemented.
2210 (Report_Extra_Clauses): Do not perform this check in an instance.
2211 (Report_Extra_Constituents): Do not perform this check in an instance.
2212 * sem_prag.ads (Collect_Subprogram_Inputs_Outputs): Update
2213 the comment on usage.
2214 (Find_Related_Package_Or_Body): Moved from body.
2215 (Get_Argument): Moved from body.
2216 * sem_util.adb Add with and use clauses for Sem_Ch12.
2217 (Corresponding_Spec_Of): Add support for packages and package bodies.
2218 (Create_Generic_Contract): New routine.
2219 (Is_Contract_Annotation): Reimplemented.
2220 (Is_Generic_Declaration_Or_Body): New routine.
2221 (Is_Package_Contract_Annotation): New routine.
2222 (Is_Subprogram_Contract_Annotation): New routine.
2223 * sem_util.ads (Corresponding_Spec_Of): Update the comment on usage.
2224 (Create_Generic_Contract): New routine.
2225 (Is_Generic_Declaration_Or_Body): New routine.
2226 (Is_Package_Contract_Annotation): New routine.
2227 (Is_Subprogram_Contract_Annotation): New routine.
2228 * sinfo.adb (Is_Generic_Contract_Pragma): New routine.
2229 (Set_Is_Generic_Contract_Pragma): New routine.
2230 * sinfo.ads Add new attribute Is_Generic_Contract_Pragma along
2231 with occurrences in nodes.
2232 (Is_Generic_Contract_Pragma): New routine along with pragma Inline.
2233 (Set_Is_Generic_Contract_Pragma): New routine along with pragma Inline.
2234 * treepr.adb (Print_Entity_Info): Output fields 36 to 41.
2236 2015-05-12 Robert Dewar <dewar@adacore.com>
2238 * a-taster.ads: Minor comment fix: fix bad header, this is a
2241 2015-05-12 Robert Dewar <dewar@adacore.com>
2243 * sem_intr.adb: (Check_Shift): Diagnose bad modulus value.
2245 2015-05-12 Robert Dewar <dewar@adacore.com>
2247 * gnat1drv.adb (Adjust_Global_Switches): Default to suppressing
2248 Alignment_Checks on non-strict alignment machine.
2249 * sem_ch13.adb (Validate_Address_Clauses): Don't give
2250 compile-time alignment warnings if run time Alignment_Check
2253 2015-05-12 Thomas Quinot <quinot@adacore.com>
2255 * g-sercom.ads, g-sercom-linux.adb (GNAT.Serial_Communications.
2256 Data_Rate): New literals B75, B110, B150, B300, B600.
2258 2015-05-12 Doug Rupp <rupp@adacore.com>
2260 * init.c (__gnat_init_float) [vxworks]: For e500v2,
2261 do nothing and leave the responsibility to install the handler
2262 and enable the exceptions to the BSP.
2264 2015-05-12 Robert Dewar <dewar@adacore.com>
2266 * sem_ch9.adb, einfo.ads, exp_intr.adb: Minor reformatting.
2267 * sem_disp.adb: Minor code reorganization (remove junk redundant
2269 * exp_unst.adb (Unnest_Subprogram.Uplev_Refs): Ignore uplevel
2270 references to bounds of types coming from original type reference.
2271 * checks.ads: Minor reformatting.
2272 * checks.adb: Minor reformatting.
2273 * sem_prag.adb (Analyze_Pragma, case Check): If in ignored
2274 assertion, then make sure we do not drag in bignum stuff.
2276 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2278 * sem_ch9.adb (Collect_Interfaces): Initialize
2279 Direct_Primitive_Operations for a tagged synchronized type,
2280 so it can used in ASIS mode.
2281 * sem_disp.adb (Check_Dispatching_Operation): If expansion is
2282 disabled, attach subprogram to list of Direct_Primitive_Operations
2283 of synchronized type itself, for ASIS use, because in this case
2284 Corresponding_Record_Type is not built.
2285 * einfo.ads: Indicate use of Direct_Primitive_Operations on
2288 2015-05-12 Pierre-Marie de Rodat <derodat@adacore.com>
2290 * exp_pakd.adb: Make clearer the comment in exp_pakd.adb about
2293 2015-05-12 Robert Dewar <dewar@adacore.com>
2295 * sem_ch3.adb, sem_util.adb, sem_ch6.adb: Minor reformatting.
2297 2015-05-12 Robert Dewar <dewar@adacore.com>
2299 * exp_unst.adb (Visit_Node): Deal with subprogram and package stubs.
2301 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2303 * exp_intr.adb (Expand_Dispatching_Constructor_Call): The
2304 tag to be retrieved for the generated call is the first entry
2305 in the dispatch table for the return type of the instantiated
2308 2015-05-12 Bob Duff <duff@adacore.com>
2310 * exp_ch7.adb, exp_ch7.ads, exp_intr.adb, exp_util.adb,
2311 exp_util.ads: Update comments.
2313 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2315 * sem_ch3.adb (Add_Internal_Interface_Entities): Do no generate
2316 freeze nodes for these in ASIS mode, because they lead to
2317 elaoration order issues in gigi.
2319 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
2321 * sem_ch6.adb (Analyze_Expression_Function): Code
2322 cleanup. Use Copy_Subprogram_Spec to create a proper spec.
2323 (Analyze_Subprogram_Body_Helper): Code cleanup. Do not
2324 prepare a stand alone body for inlining in GNATprove mode
2325 when inside a generic. (Body_Has_Contract): Reimplemented.
2326 (Build_Subprogram_Declaration): New routine.
2327 * sem_ch10.adb (Analyze_Compilation_Unit): Capture global
2328 references within generic bodies by loading them.
2329 * sem_util.adb (Copy_Parameter_List): Code cleanup.
2330 (Copy_Subprogram_Spec): New routine.
2331 (Is_Contract_Annotation): New routine.
2332 * sem_util.ads (Copy_Subprogram_Spec): New routine.
2333 (Is_Contract_Annotation): New routine.
2335 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
2337 * sem_attr.adb (Resolve_Attribute): Do not analyze the generated
2338 body of an expression function when the prefix of attribute
2339 'Access is the body.
2341 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2343 * sem_ch3.adb (Build_Derived_Enumeration_Type): The anonymous base
2344 created for a derived enumeration type is not a first subtype,
2345 even though it is defined through a full type declaration.
2346 * sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): Do not process
2347 aspects for the anonymous base type constructed for a derived
2348 scalar type, because they will be set when the first subtype
2350 (Inherit_Aspects_At_Freeze_Point): Fix typos on handling of
2351 Default_Value and Default_Component_Value, that prevented the
2352 proper inheritance of these aspects.
2354 2015-05-12 Gary Dismukes <dismukes@adacore.com>
2356 * exp_ch6.adb, exp_unst.adb: Minor typo fixes.
2358 2015-05-12 Robert Dewar <dewar@adacore.com>
2360 * sem_ch3.adb: Minor reformatting.
2362 2015-05-12 Vincent Celier <celier@adacore.com>
2364 * gnatcmd.adb: If we want to invoke gnatmake (gnatclean) with
2365 -P, then check if gprbuild (gprclean) is available; if it is,
2366 use gprbuild (gprclean) instead of gnatmake (gnatclean).
2368 2015-05-12 Robert Dewar <dewar@adacore.com>
2370 * debug.adb: Add flag -gnatd.3 to output diagnostic info from
2372 * einfo.ad, einfo.adb: Reorganize (and remove most of) flags used by
2374 * exp_ch6.adb (Unest_Bodies): Table for delayed calls to
2375 Unnest_Subprogram (Expand_N_Subprogram_Body): Add entry to table
2376 for later call instead of calling Unnest_Subprogram directly
2377 (Initialize): New procedure (Unnest_Subprograms): New procedure
2378 * exp_ch6.ads (Add_Extra_Actual_To_Call): Move into proper
2380 (Initialize): New procedure.
2381 (Unnest_Subprograms): New procedure.
2382 * exp_unst.adb (Unnest_Subprogram): Major rewrite, moving
2383 all processing to this routine which is now called late
2384 after instantiating bodies. Fully handles the case of generic
2386 * exp_unst.ads: Major rewrite, moving all processing to
2388 * frontend.adb (Frontend): Add call to Exp_Ch6.Initialize.
2389 (Frontend): Add call to Unnest_Subprograms.
2390 * sem_ch8.adb (Find_Direct_Name): Back to old calling sequence
2391 for Check_Nested_Access.
2392 * sem_util.adb (Build_Default_Subtype): Minor reformatting
2393 (Check_Nested_Access): Back to original VM-only form (we
2394 now do all the processing for Unnest_Subprogram at the time
2396 (Denotes_Same_Object): Minor reformatting
2397 (Note_Possible_Modification): Old calling sequence for
2398 Check_Nested_Access.
2399 * sem_util.ads (Check_Nested_Access): Back to original VM-only
2400 form (we now do all the processing for Unnest_Subprogram at the
2403 2015-05-12 Robert Dewar <dewar@adacore.com>
2405 * sem_ch3.adb, freeze.adb, sem_ch6.adb: Minor reformatting.
2407 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2409 * sem_ch3.adb (Analyze_Object_Declaration): New function
2410 Has_Delayed_Aspect, used to defer resolution of an aggregate
2411 expression when the object declaration carries aspects Address
2413 * freeze.adb (Freeze_Object_Declaration): New subsidiary procedure
2414 to Freeze_Entity. In addition to the previous processing steps
2415 at the freeze point of an object, this procedure also handles
2416 aggregates in object declarations, when the declaration carries
2417 delayed aspects that require that the initialization of the
2418 object be attached to its freeze actions.
2420 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2422 * sem_ch6.adb (Analyze_Subprogram_Declaration): Following
2423 AI12-0147, null procedures and expression functions are allowed
2424 in protected bodies.
2426 2015-05-12 Tristan Gingold <gingold@adacore.com>
2428 * i-cpoint.adb (Copy_Terminated_Array): Copy nothing if Length is 0.
2430 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2432 * sem_ch3.adb (Complete_Private_Subtype): Propagate
2433 Has_Delayed_Aspects flag from private to full view, to ensure
2434 that predicate functions are constructed.
2436 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2438 * sem_ch6.adb (Process_Formals): If a tagged formal is an
2439 incomplete class-wide type, the subprogram must have a delayed
2440 freeze even though the opertation is not a primitive of the
2441 type. THis ensures that the backend can recover the full view
2442 when elaborating the subprogram declaration.
2444 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2446 * exp_util.adb (Get_Current_Value_Condition): Nothing to be
2447 done if an elsif part has been rewritten so that it is not part
2448 of an enclosing if_statement.
2450 2015-05-12 Robert Dewar <dewar@adacore.com>
2452 * sem_type.adb, sem_ch10.adb, freeze.adb, sem_ch6.adb, exp_disp.adb:
2455 2015-05-12 Bob Duff <duff@adacore.com>
2457 * exp_attr.adb (Size): Remove unnecessary check for types with
2458 unknown discriminants. That was causing the compiler to build
2459 a function call _size(T), where T is a type, not an object.
2461 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2463 * sem_ch4.adb (Extended_Primitive_Ops): Exclude overriding
2464 primitive operations of a type extension declared in the package
2465 body, to prevent duplicates in extended list.
2467 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2469 * sem_ch3.adb (Analyze_Component_Declaration): If the component is
2470 an unconstrained synchronized type with discriminants, create a
2471 constrained default subtype for it, so that the enclosing record
2472 can be given the proper size.
2473 * sem_util.adb (Build_Default_Subtype): If the subtype is created
2474 for a record discriminant, do not analyze the declarztion at
2475 once because it is added to the freezing actions of the enclosing
2478 2015-05-12 Robert Dewar <dewar@adacore.com>
2480 * exp_prag.adb (Expand_N_Pragma): Rewrite ignored pragma as
2482 * namet.ads (Boolean3): Document this flag used for Ignore_Pragma.
2483 * par-prag.adb (Prag): Implement Ignore_Pragma.
2484 * sem_prag.adb: Implement Ignore_Pragma.
2485 * snames.ads-tmpl: Add entries for pragma Ignore_Pragma.
2487 2015-05-12 Javier Miranda <miranda@adacore.com>
2489 * sem_ch10.adb (Build_Shadow_Entity): Link the class-wide shadow
2490 entity with its corresponding real entity.
2491 (Decorate_Type): Unconditionally build the class-wide shadow entity of
2493 * einfo.ads, einfo.adb (Has_Non_Limited_View): New synthesized
2495 (Non_Limited_View): Moved from field 17 to field 19 be available
2496 in class-wide entities.
2497 * exp_attr.adb (Access_Cases): Code cleanup.
2498 * exp_disp.adb (Expand_Interface_Actuals): Ditto.
2499 * exp_util.adb (Non_Limited_Designated_Type): Ditto.
2500 * freeze.adb (Build_Renamed_Bdody): Ditto.
2501 * sem_aux.adb (Available_View): Ditto.
2502 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
2503 (Try_One_Prefix_Interpretation): Ditto.
2504 * sem_ch5.adb (Analyze_Assignment): Ditto.
2505 * sem_ch6.adb (Detect_And_Exchange): Ditto.
2506 * sem_ch8.adb (Find_Expanded_Name): Ditto.
2507 * sem_disp.adb (Check_Controlling_Type): Ditto.
2508 * sem_res.adb (Resolve_Type_Conversion): Ditto.
2509 (Full_Designated_Type): Ditto.
2510 * sem_type.adb (Covers): Ditto.
2511 * sem_util.adb: Fix typo in comment.
2513 2015-05-12 Robert Dewar <dewar@adacore.com>
2515 * exp_unst.adb (Get_Real_Subp): New subprogram.
2516 (Unnest_Subprogram): Use Get_Real_Subp.
2517 (Uplev_Refs_For_One_Subp): Skip if no ARECnU entity.
2518 (Uplev_Refs_For_One_Subp): Use actual subtype in unconstrained case.
2520 2015-05-12 Robert Dewar <dewar@adacore.com>
2522 * a-reatim.adb ("/"): Add explicit check for Time_Span_First / -1.
2524 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2526 * sem_ch4.adb (Extended_Primitive_Ops): New subprogram,
2527 auxiliary to Try_Primitive_Operation to handle properly prefixed
2528 calls where the operation is not a primitive of the type, but
2529 is declared in the package body that is in the immediate scope
2532 2015-05-12 Robert Dewar <dewar@adacore.com>
2534 * sem_util.adb (Is_Variable): Allow X'Deref(Y) as a variable.
2536 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2538 * sem_ch8.adb (Find_Expanded_Name): Handle properly a fully
2539 qualified name for an instance of a generic grand-child unit in
2540 the body its parent.
2542 2015-05-12 Robert Dewar <dewar@adacore.com>
2544 * exp_unst.adb (Upref_Name): New subprogram.
2545 (Unnest_Subprogram): Use Upref_Name.
2546 (Unnest_Subprogram): Use new Deref attribute.
2547 * exp_unst.ads: Doc updates.
2549 2015-05-12 Thomas Quinot <quinot@adacore.com>
2551 * adaint.c: Enable Large File Support in adaint so that __gnat_readdir
2552 can access files on filesystems mounted from servers that use large
2555 2015-05-09 Eric Botcazou <ebotcazou@adacore.com>
2557 * gcc-interface/utils.c (gnat_write_global_declarations): Use type_decl
2558 method instead of global_decl for TYPE_DECLs.
2560 2015-04-27 Jim Wilson <jim.wilson@linaro.org>
2562 * gcc-interface/Makefile-lan.in (ada.mostlyclean): Remove gnatbind
2565 2015-04-13 Eric Botcazou <ebotcazou@adacore.com>
2567 * gnatvsn.ads (Library_Version): Bump to 6.
2569 2015-04-09 Iain Sandoe <iain@codesourcery.com>
2571 * gcc-interface/Makefile.in (darwin, powerpc): Enable atomics.
2573 2015-04-08 Eric Botcazou <ebotcazou@adacore.com>
2575 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Do not make
2576 a function returning an unconstrained type 'const' for the middle-end.
2578 * gcc-interface/trans.c (Pragma_to_gnu) <case Pragma_Warning>: Use
2579 exact condition to detect Reason => "..." pattern.
2581 2015-03-31 Tom de Vries <tom@codesourcery.com>
2584 * terminals.c (child_setup_tty): Fix warning 'argument to sizeof in
2585 bzero call is the same expression as the destination'.
2587 2015-03-26 Eric Botcazou <ebotcazou@adacore.com>
2589 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Deref>: New case.
2591 2015-03-24 Gary Dismukes <dismukes@adacore.com>
2593 * sem_ch3.adb: Minor typo fix (missing paren).
2595 2015-03-24 Robert Dewar <dewar@adacore.com>
2597 * sinfo.ads: Update comment.
2599 2015-03-24 Robert Dewar <dewar@adacore.com>
2601 * exp_attr.adb: Add entry for typ'Deref.
2602 * sem_attr.adb (Deref): New GNAT attribute.
2603 * sem_attr.ads: Add entry for new GNAT attribute Deref.
2604 * snames.ads-tmpl: Add entries for new attribute Deref.
2606 2015-03-24 Ed Schonberg <schonberg@adacore.com>
2608 * sem_ch13.adb (Rep_Item_Too_Early): allow pragma Convention
2611 2015-03-24 Gary Dismukes <dismukes@adacore.com>
2613 * inline.adb: Minor typo fix.
2615 2015-03-24 Arnaud Charlet <charlet@adacore.com>
2617 * doc/gnat_ugn/building_executable_programs_with_gnat.rst,
2618 doc/gnat_ugn/gnat_utility_programs.rst
2619 doc/gnat_rm/implementation_defined_attributes.rst
2620 doc/gnat_rm/implementation_defined_pragmas.rst
2621 doc/gnat_rm/representation_clauses_and_pragmas.rst
2622 doc/gnat_rm/about_this_guide.rst
2623 doc/gnat_rm/implementation_of_ada_2012_features.rst: Doc improvements.
2624 * gnat_rm.texi, gnat_ugn.texi: Regenerate.
2626 2015-03-23 Jakub Jelinek <jakub@redhat.com>
2629 * adadecode.c (ada_demangle): Guard with IN_RTS instead of IN_GCC.
2631 2015-03-20 Eric Botcazou <ebotcazou@adacore.com>
2634 * gcc-interface/utils.c (gnat_pushdecl): Tidy up and improve comment.
2635 Make sure to chain only main variants through TYPE_NEXT_PTR_TO.
2637 * gcc-interface/trans.c (Attribute_to_gnu): Revert latest change.
2639 2015-03-16 Eric Botcazou <ebotcazou@adacore.com>
2641 * gcc-interface/utils2.c (gnat_invariant_expr): Return null if the type
2642 of the expression ends up being composite.
2644 2015-03-16 Eric Botcazou <ebotcazou@adacore.com>
2646 * gcc-interface/decl.c (is_from_limited_with_of_main): New predicate.
2647 (gnat_to_gnu_entity) <E_Subprogram_Type>: Invoke it on return and
2648 parameter types to detect circularities in ASIS mode.
2649 * gcc-interface/trans.c (Attribute_to_gnu): Mention AI05-0151.
2651 2015-03-16 Eric Botcazou <ebotcazou@adacore.com>
2653 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Abstract_State>: Do not
2654 short-circuit the regular handling.
2656 2015-03-13 Robert Dewar <dewar@adacore.com>
2658 * exp_unst.adb (Note_Uplevel_Reference): Eliminate duplicate
2660 (Actual_Ref): New function.
2661 (AREC_String): Minor reformatting.
2662 (Unnest_Subprogram): Use Actual_Ref.
2663 * frontend.adb (Frontend): Turn off Unnest_Subprogram_Mode
2664 before call to Instantiate_Bodies.
2666 2015-03-13 Ed Schonberg <schonberg@adacore.com>
2668 * freeze.adb (Freeze_Profile): If the return type of a function
2669 being frozen is an untagged limited view and the function is
2670 abstract, mark the type as frozen because there is no later
2671 point at which the profile of the subprogram will be elaborated.
2673 2015-03-13 Robert Dewar <dewar@adacore.com>
2675 * einfo.adb, einfo.ads, atree.adb, atree.ads, atree.h: Add seventh
2676 component to entities. Add new fields Field36-41 and Node36-41.
2678 2015-03-13 Claire Dross <dross@adacore.com>
2680 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Rewrite after review.
2682 2015-03-13 Robert Dewar <dewar@adacore.com>
2684 * exp_util.adb (Is_Volatile_Reference): Compile time known
2685 value is never considered to be a volatile reference.
2687 2015-03-13 Robert Dewar <dewar@adacore.com>
2689 * sem_ch3.adb (Analyze_Object_Contract): Suppress "constant
2690 cannot be volatile" for internally generated object (such as
2691 FIRST and LAST constants).
2693 2015-03-13 Ed Schonberg <schonberg@adacore.com>
2695 * sem_ch12.adb (Validate_Access_Subprogram_Instance): If a
2696 convention is specified for the formal parameter, verify that
2697 the actual has the same convention.
2698 * sem_prag.adb (Set_Convention_From_Pragma): Allow convention
2699 pragma to be set on a generic formal type.
2700 * sem_util.adb (Set_Convention): Ignore within an instance,
2701 as it has already been verified in the generic unit.
2703 2015-03-13 Claire Dross <dross@adacore.com>
2705 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do not inline
2706 subprograms with unconstrained record parameters containing
2708 * sinfo.ads Document GNATprove assumption that type should match
2710 * sem_ch6.adb (Analyze_Subprogram_Body_Contract):
2711 Do not check for Refined_Depends and Refined_Globals contracts
2712 as they are optional.
2714 2015-03-13 Ed Schonberg <schonberg@adacore.com>
2716 * sem_ch12.adb (Instantiate_Type): For a floating-point type,
2717 capture dimension info if any, because the generated subtype
2718 declaration does not come from source and will not process dimensions.
2719 * sem_dim,adb (Analyze_Dimension_Extension_Or_Record_Aggregate):
2720 Do not analyze expressions with an initialization procedure
2721 because aggregates will have been checked at the point of record
2724 2015-03-13 Robert Dewar <dewar@adacore.com>
2726 * aspects.ads, aspects.adb: Add entries for aspect Unimplemented.
2727 * einfo.ads, einfo.adb (Is_Unimplemented): New flag.
2728 * sem_ch13.adb: Add dummy entry for aspect Unimplemented.
2729 * snames.ads-tmpl: Add entry for Name_Unimplemented.
2731 2015-03-13 Gary Dismukes <dismukes@adacore.com>
2733 * style.adb (Missing_Overriding): Apply the
2734 Comes_From_Source test to the Original_Node of the subprogram
2735 node, to handle the case of a null procedure declaration that
2736 has been rewritten as an empty procedure body.
2738 2015-03-13 Robert Dewar <dewar@adacore.com>
2740 * exp_util.ads: Minor fix to comment.
2741 * sem_ch3.adb (Constrain_Index): Correct pasto from previous
2744 2015-03-13 Robert Dewar <dewar@adacore.com>
2746 * exp_util.ads, exp_util.adb (Force_Evaluation): Add Related_Id and
2747 Is_Low/High_Bound params.
2748 * sem_ch3.adb (Constrain_Index): Use new Force_Evaluation calling
2749 sequence to simplify generation of FIRST/LAST temps for bounds.
2751 2015-03-12 Olivier Hainque <hainque@adacore.com>
2753 * gcc-interface/trans.c (Attribute_to_gnu) <Code_Address case>:
2754 On targets where a function symbol designates a function descriptor,
2755 fetch the function code address from the descriptor.
2756 (USE_RUNTIME_DESCRIPTORS): Provide a default definition.
2758 2015-03-04 Robert Dewar <dewar@adacore.com>
2760 * sem_warn.adb: Minor reformatting.
2761 * init.c: Minor tweaks.
2763 2015-03-04 Dmitriy Anisimko <anisimko@adacore.com>
2765 * a-coinho-shared.adb: Fix clear of already empty holder.
2767 2015-03-04 Robert Dewar <dewar@adacore.com>
2769 * exp_unst.adb (Check_Dynamic_Type): Ignore library level types.
2770 (Check_Uplevel_Reference_To_Type): Ignore call inside generic.
2771 (Note_Uplevel_Reference): Ignore call inside generic.
2772 (Note_Uplevel_Reference): Fix check for no entity field.
2773 (Unnest_Subprogram): Ignore call inside generic.
2774 (Find_Current_Subprogram): Use Defining_Entity, not Defining_Unit_Name.
2775 (Visit_Node): Ignore calls to Imported subprograms.
2776 (Visit_Node): Fix problem in finding subprogram body in some cases.
2777 (Add_Form_To_Spec): Use Defining_Entity, not Defining_Unit_Name.
2779 2015-03-04 Robert Dewar <dewar@adacore.com>
2781 * einfo.adb (Is_ARECnF_Entity): Removed.
2782 (Last_Formal): Remove special handling of Is_ARECnF_Entity.
2783 (Next_Formal): Remove special handling of Is_ARECnF_Entity.
2784 (Next_Formal_With_Extras): Remove special handling of Is_ARECnF_Entity.
2785 (Number_Entries): Minor reformatting.
2786 * einfo.ads (Is_ARECnF_Entity): Removed.
2787 * exp_unst.adb (Unnest_Subprogram): Remove setting of
2789 (Add_Extra_Formal): Use normal Extra_Formal circuit.
2790 * sprint.adb (Write_Param_Specs): Properly handle case where
2791 there are no source formals, but we have at least one Extra_Formal
2794 2015-03-04 Ed Schonberg <schonberg@adacore.com>
2796 * sem_aggr.adb (Resolve_Record_Aggregate,
2797 Add_Discriminant_Values): If the value is a reference to the
2798 current instance of an enclosing type, use its base type to check
2799 against prefix of attribute reference, because the target type
2800 may be otherwise constrained.
2802 2015-03-04 Robert Dewar <dewar@adacore.com>
2804 * atree.h: Add entries for Flag287-Flag309.
2805 * einfo.adb: Add (unused) flags Flag287-Flag309.
2807 2015-03-04 Ed Schonberg <schonberg@adacore.com>
2809 * sem_util.adb (Collect_Interfaces, Collect): When gathering
2810 interfaces of ancestors, handle properly a subtype of a private
2813 2015-03-04 Robert Dewar <dewar@adacore.com>
2815 * einfo.adb (Is_ARECnF_Entity): New flag (ARECnF is an extra formal).
2816 (Next_Formal): Don't return ARECnF formal.
2817 (Last_Formal): Don't consider ARECnF formal.
2818 (Next_Formal_With_Extras): Do consider ARECnF formal.
2819 * einfo.ads (Is_ARECnF_Entity): New flag (ARECnF is an extra formal).
2820 * exp_unst.adb (Create_Entities): Set Is_ARECnF_Entity flag.
2822 2015-03-04 Javier Miranda <miranda@adacore.com>
2824 * exp_ch6.adb (Expand_Simple_Function_Return): When the returned
2825 object is a class-wide interface object and we generate the
2826 accessibility described in RM 6.5(8/3) then displace the pointer
2827 to the object to reference the base of the object (to get access
2828 to the TSD of the object).
2830 2015-03-04 Hristian Kirtchev <kirtchev@adacore.com>
2832 * sem_prag.adb (Analyze_Abstract_State): Use routine
2833 Malformed_State_Error to issue general errors.
2834 (Analyze_Pragma): Diagnose a syntax error related to a state
2835 declaration with a simple option.
2836 (Malformed_State_Error): New routine.
2838 2015-03-04 Robert Dewar <dewar@adacore.com>
2840 * a-strsup.adb (Super_Slice): Deal with super flat case.
2841 * einfo.ads: Minor reformatting.
2842 * s-imgdec.adb (Set_Decimal_Digits): Add comment about possibly
2845 2015-03-04 Claire Dross <dross@adacore.com>
2847 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
2848 a-cforse.ads, a-cofove.ads: Use Default_Initial_Condition on formal
2851 2015-03-04 Ed Schonberg <schonberg@adacore.com>
2853 * sem_warn.adb (Check_References): When checking for an unused
2854 in-out parameter of a class- wide type, use its type to determine
2855 whether it is private, in order to avoid a spurious warning when
2856 subprogram spec and body are in different units.
2858 2015-03-04 Yannick Moy <moy@adacore.com>
2860 * sem_attr.adb: Improve warning messages.
2862 2015-03-04 Robert Dewar <dewar@adacore.com>
2864 * exp_ch6.adb (Expand_N_Subprogram_Body): Avoid trying to unnest
2865 generic subprograms.
2866 * exp_unst.adb (Check_Dynamic_Type): Handle record types properly
2867 (Note_Uplevel_Reference): Ignore uplevel references to non-types
2868 (Get_Level): Consider only subprograms, not blocks.
2869 (Visit_Node): Set proper condition for generating ARECnF entity.
2870 Ignore indirect calls. Ignore calls to subprograms
2872 (Unnest_Subprogram): Minor changes in dealing with ARECnF entity.
2873 (Add_Form_To_Spec): Properly set Last_Entity field.
2874 (Unnest_Subprogram): Set current subprogram scope for analyze calls.
2875 Handle case of no uplevel refs in outer subprogram
2876 Don't mark uplevel entities as aliased.
2877 Don't deal with calls with no ARECnF requirement.
2879 2015-03-04 Robert Dewar <dewar@adacore.com>
2881 * s-valrea.adb (Scan_Real): Remove redundant tests from scaling loops.
2882 * s-imgdec.adb (Set_Decimal_Digits): Remove redundant Max
2883 operation in computing LZ.
2884 * sem_attr.adb: Minor typo fix
2886 2015-03-04 Robert Dewar <dewar@adacore.com>
2888 * exp_ch7.adb: Minor reformatting.
2889 * exp_unst.adb (Build_Tables): Fix minor glitch for no separate
2891 * erroutc.adb (Delete_Msg): add missing decrement of info msg counter.
2893 2015-03-04 Hristian Kirtchev <kirtchev@adacore.com>
2895 * exp_ch6.adb (Build_Pragma_Check_Equivalent): Suppress
2896 references to formal parameters subject to pragma Unreferenced.
2897 (Suppress_Reference): New routine.
2898 * sem_attr.adb (Analyze_Attribute): Reimplement the analysis
2899 of attribute 'Old. Attributes 'Old and 'Result now share
2901 (Analyze_Old_Result_Attribute): New routine.
2902 (Check_Placement_In_Check): Removed.
2903 (Check_Placement_In_Contract_Cases): Removed.
2904 (Check_Placement_In_Test_Case): Removed.
2905 (Check_Use_In_Contract_Cases): Removed.
2906 (Check_Use_In_Test_Case): Removed.
2907 (In_Refined_Post): Removed.
2908 (Is_Within): Removed.
2909 * sem_warn.adb (Check_Low_Bound_Tested): Code cleanup.
2910 (Check_Low_Bound_Tested_For): New routine.
2912 2015-03-04 Hristian Kirtchev <kirtchev@adacore.com>
2914 * exp_ch3.adb (Expand_N_Object_Declaration):
2915 Generate a runtime check to test the expression of pragma
2916 Default_Initial_Condition when the object is default initialized.
2918 2015-03-02 Robert Dewar <dewar@adacore.com>
2920 * scng.adb (Scan): Ignore illegal character in relaxed
2923 2015-03-02 Ed Schonberg <schonberg@adacore.com>
2925 * sem_ch4.adb (Analyze_Set_Membership); Retain Overloaded flag
2926 on left operand, so it can be properly resolved with type of
2927 alternatives of right operand.
2928 * sem_res.adb (Resolve_Set_Membership): Handle properly an
2929 overloaded left-hand side when the alternatives on the right
2930 hand side are literals of some universal type. Use first
2931 non-overloaded alternative to find expected type.
2933 2015-03-02 Ed Schonberg <schonberg@adacore.com>
2935 * exp_ch7.adb (Make_Set_Finalize_Address_Call): Use underlying
2936 type to retrieve designated type, because the purported access
2937 type may be a partial (private) view, when it is declared in
2938 the private part of a nested package, and finalization actions
2939 are generated when completing compilation of enclosing unit.
2941 2015-03-02 Robert Dewar <dewar@adacore.com>
2943 * back_end.adb (Call_Back_End): Remove previous patch,
2944 the back end now gets to see the result of -gnatd.1
2945 (Unnest_Subprogram_Mode) processing.
2946 * elists.ads, elists.adb (List_Length): New function.
2947 * exp_unst.ads, exp_unst.adb: Major changes, first complete version.
2948 * sem_util.adb (Check_Nested_Access): Handle formals in
2949 Unnest_Subprogram_Mode.
2950 (Adjust_Named_Associations): Minor reformatting.
2951 * sprint.adb (Sprint_Node_Actual): Fix failure to print aliased
2954 2015-03-02 Robert Dewar <dewar@adacore.com>
2956 * atree.ads, atree.adb (Uint24): New function
2957 (Set_Uint24): New procedure.
2958 * atree.h (Uint24): New macro for field access.
2959 * back_end.adb (Call_Back_End): For now, don't call back end
2960 if unnesting subprogs.
2961 * einfo.adb (Activation_Record_Component): New field
2962 (Subps_Index): New field.
2963 * einfo.ads (Activation_Record_Component): New field
2964 (Subps_Index): New field Minor reordering of comments into alpha order.
2965 * exp_unst.ads, exp_unst.adb: Continued development.
2967 2015-03-02 Gary Dismukes <dismukes@adacore.com>
2969 * exp_disp.ads: Minor reformatting.
2971 2015-03-02 Ed Schonberg <schonberg@adacore.com>
2973 * sem_ch8.adb (Chain_Use_Clause): Do not chain use clause from
2974 ancestor to list of use clauses active in descendant unit if we
2975 are within the private part of an intervening parent, to prevent
2976 circularities in use clause list.
2978 2015-03-02 Javier Miranda <miranda@adacore.com>
2980 * exp_ch9.adb (Build_Corresponding_Record): Propagate type
2981 invariants to the corresponding record type.
2982 * exp_disp.ad[sb] (Set_DT_Position_Value): New subprogram
2983 which sets the value of the DTC_Entity associated with a given
2984 primitive of a tagged type and propagates the value to the
2986 (Set_DTC_Entity_Value): Propagate the DTC
2987 value to the wrapped entity.
2988 * sem_ch13.adb (Build_Invariant_Procedure): Append the code
2989 associated with invariants of progenitors.
2990 * sem_ch3.adb (Build_Derived_Record_Type): Inherit type invariants
2991 of parents and progenitors.
2992 (Process_Full_View): Check hidden inheritance of class-wide type
2994 * sem_ch7.adb (Analyze_Package_Specification): Do not generate
2995 the invariant procedure for interface types; build the invariant
2996 procedure for tagged types inheriting invariants from their
2998 * sem_prag.adb (Pragma_Invariant) Allow invariants in interface
2999 types but do not build their invariant procedure since their
3000 invariants will be propagated to the invariant procedure of
3001 types covering the interface.
3002 * exp_ch6.adb, exp_disp.adb, sem_ch3.adb, sem_ch7.adb,
3003 sem_ch8.adb, sem_disp.adb: Replace all calls to Set_DT_Position
3004 by calls to Set_DT_Position_Value.
3006 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
3008 * sem_attr.adb (Analyze_Attribute): Factor out heavily indented
3009 code in Denote_Same_Function. Do not analyze attribute 'Result
3010 when it is inside procedure _Postconditions. Remove a misplaced
3011 warning diagnostic. Code cleanup.
3012 (Denote_Same_Function): New routine.
3013 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Code
3014 cleanup. Warn on pre/postconditions on an inlined subprogram.
3015 (Analyze_Pragma, Refined_Post case): Warn on pre/postconditions on
3016 an inlined subprogram.
3017 (Analyze_Pre_Post_Condition_In_Decl_Part): Code cleanup. Warn on
3018 pre/post condition on an inlined subprogram.
3019 (Analyze_Test_Case_In_Decl_Part): Code cleanup. Warn on
3020 pre/postconditions on an inlined subprogram.
3021 (Check_Postcondition_Use_In_Inlined_Subprogram): New routine.
3023 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
3025 * sem_prag.adb (Ensure_Aggregate_Form):
3026 Ensure that the name denoted by the Chars of a pragma argument
3027 association has the proper Sloc when converted into an aggregate.
3029 2015-03-02 Bob Duff <duff@adacore.com>
3031 * sem_ch6.adb (Check_Private_Overriding): Capture
3032 Incomplete_Or_Partial_View in a constant. This is cleaner and
3035 2015-03-02 Gary Dismukes <dismukes@adacore.com>
3037 * einfo.ads, exp_unst.ads: Minor reformatting.
3039 2015-03-02 Ed Schonberg <schonberg@adacore.com>
3041 * a-strsea.adb (Find_Token): Ensure that the range of iteration
3042 does not perform any improper character access. This prevents
3043 erroneous access in the unusual case of an empty string target
3044 and a From parameter less than Source'First.
3046 2015-03-02 Robert Dewar <dewar@adacore.com>
3048 * elists.adb (List_Length): Fix incorrect result.
3050 2015-03-02 Bob Duff <duff@adacore.com>
3052 * sem_ch6.adb (Check_Private_Overriding): Refine the legality
3053 checks here. It used to check that the function is merely
3054 overriding SOMEthing. Now it checks that the function is
3055 overriding a corresponding public operation. This is a correction
3056 to the implementation of the rule in RM-3.9.3(10).
3058 2015-03-02 Robert Dewar <dewar@adacore.com>
3060 * debug.adb: Document new debug flag -gnatd.1.
3061 * einfo.ads, einfo.adb (Has_Nested_Subprogram): New flag.
3062 (Has_Uplevel_Reference): New flag (Is_Static_Type): New flag.
3063 (Uplevel_Reference_Noted):New flag (Uplevel_References): New field.
3064 * elists.ads elists.adb (List_Length): New function.
3065 * exp_ch6.adb (Expand_N_Subprogram_Body): Call Unnest_Subprogram
3066 when appropriate (Process_Preconditions): Minor code
3067 reorganization and reformatting
3068 * exp_unst.ads, exp_unst.adb: New files.
3069 * gnat1drv.adb (Adjust_Global_Switches): Set
3070 Unnest_Subprogram_Mode if -gnatd.1
3071 * namet.ads, namet.adb (Name_Find_Str): New version of Name_Find with
3073 * opt.ads (Unnest_Subprogram_Mode): New flag.
3074 * par-ch3.adb (P_Identifier_Declarations): Fixes to -gnatd.2 handling.
3075 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set
3076 Has_Nested_Subprogram flag.
3077 * sem_ch8.adb (Find_Direct_Name): New calling sequence for
3078 Check_Nested_Access.
3079 (Find_Selected_Component): Minor comment addition.
3080 * sem_util.adb (Check_Nested_Access): New version for use with Exp_Unst.
3081 (Note_Possible_Modification): New calling sequence for
3082 Check_Nested_Access.
3083 * sem_util.ads (Check_Nested_Access): New version for use with Exp_Unst.
3084 * gcc-interface/Make-lang.in (GNAT1_OBJS): Add exp_unst.o
3086 2015-03-02 Pierre-Marie de Rodat <derodat@adacore.com>
3088 * gcc-interface/utils.c (gnat_pushdecl): For non-artificial pointer
3089 types, preserve the original type and create copies just like the C
3090 front-end does. For artificial ones, do not define a name for
3092 (create_type_decl): When gnat_pushdecl made the input type the
3093 original type for the new declaration, do not define a stub
3095 * gcc-interface/utils2.c (build_binary_op): Accept two different
3096 pointer types when they point to the same type.
3098 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
3100 * exp_util.adb (Possible_Bit_Aligned_Component): Do not process
3102 * sem_util.adb (Kill_Current_Values): Do not invalidate and
3105 2015-03-02 Robert Dewar <dewar@adacore.com>
3107 * sem_ch3.adb, exp_attr.adb, checks.adb, exp_aggr.adb: Minor
3110 2015-03-02 Ed Schonberg <schonberg@adacore.com>
3112 * sem_ch8.adb: extend use of Available_Subtype.
3114 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
3116 * sem_prag.adb (Duplication_Error): Remove the special handling
3117 of 'Class or _Class in the context of pre/postconditions.
3118 (Process_Class_Wide_Condition): Remove the special handling of
3119 'Class or _Class in the context of pre/postconditions.
3120 * sem_util.adb (Original_Aspect_Pragma_Name): Names Pre_Class
3121 and Post_Class no longer need to be converted to _Pre and _Post.
3122 * sem_util.ads (Original_Aspect_Pragma_Name): Update the comment
3125 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
3127 * exp_ch6.adb (Process_Preconditions): Modify the
3128 mechanism that find the first source declaration to correct exit
3129 the loop once it has been found.
3131 2015-03-02 Gary Dismukes <dismukes@adacore.com>
3133 * a-strsea.adb: Minor typo fix.
3135 2015-03-02 Bob Duff <duff@adacore.com>
3137 * einfo.ads: Minor comment fixes.
3139 2015-03-02 Gary Dismukes <dismukes@adacore.com>
3141 * einfo.adb, checks.adb: Minor reformatting and typo fixes.
3143 2015-03-02 Ed Schonberg <schonberg@adacore.com>
3145 * exp_aggr.adb (Get_Assoc_Expr): If the Default_Component_Value
3146 is defined for the array type, use it instead of a Default_Value
3147 specified for the component type itself.
3149 2015-03-02 Thomas Quinot <quinot@adacore.com>
3151 * exp_attr.adb (Expand_N_Attribute_Reference, case Input): When
3152 expanding a 'Input attribute reference for a class-wide type,
3153 do not generate a separate object declaration for the controlling
3154 tag dummy object; instead, generate the expression inline in the
3155 dispatching call. Otherwise, the declaration (which involves a
3156 call to String'Input, returning a dynamically sized value on the
3157 secondary stack) will be expanded outside of proper secondary
3158 stack mark/release operations, and will thus cause a secondary
3161 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
3163 * checks.adb (Add_Validity_Check): Change the names of all
3164 formal parameters to better illustrate their purpose. Update
3165 the subprogram documentation. Update all occurrences of the
3166 formal parameters. Generate a pre/postcondition pragma by
3167 calling Build_Pre_Post_Condition.
3168 (Build_PPC_Pragma): Removed.
3169 (Build_Pre_Post_Condition): New routine.
3170 * einfo.adb Node8 is no longer used as Postcondition_Proc. Node14
3171 is now used as Postconditions_Proc. Flag240 is now renamed to
3172 Has_Expanded_Contract. (First_Formal): The routine can now
3173 operate on generic subprograms.
3174 (First_Formal_With_Extras): The routine can now operate on generic
3176 (Has_Expanded_Contract): New routine.
3177 (Has_Postconditions): Removed.
3178 (Postcondition_Proc): Removed.
3179 (Postconditions_Proc): New routine.
3180 (Set_Has_Expanded_Contract): New routine.
3181 (Set_Has_Postconditions): Removed.
3182 (Set_Postcondition_Proc): Removed.
3183 (Set_Postconditions_Proc): New routine.
3184 (Write_Entity_Flags): Remove the output of Has_Postconditions. Add
3185 the output of Has_Expanded_Contract.
3186 (Write_Field8_Name): Remove the output of Postcondition_Proc.
3187 (Write_Field14_Name): Add the output of Postconditions_Proc.
3188 * einfo.ads New attributes Has_Expanded_Contract and
3189 Postconditions_Proc along with occurrences in entities.
3190 Remove attributes Has_Postconditions and Postcondition_Proc
3191 along with occurrences in entities.
3192 (Has_Expanded_Contract): New routine along with pragma Inline.
3193 (Has_Postconditions): Removed along with pragma Inline.
3194 (Postcondition_Proc): Removed along with pragma Inline.
3195 (Postconditions_Proc): New routine along with pragma Inline.
3196 (Set_Has_Expanded_Contract): New routine along with pragma Inline.
3197 (Set_Has_Postconditions): Removed along with pragma Inline.
3198 (Set_Postcondition_Proc): Removed along with pragma Inline.
3199 (Set_Postconditions_Proc): New routine along with pragma Inline.
3200 * exp_ch6.adb (Add_Return): Code cleanup. Update the
3201 generation of the call to the _Postconditions routine of
3202 the procedure. (Expand_Non_Function_Return): Reformat the
3203 comment on usage. Code cleanup. Update the generation of
3204 the call to the _Postconditions routine of the procedure or
3206 (Expand_Simple_Function_Return): Update the
3207 generation of the _Postconditions routine of the function.
3208 (Expand_Subprogram_Contract): Reimplemented.
3209 * exp_ch6.ads (Expand_Subprogram_Contract): Update the parameter
3210 profile along the comment on usage.
3211 * exp_ch9.adb (Build_PPC_Wrapper): Code cleanup.
3212 (Expand_N_Task_Type_Declaration): Generate pre/postconditions
3213 wrapper when the entry [family] has a contract with
3215 * exp_prag.adb (Expand_Attributes_In_Consequence): New routine.
3216 (Expand_Contract_Cases): This routine and its subsidiaries now
3217 analyze all generated code.
3218 (Expand_Old_In_Consequence): Removed.
3219 * sem_attr.adb Add with and use clause for Sem_Prag.
3220 (Analyze_Attribute): Reimplment the analysis of attribute 'Result.
3221 (Check_Use_In_Test_Case): Use routine Test_Case_Arg to obtain
3223 * sem_ch3.adb (Analyze_Declarations): Analyze the contract of
3224 a generic subprogram.
3225 (Analyze_Object_Declaration): Do not create a contract node.
3226 (Derive_Subprogram): Do not create a contract node.
3227 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Do
3228 not create a contract node.
3229 (Analyze_Completion_Contract): New routine.
3230 (Analyze_Function_Return): Alphabetize.
3231 (Analyze_Generic_Subprogram_Body): Alphabetize. Do not create a
3232 contract node. Do not copy pre/postconditions to the original
3234 (Analyze_Null_Procedure): Do not create a contract node.
3235 (Analyze_Subprogram_Body_Contract): Reimplemented.
3236 (Analyze_Subprogram_Body_Helper): Do not mark the enclosing scope
3237 as having postconditions. Do not create a contract node. Analyze
3238 the subprogram body contract of a body that acts as a compilation
3239 unit. Expand the subprogram contract after the declarations have
3241 (Analyze_Subprogram_Contract): Reimplemented.
3242 (Analyze_Subprogram_Specification): Do not create a contract node.
3243 (List_Inherited_Pre_Post_Aspects): Code cleanup.
3244 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Update the
3246 (Analyze_Subprogram_Contract): Update the
3247 parameter profile and the comment on usage.
3248 * sem_ch7.adb (Analyze_Package_Body_Helper): Do not create a
3250 (Analyze_Package_Declaration): Do not create a
3252 (Is_Subp_Or_Const_Ref): Ensure that the prefix has an entity.
3253 * sem_ch8.adb (Analyze_Subprogram_Renaming): Do not create a
3255 * sem_ch9.adb (Analyze_Entry_Declaration): Do not create a
3257 * sem_ch10.adb (Analyze_Compilation_Unit): Move local variables to
3258 their proper section and alphabetize them. Analyze the contract of
3259 a [generic] subprogram after all Pragmas_After have been analyzed.
3260 (Analyze_Subprogram_Body_Stub_Contract): Alphabetize.
3261 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Do not
3262 create a contract node.
3263 (Analyze_Generic_Subprogram_Declaration):
3264 Alphabetize local variables. Do not create a contract
3265 node. Do not generate aspects out of pragmas for ASIS.
3266 (Analyze_Subprogram_Instantiation): Instantiate
3267 the contract of the subprogram. Do not create a
3268 contract node. (Instantiate_Contract): New routine.
3269 (Instantiate_Subprogram_Body): Alphabetize local variables.
3270 (Save_Global_References_In_Aspects): New routine.
3271 (Save_References): Do not save the global references found within
3272 the aspects of a generic subprogram.
3273 * sem_ch12.ads (Save_Global_References_In_Aspects): New routine.
3274 * sem_ch13.adb (Analyze_Aspect_Specifications): Do not use
3275 Original_Node for establishing linkages.
3276 (Insert_Pragma): Insertion in a subprogram body takes precedence over
3277 the case where the subprogram body is also a compilation unit.
3278 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Use
3279 Get_Argument to obtain the proper expression. Install the generic
3280 formals when the related context is a generic subprogram.
3281 (Analyze_Depends_In_Decl_Part): Use Get_Argument to obtain
3282 the proper expression. Use Corresponding_Spec_Of to obtain
3283 the spec. Install the generic formal when the related context
3284 is a generic subprogram.
3285 (Analyze_Global_In_Decl_Part): Use Get_Argument to obtain the proper
3286 expression. Use Corresponding_Spec_Of to obtain the spec. Install the
3287 generic formal when the related context is a generic subprogram.
3288 (Analyze_Initial_Condition_In_Decl_Part): Use Get_Argument
3289 to obtain the proper expression. Remove the call to
3290 Check_SPARK_Aspect_For_ASIS as the analysis is now done
3292 (Analyze_Pragma): Update all occurrences
3293 to Original_Aspect_Name. Pragmas Contract_Cases, Depends,
3294 Extensions_Visible, Global, Postcondition, Precondition and
3295 Test_Case now carry generic templates when the related context
3296 is a generic subprogram. The same pragmas are no longer
3297 forcefully fully analyzed when the context is a subprogram
3298 that acts as a compilation unit. Pragmas Abstract_State,
3299 Initial_Condition, Initializes and Refined_State have been clean
3300 up. Pragmas Post, Post_Class, Postcondition, Pre, Pre_Class
3301 and Precondition now use the same routine for analysis. Pragma
3302 Refined_Post does not need to check the use of 'Result or
3303 the lack of a post-state in its expression. Reimplement the
3304 analysis of pragma Test_Case.
3305 (Analyze_Pre_Post_Condition): New routine.
3306 (Analyze_Pre_Post_Condition_In_Decl_Part):
3308 (Analyze_Refined_Depends_In_Decl_Part): Use Get_Argument to obtain the
3310 (Analyze_Refined_Global_In_Decl_Part): Use Get_Argument to obtain
3311 the proper expression.
3312 (Analyze_Test_Case_In_Decl_Part): Reimplemented.
3313 (Check_Pre_Post): Removed.
3314 (Check_Precondition_Postcondition): Removed.
3315 (Check_SPARK_Aspect_For_ASIS): Removed.
3316 (Check_Test_Case): Removed.
3317 (Collect_Subprogram_Inputs_Outputs): Use Get_Argument
3318 to obtain the proper expression. Use Corresponding_Spec_Of to
3319 find the proper spec.
3320 (Create_Generic_Template): New routine.
3321 (Duplication_Error): New routine.
3322 (Expression_Function_Error): New routine.
3323 (Find_Related_Subprogram_Or_Body): Moved to the spec
3324 of Sem_Prag. Emit precise error messages. Account for cases of
3325 rewritten expression functions, generic instantiations, handled
3326 sequence of statements and pragmas from aspects.
3327 (Get_Argument): New routine.
3328 (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Removed.
3329 (Preanalyze_CTC_Args): Removed.
3330 (Process_Class_Wide_Condition): New routine.
3331 * sem_prag.ads (Analyze_Test_Case_In_Decl_Part): Update
3332 the parameter profile along with the comment on usage.
3333 (Find_Related_Subprogram_Or_Body): Moved from the body of Sem_Prag.
3334 (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Removed.
3335 (Test_Case_Arg): New routine.
3336 * sem_util.adb Add with and use clauses for Sem_Ch6.
3337 (Add_Contract_Item): This routine now creates a contract
3338 node the first time an item is added. Remove the duplicate
3339 aspect/pragma checks.
3340 (Check_Result_And_Post_State): Reimplemented.
3341 (Corresponding_Spec_Of): New routine.
3342 (Get_Ensures_From_CTC_Pragma): Removed.
3343 (Get_Requires_From_CTC_Pragma): Removed.
3344 (Has_Significant_Contract): New routine.
3345 (Inherit_Subprogram_Contract): Inherit only if the source
3347 (Install_Generic_Formals): New routine.
3348 (Original_Aspect_Name): Removed.
3349 (Original_Aspect_Pragma_Name): New routine.
3350 * sem_util.ads (Check_Result_And_Post_State): Reimplemented.
3351 (Corresponding_Spec_Of): New routine.
3352 (Get_Ensures_From_CTC_Pragma): Removed.
3353 (Get_Requires_From_CTC_Pragma): Removed.
3354 (Has_Significant_Contract): New routine.
3355 (Install_Generic_Formals): New routine.
3356 (Original_Aspect_Name): Removed.
3357 (Original_Aspect_Pragma_Name): New routine.
3358 * sem_warn.adb Add with and use clauses for Sem_Prag.
3359 (Within_Postcondition): Use Test_Case_Arg to extract "Ensures".
3361 2015-03-02 Ed Schonberg <schonberg@adacore.com>
3363 * sem_ch8.adb (Available_Subtype): Optimization in
3364 Find_Selected_Component: when safe, use existing subtype of
3365 array component, possibly discriminant-dependent, rather than
3366 creating new subtype declaration for it. In this fashion different
3367 occurrences of the component have the same subtype, rather than
3368 just equivalent ones. Simplifies value tracing in GNATProve.
3370 2015-03-01 Arnaud Charlet <charlet@adacore.com>
3374 * doc/gnat_ugn/gnat_project_manager.rst,
3375 doc/gnat_ugn/platform_specific_information.rst: Remove reference to
3376 image, too troublesome with texi format.
3377 * gnat_ugn.texi: Regenerate.
3379 2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
3382 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8): Remove.
3383 (DEF_FUNCTION_TYPE_VAR_12): Likewise.
3384 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
3386 2015-02-23 Thomas Schwinge <thomas@codesourcery.com>
3388 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8): Fix number of
3389 arguments parameter.
3390 (DEF_FUNCTION_TYPE_VAR_12): Likewise.
3392 2015-02-22 Arnaud Charlet <charlet@adacore.com>
3394 * doc/Makefile: postprocess texinfo files to update @dircategory
3395 and update texi files under gcc/ada.
3396 * gnat_ugn.texi, gnat_rm.texi: Regenerated.
3398 2015-02-22 Arnaud Charlet <charlet@adacore.com>
3400 * doc/gnat_ugn/project-manager-figure.png,
3401 doc/gnat_ugn/rtlibrary-structure.png: New.
3403 2015-02-22 Tom de Vries <tom@codesourcery.com>
3406 * gnat-style.texi (@subsection Loop Statements): Replace @noindent by
3407 @item, and fix warning '@itemize has text but no @item'.
3409 2015-02-20 Ed Schonberg <schonberg@adacore.com>
3411 * sem_prag.adb (Analyze_Pragma, case Obsolescent): Pragma
3412 legally applies to an abstract subprogram declaration.
3413 * freeze.adb: Minor comment addition.
3415 2015-02-20 Robert Dewar <dewar@adacore.com>
3417 * errout.ads: Document replacement of Name_uPre/Post/Type_Invariant.
3418 * erroutc.adb (Set_Msg_Str): Replace _xxx.
3419 (Pre/Post/Type_Invariant) by xxx'Class.
3420 * erroutc.ads (Set_Msg_Str): Replace _xxx.
3421 (Pre/Post/Type_Invariant) by xxx'Class.
3422 * sem_prag.adb (Fix_Error): Remove special casing of
3423 Name_uType_Invariant.
3424 (Analyze_Pre_Post_Condition_In_Decl_Part): Remove special casing of
3425 Name_uPre and Name_uPost in aspect case (done in Errout now).
3427 2015-02-20 Robert Dewar <dewar@adacore.com>
3429 * g-alveop.adb: Minor style fixes.
3431 2015-02-20 Robert Dewar <dewar@adacore.com>
3433 * freeze.adb (Warn_Overlay): Guard against blow up with address
3436 2015-02-20 Bob Duff <duff@adacore.com>
3438 * exp_attr.adb (May_Be_External_Call): Remove this. There is no need
3439 for the compiler to guess whether the call is internal or external --
3440 it is always external.
3441 (Expand_Access_To_Protected_Op): For P'Access, where P
3442 is a protected subprogram, always create a pointer to the
3443 External_Subprogram.
3445 2015-02-20 Robert Dewar <dewar@adacore.com>
3447 * a-dispat.adb, a-stcoed.ads: Minor reformatting.
3449 2015-02-20 Robert Dewar <dewar@adacore.com>
3451 * sem_ch13.adb (Build_Discrete_Static_Predicate): Allow static
3452 predicate for non-static subtype.
3453 (Build_Predicate_Functions): Do not assume subtype associated with a
3454 static predicate must be static.
3456 2015-02-20 Robert Dewar <dewar@adacore.com>
3458 * errout.adb (Set_Msg_Node): Better handling of internal names
3459 (Set_Msg_Node): Kill message when we cannot eliminate internal name.
3460 * errout.ads: Document additional case of message deletion.
3461 * namet.adb (Is_Internal_Name): Refined to consider wide
3462 strings in brackets notation and character literals not to be
3464 * sem_ch8.adb (Find_Selected_Component): Give additional error
3465 when selector name is a subprogram whose first parameter has
3466 the same type as the prefix, but that type is untagged.
3468 2015-02-20 Robert Dewar <dewar@adacore.com>
3470 * g-allein.ads, g-alveop.adb, g-alveop.ads, opt.ads: Minor reformatting
3472 2015-02-20 Tristan Gingold <gingold@adacore.com>
3474 * opt.ads (GNAT_Mode_Config): New variable.
3475 * opt.adb (Set_Opt_Config_Switches): Consider GNAT_Mode_Config
3476 to set Assertions_Enabled.
3477 * switch-c.adb (Scan_Front_End_Switches): Set GNAT_Mode_Config
3480 2015-02-20 Robert Dewar <dewar@adacore.com>
3482 * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Add an additional
3483 comment regarding the handling of unterminated fixed-point
3485 * s-valuns.ads (Scan_Raw_Unsigned): Add comments
3486 corresponding to those previously added for
3487 System.Val_LLU.Scan_Raw_Long_Long_Unsigned.
3489 2015-02-20 Olivier Hainque <hainque@adacore.com>
3491 * g-allein.ads, g-alveop.ads, g-alveop.adb: Code clean ups.
3493 2015-02-20 Robert Dewar <dewar@adacore.com>
3495 * sem_prag.adb: Minor comment clarification.
3497 2015-02-20 Olivier Hainque <hainque@adacore.com>
3499 * g-allein.ads (vec_ctf, vec_vcsfx, vec_vcfux): Remove.
3500 * g-alleve.ads, g-alleva.adb (vcfux): Likewise.
3501 * g-alveop.ads (vec_vcfsx, vec_vcfux): Just rename the ll versions.
3502 (vec_ctf): Now renamings as well.
3504 2015-02-20 Robert Dewar <dewar@adacore.com>
3506 * switch-c.adb, bindgen.adb: Minor reformatting.
3508 2015-02-20 Ed Schonberg <schonberg@adacore.com>
3510 * sem_prag.adb (Analyze_Pragma, case Type_Invariant):
3511 Invariant'class is allowed on an abstract type.
3513 2015-02-20 Ed Schonberg <schonberg@adacore.com>
3515 * sem_ch3.adb (Access_Definition): If the access definition is
3516 for a protected component and defines an access to protected
3517 subprogram, do not create an itype reference for it because a
3518 full type declaration will be built in order to generate the
3519 proper equivalent type.
3520 (Analyze_Subtype_Declaration): Add information of incomplete
3521 subtypes, for Ada 2012 extended uses of incomplete types.
3523 2015-02-20 Gary Dismukes <dismukes@adacore.com>
3525 * sem_res.adb: Minor reformatting.
3527 2015-02-20 Vincent Celier <celier@adacore.com>
3529 * switch-c.adb (Scan_Front_End_Switches): When comparing runtime
3530 path name for several switches --RTS, use the normalized path
3533 2015-02-20 Vincent Celier <celier@adacore.com>
3535 * bindgen.adb: Minor reformatting and code reorganization.
3537 2015-02-20 Jose Ruiz <ruiz@adacore.com>
3539 * a-stcoed.ads: Add spec for this package (Unimplemented_Unit).
3540 * impunit.adb (Non_Imp_File_Names_12): Mark unit a-stcoed.ads as
3541 defined by Ada 2012.
3543 2015-02-20 Arnaud Charlet <charlet@adacore.com>
3545 * sysdep.c, expect.c, s-oscons-tmplt.c, gsocket.h, adaint.c: Remove
3546 obsolete references to RTX, nucleus, VMS.
3548 2015-02-20 Ed Schonberg <schonberg@adacore.com>
3550 * sem_prag.adb (Fix_Error): For an illegal Type_Invariant'Class
3551 aspect, use name that mentions Class explicitly, rather than
3552 compiler-internal name.
3554 2015-02-20 Robert Dewar <dewar@adacore.com>
3556 * debug.adb: Add documentation for -gnatd.2 (allow statements
3558 * par-ch3.adb (P_Identifier_Declarations): Handle
3559 statement appearing where declaration expected more cleanly.
3560 (Statement_When_Declaration_Expected): Implement debug flag
3563 2015-02-20 Jose Ruiz <ruiz@adacore.com>
3565 * a-dinopr.ads: Add spec for this package (Unimplemented_Unit).
3566 * a-dispat.ads (Yield): Include procedure added in Ada 2012.
3567 * a-dispat.adb (Yield): Implement procedure added in Ada 2012.
3568 * impunit.adb (Non_Imp_File_Names_05): Mark unit a-dinopr.ads as
3569 defined by Ada 2005.
3570 * snames.ads-tmpl (Name_Non_Preemptive_FIFO_Within_Priorities):
3571 This is the correct name for the dispatching policy (FIFO was
3574 2015-02-20 Javier Miranda <miranda@adacore.com>
3576 * sem_res.adb (Resolve_Type_Conversion): If the type of the
3577 operand is the limited-view of a class-wide type then recover
3578 the class-wide type of the non-limited view.
3580 2015-02-20 Arnaud Charlet <charlet@adacore.com>
3582 * gcc-interface/Makefile.in: Remove references to nucleus.
3583 * gcc-interface/decl.c (gnat_to_gnu_entity, case E_Procedure): Set
3584 extern_flag to true for Inline_Always subprograms with
3585 Intrinsic convention.
3587 2015-02-20 Yannick Moy <moy@adacore.com>
3589 * sem_prag.ads: Minor typo in comment.
3591 2015-02-20 Pascal Obry <obry@adacore.com>
3593 * s-osprim-mingw.adb: Fix Get_Base_Time parameter mode.
3595 2015-02-20 Vincent Celier <celier@adacore.com>
3597 * makeutl.adb (Get_Directories.Add_Dir): Add a directory only
3600 2015-02-20 Robert Dewar <dewar@adacore.com>
3602 * sem_eval.ads: Minor reformatting.
3604 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
3606 * freeze.adb (Size_Known): Do not set the packed size for
3607 independent type or component.
3608 (Freeze_Array_Type): Check for Independent[_Components] with packing
3609 or explicit component size clause.
3610 * gnat1drv.adb (Post_Compilation_Validation_Checks): Do the validation
3611 of independence pragmas only for non-GCC back-ends.
3612 * sem_ch13.adb (Initialize): Likewise for the initialization.
3613 * sem_prag.adb (Record_Independence_Check): New procedure to record an
3614 independence check in the table.
3615 (Analyze_Pragma): Use it throughout instead of doing it manually.
3616 * gcc-interface/decl.c (gnat_to_gnu_field): Add support for
3617 independent type or component.
3619 2015-02-20 Thomas Quinot <quinot@adacore.com>
3621 * adaint.c (__gnat_readdir): For Solaris, use 64 bit variants of
3622 struct direct and readdir. This is required for NFS filesystems
3623 mounted from servers that use 64-bit cookies.
3625 2015-02-20 Ed Schonberg <schonberg@adacore.com>
3627 * sem_ch12.adb (Analyze_Subprogram_Instantiaion): New subprogram
3628 Build_Subprogram_Renaming, to create renaming of subprogram
3629 instance in the the declaration of the wrapper package rather
3630 than in its body, so that it is available for analysis of aspects
3631 propagated from generic to instantiation.
3632 (Check_Mismatch): An actual for a formal package that is an
3633 incomplete type matches a formal type that is incomplete.
3634 (Instantiate_Package_Body): Move code that builds subprogram
3635 renaming to Analyze_Subprogram_Instantiation.
3636 (Instantiate_Type): The generated subtype is a limited view if
3637 the actual is a limited view.
3638 (Load_Parent_Of_Generic): Retrieve instance declaration from
3639 its new position within wrapper package.
3641 2015-02-20 Arnaud Charlet <charlet@adacore.com>
3643 * s-parame-vxworks.adb, s-os_lib.ads: Update comments.
3645 2015-02-20 Robert Dewar <dewar@adacore.com>
3647 * s-osinte-vxworks.ads (To_Timespec): Add comment about the
3648 issue of negative arguments.
3650 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
3652 * gnat1drv.adb: Minor consistency fix.
3654 2015-02-20 Pascal Obry <obry@adacore.com>
3656 * s-osprim-mingw.adb (Get_Base_Time): Properly release lock in all
3659 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
3661 * inline.adb (Expand_Inlined_Call): Skip again calls to subprogram
3663 * exp_ch6.adb (Expand_Call): Use back-end inlining
3664 instead of expansion for simple subprogram renamings.
3666 2015-02-20 Robert Dewar <dewar@adacore.com>
3668 * exp_util.adb: Minor reformatting.
3670 2015-02-20 Vincent Celier <celier@adacore.com>
3672 * switch-c.adb (Scan_Front_End_Switches): Do not fail when --RTS=
3673 is specified several times with different values that indicates
3674 the same runtime directory.
3676 2015-02-20 Ed Schonberg <schonberg@adacore.com>
3678 * sem_attr.adb (Check_Not_Incomplete_Type): Clean up code to
3679 handle properly illegal uses of attributes on prefixes on an
3680 incomplete type, both when the type of the prefix is locally
3681 incomplete, and when it is a limited view of a type whose
3682 non-limited view is not available.
3683 (Analyze_Attribute): Add calls to Check_Not_Incomplete_Type for
3684 'Address and others.
3686 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
3688 * exp_ch6.adb: Fix minor typo in comment.
3690 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
3692 * sinfo.ads: Add comment.
3694 2015-02-20 Olivier Hainque <hainque@adacore.com>
3696 * opt.ads: Replace Opt.Suppress_All_Inlining by two separate
3697 flags controlling the actual FE inlining out of pragma Inline
3698 and pragma Inline_Always.
3699 * adabkend.adb (Scan_Compiler_Arguments): Set both flags to True
3700 on -fno-inline, which disables all inlining in compilers with
3701 an Ada back-end and without back-end inlining support.
3702 * back_end.adb (Scan_Back_End_Switches): Set the Inline related
3703 flag to True on -fno-inline and leave Inline_Always alone for
3705 * back_end.ads (Scan_Compiler_Arguments): Adjust spec wrt the
3706 names of the Opt flags it sets.
3707 * gnat1drv.adb (Adjust_Global_Switches): Remove test on
3708 Opt.Suppress_All_Inlining in the Back_End_Inlining computation.
3709 * sem_prag.adb (Make_Inline): Remove early return conditioned
3710 on Opt.Suppress_All_Inlining.
3711 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Use the flags to
3712 disable the calls to Build_Body_To_Inline otherwise triggered
3713 by pragma Inline or Inline_Always. This will prevent actual
3714 front-end inlining of the subprogram on calls.
3716 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
3718 * exp_ch3.adb (Default_Initialize_Object): Call Add_Inlined_Body on the
3719 Abort_Undefer_Direct function.
3720 * exp_ch5.adb (Expand_N_Assignment_Statement): Likewise.
3721 * exp_intr.adb (Expand_Unc_Deallocation): Likewise.
3722 * exp_prag.adb (Expand_Pragma_Abort_Defer): Likewise.
3723 * exp_ch4.adb (Expand_N_Selected_Component): Adjust call to
3725 * exp_ch6.adb (Expand_Call): Adjust calls to Add_Inlined_Body.
3726 Remove call to Register_Backend_Call and move code resetting
3727 Needs_Debug_Info on inlined subprograms to...
3728 * inline.ads (Add_Inlined_Body): Add N parameter.
3729 (Register_Backend_Call): Delete.
3730 * inline.adb (Add_Inlined_Body): ...here and simplify.
3731 Register the call with Backend_Calls directly.
3732 (Register_Backend_Call): Delete.
3733 * s-stalib.ads (Abort_Undefer_Direct): Restore pragma Inline.
3735 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
3737 * s-stalib.ads: Fix typo.
3739 2015-02-20 Ed Schonberg <schonberg@adacore.com>
3741 * exp_ch3.adb (Default_Initialize_Object): If the object has a
3742 delayed freeze, the actions associated with default initialization
3743 must be part of the freeze actions, rather that being inserted
3744 directly after the object declaration.
3746 2015-02-20 Robert Dewar <dewar@adacore.com>
3748 * lib-load.adb: Minor comment update.
3750 2015-02-20 Vincent Celier <celier@adacore.com>
3752 * prj-proc.adb (Process_Case_Construction): When there are
3753 incomplete withed projects and the case variable is unknown,
3754 skip the case construction.
3756 2015-02-20 Ed Schonberg <schonberg@adacore.com>
3758 * exp_ch6.adb (Expand_Actuals): Add caller-side invariant checks
3759 when an actual is a view conversion, either because the call is
3760 to an inherited operation, or because the actual is an explicit
3761 type conversion to an ancestor type. Fixes ACATS 4.0D: C732001
3763 2015-02-20 Robert Dewar <dewar@adacore.com>
3765 * einfo.ads: Minor comment updates Fix missing pragma Inline
3766 for Set_Partial_View_Has_Unknown_Discr.
3767 * einfo.adb (Write_Entity_Flags): Add missing entry for
3768 Partial_View_Has_Unknown_Discr.
3769 * sem_ch3.adb: Minor reformatting.
3771 2015-02-20 Vincent Celier <celier@adacore.com>
3773 * opt.ads: Minor cleanup: remove mention of gprmake.
3774 * s-stalib.ads (Abort_Undefer_Direct): Do not inline.
3775 * s-tataat.adb: Do not call System.Tasking.Self but directly
3776 System.Task_Primitives.Operations.Self.
3778 2015-02-20 Arnaud Charlet <charlet@adacore.com>
3780 * gnat_rm.texi, gnat_ugn.texi: Now automatically generated from
3781 sphinx in the doc directory.
3782 * doc: New directory containing sphinx versions of gnat_rm and gnat_ugn
3784 2015-02-20 Robert Dewar <dewar@adacore.com>
3786 * sem_res.adb: Minor reformatting.
3787 * exp_ch9.adb (Build_Protected_Spec): Copy Aliased setting when
3789 * sem_ch13.adb (Analyze_Aspect_Specifications): Exclude Boolean
3790 aspects from circuitry setting delay required to false if the
3791 argument is an integer literal.
3793 2015-02-20 Ed Schonberg <schonberg@adacore.com>
3795 * einfo.ads. einfo.adb (Partial_View_Has_Unknown_Discr): New flag
3796 on type entities, to enforce AI12-0133: default initialization
3797 of types whose partial view has unknown discriminants does not
3798 get an invariant check, because clients of the unit can never
3799 declare objects of such types.
3800 * sem_ch3.adb (Find_Type_Name); Set new flag
3801 Partial_View_Has_Unknown_Discr when needed.
3802 * exp_ch3.adb (Expand_N_Object_Declaration): Use flag to suppress
3803 generation of invariant call on default-initialized object.
3805 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
3807 * gcc-interface/decl.c (gnat_to_gnu_param): Do not strip the padding
3808 if the parameter either is passed by reference or if the alignment
3811 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
3813 * gcc-interface/decl.c (is_cplusplus_method): Use Is_Primitive flag to
3814 detect primitive operations of tagged and untagged types.
3816 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
3818 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not bother about alias
3819 sets in presence of derivation for subprogram types.
3821 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
3823 * gcc-interface/utils.c (begin_subprog_body): Assert that the body is
3824 present in the same context as the declaration.
3826 2015-02-07 Jakub Jelinek <jakub@redhat.com>
3829 * gcc-interface/trans.c (gigi): Recreate optimization_default_node
3830 and optimization_current_node after tweaking global_options.
3832 2015-02-05 Robert Dewar <dewar@adacore.com>
3834 * prj-proc.adb, sem_aux.adb, exp_ch9.adb, errout.adb, prj-dect.adb,
3835 prj-nmsc.adb: Minor reformatting.
3837 2015-02-05 Ed Schonberg <schonberg@adacore.com>
3839 * sem_type.adb (Covers): In ASIS_Mode the Corresponding_Record
3840 of a protected type may not be available, so to check conformance
3841 with an interface type, examine the interface list in the type
3842 declaration directly.
3843 (Write_Overloads): Improve information for indirect calls,
3846 2015-02-05 Ed Schonberg <schonberg@adacore.com>
3848 * exp_ch3.adb (Make_Tag_Assignment): Do not perform this
3849 expansion activity in ASIS mode.
3851 2015-02-05 Javier Miranda <miranda@adacore.com>
3853 * errout.adb (Error_Msg_PT): Add missing error.
3854 * sem_ch6.adb (Check_Synchronized_Overriding): Check the missing
3855 RM rule. Code cleanup.
3856 * exp_ch9.adb (Build_Wrapper_Spec): Propagate "constant" in
3857 anonymous access types. Found working on the tests. Code cleanup.
3859 2015-02-05 Vincent Celier <celier@adacore.com>
3861 * prj-dect.adb (Parse_Attribute_Declaration): Continue scanning
3862 when there are incomplete withs.
3863 * prj-nmsc.adb (Process_Naming): Do not try to get the value
3864 of an element when it is nil.
3865 (Check_Naming): Do not check a nil suffix for illegality
3866 * prj-proc.adb (Expression): Do not process an empty term.
3867 * prj-strt.adb (Attribute_Reference): If attribute cannot be
3868 found, parse a possible index to avoid cascading errors.
3870 2015-02-05 Ed Schonberg <schonberg@adacore.com>
3872 * sem_aux.adb (Is_Derived_Type): A subprogram_type generated
3873 for an access_to_subprogram declaration is not a derived type.
3875 2015-02-05 Robert Dewar <dewar@adacore.com>
3877 * errout.adb (Error_Msg_Internal): For non-serious error set
3878 Fatal_Error to Ignored.
3879 * lib-load.adb (Load_Unit): Minor comment updates.
3880 * sem_ch10.adb (Analyze_With_Clause): Propagate Fatal_Error
3881 setting from with'ed unit to with'ing unit.
3882 * sem_prag.adb (Analyze_Pragma, case Warnings): Document handling
3885 2015-02-05 Yannick Moy <moy@adacore.com>
3887 * sem_prag.adb, par-prag.adb: Minor code clean up.
3889 2015-02-05 Yannick Moy <moy@adacore.com>
3891 * par-prag.adb (Pragma_Warnings): Update for extended form
3892 of pragma Warnings. The "one" argument case may now have 2 or
3894 * sem_prag.adb (Analyze_Pragma/Pragma_Warnings): Update for
3895 extended form of pragma Warnings. Pragma with tool name is either
3896 rewritten as null or as an equivalent form without tool name,
3898 * snames.ads-tmpl (Name_Gnatprove): New name.
3900 2015-02-05 Robert Dewar <dewar@adacore.com>
3902 * sem_ch13.adb (Add_Invariants): Don't assume invariant is
3904 * sem_prag.adb (Analyze_Pragma, case Check): Don't assume
3905 condition is standard Boolean, it can be non-standard derived
3908 2015-02-05 Robert Dewar <dewar@adacore.com>
3910 * checks.adb (Enable_Range_Check): Disconnect attempted
3911 optimization for the case of range check for subscript of
3912 unconstrained array.
3914 2015-02-05 Robert Dewar <dewar@adacore.com>
3916 * par-ch13.adb (With_Present): New function
3917 (Aspect_Specifications_Present): Handle WHEN in place of WITH
3918 (Get_Aspect_Specifications): Comment update.
3919 * par.adb: Comment updates.
3921 2015-02-05 Robert Dewar <dewar@adacore.com>
3923 * errout.adb (Handle_Serious_Error): New setting of Fatal_Error.
3924 * frontend.adb (Frontend): New setting of Fatal_Error.
3925 * lib-load.adb (Create_Dummy_Package_Unit): New setting of
3927 (Load_Main_Source): New setting of Fatal_Error
3928 (Load_Unit): New setting of Fatal_Error.
3929 * lib-writ.adb (Add_Preprocessing_Dependency): New setting of
3931 (Ensure_System_Dependency): New setting of Fatal_Error.
3932 * lib.adb (Fatal_Error): New setting of Fatal_Error
3933 (Set_Fatal_Error): New setting of Fatal_Error.
3934 * lib.ads: New definition of Fatal_Error and associated routines.
3935 * par-ch10.adb (P_Compilation_Unit): New setting of Fatal_Error.
3936 * par-load.adb (Load): New setting of Fatal_Error.
3937 * rtsfind.adb (Load_RTU): New setting of Fatal_Error.
3938 * sem_ch10.adb (Analyze_Compilation_Unit): New setting of
3940 (Optional_Subunit): New setting of Fatal_Error.
3941 (Analyze_Proper_Body): New setting of Fatal_Error.
3942 (Load_Needed_Body): New setting of Fatal_Error.
3944 2015-02-05 Ed Schonberg <schonberg@adacore.com>
3946 * sem_res.adb (Resolve_Call): If the function being called has
3947 out parameters do not check for language version if the function
3948 comes from a predefined unit, as those are always compiled in
3951 2015-02-05 Ed Schonberg <schonberg@adacore.com>
3953 * sem_ch3.adb (Process_Full_View): Verify that the full view
3954 of a type extension must carry an explicit limited keyword if
3955 the partial view does (RM 7.3 (10.1)).
3957 2015-02-05 Robert Dewar <dewar@adacore.com>
3959 * g-rannum.adb, g-rannum.ads, s-rannum.adb, s-rannum.ads,
3960 sem_warn.ads: Minor reformatting.
3961 * exp_ch13.adb (Expand_N_Freeze_Entity): Add guard for aspect
3963 * sem_prag.adb (Analyze_Pragma, case Type_Invariant): Give
3964 error for abstract type.
3966 2015-02-05 Yannick Moy <moy@adacore.com>
3968 * opt.ads (Warn_On_Suspicious_Contract): Update comment
3970 * sem_attr.adb (Analyze_Attribute/Attribute_Update): Warn on
3971 suspicious uses of 'Update.
3972 * sem_warn.adb, sem_warn.ads (Warn_On_Suspicious_Update): New
3973 function issues warning on suspicious uses of 'Update.
3974 * g-rannum.adb, g-rannum.ads, s-rannum.adb, s-rannum.ads: Mark
3975 package spec and body as SPARK_Mode Off.
3977 2015-02-05 Robert Dewar <dewar@adacore.com>
3979 * sem_prag.adb (Set_Elab_Unit_Name): New name for Set_Unit_Name
3980 (Analyze_Pragma): Change Set_Unit_Name to Set_Elab_Unit_Name
3981 (Set_Elab_Unit_Name): Generate reference for Elaborate[_All]
3982 * sem_warn.adb (Warn_On_Unreferenced_Entity): Suppress warning
3983 for exported entity.
3985 2015-02-05 Hristian Kirtchev <kirtchev@adacore.com>
3987 * sem_prag.adb (Check_Pragma_Conformance): Add
3988 local variable Arg. Ensure that all errors are associated with
3989 the pragma if it appears without an argument. Add comments on
3992 2015-02-05 Robert Dewar <dewar@adacore.com>
3994 * lib-xref.adb: Minor reformatting.
3996 2015-02-05 Tristan Gingold <gingold@adacore.com>
3999 * env.c: Fix thinko: handle Darwin case before default one.
4001 2015-01-30 Robert Dewar <dewar@adacore.com>
4003 * a-assert.adb: Minor reformatting.
4004 * sem_ch13.adb: Minor comment clarification.
4005 * types.ads: Minor comment update.
4006 * sem_eval.adb (Real_Or_String_Static_Predicate_Matches): Avoid blow up
4007 when we have a predicate that is nothing but an inherited dynamic
4010 2015-01-30 Jerome Guitton <guitton@adacore.com>
4012 * gcc-interface/Makefile.in (x86-vxworks): Update GCC_SPEC_FILES to
4013 include cert link spec.
4015 2015-01-30 Robert Dewar <dewar@adacore.com>
4017 * einfo.ads: Minor comment fix.
4018 * freeze.adb (Freeze_Profile): Add test for suspicious import
4020 * sem_prag.adb (Process_Import_Or_Interface): Test for suspicious
4021 use in Pure unit is now moved to Freeze (to properly catch
4022 Pure_Function exemption).
4024 2015-01-30 Bob Duff <duff@adacore.com>
4026 * sem_res.ads: Minor comment fix.
4027 * sem_type.adb: sem_type.adb (Remove_Conversions): Need to
4028 check both operands of an operator.
4030 2015-01-30 Yannick Moy <moy@adacore.com>
4032 * a-assert.ads, a-assert.adb: Mark package spec in SPARK. Set assertion
4033 policy for Pre to Ignore.
4034 (Assert): Add precondition.
4036 2015-01-30 Robert Dewar <dewar@adacore.com>
4038 * sem_prag.adb (Process_Import_Or_Interface): Warn if used in
4040 * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Clarify
4041 documentation for some special cases of invalid attempts at
4044 2015-01-30 Gary Dismukes <dismukes@adacore.com>
4046 * errout.ads: Minor reformatting.
4048 2015-01-30 Yannick Moy <moy@adacore.com>
4050 * inline.adb (Process_Formals): Use the sloc of
4051 the inlined node instead of the sloc of the actual parameter,
4052 when replacing formal parameters by the actual one.
4054 2015-01-30 Arnaud Charlet <charlet@adacore.com>
4056 * g-expect.adb (Get_Command_Output): Use infinite timeout when
4059 2015-01-30 Ed Schonberg <schonberg@adacore.com>
4061 * sem_ch12.adb (Analyze_Associations): If an in-parameter is
4062 defaulted in an instantiation, add an entry in the list of actuals
4063 to indicate the default value of the formal (as is already done
4064 for defaulted subprograms).
4066 2015-01-30 Javier Miranda <miranda@adacore.com>
4068 * errout.adb (Error_Msg_PT): Minor error phrasing update.
4070 2015-01-30 Robert Dewar <dewar@adacore.com>
4072 * sem_warn.adb (Warn_On_Known_Condition): Improve error message
4075 2015-01-30 Pierre-Marie de Rodat <derodat@adacore.com>
4077 * exp_dbug.adb (Get_Encoded_Name): When
4078 -fgnat-encodings=minimal, do not generate names for biased types.
4080 2015-01-30 Tristan Gingold <gingold@adacore.com>
4083 * env.c: Move vxworks and darwin includes out of #ifdef IN_RTS.
4085 2015-01-30 Gary Dismukes <dismukes@adacore.com>
4087 * freeze.adb: Minor reformatting.
4089 2015-01-30 Javier Miranda <miranda@adacore.com>
4091 * errout.ads (Error_Msg_PT): Replace Node_Id by Entity_Id and
4092 improve its documentation.
4093 * errout.adb (Error_Msg_PT): Improve the error message.
4094 * sem_ch6.adb (Check_Conformance): Update call to Error_Msg_PT.
4095 (Check_Synchronized_Overriding): Update call to Error_Msg_PT.
4096 * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup.
4098 2015-01-30 Robert Dewar <dewar@adacore.com>
4100 * sem_warn.adb (Warn_On_Known_Condition): Do special casing of
4101 message for False case.
4103 2015-01-30 Doug Rupp <rupp@adacore.com>
4105 * s-vxwext-kernel.ads (Task_Cont): Remove imported subprogram body.
4106 * s-vxwext-kernel.adb (Task_Cont): New subpprogram body specialized for
4109 2015-01-30 Gary Dismukes <dismukes@adacore.com>
4111 * sem_attr.adb (Declared_Within_Generic_Unit):
4112 New function to test whether an entity is declared within the
4113 declarative region of a given generic unit.
4114 (Resolve_Attribute): For checking legality of subprogram'Access within
4115 a generic unit, call new Boolean function Declared_Within_Generic_Unit
4116 instead of simply comparing the results of Enclosing_Generic_Unit on
4117 the prefix and access type. Correct minor comment typos.
4119 2015-01-30 Robert Dewar <dewar@adacore.com>
4121 * freeze.adb, exp_util.ads: Update comment.
4122 * exp_util.adb, exp_ch3.adb: Minor code reorganization and reformatting.
4123 * sem_util.adb: Minor: fix typo.
4125 2015-01-30 Hristian Kirtchev <kirtchev@adacore.com>
4127 * sem_attr.adb (Analyze_Attribute): Ensure that
4128 the check concerning Refined_Post takes precedence over the
4131 2015-01-30 Gary Dismukes <dismukes@adacore.com>
4133 * sem_prag.adb: Minor typo fixes and reformatting.
4135 2015-01-30 Yannick Moy <moy@adacore.com>
4137 * sem_attr.adb: Code clean up.
4139 2015-01-30 Robert Dewar <dewar@adacore.com>
4141 * ali.adb (Scan_ALI): Set Serious_Errors flag in Unit record.
4142 * ali.ads (Unit_Record): Add new field Serious_Errors.
4143 * lib-writ.adb (Write_Unit_Information): Set SE (serious errors)
4144 attribute in U line.
4145 * lib-writ.ads: New attribute SE (serious erors) in unit line.
4147 2015-01-30 Hristian Kirtchev <kirtchev@adacore.com>
4149 * einfo.adb Update the usage of attributes Entry_Bodies_Array,
4150 Lit_Indexes, Scale_Value, Storage_Size_Variable,
4151 String_Literal_Low_Bound along associated routines and
4153 (Pending_Access_Types): New routine.
4154 (Set_Pending_Access_Types): New routine.
4155 (Write_Field15_Name): Add an entry for Pending_Access_Types.
4156 * einfo.ads Add new attribute Pending_Access_Types along
4157 with usage in nodes. Update the usage of attributes
4158 Entry_Bodies_Array, Lit_Indexes, Scale_Value,
4159 Storage_Size_Variable, String_Literal_Low_Bound.
4160 (Pending_Access_Types): New routine along with pragma Inline.
4161 (Set_Pending_Access_Types): New routine along with pragma Inline.
4162 * exp_ch3.adb (Expand_Freeze_Array_Type): Add new local variable
4163 Ins_Node. Determine the insertion node for anonynous access type
4164 that acts as a component type of an array. Update the call to
4165 Build_Finalization_Master.
4166 (Expand_Freeze_Record_Type): Update
4167 the calls to Build_Finalization_Master.
4168 (Freeze_Type): Remove
4169 local variable RACW_Seen. Factor out the code that deals with
4170 remote access-to-class-wide types. Create a finalization master
4171 when the designated type contains a private component. Fully
4172 initialize all pending access types.
4173 (Process_RACW_Types): New routine.
4174 (Process_Pending_Access_Types): New routine.
4175 * exp_ch4.adb (Expand_Allocator_Expression): Allocation no longer
4176 needs to set primitive Finalize_Address.
4177 (Expand_N_Allocator): Allocation no longer sets primitive
4179 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
4180 Update the call to Build_Finalization_Master.
4181 (Make_Build_In_Place_Call_In_Allocator): Allocation no longer
4182 needs to set primitive Finalize_Address.
4183 * exp_ch7.adb (Add_Pending_Access_Type): New routine.
4184 (Build_Finalization_Master): New parameter profile. Associate
4185 primitive Finalize_Address with the finalization master if the
4186 designated type has been frozen, otherwise treat the access
4187 type as pending. Simplify the insertion of the master and
4188 related initialization code.
4189 (Make_Finalize_Address_Body): Allow Finalize_Address for class-wide
4191 (Make_Set_Finalize_Address_Call): Remove forlam parameter Typ.
4192 Simplify the implementation.
4193 * exp_ch7.ads (Build_Finalization_Master): New parameter profile
4194 along with comment on usage.
4195 (Make_Set_Finalize_Address_Call): Remove formal parameter Typ. Update
4196 the comment on usage.
4197 * exp_util.adb (Build_Allocate_Deallocate_Proc): Use routine
4198 Finalize_Address to retrieve the primitive.
4199 (Finalize_Address): New routine.
4200 (Find_Finalize_Address): Removed.
4201 * exp_util.ads (Finalize_Address): New routine.
4202 * freeze.adb (Freeze_All): Remove the generation of finalization
4204 * sem_ch3.adb (Analyze_Full_Type_Declaration): Propagate any
4205 pending access types from the partial to the full view.
4207 2015-01-30 Robert Dewar <dewar@adacore.com>
4209 * sem_disp.adb: Minor reformatting.
4210 * sem_disp.ads: Documentation update.
4212 2015-01-30 Ed Schonberg <schonberg@adacore.com>
4214 * sem_disp.adb (Is_Dynamically_Tagged): when applied to an entity
4215 or a function call, return True if type is class-wide.
4216 * sem_res.adb (Resolve_Case_Expression, Resolve_If_Expression);
4217 Apply RM 4.5.7 (17/3): all or none of the dependent expression
4218 of a conditional expression must be dynamically tagged.
4220 2015-01-30 Ed Schonberg <schonberg@adacore.com>
4222 * sem_ch6.adb (Analyze_Function_Return): In an extended return
4223 statement, apply accessibility check to result object when there
4224 is no initializing expression (Ada 2012 RM 6.5 (5.4/3))
4226 2015-01-30 Robert Dewar <dewar@adacore.com>
4228 * sem_ch4.adb (Analyze_If_Expression): Allow for non-standard
4229 Boolean for case where ELSE is omitted.
4230 * sem_res.adb: Minor reformatting.
4232 2015-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
4234 Fix build under cygwin/64.
4235 * adaint.h: Add check for __CYGWIN__.
4236 * mingw32.h: Prevent windows.h from including x86intrin.h in GCC.
4238 2015-01-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
4241 * adaint.c: Handle __CYGWIN__ like __MINGW32__ here.
4242 * mingw32.h: Don't include <tchar.h> under cygwin.
4243 (_O_U8TEXT, _O_U16TEXT, _O_WTEXT): Set to _O_TEXT if not yet defined.
4245 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
4247 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8)
4248 (DEF_FUNCTION_TYPE_VAR_12): New macros.
4250 2015-01-09 Michael Collison <michael.collison@linaro.org>
4252 * gcc-interface/cuintp.c: Include hash-set.h, machmode.h,
4253 vec.h, double-int.h, input.h, alias.h, symtab.h,
4254 fold-const.h, wide-int.h, and inchash.h due to
4255 flattening of tree.h.
4256 * gcc-interface/decl.c: Ditto.
4257 * gcc-interface/misc.c: Ditto.
4258 * gcc-interface/targtyps.c: Include hash-set.h, machmode.h,
4259 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h,
4260 fold-const.h, wide-int.h, and inchash.h due to
4261 flattening of tree.h.
4262 * gcc-interface/trans.c: Include hash-set.h, machmode.h,
4263 vec.h, double-int.h, input.h, alias.h, symtab.h, real.h,
4264 fold-const.h, wide-int.h, inchash.h due to
4265 flattening of tree.h.
4266 * gcc-interface/utils.c: Include hash-set.h, machmode.h,
4267 vec.h, double-int.h, input.h, alias.h, symtab.h,
4268 fold-const.h, wide-int.h, and inchash.h due to
4269 flattening of tree.h.
4270 * gcc-interface/utils2.c: Ditto.
4272 2015-01-07 Robert Dewar <dewar@adacore.com>
4274 * sem_warn.adb (Check_One_Unit): Don't give unused entities
4275 warning for a package which is used as a generic parameter.
4277 2015-01-07 Bob Duff <duff@adacore.com>
4279 * usage.adb (Usage): Correct documentation of
4282 2015-01-07 Robert Dewar <dewar@adacore.com>
4284 * s-fileio.adb: Minor reformatting.
4286 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4288 * sem_ch12.adb (Instantiate_Object): If formal is an anonymous
4289 access to subprogram, replace its formals with new entities when
4290 building the object declaration, both if actual is present and
4291 when it is defaulted.
4293 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4295 * sem_ch5.adb (Analyze_Assignment): If left-hand side is a view
4296 conversion and type of expression has invariant, apply invariant
4297 check on expression.
4299 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4301 * sem_ch3.adb (Create_Constrained_Components): A call to
4302 Gather_Components may detect an error if an inherited discriminant
4303 that controls a variant is non-static.
4304 * sem_aggr.adb (Resolve_Record_Aggregate, Step 5): The call to
4305 Gather_Components may report an error if an inherited discriminant
4306 in a variant in non-static.
4307 * sem_util.adb (Gather_Components): If a non-static discriminant
4308 is inherited do not report error here, but let caller handle it.
4309 (Find_Actual): Small optimization.
4311 2015-01-07 Bob Duff <duff@adacore.com>
4313 * usage.adb (Usage): Document -gnatw.f switch.
4315 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4317 * sem_ch12.adb: Code clean up and minor reformatting.
4319 2015-01-07 Robert Dewar <dewar@adacore.com>
4321 * exp_ch4.adb (Expand_N_Type_Conversion): Add guard for
4322 Raise_Accessibility_Error call.
4323 * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Add documentation
4324 on handling of invalid digits in based constants.
4325 * s-fatgen.ads: Minor reformatting.
4326 * sem_attr.adb (Analyze_Attribute, case Unrestricted_Access):
4327 Avoid noting bogus modification for Valid test.
4328 * snames.ads-tmpl (Name_Attr_Long_Float): New Name.
4329 * einfo.ads: Minor reformatting.
4330 * sem_warn.adb: Minor comment clarification.
4331 * sem_ch12.adb: Minor reformatting.
4333 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4335 * exp_ch5.adb (Expand_Predicated_Loop): Handle properly loops
4336 over static predicates when the loop parameter specification
4337 carries a Reverse indicator.
4339 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4341 * sem_ch12.adb (Instantiate_Object): If formal has a default,
4342 actual is missing and formal has an anonymous access type, copy
4343 access definition in full so that tree for instance is properly
4344 formatted for ASIS use.
4346 2015-01-07 Bob Duff <duff@adacore.com>
4348 * sem_elab.adb (Check_Internal_Call_Continue): Give a warning
4349 for P'Access, where P is a subprogram in the same package as
4350 the P'Access, and the P'Access is evaluated at elaboration
4351 time, and occurs before the body of P. For example, "X : T :=
4352 P'Access;" would allow a subsequent call to X.all to be an
4353 access-before-elaboration error; hence the warning. This warning
4354 is enabled by the -gnatw.f switch.
4355 * opt.ads (Warn_On_Elab_Access): New flag for warning switch.
4356 * warnsw.adb (Set_Dot_Warning_Switch): Set Warn_On_Elab_Access.
4357 * gnat_ugn.texi: Document the new warning.
4359 2015-01-07 Johannes Kanig <kanig@adacore.com>
4361 * lib-xref-spark_specific.adb (Collect_SPARK_Xrefs): Skip unneeded
4364 2015-01-07 Robert Dewar <dewar@adacore.com>
4366 * s-taprop-linux.adb, clean.adb: Minor reformatting.
4368 2015-01-07 Arnaud Charlet <charlet@adacore.com>
4370 * s-tassta.adb: Relax some overzealous assertions.
4372 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4374 * sem_ch6.adb (Analyze_Return_Type): An call that returns a limited
4375 view of a type is legal when context is a thunk generated for
4376 operation inherited from an interface.
4377 * exp_ch6.adb (Expand_Simple_Function_Return): If context is
4378 a thunk and return type is an incomplete type do not continue
4379 expansion; thunk will be fully elaborated when generating code.
4381 2015-01-07 Doug Rupp <rupp@adacore.com>
4383 * s-osinte-mingw.ads (LARGE_INTEGR): New subtype.
4384 (QueryPerformanceFrequency): New imported procedure.
4385 * s-taprop-mingw.adb (RT_Resolution): Call above and return
4386 resolution vice a hardcoded value.
4387 * s-taprop-solaris.adb (RT_Resolution): Call clock_getres and return
4388 resolution vice a hardcoded value.
4389 * s-linux-android.ads (clockid_t): New subtype.
4390 * s-osinte-aix.ads (clock_getres): New imported subprogram.
4391 * s-osinte-android.ads (clock_getres): Likewise.
4392 * s-osinte-freebsd.ads (clock_getres): Likewise.
4393 * s-osinte-solaris-posix.ads (clock_getres): Likewise.
4394 * s-osinte-darwin.ads (clock_getres): New subprogram.
4395 * s-osinte-darwin.adb (clock_getres): New subprogram.
4396 * thread.c (__gnat_clock_get_res) [__APPLE__]: New function.
4397 * s-taprop-posix.adb (RT_Resolution): Call clock_getres to
4398 calculate resolution vice hard coded value.
4400 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4402 * exp_util.adb (Make_CW_Equivalent_Type): If root type is a
4403 limited view, use non-limited view when available to create
4404 equivalent record type.
4406 2015-01-07 Vincent Celier <celier@adacore.com>
4408 * gnatcmd.adb: Remove command Sync and any data and processing
4409 related to this command. Remove project processing for gnatstack.
4410 * prj-attr.adb: Remove package Synchonize and its attributes.
4412 2015-01-07 Vincent Celier <celier@adacore.com>
4414 * clean.adb: Minor error message change.
4416 2015-01-07 Tristan Gingold <gingold@adacore.com>
4419 * env.c (__gnat_environ): Adjust for darwin9/darwin10.
4421 2015-01-07 Javier Miranda <miranda@adacore.com>
4423 * sem_ch10.adb (Analyze_With_Clause): Compiling under -gnatq
4424 protect the frontend against never ending recursion caused by
4425 circularities in the sources.
4427 2015-01-07 Robert Dewar <dewar@adacore.com>
4429 * a-reatim.adb, make.adb, exp_pakd.adb, i-cpoint.adb, sem_ch8.adb,
4430 exp_ch3.adb: Minor reformatting.
4432 2015-01-07 Doug Rupp <rupp@adacore.com>
4434 * s-linux.ads (clockid_t): New subtype.
4435 * s-osinte-linux.ads (pragma Linker Options): Add -lrt.
4436 (clockid_t): New subtype.
4437 (clock_getres): Import system call.
4438 * s-taprop-linux.adb (System.OS_Constants): With and rename.
4439 (RT_Resolution): Remove
4440 hardcoded value and call clock_getres.
4441 * s-linux-sparc.ads, s-linux-mipsel.ads, s-linux-hppa.ads,
4442 s-linux-alpha.ads, s-linux-x32.ads (clockid_t): Add new subtype.
4444 2015-01-07 Robert Dewar <dewar@adacore.com>
4446 * sem_warn.adb (Check_One_Unit): Guard against context item
4447 with no Entity field.
4449 2015-01-07 Vincent Celier <celier@adacore.com>
4451 * clean.adb (Gnatclean): Warn that 'gnatclean -P' is obsolete.
4452 * make.adb (Initialize): Warn that 'gnatmake -P' is obsolete.
4454 2015-01-07 Vincent Celier <celier@adacore.com>
4456 * prj-conf.adb (Parse_Project_And_Apply_Config): Always finalize
4457 errors/warnings in the first parsing of the project files,
4458 to display the warnings when there is no errors.
4460 2015-01-07 Tristan Gingold <gingold@adacore.com>
4462 * i-cpoint.adb (Copy_Terminated_Array): Nicely handle null target.
4464 2015-01-07 Doug Rupp <rupp@adacore.com>
4466 * s-taprop-vxworks.adb (Stop_All_Tasks): Pass return
4467 value from Int_Lock as parameter to Int_Unlock.
4468 * s-osinte-vxworks.ads (Int_Unlock): Add parameter.
4469 * s-vxwext.ads (Int_Unlock): Likewise.
4470 * s-vxwext-kernel.adb (intUnlock, Int_Unlock): Likewise.
4471 * s-vxwext-kernel.ads (Int_Unlock): Likewise.
4472 * s-vxwext-rtp.adb (Int_Unlock): Likewise.
4473 * s-vxwext-rtp.ads (Int_Unlock): Likewise.
4475 2015-01-07 Pierre-Marie de Rodat <derodat@adacore.com>
4477 * exp_pakd.adb: Add a comment in exp_pakd.adb to explain why we
4480 2015-01-07 Tristan Gingold <gingold@adacore.com>
4482 * i-cpoint.adb (Copy_Terminated_Array): Use Copy_Array to
4485 2015-01-07 Eric Botcazou <ebotcazou@adacore.com>
4487 * sem_ch3.adb (Analyze_Full_Type_Declaration): Do not
4488 automatically set No_Strict_Aliasing on access types.
4489 * fe.h (No_Strict_Aliasing_CP): Declare.
4490 * gcc-interface/trans.c (gigi): Force flag_strict_aliasing to 0 if
4491 No_Strict_Aliasing_CP is set.
4493 2015-01-07 Johannes Kanig <kanig@adacore.com>
4495 * sem_ch8.adb (Analyze_Subprogram_Renaming) do
4496 not build function wrapper in gnatprove mode when the package
4497 is externally axiomatized.
4499 2015-01-07 Jose Ruiz <ruiz@adacore.com>
4501 * a-reatim.adb (Time_Of): Reduce the number of spurious overflows in
4502 intermediate computations when the parameters have different signs.
4504 2015-01-07 Javier Miranda <miranda@adacore.com>
4506 * exp_ch3.adb (Build_Init_Procedure): For derived types,
4507 improve the code which takes care of identifying and moving to
4508 the beginning of the init-proc the call to the init-proc of the
4511 2015-01-07 Olivier Hainque <hainque@adacore.com>
4513 * gcc-interface/trans.c (gnat_to_gnu, <N_Expression_With_Action>):
4514 Elaborate the expression as part of the same stmt group as the actions.
4516 2015-01-07 Robert Dewar <dewar@adacore.com>
4518 * sem_ch3.adb: Minor error message change.
4520 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4522 * sem_prag.adb (Analyze_Pragma, case Preelaborable_Initialization):
4523 Following AI05-028, the pragam applies legally to any composite type.
4525 2015-01-07 Arnaud Charlet <charlet@adacore.com>
4527 * s-osinte-vxworks.adb, s-osinte-vxworks.ads
4528 (sigwait, sigwaitinfo): Removed, not needed after all on any
4529 VxWorks configurations.
4531 2015-01-07 Robert Dewar <dewar@adacore.com>
4533 * sem_ch3.adb, freeze.adb, exp_disp.adb: Minor reformatting.
4535 2015-01-07 Javier Miranda <miranda@adacore.com>
4537 * exp_disp.adb (Expand_Interface_Conversion): Adding missing
4538 generation of accessibility check.
4540 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4542 * sem_ch3.adb (Derived_Type_Declaration): In the case of an
4543 illegal completion from a class- wide type, set etype of the
4544 derived type properly to prevent cascaded errors.
4546 2015-01-07 Robert Dewar <dewar@adacore.com>
4548 * prj.ads, i-cpoint.adb, freeze.adb, ghost.adb, prj-err.adb: Minor
4551 2015-01-07 Robert Dewar <dewar@adacore.com>
4553 * restrict.adb (Check_Restriction_No_Use_Of_Attribute):
4555 (OK_No_Use_Of_Entity_Name): New function.
4556 (Set_Restriction_No_Use_Of_Entity): New procedure.
4557 * restrict.ads (Check_Restriction_No_Use_Of_Attribute):
4559 (OK_No_Use_Of_Entity_Name): New function.
4560 (Set_Restriction_No_Use_Of_Entity): New procedure.
4561 * sem_ch8.adb (Find_Direct_Name): Add check for violation of
4563 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
4564 Add processing for new restriction No_Use_Of_Entity.
4566 2015-01-07 Eric Botcazou <ebotcazou@adacore.com>
4568 * freeze.adb (Freeze_Array_Type): Apply same handling to Is_Atomic
4569 component type as to Has_Atomic_Components type. Remove useless
4570 test on Is_Aliased component type.
4572 2015-01-07 Hristian Kirtchev <kirtchev@adacore.com>
4574 * alloc.ads Alphabetize several declarations. Add constants
4575 Ignored_Ghost_Units_Initial and Ignored_Ghost_Units_Increment.
4576 * atree.adb Add with and use clauses for Opt.
4577 (Allocate_Initialize_Node): Mark a node as ignored Ghost
4578 if it is created in an ignored Ghost region.
4579 (Ekind_In): New variant.
4580 (Is_Ignored_Ghost_Node): New routine.
4581 (Set_Is_Ignored_Ghost_Node): New routine.
4582 * atree.adb Aplhabetize several subprograms declarations. Flag
4583 Spare0 is now known as Is_Ignored_Ghost_Node.
4584 (Ekind_In): New variant.
4585 (Is_Ignored_Ghost_Node): New routine.
4586 (Set_Is_Ignored_Ghost_Node): New routine.
4587 * einfo.adb: Flag 279 is now known as Contains_Ignored_Ghost_Code.
4588 (Contains_Ignored_Ghost_Code): New routine.
4589 (Set_Contains_Ignored_Ghost_Code): New routine.
4590 (Set_Is_Checked_Ghost_Entity, Set_Is_Ignored_Ghost_Entity):
4591 It is now possible to set this property on an unanalyzed entity.
4592 (Write_Entity_Flags): Output the status of flag
4593 Contains_Ignored_Ghost_Code.
4594 * einfo.ads New attribute Contains_Ignored_Ghost_Code along with
4596 (Contains_Ignored_Ghost_Code): New routine
4597 along with pragma Inline.
4598 (Set_Contains_Ignored_Ghost_Code): New routine along with pragma Inline.
4599 * exp_ch3.adb Add with and use clauses for Ghost.
4600 (Freeze_Type): Capture/restore the value of Ghost_Mode on entry/exit.
4601 Set the Ghost_Mode in effect.
4602 (Restore_Globals): New routine.
4603 * exp_ch7.adb (Process_Declarations): Do not process a context
4604 that invoves an ignored Ghost entity.
4605 * exp_dbug.adb (Qualify_All_Entity_Names): Skip an ignored Ghost
4606 construct that has been rewritten as a null statement.
4607 * exp_disp.adb Add with and use clauses for Ghost.
4608 (Make_DT): Capture/restore the value of Ghost_Mode on entry/exit. Set
4609 the Ghost_Mode in effect.
4610 (Restore_Globals): New routine.
4611 * exp_util.adb (Requires_Cleanup_Actions): An ignored Ghost entity
4612 does not require any clean up. Add two missing cases that deal
4613 with block statements.
4614 * freeze.adb Add with and use clauses for Ghost.
4615 (Freeze_Entity): Capture/restore the value of Ghost_Mode on entry/exit.
4616 Set the Ghost_Mode in effect.
4617 (Restore_Globals): New routine.
4618 * frontend.adb Add with and use clauses for Ghost. Remove any
4619 ignored Ghost code from all units that qualify.
4620 * ghost.adb New unit.
4621 * ghost.ads New unit.
4622 * gnat1drv.adb Add with clause for Ghost. Initialize and lock
4623 the table in package Ghost.
4624 * lib.ads: Alphabetize several subprogram declarations.
4625 * lib-xref.adb (Output_References): Do not generate reference
4626 information for ignored Ghost entities.
4627 * opt.ads Add new type Ghost_Mode_Type and new global variable
4629 * rtsfind.adb (Load_RTU): Provide a clean environment when
4630 loading a runtime unit.
4631 * sem.adb (Analyze): Capture/restore the value of Ghost_Mode on
4632 entry/exit as the node may set a different mode.
4634 Capture/restore the value of Ghost_Mode on entry/exit as the
4635 unit may be withed from a unit with a different Ghost mode.
4636 * sem_ch3.adb Add with and use clauses for Ghost.
4637 (Analyze_Full_Type_Declaration, Analyze_Incomplete_Type_Decl,
4638 Analyze_Number_Declaration, Analyze_Private_Extension_Declaration,
4639 Analyze_Subtype_Declaration): Set the Ghost_Mode in effect. Mark
4640 the entity as Ghost when there is a Ghost_Mode in effect.
4641 (Array_Type_Declaration): The implicit base type inherits the
4642 "ghostness" from the array type.
4643 (Derive_Subprogram): The
4644 alias inherits the "ghostness" from the parent subprogram.
4645 (Make_Implicit_Base): The implicit base type inherits the
4646 "ghostness" from the parent type.
4647 * sem_ch5.adb Add with and use clauses for Ghost.
4648 (Analyze_Assignment): Set the Ghost_Mode in effect.
4649 * sem_ch6.adb Add with and use clauses for Ghost.
4650 (Analyze_Abstract_Subprogram_Declaration, Analyze_Procedure_Call,
4651 Analyze_Subprogram_Body_Helper, Analyze_Subprogram_Declaration):
4652 Set the Ghost_Mode in effect. Mark the entity as Ghost when
4653 there is a Ghost_Mode in effect.
4654 * sem_ch7.adb Add with and use clauses for Ghost.
4655 (Analyze_Package_Body_Helper, Analyze_Package_Declaration,
4656 Analyze_Private_Type_Declaration): Set the Ghost_Mode in
4657 effect. Mark the entity as Ghost when there is a Ghost_Mode
4659 * sem_ch8.adb Add with and use clauses for Ghost.
4660 (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
4661 Analyze_Object_Renaming, Analyze_Package_Renaming,
4662 Analyze_Subprogram_Renaming): Set the Ghost_Mode in effect. Mark
4663 the entity as Ghost when there is a Ghost_Mode in effect.
4664 (Find_Type): Check the Ghost context of a type.
4665 * sem_ch11.adb Add with and use clauses for Ghost.
4666 (Analyze_Exception_Declaration): Set the Ghost_Mode in
4667 effect. Mark the entity as Ghost when there is a Ghost_Mode
4669 * sem_ch12.adb Add with and use clauses for Ghost.
4670 (Analyze_Generic_Package_Declaration,
4671 Analyze_Generic_Subprogram_Declaration): Set the Ghost_Mode in effect.
4672 Mark the entity as Ghost when there is a Ghost_Mode in effect.
4673 * sem_prag.adb Add with and use clauses for Ghost.
4674 (Analyze_Pragma): Ghost-related checks are triggered when there
4675 is a Ghost mode in effect.
4676 (Create_Abstract_State): Mark the
4677 entity as Ghost when there is a Ghost_Mode in effect.
4678 * sem_res.adb Add with and use clauses for Ghost.
4679 (Check_Ghost_Context): Removed.
4680 * sem_util.adb (Check_Ghost_Completion): Removed.
4681 (Check_Ghost_Derivation): Removed.
4682 (Incomplete_Or_Partial_View):
4683 Add a guard in case the entity has not been analyzed yet
4684 and does carry a scope.
4685 (Is_Declaration): New routine.
4686 (Is_Ghost_Entity): Removed.
4687 (Is_Ghost_Statement_Or_Pragma):
4689 (Is_Subject_To_Ghost): Removed.
4690 (Set_Is_Ghost_Entity):
4692 (Within_Ghost_Scope): Removed.
4693 * sem_util.adb (Check_Ghost_Completion): Removed.
4694 (Check_Ghost_Derivation): Removed.
4695 (Is_Declaration): New routine.
4696 (Is_Ghost_Entity): Removed.
4697 (Is_Ghost_Statement_Or_Pragma): Removed.
4698 (Is_Subject_To_Ghost): Removed.
4699 (Set_Is_Ghost_Entity): Removed.
4700 (Within_Ghost_Scope): Removed.
4701 * sinfo.ads Add a section on Ghost mode.
4702 * treepr.adb (Print_Header_Flag): New routine.
4703 (Print_Node_Header): Factor out code. Output flag
4704 Is_Ignored_Ghost_Node.
4705 * gcc-interface/Make-lang.in: Add dependency for unit Ghost.
4707 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
4709 * freeze.adb (Freeze_Array_Type) <Complain_CS>: Remove always
4710 true test and unreachable 'else' arm.
4712 2015-01-06 Vincent Celier <celier@adacore.com>
4714 * prj-conf.adb (Check_Target): Improve error message when
4715 there are mismatched targets between the on in the configuration
4716 project file and the specified one, either in the main project
4717 file or in the --target= switch.
4719 2015-01-06 Pascal Obry <obry@adacore.com>
4721 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Mode and
4722 Install_Name attribute definitions.
4724 2015-01-06 Ed Schonberg <schonberg@adacore.com>
4726 * freeze.adb (Wrap_Imported_Subprogram): Indicate that the
4727 generated Import pragma for the internal imported procedure does
4728 not come from an aspect, so that Is_Imported can be properly
4731 2015-01-06 Gary Dismukes <dismukes@adacore.com>
4733 * sem_ch12.adb (Might_Inline_Subp): Record whether
4734 any subprograms in the generic package are marked with
4735 pragma Inline_Always (setting flag Has_Inline_Always).
4736 (Analyze_Package_Instantiation): Add test of Has_Inline_Always
4737 alongside existing test of Front_End_Inlining as alternative
4738 conditions for setting Inline_Now. Also add test of
4739 Has_Inline_Always along with Front_End_Inlining test as an
4740 alternative condition for setting Needs_Body to False.
4742 2015-01-06 Tristan Gingold <gingold@adacore.com>
4744 * i-cpoint.adb (Copy_Array): Handle overlap.
4746 2015-01-06 Pascal Obry <obry@adacore.com>
4748 * bindgen.adb: Minor style fix.
4750 2015-01-06 Robert Dewar <dewar@adacore.com>
4752 * sem_util.ads, sem_util.adb: Minor reformatting.
4754 2015-01-06 Vincent Celier <celier@adacore.com>
4756 * prj-conf.adb (Parse_Project_And_Apply_Config): Reset incomplete
4757 with flags before parsing the projects.
4758 * prj-err.adb (Error_Msg): Do nothing if there are incomplete withs.
4759 * prj-part.adb (Post_Parse_Context_Clause): Set Incomplete_Withs
4760 to True in the flags, when Ignore_Missing_With is True and an
4761 imported project cannot be found.
4762 * prj-proc.adb (Expression): When there are incomplete withs and
4763 a variable or attribute is not found, set the variable/attribute
4765 * prj.ads (Processing_Flags): New flag Incomplete_Withs,
4768 2015-01-06 Vasiliy Fofanov <fofanov@adacore.com>
4770 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-conf.adb,
4771 prj-err.adb: Add new switch --no-command-line.
4773 2015-01-06 Ed Schonberg <schonberg@adacore.com>
4775 * sem_ch12.adb: Sloc of wrapper is that of instantiation.
4777 2015-01-06 Robert Dewar <dewar@adacore.com>
4779 * sem_ch11.adb: Minor reformatting.
4781 2015-01-06 Ed Schonberg <schonberg@adacore.com>
4783 * exp_aggr.adb (Get_Assoc_Expr): New routine internal to
4784 Build_Array_Aggr_Code, used to initialized components covered
4785 by a box association. If the component type is scalar and has
4786 a default aspect, use it to initialize such components.
4788 2015-01-06 Pascal Obry <obry@adacore.com>
4790 * rtinit.c (__gnat_runtime_initialize): Add a parameter to
4791 control the setup of the exception handler.
4792 * initialize.c: Remove unused declaration.
4793 * bindgen.adb: Always call __gnat_runtime_initialize and pass
4794 whether the exeception handler must be set or not.
4796 2015-01-06 Thomas Quinot <quinot@adacore.com>
4798 * freeze.adb (Set_SSO_From_Defaults): When setting scalar storage
4799 order to native from default, make sure to also adjust bit order.
4800 * exp_aggr.adb: Minor reformatting.
4802 2015-01-06 Robert Dewar <dewar@adacore.com>
4804 * s-valllu.adb, s-valllu.ads, s-valuti.ads, s-valuns.adb, s-valuns.ads,
4805 s-valrea.adb, s-valrea.ads: Add some additional guards for
4806 Str'Last = Positive'Last.
4808 2015-01-06 Ed Schonberg <schonberg@adacore.com>
4810 * sem_ch12.adb, sem_ch8.adb: Ongoing work for wrappers for actual
4813 2015-01-06 Javier Miranda <miranda@adacore.com>
4815 * exp_disp.adb (Expand_Interface_Conversion): Reapply patch.
4817 2015-01-06 Thomas Quinot <quinot@adacore.com>
4819 * sem_util.ads: Minor reformatting.
4820 * sem_cat.adb (In_RCI_Visible_Declarations): Change back to...
4821 (In_RCI_Declaration) Return to old name, as proper checking of
4822 entity being in the visible part depends on entity kind and must
4823 be done by the caller.
4825 2015-01-06 Ed Schonberg <schonberg@adacore.com>
4827 * sem_ch12.adb, sem_ch12.ads, sem_ch8.adb: Ongoing work for wrappers
4828 for operators in SPARK.
4830 2015-01-06 Ed Schonberg <schonberg@adacore.com>
4832 * sem_aggr.adb (Get_Value): In ASIS mode, preanalyze the
4833 expression in an others association before making copies for
4834 separate resolution and accessibility checks. This ensures that
4835 the type of the expression is available to ASIS in all cases,
4836 in particular if the expression is itself an aggregate.
4838 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
4840 * einfo.ads (Has_Independent_Components): Document extended
4842 * einfo.adb (Has_Independent_Components): Remove obsolete assertion.
4843 (Set_Has_Independent_Components): Adjust assertion.
4844 * sem_prag.adb (Analyze_Pragma): Also set Has_Independent_Components
4845 for pragma Atomic_Components. Set Has_Independent_Components
4846 on the object instead of the type for an object declaration with
4847 pragma Independent_Components.
4849 2015-01-06 Olivier Hainque <hainque@adacore.com>
4851 * set_targ.adb (Read_Target_Dependent_Values): Set
4852 Long_Double_Index when "long double" is read.
4853 (elaboration code): Register_Back_End_Types only when not reading from
4854 config files. Doing otherwise is pointless and error prone.
4856 2015-01-06 Robert Dewar <dewar@adacore.com>
4858 * s-valrea.adb (Value_Real): Check for Str'Last = Positive'Last
4860 2015-01-06 Robert Dewar <dewar@adacore.com>
4862 * a-wtgeau.adb, a-ztgeau.adb, a-tigeau.adb (String_Skip): Raise PE if
4863 Str'Last = Positive'Last.
4865 2015-01-06 Ed Schonberg <schonberg@adacore.com>
4867 * sem_ch6.adb (Matches_Limited_View): Handle properly the case
4868 where the non-limited type is a generic actual and appears as
4869 a subtype of the non-limited view of the other.
4870 * freeze.adb (Build_Renamed_Body): If the return type of the
4871 declaration that is being completed is a limited view and the
4872 non-limited view is available, use it in the specification of
4875 2015-01-06 Ed Schonberg <schonberg@adacore.com>
4877 * sem_ch3.adb (Find_Type_Name): If there is a previous tagged
4878 incomplete view, the type of the classwide type common to both
4879 views is the type being declared.
4881 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
4883 * einfo.ads (Is_Independent): Further document extended usage.
4885 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
4887 * einfo.ads (Is_Independent): Document extended usage.
4888 * einfo.adb (Is_Independent): Remove obsolete assertion.
4889 (Set_Is_Independent): Likewise.
4890 * sem_prag.adb (Process_Atomic_Shared_Volatile): Rename into...
4891 (Process_Atomic_Independent_Shared_Volatile): ...this.
4892 Deal with pragma Independent here.
4893 (Analyze_Pragma): Adjust
4894 to above renaming and also invoke it for pragma Independent.
4895 Adjust comment for Independent_Components.
4897 2015-01-06 Robert Dewar <dewar@adacore.com>
4899 * snames.ads-tmpl: Remove entries for attribute Enum_Image.
4900 * exp_attr.adb: Remove reference to Attribute_Enum_Image.
4902 2015-01-06 Robert Dewar <dewar@adacore.com>
4904 * s-vallli.adb (Value_Long_Long_Integer): Handle case of Str'Last
4906 * s-valllu.adb (Value_Long_Long_Unsigned): Handle case of
4907 Str'Last = Positive'Last.
4909 2015-01-06 Robert Dewar <dewar@adacore.com>
4911 * sem_prag.adb (Process_Inline): Remove redundant construct
4912 warning (-gnatw.r) for an ineffective pragma Inline.
4914 2015-01-06 Robert Dewar <dewar@adacore.com>
4916 * s-valint.adb: Fix typo in last checkin.
4917 * s-valuns.adb (Value_Unsigned): More efficient fix for
4919 * sem_attr.adb (Analyze_Attribute): Minor reformatting
4920 (Eval_Attribute): Static ervaluation of 'Img for enumeration types.
4922 2015-01-06 Robert Dewar <dewar@adacore.com>
4924 * s-valint.adb, s-valuns.adb (Value_Integer): Deal with case where
4925 Str'Last = Positive'Last
4927 2015-01-06 Thomas Quinot <quinot@adacore.com>
4929 * xoscons.adb: Display exception information and return non-zero
4930 exit status in top level exception handler.
4932 2015-01-06 Ed Schonberg <schonberg@adacore.com>
4934 * sem_ch8.adb: Code clean up.
4936 2015-01-06 Tristan Gingold <gingold@adacore.com>
4938 * targparm.ads: Remove obsolete comment.
4940 2015-01-06 Olivier Hainque <hainque@adacore.com>
4942 * gcc-interface/decl.c (gnat_to_gnu_entity, case E_Variable): When
4943 constructing a ref to variable, update inner_const_flag from the
4944 variable TREE_READONLY attribute.
4945 * gcc-interface/targtyps.c (WIDEST_HARDWARE_FP_SIZE): Remove default
4947 (get_target_float_size): Remove.
4948 (get_target_double_size): Remove.
4949 (get_target_long_double_size): Remove.
4951 2015-01-06 Pascal Obry <obry@adacore.com>
4953 * adaint.c (ProcListEvt): Set to NULL.
4954 * rtinit.c: New file.
4955 (__gnat_rt_init_count): New reference counter set to 0.
4956 (__gnat_runtime_initialize): Move code here from __gnat_initialize when
4957 this code is actually needed for the runtime initialization. This
4958 routine returns immediately if the initialization has already been done.
4959 * final.c: Revert previous change.
4960 * rtfinal.c: New file.
4961 (__gnat_runtime_finalize)[Win32]: Add finalization of the critical
4962 section and event. The default version of this routine is empty (except
4963 for the reference counting code). This routine returns immediately if
4964 some others libraries are referencing the runtime.
4965 * bindgen.adb (Gen_Adainit): Generate call to Runtime_Initialize
4966 remove circuitry to initialize the signal handler as this is
4967 now done by the runtime initialization routine.
4968 (Gen_Adafinal): Generate call to Runtime_Finalize.
4969 * gnat_ugn.texi: Update documentation about concurrency and
4970 initialization/finalization of the run-time.
4971 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Add
4972 references to rtfinal.o and rtinit.o
4974 2015-01-06 Robert Dewar <dewar@adacore.com>
4976 * exp_attr.adb (Expand_N_Attribute_Reference): Add dummy entry
4978 * sem_attr.adb: Implement Enum_Image attribute.
4979 * snames.ads-tmpl: Add entries for Enum_Image attribute.
4981 2015-01-06 Robert Dewar <dewar@adacore.com>
4983 * namet.ads: Document use of Boolean2 for No_Use_Of_Entity.
4984 * restrict.ads (No_Use_Of_Entity): New table.
4985 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
4986 Ignore No_Use_Of_Entity (will be processed in parser).
4987 * snames.ads-tmpl: Add entry for Name_No_Use_Of_Entity.
4989 2015-01-06 Vincent Celier <celier@adacore.com>
4991 * prj-tree.adb (Imported_Or_Extended_Project_Of): Do not try
4992 to check for an extended project, if a project does not have
4993 yet a project declaration.
4995 2015-01-06 Pierre-Marie Derodat <derodat@adacore.com>
4997 * scos.ads: Update documentation about the SCO table build
4998 process and about table records format.
4999 * par_sco.ads (SCO_Record): Rename to SCO_Record_Raw.
5000 (SCO_Record_Filtered): New procedure.
5001 (Set_SCO_Logical_Operator): New procedure.
5002 (dsco): Update documentation.
5003 * par_sco.adb: Update library-level comments.
5004 (SCO_Generation_State_Type): New type.
5005 (SCO_Generation_State): New variable.
5006 (SCO_Raw_Table): New package instanciation.
5007 (Condition_Pragma_Hash_Table): Rename to SCO_Raw_Hash_Table.
5009 (Tristate): New type.
5010 (Is_Logical_Operator): Return Tristate and update documentation.
5011 (Has_Decision): Update call to Is_Logical_Operator and complete
5013 (Set_Table_Entry): Rename to Set_Raw_Table_Entry, update
5014 comment, add an assertion for state checking and change
5015 references to SCO_Table into SCO_Raw_Table.
5016 (dsco): Refactor to dump the raw and the filtered tables.
5017 (Process_Decisions.Output_Decision_Operand): Handle putative
5018 short-circuit operators.
5019 (Process_Decisions.Output_Element): Update references
5020 to Set_Table_Entry and to Condition_Pragma_Hash_Table.
5021 (Process_Decisions.Process_Decision_Operand): Update call
5022 to Is_Logical_Operator.
5023 (Process_Decisions.Process_Node): Handle putative short-circuit
5024 operators and change references to
5025 SCO_Table into SCO_Raw_Table.
5026 (SCO_Output): Add an assertion
5027 for state checking and remove code that used to stamp out SCO entries.
5028 (SCO_Pragma_Disabled): Change reference to SCO_Table
5030 (SCO_Record): Rename to SCO_Record_Raw,
5031 add an assertion for state checking and change references
5032 to SCO_Table into SCO_Raw_Table.
5033 (Set_SCO_Condition): Add an assertion for state checking, update
5034 references to Condition_Pragma_Hash_Table and change references to
5035 SCO_Table into SCO_Raw_Table.
5036 (Set_SCO_Pragma_Enabled): Add an assertion for state checking and
5037 change references to SCO_Table into SCO_Raw_Table.
5038 (Set_SCO_Logical_Operator): New procedure.
5039 (Traverse_Declarations_Or_Statements.Set_Statement_Entry): Update
5040 references to Set_Table_Entry and to Condition_Pragma_Hash_Table.
5041 (SCO_Record_Fildered): New procedure.
5042 * gnat1drv.adb (Gnat1drv): Invoke the SCO filtering pass.
5043 * lib-writ.adb (Write_ALI): Invoke the SCO filtering pass and
5045 * par-load.adb (Load): Update reference to SCO_Record.
5046 * par.adb (Par): Update reference to SCO_Record.
5047 * put_scos.adb (Put_SCOs): Add an assertion to check that no
5048 putative SCO condition reaches this end.
5049 * sem_ch10.adb (Analyze_Proper_Body): Update reference to SCO_Record.
5050 * sem_res.adb (Resolve_Logical_Op): Validate putative SCOs
5051 when corresponding to an "and"/"or" operator affected by the
5052 Short_Circuit_And_Or pragma.
5054 2015-01-06 Robert Dewar <dewar@adacore.com>
5056 * sem_ch8.adb (Analyze_Use_Package): Give more specific error
5057 msg for attempted USE of generic subprogram or subprogram.
5059 2015-01-06 Robert Dewar <dewar@adacore.com>
5061 * s-valllu.adb, a-tiinau.adb, a-timoau.adb, a-ztinau.adb, a-ztmoau.adb,
5062 s-valuns.adb, s-valrea.adb, a-wtflau.adb, a-tiflau.adb, a-ztflau.adb,
5063 a-wtinau.adb, a-wtmoau.adb: Document recognition of : in place of #.
5065 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5067 * sem_ch13.adb (Analyze_Aspect_Specifications): For aspects
5068 that specify stream subprograms, if the prefix is a class-wide
5069 type then the generated attribute definition clause must apply
5070 to the same class-wide type.
5071 (Default_Iterator): An iterator defined by an aspect of some
5072 container type T must have a first parameter of type T, T'class,
5073 or an access to such (from code reading RM 5.5.1 (2/3)).
5075 2015-01-06 Arnaud Charlet <charlet@adacore.com>
5077 * gnat1drv.adb: Minor: complete previous change.
5079 2015-01-06 Olivier Hainque <hainque@adacore.com>
5081 * set_targ.ads (C_Type_For): New function. Return the name of
5082 a C type supported by the back-end and suitable as a basis to
5083 construct the standard Ada floating point type identified by
5084 the T parameter. This is used as a common ground to feed both
5085 ttypes values and the GNAT tree nodes for the standard floating
5087 * set_targ.adb (Long_Double_Index): The index at which "long
5088 double" gets registered in the FPT_Mode_Table. This is useful to
5089 know whether we have a "long double" available at all and get at
5090 it's characteristics without having to search the FPT_Mode_Table
5091 when we need to decide which C type should be used as the
5092 basis for Long_Long_Float in Ada.
5093 (Register_Float_Type): Fill Long_Double_Index.
5094 (FPT_Mode_Index_For): New function. Return the index in
5095 FPT_Mode_Table that designates the entry corresponding to the
5096 provided C type name.
5097 (FPT_Mode_Index_For): New function. Return the index in
5098 FPT_Mode_Table that designates the entry for a back-end type
5099 suitable as a basis to construct the standard Ada floating point
5100 type identified by the input T parameter.
5101 (elaboration code): Register_Back_End_Types unconditionally,
5102 so C_Type_For can operate regardless of -gnateT. Do it
5103 early so we can query it for the floating point sizes, via
5104 FPT_Mode_Index_For. Initialize Float_Size, Double_Size and
5105 Long_Double_Size from the FPT_Mode_Table, as cstand will do.
5106 * cstand.adb (Create_Float_Types): Use C_Type_For to determine
5107 which C type should be used as the basis for the construction
5108 of the Standard Ada floating point types.
5109 * get_targ.ads (Get_Float_Size, Get_Double_Size,
5110 Get_Long_Double_Size): Remove.
5111 * get_targ.adb: Likewise.
5113 2015-01-06 Thomas Quinot <quinot@adacore.com>
5115 * sem_cat.adb (In_RCI_Declaration): Remove unnecessary
5116 parameter and rename to...
5117 (In_RCI_Visible_Declarations): Fix handling of private part of nested
5119 (Validate_RCI_Subprogram_Declaration): Reject illegal function
5120 returning anonymous access in RCI unit.
5122 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5124 * sem_ch6.adb (New_Overloaded_Entity): In GNATprove mode, a
5125 function wrapper may be a homonym of another local declaration.
5126 * sem_ch8.adb (Analyze_Subprogram_Renaming): In GNATprove mode,
5127 build function and operator wrappers after the actual subprogram
5128 has been resolved, and replace the standard renaming declaration
5129 with the declaration of wrapper.
5130 * sem_ch12.ads (Build_Function_Wrapper, Build_Operator_Wraooer):
5131 make public for use elsewhere.
5132 * sem_ch12.adb (Build_Function_Wrapper, Build_Operator_Wraooer):
5133 rewrite, now that actual is fully resolved when wrapper is
5136 2015-01-06 Javier Miranda <miranda@adacore.com>
5138 * exp_disp.adb: Revert previous change.
5140 2015-01-06 Robert Dewar <dewar@adacore.com>
5142 * exp_util.adb: Change name Name_Table_Boolean to
5143 Name_Table_Boolean1.
5144 * namet.adb: Change name Name_Table_Boolean to Name_Table_Boolean1
5145 Introduce Name_Table_Boolean2/3.
5146 * namet.ads: Change name Name_Table_Boolean to Name_Table_Boolean1
5147 Introduce Name_Table_Boolean2/3.
5148 * par-ch13.adb: Change name Name_Table_Boolean to
5149 Name_Table_Boolean1.
5151 2015-01-06 Bob Duff <duff@adacore.com>
5153 * gnat_rm.texi: Improve documentation regarding No_Task_Termination.
5155 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5157 * sem_aggr.adb (Resolve_Record_Aggregte, Get_Value): For an
5158 others choice that covers multiple components, analyze each
5159 copy with the type of the component even in compile-only mode,
5160 to detect potential accessibility errors.
5162 2015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
5164 * sem_res.adb (Is_Assignment_Or_Object_Expression): New routine.
5165 (Resolve_Actuals): An effectively volatile out
5166 parameter cannot act as an in or in out actual in a call.
5167 (Resolve_Entity_Name): An effectively volatile out parameter
5170 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5172 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If the body is
5173 the expansion of an expression function it may be pre-analyzed
5174 if a 'access attribute is applied to the function, in which case
5175 last_entity may have been assigned already.
5177 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5179 * sem_ch4.adb (Analyze_One_Call): If formal has an incomplete
5180 type and actual has the corresponding full view, there is no
5181 error, but a case of use of incomplete type in a predicate or
5182 invariant expression.
5184 2015-01-06 Vincent Celier <celier@adacore.com>
5186 * makeutl.adb (Insert_No_Roots): Make sure that the same source
5187 in two different project tree is checked in both trees, if they
5188 are sources of two different projects, extended or not.
5190 2015-01-06 Arnaud Charlet <charlet@adacore.com>
5192 * gnat1drv.adb: Minor code clean up.
5193 (Adjust_Global_Switches): Ignore gnatprove_mode in codepeer_mode.
5195 2015-01-06 Bob Duff <duff@adacore.com>
5197 * osint.adb (Read_Source_File): Don't print out
5198 file name unless T = Source.
5200 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5202 * sem_util.adb (Is_Variable, Is_OK_Variable_For_Out_Formal):
5203 recognize improper uses of constant_reference types as actuals
5204 for in-out parameters.
5205 (Check_Function_Call): Do not collect identifiers if function
5206 name is missing because of previous error.
5208 2015-01-06 Robert Dewar <dewar@adacore.com>
5210 * ali-util.adb, sem_prag.adb, rtsfind.adb, sem_util.adb, sem_res.adb,
5211 ali.adb, binde.adb, namet.adb, namet.ads, gnatls.adb, bcheck.adb:
5212 Minor change of name Name_Table_Info => Name_Table_Int.
5214 2015-01-06 Robert Dewar <dewar@adacore.com>
5216 * exp_strm.adb (Build_Elementary_Input_Call): Clarify comments
5217 in previous checkin.
5218 * freeze.adb (Freeze_Fixed_Point_Type): Add warning for shaving
5220 * sem_prag.adb, sem_ch10.adb, sem_ch6.adb: Minor reformatting.
5222 2015-01-06 Vincent Celier <celier@adacore.com>
5224 * a-strsup.adb (Times (Natural;String;Positive)): Raise
5225 Length_Error, not Index_Error, when the result is too long.
5227 2015-01-06 Thomas Quinot <quinot@adacore.com>
5229 * a-direct.adb (Create_Path): Minor error handling and
5230 performance improvement.
5232 2015-01-06 Robert Dewar <dewar@adacore.com>
5234 * checks.ads, sem_ch12.adb: Minor reformatting.
5235 * exp_ch4.adb (Expand_N_Op_Divide): Generate explicit divide by
5236 zero check for fixed-point case if Backend_Divide_Checks_On_Target
5239 2015-01-06 Robert Dewar <dewar@adacore.com>
5241 * sem_prag.adb (Analyze_Pragma, case No_Elaboration_Code_All):
5242 Do not set restriction No_Elaboration_Code unless the pragma
5243 appears in the main unit).
5245 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5247 * sem_ch10.adb (Is_Regular_With_Clause): Add guard to verify
5248 that with clause has already been analyzed before checking kind
5251 2015-01-06 Robert Dewar <dewar@adacore.com>
5253 * exp_strm.adb (Build_Elementary_Input_Call): Return base type
5254 (as required by RM).
5256 2015-01-06 Arnaud Charlet <charlet@adacore.com>
5258 * a-reatim.adb ("/"): Add explicit pragma Unsuppress (Division_Check).
5260 2015-01-06 Robert Dewar <dewar@adacore.com>
5262 * sem_prag.adb (Process_Suppress_Unsuppress): Add extra warning
5263 for ignoring pragma Suppress (Elaboration_Check) in SPARK mode.
5265 2015-01-06 Javier Miranda <miranda@adacore.com>
5267 * exp_disp.adb (Expand_Interface_Conversion): No displacement
5268 of the pointer to the object needed when the type of the operand
5269 is not an interface type and the interface is one of its parent
5270 types (since they share the primary dispatch table).
5272 2015-01-06 Vincent Celier <celier@adacore.com>
5274 * prj-env.adb: Minor comment update.
5276 2015-01-06 Javier Miranda <miranda@adacore.com>
5278 * sem_res.adb (Valid_Conversion): Restrict the checks on anonymous
5279 access types whose target type is an interface type to operands
5280 that are access types; required to report an error when the
5281 operand is not an access type.
5283 2015-01-06 Bob Duff <duff@adacore.com>
5285 * a-cfinve.adb (Copy): Set the discriminant to the Length when
5287 * a-cofove.ads (Capacity): Add a postcondition.
5288 * a-cfinve.ads (Capacity): Add a postcondition.
5289 (Reserve_Capacity): Correct the postcondition in the case where
5290 Capacity = 0; that means "Capacity => Length (Container)".
5291 * a-cofove.adb (Elems[c]): Add a comment
5292 explaining the dangers and how to avoid them.
5294 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5296 * sem_ch12.adb: Code clean up.
5298 2015-01-06 Arnaud Charlet <charlet@adacore.com>
5300 * gnatvsn.ads: Bump copyright year.
5302 2015-01-06 Robert Dewar <dewar@adacore.com>
5304 * s-taskin.ads, s-traces.ads: Minor reformatting.
5305 * exp_util.adb: Minor typo fix.
5307 2015-01-06 Vincent Celier <celier@adacore.com>
5309 * gnatls.adb (Search_RTS): Invoke Initialize_Default_Project_Path
5310 with the runtime name.
5311 * prj-env.adb (Initialize_Default_Project_Path): When both
5312 Target_Name and Runtime_Name are not empty string, add to the
5313 project path the two directories .../lib/gnat and .../share/gpr
5314 related to the runtime.
5315 * prj-env.ads (Initialize_Default_Project_Path): New String
5316 parameter Runtime_Name, defaulted to the empty string.
5318 2015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
5320 * frontend.adb: Guard against the case where a configuration
5321 pragma may be split into multiple pragmas and the original
5322 rewritten as a null statement.
5323 * sem_prag.adb (Analyze_Pragma): Insert a brand new Check_Policy
5324 pragma using Insert_Before rather than Insert_Action. This
5325 takes care of the configuration pragma case where Insert_Action
5328 2015-01-06 Bob Duff <duff@adacore.com>
5330 * a-coboho.ads (Element_Access): Add "pragma
5331 No_Strict_Aliasing (Element_Access);". This is needed because
5332 we are unchecked-converting from Address to Element_Access.
5333 * a-cofove.ads, a-cofove.adb (Elems,Elemsc): Fix bounds of the
5336 2015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
5338 * sem_res.adb (Resolve_Actuals): Remove the
5339 restriction which prohibits volatile actual parameters with
5340 enabled external propery Async_Writers to act appear in procedure
5341 calls where the corresponding formal is of mode OUT.
5343 2015-01-05 Jakub Jelinek <jakub@redhat.com>
5345 * gnat_ugn.texi: Bump @copying's copyright year.
5347 2015-01-05 Eric Botcazou <ebotcazou@adacore.com>
5350 * gcc-interface/Makefile.in (../stamp-tools): Reinstate dropped code.
5352 2015-01-04 Uros Bizjak <ubizjak@gmail.com>
5354 * gcc-interface/misc.c (internal_error_function): Use xasprintf instead
5355 of unchecked asprintf.
5358 Copyright (C) 2015 Free Software Foundation, Inc.
5360 Copying and distribution of this file, with or without modification,
5361 are permitted in any medium without royalty provided the copyright
5362 notice and this notice are preserved.