1 2015-06-29 Eric Botcazou <ebotcazou@adacore.com>
4 * gcc-interface/utils.c (gnat_write_global_declarations): Always
5 build the dummy global variable if code was generated.
7 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
10 * gcc-interface/misc.c (gnat_post_options): No need to disable
11 warn_unused_parameter anymore.
13 2015-06-26 Eric Botcazou <ebotcazou@adacore.com>
15 * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): When
16 not optimizing the CFG, clear the DECL_DECLARED_INLINE_P flag on the
19 2015-06-26 Eric Botcazou <ebotcazou@adacore.com>
21 * gcc-interface/gigi.h (note_types_used_by_globals): Delete.
22 (gnat_write_global_declarations): New prototype.
23 * gcc-interface/utils.c (type_decls): Rename back to...
24 (global_decls): ...this.
25 (gnat_pushdecls): Revert previous change.
26 (create_var_decl): Do not output global variables.
27 (note_types_used_by_globals): Rename back to...
28 (gnat_write_global_declarations): ...this. Output variables on the
30 * gcc-interface/misc.c (gnat_parse_file): Adjust to above renaming.
32 2015-06-26 Eric Botcazou <ebotcazou@adacore.com>
34 * gcc-interface/gigi.h (create_var_decl_1): Rename into...
35 (create_var_decl): ...this. Add default value for last parameter.
36 (create_type_stub_decl): Adjust.
37 (create_type_decl): Likewise.
38 (create_field_decl): Likewise.
39 (create_param_decl): Likewise.
40 (create_label_decl): Likewise.
41 (create_subprog_decl): Likewise.
42 * gcc-interface/utils.c (create_var_decl_1): Rename into...
43 (create_var_decl): ...this. Rename var_name into name and var_init
44 into init, move const_decl_allowed_p last and adjust accordingly.
45 (create_type_stub_decl): Rename type_name into name and adjust.
46 (create_type_decl): Likewise.
47 (create_field_decl): Likewise for field_name and field_type.
48 (create_param_decl): Likewise for param_name and param_type.
49 (create_label_decl): Likewise for label_name.
50 (create_subprog_decl): Likewise for subprog_name and subprog_type.
51 * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust couple of calls
54 2015-06-26 Eric Botcazou <ebotcazou@adacore.com>
56 * gcc-interface/trans.c (loop_info_d): Add low_bound, high_bound,
57 artificial, has_checks and warned_aggressive_loop_optimizations.
58 (gigi): Set warn_aggressive_loop_optimizations to 0.
59 (inside_loop_p): New inline predicate.
60 (push_range_check_info): Rename into...
61 (find_loop_for): ...this and do not push range_check_info_d object.
62 (Loop_Statement_to_gnu): Set artificial, low_bound and high_bound
63 fields of gnu_loop_info. Adjust detection of checks enabled by
64 -funswitch-loops and adds one for -faggressive-loop-optimizations.
65 (gnat_to_gnu) <N_Indexed_Component>: If aggressive loop optimizations
66 are enabled, warn for loops overrunning an array of size 1 not at the
69 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
71 * gcc-interface/trans.c: Remove ipa-ref.h and plugin-api.h from include
73 * gcc-interface/utils.c: Likewise.
75 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
77 * gcc-interface/decl.c (value_annotation_hasher): Inherit from
78 ggc_cache_ptr_hash rather than ggc_cache_hasher.
79 * gcc-interface/utils.c (pad_type_hasher): Likewise.
81 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
83 * gcc-interface/decl.c (value_annotation_hasher::handle_cache_entry):
85 (value_annotation_hasher::keep_cache_entry): New function.
86 * gcc-interface/utils.c (pad_type_hasher::handle_cache_entry):
88 (pad_type_hasher::keep_cache_entry): New function.
90 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
92 * gcc-interface/misc.c: Include calls.h not function.h.
94 2015-06-19 Eric Botcazou <ebotcazou@adacore.com>
96 * gcc-interface/gigi.h (record_builtin_type): Adjust comment.
97 (tree create_type_decl): Likewise.
98 (create_var_decl_1): Add artificial_p and debug_info_p parameters.
99 (create_var_decl): Likewise.
100 (create_true_var_decl): Delete.
101 (create_subprog_decl): Add debug_info_p parameter.
102 * gcc-interface/decl.c (gnat_to_gnu_entity): Add artificial_p local
103 variable and use it throughout. Remove DECL_ARTIFICIAL settings.
104 <E_Variable>: Adjust calls to create_var_decl and create_var_decl_1.
105 Remove DECL_IGNORED_P settings.
106 <E_Enumeration_Type>: Likewise.
107 <E_Record_Type>: Likewise.
108 <E_Subprogram_Type>: Likewise. Remove artificial_flag local variable.
109 Adjust call to create_subprog_decl.
110 (get_minimal_subprog_decl): Likewise.
111 (elaborate_expression_1): Adjust call to create_var_decl.
112 * gcc-interface/trans.c (gigi): Adjust calls to create_var_decl and
113 create_subprog_decl. Remove DECL_ARTIFICIAL & DECL_IGNORED_P settings.
114 * gcc-interface/utils.c (maybe_pad_type): Likewise.
115 (record_builtin_type): Adjust comment.
116 (create_type_stub_decl): Remove obsolete comment.
117 (create_var_decl_1): Add artificial_p and debug_info_p parameters.
118 Set DECL_ARTIFICIAL and DECL_IGNORED_P accordingly.
119 (create_subprog_decl): Add debug_info_p parameter. Set DECL_IGNORED_P
122 2015-06-19 Eric Botcazou <ebotcazou@adacore.com>
124 * gcc-interface/misc.c (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): Define.
126 2015-06-19 Eric Botcazou <ebotcazou@adacore.com>
128 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Make sure
129 the size of a padding type built around the return type is positive.
130 * gcc-interface/trans.c (gnat_to_gnu) <N_Simple_Return_Statement>:
131 Use INIT_EXPR instead of MODIFY_EXPR to assign to the return object.
133 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
135 * gcc-interface/cuintp.c: Do not include input.h, line-map.h or is-a.h.
136 * gcc-interface/decl.c: Likewise.
137 * gcc-interface/misc.c: Likewise.
138 * gcc-interface/targtyps.c: Likewise.
139 * gcc-interface/trans.c: Likewise.
140 * gcc-interface/utils.c: Likewise.
141 * gcc-interface/utils2.c: Likewise.
143 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
145 * gcc-interface/utils.c (get_global_context): Register the main
146 translation unit through the new debug hook.
148 2015-06-09 Eric Botcazou <ebotcazou@adacore.com>
150 * gcc-interface/misc.c: Remove duplicate include directives.
151 * gcc-interface/trans.c: Likewise.
152 * gcc-interface/utils.c: Likewise.
154 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
156 * gcc-interface/cuintp.c : Adjust include files.
157 * gcc-interface/decl.c : Likewise.
158 * gcc-interface/misc.c : Likewise.
159 * gcc-interface/targtyps.c : Likewise.
160 * gcc-interface/trans.c : Likewise.
161 * gcc-interface/utils.c : Likewise.
162 * gcc-interface/utils2.c : Likewise.
164 2015-06-08 John Marino <gnugcc@marino.st>
166 * a-intnam-dragonfly.ads: New.
167 * s-osinte-dragonfly.adb: Likewise.
168 * s-osinte-dragonfly.ads: Likewise.
169 * system-dragonfly-x86_64.ads: Likewise.
170 * adaint.c: Add BSD macros.
171 * cstreams.c: Likewise.
172 * gsocket.h: Likewise.
174 * socket.c: Likewise.
175 * env.c: Add __DragonFly__, remove __FreeBSD__ macro.
176 * init.c: Add __DragonFly__, change __gnat_install_handler
177 prototype from empty to void.
178 * initialize.c: Add __DragonFly__.
179 * sysdep.c: Likewise.
180 * s-osinte-freebsd.adb: Use __get_errno instead of __error.
181 * tracebak.c: Set unwinder for i386 BSD.
182 * gcc-interface/Makefile.in: Add x86_64 DragonFly, tweak
183 x86_64 FreeBSD and x86 FreeBSD.
185 2015-06-06 Eric Botcazou <ebotcazou@adacore.com>
187 * gcc-interface/utils.c (note_types_used_by_globals): Tweak comment.
188 * gcc-interface/decl.c (gnat_to_gnu_entity): Likewise.
190 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
192 * gcc-interface/gigi.h (note_types_used_by_globals): Rename from
193 gnat_write_global_declarations.
194 * gcc-interface/misc.c (gnat_parse_file): Call
195 note_types_used_by_globals.
196 Remove LANG_HOOKS_WRITE_GLOBALS.
197 * gcc-interface/utils.c: Rename global_decls to type_decls.
198 (gnat_write_global_declarations): Rename
199 to note_types_used_by_globals.
200 Remove call to finalize_compilation_unit.
201 Remove call to debug_hooks->global_decl for globals.
202 (gnat_pushdecls): Only insert into type_decls if TYPE_DECL.
204 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
206 * gcc-interface/cuintp.c: Adjust includes for restructured coretypes.h.
207 * gcc-interface/decl.c: Likewise.
208 * gcc-interface/misc.c: Likewise.
209 * gcc-interface/targtyps.c: Likewise.
210 * gcc-interface/trans.c: Likewise.
211 * gcc-interface/utils.c: Likewise.
212 * gcc-interface/utils2.c: Likewise.
214 2015-06-04 Pierre-Marie de Rodat <derodat@adacore.com>
216 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: If
217 processing a definition, create definitions for padding types
220 2015-06-03 Eric Botcazou <ebotcazou@adacore.com>
222 * gcc-interface/utils.c (copy_type): Also set TYPE_CANONICAL.
224 2015-06-03 Eric Botcazou <ebotcazou@adacore.com>
226 * gcc-interface/trans.c (gnat_to_gnu) <N_Simple_Return_Statement>: Fix
227 typo in latest change.
229 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
231 * gcc-interface/Makefile.in: Fix ARM/Darwin configuration.
233 2015-06-01 Pierre-Marie de Rodat <derodat@adacore.com>
235 * gcc-interface/utils.c (scale_by_factor_of): When handling a function
236 call expression, process the corresponding function body. Also handle
239 2015-06-01 Pierre-Marie de Rodat <derodat@adacore.com>
241 * gcc-interface/decl.c (gnat_to_gnu_entity): Replace pointer types with
242 references ones for functions that return references.
244 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
246 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: For a
247 definition of a type coming from a limited_with, get to the full view
248 if it is not in the main code unit.
250 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
252 * gcc-interface/utils.c (create_var_decl_1): If an assembler name is
253 specified, let the target mangle it before settting.
254 (create_subprog_decl): Likewise and move this treatment last.
256 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
258 * gcc-interface/lang-specs.h (TARGET_VXWORKS_RTP): Move substitution to
259 before first -gnatez switch. Simplify and add trailing space.
261 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
263 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: If the
264 record has a parent field and a representation clause, make sure that
265 it is properly aligned.
267 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
269 * gcc-interface/trans.c (lvalue_required_p) <N_Indexed_Component>: Deal
270 with character and enumeration literals as index values.
272 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
274 * gcc-interface/gigi.h (build_simple_component_ref): Declare.
275 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Deal with
276 address clause on aliased object with unconstrained nominal subtype.
277 Mark the aligning variable as artificial, do not convert the address
278 expression immediately but mark it as constant instead.
279 * gcc-interface/utils.c (convert): If the target type contains a
280 template, be prepared for an empty array.
281 (maybe_unconstrained_array): Likewise.
282 * gcc-interface/utils2.c (known_alignment) <POINTER_PLUS_EXPR>: Deal
283 with the pattern built for aligning types.
284 <INTEGER_CST>: Do not cap the value at BIGGEST_ALIGNMENT.
285 (build_simple_component_ref): Make public.
286 If the base object is a constructor that contains a template, fold the
287 result field by field.
289 2015-05-31 Eric Botcazou <ebotcazou@adacore.com>
291 * s-oscons-tmplt.c: Add explicit tests for Android alongside Linux.
293 2015-05-30 Eric Botcazou <ebotcazou@adacore.com>
295 * adaint.c: Test for __linux__ instead of linux and __sun__ instead
296 of sun. Add missing leading underscore to AIX. Remove #elif 0.
297 * adaint.h: Likewise.
299 * cstreams.c: Likewise.
301 * gsocket.h: Likewise.
302 * init.c: Likewise. Test for __i386__ instead of i386.
304 * s-oscons-tmplt.c: Likewise.
305 * sysdep.c: Likewise.
306 * terminals.c: Likewise. Use BSD symbol instead of FREEBSD.
307 * tracebak.c: Likewise. Test for __sparc__ instead of sparc.
309 2015-05-28 Eric Botcazou <ebotcazou@adacore.com>
311 * gcc-interface/utils.c (max_size) <tcc_binary>: Add special code to
312 deal with the subtraction of a "negative" value in an unsigned type.
314 2015-05-28 Eric Botcazou <ebotcazou@adacore.com>
316 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Do
317 not error out on a return type which has a size that overflows if the
318 return is done by invisible reference.
320 2015-05-28 Eric Botcazou <ebotcazou@adacore.com>
322 * gcc-interface/utils.c (gnat_pushdecl): Reunify the handling of array
323 and pointer types wrt DECL_ORIGINAL_TYPE and adjust left and right.
325 2015-05-28 Eric Botcazou <ebotcazou@adacore.com>
327 * gcc-interface/gigi.h (gnat_stabilize_reference): Adjust.
328 (rewrite_fn): Remove third parameter.
329 (type_is_padding_self_referential): New inline predicate.
330 (return_type_with_variable_size_p): Likewise.
331 * gcc-interface/decl.c (allocatable_size_p): More around.
332 (cannot_be_superflat_p): Rename into...
333 (cannot_be_superflat ): ...this.
334 (initial_value_needs_conversion): New predicate.
335 (gnat_to_gnu_entity): Invoke type_is_padding_self_referential,
336 initial_value_needs_conversion and adjust to above renaming.
337 For a renaming, force the materialization if the inner expression
338 is compound. Adjust calls to elaborate_reference and build a
339 compound expression if needed.
340 (struct er_dat): Add N field.
341 (elaborate_reference_1): Remove N parameter and adjust.
342 (elaborate_reference): Add INIT parameter and pass it in the call to
343 gnat_rewrite_reference. Adjust initial expression.
344 * gcc-interface/trans.c (Call_to_gnu): Treat renamings the same way as
345 regular object declarations when it comes to creating a temporary.
346 Adjust call to gnat_stabilize_reference and build a compound expression
347 if needed. Invoke return_type_with_variable_size_p.
348 (gnat_to_gnu): Invoke type_is_padding_self_referential. In case #4,
349 return a call to a function unmodified if it returns with variable size
350 and is also the initial expression in an object declaration.
351 * gcc-interface/utils2.c (build_binary_op) <INIT_EXPR>: Use the RHS'
352 type if it is a call to a function that returns with variable size.
353 (build_unary_op): Invoke type_is_padding_self_referential.
354 (gnat_stabilize_reference_1): Remove N parameter and adjust.
355 (gnat_stabilize_reference): Add INIT parameter and pass it in the call
356 to gnat_rewrite_reference.
357 (gnat_rewrite_reference): Remove N, add INIT parameter and adjust.
358 <COMPOUND_EXPR>: New case.
360 2015-05-28 Ed Schonberg <schonberg@adacore.com>
362 * sem_ch3.adb (Is_Visible_Component): Component is visible
363 in a derived type if inherited through an ancestor that has a
364 partial view of the original type holding the component, if the
365 full view of that original type is in scope.
366 * sem_util.ads (Get_Body_From_Stub): Works for all kinds of stubs.
368 2015-05-28 Bob Duff <duff@adacore.com>
370 * sem_util.adb (Requires_Transient_Scope): For definite untagged
371 subtypes, we should never have to use the secondary stack. This moves
372 toward that goal. But there are still cases that don't work.
373 Here, we move the check for Is_Definite first, but add a
374 special-purpose check for Has_Discrim_Dep_Array.
376 2015-05-28 Bob Duff <duff@adacore.com>
378 * sem_util.adb (Requires_Transient_Scope): Avoid returning
379 function results on the secondary stack in so many cases.
381 2015-05-28 Ed Schonberg <schonberg@adacore.com>
383 * sem_util.adb (Wrong_Type): In any instance, do not emit error
384 if type of expression is the partial view of the expected type.
386 2015-05-28 Ed Schonberg <schonberg@adacore.com>
388 * sem_res.adb (Resolve_Actuals): a) The replacement of formal
389 names in named associations only needs to be done within an
390 instance, on a call to a primitive of a formal derived type,
391 where the actual subprogram may have different formal names than
392 those of the primitive operation of the formal type.
393 b) Defaulted parameters must be taken into account when obtaining
394 the names of the formals of the actual subprogram being called.
396 2015-05-28 Robert Dewar <dewar@adacore.com>
398 * sem_ch13.adb, sem_disp.ads: Minor reformatting.
400 2015-05-28 Ed Schonberg <schonberg@adacore.com>
402 * sem_util.adb (Set_Debug_Info_Needed): For a private type
403 whose full view is itself a derived private type, set flag on
404 underlying full view as well, for proper gdb display.
406 2015-05-28 Bob Duff <duff@adacore.com>
408 * exp_tss.ads: Minor comment fix.
409 * exp_ch3.adb (Build_Array_Init_Proc, Build_Record_Init_Proc):
410 Inline init_procs when the type has controlled parts. Remove
411 obsolete comments about those init_procs -- init_procs for
412 such types are no longer complex. A typical init_proc just
413 initializes the 'Tag field, and calls the parent init_proc
414 (e.g. for Limited_Controlled), which calls the grandparent
415 (for Root_Controlled), which does nothing. This all boils down
416 to one instruction when inlined.
417 * exp_ch7.adb (Create_Finalizer): Inline the finalizer.
419 2015-05-28 Ed Schonberg <schonberg@adacore.com>
421 * sem_ch4.adb (Analyze_Selected_Component): If the type to use
422 is a derived type and is a generic actual, the selected component
423 appears within an instance body, and the check over the type
424 has failed, examine ancestor types for the desired component.
425 (Find_Component_In_Instance): If record type is a derived type,
426 examine all ancestors in order to locate desired component.
428 2015-05-27 H.J. Lu <hongjiu.lu@intel.com>
430 * gcc-interface/Makefile.in (TOOLS_LIBS): Add @NO_PIE_FLAG@.
432 2015-05-27 Eric Botcazou <ebotcazou@adacore.com>
434 * gcc-interface/trans.c (elaborate_all_entities): Do not elaborate an
435 incomplete type coming from a limited_with and whose non-limited view
436 comes from the main unit.
438 2015-05-27 Eric Botcazou <ebotcazou@adacore.com>
440 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Move down
441 code applying atomic checks to the object.
443 2015-05-27 Robert Dewar <dewar@adacore.com>
445 * sem_aux.adb: Minor rewording.
447 2015-05-27 Bob Duff <duff@adacore.com>
449 * exp_prag.adb (Expand_Pragma_Abort_Defer): Make
450 pragma Abort_Defer do nothing if Abort_Allowed is False.
452 2015-05-27 Arnaud Charlet <charlet@adacore.com>
454 * exp_ch9.adb, sem_util.adb, sem_util.ads, s-stposu.adb, s-spsufi.ads,
455 sem_elab.ads, g-comlin.ads, errout.ads, exp_ch6.adb, sem_ch4.adb,
456 opt.ads, s-bignum.adb, output.ads, sem_ch13.adb, erroutc.ads,
457 sem_disp.ads, exp_ch3.adb: Minor fixes of duplicate words in comments.
459 2015-05-27 Doug Rupp <rupp@adacore.com>
461 * adaint.c (__gnat_tmp_name) [vxworks]: Robustify and use for rtp as
464 2015-05-27 Pierre-Marie de Rodat <derodat@adacore.com>
466 * par_sco.adb (Process_Decision): Store sloc to
467 condition/pragmas SCOs associations into a temporary table before
468 moving them to the SCO_Raw_Hash_Table so that we can back them
469 out just like we do for SCO entries that are simple decisions
470 in an expression context.
472 2015-05-27 Ed Schonberg <schonberg@adacore.com>
474 * sem_ch6.adb (Process_Formals): A non-private formal type that
475 is a limited view does not have a list of private dependents.
477 2015-05-27 Ed Schonberg <schonberg@adacore.com>
479 * exp_ch5.adb (Expand_N_Case_Statement): If the expression in
480 the case statement is a compile-time known value, we look for a
481 corresponding alternative to optimize the case statement into a
482 single case. If the type has a static predicate and the expression
483 does not satisfy the predicate, there is no legal alternative and
484 this optimization is not applicable. Excecution is erroneous,
485 or else if assertions are enabled, an exception will be raised
486 earlier, at the point the expression is elaborated.
488 2015-05-27 Robert Dewar <dewar@adacore.com>
490 * sem_elab.adb (Check_Internal_Call_Continue): Suppress
491 warning on Finalize, Adjust, or Initialize if type involved has
494 2015-05-27 Ed Schonberg <schonberg@adacore.com>
496 * sem_aux.adb, sem_aux.ads (First_Discriminant): Return empty when
497 applied to a type with no known discriminants.
499 2015-05-26 Robert Dewar <dewar@adacore.com>
501 * errout.ads, sem_ch4.adb, sem_ch6.adb: Minor reformatting.
503 2015-05-26 Bob Duff <duff@adacore.com>
505 * sem_elab.adb (Check_A_Call): In the case where we're
506 calling something in an instance of a generic package that is
507 within this same unit (as the call), make sure we treat it
508 as a call to an entity within the same unit. That is, call
509 Check_Internal_Call, rather than putting "Elaborate_All(X)"
510 on X, which would necessarily result in an elaboration cycle in
511 static-elaboration mode.
513 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
515 * freeze.ads (Is_Atomic_VFA_Aggregate): Adjust profile.
516 * freeze.adb (Is_Atomic_VFA_Aggregate): Change Entity
517 parameter into Node parameter and remove Type parameter.
518 Look at Is_Atomic_Or_VFA both on the type and on the object.
519 (Freeze_Entity): Adjust call to Is_Atomic_VFA_Aggregate.
520 * exp_aggr.adb (Expand_Record_Aggregate): Likewise.
521 (Process_Atomic_Independent_Shared_Volatile): Remove code
522 propagating Atomic or VFA from object to locally-defined type.
524 2015-05-26 Bob Duff <duff@adacore.com>
526 * exp_ch7.adb: Minor comment fix.
528 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
530 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Min/Attr_Max>: Do not
531 bother about NaN's if Machine_Overflows is true.
533 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
535 * gcc-interface/trans.c (gnat_to_gnu) <N_Object_Declaration>: Really
536 force evaluation of the expression, if any, when the object has its
537 elaboration delayed. Do not create a variable at global level.
539 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
541 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Machine>: Do not apply
542 extra-precision trick to literals. Build SAVE_EXPR manually.
544 * gcc-interface/misc.c (enumerate_modes): Add bypass for x86/x86-64.
546 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
548 * gcc-interface/ada-tree.h (DECL_GLOBAL_NONCONSTANT_RENAMING_P): Delete
549 (DECL_RENAMED_OBJECT): Adjust comment.
550 * gcc-interface/gigi.h (record_global_nonconstant_renaming): Delete.
551 (invalidate_global_nonconstant_renamings): Likewise.
552 (gnat_constant_reference_p): Likewise.
553 (rewrite_fn): New function type.
554 (gnat_rewrite_reference): Declare.
555 (call_is_atomic_load): New inline predicate.
556 * gcc-interface/decl.c (elaborate_reference_1): New function.
557 (elaborate_reference): Likewise.
558 (gnat_to_gnu_entity): Call elaborate_reference to elaborate renamings
559 and simplify associated code. Set const_flag to true consistently in
560 conjunction with used_by_ref.
561 * gcc-interface/trans.c (Identifier_to_gnu): Always replace renaming
562 pointers by renamed objects.
563 (outer_atomic_access_required_p): Deal with renamings.
564 (Compilation_Unit_to_gnu): Do not call
565 invalidate_global_nonconstant_renamings.
566 (gnat_to_gnu) <N_Object_Renaming_Declaration>: Adjust comment.
567 (gnat_gimplify_expr): Deal with atomic loads.
568 * gcc-interface/utils.c (global_nonconstant_renamings): Delete.
569 (destroy_gnat_utils): Do not call
570 invalidate_global_nonconstant_renamings.
571 (record_global_nonconstant_renaming): Delete.
572 (invalidate_global_nonconstant_renamings): Likewise.
573 * gcc-interface/utils2.c (call_is_atomic_load): Move to gigi.h.
574 (build_load_modify_store): Build a copy of the destination.
575 (gnat_stabilize_reference_1): Adjust.
576 (gnat_stabilize_reference): Call gnat_stabilize_reference_1 through
577 gnat_rewrite_reference and move bulk of code to...
578 (gnat_rewrite_reference): ...here. New global function.
579 (gnat_constant_reference_p): Delete.
581 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
583 * gcc-interface/gigi.h (gnat_stabilize_reference): Adjust prototype.
584 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not rely on const_flag
585 to detect constant renamings. Be prepared for specific pattern of
586 renamed object based on function calls. Create a constant object
587 for the renaming of a NULL_EXPR or of a CONSTRUCTOR. Adjust calls
588 to gnat_stabilize_reference and tidy up. Remove redundant tests.
589 (elaborate_expression_1): Remove obsolete test and tidy up.
590 * gcc-interface/trans.c (Call_to_gnu): Do not stabilize In/Out or Out
591 parameters passed by reference.
592 (gnat_to_gnu) <N_Selected_Component>: Remove redundant protection again
594 Use gnat_protect_expr instead of gnat_stabilize_reference for general
595 protection against side-effects.
596 * gcc-interface/utils2.c (gnat_stable_expr_p): New predicate.
597 (gnat_save_expr): Invoke it.
598 (gnat_protect_expr): Likewise.
599 (gnat_stabilize_reference_1): Likewise. Remove useless propagation
601 (gnat_stabilize_reference): Remove parameter and adjust throughout.
602 Delete ADDR_EXDR, COMPOUND_EXPR and CONSTRUCTOR cases.
603 Restrict CALL_EXPR case to atomic loads and tweak ERROR_MARK case.
605 2015-05-26 Ed Schonberg <schonberg@adacore.com>
607 * sinfo.ads: Minor reformatting.
608 * sem_aux.ads: Clarify use of First_Discriminant.
609 * sem_ch4.adb (Analyze_Explicit_Dereference): The use of a limited
610 view is replaced with the non-limited view in an instance body,
611 where the enclosing unit must have a regular with_clause on the
613 * sem_ch12.adb (Install_Body): Freeze instantation after its
614 body. Remove useless freeze nodes for incomplete actuals to
615 prevent multiple generation of internal operations.
616 (Instantiate_Package_Body): Set sloc of body appropriately when
617 there are incomplete actuals and the instance body is placed in
618 the body of the enclosing unit.
619 * errout.ads: Consistent punctuation, better alignment and trivial
621 * err_vars.ads: Fix typo.
623 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
625 * sem_ch8.adb (Analyze_Object_Renaming): Lift restriction on
626 components of Volatile_Full_Access objects.
628 2015-05-26 Ed Schonberg <schonberg@adacore.com>
630 * sem_ch6.adb (Is_Non_Overriding_Operation,
631 Get_Generic_Parent_Type): Handle properly the case of a derived
632 scalar type by using the first subtype rather than its generated
635 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
637 * einfo.adb (Write_Field17_Name): Move E_Incomplete_Subtype
639 (Write_Field19_Name): ...here.
641 2015-05-26 Ed Schonberg <schonberg@adacore.com>
643 * sem_ch13.adb: sem_ch13.adb (Add_Predicates): Undo analysis
644 of original expression in ASIS mode: does not solve the ASIS
645 problem of a usable type information, and crashes the back-end
646 when performing type annotations.
648 2015-05-26 Robert Dewar <dewar@adacore.com>
650 * sem_disp.adb (Inherited_Subprograms): Add One_Only parameter.
651 (Is_Overriding_Subprogram): Use One_Only_Parameter.
652 * sem_disp.ads (Inherited_Subprograms): Add One_Only parameter.
654 2015-05-26 Robert Dewar <dewar@adacore.com>
656 * exp_prag.adb, sem_ch3.adb, sem_ch5.adb, exp_ch11.adb, ghost.adb,
657 exp_ch6.adb, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb, sem_ch13.adb,
658 exp_ch3.adb: Minor reformatting.
660 2015-05-26 Bob Duff <duff@adacore.com>
662 * treepr.adb: Minor improvement to debugging routines (pp, pn)
663 robustness. Rearrange the code so passing a nonexistent Node_Id
664 prints "No such node" rather than crashing, and causing gdb to
665 generate confusing messages.
667 2015-05-26 Gary Dismukes <dismukes@adacore.com>
669 * sem_util.adb: Minor typo fix.
671 2015-05-26 Yannick Moy <moy@adacore.com>
673 * sem_aux.adb (Subprogram_Body_Entity): Deal with subprogram stubs.
675 2015-05-26 Hristian Kirtchev <kirtchev@adacore.com>
677 * exp_ch3.adb (Expand_N_Full_Type_Declaration): Capture, set and
678 restore the Ghost mode.
679 (Expand_N_Object_Declaration): Capture, set and restore the Ghost mode.
680 (Freeze_Type): Update the call to Set_Ghost_Mode.
681 (Restore_Globals): New routine.
682 * exp_ch5.adb Add with and use clauses for Ghost.
683 (Expand_N_Assignment_Statement): Capture, set and restore the
685 (Restore_Globals): New routine.
686 * exp_ch6.adb Add with and use clauses for Ghost.
687 (Expand_N_Procedure_Call_Statement): Capture, set and
688 restore the Ghost mode.
689 (Expand_N_Subprogram_Body):
690 Code cleanup. Capture, set and restore the Ghost mode.
691 (Expand_N_Subprogram_Declaration): Capture, set and restore the
693 (Restore_Globals): New routine.
694 * exp_ch7.adb Add with and use clauses for Ghost.
695 (Expand_N_Package_Body): Capture, set and restore the Ghost mode.
696 (Expand_N_Package_Declaration): Capture, set and restore the
698 (Wrap_HSS_In_Block): Create a proper identifier for the block.
699 * exp_ch8.adb Add with and use clauses for Ghost.
700 (Expand_N_Exception_Renaming_Declaration): Code
701 cleanup. Capture, set and restore the Ghost mode.
702 (Expand_N_Object_Renaming_Declaration): Capture, set and restore
704 (Expand_N_Package_Renaming_Declaration): Capture, set and restore the
706 (Expand_N_Subprogram_Renaming_Declaration): Capture, set and
707 restore the Ghost mode.
708 * exp_ch11.adb (Expand_N_Exception_Declaration): Code
709 cleanup. Capture, set and restore the Ghost mode.
710 * exp_disp.adb (Make_DT): Update the call to Set_Ghost_Mode. Do
711 not initialize the dispatch table slot of a Ghost subprogram.
712 * exp_prag.adb Add with and use clauses for Ghost.
713 (Expand_Pragma_Check): Capture, set and restore the Ghost mode.
714 (Expand_Pragma_Contract_Cases): Capture, set and restore the
716 (Expand_Pragma_Initial_Condition): Capture, set and
717 restore the Ghost mode.
718 (Expand_Pragma_Loop_Variant): Capture,
719 set and restore the Ghost mode.
720 (Restore_Globals): New routine.
721 * exp_util.adb Add with and use clauses for Ghost.
722 (Make_Predicate_Call): Code cleanup. Capture, set and restore
724 (Restore_Globals): New routine.
725 * freeze.adb (Freeze_Entity): Code cleanup. Update the call
727 * ghost.adb Add with and use clause for Sem_Prag.
728 (Check_Ghost_Completion): Code cleanup.
729 (Check_Ghost_Overriding): New routine.
730 (Check_Ghost_Policy): Code cleanup.
731 (Ghost_Entity): New routine.
732 (Is_Ghost_Declaration): Removed.
733 (Is_Ghost_Statement_Or_Pragma): Removed.
734 (Is_OK_Context): Reimplemented.
735 (Is_OK_Declaration): New routine.
736 (Is_OK_Pragma): New routine.
737 (Is_OK_Statement): New routine.
738 (Mark_Full_View_As_Ghost): New routine.
739 (Mark_Pragma_As_Ghost): New routine.
740 (Mark_Renaming_As_Ghost): New routine.
741 (Propagate_Ignored_Ghost_Code): Update the comment on usage.
742 (Set_From_Entity): New routine.
743 (Set_From_Policy): New routine.
744 (Set_Ghost_Mode): This routine now handles pragmas and freeze nodes.
745 (Set_Ghost_Mode_For_Freeze): Removed.
746 (Set_Ghost_Mode_From_Entity): New routine.
747 (Set_Ghost_Mode_From_Policy): Removed.
748 * ghost.ads (Check_Ghost_Overriding): New routine.
749 (Mark_Full_View_As_Ghost): New routine.
750 (Mark_Pragma_As_Ghost): New routine.
751 (Mark_Renaming_As_Ghost): New routine.
752 (Set_Ghost_Mode): Update the parameter profile. Update the
754 (Set_Ghost_Mode_For_Freeze): Removed.
755 (Set_Ghost_Mode_From_Entity): New routine.
756 * sem_ch3.adb (Analyze_Full_Type_Declaration):
757 Capture and restore the Ghost mode. Mark a type
758 as Ghost regardless of whether it comes from source.
759 (Analyze_Incomplete_Type_Decl): Capture, set and restore the
761 (Analyze_Number_Declaration): Capture and restore the Ghost mode.
762 (Analyze_Object_Declaration): Capture and restore the Ghost mode.
763 (Analyze_Private_Extension_Declaration): Capture and
764 restore the Ghost mode.
765 (Analyze_Subtype_Declaration): Capture and restore the Ghost mode.
766 (Process_Full_View): The full view inherits all Ghost-related
767 attributes from the private view.
768 (Restore_Globals): New routine.
769 * sem_ch5.adb (Analyze_Assignment): Capture and restore the
771 (Restore_Globals): New routine.
772 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration):
773 Code cleanup. Capture and restore the Ghost mode. Mark a
774 subprogram as Ghost regarless of whether it comes from source.
775 (Analyze_Procedure_Call): Capture and restore the Ghost mode.
776 (Analyze_Subprogram_Body_Helper): Capture and restore the Ghost mode.
777 (Analyze_Subprogram_Declaration): Capture and restore the Ghost mode.
778 (New_Overloaded_Entity): Ensure that a
779 parent subprogram and an overriding subprogram have compatible
781 * sem_ch7.adb (Analyze_Package_Body_Helper): Capture and restore
783 (Analyze_Package_Declaration): Capture and
784 restore the Ghost mode. Mark a package as Ghost when it is
785 declared in a Ghost region.
786 (Analyze_Private_Type_Declaration): Capture and restore the Ghost mode.
787 (Restore_Globals): New routine.
788 * sem_ch8.adb (Analyze_Exception_Renaming): Code
789 reformatting. Capture and restore the Ghost mode. A renaming
790 becomes Ghost when its name references a Ghost entity.
791 (Analyze_Generic_Renaming): Capture and restore the Ghost mode. A
792 renaming becomes Ghost when its name references a Ghost entity.
793 (Analyze_Object_Renaming): Capture and restore the Ghost mode. A
794 renaming becomes Ghost when its name references a Ghost entity.
795 (Analyze_Package_Renaming): Capture and restore the Ghost mode. A
796 renaming becomes Ghost when its name references a Ghost entity.
797 (Analyze_Subprogram_Renaming): Capture and restore the Ghost
798 mode. A renaming becomes Ghost when its name references a
800 * sem_ch11.adb (Analyze_Exception_Declaration): Capture, set
801 and restore the Ghost mode.
802 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Capture and
803 restore the Ghost mode.
804 (Analyze_Generic_Subprogram_Declaration):
805 Capture and restore the Ghost mode.
806 * sem_ch13.adb Add with and use clauses for Ghost.
807 (Add_Invariant): New routine.
808 (Add_Invariants): Factor out code.
809 (Add_Predicate): New routine.
810 (Add_Predicates): Factor out code.
811 (Build_Invariant_Procedure_Declaration): Code cleanup. Capture,
812 set and restore the Ghost mode.
813 (Build_Invariant_Procedure): Code cleanup.
814 (Build_Predicate_Functions): Capture, set and
815 restore the Ghost mode. Mark the generated functions as Ghost.
816 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
817 Capture, set and restore the Ghost mode.
818 (Analyze_External_Property_In_Decl_Part): Capture, set and restore
820 (Analyze_Initial_Condition_In_Decl_Part):
821 Capture, set and restore the Ghost mode.
823 Code cleanup. Capture, set and restore the Ghost mode. Flag
824 pragmas Linker_Section, No_Return, Unmodified, Unreferenced and
825 Unreferenced_Objects as illegal when it applies to both Ghost
826 and living arguments. Pragma Ghost cannot apply to synchronized
828 (Check_Kind): Moved to the spec of Sem_Prag.
829 (Process_Inline): Flag the pragma as illegal when it applies to
830 both Ghost and living arguments.
831 (Restore_Globals): New routine.
832 * sem_prag.ads Add pragma Default_Initial_Condition
833 to table Assertion_Expression_Pragma. Add new table
834 Is_Aspect_Specifying_Pragma.
835 (Check_Kind): Moved from body of Sem_Prag.
836 * sem_util.adb Add with and use clauses for Ghost.
837 (Build_Default_Init_Cond_Procedure_Body): Capture, set and restore
839 (Build_Default_Init_Cond_Procedure_Declaration):
840 Capture, set and restore the Ghost mode. Mark the default
841 initial condition procedure as Ghost when it is declared
843 (Is_Renaming_Declaration): New routine.
844 (Policy_In_List): Account for the single argument version of
846 * sem_util.ads (Is_Renaming_Declaration): New routine.
847 * sinfo.adb (Is_Ghost_Pragma): New routine.
848 (Set_Is_Ghost_Pragma): New routine.
849 * sinfo.ads New attribute Is_Ghost_Pragma.
850 (Is_Ghost_Pragma): New routine along with pragma Inline.
851 (Set_Is_Ghost_Pragma): New routine along with pragma Inline.
853 2015-05-26 Robert Dewar <dewar@adacore.com>
855 * sem_ch3.adb, sem_aux.adb, sem_aux.ads, exp_ch6.adb, sprint.adb:
858 2015-05-26 Gary Dismukes <dismukes@adacore.com>
860 * gnat1drv.adb, targparm.adb, targparm.ads, restrict.adb: Minor
861 reformatting and typo fixes in comments.
863 2015-05-26 Ed Schonberg <schonberg@adacore.com>
865 * sem_ch7.adb (Swap_Private_Dependets): Set visibility of
866 the two views of a private dependent in two separate steps,
867 to ensure proper visibility in parent units analyzed for inlining.
869 2015-05-26 Yannick Moy <moy@adacore.com>
871 * sem_aux.adb, sem_aux.ads (Get_Low_Bound): Use Type_Low_Bound.
872 (Package_Body, Package_Spec): New queries moved
874 (Package_Specification): Simplify query to remove use of loop.
875 * sem_util.adb, sem_util.ads (Enclosing_Declaration,
876 Enclosing_Package_Or_Subprogram, Is_Attribute_Update): New
877 queries moved here from GNATprove.
879 2015-05-26 Bob Duff <duff@adacore.com>
881 * einfo.adb, einfo.ads, sprint.adb, lib-xref.ads: Minor cleanup: Remove
882 obsolete Entity_Kinds E_String_Type and E_String_Subtype. Update
883 redundant assertions.
885 2015-05-26 Gary Dismukes <dismukes@adacore.com>
887 * sem_util.adb, sem_util.ads, sem_ch13.adb: Minor typo fixes.
889 2015-05-26 Doug Rupp <rupp@adacore.com>
891 * init.c [vxworks]: Refine previous checkin.
893 2015-05-26 Robert Dewar <dewar@adacore.com>
895 * exp_ch4.adb (Wrap_MA): New function.
896 (Expand_N_Op_Expon): Use Wrap_MA.
898 2015-05-26 Bob Duff <duff@adacore.com>
900 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
901 Do not use secondary stack to return limited records with
902 defaulted discriminants. This is an efficiency improvement.
903 * exp_ch6.adb, exp_dist.adb, sem_attr.adb, sem_aux.adb, sem_aux.ads,
904 sem_ch12.adb, sem_ch3.adb, sem_ch4.adb, sem_ch6.adb, sem_ch7.adb,
905 sem_util.adb: Change the sense of Is_Indefinite_Subtype to be
906 Is_Definite_Subtype. This is an improvement to readability (the double
907 negative in "not Is_Indefinite_Subtype" was slightly confusing). Also
908 disallow passing non-[sub]type entities, an unnecessary and slightly
909 bug-prone flexibility.
911 2015-05-26 Robert Dewar <dewar@adacore.com>
913 * sem_aggr.adb (Resolve_Array_Aggregate): Defend against
915 * debug.adb: Document -gnatd.k.
916 * erroutc.adb (Set_Msg_Insertion_Line_Number): Implement -gnatd.k.
918 2015-05-26 Robert Dewar <dewar@adacore.com>
920 * gnat1drv.adb (Gnat1drv): Provide new arguments for
921 Get_Target_Parameters.
922 * restrict.adb (Set_Restriction_No_Specification_Of_Aspect):
924 (Set_Restriction_No_Use_Of_Attribute): new procedure.
925 * restrict.ads (Set_Restriction_No_Specification_Of_Aspect):
927 (Set_Restriction_No_Use_Of_Attribute): new procedure.
928 * s-rident.ads (Integer_Parameter_Restrictions): New subtype.
929 * targparm.adb (Get_Target_Parameters): Allow new restriction
930 pragmas No_Specification_Of_Aspect No_Use_Of_Attribute
932 * targparm.ads: New parameters for Get_Target_Parameters.
933 * tbuild.adb (Set_NOD): New name for Set_RND.
934 (Set_NSA): New procedure.
935 (Set_NUA): New procedure.
936 (Set_NUP): New procedure.
937 * tbuild.ads (Make_SC): Minor reformatting.
938 (Set_NOD): New name for Set_RND.
939 (Set_NSA, Set_NUA, Set_NUP): New procedure.
941 2015-05-26 Ed Schonberg <schonberg@adacore.com>
943 * a-stwise.adb (Find_Token): If source'first is not positive,
944 an exception must be raised, as specified by RM 2005 A.4.3
945 (68/1). This must be checked explicitly, given that run-time
946 files are normally compiled without constraint checks.
947 * a-stzsea.adb (Find_Token): Ditto.
949 2015-05-26 Ed Schonberg <schonberg@adacore.com>
951 * sem_util.ads sem_util.adb (Is_Current_Instance): New predicate
952 to fully implement RM 8.6 (17/3). which earlier only applied
953 to synchronized types. Used to preanalyze aspects that include
954 current instances of types, such as Predicate and Invariant.
955 * sem_res.adb (Resolve_Entity_Name): Use Is_Current_Instance.
956 * sem_ch13.adb (Add_Predicates): In ASIS mode, preserve original
957 expression of aspect and analyze it to provide proper type
960 2015-05-26 Robert Dewar <dewar@adacore.com>
962 * rtsfind.ads: Add entries for RE_Exn[_Long]_Float.
963 * s-exnllf.adb (Exn_Float): New function.
964 (Exn_Long_Float): New function.
965 (Exn_Long_Long_Float): Rewritten interface.
966 (Exp): New name for what used to be Exn_Long_Long_Float.
967 * s-exnllf.ads (Exn_Float): New function.
968 (Exn_Long_Float): New function.
970 2015-05-26 Ed Schonberg <schonberg@adacore.com>
972 * sem_ch8.adb (Find_Selected_Component): Do not emit an error
973 on a selected component when the prefix is a type name that is
975 * einfo.ads: Minor grammar fix.
977 2015-05-26 Doug Rupp <rupp@adacore.com>
979 * init.c [vxworks] (sysLib.h): Only for x86.
981 2015-05-26 Doug Rupp <rupp@adacore.com>
983 * init-vxsim.c (CPU): define as __VXSIM_CPU__
984 * sigtramp-vxworks-vxsim.c (CPU): Likewise.
985 sigtramp-vxworks-target.inc: Add check for SIMLINUX.
986 * sigtramp.h: Likewise.
988 2015-05-26 Robert Dewar <dewar@adacore.com>
990 * sem_aux.adb, sem_disp.adb, sem_util.ads: Add comment.
991 * sem_util.adb: Minor reformatting
993 2015-05-26 Yannick Moy <moy@adacore.com>
995 * inline.adb (Has_Initialized_Type): Adapt to new names.
996 * sem_aux.adb, sem_aux.ads (Get_Low_Bound, Number_Components,
997 Subprogram_Body, Subprogram_Body_Entity, Subprogram_Spec,
998 Subprogram_Specification): New query functions used in GNATprove.
999 * sem_disp.adb, sem_disp.ads (Is_Overriding_Subprogram): New
1000 query functions used in GNATprove.
1001 * sem_util.adb, sem_util.adso (Enclosing_Lib_Unit_Node,
1002 Get_Cursor_Type, Get_Return_Object, Get_User_Defined_Eq,
1003 Is_Double_Precision_Floating_Point_Type,
1004 Is_Single_Precision_Floating_Point_Type): New query functions
1007 2015-05-26 Bob Duff <duff@adacore.com>
1009 * s-rpc.ads (Partition_ID): Increase maximum Partition_ID to
1011 * a-except-2005.adb, a-except-2005.ads, a-except.adb,
1012 a-except.ads, a-exexda.adb, a-exstat.adb: Minor comment fixes.
1014 2015-05-26 Robert Dewar <dewar@adacore.com>
1016 * sinfo.adb: Minor comment addition.
1017 * einfo.adb: Minor whitespace and punctuation fix.
1018 * sem_util.adb: Minor editing of comments.
1020 2015-05-26 Ed Schonberg <schonberg@adacore.com>
1022 * sem_ch7.adb (Install_Private_Declarations,
1023 Swap_Private_Dependents): Ensure that both views of the dependent
1024 subtype are immediately visible if we are within their scope. This
1025 may be needed when a procedure body is both the parent of an
1026 instantiated child unit, and is itself used to inline a local
1029 2015-05-26 Gary Dismukes <dismukes@adacore.com>
1031 * exp_prag.adb, gnat1drv.adb: Minor reformatting.
1033 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
1035 * exp_ch4.adb (Expand_N_Indexed_Component): In the circuit
1036 detecting exceptions to the rewriting, deal with implicit
1037 dereferences in the selected component case.
1039 2015-05-26 Bob Duff <duff@adacore.com>
1041 * sem_ch13.adb (Analyze_One_Aspect): Do not
1042 require the expression of the Disable_Controlled aspect to be
1043 static in a generic template, because 'Enabled is not known
1046 2015-05-26 Doug Rupp <rupp@adacore.com>
1048 * init-vxsim.c: New file for vxsim ZCX
1049 * sigtramp-vxworks-vxsim.c: Likewise.
1050 * sigtramp-vxworks.c: Factor out target dependent bits into ...
1051 * sigtramp-vxworks-target.inc: ... here.
1052 * sigtramp.h: Add vxsim zcx protos.
1053 * init.c [vxworks...] (sysLib.h): Include.
1054 (__gnat_map_signal): Make global.
1055 [...i386] (__gnat_error_handler): Call __gnat_vxsim_error_handler if
1057 [...i386] (__gnat_install_handler): Test if on vxsim.
1059 2015-05-26 Ed Schonberg <schonberg@adacore.com>
1061 * sem_ch5.adb (Analyze_Iterator_Specification): For an element
1062 iterator over an array, if the component is aliased, the loop
1063 variable is aliased as well.
1065 2015-05-26 Ed Schonberg <schonberg@adacore.com>
1067 * exp_ch6.adb (Expand_Actuals): For a function call with in-out
1068 parameters that is rewritten as an expression_with_actions,
1069 we preserve the original function call node for further use by
1070 the caller (typically Expand_Call). In the presence of validity
1071 checks, that function call, though it is labelled Analyzed to
1072 prevent an infinite recursion, may be rewritten as a temporary
1073 by Remove_Side_Effects. Ensure that the caller has access to
1074 the original function call to continue expansion.
1075 * atree.ads: Minor typo in comment.
1077 2015-05-26 Javier Miranda <miranda@adacore.com>
1079 * sem_util.adb (Check_Function_Writable_Actuals):
1080 Add missing support to check the violation of writable actuals
1081 in array aggregates that have a nonstatic range.
1083 2015-05-26 Hristian Kirtchev <kirtchev@adacore.com>
1085 * exp_ch6.adb (Process_Contract_Cases_For): Update the call to
1086 Expand_Pragma_Contract_Cases.
1087 * exp_prag.ads, exp_prag.adb (Expand_Contract_Cases): Rename to
1088 Expand_Pragma_Contract_Cases.
1089 * sem_ch13.adb (Add_Invariants): Use the original aspect name
1090 when creating the arguments of pragma Check. This ensures that
1091 'Class is properly recognized and handled.
1093 2015-05-26 Arnaud Charlet <charlet@adacore.com>
1095 * gnat1drv.adb: Minor adjustments.
1096 (Adjust_Global_Switches): Disable some related flags in CodePeer mode.
1097 * sem_ch4.adb (Has_Arbitrary_Evaluation_Order,
1098 Stop_Subtree_Climbind): Code cleanup.
1099 * einfo.ads: Minor comment change.
1101 2015-05-26 Javier Miranda <miranda@adacore.com>
1103 * sem_aggr.adb (Resolve_Aggregate, Resolve_Extension_Aggregate):
1105 * sem_ch3.adb (Build_Derived_Record_Type,
1106 Record_Type_Declaration): Code cleanup.
1107 * sem_ch4.adb (Has_Arbitrary_Evaluation_Order,
1108 Stop_Subtree_Climbind): Tables which speed up the identification
1109 of dangerous calls to Ada 2012 functions with writable actuals
1111 (Analyze_Arithmetic_Op, Analyze_Call, Analyze_Comparison_Op,
1112 Analyze_Equality_Op, Analyze_Logical_Op, Analyze_Membership_Op,
1113 Analyze_Range): Code cleanup.
1114 (Is_Arbitrary_Evaluation_Order_Construct): Removed.
1115 (Check_Writable_Actuals): Code cleanup using the added tables.
1116 * sem_util.adb (Check_Function_Writable_Actuals): Return
1117 immediately if the node does not have the flag Check_Actuals
1120 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
1122 * exp_ch6.adb (Add_Call_By_Copy_Code): Remove restrictive
1123 condition in the detection of the effects of Remove_Side_Effects.
1124 * exp_util.ads (Remove_Side_Effects): Add general and historical note.
1125 * exp_util.adb (Is_Name_Reference): New predicate.
1126 (Remove_Side_Effects): Use it in lieu of Is_Object_Reference
1127 in order to decide whether to use the renaming to capture the
1128 side effects of the subexpression.
1129 (Side_Effect_Free): Remove obsolete test.
1131 2015-05-26 Robert Dewar <dewar@adacore.com>
1133 * aspects.ads, aspects.adb: Add aspect Disable_Controlled.
1134 * einfo.ads, einfo.adb (Disable_Controlled): New flag.
1135 (Is_Controlled_Active): New function.
1136 * exp_ch3.adb (Expand_Freeze_Record_Type): Use
1137 Is_Controlled_Active.
1138 * exp_util.adb (Needs_Finalization): Finalization not needed
1139 if Disable_Controlled set.
1140 * freeze.adb (Freeze_Array_Type): Do not set
1141 Has_Controlled_Component if the component has Disable_Controlled.
1142 (Freeze_Record_Type): ditto.
1143 * sem_ch13.adb (Decorate): Minor reformatting.
1144 (Analyze_Aspect_Specifications): Implement Disable_Controlled.
1145 * sem_ch3.adb (Analyze_Object_Declaration): Handle
1147 (Array_Type_Declaration): ditto.
1148 (Build_Derived_Private_Type): ditto.
1149 (Build_Derived_Type): ditto.
1150 (Record_Type_Definition): ditto.
1151 * snames.ads-tmpl: Add Name_Disable_Controlled.
1153 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
1155 * exp_ch6.adb (Expand_Actuals): Use a constant declaration instead
1156 of a renaming to capture the return value of a function call.
1157 (Expand_Simple_Function_Return): Call Remove_Side_Effects
1158 instead of removing side effects manually before the call to
1161 2015-05-26 Robert Dewar <dewar@adacore.com>
1163 * exp_ch4.adb (Expand_N_Op_Expon): Deal with problem of wrong
1164 order in calling Duplicate_Subexpr.
1165 * einfo.ads: Fix documentation of Object/Value size for scalar types.
1167 2015-05-26 Ed Schonberg <schonberg@adacore.com>
1169 * exp_aggr.adb (Build_Array_Aggr_Code, Gen_Assign):
1170 If a component is default-initialized and its type has an
1171 invariant procedure, insert an invariant test after code for
1172 default-initialization of the component.
1174 2015-05-26 Gary Dismukes <dismukes@adacore.com>
1176 * einfo.ads, sem_util.adb, sem_ch4.adb: Minor reformatting.
1178 2015-05-26 Robert Dewar <dewar@adacore.com>
1180 * exp_unst.adb, exp_unst.ads: Change to using Subps table index for
1181 making AREC entity names unique.
1183 2015-05-26 Ed Schonberg <schonberg@adacore.com>
1185 * sem_cat.adb (Has_Stream_Attribute_Definition): If the type
1186 has aspect specifications, examine the corresponding list of
1187 representation items to determine whether there is a visible
1188 stream operation. The attribute definition clause generated from
1189 the aspect will be inserted at the freeze point of the type,
1190 which may be in the private part and not directly visible,
1191 but the aspect makes the operation available to a client.
1193 2015-05-26 Robert Dewar <dewar@adacore.com>
1195 * sem_util.adb: Minor code reorganization.
1196 * sem_ch6.adb: Minor reformatting.
1198 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
1200 * gcc-interface/utils.c (maybe_pad_type): Do not apply adjustment to
1201 original size for elementary types before issuing the size warning.
1203 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
1205 * get_targ.adb (C_Get_Float_Words_BE): Adjust import name.
1206 (C_Get_Words_BE): Likewise.
1207 (C_Get_Bytes_BE): Likewise.
1208 (C_Get_Bits_BE): Likewise.
1209 (Width_From_Size): Remove superfluous space.
1210 * gcc-interface/targtyps.c (get_float_words_be): Rename into...
1211 (get_target_float_words_be): ...this.
1212 (get_words_be): Rename into...
1213 (get_target_words_be): ...this.
1214 (get_bytes_be): Rename into...
1215 (get_target_bytes_be): ...this.
1216 (get_bits_be): Rename into...
1217 (get_target_bits_be): ...this.
1218 * gcc-interface/gigi.h (standard_datatypes): Remove ADT_ptr_void_type.
1219 (ptr_void_type_node): Delete.
1220 (get_target_float_size): Likewise.
1221 (get_target_double_size): Likewise.
1222 (get_target_long_double_size): Likewise.
1223 (get_float_words_be): Likewise.
1224 (get_words_be): Likewise.
1225 (get_bytes_be): Likewise.
1226 (get_bits_be): Likewise.
1227 (get_target_float_words_be): Declare.
1228 (get_target_words_be): Likewise.
1229 (get_target_bytes_be): Likewise.
1230 (get_target_bits_be): Likewise.
1231 * gcc-interface/decl.c (gnat_to_gnu_entity): Replace ptr_void_type_node
1233 (intrin_return_compatible_p): Likewise.
1234 * gcc-interface/trans.c (gigi): Likewise.
1235 * gcc-interface/utils2.c (maybe_wrap_malloc): Likewise.
1236 (maybe_wrap_free): Likewise.
1237 * gcc-interface/utils.c (maybe_pad_type): Remove superfluous space.
1238 * gcc-interface/misc.c (gnat_init): Do not set ptr_void_type_node.
1240 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
1242 * gcc-interface/decl.c (elaborate_expression): Take a const string
1243 suffix instead of a tree.
1244 (elaborate_expression_1): Likewise.
1245 (elaborate_expression_2): Likewise.
1246 (gnat_to_gnu_entity): Adjust to above changes.
1247 (build_subst_list): Likewise.
1248 (get_entity_char): New static function.
1250 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
1252 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: Move around.
1253 <E_Exception>: Merge with E_Variable case.
1254 <E_Variable>: Remove 'object' label.
1256 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
1258 * gcc-interface/decl.c (gnat_to_gnu_entity): Minor tweak.
1259 * gcc-interface/trans.c (finalize_nrv_unc_r): Use CONSTRUCTOR_ELT.
1260 * gcc-interface/utils.c (convert): Likewise and simplify.
1261 (remove_conversions): Likewise.
1262 * gcc-interface/utils2.c (compare_fat_pointers): Likewise.
1263 (build_unary_op): Likewise and simplify.
1265 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
1267 * gcc-interface/gigi.h (build_atomic_load): Adjust prototype.
1268 (build_atomic_store): Likewise.
1269 (build_load_modify_store): Declare.
1270 (VECTOR_TYPE_P): Delete.
1271 * gcc-interface/decl.c (gnat_to_gnu_entity): Replace Is_Atomic with
1272 Is_Atomic_Or_VFA throughout.
1273 <E_Array_Type>: Build a variant of the XUA type instead of forcing
1274 TYPE_VOLATILE on it.
1275 <E_Array_Subtype>: Use the main variant of the base type.
1276 Do not force TYPE_VOLATILE on the type being built.
1277 <E_Record_Type>: Likewise.
1278 <E_Array_Subtype>: Likewise.
1279 <E_Subprogram_Type>: Rename local variable.
1280 Add Atomic qualifier in conjunction with Volatile on types if needed.
1281 Force BLKmode for by-ref types only at the end of the processing.
1282 Change qualifiers only after changing the mode of the type. Set
1283 TYPE_UNIVERSAL_ALIASING_P on the type directly.
1284 (check_ok_for_atomic_type): Issue specific error message for VFA.
1285 (gnat_to_gnu_component_type): Replace Is_Atomic with
1286 Is_Atomic_Or_VFA throughout.
1287 * gcc-interface/misc.c (gnat_get_alias_set): Test
1288 TYPE_UNIVERSAL_ALIASING_P on the type directly.
1289 * gcc-interface/trans.c (lvalue_required_p): Replace Is_Atomic with
1290 Is_Atomic_Or_VFA throughout. Add missing guard.
1291 (node_is_atomic): New predicate.
1292 (node_has_volatile_full_access): Likewise.
1293 (gnat_strip_type_conversion): New function.
1294 (outer_atomic_access_required_p): New predicate.
1295 (atomic_sync_required_p): Rename into...
1296 (atomic_access_required_p): ...this. Add SYNC parameter, scan the
1297 parent node first and then look for the atomic setting. Add support
1298 for Volatile_Full_Access.
1299 (Call_to_gnu): Add atomic_access and outer_atomic_access parameters
1300 and adjusts calls to above functions. Use load-modify-store sequence
1301 for updates of In/Out and Out parameters if required, as well as for
1302 moving the result to the target if required. Add couple of missing
1304 (gnat_to_gnu): Adjust calls to above functions.
1305 <N_Object_Renaming_Declaration>: If the renamed object has side-effects
1306 evaluate only its address.
1307 <N_Assignment_Statement>: Adjust call to Call_to_gnu. Use load-modify
1308 store sequence if required.
1309 <N_Function_Call>: Adjust call to Call_to_gnu.
1310 (extract_values): Adjust comment.
1311 * gcc-interface/utils2.c (build_atomic_load): Add SYNC parameter and
1312 use relaxed memory model if it is not set.
1313 (build_atomic_store): Likewise.
1314 (call_is_atomic_load): New predicate.
1315 (build_load_modify_store): New function.
1316 (build_binary_op) <MODIFY_EXPR>: Accept SAVE_EXPR on the LHS.
1317 (gnat_stabilize_reference) <CALL_EXPR>: Deal with atomic loads.
1319 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
1321 * gcc-interface/ada-tree.h (DECL_RENAMING_GLOBAL_P): Rename into...
1322 (DECL_GLOBAL_NONCONSTANT_RENAMING_P): ...this.
1323 * gcc-interface/gigi.h (record_global_renaming_pointer): Delete.
1324 (invalidate_global_renaming_pointers): Likewise.
1325 (record_global_nonconstant_renaming): New.
1326 (invalidate_global_nonconstant_renamings): Likewise.
1327 (get_inner_constant_reference): Likewise.
1328 (gnat_constant_reference_p): Likewise.
1329 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Adjust to above
1330 and register the renaming pointer only if the object is non-constant.
1331 (elaborate_expression_1): Call get_inner_constant_reference instead
1332 of get_inner_reference.
1333 * gcc-interface/trans.c (fold_constant_decl_in_expr): Minor tweak.
1334 (Identifier_to_gnu): Adjust to above and do not recheck the renamed
1335 object before substituting it.
1336 (Compilation_Unit_to_gnu): Adjust to above renaming. Minor tweaks.
1337 (gnat_to_gnu) <N_Object_Renaming_Declaration>: Do not return the
1338 result at the global level.
1339 (N_Exception_Renaming_Declaration): Likewise.
1340 * gcc-interface/utils.c (global_renaming_pointers): Rename into...
1341 (global_nonconstant_renamings): ...this.
1342 (destroy_gnat_utils): Adjust to above renaming.
1343 (record_global_renaming_pointer): Rename into...
1344 (record_global_nonconstant_renaming): ...this.
1345 (invalidate_global_renaming_pointers): Rename into...
1346 (invalidate_global_nonconstant_renamings): ...this and do not recheck
1347 the renamed object before invalidating.
1348 * gcc-interface/utils2.c (gnat_stabilize_reference): Minor tweak.
1349 (get_inner_constant_reference): New public function.
1350 (gnat_constant_reference_p): New predicate.
1352 2015-05-25 Javier Miranda <miranda@adacore.com>
1354 * einfo.ads, einfo.adb (Has_Out_Or_In_Out_Parameter): This attribute
1355 is now present in subprograms, generic subprograms, entries and
1357 * sem_ch6.adb (Set_Formal_Mode): Set As_Out_Or_In_Out_Parameter
1358 on entries, entry families, subprograms and generic subprograms.
1359 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration):
1360 Minor code reorganization to ensure that the Ekind attribute
1361 of the subprogram entity is set before its formals are
1362 processed. Required to allow the use of the attribute
1363 Has_Out_Or_In_Out_Parameter on the subprogram entity.
1364 * sem_aggr.adb (Resolve_Aggregate, Resolve_Extension_Aggregate):
1365 Perform the check on writable actuals only if the value of some
1366 component of the aggregate involves calling a function with
1367 out-mode parameters.
1368 (Resolve_Record_Aggregate): Propagate the Check_Actuals flag to the
1369 internally built aggregate.
1370 * sem_ch3.adb (Build_Derived_Record_Type, Record_Type_Declaration):
1371 Perform the check on writable actuals only if the initialization of
1372 some component involves calling a function with out-mode parameters.
1373 * sem_ch4.adb (Analyze_Arithmetic_Op, Analyze_Comparison_Op,
1374 Analyze_Equality_Op, Analyze_Logical_Op, Analyze_Membership_Op,
1375 Analyze_Range): Check writable actuals only if the
1376 subtrees have a call to a function with out-mode parameters
1377 (Analyze_Call.Check_Writable_Actuals): New subprogram. If the call
1378 has out or in-out parameters then mark its outermost enclosing
1379 construct as a node on which the writable actuals check must
1381 (Analyze_Call): Check if the flag must be set and if the outermost
1382 enclosing construct.
1383 * sem_util.adb (Check_Function_Writable_Actuals): Code cleanup
1384 and reorganization. We skip processing aggregate discriminants
1385 since their precise analysis involves two phases traversal.
1386 * sem_res.adb (Resolve_Actuals, Resolve_Arithmetic_Op,
1387 Resolve_Logical_Op, Resolve_Membership_Op): Remove call to
1388 check_writable_actuals.
1390 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1392 * sem_ch3.adb (Constrain_Concurrent): If the context is a
1393 type declaration, generate an Itype_Reference for the anonymous
1394 subtype, to force elaboration at this point in gigi.
1396 2015-05-22 Gary Dismukes <dismukes@adacore.com>
1398 * layout.adb, einfo.ads, sem_ch12.adb, freeze.adb, sem_util.ads,
1399 exp_ch4.adb, sem_ch6.adb: Minor reformatting and typo fixes.
1401 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1403 * sem_res.adb (Resolve_Actuals): If the call is to an overridden
1404 operation, replace the names of the actuals in named associations
1405 with the names of the actuals of the subprogram that is eventually
1406 executed. The names of the formals and the defaults can differ
1407 between the two operations when they are operations of a formal
1410 2015-05-22 Bob Duff <duff@adacore.com>
1412 * a-convec.ads, a-convec.adb (Append): Check for fast path. Split
1413 out slow path into separate procedure. Inline Append. Fast path
1414 now avoids calling Insert.
1415 (Finalize): Do the busy checking last, so the container gets emptied.
1416 (Insert, Insert_Space): Remove redundancy.
1418 2015-05-22 Robert Dewar <dewar@adacore.com>
1420 * switch-c.adb (Scan_Front_End_Switches): Insist on -gnatc
1423 2015-05-22 Arnaud Charlet <charlet@adacore.com>
1425 * gnatvsn.ads: Minor code reorg to remember more easily to update
1428 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1430 * sem_ch10.adb (Analyze_With_Clause): In ASIS_Mode, a
1431 limited_with clause on a predefined unit is not transformed into
1432 a regular with_clause, to preserve the original tree structure.
1433 * sinfo.ads (N_With_Clause): Add comment on handling of
1435 * sem_ch10.adb: Minor reformatting.
1437 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1439 * sem_ch8.adb (Freeze_Profile): A limited view of a type in
1440 the profile of a subprogram renaming does not require freezing,
1441 because it is declared in a different unit.
1443 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1445 * exp_aggr.adb (Get_Constraint_Association): If type (of ancestor
1446 composite type) is private, go to full view. This was previously
1447 done only in an instance context, but is happen whenever a chain
1448 of private extensions includes one inherited discriminant.
1450 2015-05-22 Robert Dewar <dewar@adacore.com>
1452 * einfo.ads: Minor comment updates.
1453 * exp_unst.adb: Move Subps table to spec Don't remove old entries
1454 from table Add Last field to record last entry used.
1455 * exp_unst.ads: Move Subps table here from body So that Cprint
1456 can access saved values.
1458 2015-05-22 Bob Duff <duff@adacore.com>
1460 * a-cdlili.adb, a-cdlili.ads, a-cohama.adb, a-cohama.ads,
1461 * a-cohase.adb, a-cohase.ads, a-convec.adb, a-convec.ads,
1462 * a-coorma.adb, a-coorma.ads, a-coorse.adb, a-coorse.ads:
1463 (Pseudo_Reference, Element_Access, Get_Element_Access): New
1464 declarations added for use by performance improvements in exp_ch5.adb.
1465 * snames.ads-tmpl: New names referenced by exp_ch5.adb.
1466 * exp_ch5.adb: Speed up "for ... of" loops for predefined containers.
1467 Instead of doing literally what the RM calls for, we do something
1468 equivalent that avoids expensive operations inside the loop. If the
1469 container package has appropriate Next, Pseudo_Reference,
1470 Element_Access, Get_Element_Access declarations, we invoke the
1472 * snames.ads-tmpl: Note speed improvement.
1474 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
1476 * einfo.ads (Is_Atomic_Or_VFA): Move to XEINFO INLINES section.
1477 * xeinfo.adb: Replace a-einfo.h with einfo.h throughout.
1478 Add pattern to translate "or else" into "||".
1480 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
1482 * einfo.ads (Has_Volatile_Full_Access): Rename into...
1483 (Is_Volatile_Full_Access): ...this.
1484 (Set_Has_Volatile_Full_Access): Rename into...
1485 (Set_Is_Volatile_Full_Access): ...this.
1486 * einfo.adb (Has_Volatile_Full_Access): Rename into...
1487 (Is_Volatile_Full_Access): ...this.
1488 (Set_Has_Volatile_Full_Access): Rename into...
1489 (Set_Is_Volatile_Full_Access): ...this.
1490 (Is_Atomic_Or_VFA): Adjust to above renaming.
1491 * errout.adb (Special_Msg_Delete): Likewise.
1492 * exp_pakd.adb (Install_PAT): Likewise.
1493 * freeze.adb (Freeze_Array_Type): Likewise.
1494 * sem_ch8.adb (Analyze_Object_Renaming): Likewise.
1495 * sem_ch13.adb (Inherit_Delayed_Rep_Aspects): Likewise.
1496 (Inherit_Aspects_At_Freeze_Point): Likewise.
1497 * sem_prag.adb (Set_Atomic_VFA): Likewise.
1498 (Process_Atomic_Independent_Shared_Volatile): Likewise.
1499 * sem_util.adb (Is_Atomic_Or_VFA_Object): Likewise.
1501 2015-05-22 Robert Dewar <dewar@adacore.com>
1503 * exp_ch5.adb, layout.adb, einfo.adb, einfo.ads, sem_prag.adb,
1504 freeze.adb, freeze.ads, sem_util.adb, sem_util.ads, exp_ch2.adb,
1505 exp_ch4.adb, errout.adb, exp_aggr.adb, sem_ch13.adb: This is a general
1506 change that deals with the fact that most of the special coding for
1507 Atomic should also apply to the case of Volatile_Full_Access.
1508 A new attribute Is_Atomic_Or_VFA is introduced, and many of the
1509 references to Is_Atomic now use this new attribute.
1511 2015-05-22 Robert Dewar <dewar@adacore.com>
1513 * exp_ch4.adb (Expand_N_Op_Eq): Introduce 'Machine for 'Result
1516 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
1518 * sprint.adb (Source_Dump): When generating debug files, deal
1519 with the case of a stand-alone package instantiation by dumping
1520 together the spec and the body in the common debug file.
1522 2015-05-22 Robert Dewar <dewar@adacore.com>
1524 * sem_ch13.adb (Minimum_Size): Size is zero for null range
1527 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1529 * einfo.adb (Anonymous_Master): This attribute now applies
1530 to package and subprogram bodies.
1531 (Set_Anonymous_Master): This attribute now applies to package and
1533 (Write_Field36_Name): Add output for package and subprogram bodies.
1534 * einfo.ads Update the documentation on attribute Anonymous_Master
1535 along with occurrences in entities.
1536 * exp_ch4.adb (Create_Anonymous_Master): Reimplemented to
1537 handle spec and body anonymous masters of the same unit.
1538 (Current_Anonymous_Master): Reimplemented. Handle a
1539 package instantiation that acts as a compilation unit.
1540 (Insert_And_Analyze): Reimplemented.
1542 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1544 * sem_ch10.adb (Analyze_With_Clause): A limited_with_clause on a
1545 predefined unit is treated as a regular with_clause.
1547 2015-05-22 Robert Dewar <dewar@adacore.com>
1549 * sem_ch12.adb, prj.ads, makeutl.ads, sem_ch6.adb, prj-nmsc.adb,
1550 prj-conf.adb, sem_disp.adb: Minor reformatting.
1552 2015-05-22 Vincent Celier <celier@adacore.com>
1554 * clean.adb (Parse_Cmd_Line): For native gnatclean, check
1555 for switch -P and, if found and gprclean is available, invoke
1557 * make.adb (Initialize): For native gnatmake, check for switch -P
1558 and, if found and gprbuild is available, invoke silently gprbuild.
1560 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
1562 * sem_ch13.adb (Validate_Unchecked_Conversions): Also issue
1563 specific warning for discrete types when the source is larger
1566 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1568 * einfo.ads, einfo.adb (Incomplete_Actuals): New attribute of
1569 package instantiations. Holds the list of actuals in the instance
1570 that are incomplete types, to determine where the corresponding
1571 instance body must be placed.
1572 * sem_ch6.adb (Conforming_Types): An incomplete type used as an
1573 actual in an instance matches an incomplete formal.
1574 * sem_disp.adb (Check_Dispatching_Call): Handle missing case of
1575 explicit dereference.
1576 (Inherited_Subprograms): In the presence of a limited view there
1577 are no subprograms to inherit.
1578 * sem_ch12.adb (Preanalyze_Actuals): Build list of incomplete
1579 actuals of instance, for later placement of instance body and
1580 freeze nodes for actuals.
1581 (Install_Body): In the presence of actuals that incomplete types
1582 from a limited view, the instance body cannot be placed after
1583 the declaration because full views have not been seen yet. Any
1584 use of the non-limited views in the instance body requires
1585 the presence of a regular with_clause in the enclosing unit,
1586 and will fail if this with_clause is missing. We place the
1587 instance body at the beginning of the enclosing body, which is
1588 the unit being compiled, and ensure that freeze nodes for the
1589 full views of the incomplete types appear before the instance.
1591 2015-05-22 Pascal Obry <obry@adacore.com>
1593 * makeutl.ads, prj-conf.adb, prj-nmsc.adb, prj.ads
1594 (In_Place_Option): Removed.
1595 (Relocate_Build_Tree_Option): New constant.
1596 (Root_Dir_Option): New constant.
1597 (Obj_Root_Dir): Removed.
1598 (Build_Tree_Dir): New variable.
1599 (Root_Src_Tree): Removed.
1600 (Root_Dir): New variable.
1601 * prj-conf.adb (Get_Or_Create_Configuration_File): Add check
1602 for improper relocation.
1603 * prj-nmsc.adb (Locate_Directory): Add check for improper
1606 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1608 * einfo.adb (Default_Init_Cond_Procedure): Code cleanup. The
1609 attribute now applies to the base type.
1610 (Has_Default_Init_Cond): Now applies to the base type.
1611 (Has_Inherited_Default_Init_Cond): Now applies to the base type.
1612 (Set_Default_Init_Cond_Procedure): Code cleanup. The attribute now
1613 applies to the base type.
1614 (Set_Has_Default_Init_Cond): Now applies to the base type.
1615 (Set_Has_Inherited_Default_Init_Cond): Now applies to the base type.
1616 * exp_ch3.adb (Expand_N_Object_Declaration): No need to use the
1617 base type when adding a call to the Default_Initial_Condition.
1619 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1621 * einfo.adb: Node36 is now used as Anonymous_Master. Flag253
1623 (Anonymous_Master): New routine.
1624 (Has_Anonymous_Master): Removed.
1625 (Set_Anonymous_Master): New routine.
1626 (Set_Has_Anonymous_Master): Removed.
1627 (Write_Entity_Flags): Remove the output for Has_Anonymous_Maser.
1628 (Write_Field36_Name): Add output for Anonymous_Master.
1629 * einfo.ads Add new attribute Anonymous_Master along with
1630 occurrences in nodes. Remove attribute Has_Anonymous_Master along
1631 with occurrences in nodes.
1632 (Anonymous_Master): New routine along with pragma Inline.
1633 (Has_Anonymous_Master): Removed along with pragma Inline.
1634 (Set_Anonymous_Master): New routine along with pragma Inline.
1635 (Set_Has_Anonymous_Master): Removed along with pragma Inline.
1636 * exp_ch4.adb (Create_Anonymous_Master): New routine.
1637 (Current_Anonymous_Master): Reimplemented.
1639 2015-05-22 Bob Duff <duff@adacore.com>
1641 * freeze.adb (Freeze_Profile): Suppress warning if imported
1642 subprogram is not at library level.
1644 2015-05-22 Robert Dewar <dewar@adacore.com>
1646 * sem_ch8.adb (Analyze_Object_Renaming): Check for renaming
1647 component of an object to which Volatile_Full_Access applies.
1649 2015-05-22 Jerome Guitton <guitton@adacore.com>
1651 * exp_dbug.ads: Add note about non bit-packed arrays.
1653 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
1655 * sem_prag.adb: Fix typo.
1656 * einfo.ads: Grammar fixes in comments.
1658 2015-05-22 Bob Duff <duff@adacore.com>
1660 * a-cborma.ads, a-cidlli.ads, a-cimutr.ads, a-ciormu.ads,
1661 * a-cihase.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
1662 * a-cborse.ads, a-comutr.ads, a-ciorma.ads, a-cobove.ads,
1663 * a-coormu.ads, a-convec.ads, a-cohase.ads, a-coinho.ads,
1664 * a-cbdlli.ads, a-cbmutr.ads, a-cbhase.ads, a-cdlili.ads,
1665 * a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
1666 * a-coinho-shared.ads (Constant_Reference_Type, Reference_Type):
1667 Add an initialization expression "raise Program_Error". See,
1668 for example, RM-A.18.2(148.4).
1670 2015-05-22 Robert Dewar <dewar@adacore.com>
1672 * debug.adb: Update documentation.
1673 * einfo.ads, einfo.adb (Needs_Typedef): New flag
1674 * exp_unst.adb (Unnest_Subprogram): Mark AREC types as needing
1676 * frontend.adb: Update comments.
1677 * gnat1drv.adb (Adjust_Global_Switches): Set all needed flags
1679 * opt.ads (Generate_C_Code): New switch.
1680 * osint-c.adb (Write_C_File_Info): Removed, not used
1681 (Write_H_File_Info): Removed, not used
1682 * osint-c.ads (Write_C_File_Info): Removed, not used
1683 (Write_H_File_Info): Removed, not used
1684 * osint.ads (Write_Info): Minor comment updates.
1685 (Output_FD): Moved from private part to public part of spec.
1686 * sem.adb (Semantics): Force expansion on if in Generate_C_Code
1688 * atree.ads: minor typo in comment.
1689 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
1690 Do not allow VFA on composite object with aliased component.
1692 2015-05-22 Arnaud Charlet <charlet@adacore.com>
1694 * osint-c.adb, osint-c.ads (Set_File_Name): Move back to spec.
1696 2015-05-22 Pascal Obry <obry@adacore.com>
1698 * prj-util.adb: Minor comment editing.
1700 2015-05-22 Pascal Obry <obry@adacore.com>
1702 * makeutl.ads (In_Place_Option): New constant.
1703 * prj.ads (Obj_Root_Dir): New variable (absolute path to relocate
1705 (Root_Src_Tree): New variable (absolute path of root source tree).
1706 * prj-conf.adb (Do_Autoconf): Take into account the object root
1707 directory (if defined) to generate configuration project.
1708 * prj-nmsc.adb (Get_Directories): Handle case where Obj_Root_Dir
1710 (Locate_Directory): Likewise.
1712 2015-05-22 Pascal Obry <obry@adacore.com>
1714 * prj-util.ads, prj-util.adb (Relative_Path): New routine.
1716 2015-05-22 Bob Duff <duff@adacore.com>
1718 * exp_utils.ads, exp_utils.adb (Find_Optional_Prim_Op): New
1719 interface to return Empty when not found, so we can avoid handling
1720 Program_Error in that case.
1721 (Find_Prim_Op): Fix latent bug: raise Program_Error when there are no
1723 * exp_ch7.adb, sem_util.adb: Use Find_Optional_Prim_Op when the
1724 code is expecting Empty.
1725 * sem_ch8.adb: Use Find_Optional_Prim_Op to avoid handling
1728 2015-05-22 Robert Dewar <dewar@adacore.com>
1730 * sem_ch3.adb, sem_intr.adb, exp_ch4.adb, s-rannum.adb,
1731 sem_eval.adb, s-fatgen.adb, s-expmod.ads: Remove incorrect hyphen in
1733 * exp_util.adb: Add comment.
1734 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move from spec to
1736 (Set_File_Name): New name for the above.
1737 (Create_C_File, Create_H_File, Write_C_File_Info, Write_H_File_Info,
1738 Close_C_File, Close_H_File): New procedure.
1739 * osint.adb: Minor reformatting.
1740 * osint.ads: Minor comment updates.
1742 2015-05-22 Robert Dewar <dewar@adacore.com>
1744 * exp_ch4.adb: Minor rewording.
1745 * exp_util.ads: Clarify that Find_Prim_Op is only for
1748 2015-05-22 Robert Dewar <dewar@adacore.com>
1750 * atree.adb, atree.ads, treepr.adb: Change name Needs_Actuals_Check to
1752 * exp_ch4.adb (Expand_N_Op_Expon): Optimize 2**x in modular
1755 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
1757 * exp_pakd.adb (Install_PAT): Propagate representation aspects
1758 from the original array type to the PAT.
1760 2015-05-22 Robert Dewar <dewar@adacore.com>
1762 * treepr.adb (Print_Node_Header): Add output of Needs_Actuals_Check.
1764 2015-05-22 Robert Dewar <dewar@adacore.com>
1766 * atree.adb, atree.ads (Needs_Actuals_Check): New flag.
1768 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1770 * sem_prag.adb (Analyze_Pragma): Remove the detection
1771 of a useless Part_Of indicator when the related item is a constant.
1772 (Check_Matching_Constituent): Do not emit an error on a constant.
1773 (Check_Missing_Part_Of): Do not check for a missing Part_Of indicator
1774 when the related item is a constant.
1775 (Collect_Body_States): Code cleanup.
1776 (Collect_Visible_States): Code cleanup.
1777 (Report_Unused_States): Do not emit an error on a constant.
1778 * sem_util.ads, sem_util.adb (Has_Variable_Input): Removed.
1780 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
1782 * sem_ch8.adb (Analyze_Object_Renaming): Copy
1783 Has_Volatile_Full_Access from renamed to renaming entities.
1784 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
1785 Tidy up and remove redundant setting of Has_Volatile_Full_Access.
1787 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1789 * ghost.adb (Check_Ghost_Completion): Update references to SPARK
1791 (Check_Ghost_Policy): Update references to SPARK RM 6.9 rules.
1792 * sem_ch3.adb (Analyze_Object_Declaration): Update references
1793 to SPARK RM 6.9 rules.
1794 (Check_Completion): Ghost entities do not require a special form of
1796 * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Update references
1797 to SPARK RM 6.9 rules.
1798 (Analyze_Subprogram_Body_Helper): Update references to SPARK RM 6.9
1800 * sem_ch7.adb (Analyze_Package_Body_Helper): Update references
1801 to SPARK RM 6.9 rules.
1802 (Requires_Completion_In_Body): Ghost entities do not require a special
1805 2015-05-22 Robert Dewar <dewar@adacore.com>
1807 * a-csquin.ads: Use Ada 2012 notation.
1808 * sem_ch8.adb: Minor reformatting.
1810 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1812 * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect Import
1813 acts as a completion.
1815 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1817 * sem_ch13.adb: Minor reformatting.
1819 2015-05-22 Jose Ruiz <ruiz@adacore.com>
1821 * a-reatim.adb: Minor change, fix typo.
1823 2015-05-22 Robert Dewar <dewar@adacore.com>
1825 * sem_util.ads: Minor addition of ??? comment.
1826 * sem_prag.adb, sem_util.adb: Minor reformatting.
1827 * sem_ch13.adb: minor reformatting.
1829 2015-05-22 Robert Dewar <dewar@adacore.com>
1831 * a-reatim.ads: Add Compile_Time_Error to ensure Duration
1833 * sem_ch13.adb: Improve error message.
1834 * exp_ch4.adb: Minor reformatting.
1836 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1838 * sem_prag.adb (Analyze_Pragma): Constants without variable
1839 input do not require indicator Part_Of.
1840 (Check_Missing_Part_Of): Constants without variable input do not
1841 requrie indicator Part_Of.
1842 (Collect_Visible_States): Constants without variable input are
1843 not part of the hidden state of a package.
1844 * sem_util.ads, sem_util.adb (Has_Variable_Input): New routine.
1846 2015-05-22 Robert Dewar <dewar@adacore.com>
1848 * exp_util.adb (Activate_Atomic_Synchronization): Do not set
1849 Atomic_Sync_Required for an object renaming declaration.
1850 * sem_ch8.adb (Analyze_Object_Renaming): Copy Is_Atomic and
1851 Is_Independent to renaming object.
1853 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1855 * sem_ch5.adb (Analyze_Iterator_Specification): Diagnose
1856 various illegalities in iterators over arrays and containers:
1857 a) New function Get_Cursor_Type, to verify that the cursor is
1858 not a limited type at the point of iteration.
1859 b) If the container is a constant, an element_iterator is illegal
1860 if the container type does not have a Constant_Indexing aspect.
1861 c) If the iterate function has an in-out controlling parameter,
1862 the container cannot be a constant object.
1863 d) Reject additional cases of iterators over a
1864 discriminant-dependent component of a mutable object.
1866 2015-05-21 Hristian Kirtchev <kirtchev@adacore.com>
1868 * einfo.adb (Contract): This attribute now applies to constants.
1869 (Set_Contract): This attribute now applies to constants.
1870 (Write_Field34_Name): Add output for constants.
1871 * einfo.ads Attribute Contract now applies to constants.
1872 * sem_ch3.adb (Analyze_Object_Contract): Constants now have
1873 their Part_Of indicator verified.
1874 * sem_prag.adb (Analyze_Constituent): A constant is now a valid
1876 (Analyze_Global_Item): A constant cannot act as an output.
1877 (Analyze_Initialization_Item): Constants are now a valid
1878 initialization item.
1879 (Analyze_Initializes_In_Decl_Part): Rename
1880 global variable States_And_Vars to States_And_Objs and update
1881 all its occurrences.
1882 (Analyze_Input_Item): Constants are now a
1883 valid initialization item. Remove SPARM RM references from error
1885 (Analyze_Pragma): Indicator Part_Of can now apply to a constant.
1886 (Collect_Body_States): Collect both source constants
1888 (Collect_States_And_Objects): Collect both source constants and
1890 (Collect_States_And_Variables): Rename
1891 to Collect_States_And_Objects and update all its occurrences.
1892 (Collect_Visible_States): Do not collect constants and variables
1893 used to map generic formals to actuals.
1894 (Find_Role): The role of a constant is that of an input. Separate the
1895 role of a variable from that of a constant.
1896 (Report_Unused_Constituents): Add specialized wording for constants.
1897 (Report_Unused_States): Add specialized wording for constants.
1898 * sem_util.adb (Add_Contract_Item): Add processing for constants.
1899 * sem_util.ads (Add_Contract_Item): Update the comment on usage.
1900 (Find_Placement_In_State_Space): Update the comment on usage.
1902 2015-05-21 Ed Schonberg <schonberg@adacore.com>
1904 * sem_ch5.adb: minor reformatting.
1906 2015-05-21 Robert Dewar <dewar@adacore.com>
1908 * freeze.adb (Freeze_Entity): Properly tag -gnatw.z messages.
1910 2015-05-21 Robert Dewar <dewar@adacore.com>
1912 * freeze.adb: Minor reformatting.
1913 * cstand.adb (Print_Standard): Fix bad printing of Duration
1915 * a-reatim.adb (Time_Of): Complete rewrite to properly detect
1918 2015-05-21 Ed Schonberg <schonberg@adacore.com>
1920 * sem_ch5.adb: add (useless) initial value.
1921 * sem_ch3.adb (Replace_Anonymous_Access_To_Protected_Subprogram):
1922 Check whether the procedure has parameters before processing
1923 formals in ASIS mode.
1925 2015-05-21 Ed Schonberg <schonberg@adacore.com>
1927 * sem_ch13.adb (Check_Iterator_Functions): Emit error on Iterator
1928 aspect as well when indexing function is illegal.
1929 (Valid_Default_Iterator): Handle properly somme illegal cases
1930 to prevent compilation abandoned messages.
1931 (Check_Primitive_Function): Verify that type and indexing function
1932 are in the same scope.
1933 * freeze.adb (Freeze_Record): Extend patch on the presence of
1934 indexing aspects to aspect Default_Iterator.
1936 2015-05-19 David Malcolm <dmalcolm@redhat.com>
1938 * gcc-interface/trans.c (Sloc_to_locus1): Strenghthen local "map"
1939 from line_map * to line_map_ordinary *.
1941 2015-05-12 Jason Merrill <jason@redhat.com>
1943 * sigtramp-vxworks.c: Add space between string literal and macro
1946 2015-05-12 Arnaud Charlet <charlet@adacore.com>
1948 * gnat_rm.texi, gnat_ugn.texi, doc: Documentation updates and clean ups
1950 2015-05-12 Ed Schonberg <schonberg@adacore.com>
1952 * sem_ch5.adb (Analyze_Iterator_Specifications): Additional
1953 legality checks for array and container iterators:
1954 a) The domain of iteration cannot be a component that depends
1955 on discriminants of a mutable object. The check was recently
1956 added for element iterators.
1957 b) The cursor type cannot be a limited type at the point of the
1958 iteration, because the cursor will be assigned to in the body
1961 2015-05-12 Robert Dewar <dewar@adacore.com>
1963 * freeze.adb (Freeze_Record_Type): Make sure that if we have
1964 aspect Iterator_Element, then we have either Constant_Indexing
1965 or Variable_Indexing.
1967 2015-05-12 Ed Schonberg <schonberg@adacore.com>
1969 * a-coormu.ads, a-coormu.adb: Add Indexing aspect, Reference_Type,
1970 and Reference_Control_Type to support element iterators over
1972 * a-ciormu.ads, a-ciormu.adb: Ditto for
1973 indefinite_ordered_multisets.
1975 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
1977 * exp_ch4.adb (Expand_N_Expression_With_Actions): Force
1978 the evaluation of the EWA expression. Code cleanup.
1979 (Process_Transient_Object): Code cleanup.
1980 * exp_util.adb (Is_Aliased): Controlled transient objects found
1981 within EWA nodes are not aliased.
1982 (Is_Finalizable_Transient): Iterators are not finalizable transients.
1984 2015-05-12 Robert Dewar <dewar@adacore.com>
1986 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
1987 Don't allow Atomic and Volatile_Full_Access for the same entity.
1989 2015-05-12 Ed Schonberg <schonberg@adacore.com>
1991 * sem_ch5.adb (Analyze_Iterator_Specification): Implement new
1992 semantics and safety checks specified in AI12-0151.
1994 2015-05-12 Pierre-Marie de Rodat <derodat@adacore.com>
1996 * sem_ch10.adb (Sem_Ch10.Analyze_Proper_Body): Generate SCOs
1997 for subunit in generic units.
1999 2015-05-12 Robert Dewar <dewar@adacore.com>
2001 * sem_elab.adb (Check_A_Call): Avoid checking internal call
2004 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2006 * sem_ch6.adb (Process_Formals): An untagged incomplete type
2007 is legal in the profile of a null procedure.
2009 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2011 * sem_ch12.adb (Validate_Derived_Type_Instance): Handle properly
2012 the checks on a derived formal whose parent type is a previous
2013 formal that is not a derived type.
2015 2015-05-12 Robert Dewar <dewar@adacore.com>
2017 * aspects.ads, aspects.adb: Add entries for aspect Volatile_Full_Access
2018 * einfo.adb (Has_Volatile_Full_Access): New flag.
2019 (Has_Volatile_Full_Access): New flag.
2020 * einfo.ads (Has_Volatile_Full_Access): New flag.
2021 * par-prag.adb: Add dummy entry for Volatile_Full_Access.
2022 * sem_prag.adb (Analyze_Pragma, case Volatile_Full_Access):
2023 Implement new pragma.
2024 * snames.ads-tmpl: Add entries for pragma Volatile_Full_Access.
2026 2015-05-12 Robert Dewar <dewar@adacore.com>
2028 * targparm.ads: Minor reformatting.
2030 2015-05-12 Robert Dewar <dewar@adacore.com>
2032 * a-reatim.adb (Time_Of): Properly detect overflow when TS = 0.0.
2033 * a-reatim.ads: Minor reformatting.
2035 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
2037 * einfo.ads: Update the documentation of flags
2038 Has_Inherited_Default_Init_Cond and Has_Default_Init_Cond.
2040 2015-05-12 Robert Dewar <dewar@adacore.com>
2042 * impunit.adb: Add entry for a-dhfina.ads
2043 * a-dhfina.ads: New file.
2045 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2047 * exp_ch5.adb (Expand_Iterator_Loop_Over_Array): if the array
2048 type has convention Fortran, a multidimensional iterator varies
2049 the first dimension fastest.
2051 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
2053 * einfo.adb: Node32 is now used as Encapsulating_State.
2054 Node37 is now used as Associated_Entity.
2055 (Associated_Entity): New routine.
2056 (Encapsulating_State): Update the assertion guard to include constants.
2057 (Set_Associated_Entity): New routine.
2058 (Set_Encapsulating_State): Update the assertion guard to
2060 (Write_Field10_Name): Remove the output for Encapsulating_State.
2061 (Write_Field32_Name): Add output for Encapsulating_State.
2062 (Write_Field37_Name): Add output for Associated_Entity.
2063 * einfo.ads New attribute Associated_Entity along with placement
2064 in entities. Attribute Encapsulating_State now uses Node32.
2065 (Associated_Entity): New routine along with pragma Inline.
2066 (Set_Associated_Entity): New routine along with pragma Inline.
2067 * inline.ads Code reformatting.
2068 * sem_attr.adb (Analyze_Attribute): Correct the prefix of
2069 attribute 'Result when the context is a generic instantiation.
2070 (Analyze_Attribute_Old_Result): Pragmas Depends and
2071 Refined_Depends are a valid context for attribute 'Result.
2072 (Denote_Same_Function): Allow attribute 'Result to denote
2074 * sem_ch3.adb Add with and use clauses for Sem_Ch12.
2075 (Analyze_Declarations): Capture global references within the
2076 contracts of packages, subprograms and their respective bodies.
2077 * sem_ch6.adb (Analyze_Aspects_On_Body_Or_Stub): Removed.
2078 (Analyze_Completion_Contract): Removed.
2079 (Analyze_Generic_Subprogram_Body): Enchange the aspects after
2080 creating the generic copy. Create a generic contract for the
2081 template. Analyze the aspects of the generic body. Analyze the
2082 contract of the generic body when it is a compilation unit and
2083 capture global references.
2084 (Analyze_Subprogram_Body_Contract): Code cleanup.
2085 (Analyze_Subprogram_Contract): Do not save global references here.
2086 (Save_Global_References_In_List): Removed.
2087 * sem_ch7.adb (Analyze_Package_Body_Contract): Code cleanup.
2088 (Analyze_Package_Body_Helper): Create a generic contract for
2090 (Analyze_Package_Contract): Code cleanup.
2091 * sem_ch10.adb Add with and use clauses for Sem_Ch12.
2092 (Analyze_Compilation_Unit): Capture global references in a
2093 generic subprogram declaration that acts as a compilation unit.
2094 * sem_ch12.adb Add with and use clauses for Sem_Prag. Illustrate
2095 the implementation of generic contracts. Alphabetize various
2097 (Analyze_Generic_Package_Declaration):
2098 Create a generic contract for the template.
2099 (Analyze_Generic_Subprogram_Declaration): Create a generic
2100 contract for the template.
2101 (Analyze_Subprogram_Instantiation): Instantiate the contract of the
2103 (Copy_Generic_Node): Link defining entities of the generic template
2104 with the corresponding defining entities of the generic copy. Update
2105 the processing of pragmas.
2106 (Instantiate_Contract): Removed.
2107 (Instantiate_Subprogram_Contract): New routine.
2108 (Requires_Delayed_Save): New routine.
2109 (Save_Global_References): Rename formal parameter N to Templ. Various
2111 (Save_Global_References_In_Aspects): Moved from the spec.
2112 (Save_Global_References_In_Contract): New routine.
2113 (Save_References_In_Aggregate): New routine.
2114 (Save_References_In_Char_Lit_Or_Op_Symbol): New routine.
2115 (Save_References_In_Descendants): New routine.
2116 (Save_References_In_Identifier): New routine.
2117 (Save_References_In_Operator): New routine.
2118 (Save_References_In_Pragma): New routine.
2119 * sem_ch12.ads (Save_Global_References): Rename formal
2120 parameter N to Templ. Update the comment on usage.
2121 (Save_Global_References_In_Aspects): Moved to the body.
2122 (Save_Global_References_In_Contract): New routine.
2123 * sem_ch13.adb (Analyze_Aspect_Specifications_On_Body_Or_Stub):
2125 * sem_ch13.ads (Analyze_Aspect_Specifications_On_Body_Or_Stub):
2127 * sem_prag.adb (Add_Item_To_Name_Buffer): Add support for
2129 (Analyze_Contract_Cases_In_Decl_Part): Code cleanup.
2130 (Analyze_Depends_Global): New routine.
2131 (Analyze_Depends_In_Decl_Part): Code cleanup.
2132 (Analyze_Global_In_Decl_Part): Code cleanup.
2133 (Analyze_Global_Item): Constants are now valid global items. Do
2134 not perform state-related checks in an instance. Change the way
2135 renamings are handled. (Analyze_Initial_Condition_In_Decl_Part):
2137 (Analyze_Initializes_In_Decl_Part): Code cleanup.
2138 (Analyze_Input_Output): The analysis of attribute 'Result in
2139 the context of pragmas Depends or Refined_Depends now reuses
2140 the existing attribute analysis machinery. Constants and
2141 generic parameters are now valid dependency items. Do not
2142 perform state-related checks in an instance. Change the way
2143 renamings are handled. (Analyze_Pragma): Add a "characteristics"
2144 section for pragmas Abstract_State, Contract_Cases, Depends,
2145 Extensions_Visible, Global, Initial_Condition, Initializes,
2146 Post, Post_Class, Postcondition, Pre, Pre_Class, Precondition,
2147 Refined_Depends, Refined_Global, Refined_Post, Refined_State, Test_Case.
2148 (Analyze_Pre_Post_Condition): Do not create a generic
2150 (Analyze_Pre_Post_Condition_In_Decl_Part): Code cleanup.
2151 (Analyze_Refined_Depends_Global_Post): New routine.
2152 (Analyze_Refined_Depends_In_Decl_Part): Code cleanup.
2153 (Analyze_Refined_Global_In_Decl_Part): Code cleanup.
2154 (Analyze_Refined_Pragma): Removed.
2155 (Analyze_Refined_State_In_Decl_Part): Code cleanup.
2156 (Analyze_Test_Case_In_Decl_Part): Code cleanup.
2157 (Check_Dependency_Clause): Do not perform this check in an instance.
2158 (Check_Function_Return): Add support for generic functions.
2159 (Check_In_Out_States): Do not perform this check in an instance.
2160 (Check_Input_States): Do not perform this check in an instance.
2161 (Check_Mode_Restriction_In_Function): Add support for generic functions.
2162 (Check_Output_States): Do not perform this check in an instance.
2163 (Check_Postcondition_Use_In_Inlined_Subprogram): Rename
2164 parameter Subp_Id to Spec_Id and update comment on usage.
2165 (Check_Proof_In_States): Do not perform this check in an instance.
2166 (Check_Refined_Global_Item): Add support for constants.
2167 (Check_Refined_Global_List): Do not perform this check in an instance.
2168 (Collect_Global_Items): Reimplemented.
2169 (Collect_Subprogram_Inputs_Outputs): Add support for generic parameters.
2170 (Create_Generic_Template): Removed.
2171 (Find_Related_Package_Or_Body): Moved to spec.
2172 (Find_Role): Add support for generic parameters and constants.
2173 (Get_Argument): Moved to spec. Rename parameter Spec_Id to Context_Id.
2174 (Match_Item): Add support for constants.
2175 (Preanalyze_Test_Case_Arg): Reimplemented.
2176 (Report_Extra_Clauses): Do not perform this check in an instance.
2177 (Report_Extra_Constituents): Do not perform this check in an instance.
2178 * sem_prag.ads (Collect_Subprogram_Inputs_Outputs): Update
2179 the comment on usage.
2180 (Find_Related_Package_Or_Body): Moved from body.
2181 (Get_Argument): Moved from body.
2182 * sem_util.adb Add with and use clauses for Sem_Ch12.
2183 (Corresponding_Spec_Of): Add support for packages and package bodies.
2184 (Create_Generic_Contract): New routine.
2185 (Is_Contract_Annotation): Reimplemented.
2186 (Is_Generic_Declaration_Or_Body): New routine.
2187 (Is_Package_Contract_Annotation): New routine.
2188 (Is_Subprogram_Contract_Annotation): New routine.
2189 * sem_util.ads (Corresponding_Spec_Of): Update the comment on usage.
2190 (Create_Generic_Contract): New routine.
2191 (Is_Generic_Declaration_Or_Body): New routine.
2192 (Is_Package_Contract_Annotation): New routine.
2193 (Is_Subprogram_Contract_Annotation): New routine.
2194 * sinfo.adb (Is_Generic_Contract_Pragma): New routine.
2195 (Set_Is_Generic_Contract_Pragma): New routine.
2196 * sinfo.ads Add new attribute Is_Generic_Contract_Pragma along
2197 with occurrences in nodes.
2198 (Is_Generic_Contract_Pragma): New routine along with pragma Inline.
2199 (Set_Is_Generic_Contract_Pragma): New routine along with pragma Inline.
2200 * treepr.adb (Print_Entity_Info): Output fields 36 to 41.
2202 2015-05-12 Robert Dewar <dewar@adacore.com>
2204 * a-taster.ads: Minor comment fix: fix bad header, this is a
2207 2015-05-12 Robert Dewar <dewar@adacore.com>
2209 * sem_intr.adb: (Check_Shift): Diagnose bad modulus value.
2211 2015-05-12 Robert Dewar <dewar@adacore.com>
2213 * gnat1drv.adb (Adjust_Global_Switches): Default to suppressing
2214 Alignment_Checks on non-strict alignment machine.
2215 * sem_ch13.adb (Validate_Address_Clauses): Don't give
2216 compile-time alignment warnings if run time Alignment_Check
2219 2015-05-12 Thomas Quinot <quinot@adacore.com>
2221 * g-sercom.ads, g-sercom-linux.adb (GNAT.Serial_Communications.
2222 Data_Rate): New literals B75, B110, B150, B300, B600.
2224 2015-05-12 Doug Rupp <rupp@adacore.com>
2226 * init.c (__gnat_init_float) [vxworks]: For e500v2,
2227 do nothing and leave the responsibility to install the handler
2228 and enable the exceptions to the BSP.
2230 2015-05-12 Robert Dewar <dewar@adacore.com>
2232 * sem_ch9.adb, einfo.ads, exp_intr.adb: Minor reformatting.
2233 * sem_disp.adb: Minor code reorganization (remove junk redundant
2235 * exp_unst.adb (Unnest_Subprogram.Uplev_Refs): Ignore uplevel
2236 references to bounds of types coming from original type reference.
2237 * checks.ads: Minor reformatting.
2238 * checks.adb: Minor reformatting.
2239 * sem_prag.adb (Analyze_Pragma, case Check): If in ignored
2240 assertion, then make sure we do not drag in bignum stuff.
2242 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2244 * sem_ch9.adb (Collect_Interfaces): Initialize
2245 Direct_Primitive_Operations for a tagged synchronized type,
2246 so it can used in ASIS mode.
2247 * sem_disp.adb (Check_Dispatching_Operation): If expansion is
2248 disabled, attach subprogram to list of Direct_Primitive_Operations
2249 of synchronized type itself, for ASIS use, because in this case
2250 Corresponding_Record_Type is not built.
2251 * einfo.ads: Indicate use of Direct_Primitive_Operations on
2254 2015-05-12 Pierre-Marie de Rodat <derodat@adacore.com>
2256 * exp_pakd.adb: Make clearer the comment in exp_pakd.adb about
2259 2015-05-12 Robert Dewar <dewar@adacore.com>
2261 * sem_ch3.adb, sem_util.adb, sem_ch6.adb: Minor reformatting.
2263 2015-05-12 Robert Dewar <dewar@adacore.com>
2265 * exp_unst.adb (Visit_Node): Deal with subprogram and package stubs.
2267 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2269 * exp_intr.adb (Expand_Dispatching_Constructor_Call): The
2270 tag to be retrieved for the generated call is the first entry
2271 in the dispatch table for the return type of the instantiated
2274 2015-05-12 Bob Duff <duff@adacore.com>
2276 * exp_ch7.adb, exp_ch7.ads, exp_intr.adb, exp_util.adb,
2277 exp_util.ads: Update comments.
2279 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2281 * sem_ch3.adb (Add_Internal_Interface_Entities): Do no generate
2282 freeze nodes for these in ASIS mode, because they lead to
2283 elaoration order issues in gigi.
2285 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
2287 * sem_ch6.adb (Analyze_Expression_Function): Code
2288 cleanup. Use Copy_Subprogram_Spec to create a proper spec.
2289 (Analyze_Subprogram_Body_Helper): Code cleanup. Do not
2290 prepare a stand alone body for inlining in GNATprove mode
2291 when inside a generic. (Body_Has_Contract): Reimplemented.
2292 (Build_Subprogram_Declaration): New routine.
2293 * sem_ch10.adb (Analyze_Compilation_Unit): Capture global
2294 references within generic bodies by loading them.
2295 * sem_util.adb (Copy_Parameter_List): Code cleanup.
2296 (Copy_Subprogram_Spec): New routine.
2297 (Is_Contract_Annotation): New routine.
2298 * sem_util.ads (Copy_Subprogram_Spec): New routine.
2299 (Is_Contract_Annotation): New routine.
2301 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
2303 * sem_attr.adb (Resolve_Attribute): Do not analyze the generated
2304 body of an expression function when the prefix of attribute
2305 'Access is the body.
2307 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2309 * sem_ch3.adb (Build_Derived_Enumeration_Type): The anonymous base
2310 created for a derived enumeration type is not a first subtype,
2311 even though it is defined through a full type declaration.
2312 * sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): Do not process
2313 aspects for the anonymous base type constructed for a derived
2314 scalar type, because they will be set when the first subtype
2316 (Inherit_Aspects_At_Freeze_Point): Fix typos on handling of
2317 Default_Value and Default_Component_Value, that prevented the
2318 proper inheritance of these aspects.
2320 2015-05-12 Gary Dismukes <dismukes@adacore.com>
2322 * exp_ch6.adb, exp_unst.adb: Minor typo fixes.
2324 2015-05-12 Robert Dewar <dewar@adacore.com>
2326 * sem_ch3.adb: Minor reformatting.
2328 2015-05-12 Vincent Celier <celier@adacore.com>
2330 * gnatcmd.adb: If we want to invoke gnatmake (gnatclean) with
2331 -P, then check if gprbuild (gprclean) is available; if it is,
2332 use gprbuild (gprclean) instead of gnatmake (gnatclean).
2334 2015-05-12 Robert Dewar <dewar@adacore.com>
2336 * debug.adb: Add flag -gnatd.3 to output diagnostic info from
2338 * einfo.ad, einfo.adb: Reorganize (and remove most of) flags used by
2340 * exp_ch6.adb (Unest_Bodies): Table for delayed calls to
2341 Unnest_Subprogram (Expand_N_Subprogram_Body): Add entry to table
2342 for later call instead of calling Unnest_Subprogram directly
2343 (Initialize): New procedure (Unnest_Subprograms): New procedure
2344 * exp_ch6.ads (Add_Extra_Actual_To_Call): Move into proper
2346 (Initialize): New procedure.
2347 (Unnest_Subprograms): New procedure.
2348 * exp_unst.adb (Unnest_Subprogram): Major rewrite, moving
2349 all processing to this routine which is now called late
2350 after instantiating bodies. Fully handles the case of generic
2352 * exp_unst.ads: Major rewrite, moving all processing to
2354 * frontend.adb (Frontend): Add call to Exp_Ch6.Initialize.
2355 (Frontend): Add call to Unnest_Subprograms.
2356 * sem_ch8.adb (Find_Direct_Name): Back to old calling sequence
2357 for Check_Nested_Access.
2358 * sem_util.adb (Build_Default_Subtype): Minor reformatting
2359 (Check_Nested_Access): Back to original VM-only form (we
2360 now do all the processing for Unnest_Subprogram at the time
2362 (Denotes_Same_Object): Minor reformatting
2363 (Note_Possible_Modification): Old calling sequence for
2364 Check_Nested_Access.
2365 * sem_util.ads (Check_Nested_Access): Back to original VM-only
2366 form (we now do all the processing for Unnest_Subprogram at the
2369 2015-05-12 Robert Dewar <dewar@adacore.com>
2371 * sem_ch3.adb, freeze.adb, sem_ch6.adb: Minor reformatting.
2373 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2375 * sem_ch3.adb (Analyze_Object_Declaration): New function
2376 Has_Delayed_Aspect, used to defer resolution of an aggregate
2377 expression when the object declaration carries aspects Address
2379 * freeze.adb (Freeze_Object_Declaration): New subsidiary procedure
2380 to Freeze_Entity. In addition to the previous processing steps
2381 at the freeze point of an object, this procedure also handles
2382 aggregates in object declarations, when the declaration carries
2383 delayed aspects that require that the initialization of the
2384 object be attached to its freeze actions.
2386 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2388 * sem_ch6.adb (Analyze_Subprogram_Declaration): Following
2389 AI12-0147, null procedures and expression functions are allowed
2390 in protected bodies.
2392 2015-05-12 Tristan Gingold <gingold@adacore.com>
2394 * i-cpoint.adb (Copy_Terminated_Array): Copy nothing if Length is 0.
2396 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2398 * sem_ch3.adb (Complete_Private_Subtype): Propagate
2399 Has_Delayed_Aspects flag from private to full view, to ensure
2400 that predicate functions are constructed.
2402 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2404 * sem_ch6.adb (Process_Formals): If a tagged formal is an
2405 incomplete class-wide type, the subprogram must have a delayed
2406 freeze even though the opertation is not a primitive of the
2407 type. THis ensures that the backend can recover the full view
2408 when elaborating the subprogram declaration.
2410 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2412 * exp_util.adb (Get_Current_Value_Condition): Nothing to be
2413 done if an elsif part has been rewritten so that it is not part
2414 of an enclosing if_statement.
2416 2015-05-12 Robert Dewar <dewar@adacore.com>
2418 * sem_type.adb, sem_ch10.adb, freeze.adb, sem_ch6.adb, exp_disp.adb:
2421 2015-05-12 Bob Duff <duff@adacore.com>
2423 * exp_attr.adb (Size): Remove unnecessary check for types with
2424 unknown discriminants. That was causing the compiler to build
2425 a function call _size(T), where T is a type, not an object.
2427 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2429 * sem_ch4.adb (Extended_Primitive_Ops): Exclude overriding
2430 primitive operations of a type extension declared in the package
2431 body, to prevent duplicates in extended list.
2433 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2435 * sem_ch3.adb (Analyze_Component_Declaration): If the component is
2436 an unconstrained synchronized type with discriminants, create a
2437 constrained default subtype for it, so that the enclosing record
2438 can be given the proper size.
2439 * sem_util.adb (Build_Default_Subtype): If the subtype is created
2440 for a record discriminant, do not analyze the declarztion at
2441 once because it is added to the freezing actions of the enclosing
2444 2015-05-12 Robert Dewar <dewar@adacore.com>
2446 * exp_prag.adb (Expand_N_Pragma): Rewrite ignored pragma as
2448 * namet.ads (Boolean3): Document this flag used for Ignore_Pragma.
2449 * par-prag.adb (Prag): Implement Ignore_Pragma.
2450 * sem_prag.adb: Implement Ignore_Pragma.
2451 * snames.ads-tmpl: Add entries for pragma Ignore_Pragma.
2453 2015-05-12 Javier Miranda <miranda@adacore.com>
2455 * sem_ch10.adb (Build_Shadow_Entity): Link the class-wide shadow
2456 entity with its corresponding real entity.
2457 (Decorate_Type): Unconditionally build the class-wide shadow entity of
2459 * einfo.ads, einfo.adb (Has_Non_Limited_View): New synthesized
2461 (Non_Limited_View): Moved from field 17 to field 19 be available
2462 in class-wide entities.
2463 * exp_attr.adb (Access_Cases): Code cleanup.
2464 * exp_disp.adb (Expand_Interface_Actuals): Ditto.
2465 * exp_util.adb (Non_Limited_Designated_Type): Ditto.
2466 * freeze.adb (Build_Renamed_Bdody): Ditto.
2467 * sem_aux.adb (Available_View): Ditto.
2468 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
2469 (Try_One_Prefix_Interpretation): Ditto.
2470 * sem_ch5.adb (Analyze_Assignment): Ditto.
2471 * sem_ch6.adb (Detect_And_Exchange): Ditto.
2472 * sem_ch8.adb (Find_Expanded_Name): Ditto.
2473 * sem_disp.adb (Check_Controlling_Type): Ditto.
2474 * sem_res.adb (Resolve_Type_Conversion): Ditto.
2475 (Full_Designated_Type): Ditto.
2476 * sem_type.adb (Covers): Ditto.
2477 * sem_util.adb: Fix typo in comment.
2479 2015-05-12 Robert Dewar <dewar@adacore.com>
2481 * exp_unst.adb (Get_Real_Subp): New subprogram.
2482 (Unnest_Subprogram): Use Get_Real_Subp.
2483 (Uplev_Refs_For_One_Subp): Skip if no ARECnU entity.
2484 (Uplev_Refs_For_One_Subp): Use actual subtype in unconstrained case.
2486 2015-05-12 Robert Dewar <dewar@adacore.com>
2488 * a-reatim.adb ("/"): Add explicit check for Time_Span_First / -1.
2490 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2492 * sem_ch4.adb (Extended_Primitive_Ops): New subprogram,
2493 auxiliary to Try_Primitive_Operation to handle properly prefixed
2494 calls where the operation is not a primitive of the type, but
2495 is declared in the package body that is in the immediate scope
2498 2015-05-12 Robert Dewar <dewar@adacore.com>
2500 * sem_util.adb (Is_Variable): Allow X'Deref(Y) as a variable.
2502 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2504 * sem_ch8.adb (Find_Expanded_Name): Handle properly a fully
2505 qualified name for an instance of a generic grand-child unit in
2506 the body its parent.
2508 2015-05-12 Robert Dewar <dewar@adacore.com>
2510 * exp_unst.adb (Upref_Name): New subprogram.
2511 (Unnest_Subprogram): Use Upref_Name.
2512 (Unnest_Subprogram): Use new Deref attribute.
2513 * exp_unst.ads: Doc updates.
2515 2015-05-12 Thomas Quinot <quinot@adacore.com>
2517 * adaint.c: Enable Large File Support in adaint so that __gnat_readdir
2518 can access files on filesystems mounted from servers that use large
2521 2015-05-09 Eric Botcazou <ebotcazou@adacore.com>
2523 * gcc-interface/utils.c (gnat_write_global_declarations): Use type_decl
2524 method instead of global_decl for TYPE_DECLs.
2526 2015-04-27 Jim Wilson <jim.wilson@linaro.org>
2528 * gcc-interface/Makefile-lan.in (ada.mostlyclean): Remove gnatbind
2531 2015-04-13 Eric Botcazou <ebotcazou@adacore.com>
2533 * gnatvsn.ads (Library_Version): Bump to 6.
2535 2015-04-09 Iain Sandoe <iain@codesourcery.com>
2537 * gcc-interface/Makefile.in (darwin, powerpc): Enable atomics.
2539 2015-04-08 Eric Botcazou <ebotcazou@adacore.com>
2541 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Do not make
2542 a function returning an unconstrained type 'const' for the middle-end.
2544 * gcc-interface/trans.c (Pragma_to_gnu) <case Pragma_Warning>: Use
2545 exact condition to detect Reason => "..." pattern.
2547 2015-03-31 Tom de Vries <tom@codesourcery.com>
2550 * terminals.c (child_setup_tty): Fix warning 'argument to sizeof in
2551 bzero call is the same expression as the destination'.
2553 2015-03-26 Eric Botcazou <ebotcazou@adacore.com>
2555 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Deref>: New case.
2557 2015-03-24 Gary Dismukes <dismukes@adacore.com>
2559 * sem_ch3.adb: Minor typo fix (missing paren).
2561 2015-03-24 Robert Dewar <dewar@adacore.com>
2563 * sinfo.ads: Update comment.
2565 2015-03-24 Robert Dewar <dewar@adacore.com>
2567 * exp_attr.adb: Add entry for typ'Deref.
2568 * sem_attr.adb (Deref): New GNAT attribute.
2569 * sem_attr.ads: Add entry for new GNAT attribute Deref.
2570 * snames.ads-tmpl: Add entries for new attribute Deref.
2572 2015-03-24 Ed Schonberg <schonberg@adacore.com>
2574 * sem_ch13.adb (Rep_Item_Too_Early): allow pragma Convention
2577 2015-03-24 Gary Dismukes <dismukes@adacore.com>
2579 * inline.adb: Minor typo fix.
2581 2015-03-24 Arnaud Charlet <charlet@adacore.com>
2583 * doc/gnat_ugn/building_executable_programs_with_gnat.rst,
2584 doc/gnat_ugn/gnat_utility_programs.rst
2585 doc/gnat_rm/implementation_defined_attributes.rst
2586 doc/gnat_rm/implementation_defined_pragmas.rst
2587 doc/gnat_rm/representation_clauses_and_pragmas.rst
2588 doc/gnat_rm/about_this_guide.rst
2589 doc/gnat_rm/implementation_of_ada_2012_features.rst: Doc improvements.
2590 * gnat_rm.texi, gnat_ugn.texi: Regenerate.
2592 2015-03-23 Jakub Jelinek <jakub@redhat.com>
2595 * adadecode.c (ada_demangle): Guard with IN_RTS instead of IN_GCC.
2597 2015-03-20 Eric Botcazou <ebotcazou@adacore.com>
2600 * gcc-interface/utils.c (gnat_pushdecl): Tidy up and improve comment.
2601 Make sure to chain only main variants through TYPE_NEXT_PTR_TO.
2603 * gcc-interface/trans.c (Attribute_to_gnu): Revert latest change.
2605 2015-03-16 Eric Botcazou <ebotcazou@adacore.com>
2607 * gcc-interface/utils2.c (gnat_invariant_expr): Return null if the type
2608 of the expression ends up being composite.
2610 2015-03-16 Eric Botcazou <ebotcazou@adacore.com>
2612 * gcc-interface/decl.c (is_from_limited_with_of_main): New predicate.
2613 (gnat_to_gnu_entity) <E_Subprogram_Type>: Invoke it on return and
2614 parameter types to detect circularities in ASIS mode.
2615 * gcc-interface/trans.c (Attribute_to_gnu): Mention AI05-0151.
2617 2015-03-16 Eric Botcazou <ebotcazou@adacore.com>
2619 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Abstract_State>: Do not
2620 short-circuit the regular handling.
2622 2015-03-13 Robert Dewar <dewar@adacore.com>
2624 * exp_unst.adb (Note_Uplevel_Reference): Eliminate duplicate
2626 (Actual_Ref): New function.
2627 (AREC_String): Minor reformatting.
2628 (Unnest_Subprogram): Use Actual_Ref.
2629 * frontend.adb (Frontend): Turn off Unnest_Subprogram_Mode
2630 before call to Instantiate_Bodies.
2632 2015-03-13 Ed Schonberg <schonberg@adacore.com>
2634 * freeze.adb (Freeze_Profile): If the return type of a function
2635 being frozen is an untagged limited view and the function is
2636 abstract, mark the type as frozen because there is no later
2637 point at which the profile of the subprogram will be elaborated.
2639 2015-03-13 Robert Dewar <dewar@adacore.com>
2641 * einfo.adb, einfo.ads, atree.adb, atree.ads, atree.h: Add seventh
2642 component to entities. Add new fields Field36-41 and Node36-41.
2644 2015-03-13 Claire Dross <dross@adacore.com>
2646 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Rewrite after review.
2648 2015-03-13 Robert Dewar <dewar@adacore.com>
2650 * exp_util.adb (Is_Volatile_Reference): Compile time known
2651 value is never considered to be a volatile reference.
2653 2015-03-13 Robert Dewar <dewar@adacore.com>
2655 * sem_ch3.adb (Analyze_Object_Contract): Suppress "constant
2656 cannot be volatile" for internally generated object (such as
2657 FIRST and LAST constants).
2659 2015-03-13 Ed Schonberg <schonberg@adacore.com>
2661 * sem_ch12.adb (Validate_Access_Subprogram_Instance): If a
2662 convention is specified for the formal parameter, verify that
2663 the actual has the same convention.
2664 * sem_prag.adb (Set_Convention_From_Pragma): Allow convention
2665 pragma to be set on a generic formal type.
2666 * sem_util.adb (Set_Convention): Ignore within an instance,
2667 as it has already been verified in the generic unit.
2669 2015-03-13 Claire Dross <dross@adacore.com>
2671 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do not inline
2672 subprograms with unconstrained record parameters containing
2674 * sinfo.ads Document GNATprove assumption that type should match
2676 * sem_ch6.adb (Analyze_Subprogram_Body_Contract):
2677 Do not check for Refined_Depends and Refined_Globals contracts
2678 as they are optional.
2680 2015-03-13 Ed Schonberg <schonberg@adacore.com>
2682 * sem_ch12.adb (Instantiate_Type): For a floating-point type,
2683 capture dimension info if any, because the generated subtype
2684 declaration does not come from source and will not process dimensions.
2685 * sem_dim,adb (Analyze_Dimension_Extension_Or_Record_Aggregate):
2686 Do not analyze expressions with an initialization procedure
2687 because aggregates will have been checked at the point of record
2690 2015-03-13 Robert Dewar <dewar@adacore.com>
2692 * aspects.ads, aspects.adb: Add entries for aspect Unimplemented.
2693 * einfo.ads, einfo.adb (Is_Unimplemented): New flag.
2694 * sem_ch13.adb: Add dummy entry for aspect Unimplemented.
2695 * snames.ads-tmpl: Add entry for Name_Unimplemented.
2697 2015-03-13 Gary Dismukes <dismukes@adacore.com>
2699 * style.adb (Missing_Overriding): Apply the
2700 Comes_From_Source test to the Original_Node of the subprogram
2701 node, to handle the case of a null procedure declaration that
2702 has been rewritten as an empty procedure body.
2704 2015-03-13 Robert Dewar <dewar@adacore.com>
2706 * exp_util.ads: Minor fix to comment.
2707 * sem_ch3.adb (Constrain_Index): Correct pasto from previous
2710 2015-03-13 Robert Dewar <dewar@adacore.com>
2712 * exp_util.ads, exp_util.adb (Force_Evaluation): Add Related_Id and
2713 Is_Low/High_Bound params.
2714 * sem_ch3.adb (Constrain_Index): Use new Force_Evaluation calling
2715 sequence to simplify generation of FIRST/LAST temps for bounds.
2717 2015-03-12 Olivier Hainque <hainque@adacore.com>
2719 * gcc-interface/trans.c (Attribute_to_gnu) <Code_Address case>:
2720 On targets where a function symbol designates a function descriptor,
2721 fetch the function code address from the descriptor.
2722 (USE_RUNTIME_DESCRIPTORS): Provide a default definition.
2724 2015-03-04 Robert Dewar <dewar@adacore.com>
2726 * sem_warn.adb: Minor reformatting.
2727 * init.c: Minor tweaks.
2729 2015-03-04 Dmitriy Anisimko <anisimko@adacore.com>
2731 * a-coinho-shared.adb: Fix clear of already empty holder.
2733 2015-03-04 Robert Dewar <dewar@adacore.com>
2735 * exp_unst.adb (Check_Dynamic_Type): Ignore library level types.
2736 (Check_Uplevel_Reference_To_Type): Ignore call inside generic.
2737 (Note_Uplevel_Reference): Ignore call inside generic.
2738 (Note_Uplevel_Reference): Fix check for no entity field.
2739 (Unnest_Subprogram): Ignore call inside generic.
2740 (Find_Current_Subprogram): Use Defining_Entity, not Defining_Unit_Name.
2741 (Visit_Node): Ignore calls to Imported subprograms.
2742 (Visit_Node): Fix problem in finding subprogram body in some cases.
2743 (Add_Form_To_Spec): Use Defining_Entity, not Defining_Unit_Name.
2745 2015-03-04 Robert Dewar <dewar@adacore.com>
2747 * einfo.adb (Is_ARECnF_Entity): Removed.
2748 (Last_Formal): Remove special handling of Is_ARECnF_Entity.
2749 (Next_Formal): Remove special handling of Is_ARECnF_Entity.
2750 (Next_Formal_With_Extras): Remove special handling of Is_ARECnF_Entity.
2751 (Number_Entries): Minor reformatting.
2752 * einfo.ads (Is_ARECnF_Entity): Removed.
2753 * exp_unst.adb (Unnest_Subprogram): Remove setting of
2755 (Add_Extra_Formal): Use normal Extra_Formal circuit.
2756 * sprint.adb (Write_Param_Specs): Properly handle case where
2757 there are no source formals, but we have at least one Extra_Formal
2760 2015-03-04 Ed Schonberg <schonberg@adacore.com>
2762 * sem_aggr.adb (Resolve_Record_Aggregate,
2763 Add_Discriminant_Values): If the value is a reference to the
2764 current instance of an enclosing type, use its base type to check
2765 against prefix of attribute reference, because the target type
2766 may be otherwise constrained.
2768 2015-03-04 Robert Dewar <dewar@adacore.com>
2770 * atree.h: Add entries for Flag287-Flag309.
2771 * einfo.adb: Add (unused) flags Flag287-Flag309.
2773 2015-03-04 Ed Schonberg <schonberg@adacore.com>
2775 * sem_util.adb (Collect_Interfaces, Collect): When gathering
2776 interfaces of ancestors, handle properly a subtype of a private
2779 2015-03-04 Robert Dewar <dewar@adacore.com>
2781 * einfo.adb (Is_ARECnF_Entity): New flag (ARECnF is an extra formal).
2782 (Next_Formal): Don't return ARECnF formal.
2783 (Last_Formal): Don't consider ARECnF formal.
2784 (Next_Formal_With_Extras): Do consider ARECnF formal.
2785 * einfo.ads (Is_ARECnF_Entity): New flag (ARECnF is an extra formal).
2786 * exp_unst.adb (Create_Entities): Set Is_ARECnF_Entity flag.
2788 2015-03-04 Javier Miranda <miranda@adacore.com>
2790 * exp_ch6.adb (Expand_Simple_Function_Return): When the returned
2791 object is a class-wide interface object and we generate the
2792 accessibility described in RM 6.5(8/3) then displace the pointer
2793 to the object to reference the base of the object (to get access
2794 to the TSD of the object).
2796 2015-03-04 Hristian Kirtchev <kirtchev@adacore.com>
2798 * sem_prag.adb (Analyze_Abstract_State): Use routine
2799 Malformed_State_Error to issue general errors.
2800 (Analyze_Pragma): Diagnose a syntax error related to a state
2801 declaration with a simple option.
2802 (Malformed_State_Error): New routine.
2804 2015-03-04 Robert Dewar <dewar@adacore.com>
2806 * a-strsup.adb (Super_Slice): Deal with super flat case.
2807 * einfo.ads: Minor reformatting.
2808 * s-imgdec.adb (Set_Decimal_Digits): Add comment about possibly
2811 2015-03-04 Claire Dross <dross@adacore.com>
2813 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
2814 a-cforse.ads, a-cofove.ads: Use Default_Initial_Condition on formal
2817 2015-03-04 Ed Schonberg <schonberg@adacore.com>
2819 * sem_warn.adb (Check_References): When checking for an unused
2820 in-out parameter of a class- wide type, use its type to determine
2821 whether it is private, in order to avoid a spurious warning when
2822 subprogram spec and body are in different units.
2824 2015-03-04 Yannick Moy <moy@adacore.com>
2826 * sem_attr.adb: Improve warning messages.
2828 2015-03-04 Robert Dewar <dewar@adacore.com>
2830 * exp_ch6.adb (Expand_N_Subprogram_Body): Avoid trying to unnest
2831 generic subprograms.
2832 * exp_unst.adb (Check_Dynamic_Type): Handle record types properly
2833 (Note_Uplevel_Reference): Ignore uplevel references to non-types
2834 (Get_Level): Consider only subprograms, not blocks.
2835 (Visit_Node): Set proper condition for generating ARECnF entity.
2836 Ignore indirect calls. Ignore calls to subprograms
2838 (Unnest_Subprogram): Minor changes in dealing with ARECnF entity.
2839 (Add_Form_To_Spec): Properly set Last_Entity field.
2840 (Unnest_Subprogram): Set current subprogram scope for analyze calls.
2841 Handle case of no uplevel refs in outer subprogram
2842 Don't mark uplevel entities as aliased.
2843 Don't deal with calls with no ARECnF requirement.
2845 2015-03-04 Robert Dewar <dewar@adacore.com>
2847 * s-valrea.adb (Scan_Real): Remove redundant tests from scaling loops.
2848 * s-imgdec.adb (Set_Decimal_Digits): Remove redundant Max
2849 operation in computing LZ.
2850 * sem_attr.adb: Minor typo fix
2852 2015-03-04 Robert Dewar <dewar@adacore.com>
2854 * exp_ch7.adb: Minor reformatting.
2855 * exp_unst.adb (Build_Tables): Fix minor glitch for no separate
2857 * erroutc.adb (Delete_Msg): add missing decrement of info msg counter.
2859 2015-03-04 Hristian Kirtchev <kirtchev@adacore.com>
2861 * exp_ch6.adb (Build_Pragma_Check_Equivalent): Suppress
2862 references to formal parameters subject to pragma Unreferenced.
2863 (Suppress_Reference): New routine.
2864 * sem_attr.adb (Analyze_Attribute): Reimplement the analysis
2865 of attribute 'Old. Attributes 'Old and 'Result now share
2867 (Analyze_Old_Result_Attribute): New routine.
2868 (Check_Placement_In_Check): Removed.
2869 (Check_Placement_In_Contract_Cases): Removed.
2870 (Check_Placement_In_Test_Case): Removed.
2871 (Check_Use_In_Contract_Cases): Removed.
2872 (Check_Use_In_Test_Case): Removed.
2873 (In_Refined_Post): Removed.
2874 (Is_Within): Removed.
2875 * sem_warn.adb (Check_Low_Bound_Tested): Code cleanup.
2876 (Check_Low_Bound_Tested_For): New routine.
2878 2015-03-04 Hristian Kirtchev <kirtchev@adacore.com>
2880 * exp_ch3.adb (Expand_N_Object_Declaration):
2881 Generate a runtime check to test the expression of pragma
2882 Default_Initial_Condition when the object is default initialized.
2884 2015-03-02 Robert Dewar <dewar@adacore.com>
2886 * scng.adb (Scan): Ignore illegal character in relaxed
2889 2015-03-02 Ed Schonberg <schonberg@adacore.com>
2891 * sem_ch4.adb (Analyze_Set_Membership); Retain Overloaded flag
2892 on left operand, so it can be properly resolved with type of
2893 alternatives of right operand.
2894 * sem_res.adb (Resolve_Set_Membership): Handle properly an
2895 overloaded left-hand side when the alternatives on the right
2896 hand side are literals of some universal type. Use first
2897 non-overloaded alternative to find expected type.
2899 2015-03-02 Ed Schonberg <schonberg@adacore.com>
2901 * exp_ch7.adb (Make_Set_Finalize_Address_Call): Use underlying
2902 type to retrieve designated type, because the purported access
2903 type may be a partial (private) view, when it is declared in
2904 the private part of a nested package, and finalization actions
2905 are generated when completing compilation of enclosing unit.
2907 2015-03-02 Robert Dewar <dewar@adacore.com>
2909 * back_end.adb (Call_Back_End): Remove previous patch,
2910 the back end now gets to see the result of -gnatd.1
2911 (Unnest_Subprogram_Mode) processing.
2912 * elists.ads, elists.adb (List_Length): New function.
2913 * exp_unst.ads, exp_unst.adb: Major changes, first complete version.
2914 * sem_util.adb (Check_Nested_Access): Handle formals in
2915 Unnest_Subprogram_Mode.
2916 (Adjust_Named_Associations): Minor reformatting.
2917 * sprint.adb (Sprint_Node_Actual): Fix failure to print aliased
2920 2015-03-02 Robert Dewar <dewar@adacore.com>
2922 * atree.ads, atree.adb (Uint24): New function
2923 (Set_Uint24): New procedure.
2924 * atree.h (Uint24): New macro for field access.
2925 * back_end.adb (Call_Back_End): For now, don't call back end
2926 if unnesting subprogs.
2927 * einfo.adb (Activation_Record_Component): New field
2928 (Subps_Index): New field.
2929 * einfo.ads (Activation_Record_Component): New field
2930 (Subps_Index): New field Minor reordering of comments into alpha order.
2931 * exp_unst.ads, exp_unst.adb: Continued development.
2933 2015-03-02 Gary Dismukes <dismukes@adacore.com>
2935 * exp_disp.ads: Minor reformatting.
2937 2015-03-02 Ed Schonberg <schonberg@adacore.com>
2939 * sem_ch8.adb (Chain_Use_Clause): Do not chain use clause from
2940 ancestor to list of use clauses active in descendant unit if we
2941 are within the private part of an intervening parent, to prevent
2942 circularities in use clause list.
2944 2015-03-02 Javier Miranda <miranda@adacore.com>
2946 * exp_ch9.adb (Build_Corresponding_Record): Propagate type
2947 invariants to the corresponding record type.
2948 * exp_disp.ad[sb] (Set_DT_Position_Value): New subprogram
2949 which sets the value of the DTC_Entity associated with a given
2950 primitive of a tagged type and propagates the value to the
2952 (Set_DTC_Entity_Value): Propagate the DTC
2953 value to the wrapped entity.
2954 * sem_ch13.adb (Build_Invariant_Procedure): Append the code
2955 associated with invariants of progenitors.
2956 * sem_ch3.adb (Build_Derived_Record_Type): Inherit type invariants
2957 of parents and progenitors.
2958 (Process_Full_View): Check hidden inheritance of class-wide type
2960 * sem_ch7.adb (Analyze_Package_Specification): Do not generate
2961 the invariant procedure for interface types; build the invariant
2962 procedure for tagged types inheriting invariants from their
2964 * sem_prag.adb (Pragma_Invariant) Allow invariants in interface
2965 types but do not build their invariant procedure since their
2966 invariants will be propagated to the invariant procedure of
2967 types covering the interface.
2968 * exp_ch6.adb, exp_disp.adb, sem_ch3.adb, sem_ch7.adb,
2969 sem_ch8.adb, sem_disp.adb: Replace all calls to Set_DT_Position
2970 by calls to Set_DT_Position_Value.
2972 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
2974 * sem_attr.adb (Analyze_Attribute): Factor out heavily indented
2975 code in Denote_Same_Function. Do not analyze attribute 'Result
2976 when it is inside procedure _Postconditions. Remove a misplaced
2977 warning diagnostic. Code cleanup.
2978 (Denote_Same_Function): New routine.
2979 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Code
2980 cleanup. Warn on pre/postconditions on an inlined subprogram.
2981 (Analyze_Pragma, Refined_Post case): Warn on pre/postconditions on
2982 an inlined subprogram.
2983 (Analyze_Pre_Post_Condition_In_Decl_Part): Code cleanup. Warn on
2984 pre/post condition on an inlined subprogram.
2985 (Analyze_Test_Case_In_Decl_Part): Code cleanup. Warn on
2986 pre/postconditions on an inlined subprogram.
2987 (Check_Postcondition_Use_In_Inlined_Subprogram): New routine.
2989 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
2991 * sem_prag.adb (Ensure_Aggregate_Form):
2992 Ensure that the name denoted by the Chars of a pragma argument
2993 association has the proper Sloc when converted into an aggregate.
2995 2015-03-02 Bob Duff <duff@adacore.com>
2997 * sem_ch6.adb (Check_Private_Overriding): Capture
2998 Incomplete_Or_Partial_View in a constant. This is cleaner and
3001 2015-03-02 Gary Dismukes <dismukes@adacore.com>
3003 * einfo.ads, exp_unst.ads: Minor reformatting.
3005 2015-03-02 Ed Schonberg <schonberg@adacore.com>
3007 * a-strsea.adb (Find_Token): Ensure that the range of iteration
3008 does not perform any improper character access. This prevents
3009 erroneous access in the unusual case of an empty string target
3010 and a From parameter less than Source'First.
3012 2015-03-02 Robert Dewar <dewar@adacore.com>
3014 * elists.adb (List_Length): Fix incorrect result.
3016 2015-03-02 Bob Duff <duff@adacore.com>
3018 * sem_ch6.adb (Check_Private_Overriding): Refine the legality
3019 checks here. It used to check that the function is merely
3020 overriding SOMEthing. Now it checks that the function is
3021 overriding a corresponding public operation. This is a correction
3022 to the implementation of the rule in RM-3.9.3(10).
3024 2015-03-02 Robert Dewar <dewar@adacore.com>
3026 * debug.adb: Document new debug flag -gnatd.1.
3027 * einfo.ads, einfo.adb (Has_Nested_Subprogram): New flag.
3028 (Has_Uplevel_Reference): New flag (Is_Static_Type): New flag.
3029 (Uplevel_Reference_Noted):New flag (Uplevel_References): New field.
3030 * elists.ads elists.adb (List_Length): New function.
3031 * exp_ch6.adb (Expand_N_Subprogram_Body): Call Unnest_Subprogram
3032 when appropriate (Process_Preconditions): Minor code
3033 reorganization and reformatting
3034 * exp_unst.ads, exp_unst.adb: New files.
3035 * gnat1drv.adb (Adjust_Global_Switches): Set
3036 Unnest_Subprogram_Mode if -gnatd.1
3037 * namet.ads, namet.adb (Name_Find_Str): New version of Name_Find with
3039 * opt.ads (Unnest_Subprogram_Mode): New flag.
3040 * par-ch3.adb (P_Identifier_Declarations): Fixes to -gnatd.2 handling.
3041 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set
3042 Has_Nested_Subprogram flag.
3043 * sem_ch8.adb (Find_Direct_Name): New calling sequence for
3044 Check_Nested_Access.
3045 (Find_Selected_Component): Minor comment addition.
3046 * sem_util.adb (Check_Nested_Access): New version for use with Exp_Unst.
3047 (Note_Possible_Modification): New calling sequence for
3048 Check_Nested_Access.
3049 * sem_util.ads (Check_Nested_Access): New version for use with Exp_Unst.
3050 * gcc-interface/Make-lang.in (GNAT1_OBJS): Add exp_unst.o
3052 2015-03-02 Pierre-Marie de Rodat <derodat@adacore.com>
3054 * gcc-interface/utils.c (gnat_pushdecl): For non-artificial pointer
3055 types, preserve the original type and create copies just like the C
3056 front-end does. For artificial ones, do not define a name for
3058 (create_type_decl): When gnat_pushdecl made the input type the
3059 original type for the new declaration, do not define a stub
3061 * gcc-interface/utils2.c (build_binary_op): Accept two different
3062 pointer types when they point to the same type.
3064 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
3066 * exp_util.adb (Possible_Bit_Aligned_Component): Do not process
3068 * sem_util.adb (Kill_Current_Values): Do not invalidate and
3071 2015-03-02 Robert Dewar <dewar@adacore.com>
3073 * sem_ch3.adb, exp_attr.adb, checks.adb, exp_aggr.adb: Minor
3076 2015-03-02 Ed Schonberg <schonberg@adacore.com>
3078 * sem_ch8.adb: extend use of Available_Subtype.
3080 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
3082 * sem_prag.adb (Duplication_Error): Remove the special handling
3083 of 'Class or _Class in the context of pre/postconditions.
3084 (Process_Class_Wide_Condition): Remove the special handling of
3085 'Class or _Class in the context of pre/postconditions.
3086 * sem_util.adb (Original_Aspect_Pragma_Name): Names Pre_Class
3087 and Post_Class no longer need to be converted to _Pre and _Post.
3088 * sem_util.ads (Original_Aspect_Pragma_Name): Update the comment
3091 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
3093 * exp_ch6.adb (Process_Preconditions): Modify the
3094 mechanism that find the first source declaration to correct exit
3095 the loop once it has been found.
3097 2015-03-02 Gary Dismukes <dismukes@adacore.com>
3099 * a-strsea.adb: Minor typo fix.
3101 2015-03-02 Bob Duff <duff@adacore.com>
3103 * einfo.ads: Minor comment fixes.
3105 2015-03-02 Gary Dismukes <dismukes@adacore.com>
3107 * einfo.adb, checks.adb: Minor reformatting and typo fixes.
3109 2015-03-02 Ed Schonberg <schonberg@adacore.com>
3111 * exp_aggr.adb (Get_Assoc_Expr): If the Default_Component_Value
3112 is defined for the array type, use it instead of a Default_Value
3113 specified for the component type itself.
3115 2015-03-02 Thomas Quinot <quinot@adacore.com>
3117 * exp_attr.adb (Expand_N_Attribute_Reference, case Input): When
3118 expanding a 'Input attribute reference for a class-wide type,
3119 do not generate a separate object declaration for the controlling
3120 tag dummy object; instead, generate the expression inline in the
3121 dispatching call. Otherwise, the declaration (which involves a
3122 call to String'Input, returning a dynamically sized value on the
3123 secondary stack) will be expanded outside of proper secondary
3124 stack mark/release operations, and will thus cause a secondary
3127 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
3129 * checks.adb (Add_Validity_Check): Change the names of all
3130 formal parameters to better illustrate their purpose. Update
3131 the subprogram documentation. Update all occurrences of the
3132 formal parameters. Generate a pre/postcondition pragma by
3133 calling Build_Pre_Post_Condition.
3134 (Build_PPC_Pragma): Removed.
3135 (Build_Pre_Post_Condition): New routine.
3136 * einfo.adb Node8 is no longer used as Postcondition_Proc. Node14
3137 is now used as Postconditions_Proc. Flag240 is now renamed to
3138 Has_Expanded_Contract. (First_Formal): The routine can now
3139 operate on generic subprograms.
3140 (First_Formal_With_Extras): The routine can now operate on generic
3142 (Has_Expanded_Contract): New routine.
3143 (Has_Postconditions): Removed.
3144 (Postcondition_Proc): Removed.
3145 (Postconditions_Proc): New routine.
3146 (Set_Has_Expanded_Contract): New routine.
3147 (Set_Has_Postconditions): Removed.
3148 (Set_Postcondition_Proc): Removed.
3149 (Set_Postconditions_Proc): New routine.
3150 (Write_Entity_Flags): Remove the output of Has_Postconditions. Add
3151 the output of Has_Expanded_Contract.
3152 (Write_Field8_Name): Remove the output of Postcondition_Proc.
3153 (Write_Field14_Name): Add the output of Postconditions_Proc.
3154 * einfo.ads New attributes Has_Expanded_Contract and
3155 Postconditions_Proc along with occurrences in entities.
3156 Remove attributes Has_Postconditions and Postcondition_Proc
3157 along with occurrences in entities.
3158 (Has_Expanded_Contract): New routine along with pragma Inline.
3159 (Has_Postconditions): Removed along with pragma Inline.
3160 (Postcondition_Proc): Removed along with pragma Inline.
3161 (Postconditions_Proc): New routine along with pragma Inline.
3162 (Set_Has_Expanded_Contract): New routine along with pragma Inline.
3163 (Set_Has_Postconditions): Removed along with pragma Inline.
3164 (Set_Postcondition_Proc): Removed along with pragma Inline.
3165 (Set_Postconditions_Proc): New routine along with pragma Inline.
3166 * exp_ch6.adb (Add_Return): Code cleanup. Update the
3167 generation of the call to the _Postconditions routine of
3168 the procedure. (Expand_Non_Function_Return): Reformat the
3169 comment on usage. Code cleanup. Update the generation of
3170 the call to the _Postconditions routine of the procedure or
3172 (Expand_Simple_Function_Return): Update the
3173 generation of the _Postconditions routine of the function.
3174 (Expand_Subprogram_Contract): Reimplemented.
3175 * exp_ch6.ads (Expand_Subprogram_Contract): Update the parameter
3176 profile along the comment on usage.
3177 * exp_ch9.adb (Build_PPC_Wrapper): Code cleanup.
3178 (Expand_N_Task_Type_Declaration): Generate pre/postconditions
3179 wrapper when the entry [family] has a contract with
3181 * exp_prag.adb (Expand_Attributes_In_Consequence): New routine.
3182 (Expand_Contract_Cases): This routine and its subsidiaries now
3183 analyze all generated code.
3184 (Expand_Old_In_Consequence): Removed.
3185 * sem_attr.adb Add with and use clause for Sem_Prag.
3186 (Analyze_Attribute): Reimplment the analysis of attribute 'Result.
3187 (Check_Use_In_Test_Case): Use routine Test_Case_Arg to obtain
3189 * sem_ch3.adb (Analyze_Declarations): Analyze the contract of
3190 a generic subprogram.
3191 (Analyze_Object_Declaration): Do not create a contract node.
3192 (Derive_Subprogram): Do not create a contract node.
3193 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Do
3194 not create a contract node.
3195 (Analyze_Completion_Contract): New routine.
3196 (Analyze_Function_Return): Alphabetize.
3197 (Analyze_Generic_Subprogram_Body): Alphabetize. Do not create a
3198 contract node. Do not copy pre/postconditions to the original
3200 (Analyze_Null_Procedure): Do not create a contract node.
3201 (Analyze_Subprogram_Body_Contract): Reimplemented.
3202 (Analyze_Subprogram_Body_Helper): Do not mark the enclosing scope
3203 as having postconditions. Do not create a contract node. Analyze
3204 the subprogram body contract of a body that acts as a compilation
3205 unit. Expand the subprogram contract after the declarations have
3207 (Analyze_Subprogram_Contract): Reimplemented.
3208 (Analyze_Subprogram_Specification): Do not create a contract node.
3209 (List_Inherited_Pre_Post_Aspects): Code cleanup.
3210 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Update the
3212 (Analyze_Subprogram_Contract): Update the
3213 parameter profile and the comment on usage.
3214 * sem_ch7.adb (Analyze_Package_Body_Helper): Do not create a
3216 (Analyze_Package_Declaration): Do not create a
3218 (Is_Subp_Or_Const_Ref): Ensure that the prefix has an entity.
3219 * sem_ch8.adb (Analyze_Subprogram_Renaming): Do not create a
3221 * sem_ch9.adb (Analyze_Entry_Declaration): Do not create a
3223 * sem_ch10.adb (Analyze_Compilation_Unit): Move local variables to
3224 their proper section and alphabetize them. Analyze the contract of
3225 a [generic] subprogram after all Pragmas_After have been analyzed.
3226 (Analyze_Subprogram_Body_Stub_Contract): Alphabetize.
3227 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Do not
3228 create a contract node.
3229 (Analyze_Generic_Subprogram_Declaration):
3230 Alphabetize local variables. Do not create a contract
3231 node. Do not generate aspects out of pragmas for ASIS.
3232 (Analyze_Subprogram_Instantiation): Instantiate
3233 the contract of the subprogram. Do not create a
3234 contract node. (Instantiate_Contract): New routine.
3235 (Instantiate_Subprogram_Body): Alphabetize local variables.
3236 (Save_Global_References_In_Aspects): New routine.
3237 (Save_References): Do not save the global references found within
3238 the aspects of a generic subprogram.
3239 * sem_ch12.ads (Save_Global_References_In_Aspects): New routine.
3240 * sem_ch13.adb (Analyze_Aspect_Specifications): Do not use
3241 Original_Node for establishing linkages.
3242 (Insert_Pragma): Insertion in a subprogram body takes precedence over
3243 the case where the subprogram body is also a compilation unit.
3244 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Use
3245 Get_Argument to obtain the proper expression. Install the generic
3246 formals when the related context is a generic subprogram.
3247 (Analyze_Depends_In_Decl_Part): Use Get_Argument to obtain
3248 the proper expression. Use Corresponding_Spec_Of to obtain
3249 the spec. Install the generic formal when the related context
3250 is a generic subprogram.
3251 (Analyze_Global_In_Decl_Part): Use Get_Argument to obtain the proper
3252 expression. Use Corresponding_Spec_Of to obtain the spec. Install the
3253 generic formal when the related context is a generic subprogram.
3254 (Analyze_Initial_Condition_In_Decl_Part): Use Get_Argument
3255 to obtain the proper expression. Remove the call to
3256 Check_SPARK_Aspect_For_ASIS as the analysis is now done
3258 (Analyze_Pragma): Update all occurrences
3259 to Original_Aspect_Name. Pragmas Contract_Cases, Depends,
3260 Extensions_Visible, Global, Postcondition, Precondition and
3261 Test_Case now carry generic templates when the related context
3262 is a generic subprogram. The same pragmas are no longer
3263 forcefully fully analyzed when the context is a subprogram
3264 that acts as a compilation unit. Pragmas Abstract_State,
3265 Initial_Condition, Initializes and Refined_State have been clean
3266 up. Pragmas Post, Post_Class, Postcondition, Pre, Pre_Class
3267 and Precondition now use the same routine for analysis. Pragma
3268 Refined_Post does not need to check the use of 'Result or
3269 the lack of a post-state in its expression. Reimplement the
3270 analysis of pragma Test_Case.
3271 (Analyze_Pre_Post_Condition): New routine.
3272 (Analyze_Pre_Post_Condition_In_Decl_Part):
3274 (Analyze_Refined_Depends_In_Decl_Part): Use Get_Argument to obtain the
3276 (Analyze_Refined_Global_In_Decl_Part): Use Get_Argument to obtain
3277 the proper expression.
3278 (Analyze_Test_Case_In_Decl_Part): Reimplemented.
3279 (Check_Pre_Post): Removed.
3280 (Check_Precondition_Postcondition): Removed.
3281 (Check_SPARK_Aspect_For_ASIS): Removed.
3282 (Check_Test_Case): Removed.
3283 (Collect_Subprogram_Inputs_Outputs): Use Get_Argument
3284 to obtain the proper expression. Use Corresponding_Spec_Of to
3285 find the proper spec.
3286 (Create_Generic_Template): New routine.
3287 (Duplication_Error): New routine.
3288 (Expression_Function_Error): New routine.
3289 (Find_Related_Subprogram_Or_Body): Moved to the spec
3290 of Sem_Prag. Emit precise error messages. Account for cases of
3291 rewritten expression functions, generic instantiations, handled
3292 sequence of statements and pragmas from aspects.
3293 (Get_Argument): New routine.
3294 (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Removed.
3295 (Preanalyze_CTC_Args): Removed.
3296 (Process_Class_Wide_Condition): New routine.
3297 * sem_prag.ads (Analyze_Test_Case_In_Decl_Part): Update
3298 the parameter profile along with the comment on usage.
3299 (Find_Related_Subprogram_Or_Body): Moved from the body of Sem_Prag.
3300 (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Removed.
3301 (Test_Case_Arg): New routine.
3302 * sem_util.adb Add with and use clauses for Sem_Ch6.
3303 (Add_Contract_Item): This routine now creates a contract
3304 node the first time an item is added. Remove the duplicate
3305 aspect/pragma checks.
3306 (Check_Result_And_Post_State): Reimplemented.
3307 (Corresponding_Spec_Of): New routine.
3308 (Get_Ensures_From_CTC_Pragma): Removed.
3309 (Get_Requires_From_CTC_Pragma): Removed.
3310 (Has_Significant_Contract): New routine.
3311 (Inherit_Subprogram_Contract): Inherit only if the source
3313 (Install_Generic_Formals): New routine.
3314 (Original_Aspect_Name): Removed.
3315 (Original_Aspect_Pragma_Name): New routine.
3316 * sem_util.ads (Check_Result_And_Post_State): Reimplemented.
3317 (Corresponding_Spec_Of): New routine.
3318 (Get_Ensures_From_CTC_Pragma): Removed.
3319 (Get_Requires_From_CTC_Pragma): Removed.
3320 (Has_Significant_Contract): New routine.
3321 (Install_Generic_Formals): New routine.
3322 (Original_Aspect_Name): Removed.
3323 (Original_Aspect_Pragma_Name): New routine.
3324 * sem_warn.adb Add with and use clauses for Sem_Prag.
3325 (Within_Postcondition): Use Test_Case_Arg to extract "Ensures".
3327 2015-03-02 Ed Schonberg <schonberg@adacore.com>
3329 * sem_ch8.adb (Available_Subtype): Optimization in
3330 Find_Selected_Component: when safe, use existing subtype of
3331 array component, possibly discriminant-dependent, rather than
3332 creating new subtype declaration for it. In this fashion different
3333 occurrences of the component have the same subtype, rather than
3334 just equivalent ones. Simplifies value tracing in GNATProve.
3336 2015-03-01 Arnaud Charlet <charlet@adacore.com>
3340 * doc/gnat_ugn/gnat_project_manager.rst,
3341 doc/gnat_ugn/platform_specific_information.rst: Remove reference to
3342 image, too troublesome with texi format.
3343 * gnat_ugn.texi: Regenerate.
3345 2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
3348 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8): Remove.
3349 (DEF_FUNCTION_TYPE_VAR_12): Likewise.
3350 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
3352 2015-02-23 Thomas Schwinge <thomas@codesourcery.com>
3354 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8): Fix number of
3355 arguments parameter.
3356 (DEF_FUNCTION_TYPE_VAR_12): Likewise.
3358 2015-02-22 Arnaud Charlet <charlet@adacore.com>
3360 * doc/Makefile: postprocess texinfo files to update @dircategory
3361 and update texi files under gcc/ada.
3362 * gnat_ugn.texi, gnat_rm.texi: Regenerated.
3364 2015-02-22 Arnaud Charlet <charlet@adacore.com>
3366 * doc/gnat_ugn/project-manager-figure.png,
3367 doc/gnat_ugn/rtlibrary-structure.png: New.
3369 2015-02-22 Tom de Vries <tom@codesourcery.com>
3372 * gnat-style.texi (@subsection Loop Statements): Replace @noindent by
3373 @item, and fix warning '@itemize has text but no @item'.
3375 2015-02-20 Ed Schonberg <schonberg@adacore.com>
3377 * sem_prag.adb (Analyze_Pragma, case Obsolescent): Pragma
3378 legally applies to an abstract subprogram declaration.
3379 * freeze.adb: Minor comment addition.
3381 2015-02-20 Robert Dewar <dewar@adacore.com>
3383 * errout.ads: Document replacement of Name_uPre/Post/Type_Invariant.
3384 * erroutc.adb (Set_Msg_Str): Replace _xxx.
3385 (Pre/Post/Type_Invariant) by xxx'Class.
3386 * erroutc.ads (Set_Msg_Str): Replace _xxx.
3387 (Pre/Post/Type_Invariant) by xxx'Class.
3388 * sem_prag.adb (Fix_Error): Remove special casing of
3389 Name_uType_Invariant.
3390 (Analyze_Pre_Post_Condition_In_Decl_Part): Remove special casing of
3391 Name_uPre and Name_uPost in aspect case (done in Errout now).
3393 2015-02-20 Robert Dewar <dewar@adacore.com>
3395 * g-alveop.adb: Minor style fixes.
3397 2015-02-20 Robert Dewar <dewar@adacore.com>
3399 * freeze.adb (Warn_Overlay): Guard against blow up with address
3402 2015-02-20 Bob Duff <duff@adacore.com>
3404 * exp_attr.adb (May_Be_External_Call): Remove this. There is no need
3405 for the compiler to guess whether the call is internal or external --
3406 it is always external.
3407 (Expand_Access_To_Protected_Op): For P'Access, where P
3408 is a protected subprogram, always create a pointer to the
3409 External_Subprogram.
3411 2015-02-20 Robert Dewar <dewar@adacore.com>
3413 * a-dispat.adb, a-stcoed.ads: Minor reformatting.
3415 2015-02-20 Robert Dewar <dewar@adacore.com>
3417 * sem_ch13.adb (Build_Discrete_Static_Predicate): Allow static
3418 predicate for non-static subtype.
3419 (Build_Predicate_Functions): Do not assume subtype associated with a
3420 static predicate must be static.
3422 2015-02-20 Robert Dewar <dewar@adacore.com>
3424 * errout.adb (Set_Msg_Node): Better handling of internal names
3425 (Set_Msg_Node): Kill message when we cannot eliminate internal name.
3426 * errout.ads: Document additional case of message deletion.
3427 * namet.adb (Is_Internal_Name): Refined to consider wide
3428 strings in brackets notation and character literals not to be
3430 * sem_ch8.adb (Find_Selected_Component): Give additional error
3431 when selector name is a subprogram whose first parameter has
3432 the same type as the prefix, but that type is untagged.
3434 2015-02-20 Robert Dewar <dewar@adacore.com>
3436 * g-allein.ads, g-alveop.adb, g-alveop.ads, opt.ads: Minor reformatting
3438 2015-02-20 Tristan Gingold <gingold@adacore.com>
3440 * opt.ads (GNAT_Mode_Config): New variable.
3441 * opt.adb (Set_Opt_Config_Switches): Consider GNAT_Mode_Config
3442 to set Assertions_Enabled.
3443 * switch-c.adb (Scan_Front_End_Switches): Set GNAT_Mode_Config
3446 2015-02-20 Robert Dewar <dewar@adacore.com>
3448 * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Add an additional
3449 comment regarding the handling of unterminated fixed-point
3451 * s-valuns.ads (Scan_Raw_Unsigned): Add comments
3452 corresponding to those previously added for
3453 System.Val_LLU.Scan_Raw_Long_Long_Unsigned.
3455 2015-02-20 Olivier Hainque <hainque@adacore.com>
3457 * g-allein.ads, g-alveop.ads, g-alveop.adb: Code clean ups.
3459 2015-02-20 Robert Dewar <dewar@adacore.com>
3461 * sem_prag.adb: Minor comment clarification.
3463 2015-02-20 Olivier Hainque <hainque@adacore.com>
3465 * g-allein.ads (vec_ctf, vec_vcsfx, vec_vcfux): Remove.
3466 * g-alleve.ads, g-alleva.adb (vcfux): Likewise.
3467 * g-alveop.ads (vec_vcfsx, vec_vcfux): Just rename the ll versions.
3468 (vec_ctf): Now renamings as well.
3470 2015-02-20 Robert Dewar <dewar@adacore.com>
3472 * switch-c.adb, bindgen.adb: Minor reformatting.
3474 2015-02-20 Ed Schonberg <schonberg@adacore.com>
3476 * sem_prag.adb (Analyze_Pragma, case Type_Invariant):
3477 Invariant'class is allowed on an abstract type.
3479 2015-02-20 Ed Schonberg <schonberg@adacore.com>
3481 * sem_ch3.adb (Access_Definition): If the access definition is
3482 for a protected component and defines an access to protected
3483 subprogram, do not create an itype reference for it because a
3484 full type declaration will be built in order to generate the
3485 proper equivalent type.
3486 (Analyze_Subtype_Declaration): Add information of incomplete
3487 subtypes, for Ada 2012 extended uses of incomplete types.
3489 2015-02-20 Gary Dismukes <dismukes@adacore.com>
3491 * sem_res.adb: Minor reformatting.
3493 2015-02-20 Vincent Celier <celier@adacore.com>
3495 * switch-c.adb (Scan_Front_End_Switches): When comparing runtime
3496 path name for several switches --RTS, use the normalized path
3499 2015-02-20 Vincent Celier <celier@adacore.com>
3501 * bindgen.adb: Minor reformatting and code reorganization.
3503 2015-02-20 Jose Ruiz <ruiz@adacore.com>
3505 * a-stcoed.ads: Add spec for this package (Unimplemented_Unit).
3506 * impunit.adb (Non_Imp_File_Names_12): Mark unit a-stcoed.ads as
3507 defined by Ada 2012.
3509 2015-02-20 Arnaud Charlet <charlet@adacore.com>
3511 * sysdep.c, expect.c, s-oscons-tmplt.c, gsocket.h, adaint.c: Remove
3512 obsolete references to RTX, nucleus, VMS.
3514 2015-02-20 Ed Schonberg <schonberg@adacore.com>
3516 * sem_prag.adb (Fix_Error): For an illegal Type_Invariant'Class
3517 aspect, use name that mentions Class explicitly, rather than
3518 compiler-internal name.
3520 2015-02-20 Robert Dewar <dewar@adacore.com>
3522 * debug.adb: Add documentation for -gnatd.2 (allow statements
3524 * par-ch3.adb (P_Identifier_Declarations): Handle
3525 statement appearing where declaration expected more cleanly.
3526 (Statement_When_Declaration_Expected): Implement debug flag
3529 2015-02-20 Jose Ruiz <ruiz@adacore.com>
3531 * a-dinopr.ads: Add spec for this package (Unimplemented_Unit).
3532 * a-dispat.ads (Yield): Include procedure added in Ada 2012.
3533 * a-dispat.adb (Yield): Implement procedure added in Ada 2012.
3534 * impunit.adb (Non_Imp_File_Names_05): Mark unit a-dinopr.ads as
3535 defined by Ada 2005.
3536 * snames.ads-tmpl (Name_Non_Preemptive_FIFO_Within_Priorities):
3537 This is the correct name for the dispatching policy (FIFO was
3540 2015-02-20 Javier Miranda <miranda@adacore.com>
3542 * sem_res.adb (Resolve_Type_Conversion): If the type of the
3543 operand is the limited-view of a class-wide type then recover
3544 the class-wide type of the non-limited view.
3546 2015-02-20 Arnaud Charlet <charlet@adacore.com>
3548 * gcc-interface/Makefile.in: Remove references to nucleus.
3549 * gcc-interface/decl.c (gnat_to_gnu_entity, case E_Procedure): Set
3550 extern_flag to true for Inline_Always subprograms with
3551 Intrinsic convention.
3553 2015-02-20 Yannick Moy <moy@adacore.com>
3555 * sem_prag.ads: Minor typo in comment.
3557 2015-02-20 Pascal Obry <obry@adacore.com>
3559 * s-osprim-mingw.adb: Fix Get_Base_Time parameter mode.
3561 2015-02-20 Vincent Celier <celier@adacore.com>
3563 * makeutl.adb (Get_Directories.Add_Dir): Add a directory only
3566 2015-02-20 Robert Dewar <dewar@adacore.com>
3568 * sem_eval.ads: Minor reformatting.
3570 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
3572 * freeze.adb (Size_Known): Do not set the packed size for
3573 independent type or component.
3574 (Freeze_Array_Type): Check for Independent[_Components] with packing
3575 or explicit component size clause.
3576 * gnat1drv.adb (Post_Compilation_Validation_Checks): Do the validation
3577 of independence pragmas only for non-GCC back-ends.
3578 * sem_ch13.adb (Initialize): Likewise for the initialization.
3579 * sem_prag.adb (Record_Independence_Check): New procedure to record an
3580 independence check in the table.
3581 (Analyze_Pragma): Use it throughout instead of doing it manually.
3582 * gcc-interface/decl.c (gnat_to_gnu_field): Add support for
3583 independent type or component.
3585 2015-02-20 Thomas Quinot <quinot@adacore.com>
3587 * adaint.c (__gnat_readdir): For Solaris, use 64 bit variants of
3588 struct direct and readdir. This is required for NFS filesystems
3589 mounted from servers that use 64-bit cookies.
3591 2015-02-20 Ed Schonberg <schonberg@adacore.com>
3593 * sem_ch12.adb (Analyze_Subprogram_Instantiaion): New subprogram
3594 Build_Subprogram_Renaming, to create renaming of subprogram
3595 instance in the the declaration of the wrapper package rather
3596 than in its body, so that it is available for analysis of aspects
3597 propagated from generic to instantiation.
3598 (Check_Mismatch): An actual for a formal package that is an
3599 incomplete type matches a formal type that is incomplete.
3600 (Instantiate_Package_Body): Move code that builds subprogram
3601 renaming to Analyze_Subprogram_Instantiation.
3602 (Instantiate_Type): The generated subtype is a limited view if
3603 the actual is a limited view.
3604 (Load_Parent_Of_Generic): Retrieve instance declaration from
3605 its new position within wrapper package.
3607 2015-02-20 Arnaud Charlet <charlet@adacore.com>
3609 * s-parame-vxworks.adb, s-os_lib.ads: Update comments.
3611 2015-02-20 Robert Dewar <dewar@adacore.com>
3613 * s-osinte-vxworks.ads (To_Timespec): Add comment about the
3614 issue of negative arguments.
3616 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
3618 * gnat1drv.adb: Minor consistency fix.
3620 2015-02-20 Pascal Obry <obry@adacore.com>
3622 * s-osprim-mingw.adb (Get_Base_Time): Properly release lock in all
3625 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
3627 * inline.adb (Expand_Inlined_Call): Skip again calls to subprogram
3629 * exp_ch6.adb (Expand_Call): Use back-end inlining
3630 instead of expansion for simple subprogram renamings.
3632 2015-02-20 Robert Dewar <dewar@adacore.com>
3634 * exp_util.adb: Minor reformatting.
3636 2015-02-20 Vincent Celier <celier@adacore.com>
3638 * switch-c.adb (Scan_Front_End_Switches): Do not fail when --RTS=
3639 is specified several times with different values that indicates
3640 the same runtime directory.
3642 2015-02-20 Ed Schonberg <schonberg@adacore.com>
3644 * sem_attr.adb (Check_Not_Incomplete_Type): Clean up code to
3645 handle properly illegal uses of attributes on prefixes on an
3646 incomplete type, both when the type of the prefix is locally
3647 incomplete, and when it is a limited view of a type whose
3648 non-limited view is not available.
3649 (Analyze_Attribute): Add calls to Check_Not_Incomplete_Type for
3650 'Address and others.
3652 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
3654 * exp_ch6.adb: Fix minor typo in comment.
3656 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
3658 * sinfo.ads: Add comment.
3660 2015-02-20 Olivier Hainque <hainque@adacore.com>
3662 * opt.ads: Replace Opt.Suppress_All_Inlining by two separate
3663 flags controlling the actual FE inlining out of pragma Inline
3664 and pragma Inline_Always.
3665 * adabkend.adb (Scan_Compiler_Arguments): Set both flags to True
3666 on -fno-inline, which disables all inlining in compilers with
3667 an Ada back-end and without back-end inlining support.
3668 * back_end.adb (Scan_Back_End_Switches): Set the Inline related
3669 flag to True on -fno-inline and leave Inline_Always alone for
3671 * back_end.ads (Scan_Compiler_Arguments): Adjust spec wrt the
3672 names of the Opt flags it sets.
3673 * gnat1drv.adb (Adjust_Global_Switches): Remove test on
3674 Opt.Suppress_All_Inlining in the Back_End_Inlining computation.
3675 * sem_prag.adb (Make_Inline): Remove early return conditioned
3676 on Opt.Suppress_All_Inlining.
3677 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Use the flags to
3678 disable the calls to Build_Body_To_Inline otherwise triggered
3679 by pragma Inline or Inline_Always. This will prevent actual
3680 front-end inlining of the subprogram on calls.
3682 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
3684 * exp_ch3.adb (Default_Initialize_Object): Call Add_Inlined_Body on the
3685 Abort_Undefer_Direct function.
3686 * exp_ch5.adb (Expand_N_Assignment_Statement): Likewise.
3687 * exp_intr.adb (Expand_Unc_Deallocation): Likewise.
3688 * exp_prag.adb (Expand_Pragma_Abort_Defer): Likewise.
3689 * exp_ch4.adb (Expand_N_Selected_Component): Adjust call to
3691 * exp_ch6.adb (Expand_Call): Adjust calls to Add_Inlined_Body.
3692 Remove call to Register_Backend_Call and move code resetting
3693 Needs_Debug_Info on inlined subprograms to...
3694 * inline.ads (Add_Inlined_Body): Add N parameter.
3695 (Register_Backend_Call): Delete.
3696 * inline.adb (Add_Inlined_Body): ...here and simplify.
3697 Register the call with Backend_Calls directly.
3698 (Register_Backend_Call): Delete.
3699 * s-stalib.ads (Abort_Undefer_Direct): Restore pragma Inline.
3701 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
3703 * s-stalib.ads: Fix typo.
3705 2015-02-20 Ed Schonberg <schonberg@adacore.com>
3707 * exp_ch3.adb (Default_Initialize_Object): If the object has a
3708 delayed freeze, the actions associated with default initialization
3709 must be part of the freeze actions, rather that being inserted
3710 directly after the object declaration.
3712 2015-02-20 Robert Dewar <dewar@adacore.com>
3714 * lib-load.adb: Minor comment update.
3716 2015-02-20 Vincent Celier <celier@adacore.com>
3718 * prj-proc.adb (Process_Case_Construction): When there are
3719 incomplete withed projects and the case variable is unknown,
3720 skip the case construction.
3722 2015-02-20 Ed Schonberg <schonberg@adacore.com>
3724 * exp_ch6.adb (Expand_Actuals): Add caller-side invariant checks
3725 when an actual is a view conversion, either because the call is
3726 to an inherited operation, or because the actual is an explicit
3727 type conversion to an ancestor type. Fixes ACATS 4.0D: C732001
3729 2015-02-20 Robert Dewar <dewar@adacore.com>
3731 * einfo.ads: Minor comment updates Fix missing pragma Inline
3732 for Set_Partial_View_Has_Unknown_Discr.
3733 * einfo.adb (Write_Entity_Flags): Add missing entry for
3734 Partial_View_Has_Unknown_Discr.
3735 * sem_ch3.adb: Minor reformatting.
3737 2015-02-20 Vincent Celier <celier@adacore.com>
3739 * opt.ads: Minor cleanup: remove mention of gprmake.
3740 * s-stalib.ads (Abort_Undefer_Direct): Do not inline.
3741 * s-tataat.adb: Do not call System.Tasking.Self but directly
3742 System.Task_Primitives.Operations.Self.
3744 2015-02-20 Arnaud Charlet <charlet@adacore.com>
3746 * gnat_rm.texi, gnat_ugn.texi: Now automatically generated from
3747 sphinx in the doc directory.
3748 * doc: New directory containing sphinx versions of gnat_rm and gnat_ugn
3750 2015-02-20 Robert Dewar <dewar@adacore.com>
3752 * sem_res.adb: Minor reformatting.
3753 * exp_ch9.adb (Build_Protected_Spec): Copy Aliased setting when
3755 * sem_ch13.adb (Analyze_Aspect_Specifications): Exclude Boolean
3756 aspects from circuitry setting delay required to false if the
3757 argument is an integer literal.
3759 2015-02-20 Ed Schonberg <schonberg@adacore.com>
3761 * einfo.ads. einfo.adb (Partial_View_Has_Unknown_Discr): New flag
3762 on type entities, to enforce AI12-0133: default initialization
3763 of types whose partial view has unknown discriminants does not
3764 get an invariant check, because clients of the unit can never
3765 declare objects of such types.
3766 * sem_ch3.adb (Find_Type_Name); Set new flag
3767 Partial_View_Has_Unknown_Discr when needed.
3768 * exp_ch3.adb (Expand_N_Object_Declaration): Use flag to suppress
3769 generation of invariant call on default-initialized object.
3771 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
3773 * gcc-interface/decl.c (gnat_to_gnu_param): Do not strip the padding
3774 if the parameter either is passed by reference or if the alignment
3777 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
3779 * gcc-interface/decl.c (is_cplusplus_method): Use Is_Primitive flag to
3780 detect primitive operations of tagged and untagged types.
3782 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
3784 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not bother about alias
3785 sets in presence of derivation for subprogram types.
3787 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
3789 * gcc-interface/utils.c (begin_subprog_body): Assert that the body is
3790 present in the same context as the declaration.
3792 2015-02-07 Jakub Jelinek <jakub@redhat.com>
3795 * gcc-interface/trans.c (gigi): Recreate optimization_default_node
3796 and optimization_current_node after tweaking global_options.
3798 2015-02-05 Robert Dewar <dewar@adacore.com>
3800 * prj-proc.adb, sem_aux.adb, exp_ch9.adb, errout.adb, prj-dect.adb,
3801 prj-nmsc.adb: Minor reformatting.
3803 2015-02-05 Ed Schonberg <schonberg@adacore.com>
3805 * sem_type.adb (Covers): In ASIS_Mode the Corresponding_Record
3806 of a protected type may not be available, so to check conformance
3807 with an interface type, examine the interface list in the type
3808 declaration directly.
3809 (Write_Overloads): Improve information for indirect calls,
3812 2015-02-05 Ed Schonberg <schonberg@adacore.com>
3814 * exp_ch3.adb (Make_Tag_Assignment): Do not perform this
3815 expansion activity in ASIS mode.
3817 2015-02-05 Javier Miranda <miranda@adacore.com>
3819 * errout.adb (Error_Msg_PT): Add missing error.
3820 * sem_ch6.adb (Check_Synchronized_Overriding): Check the missing
3821 RM rule. Code cleanup.
3822 * exp_ch9.adb (Build_Wrapper_Spec): Propagate "constant" in
3823 anonymous access types. Found working on the tests. Code cleanup.
3825 2015-02-05 Vincent Celier <celier@adacore.com>
3827 * prj-dect.adb (Parse_Attribute_Declaration): Continue scanning
3828 when there are incomplete withs.
3829 * prj-nmsc.adb (Process_Naming): Do not try to get the value
3830 of an element when it is nil.
3831 (Check_Naming): Do not check a nil suffix for illegality
3832 * prj-proc.adb (Expression): Do not process an empty term.
3833 * prj-strt.adb (Attribute_Reference): If attribute cannot be
3834 found, parse a possible index to avoid cascading errors.
3836 2015-02-05 Ed Schonberg <schonberg@adacore.com>
3838 * sem_aux.adb (Is_Derived_Type): A subprogram_type generated
3839 for an access_to_subprogram declaration is not a derived type.
3841 2015-02-05 Robert Dewar <dewar@adacore.com>
3843 * errout.adb (Error_Msg_Internal): For non-serious error set
3844 Fatal_Error to Ignored.
3845 * lib-load.adb (Load_Unit): Minor comment updates.
3846 * sem_ch10.adb (Analyze_With_Clause): Propagate Fatal_Error
3847 setting from with'ed unit to with'ing unit.
3848 * sem_prag.adb (Analyze_Pragma, case Warnings): Document handling
3851 2015-02-05 Yannick Moy <moy@adacore.com>
3853 * sem_prag.adb, par-prag.adb: Minor code clean up.
3855 2015-02-05 Yannick Moy <moy@adacore.com>
3857 * par-prag.adb (Pragma_Warnings): Update for extended form
3858 of pragma Warnings. The "one" argument case may now have 2 or
3860 * sem_prag.adb (Analyze_Pragma/Pragma_Warnings): Update for
3861 extended form of pragma Warnings. Pragma with tool name is either
3862 rewritten as null or as an equivalent form without tool name,
3864 * snames.ads-tmpl (Name_Gnatprove): New name.
3866 2015-02-05 Robert Dewar <dewar@adacore.com>
3868 * sem_ch13.adb (Add_Invariants): Don't assume invariant is
3870 * sem_prag.adb (Analyze_Pragma, case Check): Don't assume
3871 condition is standard Boolean, it can be non-standard derived
3874 2015-02-05 Robert Dewar <dewar@adacore.com>
3876 * checks.adb (Enable_Range_Check): Disconnect attempted
3877 optimization for the case of range check for subscript of
3878 unconstrained array.
3880 2015-02-05 Robert Dewar <dewar@adacore.com>
3882 * par-ch13.adb (With_Present): New function
3883 (Aspect_Specifications_Present): Handle WHEN in place of WITH
3884 (Get_Aspect_Specifications): Comment update.
3885 * par.adb: Comment updates.
3887 2015-02-05 Robert Dewar <dewar@adacore.com>
3889 * errout.adb (Handle_Serious_Error): New setting of Fatal_Error.
3890 * frontend.adb (Frontend): New setting of Fatal_Error.
3891 * lib-load.adb (Create_Dummy_Package_Unit): New setting of
3893 (Load_Main_Source): New setting of Fatal_Error
3894 (Load_Unit): New setting of Fatal_Error.
3895 * lib-writ.adb (Add_Preprocessing_Dependency): New setting of
3897 (Ensure_System_Dependency): New setting of Fatal_Error.
3898 * lib.adb (Fatal_Error): New setting of Fatal_Error
3899 (Set_Fatal_Error): New setting of Fatal_Error.
3900 * lib.ads: New definition of Fatal_Error and associated routines.
3901 * par-ch10.adb (P_Compilation_Unit): New setting of Fatal_Error.
3902 * par-load.adb (Load): New setting of Fatal_Error.
3903 * rtsfind.adb (Load_RTU): New setting of Fatal_Error.
3904 * sem_ch10.adb (Analyze_Compilation_Unit): New setting of
3906 (Optional_Subunit): New setting of Fatal_Error.
3907 (Analyze_Proper_Body): New setting of Fatal_Error.
3908 (Load_Needed_Body): New setting of Fatal_Error.
3910 2015-02-05 Ed Schonberg <schonberg@adacore.com>
3912 * sem_res.adb (Resolve_Call): If the function being called has
3913 out parameters do not check for language version if the function
3914 comes from a predefined unit, as those are always compiled in
3917 2015-02-05 Ed Schonberg <schonberg@adacore.com>
3919 * sem_ch3.adb (Process_Full_View): Verify that the full view
3920 of a type extension must carry an explicit limited keyword if
3921 the partial view does (RM 7.3 (10.1)).
3923 2015-02-05 Robert Dewar <dewar@adacore.com>
3925 * g-rannum.adb, g-rannum.ads, s-rannum.adb, s-rannum.ads,
3926 sem_warn.ads: Minor reformatting.
3927 * exp_ch13.adb (Expand_N_Freeze_Entity): Add guard for aspect
3929 * sem_prag.adb (Analyze_Pragma, case Type_Invariant): Give
3930 error for abstract type.
3932 2015-02-05 Yannick Moy <moy@adacore.com>
3934 * opt.ads (Warn_On_Suspicious_Contract): Update comment
3936 * sem_attr.adb (Analyze_Attribute/Attribute_Update): Warn on
3937 suspicious uses of 'Update.
3938 * sem_warn.adb, sem_warn.ads (Warn_On_Suspicious_Update): New
3939 function issues warning on suspicious uses of 'Update.
3940 * g-rannum.adb, g-rannum.ads, s-rannum.adb, s-rannum.ads: Mark
3941 package spec and body as SPARK_Mode Off.
3943 2015-02-05 Robert Dewar <dewar@adacore.com>
3945 * sem_prag.adb (Set_Elab_Unit_Name): New name for Set_Unit_Name
3946 (Analyze_Pragma): Change Set_Unit_Name to Set_Elab_Unit_Name
3947 (Set_Elab_Unit_Name): Generate reference for Elaborate[_All]
3948 * sem_warn.adb (Warn_On_Unreferenced_Entity): Suppress warning
3949 for exported entity.
3951 2015-02-05 Hristian Kirtchev <kirtchev@adacore.com>
3953 * sem_prag.adb (Check_Pragma_Conformance): Add
3954 local variable Arg. Ensure that all errors are associated with
3955 the pragma if it appears without an argument. Add comments on
3958 2015-02-05 Robert Dewar <dewar@adacore.com>
3960 * lib-xref.adb: Minor reformatting.
3962 2015-02-05 Tristan Gingold <gingold@adacore.com>
3965 * env.c: Fix thinko: handle Darwin case before default one.
3967 2015-01-30 Robert Dewar <dewar@adacore.com>
3969 * a-assert.adb: Minor reformatting.
3970 * sem_ch13.adb: Minor comment clarification.
3971 * types.ads: Minor comment update.
3972 * sem_eval.adb (Real_Or_String_Static_Predicate_Matches): Avoid blow up
3973 when we have a predicate that is nothing but an inherited dynamic
3976 2015-01-30 Jerome Guitton <guitton@adacore.com>
3978 * gcc-interface/Makefile.in (x86-vxworks): Update GCC_SPEC_FILES to
3979 include cert link spec.
3981 2015-01-30 Robert Dewar <dewar@adacore.com>
3983 * einfo.ads: Minor comment fix.
3984 * freeze.adb (Freeze_Profile): Add test for suspicious import
3986 * sem_prag.adb (Process_Import_Or_Interface): Test for suspicious
3987 use in Pure unit is now moved to Freeze (to properly catch
3988 Pure_Function exemption).
3990 2015-01-30 Bob Duff <duff@adacore.com>
3992 * sem_res.ads: Minor comment fix.
3993 * sem_type.adb: sem_type.adb (Remove_Conversions): Need to
3994 check both operands of an operator.
3996 2015-01-30 Yannick Moy <moy@adacore.com>
3998 * a-assert.ads, a-assert.adb: Mark package spec in SPARK. Set assertion
3999 policy for Pre to Ignore.
4000 (Assert): Add precondition.
4002 2015-01-30 Robert Dewar <dewar@adacore.com>
4004 * sem_prag.adb (Process_Import_Or_Interface): Warn if used in
4006 * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Clarify
4007 documentation for some special cases of invalid attempts at
4010 2015-01-30 Gary Dismukes <dismukes@adacore.com>
4012 * errout.ads: Minor reformatting.
4014 2015-01-30 Yannick Moy <moy@adacore.com>
4016 * inline.adb (Process_Formals): Use the sloc of
4017 the inlined node instead of the sloc of the actual parameter,
4018 when replacing formal parameters by the actual one.
4020 2015-01-30 Arnaud Charlet <charlet@adacore.com>
4022 * g-expect.adb (Get_Command_Output): Use infinite timeout when
4025 2015-01-30 Ed Schonberg <schonberg@adacore.com>
4027 * sem_ch12.adb (Analyze_Associations): If an in-parameter is
4028 defaulted in an instantiation, add an entry in the list of actuals
4029 to indicate the default value of the formal (as is already done
4030 for defaulted subprograms).
4032 2015-01-30 Javier Miranda <miranda@adacore.com>
4034 * errout.adb (Error_Msg_PT): Minor error phrasing update.
4036 2015-01-30 Robert Dewar <dewar@adacore.com>
4038 * sem_warn.adb (Warn_On_Known_Condition): Improve error message
4041 2015-01-30 Pierre-Marie de Rodat <derodat@adacore.com>
4043 * exp_dbug.adb (Get_Encoded_Name): When
4044 -fgnat-encodings=minimal, do not generate names for biased types.
4046 2015-01-30 Tristan Gingold <gingold@adacore.com>
4049 * env.c: Move vxworks and darwin includes out of #ifdef IN_RTS.
4051 2015-01-30 Gary Dismukes <dismukes@adacore.com>
4053 * freeze.adb: Minor reformatting.
4055 2015-01-30 Javier Miranda <miranda@adacore.com>
4057 * errout.ads (Error_Msg_PT): Replace Node_Id by Entity_Id and
4058 improve its documentation.
4059 * errout.adb (Error_Msg_PT): Improve the error message.
4060 * sem_ch6.adb (Check_Conformance): Update call to Error_Msg_PT.
4061 (Check_Synchronized_Overriding): Update call to Error_Msg_PT.
4062 * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup.
4064 2015-01-30 Robert Dewar <dewar@adacore.com>
4066 * sem_warn.adb (Warn_On_Known_Condition): Do special casing of
4067 message for False case.
4069 2015-01-30 Doug Rupp <rupp@adacore.com>
4071 * s-vxwext-kernel.ads (Task_Cont): Remove imported subprogram body.
4072 * s-vxwext-kernel.adb (Task_Cont): New subpprogram body specialized for
4075 2015-01-30 Gary Dismukes <dismukes@adacore.com>
4077 * sem_attr.adb (Declared_Within_Generic_Unit):
4078 New function to test whether an entity is declared within the
4079 declarative region of a given generic unit.
4080 (Resolve_Attribute): For checking legality of subprogram'Access within
4081 a generic unit, call new Boolean function Declared_Within_Generic_Unit
4082 instead of simply comparing the results of Enclosing_Generic_Unit on
4083 the prefix and access type. Correct minor comment typos.
4085 2015-01-30 Robert Dewar <dewar@adacore.com>
4087 * freeze.adb, exp_util.ads: Update comment.
4088 * exp_util.adb, exp_ch3.adb: Minor code reorganization and reformatting.
4089 * sem_util.adb: Minor: fix typo.
4091 2015-01-30 Hristian Kirtchev <kirtchev@adacore.com>
4093 * sem_attr.adb (Analyze_Attribute): Ensure that
4094 the check concerning Refined_Post takes precedence over the
4097 2015-01-30 Gary Dismukes <dismukes@adacore.com>
4099 * sem_prag.adb: Minor typo fixes and reformatting.
4101 2015-01-30 Yannick Moy <moy@adacore.com>
4103 * sem_attr.adb: Code clean up.
4105 2015-01-30 Robert Dewar <dewar@adacore.com>
4107 * ali.adb (Scan_ALI): Set Serious_Errors flag in Unit record.
4108 * ali.ads (Unit_Record): Add new field Serious_Errors.
4109 * lib-writ.adb (Write_Unit_Information): Set SE (serious errors)
4110 attribute in U line.
4111 * lib-writ.ads: New attribute SE (serious erors) in unit line.
4113 2015-01-30 Hristian Kirtchev <kirtchev@adacore.com>
4115 * einfo.adb Update the usage of attributes Entry_Bodies_Array,
4116 Lit_Indexes, Scale_Value, Storage_Size_Variable,
4117 String_Literal_Low_Bound along associated routines and
4119 (Pending_Access_Types): New routine.
4120 (Set_Pending_Access_Types): New routine.
4121 (Write_Field15_Name): Add an entry for Pending_Access_Types.
4122 * einfo.ads Add new attribute Pending_Access_Types along
4123 with usage in nodes. Update the usage of attributes
4124 Entry_Bodies_Array, Lit_Indexes, Scale_Value,
4125 Storage_Size_Variable, String_Literal_Low_Bound.
4126 (Pending_Access_Types): New routine along with pragma Inline.
4127 (Set_Pending_Access_Types): New routine along with pragma Inline.
4128 * exp_ch3.adb (Expand_Freeze_Array_Type): Add new local variable
4129 Ins_Node. Determine the insertion node for anonynous access type
4130 that acts as a component type of an array. Update the call to
4131 Build_Finalization_Master.
4132 (Expand_Freeze_Record_Type): Update
4133 the calls to Build_Finalization_Master.
4134 (Freeze_Type): Remove
4135 local variable RACW_Seen. Factor out the code that deals with
4136 remote access-to-class-wide types. Create a finalization master
4137 when the designated type contains a private component. Fully
4138 initialize all pending access types.
4139 (Process_RACW_Types): New routine.
4140 (Process_Pending_Access_Types): New routine.
4141 * exp_ch4.adb (Expand_Allocator_Expression): Allocation no longer
4142 needs to set primitive Finalize_Address.
4143 (Expand_N_Allocator): Allocation no longer sets primitive
4145 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
4146 Update the call to Build_Finalization_Master.
4147 (Make_Build_In_Place_Call_In_Allocator): Allocation no longer
4148 needs to set primitive Finalize_Address.
4149 * exp_ch7.adb (Add_Pending_Access_Type): New routine.
4150 (Build_Finalization_Master): New parameter profile. Associate
4151 primitive Finalize_Address with the finalization master if the
4152 designated type has been frozen, otherwise treat the access
4153 type as pending. Simplify the insertion of the master and
4154 related initialization code.
4155 (Make_Finalize_Address_Body): Allow Finalize_Address for class-wide
4157 (Make_Set_Finalize_Address_Call): Remove forlam parameter Typ.
4158 Simplify the implementation.
4159 * exp_ch7.ads (Build_Finalization_Master): New parameter profile
4160 along with comment on usage.
4161 (Make_Set_Finalize_Address_Call): Remove formal parameter Typ. Update
4162 the comment on usage.
4163 * exp_util.adb (Build_Allocate_Deallocate_Proc): Use routine
4164 Finalize_Address to retrieve the primitive.
4165 (Finalize_Address): New routine.
4166 (Find_Finalize_Address): Removed.
4167 * exp_util.ads (Finalize_Address): New routine.
4168 * freeze.adb (Freeze_All): Remove the generation of finalization
4170 * sem_ch3.adb (Analyze_Full_Type_Declaration): Propagate any
4171 pending access types from the partial to the full view.
4173 2015-01-30 Robert Dewar <dewar@adacore.com>
4175 * sem_disp.adb: Minor reformatting.
4176 * sem_disp.ads: Documentation update.
4178 2015-01-30 Ed Schonberg <schonberg@adacore.com>
4180 * sem_disp.adb (Is_Dynamically_Tagged): when applied to an entity
4181 or a function call, return True if type is class-wide.
4182 * sem_res.adb (Resolve_Case_Expression, Resolve_If_Expression);
4183 Apply RM 4.5.7 (17/3): all or none of the dependent expression
4184 of a conditional expression must be dynamically tagged.
4186 2015-01-30 Ed Schonberg <schonberg@adacore.com>
4188 * sem_ch6.adb (Analyze_Function_Return): In an extended return
4189 statement, apply accessibility check to result object when there
4190 is no initializing expression (Ada 2012 RM 6.5 (5.4/3))
4192 2015-01-30 Robert Dewar <dewar@adacore.com>
4194 * sem_ch4.adb (Analyze_If_Expression): Allow for non-standard
4195 Boolean for case where ELSE is omitted.
4196 * sem_res.adb: Minor reformatting.
4198 2015-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
4200 Fix build under cygwin/64.
4201 * adaint.h: Add check for __CYGWIN__.
4202 * mingw32.h: Prevent windows.h from including x86intrin.h in GCC.
4204 2015-01-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
4207 * adaint.c: Handle __CYGWIN__ like __MINGW32__ here.
4208 * mingw32.h: Don't include <tchar.h> under cygwin.
4209 (_O_U8TEXT, _O_U16TEXT, _O_WTEXT): Set to _O_TEXT if not yet defined.
4211 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
4213 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8)
4214 (DEF_FUNCTION_TYPE_VAR_12): New macros.
4216 2015-01-09 Michael Collison <michael.collison@linaro.org>
4218 * gcc-interface/cuintp.c: Include hash-set.h, machmode.h,
4219 vec.h, double-int.h, input.h, alias.h, symtab.h,
4220 fold-const.h, wide-int.h, and inchash.h due to
4221 flattening of tree.h.
4222 * gcc-interface/decl.c: Ditto.
4223 * gcc-interface/misc.c: Ditto.
4224 * gcc-interface/targtyps.c: Include hash-set.h, machmode.h,
4225 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h,
4226 fold-const.h, wide-int.h, and inchash.h due to
4227 flattening of tree.h.
4228 * gcc-interface/trans.c: Include hash-set.h, machmode.h,
4229 vec.h, double-int.h, input.h, alias.h, symtab.h, real.h,
4230 fold-const.h, wide-int.h, inchash.h due to
4231 flattening of tree.h.
4232 * gcc-interface/utils.c: Include hash-set.h, machmode.h,
4233 vec.h, double-int.h, input.h, alias.h, symtab.h,
4234 fold-const.h, wide-int.h, and inchash.h due to
4235 flattening of tree.h.
4236 * gcc-interface/utils2.c: Ditto.
4238 2015-01-07 Robert Dewar <dewar@adacore.com>
4240 * sem_warn.adb (Check_One_Unit): Don't give unused entities
4241 warning for a package which is used as a generic parameter.
4243 2015-01-07 Bob Duff <duff@adacore.com>
4245 * usage.adb (Usage): Correct documentation of
4248 2015-01-07 Robert Dewar <dewar@adacore.com>
4250 * s-fileio.adb: Minor reformatting.
4252 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4254 * sem_ch12.adb (Instantiate_Object): If formal is an anonymous
4255 access to subprogram, replace its formals with new entities when
4256 building the object declaration, both if actual is present and
4257 when it is defaulted.
4259 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4261 * sem_ch5.adb (Analyze_Assignment): If left-hand side is a view
4262 conversion and type of expression has invariant, apply invariant
4263 check on expression.
4265 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4267 * sem_ch3.adb (Create_Constrained_Components): A call to
4268 Gather_Components may detect an error if an inherited discriminant
4269 that controls a variant is non-static.
4270 * sem_aggr.adb (Resolve_Record_Aggregate, Step 5): The call to
4271 Gather_Components may report an error if an inherited discriminant
4272 in a variant in non-static.
4273 * sem_util.adb (Gather_Components): If a non-static discriminant
4274 is inherited do not report error here, but let caller handle it.
4275 (Find_Actual): Small optimization.
4277 2015-01-07 Bob Duff <duff@adacore.com>
4279 * usage.adb (Usage): Document -gnatw.f switch.
4281 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4283 * sem_ch12.adb: Code clean up and minor reformatting.
4285 2015-01-07 Robert Dewar <dewar@adacore.com>
4287 * exp_ch4.adb (Expand_N_Type_Conversion): Add guard for
4288 Raise_Accessibility_Error call.
4289 * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Add documentation
4290 on handling of invalid digits in based constants.
4291 * s-fatgen.ads: Minor reformatting.
4292 * sem_attr.adb (Analyze_Attribute, case Unrestricted_Access):
4293 Avoid noting bogus modification for Valid test.
4294 * snames.ads-tmpl (Name_Attr_Long_Float): New Name.
4295 * einfo.ads: Minor reformatting.
4296 * sem_warn.adb: Minor comment clarification.
4297 * sem_ch12.adb: Minor reformatting.
4299 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4301 * exp_ch5.adb (Expand_Predicated_Loop): Handle properly loops
4302 over static predicates when the loop parameter specification
4303 carries a Reverse indicator.
4305 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4307 * sem_ch12.adb (Instantiate_Object): If formal has a default,
4308 actual is missing and formal has an anonymous access type, copy
4309 access definition in full so that tree for instance is properly
4310 formatted for ASIS use.
4312 2015-01-07 Bob Duff <duff@adacore.com>
4314 * sem_elab.adb (Check_Internal_Call_Continue): Give a warning
4315 for P'Access, where P is a subprogram in the same package as
4316 the P'Access, and the P'Access is evaluated at elaboration
4317 time, and occurs before the body of P. For example, "X : T :=
4318 P'Access;" would allow a subsequent call to X.all to be an
4319 access-before-elaboration error; hence the warning. This warning
4320 is enabled by the -gnatw.f switch.
4321 * opt.ads (Warn_On_Elab_Access): New flag for warning switch.
4322 * warnsw.adb (Set_Dot_Warning_Switch): Set Warn_On_Elab_Access.
4323 * gnat_ugn.texi: Document the new warning.
4325 2015-01-07 Johannes Kanig <kanig@adacore.com>
4327 * lib-xref-spark_specific.adb (Collect_SPARK_Xrefs): Skip unneeded
4330 2015-01-07 Robert Dewar <dewar@adacore.com>
4332 * s-taprop-linux.adb, clean.adb: Minor reformatting.
4334 2015-01-07 Arnaud Charlet <charlet@adacore.com>
4336 * s-tassta.adb: Relax some overzealous assertions.
4338 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4340 * sem_ch6.adb (Analyze_Return_Type): An call that returns a limited
4341 view of a type is legal when context is a thunk generated for
4342 operation inherited from an interface.
4343 * exp_ch6.adb (Expand_Simple_Function_Return): If context is
4344 a thunk and return type is an incomplete type do not continue
4345 expansion; thunk will be fully elaborated when generating code.
4347 2015-01-07 Doug Rupp <rupp@adacore.com>
4349 * s-osinte-mingw.ads (LARGE_INTEGR): New subtype.
4350 (QueryPerformanceFrequency): New imported procedure.
4351 * s-taprop-mingw.adb (RT_Resolution): Call above and return
4352 resolution vice a hardcoded value.
4353 * s-taprop-solaris.adb (RT_Resolution): Call clock_getres and return
4354 resolution vice a hardcoded value.
4355 * s-linux-android.ads (clockid_t): New subtype.
4356 * s-osinte-aix.ads (clock_getres): New imported subprogram.
4357 * s-osinte-android.ads (clock_getres): Likewise.
4358 * s-osinte-freebsd.ads (clock_getres): Likewise.
4359 * s-osinte-solaris-posix.ads (clock_getres): Likewise.
4360 * s-osinte-darwin.ads (clock_getres): New subprogram.
4361 * s-osinte-darwin.adb (clock_getres): New subprogram.
4362 * thread.c (__gnat_clock_get_res) [__APPLE__]: New function.
4363 * s-taprop-posix.adb (RT_Resolution): Call clock_getres to
4364 calculate resolution vice hard coded value.
4366 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4368 * exp_util.adb (Make_CW_Equivalent_Type): If root type is a
4369 limited view, use non-limited view when available to create
4370 equivalent record type.
4372 2015-01-07 Vincent Celier <celier@adacore.com>
4374 * gnatcmd.adb: Remove command Sync and any data and processing
4375 related to this command. Remove project processing for gnatstack.
4376 * prj-attr.adb: Remove package Synchonize and its attributes.
4378 2015-01-07 Vincent Celier <celier@adacore.com>
4380 * clean.adb: Minor error message change.
4382 2015-01-07 Tristan Gingold <gingold@adacore.com>
4385 * env.c (__gnat_environ): Adjust for darwin9/darwin10.
4387 2015-01-07 Javier Miranda <miranda@adacore.com>
4389 * sem_ch10.adb (Analyze_With_Clause): Compiling under -gnatq
4390 protect the frontend against never ending recursion caused by
4391 circularities in the sources.
4393 2015-01-07 Robert Dewar <dewar@adacore.com>
4395 * a-reatim.adb, make.adb, exp_pakd.adb, i-cpoint.adb, sem_ch8.adb,
4396 exp_ch3.adb: Minor reformatting.
4398 2015-01-07 Doug Rupp <rupp@adacore.com>
4400 * s-linux.ads (clockid_t): New subtype.
4401 * s-osinte-linux.ads (pragma Linker Options): Add -lrt.
4402 (clockid_t): New subtype.
4403 (clock_getres): Import system call.
4404 * s-taprop-linux.adb (System.OS_Constants): With and rename.
4405 (RT_Resolution): Remove
4406 hardcoded value and call clock_getres.
4407 * s-linux-sparc.ads, s-linux-mipsel.ads, s-linux-hppa.ads,
4408 s-linux-alpha.ads, s-linux-x32.ads (clockid_t): Add new subtype.
4410 2015-01-07 Robert Dewar <dewar@adacore.com>
4412 * sem_warn.adb (Check_One_Unit): Guard against context item
4413 with no Entity field.
4415 2015-01-07 Vincent Celier <celier@adacore.com>
4417 * clean.adb (Gnatclean): Warn that 'gnatclean -P' is obsolete.
4418 * make.adb (Initialize): Warn that 'gnatmake -P' is obsolete.
4420 2015-01-07 Vincent Celier <celier@adacore.com>
4422 * prj-conf.adb (Parse_Project_And_Apply_Config): Always finalize
4423 errors/warnings in the first parsing of the project files,
4424 to display the warnings when there is no errors.
4426 2015-01-07 Tristan Gingold <gingold@adacore.com>
4428 * i-cpoint.adb (Copy_Terminated_Array): Nicely handle null target.
4430 2015-01-07 Doug Rupp <rupp@adacore.com>
4432 * s-taprop-vxworks.adb (Stop_All_Tasks): Pass return
4433 value from Int_Lock as parameter to Int_Unlock.
4434 * s-osinte-vxworks.ads (Int_Unlock): Add parameter.
4435 * s-vxwext.ads (Int_Unlock): Likewise.
4436 * s-vxwext-kernel.adb (intUnlock, Int_Unlock): Likewise.
4437 * s-vxwext-kernel.ads (Int_Unlock): Likewise.
4438 * s-vxwext-rtp.adb (Int_Unlock): Likewise.
4439 * s-vxwext-rtp.ads (Int_Unlock): Likewise.
4441 2015-01-07 Pierre-Marie de Rodat <derodat@adacore.com>
4443 * exp_pakd.adb: Add a comment in exp_pakd.adb to explain why we
4446 2015-01-07 Tristan Gingold <gingold@adacore.com>
4448 * i-cpoint.adb (Copy_Terminated_Array): Use Copy_Array to
4451 2015-01-07 Eric Botcazou <ebotcazou@adacore.com>
4453 * sem_ch3.adb (Analyze_Full_Type_Declaration): Do not
4454 automatically set No_Strict_Aliasing on access types.
4455 * fe.h (No_Strict_Aliasing_CP): Declare.
4456 * gcc-interface/trans.c (gigi): Force flag_strict_aliasing to 0 if
4457 No_Strict_Aliasing_CP is set.
4459 2015-01-07 Johannes Kanig <kanig@adacore.com>
4461 * sem_ch8.adb (Analyze_Subprogram_Renaming) do
4462 not build function wrapper in gnatprove mode when the package
4463 is externally axiomatized.
4465 2015-01-07 Jose Ruiz <ruiz@adacore.com>
4467 * a-reatim.adb (Time_Of): Reduce the number of spurious overflows in
4468 intermediate computations when the parameters have different signs.
4470 2015-01-07 Javier Miranda <miranda@adacore.com>
4472 * exp_ch3.adb (Build_Init_Procedure): For derived types,
4473 improve the code which takes care of identifying and moving to
4474 the beginning of the init-proc the call to the init-proc of the
4477 2015-01-07 Olivier Hainque <hainque@adacore.com>
4479 * gcc-interface/trans.c (gnat_to_gnu, <N_Expression_With_Action>):
4480 Elaborate the expression as part of the same stmt group as the actions.
4482 2015-01-07 Robert Dewar <dewar@adacore.com>
4484 * sem_ch3.adb: Minor error message change.
4486 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4488 * sem_prag.adb (Analyze_Pragma, case Preelaborable_Initialization):
4489 Following AI05-028, the pragam applies legally to any composite type.
4491 2015-01-07 Arnaud Charlet <charlet@adacore.com>
4493 * s-osinte-vxworks.adb, s-osinte-vxworks.ads
4494 (sigwait, sigwaitinfo): Removed, not needed after all on any
4495 VxWorks configurations.
4497 2015-01-07 Robert Dewar <dewar@adacore.com>
4499 * sem_ch3.adb, freeze.adb, exp_disp.adb: Minor reformatting.
4501 2015-01-07 Javier Miranda <miranda@adacore.com>
4503 * exp_disp.adb (Expand_Interface_Conversion): Adding missing
4504 generation of accessibility check.
4506 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4508 * sem_ch3.adb (Derived_Type_Declaration): In the case of an
4509 illegal completion from a class- wide type, set etype of the
4510 derived type properly to prevent cascaded errors.
4512 2015-01-07 Robert Dewar <dewar@adacore.com>
4514 * prj.ads, i-cpoint.adb, freeze.adb, ghost.adb, prj-err.adb: Minor
4517 2015-01-07 Robert Dewar <dewar@adacore.com>
4519 * restrict.adb (Check_Restriction_No_Use_Of_Attribute):
4521 (OK_No_Use_Of_Entity_Name): New function.
4522 (Set_Restriction_No_Use_Of_Entity): New procedure.
4523 * restrict.ads (Check_Restriction_No_Use_Of_Attribute):
4525 (OK_No_Use_Of_Entity_Name): New function.
4526 (Set_Restriction_No_Use_Of_Entity): New procedure.
4527 * sem_ch8.adb (Find_Direct_Name): Add check for violation of
4529 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
4530 Add processing for new restriction No_Use_Of_Entity.
4532 2015-01-07 Eric Botcazou <ebotcazou@adacore.com>
4534 * freeze.adb (Freeze_Array_Type): Apply same handling to Is_Atomic
4535 component type as to Has_Atomic_Components type. Remove useless
4536 test on Is_Aliased component type.
4538 2015-01-07 Hristian Kirtchev <kirtchev@adacore.com>
4540 * alloc.ads Alphabetize several declarations. Add constants
4541 Ignored_Ghost_Units_Initial and Ignored_Ghost_Units_Increment.
4542 * atree.adb Add with and use clauses for Opt.
4543 (Allocate_Initialize_Node): Mark a node as ignored Ghost
4544 if it is created in an ignored Ghost region.
4545 (Ekind_In): New variant.
4546 (Is_Ignored_Ghost_Node): New routine.
4547 (Set_Is_Ignored_Ghost_Node): New routine.
4548 * atree.adb Aplhabetize several subprograms declarations. Flag
4549 Spare0 is now known as Is_Ignored_Ghost_Node.
4550 (Ekind_In): New variant.
4551 (Is_Ignored_Ghost_Node): New routine.
4552 (Set_Is_Ignored_Ghost_Node): New routine.
4553 * einfo.adb: Flag 279 is now known as Contains_Ignored_Ghost_Code.
4554 (Contains_Ignored_Ghost_Code): New routine.
4555 (Set_Contains_Ignored_Ghost_Code): New routine.
4556 (Set_Is_Checked_Ghost_Entity, Set_Is_Ignored_Ghost_Entity):
4557 It is now possible to set this property on an unanalyzed entity.
4558 (Write_Entity_Flags): Output the status of flag
4559 Contains_Ignored_Ghost_Code.
4560 * einfo.ads New attribute Contains_Ignored_Ghost_Code along with
4562 (Contains_Ignored_Ghost_Code): New routine
4563 along with pragma Inline.
4564 (Set_Contains_Ignored_Ghost_Code): New routine along with pragma Inline.
4565 * exp_ch3.adb Add with and use clauses for Ghost.
4566 (Freeze_Type): Capture/restore the value of Ghost_Mode on entry/exit.
4567 Set the Ghost_Mode in effect.
4568 (Restore_Globals): New routine.
4569 * exp_ch7.adb (Process_Declarations): Do not process a context
4570 that invoves an ignored Ghost entity.
4571 * exp_dbug.adb (Qualify_All_Entity_Names): Skip an ignored Ghost
4572 construct that has been rewritten as a null statement.
4573 * exp_disp.adb Add with and use clauses for Ghost.
4574 (Make_DT): Capture/restore the value of Ghost_Mode on entry/exit. Set
4575 the Ghost_Mode in effect.
4576 (Restore_Globals): New routine.
4577 * exp_util.adb (Requires_Cleanup_Actions): An ignored Ghost entity
4578 does not require any clean up. Add two missing cases that deal
4579 with block statements.
4580 * freeze.adb Add with and use clauses for Ghost.
4581 (Freeze_Entity): Capture/restore the value of Ghost_Mode on entry/exit.
4582 Set the Ghost_Mode in effect.
4583 (Restore_Globals): New routine.
4584 * frontend.adb Add with and use clauses for Ghost. Remove any
4585 ignored Ghost code from all units that qualify.
4586 * ghost.adb New unit.
4587 * ghost.ads New unit.
4588 * gnat1drv.adb Add with clause for Ghost. Initialize and lock
4589 the table in package Ghost.
4590 * lib.ads: Alphabetize several subprogram declarations.
4591 * lib-xref.adb (Output_References): Do not generate reference
4592 information for ignored Ghost entities.
4593 * opt.ads Add new type Ghost_Mode_Type and new global variable
4595 * rtsfind.adb (Load_RTU): Provide a clean environment when
4596 loading a runtime unit.
4597 * sem.adb (Analyze): Capture/restore the value of Ghost_Mode on
4598 entry/exit as the node may set a different mode.
4600 Capture/restore the value of Ghost_Mode on entry/exit as the
4601 unit may be withed from a unit with a different Ghost mode.
4602 * sem_ch3.adb Add with and use clauses for Ghost.
4603 (Analyze_Full_Type_Declaration, Analyze_Incomplete_Type_Decl,
4604 Analyze_Number_Declaration, Analyze_Private_Extension_Declaration,
4605 Analyze_Subtype_Declaration): Set the Ghost_Mode in effect. Mark
4606 the entity as Ghost when there is a Ghost_Mode in effect.
4607 (Array_Type_Declaration): The implicit base type inherits the
4608 "ghostness" from the array type.
4609 (Derive_Subprogram): The
4610 alias inherits the "ghostness" from the parent subprogram.
4611 (Make_Implicit_Base): The implicit base type inherits the
4612 "ghostness" from the parent type.
4613 * sem_ch5.adb Add with and use clauses for Ghost.
4614 (Analyze_Assignment): Set the Ghost_Mode in effect.
4615 * sem_ch6.adb Add with and use clauses for Ghost.
4616 (Analyze_Abstract_Subprogram_Declaration, Analyze_Procedure_Call,
4617 Analyze_Subprogram_Body_Helper, Analyze_Subprogram_Declaration):
4618 Set the Ghost_Mode in effect. Mark the entity as Ghost when
4619 there is a Ghost_Mode in effect.
4620 * sem_ch7.adb Add with and use clauses for Ghost.
4621 (Analyze_Package_Body_Helper, Analyze_Package_Declaration,
4622 Analyze_Private_Type_Declaration): Set the Ghost_Mode in
4623 effect. Mark the entity as Ghost when there is a Ghost_Mode
4625 * sem_ch8.adb Add with and use clauses for Ghost.
4626 (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
4627 Analyze_Object_Renaming, Analyze_Package_Renaming,
4628 Analyze_Subprogram_Renaming): Set the Ghost_Mode in effect. Mark
4629 the entity as Ghost when there is a Ghost_Mode in effect.
4630 (Find_Type): Check the Ghost context of a type.
4631 * sem_ch11.adb Add with and use clauses for Ghost.
4632 (Analyze_Exception_Declaration): Set the Ghost_Mode in
4633 effect. Mark the entity as Ghost when there is a Ghost_Mode
4635 * sem_ch12.adb Add with and use clauses for Ghost.
4636 (Analyze_Generic_Package_Declaration,
4637 Analyze_Generic_Subprogram_Declaration): Set the Ghost_Mode in effect.
4638 Mark the entity as Ghost when there is a Ghost_Mode in effect.
4639 * sem_prag.adb Add with and use clauses for Ghost.
4640 (Analyze_Pragma): Ghost-related checks are triggered when there
4641 is a Ghost mode in effect.
4642 (Create_Abstract_State): Mark the
4643 entity as Ghost when there is a Ghost_Mode in effect.
4644 * sem_res.adb Add with and use clauses for Ghost.
4645 (Check_Ghost_Context): Removed.
4646 * sem_util.adb (Check_Ghost_Completion): Removed.
4647 (Check_Ghost_Derivation): Removed.
4648 (Incomplete_Or_Partial_View):
4649 Add a guard in case the entity has not been analyzed yet
4650 and does carry a scope.
4651 (Is_Declaration): New routine.
4652 (Is_Ghost_Entity): Removed.
4653 (Is_Ghost_Statement_Or_Pragma):
4655 (Is_Subject_To_Ghost): Removed.
4656 (Set_Is_Ghost_Entity):
4658 (Within_Ghost_Scope): Removed.
4659 * sem_util.adb (Check_Ghost_Completion): Removed.
4660 (Check_Ghost_Derivation): Removed.
4661 (Is_Declaration): New routine.
4662 (Is_Ghost_Entity): Removed.
4663 (Is_Ghost_Statement_Or_Pragma): Removed.
4664 (Is_Subject_To_Ghost): Removed.
4665 (Set_Is_Ghost_Entity): Removed.
4666 (Within_Ghost_Scope): Removed.
4667 * sinfo.ads Add a section on Ghost mode.
4668 * treepr.adb (Print_Header_Flag): New routine.
4669 (Print_Node_Header): Factor out code. Output flag
4670 Is_Ignored_Ghost_Node.
4671 * gcc-interface/Make-lang.in: Add dependency for unit Ghost.
4673 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
4675 * freeze.adb (Freeze_Array_Type) <Complain_CS>: Remove always
4676 true test and unreachable 'else' arm.
4678 2015-01-06 Vincent Celier <celier@adacore.com>
4680 * prj-conf.adb (Check_Target): Improve error message when
4681 there are mismatched targets between the on in the configuration
4682 project file and the specified one, either in the main project
4683 file or in the --target= switch.
4685 2015-01-06 Pascal Obry <obry@adacore.com>
4687 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Mode and
4688 Install_Name attribute definitions.
4690 2015-01-06 Ed Schonberg <schonberg@adacore.com>
4692 * freeze.adb (Wrap_Imported_Subprogram): Indicate that the
4693 generated Import pragma for the internal imported procedure does
4694 not come from an aspect, so that Is_Imported can be properly
4697 2015-01-06 Gary Dismukes <dismukes@adacore.com>
4699 * sem_ch12.adb (Might_Inline_Subp): Record whether
4700 any subprograms in the generic package are marked with
4701 pragma Inline_Always (setting flag Has_Inline_Always).
4702 (Analyze_Package_Instantiation): Add test of Has_Inline_Always
4703 alongside existing test of Front_End_Inlining as alternative
4704 conditions for setting Inline_Now. Also add test of
4705 Has_Inline_Always along with Front_End_Inlining test as an
4706 alternative condition for setting Needs_Body to False.
4708 2015-01-06 Tristan Gingold <gingold@adacore.com>
4710 * i-cpoint.adb (Copy_Array): Handle overlap.
4712 2015-01-06 Pascal Obry <obry@adacore.com>
4714 * bindgen.adb: Minor style fix.
4716 2015-01-06 Robert Dewar <dewar@adacore.com>
4718 * sem_util.ads, sem_util.adb: Minor reformatting.
4720 2015-01-06 Vincent Celier <celier@adacore.com>
4722 * prj-conf.adb (Parse_Project_And_Apply_Config): Reset incomplete
4723 with flags before parsing the projects.
4724 * prj-err.adb (Error_Msg): Do nothing if there are incomplete withs.
4725 * prj-part.adb (Post_Parse_Context_Clause): Set Incomplete_Withs
4726 to True in the flags, when Ignore_Missing_With is True and an
4727 imported project cannot be found.
4728 * prj-proc.adb (Expression): When there are incomplete withs and
4729 a variable or attribute is not found, set the variable/attribute
4731 * prj.ads (Processing_Flags): New flag Incomplete_Withs,
4734 2015-01-06 Vasiliy Fofanov <fofanov@adacore.com>
4736 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-conf.adb,
4737 prj-err.adb: Add new switch --no-command-line.
4739 2015-01-06 Ed Schonberg <schonberg@adacore.com>
4741 * sem_ch12.adb: Sloc of wrapper is that of instantiation.
4743 2015-01-06 Robert Dewar <dewar@adacore.com>
4745 * sem_ch11.adb: Minor reformatting.
4747 2015-01-06 Ed Schonberg <schonberg@adacore.com>
4749 * exp_aggr.adb (Get_Assoc_Expr): New routine internal to
4750 Build_Array_Aggr_Code, used to initialized components covered
4751 by a box association. If the component type is scalar and has
4752 a default aspect, use it to initialize such components.
4754 2015-01-06 Pascal Obry <obry@adacore.com>
4756 * rtinit.c (__gnat_runtime_initialize): Add a parameter to
4757 control the setup of the exception handler.
4758 * initialize.c: Remove unused declaration.
4759 * bindgen.adb: Always call __gnat_runtime_initialize and pass
4760 whether the exeception handler must be set or not.
4762 2015-01-06 Thomas Quinot <quinot@adacore.com>
4764 * freeze.adb (Set_SSO_From_Defaults): When setting scalar storage
4765 order to native from default, make sure to also adjust bit order.
4766 * exp_aggr.adb: Minor reformatting.
4768 2015-01-06 Robert Dewar <dewar@adacore.com>
4770 * s-valllu.adb, s-valllu.ads, s-valuti.ads, s-valuns.adb, s-valuns.ads,
4771 s-valrea.adb, s-valrea.ads: Add some additional guards for
4772 Str'Last = Positive'Last.
4774 2015-01-06 Ed Schonberg <schonberg@adacore.com>
4776 * sem_ch12.adb, sem_ch8.adb: Ongoing work for wrappers for actual
4779 2015-01-06 Javier Miranda <miranda@adacore.com>
4781 * exp_disp.adb (Expand_Interface_Conversion): Reapply patch.
4783 2015-01-06 Thomas Quinot <quinot@adacore.com>
4785 * sem_util.ads: Minor reformatting.
4786 * sem_cat.adb (In_RCI_Visible_Declarations): Change back to...
4787 (In_RCI_Declaration) Return to old name, as proper checking of
4788 entity being in the visible part depends on entity kind and must
4789 be done by the caller.
4791 2015-01-06 Ed Schonberg <schonberg@adacore.com>
4793 * sem_ch12.adb, sem_ch12.ads, sem_ch8.adb: Ongoing work for wrappers
4794 for operators in SPARK.
4796 2015-01-06 Ed Schonberg <schonberg@adacore.com>
4798 * sem_aggr.adb (Get_Value): In ASIS mode, preanalyze the
4799 expression in an others association before making copies for
4800 separate resolution and accessibility checks. This ensures that
4801 the type of the expression is available to ASIS in all cases,
4802 in particular if the expression is itself an aggregate.
4804 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
4806 * einfo.ads (Has_Independent_Components): Document extended
4808 * einfo.adb (Has_Independent_Components): Remove obsolete assertion.
4809 (Set_Has_Independent_Components): Adjust assertion.
4810 * sem_prag.adb (Analyze_Pragma): Also set Has_Independent_Components
4811 for pragma Atomic_Components. Set Has_Independent_Components
4812 on the object instead of the type for an object declaration with
4813 pragma Independent_Components.
4815 2015-01-06 Olivier Hainque <hainque@adacore.com>
4817 * set_targ.adb (Read_Target_Dependent_Values): Set
4818 Long_Double_Index when "long double" is read.
4819 (elaboration code): Register_Back_End_Types only when not reading from
4820 config files. Doing otherwise is pointless and error prone.
4822 2015-01-06 Robert Dewar <dewar@adacore.com>
4824 * s-valrea.adb (Value_Real): Check for Str'Last = Positive'Last
4826 2015-01-06 Robert Dewar <dewar@adacore.com>
4828 * a-wtgeau.adb, a-ztgeau.adb, a-tigeau.adb (String_Skip): Raise PE if
4829 Str'Last = Positive'Last.
4831 2015-01-06 Ed Schonberg <schonberg@adacore.com>
4833 * sem_ch6.adb (Matches_Limited_View): Handle properly the case
4834 where the non-limited type is a generic actual and appears as
4835 a subtype of the non-limited view of the other.
4836 * freeze.adb (Build_Renamed_Body): If the return type of the
4837 declaration that is being completed is a limited view and the
4838 non-limited view is available, use it in the specification of
4841 2015-01-06 Ed Schonberg <schonberg@adacore.com>
4843 * sem_ch3.adb (Find_Type_Name): If there is a previous tagged
4844 incomplete view, the type of the classwide type common to both
4845 views is the type being declared.
4847 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
4849 * einfo.ads (Is_Independent): Further document extended usage.
4851 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
4853 * einfo.ads (Is_Independent): Document extended usage.
4854 * einfo.adb (Is_Independent): Remove obsolete assertion.
4855 (Set_Is_Independent): Likewise.
4856 * sem_prag.adb (Process_Atomic_Shared_Volatile): Rename into...
4857 (Process_Atomic_Independent_Shared_Volatile): ...this.
4858 Deal with pragma Independent here.
4859 (Analyze_Pragma): Adjust
4860 to above renaming and also invoke it for pragma Independent.
4861 Adjust comment for Independent_Components.
4863 2015-01-06 Robert Dewar <dewar@adacore.com>
4865 * snames.ads-tmpl: Remove entries for attribute Enum_Image.
4866 * exp_attr.adb: Remove reference to Attribute_Enum_Image.
4868 2015-01-06 Robert Dewar <dewar@adacore.com>
4870 * s-vallli.adb (Value_Long_Long_Integer): Handle case of Str'Last
4872 * s-valllu.adb (Value_Long_Long_Unsigned): Handle case of
4873 Str'Last = Positive'Last.
4875 2015-01-06 Robert Dewar <dewar@adacore.com>
4877 * sem_prag.adb (Process_Inline): Remove redundant construct
4878 warning (-gnatw.r) for an ineffective pragma Inline.
4880 2015-01-06 Robert Dewar <dewar@adacore.com>
4882 * s-valint.adb: Fix typo in last checkin.
4883 * s-valuns.adb (Value_Unsigned): More efficient fix for
4885 * sem_attr.adb (Analyze_Attribute): Minor reformatting
4886 (Eval_Attribute): Static ervaluation of 'Img for enumeration types.
4888 2015-01-06 Robert Dewar <dewar@adacore.com>
4890 * s-valint.adb, s-valuns.adb (Value_Integer): Deal with case where
4891 Str'Last = Positive'Last
4893 2015-01-06 Thomas Quinot <quinot@adacore.com>
4895 * xoscons.adb: Display exception information and return non-zero
4896 exit status in top level exception handler.
4898 2015-01-06 Ed Schonberg <schonberg@adacore.com>
4900 * sem_ch8.adb: Code clean up.
4902 2015-01-06 Tristan Gingold <gingold@adacore.com>
4904 * targparm.ads: Remove obsolete comment.
4906 2015-01-06 Olivier Hainque <hainque@adacore.com>
4908 * gcc-interface/decl.c (gnat_to_gnu_entity, case E_Variable): When
4909 constructing a ref to variable, update inner_const_flag from the
4910 variable TREE_READONLY attribute.
4911 * gcc-interface/targtyps.c (WIDEST_HARDWARE_FP_SIZE): Remove default
4913 (get_target_float_size): Remove.
4914 (get_target_double_size): Remove.
4915 (get_target_long_double_size): Remove.
4917 2015-01-06 Pascal Obry <obry@adacore.com>
4919 * adaint.c (ProcListEvt): Set to NULL.
4920 * rtinit.c: New file.
4921 (__gnat_rt_init_count): New reference counter set to 0.
4922 (__gnat_runtime_initialize): Move code here from __gnat_initialize when
4923 this code is actually needed for the runtime initialization. This
4924 routine returns immediately if the initialization has already been done.
4925 * final.c: Revert previous change.
4926 * rtfinal.c: New file.
4927 (__gnat_runtime_finalize)[Win32]: Add finalization of the critical
4928 section and event. The default version of this routine is empty (except
4929 for the reference counting code). This routine returns immediately if
4930 some others libraries are referencing the runtime.
4931 * bindgen.adb (Gen_Adainit): Generate call to Runtime_Initialize
4932 remove circuitry to initialize the signal handler as this is
4933 now done by the runtime initialization routine.
4934 (Gen_Adafinal): Generate call to Runtime_Finalize.
4935 * gnat_ugn.texi: Update documentation about concurrency and
4936 initialization/finalization of the run-time.
4937 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Add
4938 references to rtfinal.o and rtinit.o
4940 2015-01-06 Robert Dewar <dewar@adacore.com>
4942 * exp_attr.adb (Expand_N_Attribute_Reference): Add dummy entry
4944 * sem_attr.adb: Implement Enum_Image attribute.
4945 * snames.ads-tmpl: Add entries for Enum_Image attribute.
4947 2015-01-06 Robert Dewar <dewar@adacore.com>
4949 * namet.ads: Document use of Boolean2 for No_Use_Of_Entity.
4950 * restrict.ads (No_Use_Of_Entity): New table.
4951 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
4952 Ignore No_Use_Of_Entity (will be processed in parser).
4953 * snames.ads-tmpl: Add entry for Name_No_Use_Of_Entity.
4955 2015-01-06 Vincent Celier <celier@adacore.com>
4957 * prj-tree.adb (Imported_Or_Extended_Project_Of): Do not try
4958 to check for an extended project, if a project does not have
4959 yet a project declaration.
4961 2015-01-06 Pierre-Marie Derodat <derodat@adacore.com>
4963 * scos.ads: Update documentation about the SCO table build
4964 process and about table records format.
4965 * par_sco.ads (SCO_Record): Rename to SCO_Record_Raw.
4966 (SCO_Record_Filtered): New procedure.
4967 (Set_SCO_Logical_Operator): New procedure.
4968 (dsco): Update documentation.
4969 * par_sco.adb: Update library-level comments.
4970 (SCO_Generation_State_Type): New type.
4971 (SCO_Generation_State): New variable.
4972 (SCO_Raw_Table): New package instanciation.
4973 (Condition_Pragma_Hash_Table): Rename to SCO_Raw_Hash_Table.
4975 (Tristate): New type.
4976 (Is_Logical_Operator): Return Tristate and update documentation.
4977 (Has_Decision): Update call to Is_Logical_Operator and complete
4979 (Set_Table_Entry): Rename to Set_Raw_Table_Entry, update
4980 comment, add an assertion for state checking and change
4981 references to SCO_Table into SCO_Raw_Table.
4982 (dsco): Refactor to dump the raw and the filtered tables.
4983 (Process_Decisions.Output_Decision_Operand): Handle putative
4984 short-circuit operators.
4985 (Process_Decisions.Output_Element): Update references
4986 to Set_Table_Entry and to Condition_Pragma_Hash_Table.
4987 (Process_Decisions.Process_Decision_Operand): Update call
4988 to Is_Logical_Operator.
4989 (Process_Decisions.Process_Node): Handle putative short-circuit
4990 operators and change references to
4991 SCO_Table into SCO_Raw_Table.
4992 (SCO_Output): Add an assertion
4993 for state checking and remove code that used to stamp out SCO entries.
4994 (SCO_Pragma_Disabled): Change reference to SCO_Table
4996 (SCO_Record): Rename to SCO_Record_Raw,
4997 add an assertion for state checking and change references
4998 to SCO_Table into SCO_Raw_Table.
4999 (Set_SCO_Condition): Add an assertion for state checking, update
5000 references to Condition_Pragma_Hash_Table and change references to
5001 SCO_Table into SCO_Raw_Table.
5002 (Set_SCO_Pragma_Enabled): Add an assertion for state checking and
5003 change references to SCO_Table into SCO_Raw_Table.
5004 (Set_SCO_Logical_Operator): New procedure.
5005 (Traverse_Declarations_Or_Statements.Set_Statement_Entry): Update
5006 references to Set_Table_Entry and to Condition_Pragma_Hash_Table.
5007 (SCO_Record_Fildered): New procedure.
5008 * gnat1drv.adb (Gnat1drv): Invoke the SCO filtering pass.
5009 * lib-writ.adb (Write_ALI): Invoke the SCO filtering pass and
5011 * par-load.adb (Load): Update reference to SCO_Record.
5012 * par.adb (Par): Update reference to SCO_Record.
5013 * put_scos.adb (Put_SCOs): Add an assertion to check that no
5014 putative SCO condition reaches this end.
5015 * sem_ch10.adb (Analyze_Proper_Body): Update reference to SCO_Record.
5016 * sem_res.adb (Resolve_Logical_Op): Validate putative SCOs
5017 when corresponding to an "and"/"or" operator affected by the
5018 Short_Circuit_And_Or pragma.
5020 2015-01-06 Robert Dewar <dewar@adacore.com>
5022 * sem_ch8.adb (Analyze_Use_Package): Give more specific error
5023 msg for attempted USE of generic subprogram or subprogram.
5025 2015-01-06 Robert Dewar <dewar@adacore.com>
5027 * s-valllu.adb, a-tiinau.adb, a-timoau.adb, a-ztinau.adb, a-ztmoau.adb,
5028 s-valuns.adb, s-valrea.adb, a-wtflau.adb, a-tiflau.adb, a-ztflau.adb,
5029 a-wtinau.adb, a-wtmoau.adb: Document recognition of : in place of #.
5031 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5033 * sem_ch13.adb (Analyze_Aspect_Specifications): For aspects
5034 that specify stream subprograms, if the prefix is a class-wide
5035 type then the generated attribute definition clause must apply
5036 to the same class-wide type.
5037 (Default_Iterator): An iterator defined by an aspect of some
5038 container type T must have a first parameter of type T, T'class,
5039 or an access to such (from code reading RM 5.5.1 (2/3)).
5041 2015-01-06 Arnaud Charlet <charlet@adacore.com>
5043 * gnat1drv.adb: Minor: complete previous change.
5045 2015-01-06 Olivier Hainque <hainque@adacore.com>
5047 * set_targ.ads (C_Type_For): New function. Return the name of
5048 a C type supported by the back-end and suitable as a basis to
5049 construct the standard Ada floating point type identified by
5050 the T parameter. This is used as a common ground to feed both
5051 ttypes values and the GNAT tree nodes for the standard floating
5053 * set_targ.adb (Long_Double_Index): The index at which "long
5054 double" gets registered in the FPT_Mode_Table. This is useful to
5055 know whether we have a "long double" available at all and get at
5056 it's characteristics without having to search the FPT_Mode_Table
5057 when we need to decide which C type should be used as the
5058 basis for Long_Long_Float in Ada.
5059 (Register_Float_Type): Fill Long_Double_Index.
5060 (FPT_Mode_Index_For): New function. Return the index in
5061 FPT_Mode_Table that designates the entry corresponding to the
5062 provided C type name.
5063 (FPT_Mode_Index_For): New function. Return the index in
5064 FPT_Mode_Table that designates the entry for a back-end type
5065 suitable as a basis to construct the standard Ada floating point
5066 type identified by the input T parameter.
5067 (elaboration code): Register_Back_End_Types unconditionally,
5068 so C_Type_For can operate regardless of -gnateT. Do it
5069 early so we can query it for the floating point sizes, via
5070 FPT_Mode_Index_For. Initialize Float_Size, Double_Size and
5071 Long_Double_Size from the FPT_Mode_Table, as cstand will do.
5072 * cstand.adb (Create_Float_Types): Use C_Type_For to determine
5073 which C type should be used as the basis for the construction
5074 of the Standard Ada floating point types.
5075 * get_targ.ads (Get_Float_Size, Get_Double_Size,
5076 Get_Long_Double_Size): Remove.
5077 * get_targ.adb: Likewise.
5079 2015-01-06 Thomas Quinot <quinot@adacore.com>
5081 * sem_cat.adb (In_RCI_Declaration): Remove unnecessary
5082 parameter and rename to...
5083 (In_RCI_Visible_Declarations): Fix handling of private part of nested
5085 (Validate_RCI_Subprogram_Declaration): Reject illegal function
5086 returning anonymous access in RCI unit.
5088 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5090 * sem_ch6.adb (New_Overloaded_Entity): In GNATprove mode, a
5091 function wrapper may be a homonym of another local declaration.
5092 * sem_ch8.adb (Analyze_Subprogram_Renaming): In GNATprove mode,
5093 build function and operator wrappers after the actual subprogram
5094 has been resolved, and replace the standard renaming declaration
5095 with the declaration of wrapper.
5096 * sem_ch12.ads (Build_Function_Wrapper, Build_Operator_Wraooer):
5097 make public for use elsewhere.
5098 * sem_ch12.adb (Build_Function_Wrapper, Build_Operator_Wraooer):
5099 rewrite, now that actual is fully resolved when wrapper is
5102 2015-01-06 Javier Miranda <miranda@adacore.com>
5104 * exp_disp.adb: Revert previous change.
5106 2015-01-06 Robert Dewar <dewar@adacore.com>
5108 * exp_util.adb: Change name Name_Table_Boolean to
5109 Name_Table_Boolean1.
5110 * namet.adb: Change name Name_Table_Boolean to Name_Table_Boolean1
5111 Introduce Name_Table_Boolean2/3.
5112 * namet.ads: Change name Name_Table_Boolean to Name_Table_Boolean1
5113 Introduce Name_Table_Boolean2/3.
5114 * par-ch13.adb: Change name Name_Table_Boolean to
5115 Name_Table_Boolean1.
5117 2015-01-06 Bob Duff <duff@adacore.com>
5119 * gnat_rm.texi: Improve documentation regarding No_Task_Termination.
5121 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5123 * sem_aggr.adb (Resolve_Record_Aggregte, Get_Value): For an
5124 others choice that covers multiple components, analyze each
5125 copy with the type of the component even in compile-only mode,
5126 to detect potential accessibility errors.
5128 2015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
5130 * sem_res.adb (Is_Assignment_Or_Object_Expression): New routine.
5131 (Resolve_Actuals): An effectively volatile out
5132 parameter cannot act as an in or in out actual in a call.
5133 (Resolve_Entity_Name): An effectively volatile out parameter
5136 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5138 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If the body is
5139 the expansion of an expression function it may be pre-analyzed
5140 if a 'access attribute is applied to the function, in which case
5141 last_entity may have been assigned already.
5143 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5145 * sem_ch4.adb (Analyze_One_Call): If formal has an incomplete
5146 type and actual has the corresponding full view, there is no
5147 error, but a case of use of incomplete type in a predicate or
5148 invariant expression.
5150 2015-01-06 Vincent Celier <celier@adacore.com>
5152 * makeutl.adb (Insert_No_Roots): Make sure that the same source
5153 in two different project tree is checked in both trees, if they
5154 are sources of two different projects, extended or not.
5156 2015-01-06 Arnaud Charlet <charlet@adacore.com>
5158 * gnat1drv.adb: Minor code clean up.
5159 (Adjust_Global_Switches): Ignore gnatprove_mode in codepeer_mode.
5161 2015-01-06 Bob Duff <duff@adacore.com>
5163 * osint.adb (Read_Source_File): Don't print out
5164 file name unless T = Source.
5166 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5168 * sem_util.adb (Is_Variable, Is_OK_Variable_For_Out_Formal):
5169 recognize improper uses of constant_reference types as actuals
5170 for in-out parameters.
5171 (Check_Function_Call): Do not collect identifiers if function
5172 name is missing because of previous error.
5174 2015-01-06 Robert Dewar <dewar@adacore.com>
5176 * ali-util.adb, sem_prag.adb, rtsfind.adb, sem_util.adb, sem_res.adb,
5177 ali.adb, binde.adb, namet.adb, namet.ads, gnatls.adb, bcheck.adb:
5178 Minor change of name Name_Table_Info => Name_Table_Int.
5180 2015-01-06 Robert Dewar <dewar@adacore.com>
5182 * exp_strm.adb (Build_Elementary_Input_Call): Clarify comments
5183 in previous checkin.
5184 * freeze.adb (Freeze_Fixed_Point_Type): Add warning for shaving
5186 * sem_prag.adb, sem_ch10.adb, sem_ch6.adb: Minor reformatting.
5188 2015-01-06 Vincent Celier <celier@adacore.com>
5190 * a-strsup.adb (Times (Natural;String;Positive)): Raise
5191 Length_Error, not Index_Error, when the result is too long.
5193 2015-01-06 Thomas Quinot <quinot@adacore.com>
5195 * a-direct.adb (Create_Path): Minor error handling and
5196 performance improvement.
5198 2015-01-06 Robert Dewar <dewar@adacore.com>
5200 * checks.ads, sem_ch12.adb: Minor reformatting.
5201 * exp_ch4.adb (Expand_N_Op_Divide): Generate explicit divide by
5202 zero check for fixed-point case if Backend_Divide_Checks_On_Target
5205 2015-01-06 Robert Dewar <dewar@adacore.com>
5207 * sem_prag.adb (Analyze_Pragma, case No_Elaboration_Code_All):
5208 Do not set restriction No_Elaboration_Code unless the pragma
5209 appears in the main unit).
5211 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5213 * sem_ch10.adb (Is_Regular_With_Clause): Add guard to verify
5214 that with clause has already been analyzed before checking kind
5217 2015-01-06 Robert Dewar <dewar@adacore.com>
5219 * exp_strm.adb (Build_Elementary_Input_Call): Return base type
5220 (as required by RM).
5222 2015-01-06 Arnaud Charlet <charlet@adacore.com>
5224 * a-reatim.adb ("/"): Add explicit pragma Unsuppress (Division_Check).
5226 2015-01-06 Robert Dewar <dewar@adacore.com>
5228 * sem_prag.adb (Process_Suppress_Unsuppress): Add extra warning
5229 for ignoring pragma Suppress (Elaboration_Check) in SPARK mode.
5231 2015-01-06 Javier Miranda <miranda@adacore.com>
5233 * exp_disp.adb (Expand_Interface_Conversion): No displacement
5234 of the pointer to the object needed when the type of the operand
5235 is not an interface type and the interface is one of its parent
5236 types (since they share the primary dispatch table).
5238 2015-01-06 Vincent Celier <celier@adacore.com>
5240 * prj-env.adb: Minor comment update.
5242 2015-01-06 Javier Miranda <miranda@adacore.com>
5244 * sem_res.adb (Valid_Conversion): Restrict the checks on anonymous
5245 access types whose target type is an interface type to operands
5246 that are access types; required to report an error when the
5247 operand is not an access type.
5249 2015-01-06 Bob Duff <duff@adacore.com>
5251 * a-cfinve.adb (Copy): Set the discriminant to the Length when
5253 * a-cofove.ads (Capacity): Add a postcondition.
5254 * a-cfinve.ads (Capacity): Add a postcondition.
5255 (Reserve_Capacity): Correct the postcondition in the case where
5256 Capacity = 0; that means "Capacity => Length (Container)".
5257 * a-cofove.adb (Elems[c]): Add a comment
5258 explaining the dangers and how to avoid them.
5260 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5262 * sem_ch12.adb: Code clean up.
5264 2015-01-06 Arnaud Charlet <charlet@adacore.com>
5266 * gnatvsn.ads: Bump copyright year.
5268 2015-01-06 Robert Dewar <dewar@adacore.com>
5270 * s-taskin.ads, s-traces.ads: Minor reformatting.
5271 * exp_util.adb: Minor typo fix.
5273 2015-01-06 Vincent Celier <celier@adacore.com>
5275 * gnatls.adb (Search_RTS): Invoke Initialize_Default_Project_Path
5276 with the runtime name.
5277 * prj-env.adb (Initialize_Default_Project_Path): When both
5278 Target_Name and Runtime_Name are not empty string, add to the
5279 project path the two directories .../lib/gnat and .../share/gpr
5280 related to the runtime.
5281 * prj-env.ads (Initialize_Default_Project_Path): New String
5282 parameter Runtime_Name, defaulted to the empty string.
5284 2015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
5286 * frontend.adb: Guard against the case where a configuration
5287 pragma may be split into multiple pragmas and the original
5288 rewritten as a null statement.
5289 * sem_prag.adb (Analyze_Pragma): Insert a brand new Check_Policy
5290 pragma using Insert_Before rather than Insert_Action. This
5291 takes care of the configuration pragma case where Insert_Action
5294 2015-01-06 Bob Duff <duff@adacore.com>
5296 * a-coboho.ads (Element_Access): Add "pragma
5297 No_Strict_Aliasing (Element_Access);". This is needed because
5298 we are unchecked-converting from Address to Element_Access.
5299 * a-cofove.ads, a-cofove.adb (Elems,Elemsc): Fix bounds of the
5302 2015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
5304 * sem_res.adb (Resolve_Actuals): Remove the
5305 restriction which prohibits volatile actual parameters with
5306 enabled external propery Async_Writers to act appear in procedure
5307 calls where the corresponding formal is of mode OUT.
5309 2015-01-05 Jakub Jelinek <jakub@redhat.com>
5311 * gnat_ugn.texi: Bump @copying's copyright year.
5313 2015-01-05 Eric Botcazou <ebotcazou@adacore.com>
5316 * gcc-interface/Makefile.in (../stamp-tools): Reinstate dropped code.
5318 2015-01-04 Uros Bizjak <ubizjak@gmail.com>
5320 * gcc-interface/misc.c (internal_error_function): Use xasprintf instead
5321 of unchecked asprintf.
5324 Copyright (C) 2015 Free Software Foundation, Inc.
5326 Copying and distribution of this file, with or without modification,
5327 are permitted in any medium without royalty provided the copyright
5328 notice and this notice are preserved.