1 2015-09-14 Eric Botcazou <ebotcazou@adacore.com>
3 * gcc-interface/gigi.h (ref_filename): Delete.
4 (Sloc_to_locus): Add clean_column parameter defaulting to false.
5 (build_call_raise): Adjust comment.
6 (build_call_raise_range): Move around.
7 * gcc-interface/trans.c (ref_filename): Delete.
8 (gigi): Fix formatting.
9 (block_end_locus_sink): Delete.
10 (Sloc_to_locus1): Tidy up and reformat. Rename into...
11 (Sloc_to_locus): ...this. Add default for clean_colmun parameter.
12 (set_expr_location_from_node1): Rename into...
13 (set_expr_location_from_node): ...this.
14 (set_end_locus_from_node): Move around. Adjust for renaming.
15 (Handled_Sequence_Of_Statements_to_gnu): Likewise.
16 (add_cleanup): Likewise.
17 * gcc-interface/utils2.c (expand_sloc): New static function.
18 (build_call_raise): Call it.
19 (build_call_raise_column): Likewise.
20 (build_call_raise_range): Likewise. Move around.
22 2015-09-14 Eric Botcazou <ebotcazou@adacore.com>
24 * gcc-interface/utils2.c (gnat_rewrite_reference) <COMPOUND_EXPR>: Add
25 another acceptable pattern for the RHS.
27 2015-07-24 Micahel Darling <darlingm@gmail.com>
30 * prj-nmsc.adb: Reflects renaming of configure.in to configure.ac
31 * gcc-interface/Makefile.in: Likewise
33 2015-07-12 Aldy Hernandez <aldyh@redhat.com>
35 * gcc-interface/utils.c: Fix double word typos.
36 * gnat_ugn.texi: Same.
39 * projects.texi: Same.
47 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
49 * gcc-interface/cuintp.c: Adjust includes.
50 * gcc-interface/decl.c: Likewise.
51 * gcc-interface/misc.c: Likewise.
52 * gcc-interface/targtyps.c: Likewise.
53 * gcc-interface/trans.c: Likewise.
54 * gcc-interface/utils.c: Likewise.
55 * gcc-interface/utils2.c: Likewise.
57 2015-07-06 John Marino <gnugcc@marino.st>
59 * s-oscons-tmplt.c: Add support for DragonFly alongside FreeBSD.
61 2015-06-29 Eric Botcazou <ebotcazou@adacore.com>
64 * gcc-interface/utils.c (gnat_write_global_declarations): Always
65 build the dummy global variable if code was generated.
67 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
70 * gcc-interface/misc.c (gnat_post_options): No need to disable
71 warn_unused_parameter anymore.
73 2015-06-26 Eric Botcazou <ebotcazou@adacore.com>
75 * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): When
76 not optimizing the CFG, clear the DECL_DECLARED_INLINE_P flag on the
79 2015-06-26 Eric Botcazou <ebotcazou@adacore.com>
81 * gcc-interface/gigi.h (note_types_used_by_globals): Delete.
82 (gnat_write_global_declarations): New prototype.
83 * gcc-interface/utils.c (type_decls): Rename back to...
84 (global_decls): ...this.
85 (gnat_pushdecls): Revert previous change.
86 (create_var_decl): Do not output global variables.
87 (note_types_used_by_globals): Rename back to...
88 (gnat_write_global_declarations): ...this. Output variables on the
90 * gcc-interface/misc.c (gnat_parse_file): Adjust to above renaming.
92 2015-06-26 Eric Botcazou <ebotcazou@adacore.com>
94 * gcc-interface/gigi.h (create_var_decl_1): Rename into...
95 (create_var_decl): ...this. Add default value for last parameter.
96 (create_type_stub_decl): Adjust.
97 (create_type_decl): Likewise.
98 (create_field_decl): Likewise.
99 (create_param_decl): Likewise.
100 (create_label_decl): Likewise.
101 (create_subprog_decl): Likewise.
102 * gcc-interface/utils.c (create_var_decl_1): Rename into...
103 (create_var_decl): ...this. Rename var_name into name and var_init
104 into init, move const_decl_allowed_p last and adjust accordingly.
105 (create_type_stub_decl): Rename type_name into name and adjust.
106 (create_type_decl): Likewise.
107 (create_field_decl): Likewise for field_name and field_type.
108 (create_param_decl): Likewise for param_name and param_type.
109 (create_label_decl): Likewise for label_name.
110 (create_subprog_decl): Likewise for subprog_name and subprog_type.
111 * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust couple of calls
112 to create_var_decl_1.
114 2015-06-26 Eric Botcazou <ebotcazou@adacore.com>
116 * gcc-interface/trans.c (loop_info_d): Add low_bound, high_bound,
117 artificial, has_checks and warned_aggressive_loop_optimizations.
118 (gigi): Set warn_aggressive_loop_optimizations to 0.
119 (inside_loop_p): New inline predicate.
120 (push_range_check_info): Rename into...
121 (find_loop_for): ...this and do not push range_check_info_d object.
122 (Loop_Statement_to_gnu): Set artificial, low_bound and high_bound
123 fields of gnu_loop_info. Adjust detection of checks enabled by
124 -funswitch-loops and adds one for -faggressive-loop-optimizations.
125 (gnat_to_gnu) <N_Indexed_Component>: If aggressive loop optimizations
126 are enabled, warn for loops overrunning an array of size 1 not at the
129 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
131 * gcc-interface/trans.c: Remove ipa-ref.h and plugin-api.h from include
133 * gcc-interface/utils.c: Likewise.
135 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
137 * gcc-interface/decl.c (value_annotation_hasher): Inherit from
138 ggc_cache_ptr_hash rather than ggc_cache_hasher.
139 * gcc-interface/utils.c (pad_type_hasher): Likewise.
141 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
143 * gcc-interface/decl.c (value_annotation_hasher::handle_cache_entry):
145 (value_annotation_hasher::keep_cache_entry): New function.
146 * gcc-interface/utils.c (pad_type_hasher::handle_cache_entry):
148 (pad_type_hasher::keep_cache_entry): New function.
150 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
152 * gcc-interface/misc.c: Include calls.h not function.h.
154 2015-06-19 Eric Botcazou <ebotcazou@adacore.com>
156 * gcc-interface/gigi.h (record_builtin_type): Adjust comment.
157 (tree create_type_decl): Likewise.
158 (create_var_decl_1): Add artificial_p and debug_info_p parameters.
159 (create_var_decl): Likewise.
160 (create_true_var_decl): Delete.
161 (create_subprog_decl): Add debug_info_p parameter.
162 * gcc-interface/decl.c (gnat_to_gnu_entity): Add artificial_p local
163 variable and use it throughout. Remove DECL_ARTIFICIAL settings.
164 <E_Variable>: Adjust calls to create_var_decl and create_var_decl_1.
165 Remove DECL_IGNORED_P settings.
166 <E_Enumeration_Type>: Likewise.
167 <E_Record_Type>: Likewise.
168 <E_Subprogram_Type>: Likewise. Remove artificial_flag local variable.
169 Adjust call to create_subprog_decl.
170 (get_minimal_subprog_decl): Likewise.
171 (elaborate_expression_1): Adjust call to create_var_decl.
172 * gcc-interface/trans.c (gigi): Adjust calls to create_var_decl and
173 create_subprog_decl. Remove DECL_ARTIFICIAL & DECL_IGNORED_P settings.
174 * gcc-interface/utils.c (maybe_pad_type): Likewise.
175 (record_builtin_type): Adjust comment.
176 (create_type_stub_decl): Remove obsolete comment.
177 (create_var_decl_1): Add artificial_p and debug_info_p parameters.
178 Set DECL_ARTIFICIAL and DECL_IGNORED_P accordingly.
179 (create_subprog_decl): Add debug_info_p parameter. Set DECL_IGNORED_P
182 2015-06-19 Eric Botcazou <ebotcazou@adacore.com>
184 * gcc-interface/misc.c (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): Define.
186 2015-06-19 Eric Botcazou <ebotcazou@adacore.com>
188 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Make sure
189 the size of a padding type built around the return type is positive.
190 * gcc-interface/trans.c (gnat_to_gnu) <N_Simple_Return_Statement>:
191 Use INIT_EXPR instead of MODIFY_EXPR to assign to the return object.
193 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
195 * gcc-interface/cuintp.c: Do not include input.h, line-map.h or is-a.h.
196 * gcc-interface/decl.c: Likewise.
197 * gcc-interface/misc.c: Likewise.
198 * gcc-interface/targtyps.c: Likewise.
199 * gcc-interface/trans.c: Likewise.
200 * gcc-interface/utils.c: Likewise.
201 * gcc-interface/utils2.c: Likewise.
203 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
205 * gcc-interface/utils.c (get_global_context): Register the main
206 translation unit through the new debug hook.
208 2015-06-09 Eric Botcazou <ebotcazou@adacore.com>
210 * gcc-interface/misc.c: Remove duplicate include directives.
211 * gcc-interface/trans.c: Likewise.
212 * gcc-interface/utils.c: Likewise.
214 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
216 * gcc-interface/cuintp.c : Adjust include files.
217 * gcc-interface/decl.c : Likewise.
218 * gcc-interface/misc.c : Likewise.
219 * gcc-interface/targtyps.c : Likewise.
220 * gcc-interface/trans.c : Likewise.
221 * gcc-interface/utils.c : Likewise.
222 * gcc-interface/utils2.c : Likewise.
224 2015-06-08 John Marino <gnugcc@marino.st>
226 * a-intnam-dragonfly.ads: New.
227 * s-osinte-dragonfly.adb: Likewise.
228 * s-osinte-dragonfly.ads: Likewise.
229 * system-dragonfly-x86_64.ads: Likewise.
230 * adaint.c: Add BSD macros.
231 * cstreams.c: Likewise.
232 * gsocket.h: Likewise.
234 * socket.c: Likewise.
235 * env.c: Add __DragonFly__, remove __FreeBSD__ macro.
236 * init.c: Add __DragonFly__, change __gnat_install_handler
237 prototype from empty to void.
238 * initialize.c: Add __DragonFly__.
239 * sysdep.c: Likewise.
240 * s-osinte-freebsd.adb: Use __get_errno instead of __error.
241 * tracebak.c: Set unwinder for i386 BSD.
242 * gcc-interface/Makefile.in: Add x86_64 DragonFly, tweak
243 x86_64 FreeBSD and x86 FreeBSD.
245 2015-06-06 Eric Botcazou <ebotcazou@adacore.com>
247 * gcc-interface/utils.c (note_types_used_by_globals): Tweak comment.
248 * gcc-interface/decl.c (gnat_to_gnu_entity): Likewise.
250 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
252 * gcc-interface/gigi.h (note_types_used_by_globals): Rename from
253 gnat_write_global_declarations.
254 * gcc-interface/misc.c (gnat_parse_file): Call
255 note_types_used_by_globals.
256 Remove LANG_HOOKS_WRITE_GLOBALS.
257 * gcc-interface/utils.c: Rename global_decls to type_decls.
258 (gnat_write_global_declarations): Rename
259 to note_types_used_by_globals.
260 Remove call to finalize_compilation_unit.
261 Remove call to debug_hooks->global_decl for globals.
262 (gnat_pushdecls): Only insert into type_decls if TYPE_DECL.
264 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
266 * gcc-interface/cuintp.c: Adjust includes for restructured coretypes.h.
267 * gcc-interface/decl.c: Likewise.
268 * gcc-interface/misc.c: Likewise.
269 * gcc-interface/targtyps.c: Likewise.
270 * gcc-interface/trans.c: Likewise.
271 * gcc-interface/utils.c: Likewise.
272 * gcc-interface/utils2.c: Likewise.
274 2015-06-04 Pierre-Marie de Rodat <derodat@adacore.com>
276 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: If
277 processing a definition, create definitions for padding types
280 2015-06-03 Eric Botcazou <ebotcazou@adacore.com>
282 * gcc-interface/utils.c (copy_type): Also set TYPE_CANONICAL.
284 2015-06-03 Eric Botcazou <ebotcazou@adacore.com>
286 * gcc-interface/trans.c (gnat_to_gnu) <N_Simple_Return_Statement>: Fix
287 typo in latest change.
289 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
291 * gcc-interface/Makefile.in: Fix ARM/Darwin configuration.
293 2015-06-01 Pierre-Marie de Rodat <derodat@adacore.com>
295 * gcc-interface/utils.c (scale_by_factor_of): When handling a function
296 call expression, process the corresponding function body. Also handle
299 2015-06-01 Pierre-Marie de Rodat <derodat@adacore.com>
301 * gcc-interface/decl.c (gnat_to_gnu_entity): Replace pointer types with
302 references ones for functions that return references.
304 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
306 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: For a
307 definition of a type coming from a limited_with, get to the full view
308 if it is not in the main code unit.
310 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
312 * gcc-interface/utils.c (create_var_decl_1): If an assembler name is
313 specified, let the target mangle it before settting.
314 (create_subprog_decl): Likewise and move this treatment last.
316 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
318 * gcc-interface/lang-specs.h (TARGET_VXWORKS_RTP): Move substitution to
319 before first -gnatez switch. Simplify and add trailing space.
321 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
323 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: If the
324 record has a parent field and a representation clause, make sure that
325 it is properly aligned.
327 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
329 * gcc-interface/trans.c (lvalue_required_p) <N_Indexed_Component>: Deal
330 with character and enumeration literals as index values.
332 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
334 * gcc-interface/gigi.h (build_simple_component_ref): Declare.
335 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Deal with
336 address clause on aliased object with unconstrained nominal subtype.
337 Mark the aligning variable as artificial, do not convert the address
338 expression immediately but mark it as constant instead.
339 * gcc-interface/utils.c (convert): If the target type contains a
340 template, be prepared for an empty array.
341 (maybe_unconstrained_array): Likewise.
342 * gcc-interface/utils2.c (known_alignment) <POINTER_PLUS_EXPR>: Deal
343 with the pattern built for aligning types.
344 <INTEGER_CST>: Do not cap the value at BIGGEST_ALIGNMENT.
345 (build_simple_component_ref): Make public.
346 If the base object is a constructor that contains a template, fold the
347 result field by field.
349 2015-05-31 Eric Botcazou <ebotcazou@adacore.com>
351 * s-oscons-tmplt.c: Add explicit tests for Android alongside Linux.
353 2015-05-30 Eric Botcazou <ebotcazou@adacore.com>
355 * adaint.c: Test for __linux__ instead of linux and __sun__ instead
356 of sun. Add missing leading underscore to AIX. Remove #elif 0.
357 * adaint.h: Likewise.
359 * cstreams.c: Likewise.
361 * gsocket.h: Likewise.
362 * init.c: Likewise. Test for __i386__ instead of i386.
364 * s-oscons-tmplt.c: Likewise.
365 * sysdep.c: Likewise.
366 * terminals.c: Likewise. Use BSD symbol instead of FREEBSD.
367 * tracebak.c: Likewise. Test for __sparc__ instead of sparc.
369 2015-05-28 Eric Botcazou <ebotcazou@adacore.com>
371 * gcc-interface/utils.c (max_size) <tcc_binary>: Add special code to
372 deal with the subtraction of a "negative" value in an unsigned type.
374 2015-05-28 Eric Botcazou <ebotcazou@adacore.com>
376 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Do
377 not error out on a return type which has a size that overflows if the
378 return is done by invisible reference.
380 2015-05-28 Eric Botcazou <ebotcazou@adacore.com>
382 * gcc-interface/utils.c (gnat_pushdecl): Reunify the handling of array
383 and pointer types wrt DECL_ORIGINAL_TYPE and adjust left and right.
385 2015-05-28 Eric Botcazou <ebotcazou@adacore.com>
387 * gcc-interface/gigi.h (gnat_stabilize_reference): Adjust.
388 (rewrite_fn): Remove third parameter.
389 (type_is_padding_self_referential): New inline predicate.
390 (return_type_with_variable_size_p): Likewise.
391 * gcc-interface/decl.c (allocatable_size_p): More around.
392 (cannot_be_superflat_p): Rename into...
393 (cannot_be_superflat ): ...this.
394 (initial_value_needs_conversion): New predicate.
395 (gnat_to_gnu_entity): Invoke type_is_padding_self_referential,
396 initial_value_needs_conversion and adjust to above renaming.
397 For a renaming, force the materialization if the inner expression
398 is compound. Adjust calls to elaborate_reference and build a
399 compound expression if needed.
400 (struct er_dat): Add N field.
401 (elaborate_reference_1): Remove N parameter and adjust.
402 (elaborate_reference): Add INIT parameter and pass it in the call to
403 gnat_rewrite_reference. Adjust initial expression.
404 * gcc-interface/trans.c (Call_to_gnu): Treat renamings the same way as
405 regular object declarations when it comes to creating a temporary.
406 Adjust call to gnat_stabilize_reference and build a compound expression
407 if needed. Invoke return_type_with_variable_size_p.
408 (gnat_to_gnu): Invoke type_is_padding_self_referential. In case #4,
409 return a call to a function unmodified if it returns with variable size
410 and is also the initial expression in an object declaration.
411 * gcc-interface/utils2.c (build_binary_op) <INIT_EXPR>: Use the RHS'
412 type if it is a call to a function that returns with variable size.
413 (build_unary_op): Invoke type_is_padding_self_referential.
414 (gnat_stabilize_reference_1): Remove N parameter and adjust.
415 (gnat_stabilize_reference): Add INIT parameter and pass it in the call
416 to gnat_rewrite_reference.
417 (gnat_rewrite_reference): Remove N, add INIT parameter and adjust.
418 <COMPOUND_EXPR>: New case.
420 2015-05-28 Ed Schonberg <schonberg@adacore.com>
422 * sem_ch3.adb (Is_Visible_Component): Component is visible
423 in a derived type if inherited through an ancestor that has a
424 partial view of the original type holding the component, if the
425 full view of that original type is in scope.
426 * sem_util.ads (Get_Body_From_Stub): Works for all kinds of stubs.
428 2015-05-28 Bob Duff <duff@adacore.com>
430 * sem_util.adb (Requires_Transient_Scope): For definite untagged
431 subtypes, we should never have to use the secondary stack. This moves
432 toward that goal. But there are still cases that don't work.
433 Here, we move the check for Is_Definite first, but add a
434 special-purpose check for Has_Discrim_Dep_Array.
436 2015-05-28 Bob Duff <duff@adacore.com>
438 * sem_util.adb (Requires_Transient_Scope): Avoid returning
439 function results on the secondary stack in so many cases.
441 2015-05-28 Ed Schonberg <schonberg@adacore.com>
443 * sem_util.adb (Wrong_Type): In any instance, do not emit error
444 if type of expression is the partial view of the expected type.
446 2015-05-28 Ed Schonberg <schonberg@adacore.com>
448 * sem_res.adb (Resolve_Actuals): a) The replacement of formal
449 names in named associations only needs to be done within an
450 instance, on a call to a primitive of a formal derived type,
451 where the actual subprogram may have different formal names than
452 those of the primitive operation of the formal type.
453 b) Defaulted parameters must be taken into account when obtaining
454 the names of the formals of the actual subprogram being called.
456 2015-05-28 Robert Dewar <dewar@adacore.com>
458 * sem_ch13.adb, sem_disp.ads: Minor reformatting.
460 2015-05-28 Ed Schonberg <schonberg@adacore.com>
462 * sem_util.adb (Set_Debug_Info_Needed): For a private type
463 whose full view is itself a derived private type, set flag on
464 underlying full view as well, for proper gdb display.
466 2015-05-28 Bob Duff <duff@adacore.com>
468 * exp_tss.ads: Minor comment fix.
469 * exp_ch3.adb (Build_Array_Init_Proc, Build_Record_Init_Proc):
470 Inline init_procs when the type has controlled parts. Remove
471 obsolete comments about those init_procs -- init_procs for
472 such types are no longer complex. A typical init_proc just
473 initializes the 'Tag field, and calls the parent init_proc
474 (e.g. for Limited_Controlled), which calls the grandparent
475 (for Root_Controlled), which does nothing. This all boils down
476 to one instruction when inlined.
477 * exp_ch7.adb (Create_Finalizer): Inline the finalizer.
479 2015-05-28 Ed Schonberg <schonberg@adacore.com>
481 * sem_ch4.adb (Analyze_Selected_Component): If the type to use
482 is a derived type and is a generic actual, the selected component
483 appears within an instance body, and the check over the type
484 has failed, examine ancestor types for the desired component.
485 (Find_Component_In_Instance): If record type is a derived type,
486 examine all ancestors in order to locate desired component.
488 2015-05-27 H.J. Lu <hongjiu.lu@intel.com>
490 * gcc-interface/Makefile.in (TOOLS_LIBS): Add @NO_PIE_FLAG@.
492 2015-05-27 Eric Botcazou <ebotcazou@adacore.com>
494 * gcc-interface/trans.c (elaborate_all_entities): Do not elaborate an
495 incomplete type coming from a limited_with and whose non-limited view
496 comes from the main unit.
498 2015-05-27 Eric Botcazou <ebotcazou@adacore.com>
500 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Move down
501 code applying atomic checks to the object.
503 2015-05-27 Robert Dewar <dewar@adacore.com>
505 * sem_aux.adb: Minor rewording.
507 2015-05-27 Bob Duff <duff@adacore.com>
509 * exp_prag.adb (Expand_Pragma_Abort_Defer): Make
510 pragma Abort_Defer do nothing if Abort_Allowed is False.
512 2015-05-27 Arnaud Charlet <charlet@adacore.com>
514 * exp_ch9.adb, sem_util.adb, sem_util.ads, s-stposu.adb, s-spsufi.ads,
515 sem_elab.ads, g-comlin.ads, errout.ads, exp_ch6.adb, sem_ch4.adb,
516 opt.ads, s-bignum.adb, output.ads, sem_ch13.adb, erroutc.ads,
517 sem_disp.ads, exp_ch3.adb: Minor fixes of duplicate words in comments.
519 2015-05-27 Doug Rupp <rupp@adacore.com>
521 * adaint.c (__gnat_tmp_name) [vxworks]: Robustify and use for rtp as
524 2015-05-27 Pierre-Marie de Rodat <derodat@adacore.com>
526 * par_sco.adb (Process_Decision): Store sloc to
527 condition/pragmas SCOs associations into a temporary table before
528 moving them to the SCO_Raw_Hash_Table so that we can back them
529 out just like we do for SCO entries that are simple decisions
530 in an expression context.
532 2015-05-27 Ed Schonberg <schonberg@adacore.com>
534 * sem_ch6.adb (Process_Formals): A non-private formal type that
535 is a limited view does not have a list of private dependents.
537 2015-05-27 Ed Schonberg <schonberg@adacore.com>
539 * exp_ch5.adb (Expand_N_Case_Statement): If the expression in
540 the case statement is a compile-time known value, we look for a
541 corresponding alternative to optimize the case statement into a
542 single case. If the type has a static predicate and the expression
543 does not satisfy the predicate, there is no legal alternative and
544 this optimization is not applicable. Excecution is erroneous,
545 or else if assertions are enabled, an exception will be raised
546 earlier, at the point the expression is elaborated.
548 2015-05-27 Robert Dewar <dewar@adacore.com>
550 * sem_elab.adb (Check_Internal_Call_Continue): Suppress
551 warning on Finalize, Adjust, or Initialize if type involved has
554 2015-05-27 Ed Schonberg <schonberg@adacore.com>
556 * sem_aux.adb, sem_aux.ads (First_Discriminant): Return empty when
557 applied to a type with no known discriminants.
559 2015-05-26 Robert Dewar <dewar@adacore.com>
561 * errout.ads, sem_ch4.adb, sem_ch6.adb: Minor reformatting.
563 2015-05-26 Bob Duff <duff@adacore.com>
565 * sem_elab.adb (Check_A_Call): In the case where we're
566 calling something in an instance of a generic package that is
567 within this same unit (as the call), make sure we treat it
568 as a call to an entity within the same unit. That is, call
569 Check_Internal_Call, rather than putting "Elaborate_All(X)"
570 on X, which would necessarily result in an elaboration cycle in
571 static-elaboration mode.
573 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
575 * freeze.ads (Is_Atomic_VFA_Aggregate): Adjust profile.
576 * freeze.adb (Is_Atomic_VFA_Aggregate): Change Entity
577 parameter into Node parameter and remove Type parameter.
578 Look at Is_Atomic_Or_VFA both on the type and on the object.
579 (Freeze_Entity): Adjust call to Is_Atomic_VFA_Aggregate.
580 * exp_aggr.adb (Expand_Record_Aggregate): Likewise.
581 (Process_Atomic_Independent_Shared_Volatile): Remove code
582 propagating Atomic or VFA from object to locally-defined type.
584 2015-05-26 Bob Duff <duff@adacore.com>
586 * exp_ch7.adb: Minor comment fix.
588 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
590 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Min/Attr_Max>: Do not
591 bother about NaN's if Machine_Overflows is true.
593 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
595 * gcc-interface/trans.c (gnat_to_gnu) <N_Object_Declaration>: Really
596 force evaluation of the expression, if any, when the object has its
597 elaboration delayed. Do not create a variable at global level.
599 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
601 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Machine>: Do not apply
602 extra-precision trick to literals. Build SAVE_EXPR manually.
604 * gcc-interface/misc.c (enumerate_modes): Add bypass for x86/x86-64.
606 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
608 * gcc-interface/ada-tree.h (DECL_GLOBAL_NONCONSTANT_RENAMING_P): Delete
609 (DECL_RENAMED_OBJECT): Adjust comment.
610 * gcc-interface/gigi.h (record_global_nonconstant_renaming): Delete.
611 (invalidate_global_nonconstant_renamings): Likewise.
612 (gnat_constant_reference_p): Likewise.
613 (rewrite_fn): New function type.
614 (gnat_rewrite_reference): Declare.
615 (call_is_atomic_load): New inline predicate.
616 * gcc-interface/decl.c (elaborate_reference_1): New function.
617 (elaborate_reference): Likewise.
618 (gnat_to_gnu_entity): Call elaborate_reference to elaborate renamings
619 and simplify associated code. Set const_flag to true consistently in
620 conjunction with used_by_ref.
621 * gcc-interface/trans.c (Identifier_to_gnu): Always replace renaming
622 pointers by renamed objects.
623 (outer_atomic_access_required_p): Deal with renamings.
624 (Compilation_Unit_to_gnu): Do not call
625 invalidate_global_nonconstant_renamings.
626 (gnat_to_gnu) <N_Object_Renaming_Declaration>: Adjust comment.
627 (gnat_gimplify_expr): Deal with atomic loads.
628 * gcc-interface/utils.c (global_nonconstant_renamings): Delete.
629 (destroy_gnat_utils): Do not call
630 invalidate_global_nonconstant_renamings.
631 (record_global_nonconstant_renaming): Delete.
632 (invalidate_global_nonconstant_renamings): Likewise.
633 * gcc-interface/utils2.c (call_is_atomic_load): Move to gigi.h.
634 (build_load_modify_store): Build a copy of the destination.
635 (gnat_stabilize_reference_1): Adjust.
636 (gnat_stabilize_reference): Call gnat_stabilize_reference_1 through
637 gnat_rewrite_reference and move bulk of code to...
638 (gnat_rewrite_reference): ...here. New global function.
639 (gnat_constant_reference_p): Delete.
641 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
643 * gcc-interface/gigi.h (gnat_stabilize_reference): Adjust prototype.
644 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not rely on const_flag
645 to detect constant renamings. Be prepared for specific pattern of
646 renamed object based on function calls. Create a constant object
647 for the renaming of a NULL_EXPR or of a CONSTRUCTOR. Adjust calls
648 to gnat_stabilize_reference and tidy up. Remove redundant tests.
649 (elaborate_expression_1): Remove obsolete test and tidy up.
650 * gcc-interface/trans.c (Call_to_gnu): Do not stabilize In/Out or Out
651 parameters passed by reference.
652 (gnat_to_gnu) <N_Selected_Component>: Remove redundant protection again
654 Use gnat_protect_expr instead of gnat_stabilize_reference for general
655 protection against side-effects.
656 * gcc-interface/utils2.c (gnat_stable_expr_p): New predicate.
657 (gnat_save_expr): Invoke it.
658 (gnat_protect_expr): Likewise.
659 (gnat_stabilize_reference_1): Likewise. Remove useless propagation
661 (gnat_stabilize_reference): Remove parameter and adjust throughout.
662 Delete ADDR_EXDR, COMPOUND_EXPR and CONSTRUCTOR cases.
663 Restrict CALL_EXPR case to atomic loads and tweak ERROR_MARK case.
665 2015-05-26 Ed Schonberg <schonberg@adacore.com>
667 * sinfo.ads: Minor reformatting.
668 * sem_aux.ads: Clarify use of First_Discriminant.
669 * sem_ch4.adb (Analyze_Explicit_Dereference): The use of a limited
670 view is replaced with the non-limited view in an instance body,
671 where the enclosing unit must have a regular with_clause on the
673 * sem_ch12.adb (Install_Body): Freeze instantation after its
674 body. Remove useless freeze nodes for incomplete actuals to
675 prevent multiple generation of internal operations.
676 (Instantiate_Package_Body): Set sloc of body appropriately when
677 there are incomplete actuals and the instance body is placed in
678 the body of the enclosing unit.
679 * errout.ads: Consistent punctuation, better alignment and trivial
681 * err_vars.ads: Fix typo.
683 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
685 * sem_ch8.adb (Analyze_Object_Renaming): Lift restriction on
686 components of Volatile_Full_Access objects.
688 2015-05-26 Ed Schonberg <schonberg@adacore.com>
690 * sem_ch6.adb (Is_Non_Overriding_Operation,
691 Get_Generic_Parent_Type): Handle properly the case of a derived
692 scalar type by using the first subtype rather than its generated
695 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
697 * einfo.adb (Write_Field17_Name): Move E_Incomplete_Subtype
699 (Write_Field19_Name): ...here.
701 2015-05-26 Ed Schonberg <schonberg@adacore.com>
703 * sem_ch13.adb: sem_ch13.adb (Add_Predicates): Undo analysis
704 of original expression in ASIS mode: does not solve the ASIS
705 problem of a usable type information, and crashes the back-end
706 when performing type annotations.
708 2015-05-26 Robert Dewar <dewar@adacore.com>
710 * sem_disp.adb (Inherited_Subprograms): Add One_Only parameter.
711 (Is_Overriding_Subprogram): Use One_Only_Parameter.
712 * sem_disp.ads (Inherited_Subprograms): Add One_Only parameter.
714 2015-05-26 Robert Dewar <dewar@adacore.com>
716 * exp_prag.adb, sem_ch3.adb, sem_ch5.adb, exp_ch11.adb, ghost.adb,
717 exp_ch6.adb, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb, sem_ch13.adb,
718 exp_ch3.adb: Minor reformatting.
720 2015-05-26 Bob Duff <duff@adacore.com>
722 * treepr.adb: Minor improvement to debugging routines (pp, pn)
723 robustness. Rearrange the code so passing a nonexistent Node_Id
724 prints "No such node" rather than crashing, and causing gdb to
725 generate confusing messages.
727 2015-05-26 Gary Dismukes <dismukes@adacore.com>
729 * sem_util.adb: Minor typo fix.
731 2015-05-26 Yannick Moy <moy@adacore.com>
733 * sem_aux.adb (Subprogram_Body_Entity): Deal with subprogram stubs.
735 2015-05-26 Hristian Kirtchev <kirtchev@adacore.com>
737 * exp_ch3.adb (Expand_N_Full_Type_Declaration): Capture, set and
738 restore the Ghost mode.
739 (Expand_N_Object_Declaration): Capture, set and restore the Ghost mode.
740 (Freeze_Type): Update the call to Set_Ghost_Mode.
741 (Restore_Globals): New routine.
742 * exp_ch5.adb Add with and use clauses for Ghost.
743 (Expand_N_Assignment_Statement): Capture, set and restore the
745 (Restore_Globals): New routine.
746 * exp_ch6.adb Add with and use clauses for Ghost.
747 (Expand_N_Procedure_Call_Statement): Capture, set and
748 restore the Ghost mode.
749 (Expand_N_Subprogram_Body):
750 Code cleanup. Capture, set and restore the Ghost mode.
751 (Expand_N_Subprogram_Declaration): Capture, set and restore the
753 (Restore_Globals): New routine.
754 * exp_ch7.adb Add with and use clauses for Ghost.
755 (Expand_N_Package_Body): Capture, set and restore the Ghost mode.
756 (Expand_N_Package_Declaration): Capture, set and restore the
758 (Wrap_HSS_In_Block): Create a proper identifier for the block.
759 * exp_ch8.adb Add with and use clauses for Ghost.
760 (Expand_N_Exception_Renaming_Declaration): Code
761 cleanup. Capture, set and restore the Ghost mode.
762 (Expand_N_Object_Renaming_Declaration): Capture, set and restore
764 (Expand_N_Package_Renaming_Declaration): Capture, set and restore the
766 (Expand_N_Subprogram_Renaming_Declaration): Capture, set and
767 restore the Ghost mode.
768 * exp_ch11.adb (Expand_N_Exception_Declaration): Code
769 cleanup. Capture, set and restore the Ghost mode.
770 * exp_disp.adb (Make_DT): Update the call to Set_Ghost_Mode. Do
771 not initialize the dispatch table slot of a Ghost subprogram.
772 * exp_prag.adb Add with and use clauses for Ghost.
773 (Expand_Pragma_Check): Capture, set and restore the Ghost mode.
774 (Expand_Pragma_Contract_Cases): Capture, set and restore the
776 (Expand_Pragma_Initial_Condition): Capture, set and
777 restore the Ghost mode.
778 (Expand_Pragma_Loop_Variant): Capture,
779 set and restore the Ghost mode.
780 (Restore_Globals): New routine.
781 * exp_util.adb Add with and use clauses for Ghost.
782 (Make_Predicate_Call): Code cleanup. Capture, set and restore
784 (Restore_Globals): New routine.
785 * freeze.adb (Freeze_Entity): Code cleanup. Update the call
787 * ghost.adb Add with and use clause for Sem_Prag.
788 (Check_Ghost_Completion): Code cleanup.
789 (Check_Ghost_Overriding): New routine.
790 (Check_Ghost_Policy): Code cleanup.
791 (Ghost_Entity): New routine.
792 (Is_Ghost_Declaration): Removed.
793 (Is_Ghost_Statement_Or_Pragma): Removed.
794 (Is_OK_Context): Reimplemented.
795 (Is_OK_Declaration): New routine.
796 (Is_OK_Pragma): New routine.
797 (Is_OK_Statement): New routine.
798 (Mark_Full_View_As_Ghost): New routine.
799 (Mark_Pragma_As_Ghost): New routine.
800 (Mark_Renaming_As_Ghost): New routine.
801 (Propagate_Ignored_Ghost_Code): Update the comment on usage.
802 (Set_From_Entity): New routine.
803 (Set_From_Policy): New routine.
804 (Set_Ghost_Mode): This routine now handles pragmas and freeze nodes.
805 (Set_Ghost_Mode_For_Freeze): Removed.
806 (Set_Ghost_Mode_From_Entity): New routine.
807 (Set_Ghost_Mode_From_Policy): Removed.
808 * ghost.ads (Check_Ghost_Overriding): New routine.
809 (Mark_Full_View_As_Ghost): New routine.
810 (Mark_Pragma_As_Ghost): New routine.
811 (Mark_Renaming_As_Ghost): New routine.
812 (Set_Ghost_Mode): Update the parameter profile. Update the
814 (Set_Ghost_Mode_For_Freeze): Removed.
815 (Set_Ghost_Mode_From_Entity): New routine.
816 * sem_ch3.adb (Analyze_Full_Type_Declaration):
817 Capture and restore the Ghost mode. Mark a type
818 as Ghost regardless of whether it comes from source.
819 (Analyze_Incomplete_Type_Decl): Capture, set and restore the
821 (Analyze_Number_Declaration): Capture and restore the Ghost mode.
822 (Analyze_Object_Declaration): Capture and restore the Ghost mode.
823 (Analyze_Private_Extension_Declaration): Capture and
824 restore the Ghost mode.
825 (Analyze_Subtype_Declaration): Capture and restore the Ghost mode.
826 (Process_Full_View): The full view inherits all Ghost-related
827 attributes from the private view.
828 (Restore_Globals): New routine.
829 * sem_ch5.adb (Analyze_Assignment): Capture and restore the
831 (Restore_Globals): New routine.
832 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration):
833 Code cleanup. Capture and restore the Ghost mode. Mark a
834 subprogram as Ghost regarless of whether it comes from source.
835 (Analyze_Procedure_Call): Capture and restore the Ghost mode.
836 (Analyze_Subprogram_Body_Helper): Capture and restore the Ghost mode.
837 (Analyze_Subprogram_Declaration): Capture and restore the Ghost mode.
838 (New_Overloaded_Entity): Ensure that a
839 parent subprogram and an overriding subprogram have compatible
841 * sem_ch7.adb (Analyze_Package_Body_Helper): Capture and restore
843 (Analyze_Package_Declaration): Capture and
844 restore the Ghost mode. Mark a package as Ghost when it is
845 declared in a Ghost region.
846 (Analyze_Private_Type_Declaration): Capture and restore the Ghost mode.
847 (Restore_Globals): New routine.
848 * sem_ch8.adb (Analyze_Exception_Renaming): Code
849 reformatting. Capture and restore the Ghost mode. A renaming
850 becomes Ghost when its name references a Ghost entity.
851 (Analyze_Generic_Renaming): Capture and restore the Ghost mode. A
852 renaming becomes Ghost when its name references a Ghost entity.
853 (Analyze_Object_Renaming): Capture and restore the Ghost mode. A
854 renaming becomes Ghost when its name references a Ghost entity.
855 (Analyze_Package_Renaming): Capture and restore the Ghost mode. A
856 renaming becomes Ghost when its name references a Ghost entity.
857 (Analyze_Subprogram_Renaming): Capture and restore the Ghost
858 mode. A renaming becomes Ghost when its name references a
860 * sem_ch11.adb (Analyze_Exception_Declaration): Capture, set
861 and restore the Ghost mode.
862 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Capture and
863 restore the Ghost mode.
864 (Analyze_Generic_Subprogram_Declaration):
865 Capture and restore the Ghost mode.
866 * sem_ch13.adb Add with and use clauses for Ghost.
867 (Add_Invariant): New routine.
868 (Add_Invariants): Factor out code.
869 (Add_Predicate): New routine.
870 (Add_Predicates): Factor out code.
871 (Build_Invariant_Procedure_Declaration): Code cleanup. Capture,
872 set and restore the Ghost mode.
873 (Build_Invariant_Procedure): Code cleanup.
874 (Build_Predicate_Functions): Capture, set and
875 restore the Ghost mode. Mark the generated functions as Ghost.
876 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
877 Capture, set and restore the Ghost mode.
878 (Analyze_External_Property_In_Decl_Part): Capture, set and restore
880 (Analyze_Initial_Condition_In_Decl_Part):
881 Capture, set and restore the Ghost mode.
883 Code cleanup. Capture, set and restore the Ghost mode. Flag
884 pragmas Linker_Section, No_Return, Unmodified, Unreferenced and
885 Unreferenced_Objects as illegal when it applies to both Ghost
886 and living arguments. Pragma Ghost cannot apply to synchronized
888 (Check_Kind): Moved to the spec of Sem_Prag.
889 (Process_Inline): Flag the pragma as illegal when it applies to
890 both Ghost and living arguments.
891 (Restore_Globals): New routine.
892 * sem_prag.ads Add pragma Default_Initial_Condition
893 to table Assertion_Expression_Pragma. Add new table
894 Is_Aspect_Specifying_Pragma.
895 (Check_Kind): Moved from body of Sem_Prag.
896 * sem_util.adb Add with and use clauses for Ghost.
897 (Build_Default_Init_Cond_Procedure_Body): Capture, set and restore
899 (Build_Default_Init_Cond_Procedure_Declaration):
900 Capture, set and restore the Ghost mode. Mark the default
901 initial condition procedure as Ghost when it is declared
903 (Is_Renaming_Declaration): New routine.
904 (Policy_In_List): Account for the single argument version of
906 * sem_util.ads (Is_Renaming_Declaration): New routine.
907 * sinfo.adb (Is_Ghost_Pragma): New routine.
908 (Set_Is_Ghost_Pragma): New routine.
909 * sinfo.ads New attribute Is_Ghost_Pragma.
910 (Is_Ghost_Pragma): New routine along with pragma Inline.
911 (Set_Is_Ghost_Pragma): New routine along with pragma Inline.
913 2015-05-26 Robert Dewar <dewar@adacore.com>
915 * sem_ch3.adb, sem_aux.adb, sem_aux.ads, exp_ch6.adb, sprint.adb:
918 2015-05-26 Gary Dismukes <dismukes@adacore.com>
920 * gnat1drv.adb, targparm.adb, targparm.ads, restrict.adb: Minor
921 reformatting and typo fixes in comments.
923 2015-05-26 Ed Schonberg <schonberg@adacore.com>
925 * sem_ch7.adb (Swap_Private_Dependets): Set visibility of
926 the two views of a private dependent in two separate steps,
927 to ensure proper visibility in parent units analyzed for inlining.
929 2015-05-26 Yannick Moy <moy@adacore.com>
931 * sem_aux.adb, sem_aux.ads (Get_Low_Bound): Use Type_Low_Bound.
932 (Package_Body, Package_Spec): New queries moved
934 (Package_Specification): Simplify query to remove use of loop.
935 * sem_util.adb, sem_util.ads (Enclosing_Declaration,
936 Enclosing_Package_Or_Subprogram, Is_Attribute_Update): New
937 queries moved here from GNATprove.
939 2015-05-26 Bob Duff <duff@adacore.com>
941 * einfo.adb, einfo.ads, sprint.adb, lib-xref.ads: Minor cleanup: Remove
942 obsolete Entity_Kinds E_String_Type and E_String_Subtype. Update
943 redundant assertions.
945 2015-05-26 Gary Dismukes <dismukes@adacore.com>
947 * sem_util.adb, sem_util.ads, sem_ch13.adb: Minor typo fixes.
949 2015-05-26 Doug Rupp <rupp@adacore.com>
951 * init.c [vxworks]: Refine previous checkin.
953 2015-05-26 Robert Dewar <dewar@adacore.com>
955 * exp_ch4.adb (Wrap_MA): New function.
956 (Expand_N_Op_Expon): Use Wrap_MA.
958 2015-05-26 Bob Duff <duff@adacore.com>
960 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
961 Do not use secondary stack to return limited records with
962 defaulted discriminants. This is an efficiency improvement.
963 * exp_ch6.adb, exp_dist.adb, sem_attr.adb, sem_aux.adb, sem_aux.ads,
964 sem_ch12.adb, sem_ch3.adb, sem_ch4.adb, sem_ch6.adb, sem_ch7.adb,
965 sem_util.adb: Change the sense of Is_Indefinite_Subtype to be
966 Is_Definite_Subtype. This is an improvement to readability (the double
967 negative in "not Is_Indefinite_Subtype" was slightly confusing). Also
968 disallow passing non-[sub]type entities, an unnecessary and slightly
969 bug-prone flexibility.
971 2015-05-26 Robert Dewar <dewar@adacore.com>
973 * sem_aggr.adb (Resolve_Array_Aggregate): Defend against
975 * debug.adb: Document -gnatd.k.
976 * erroutc.adb (Set_Msg_Insertion_Line_Number): Implement -gnatd.k.
978 2015-05-26 Robert Dewar <dewar@adacore.com>
980 * gnat1drv.adb (Gnat1drv): Provide new arguments for
981 Get_Target_Parameters.
982 * restrict.adb (Set_Restriction_No_Specification_Of_Aspect):
984 (Set_Restriction_No_Use_Of_Attribute): new procedure.
985 * restrict.ads (Set_Restriction_No_Specification_Of_Aspect):
987 (Set_Restriction_No_Use_Of_Attribute): new procedure.
988 * s-rident.ads (Integer_Parameter_Restrictions): New subtype.
989 * targparm.adb (Get_Target_Parameters): Allow new restriction
990 pragmas No_Specification_Of_Aspect No_Use_Of_Attribute
992 * targparm.ads: New parameters for Get_Target_Parameters.
993 * tbuild.adb (Set_NOD): New name for Set_RND.
994 (Set_NSA): New procedure.
995 (Set_NUA): New procedure.
996 (Set_NUP): New procedure.
997 * tbuild.ads (Make_SC): Minor reformatting.
998 (Set_NOD): New name for Set_RND.
999 (Set_NSA, Set_NUA, Set_NUP): New procedure.
1001 2015-05-26 Ed Schonberg <schonberg@adacore.com>
1003 * a-stwise.adb (Find_Token): If source'first is not positive,
1004 an exception must be raised, as specified by RM 2005 A.4.3
1005 (68/1). This must be checked explicitly, given that run-time
1006 files are normally compiled without constraint checks.
1007 * a-stzsea.adb (Find_Token): Ditto.
1009 2015-05-26 Ed Schonberg <schonberg@adacore.com>
1011 * sem_util.ads sem_util.adb (Is_Current_Instance): New predicate
1012 to fully implement RM 8.6 (17/3). which earlier only applied
1013 to synchronized types. Used to preanalyze aspects that include
1014 current instances of types, such as Predicate and Invariant.
1015 * sem_res.adb (Resolve_Entity_Name): Use Is_Current_Instance.
1016 * sem_ch13.adb (Add_Predicates): In ASIS mode, preserve original
1017 expression of aspect and analyze it to provide proper type
1020 2015-05-26 Robert Dewar <dewar@adacore.com>
1022 * rtsfind.ads: Add entries for RE_Exn[_Long]_Float.
1023 * s-exnllf.adb (Exn_Float): New function.
1024 (Exn_Long_Float): New function.
1025 (Exn_Long_Long_Float): Rewritten interface.
1026 (Exp): New name for what used to be Exn_Long_Long_Float.
1027 * s-exnllf.ads (Exn_Float): New function.
1028 (Exn_Long_Float): New function.
1030 2015-05-26 Ed Schonberg <schonberg@adacore.com>
1032 * sem_ch8.adb (Find_Selected_Component): Do not emit an error
1033 on a selected component when the prefix is a type name that is
1035 * einfo.ads: Minor grammar fix.
1037 2015-05-26 Doug Rupp <rupp@adacore.com>
1039 * init.c [vxworks] (sysLib.h): Only for x86.
1041 2015-05-26 Doug Rupp <rupp@adacore.com>
1043 * init-vxsim.c (CPU): define as __VXSIM_CPU__
1044 * sigtramp-vxworks-vxsim.c (CPU): Likewise.
1045 sigtramp-vxworks-target.inc: Add check for SIMLINUX.
1046 * sigtramp.h: Likewise.
1048 2015-05-26 Robert Dewar <dewar@adacore.com>
1050 * sem_aux.adb, sem_disp.adb, sem_util.ads: Add comment.
1051 * sem_util.adb: Minor reformatting
1053 2015-05-26 Yannick Moy <moy@adacore.com>
1055 * inline.adb (Has_Initialized_Type): Adapt to new names.
1056 * sem_aux.adb, sem_aux.ads (Get_Low_Bound, Number_Components,
1057 Subprogram_Body, Subprogram_Body_Entity, Subprogram_Spec,
1058 Subprogram_Specification): New query functions used in GNATprove.
1059 * sem_disp.adb, sem_disp.ads (Is_Overriding_Subprogram): New
1060 query functions used in GNATprove.
1061 * sem_util.adb, sem_util.adso (Enclosing_Lib_Unit_Node,
1062 Get_Cursor_Type, Get_Return_Object, Get_User_Defined_Eq,
1063 Is_Double_Precision_Floating_Point_Type,
1064 Is_Single_Precision_Floating_Point_Type): New query functions
1067 2015-05-26 Bob Duff <duff@adacore.com>
1069 * s-rpc.ads (Partition_ID): Increase maximum Partition_ID to
1071 * a-except-2005.adb, a-except-2005.ads, a-except.adb,
1072 a-except.ads, a-exexda.adb, a-exstat.adb: Minor comment fixes.
1074 2015-05-26 Robert Dewar <dewar@adacore.com>
1076 * sinfo.adb: Minor comment addition.
1077 * einfo.adb: Minor whitespace and punctuation fix.
1078 * sem_util.adb: Minor editing of comments.
1080 2015-05-26 Ed Schonberg <schonberg@adacore.com>
1082 * sem_ch7.adb (Install_Private_Declarations,
1083 Swap_Private_Dependents): Ensure that both views of the dependent
1084 subtype are immediately visible if we are within their scope. This
1085 may be needed when a procedure body is both the parent of an
1086 instantiated child unit, and is itself used to inline a local
1089 2015-05-26 Gary Dismukes <dismukes@adacore.com>
1091 * exp_prag.adb, gnat1drv.adb: Minor reformatting.
1093 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
1095 * exp_ch4.adb (Expand_N_Indexed_Component): In the circuit
1096 detecting exceptions to the rewriting, deal with implicit
1097 dereferences in the selected component case.
1099 2015-05-26 Bob Duff <duff@adacore.com>
1101 * sem_ch13.adb (Analyze_One_Aspect): Do not
1102 require the expression of the Disable_Controlled aspect to be
1103 static in a generic template, because 'Enabled is not known
1106 2015-05-26 Doug Rupp <rupp@adacore.com>
1108 * init-vxsim.c: New file for vxsim ZCX
1109 * sigtramp-vxworks-vxsim.c: Likewise.
1110 * sigtramp-vxworks.c: Factor out target dependent bits into ...
1111 * sigtramp-vxworks-target.inc: ... here.
1112 * sigtramp.h: Add vxsim zcx protos.
1113 * init.c [vxworks...] (sysLib.h): Include.
1114 (__gnat_map_signal): Make global.
1115 [...i386] (__gnat_error_handler): Call __gnat_vxsim_error_handler if
1117 [...i386] (__gnat_install_handler): Test if on vxsim.
1119 2015-05-26 Ed Schonberg <schonberg@adacore.com>
1121 * sem_ch5.adb (Analyze_Iterator_Specification): For an element
1122 iterator over an array, if the component is aliased, the loop
1123 variable is aliased as well.
1125 2015-05-26 Ed Schonberg <schonberg@adacore.com>
1127 * exp_ch6.adb (Expand_Actuals): For a function call with in-out
1128 parameters that is rewritten as an expression_with_actions,
1129 we preserve the original function call node for further use by
1130 the caller (typically Expand_Call). In the presence of validity
1131 checks, that function call, though it is labelled Analyzed to
1132 prevent an infinite recursion, may be rewritten as a temporary
1133 by Remove_Side_Effects. Ensure that the caller has access to
1134 the original function call to continue expansion.
1135 * atree.ads: Minor typo in comment.
1137 2015-05-26 Javier Miranda <miranda@adacore.com>
1139 * sem_util.adb (Check_Function_Writable_Actuals):
1140 Add missing support to check the violation of writable actuals
1141 in array aggregates that have a nonstatic range.
1143 2015-05-26 Hristian Kirtchev <kirtchev@adacore.com>
1145 * exp_ch6.adb (Process_Contract_Cases_For): Update the call to
1146 Expand_Pragma_Contract_Cases.
1147 * exp_prag.ads, exp_prag.adb (Expand_Contract_Cases): Rename to
1148 Expand_Pragma_Contract_Cases.
1149 * sem_ch13.adb (Add_Invariants): Use the original aspect name
1150 when creating the arguments of pragma Check. This ensures that
1151 'Class is properly recognized and handled.
1153 2015-05-26 Arnaud Charlet <charlet@adacore.com>
1155 * gnat1drv.adb: Minor adjustments.
1156 (Adjust_Global_Switches): Disable some related flags in CodePeer mode.
1157 * sem_ch4.adb (Has_Arbitrary_Evaluation_Order,
1158 Stop_Subtree_Climbind): Code cleanup.
1159 * einfo.ads: Minor comment change.
1161 2015-05-26 Javier Miranda <miranda@adacore.com>
1163 * sem_aggr.adb (Resolve_Aggregate, Resolve_Extension_Aggregate):
1165 * sem_ch3.adb (Build_Derived_Record_Type,
1166 Record_Type_Declaration): Code cleanup.
1167 * sem_ch4.adb (Has_Arbitrary_Evaluation_Order,
1168 Stop_Subtree_Climbind): Tables which speed up the identification
1169 of dangerous calls to Ada 2012 functions with writable actuals
1171 (Analyze_Arithmetic_Op, Analyze_Call, Analyze_Comparison_Op,
1172 Analyze_Equality_Op, Analyze_Logical_Op, Analyze_Membership_Op,
1173 Analyze_Range): Code cleanup.
1174 (Is_Arbitrary_Evaluation_Order_Construct): Removed.
1175 (Check_Writable_Actuals): Code cleanup using the added tables.
1176 * sem_util.adb (Check_Function_Writable_Actuals): Return
1177 immediately if the node does not have the flag Check_Actuals
1180 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
1182 * exp_ch6.adb (Add_Call_By_Copy_Code): Remove restrictive
1183 condition in the detection of the effects of Remove_Side_Effects.
1184 * exp_util.ads (Remove_Side_Effects): Add general and historical note.
1185 * exp_util.adb (Is_Name_Reference): New predicate.
1186 (Remove_Side_Effects): Use it in lieu of Is_Object_Reference
1187 in order to decide whether to use the renaming to capture the
1188 side effects of the subexpression.
1189 (Side_Effect_Free): Remove obsolete test.
1191 2015-05-26 Robert Dewar <dewar@adacore.com>
1193 * aspects.ads, aspects.adb: Add aspect Disable_Controlled.
1194 * einfo.ads, einfo.adb (Disable_Controlled): New flag.
1195 (Is_Controlled_Active): New function.
1196 * exp_ch3.adb (Expand_Freeze_Record_Type): Use
1197 Is_Controlled_Active.
1198 * exp_util.adb (Needs_Finalization): Finalization not needed
1199 if Disable_Controlled set.
1200 * freeze.adb (Freeze_Array_Type): Do not set
1201 Has_Controlled_Component if the component has Disable_Controlled.
1202 (Freeze_Record_Type): ditto.
1203 * sem_ch13.adb (Decorate): Minor reformatting.
1204 (Analyze_Aspect_Specifications): Implement Disable_Controlled.
1205 * sem_ch3.adb (Analyze_Object_Declaration): Handle
1207 (Array_Type_Declaration): ditto.
1208 (Build_Derived_Private_Type): ditto.
1209 (Build_Derived_Type): ditto.
1210 (Record_Type_Definition): ditto.
1211 * snames.ads-tmpl: Add Name_Disable_Controlled.
1213 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
1215 * exp_ch6.adb (Expand_Actuals): Use a constant declaration instead
1216 of a renaming to capture the return value of a function call.
1217 (Expand_Simple_Function_Return): Call Remove_Side_Effects
1218 instead of removing side effects manually before the call to
1221 2015-05-26 Robert Dewar <dewar@adacore.com>
1223 * exp_ch4.adb (Expand_N_Op_Expon): Deal with problem of wrong
1224 order in calling Duplicate_Subexpr.
1225 * einfo.ads: Fix documentation of Object/Value size for scalar types.
1227 2015-05-26 Ed Schonberg <schonberg@adacore.com>
1229 * exp_aggr.adb (Build_Array_Aggr_Code, Gen_Assign):
1230 If a component is default-initialized and its type has an
1231 invariant procedure, insert an invariant test after code for
1232 default-initialization of the component.
1234 2015-05-26 Gary Dismukes <dismukes@adacore.com>
1236 * einfo.ads, sem_util.adb, sem_ch4.adb: Minor reformatting.
1238 2015-05-26 Robert Dewar <dewar@adacore.com>
1240 * exp_unst.adb, exp_unst.ads: Change to using Subps table index for
1241 making AREC entity names unique.
1243 2015-05-26 Ed Schonberg <schonberg@adacore.com>
1245 * sem_cat.adb (Has_Stream_Attribute_Definition): If the type
1246 has aspect specifications, examine the corresponding list of
1247 representation items to determine whether there is a visible
1248 stream operation. The attribute definition clause generated from
1249 the aspect will be inserted at the freeze point of the type,
1250 which may be in the private part and not directly visible,
1251 but the aspect makes the operation available to a client.
1253 2015-05-26 Robert Dewar <dewar@adacore.com>
1255 * sem_util.adb: Minor code reorganization.
1256 * sem_ch6.adb: Minor reformatting.
1258 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
1260 * gcc-interface/utils.c (maybe_pad_type): Do not apply adjustment to
1261 original size for elementary types before issuing the size warning.
1263 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
1265 * get_targ.adb (C_Get_Float_Words_BE): Adjust import name.
1266 (C_Get_Words_BE): Likewise.
1267 (C_Get_Bytes_BE): Likewise.
1268 (C_Get_Bits_BE): Likewise.
1269 (Width_From_Size): Remove superfluous space.
1270 * gcc-interface/targtyps.c (get_float_words_be): Rename into...
1271 (get_target_float_words_be): ...this.
1272 (get_words_be): Rename into...
1273 (get_target_words_be): ...this.
1274 (get_bytes_be): Rename into...
1275 (get_target_bytes_be): ...this.
1276 (get_bits_be): Rename into...
1277 (get_target_bits_be): ...this.
1278 * gcc-interface/gigi.h (standard_datatypes): Remove ADT_ptr_void_type.
1279 (ptr_void_type_node): Delete.
1280 (get_target_float_size): Likewise.
1281 (get_target_double_size): Likewise.
1282 (get_target_long_double_size): Likewise.
1283 (get_float_words_be): Likewise.
1284 (get_words_be): Likewise.
1285 (get_bytes_be): Likewise.
1286 (get_bits_be): Likewise.
1287 (get_target_float_words_be): Declare.
1288 (get_target_words_be): Likewise.
1289 (get_target_bytes_be): Likewise.
1290 (get_target_bits_be): Likewise.
1291 * gcc-interface/decl.c (gnat_to_gnu_entity): Replace ptr_void_type_node
1293 (intrin_return_compatible_p): Likewise.
1294 * gcc-interface/trans.c (gigi): Likewise.
1295 * gcc-interface/utils2.c (maybe_wrap_malloc): Likewise.
1296 (maybe_wrap_free): Likewise.
1297 * gcc-interface/utils.c (maybe_pad_type): Remove superfluous space.
1298 * gcc-interface/misc.c (gnat_init): Do not set ptr_void_type_node.
1300 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
1302 * gcc-interface/decl.c (elaborate_expression): Take a const string
1303 suffix instead of a tree.
1304 (elaborate_expression_1): Likewise.
1305 (elaborate_expression_2): Likewise.
1306 (gnat_to_gnu_entity): Adjust to above changes.
1307 (build_subst_list): Likewise.
1308 (get_entity_char): New static function.
1310 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
1312 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: Move around.
1313 <E_Exception>: Merge with E_Variable case.
1314 <E_Variable>: Remove 'object' label.
1316 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
1318 * gcc-interface/decl.c (gnat_to_gnu_entity): Minor tweak.
1319 * gcc-interface/trans.c (finalize_nrv_unc_r): Use CONSTRUCTOR_ELT.
1320 * gcc-interface/utils.c (convert): Likewise and simplify.
1321 (remove_conversions): Likewise.
1322 * gcc-interface/utils2.c (compare_fat_pointers): Likewise.
1323 (build_unary_op): Likewise and simplify.
1325 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
1327 * gcc-interface/gigi.h (build_atomic_load): Adjust prototype.
1328 (build_atomic_store): Likewise.
1329 (build_load_modify_store): Declare.
1330 (VECTOR_TYPE_P): Delete.
1331 * gcc-interface/decl.c (gnat_to_gnu_entity): Replace Is_Atomic with
1332 Is_Atomic_Or_VFA throughout.
1333 <E_Array_Type>: Build a variant of the XUA type instead of forcing
1334 TYPE_VOLATILE on it.
1335 <E_Array_Subtype>: Use the main variant of the base type.
1336 Do not force TYPE_VOLATILE on the type being built.
1337 <E_Record_Type>: Likewise.
1338 <E_Array_Subtype>: Likewise.
1339 <E_Subprogram_Type>: Rename local variable.
1340 Add Atomic qualifier in conjunction with Volatile on types if needed.
1341 Force BLKmode for by-ref types only at the end of the processing.
1342 Change qualifiers only after changing the mode of the type. Set
1343 TYPE_UNIVERSAL_ALIASING_P on the type directly.
1344 (check_ok_for_atomic_type): Issue specific error message for VFA.
1345 (gnat_to_gnu_component_type): Replace Is_Atomic with
1346 Is_Atomic_Or_VFA throughout.
1347 * gcc-interface/misc.c (gnat_get_alias_set): Test
1348 TYPE_UNIVERSAL_ALIASING_P on the type directly.
1349 * gcc-interface/trans.c (lvalue_required_p): Replace Is_Atomic with
1350 Is_Atomic_Or_VFA throughout. Add missing guard.
1351 (node_is_atomic): New predicate.
1352 (node_has_volatile_full_access): Likewise.
1353 (gnat_strip_type_conversion): New function.
1354 (outer_atomic_access_required_p): New predicate.
1355 (atomic_sync_required_p): Rename into...
1356 (atomic_access_required_p): ...this. Add SYNC parameter, scan the
1357 parent node first and then look for the atomic setting. Add support
1358 for Volatile_Full_Access.
1359 (Call_to_gnu): Add atomic_access and outer_atomic_access parameters
1360 and adjusts calls to above functions. Use load-modify-store sequence
1361 for updates of In/Out and Out parameters if required, as well as for
1362 moving the result to the target if required. Add couple of missing
1364 (gnat_to_gnu): Adjust calls to above functions.
1365 <N_Object_Renaming_Declaration>: If the renamed object has side-effects
1366 evaluate only its address.
1367 <N_Assignment_Statement>: Adjust call to Call_to_gnu. Use load-modify
1368 store sequence if required.
1369 <N_Function_Call>: Adjust call to Call_to_gnu.
1370 (extract_values): Adjust comment.
1371 * gcc-interface/utils2.c (build_atomic_load): Add SYNC parameter and
1372 use relaxed memory model if it is not set.
1373 (build_atomic_store): Likewise.
1374 (call_is_atomic_load): New predicate.
1375 (build_load_modify_store): New function.
1376 (build_binary_op) <MODIFY_EXPR>: Accept SAVE_EXPR on the LHS.
1377 (gnat_stabilize_reference) <CALL_EXPR>: Deal with atomic loads.
1379 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
1381 * gcc-interface/ada-tree.h (DECL_RENAMING_GLOBAL_P): Rename into...
1382 (DECL_GLOBAL_NONCONSTANT_RENAMING_P): ...this.
1383 * gcc-interface/gigi.h (record_global_renaming_pointer): Delete.
1384 (invalidate_global_renaming_pointers): Likewise.
1385 (record_global_nonconstant_renaming): New.
1386 (invalidate_global_nonconstant_renamings): Likewise.
1387 (get_inner_constant_reference): Likewise.
1388 (gnat_constant_reference_p): Likewise.
1389 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Adjust to above
1390 and register the renaming pointer only if the object is non-constant.
1391 (elaborate_expression_1): Call get_inner_constant_reference instead
1392 of get_inner_reference.
1393 * gcc-interface/trans.c (fold_constant_decl_in_expr): Minor tweak.
1394 (Identifier_to_gnu): Adjust to above and do not recheck the renamed
1395 object before substituting it.
1396 (Compilation_Unit_to_gnu): Adjust to above renaming. Minor tweaks.
1397 (gnat_to_gnu) <N_Object_Renaming_Declaration>: Do not return the
1398 result at the global level.
1399 (N_Exception_Renaming_Declaration): Likewise.
1400 * gcc-interface/utils.c (global_renaming_pointers): Rename into...
1401 (global_nonconstant_renamings): ...this.
1402 (destroy_gnat_utils): Adjust to above renaming.
1403 (record_global_renaming_pointer): Rename into...
1404 (record_global_nonconstant_renaming): ...this.
1405 (invalidate_global_renaming_pointers): Rename into...
1406 (invalidate_global_nonconstant_renamings): ...this and do not recheck
1407 the renamed object before invalidating.
1408 * gcc-interface/utils2.c (gnat_stabilize_reference): Minor tweak.
1409 (get_inner_constant_reference): New public function.
1410 (gnat_constant_reference_p): New predicate.
1412 2015-05-25 Javier Miranda <miranda@adacore.com>
1414 * einfo.ads, einfo.adb (Has_Out_Or_In_Out_Parameter): This attribute
1415 is now present in subprograms, generic subprograms, entries and
1417 * sem_ch6.adb (Set_Formal_Mode): Set As_Out_Or_In_Out_Parameter
1418 on entries, entry families, subprograms and generic subprograms.
1419 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration):
1420 Minor code reorganization to ensure that the Ekind attribute
1421 of the subprogram entity is set before its formals are
1422 processed. Required to allow the use of the attribute
1423 Has_Out_Or_In_Out_Parameter on the subprogram entity.
1424 * sem_aggr.adb (Resolve_Aggregate, Resolve_Extension_Aggregate):
1425 Perform the check on writable actuals only if the value of some
1426 component of the aggregate involves calling a function with
1427 out-mode parameters.
1428 (Resolve_Record_Aggregate): Propagate the Check_Actuals flag to the
1429 internally built aggregate.
1430 * sem_ch3.adb (Build_Derived_Record_Type, Record_Type_Declaration):
1431 Perform the check on writable actuals only if the initialization of
1432 some component involves calling a function with out-mode parameters.
1433 * sem_ch4.adb (Analyze_Arithmetic_Op, Analyze_Comparison_Op,
1434 Analyze_Equality_Op, Analyze_Logical_Op, Analyze_Membership_Op,
1435 Analyze_Range): Check writable actuals only if the
1436 subtrees have a call to a function with out-mode parameters
1437 (Analyze_Call.Check_Writable_Actuals): New subprogram. If the call
1438 has out or in-out parameters then mark its outermost enclosing
1439 construct as a node on which the writable actuals check must
1441 (Analyze_Call): Check if the flag must be set and if the outermost
1442 enclosing construct.
1443 * sem_util.adb (Check_Function_Writable_Actuals): Code cleanup
1444 and reorganization. We skip processing aggregate discriminants
1445 since their precise analysis involves two phases traversal.
1446 * sem_res.adb (Resolve_Actuals, Resolve_Arithmetic_Op,
1447 Resolve_Logical_Op, Resolve_Membership_Op): Remove call to
1448 check_writable_actuals.
1450 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1452 * sem_ch3.adb (Constrain_Concurrent): If the context is a
1453 type declaration, generate an Itype_Reference for the anonymous
1454 subtype, to force elaboration at this point in gigi.
1456 2015-05-22 Gary Dismukes <dismukes@adacore.com>
1458 * layout.adb, einfo.ads, sem_ch12.adb, freeze.adb, sem_util.ads,
1459 exp_ch4.adb, sem_ch6.adb: Minor reformatting and typo fixes.
1461 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1463 * sem_res.adb (Resolve_Actuals): If the call is to an overridden
1464 operation, replace the names of the actuals in named associations
1465 with the names of the actuals of the subprogram that is eventually
1466 executed. The names of the formals and the defaults can differ
1467 between the two operations when they are operations of a formal
1470 2015-05-22 Bob Duff <duff@adacore.com>
1472 * a-convec.ads, a-convec.adb (Append): Check for fast path. Split
1473 out slow path into separate procedure. Inline Append. Fast path
1474 now avoids calling Insert.
1475 (Finalize): Do the busy checking last, so the container gets emptied.
1476 (Insert, Insert_Space): Remove redundancy.
1478 2015-05-22 Robert Dewar <dewar@adacore.com>
1480 * switch-c.adb (Scan_Front_End_Switches): Insist on -gnatc
1483 2015-05-22 Arnaud Charlet <charlet@adacore.com>
1485 * gnatvsn.ads: Minor code reorg to remember more easily to update
1488 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1490 * sem_ch10.adb (Analyze_With_Clause): In ASIS_Mode, a
1491 limited_with clause on a predefined unit is not transformed into
1492 a regular with_clause, to preserve the original tree structure.
1493 * sinfo.ads (N_With_Clause): Add comment on handling of
1495 * sem_ch10.adb: Minor reformatting.
1497 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1499 * sem_ch8.adb (Freeze_Profile): A limited view of a type in
1500 the profile of a subprogram renaming does not require freezing,
1501 because it is declared in a different unit.
1503 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1505 * exp_aggr.adb (Get_Constraint_Association): If type (of ancestor
1506 composite type) is private, go to full view. This was previously
1507 done only in an instance context, but is happen whenever a chain
1508 of private extensions includes one inherited discriminant.
1510 2015-05-22 Robert Dewar <dewar@adacore.com>
1512 * einfo.ads: Minor comment updates.
1513 * exp_unst.adb: Move Subps table to spec Don't remove old entries
1514 from table Add Last field to record last entry used.
1515 * exp_unst.ads: Move Subps table here from body So that Cprint
1516 can access saved values.
1518 2015-05-22 Bob Duff <duff@adacore.com>
1520 * a-cdlili.adb, a-cdlili.ads, a-cohama.adb, a-cohama.ads,
1521 * a-cohase.adb, a-cohase.ads, a-convec.adb, a-convec.ads,
1522 * a-coorma.adb, a-coorma.ads, a-coorse.adb, a-coorse.ads:
1523 (Pseudo_Reference, Element_Access, Get_Element_Access): New
1524 declarations added for use by performance improvements in exp_ch5.adb.
1525 * snames.ads-tmpl: New names referenced by exp_ch5.adb.
1526 * exp_ch5.adb: Speed up "for ... of" loops for predefined containers.
1527 Instead of doing literally what the RM calls for, we do something
1528 equivalent that avoids expensive operations inside the loop. If the
1529 container package has appropriate Next, Pseudo_Reference,
1530 Element_Access, Get_Element_Access declarations, we invoke the
1532 * snames.ads-tmpl: Note speed improvement.
1534 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
1536 * einfo.ads (Is_Atomic_Or_VFA): Move to XEINFO INLINES section.
1537 * xeinfo.adb: Replace a-einfo.h with einfo.h throughout.
1538 Add pattern to translate "or else" into "||".
1540 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
1542 * einfo.ads (Has_Volatile_Full_Access): Rename into...
1543 (Is_Volatile_Full_Access): ...this.
1544 (Set_Has_Volatile_Full_Access): Rename into...
1545 (Set_Is_Volatile_Full_Access): ...this.
1546 * einfo.adb (Has_Volatile_Full_Access): Rename into...
1547 (Is_Volatile_Full_Access): ...this.
1548 (Set_Has_Volatile_Full_Access): Rename into...
1549 (Set_Is_Volatile_Full_Access): ...this.
1550 (Is_Atomic_Or_VFA): Adjust to above renaming.
1551 * errout.adb (Special_Msg_Delete): Likewise.
1552 * exp_pakd.adb (Install_PAT): Likewise.
1553 * freeze.adb (Freeze_Array_Type): Likewise.
1554 * sem_ch8.adb (Analyze_Object_Renaming): Likewise.
1555 * sem_ch13.adb (Inherit_Delayed_Rep_Aspects): Likewise.
1556 (Inherit_Aspects_At_Freeze_Point): Likewise.
1557 * sem_prag.adb (Set_Atomic_VFA): Likewise.
1558 (Process_Atomic_Independent_Shared_Volatile): Likewise.
1559 * sem_util.adb (Is_Atomic_Or_VFA_Object): Likewise.
1561 2015-05-22 Robert Dewar <dewar@adacore.com>
1563 * exp_ch5.adb, layout.adb, einfo.adb, einfo.ads, sem_prag.adb,
1564 freeze.adb, freeze.ads, sem_util.adb, sem_util.ads, exp_ch2.adb,
1565 exp_ch4.adb, errout.adb, exp_aggr.adb, sem_ch13.adb: This is a general
1566 change that deals with the fact that most of the special coding for
1567 Atomic should also apply to the case of Volatile_Full_Access.
1568 A new attribute Is_Atomic_Or_VFA is introduced, and many of the
1569 references to Is_Atomic now use this new attribute.
1571 2015-05-22 Robert Dewar <dewar@adacore.com>
1573 * exp_ch4.adb (Expand_N_Op_Eq): Introduce 'Machine for 'Result
1576 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
1578 * sprint.adb (Source_Dump): When generating debug files, deal
1579 with the case of a stand-alone package instantiation by dumping
1580 together the spec and the body in the common debug file.
1582 2015-05-22 Robert Dewar <dewar@adacore.com>
1584 * sem_ch13.adb (Minimum_Size): Size is zero for null range
1587 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1589 * einfo.adb (Anonymous_Master): This attribute now applies
1590 to package and subprogram bodies.
1591 (Set_Anonymous_Master): This attribute now applies to package and
1593 (Write_Field36_Name): Add output for package and subprogram bodies.
1594 * einfo.ads Update the documentation on attribute Anonymous_Master
1595 along with occurrences in entities.
1596 * exp_ch4.adb (Create_Anonymous_Master): Reimplemented to
1597 handle spec and body anonymous masters of the same unit.
1598 (Current_Anonymous_Master): Reimplemented. Handle a
1599 package instantiation that acts as a compilation unit.
1600 (Insert_And_Analyze): Reimplemented.
1602 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1604 * sem_ch10.adb (Analyze_With_Clause): A limited_with_clause on a
1605 predefined unit is treated as a regular with_clause.
1607 2015-05-22 Robert Dewar <dewar@adacore.com>
1609 * sem_ch12.adb, prj.ads, makeutl.ads, sem_ch6.adb, prj-nmsc.adb,
1610 prj-conf.adb, sem_disp.adb: Minor reformatting.
1612 2015-05-22 Vincent Celier <celier@adacore.com>
1614 * clean.adb (Parse_Cmd_Line): For native gnatclean, check
1615 for switch -P and, if found and gprclean is available, invoke
1617 * make.adb (Initialize): For native gnatmake, check for switch -P
1618 and, if found and gprbuild is available, invoke silently gprbuild.
1620 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
1622 * sem_ch13.adb (Validate_Unchecked_Conversions): Also issue
1623 specific warning for discrete types when the source is larger
1626 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1628 * einfo.ads, einfo.adb (Incomplete_Actuals): New attribute of
1629 package instantiations. Holds the list of actuals in the instance
1630 that are incomplete types, to determine where the corresponding
1631 instance body must be placed.
1632 * sem_ch6.adb (Conforming_Types): An incomplete type used as an
1633 actual in an instance matches an incomplete formal.
1634 * sem_disp.adb (Check_Dispatching_Call): Handle missing case of
1635 explicit dereference.
1636 (Inherited_Subprograms): In the presence of a limited view there
1637 are no subprograms to inherit.
1638 * sem_ch12.adb (Preanalyze_Actuals): Build list of incomplete
1639 actuals of instance, for later placement of instance body and
1640 freeze nodes for actuals.
1641 (Install_Body): In the presence of actuals that incomplete types
1642 from a limited view, the instance body cannot be placed after
1643 the declaration because full views have not been seen yet. Any
1644 use of the non-limited views in the instance body requires
1645 the presence of a regular with_clause in the enclosing unit,
1646 and will fail if this with_clause is missing. We place the
1647 instance body at the beginning of the enclosing body, which is
1648 the unit being compiled, and ensure that freeze nodes for the
1649 full views of the incomplete types appear before the instance.
1651 2015-05-22 Pascal Obry <obry@adacore.com>
1653 * makeutl.ads, prj-conf.adb, prj-nmsc.adb, prj.ads
1654 (In_Place_Option): Removed.
1655 (Relocate_Build_Tree_Option): New constant.
1656 (Root_Dir_Option): New constant.
1657 (Obj_Root_Dir): Removed.
1658 (Build_Tree_Dir): New variable.
1659 (Root_Src_Tree): Removed.
1660 (Root_Dir): New variable.
1661 * prj-conf.adb (Get_Or_Create_Configuration_File): Add check
1662 for improper relocation.
1663 * prj-nmsc.adb (Locate_Directory): Add check for improper
1666 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1668 * einfo.adb (Default_Init_Cond_Procedure): Code cleanup. The
1669 attribute now applies to the base type.
1670 (Has_Default_Init_Cond): Now applies to the base type.
1671 (Has_Inherited_Default_Init_Cond): Now applies to the base type.
1672 (Set_Default_Init_Cond_Procedure): Code cleanup. The attribute now
1673 applies to the base type.
1674 (Set_Has_Default_Init_Cond): Now applies to the base type.
1675 (Set_Has_Inherited_Default_Init_Cond): Now applies to the base type.
1676 * exp_ch3.adb (Expand_N_Object_Declaration): No need to use the
1677 base type when adding a call to the Default_Initial_Condition.
1679 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1681 * einfo.adb: Node36 is now used as Anonymous_Master. Flag253
1683 (Anonymous_Master): New routine.
1684 (Has_Anonymous_Master): Removed.
1685 (Set_Anonymous_Master): New routine.
1686 (Set_Has_Anonymous_Master): Removed.
1687 (Write_Entity_Flags): Remove the output for Has_Anonymous_Maser.
1688 (Write_Field36_Name): Add output for Anonymous_Master.
1689 * einfo.ads Add new attribute Anonymous_Master along with
1690 occurrences in nodes. Remove attribute Has_Anonymous_Master along
1691 with occurrences in nodes.
1692 (Anonymous_Master): New routine along with pragma Inline.
1693 (Has_Anonymous_Master): Removed along with pragma Inline.
1694 (Set_Anonymous_Master): New routine along with pragma Inline.
1695 (Set_Has_Anonymous_Master): Removed along with pragma Inline.
1696 * exp_ch4.adb (Create_Anonymous_Master): New routine.
1697 (Current_Anonymous_Master): Reimplemented.
1699 2015-05-22 Bob Duff <duff@adacore.com>
1701 * freeze.adb (Freeze_Profile): Suppress warning if imported
1702 subprogram is not at library level.
1704 2015-05-22 Robert Dewar <dewar@adacore.com>
1706 * sem_ch8.adb (Analyze_Object_Renaming): Check for renaming
1707 component of an object to which Volatile_Full_Access applies.
1709 2015-05-22 Jerome Guitton <guitton@adacore.com>
1711 * exp_dbug.ads: Add note about non bit-packed arrays.
1713 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
1715 * sem_prag.adb: Fix typo.
1716 * einfo.ads: Grammar fixes in comments.
1718 2015-05-22 Bob Duff <duff@adacore.com>
1720 * a-cborma.ads, a-cidlli.ads, a-cimutr.ads, a-ciormu.ads,
1721 * a-cihase.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
1722 * a-cborse.ads, a-comutr.ads, a-ciorma.ads, a-cobove.ads,
1723 * a-coormu.ads, a-convec.ads, a-cohase.ads, a-coinho.ads,
1724 * a-cbdlli.ads, a-cbmutr.ads, a-cbhase.ads, a-cdlili.ads,
1725 * a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
1726 * a-coinho-shared.ads (Constant_Reference_Type, Reference_Type):
1727 Add an initialization expression "raise Program_Error". See,
1728 for example, RM-A.18.2(148.4).
1730 2015-05-22 Robert Dewar <dewar@adacore.com>
1732 * debug.adb: Update documentation.
1733 * einfo.ads, einfo.adb (Needs_Typedef): New flag
1734 * exp_unst.adb (Unnest_Subprogram): Mark AREC types as needing
1736 * frontend.adb: Update comments.
1737 * gnat1drv.adb (Adjust_Global_Switches): Set all needed flags
1739 * opt.ads (Generate_C_Code): New switch.
1740 * osint-c.adb (Write_C_File_Info): Removed, not used
1741 (Write_H_File_Info): Removed, not used
1742 * osint-c.ads (Write_C_File_Info): Removed, not used
1743 (Write_H_File_Info): Removed, not used
1744 * osint.ads (Write_Info): Minor comment updates.
1745 (Output_FD): Moved from private part to public part of spec.
1746 * sem.adb (Semantics): Force expansion on if in Generate_C_Code
1748 * atree.ads: minor typo in comment.
1749 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
1750 Do not allow VFA on composite object with aliased component.
1752 2015-05-22 Arnaud Charlet <charlet@adacore.com>
1754 * osint-c.adb, osint-c.ads (Set_File_Name): Move back to spec.
1756 2015-05-22 Pascal Obry <obry@adacore.com>
1758 * prj-util.adb: Minor comment editing.
1760 2015-05-22 Pascal Obry <obry@adacore.com>
1762 * makeutl.ads (In_Place_Option): New constant.
1763 * prj.ads (Obj_Root_Dir): New variable (absolute path to relocate
1765 (Root_Src_Tree): New variable (absolute path of root source tree).
1766 * prj-conf.adb (Do_Autoconf): Take into account the object root
1767 directory (if defined) to generate configuration project.
1768 * prj-nmsc.adb (Get_Directories): Handle case where Obj_Root_Dir
1770 (Locate_Directory): Likewise.
1772 2015-05-22 Pascal Obry <obry@adacore.com>
1774 * prj-util.ads, prj-util.adb (Relative_Path): New routine.
1776 2015-05-22 Bob Duff <duff@adacore.com>
1778 * exp_utils.ads, exp_utils.adb (Find_Optional_Prim_Op): New
1779 interface to return Empty when not found, so we can avoid handling
1780 Program_Error in that case.
1781 (Find_Prim_Op): Fix latent bug: raise Program_Error when there are no
1783 * exp_ch7.adb, sem_util.adb: Use Find_Optional_Prim_Op when the
1784 code is expecting Empty.
1785 * sem_ch8.adb: Use Find_Optional_Prim_Op to avoid handling
1788 2015-05-22 Robert Dewar <dewar@adacore.com>
1790 * sem_ch3.adb, sem_intr.adb, exp_ch4.adb, s-rannum.adb,
1791 sem_eval.adb, s-fatgen.adb, s-expmod.ads: Remove incorrect hyphen in
1793 * exp_util.adb: Add comment.
1794 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move from spec to
1796 (Set_File_Name): New name for the above.
1797 (Create_C_File, Create_H_File, Write_C_File_Info, Write_H_File_Info,
1798 Close_C_File, Close_H_File): New procedure.
1799 * osint.adb: Minor reformatting.
1800 * osint.ads: Minor comment updates.
1802 2015-05-22 Robert Dewar <dewar@adacore.com>
1804 * exp_ch4.adb: Minor rewording.
1805 * exp_util.ads: Clarify that Find_Prim_Op is only for
1808 2015-05-22 Robert Dewar <dewar@adacore.com>
1810 * atree.adb, atree.ads, treepr.adb: Change name Needs_Actuals_Check to
1812 * exp_ch4.adb (Expand_N_Op_Expon): Optimize 2**x in modular
1815 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
1817 * exp_pakd.adb (Install_PAT): Propagate representation aspects
1818 from the original array type to the PAT.
1820 2015-05-22 Robert Dewar <dewar@adacore.com>
1822 * treepr.adb (Print_Node_Header): Add output of Needs_Actuals_Check.
1824 2015-05-22 Robert Dewar <dewar@adacore.com>
1826 * atree.adb, atree.ads (Needs_Actuals_Check): New flag.
1828 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1830 * sem_prag.adb (Analyze_Pragma): Remove the detection
1831 of a useless Part_Of indicator when the related item is a constant.
1832 (Check_Matching_Constituent): Do not emit an error on a constant.
1833 (Check_Missing_Part_Of): Do not check for a missing Part_Of indicator
1834 when the related item is a constant.
1835 (Collect_Body_States): Code cleanup.
1836 (Collect_Visible_States): Code cleanup.
1837 (Report_Unused_States): Do not emit an error on a constant.
1838 * sem_util.ads, sem_util.adb (Has_Variable_Input): Removed.
1840 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
1842 * sem_ch8.adb (Analyze_Object_Renaming): Copy
1843 Has_Volatile_Full_Access from renamed to renaming entities.
1844 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
1845 Tidy up and remove redundant setting of Has_Volatile_Full_Access.
1847 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1849 * ghost.adb (Check_Ghost_Completion): Update references to SPARK
1851 (Check_Ghost_Policy): Update references to SPARK RM 6.9 rules.
1852 * sem_ch3.adb (Analyze_Object_Declaration): Update references
1853 to SPARK RM 6.9 rules.
1854 (Check_Completion): Ghost entities do not require a special form of
1856 * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Update references
1857 to SPARK RM 6.9 rules.
1858 (Analyze_Subprogram_Body_Helper): Update references to SPARK RM 6.9
1860 * sem_ch7.adb (Analyze_Package_Body_Helper): Update references
1861 to SPARK RM 6.9 rules.
1862 (Requires_Completion_In_Body): Ghost entities do not require a special
1865 2015-05-22 Robert Dewar <dewar@adacore.com>
1867 * a-csquin.ads: Use Ada 2012 notation.
1868 * sem_ch8.adb: Minor reformatting.
1870 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1872 * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect Import
1873 acts as a completion.
1875 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1877 * sem_ch13.adb: Minor reformatting.
1879 2015-05-22 Jose Ruiz <ruiz@adacore.com>
1881 * a-reatim.adb: Minor change, fix typo.
1883 2015-05-22 Robert Dewar <dewar@adacore.com>
1885 * sem_util.ads: Minor addition of ??? comment.
1886 * sem_prag.adb, sem_util.adb: Minor reformatting.
1887 * sem_ch13.adb: minor reformatting.
1889 2015-05-22 Robert Dewar <dewar@adacore.com>
1891 * a-reatim.ads: Add Compile_Time_Error to ensure Duration
1893 * sem_ch13.adb: Improve error message.
1894 * exp_ch4.adb: Minor reformatting.
1896 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1898 * sem_prag.adb (Analyze_Pragma): Constants without variable
1899 input do not require indicator Part_Of.
1900 (Check_Missing_Part_Of): Constants without variable input do not
1901 requrie indicator Part_Of.
1902 (Collect_Visible_States): Constants without variable input are
1903 not part of the hidden state of a package.
1904 * sem_util.ads, sem_util.adb (Has_Variable_Input): New routine.
1906 2015-05-22 Robert Dewar <dewar@adacore.com>
1908 * exp_util.adb (Activate_Atomic_Synchronization): Do not set
1909 Atomic_Sync_Required for an object renaming declaration.
1910 * sem_ch8.adb (Analyze_Object_Renaming): Copy Is_Atomic and
1911 Is_Independent to renaming object.
1913 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1915 * sem_ch5.adb (Analyze_Iterator_Specification): Diagnose
1916 various illegalities in iterators over arrays and containers:
1917 a) New function Get_Cursor_Type, to verify that the cursor is
1918 not a limited type at the point of iteration.
1919 b) If the container is a constant, an element_iterator is illegal
1920 if the container type does not have a Constant_Indexing aspect.
1921 c) If the iterate function has an in-out controlling parameter,
1922 the container cannot be a constant object.
1923 d) Reject additional cases of iterators over a
1924 discriminant-dependent component of a mutable object.
1926 2015-05-21 Hristian Kirtchev <kirtchev@adacore.com>
1928 * einfo.adb (Contract): This attribute now applies to constants.
1929 (Set_Contract): This attribute now applies to constants.
1930 (Write_Field34_Name): Add output for constants.
1931 * einfo.ads Attribute Contract now applies to constants.
1932 * sem_ch3.adb (Analyze_Object_Contract): Constants now have
1933 their Part_Of indicator verified.
1934 * sem_prag.adb (Analyze_Constituent): A constant is now a valid
1936 (Analyze_Global_Item): A constant cannot act as an output.
1937 (Analyze_Initialization_Item): Constants are now a valid
1938 initialization item.
1939 (Analyze_Initializes_In_Decl_Part): Rename
1940 global variable States_And_Vars to States_And_Objs and update
1941 all its occurrences.
1942 (Analyze_Input_Item): Constants are now a
1943 valid initialization item. Remove SPARM RM references from error
1945 (Analyze_Pragma): Indicator Part_Of can now apply to a constant.
1946 (Collect_Body_States): Collect both source constants
1948 (Collect_States_And_Objects): Collect both source constants and
1950 (Collect_States_And_Variables): Rename
1951 to Collect_States_And_Objects and update all its occurrences.
1952 (Collect_Visible_States): Do not collect constants and variables
1953 used to map generic formals to actuals.
1954 (Find_Role): The role of a constant is that of an input. Separate the
1955 role of a variable from that of a constant.
1956 (Report_Unused_Constituents): Add specialized wording for constants.
1957 (Report_Unused_States): Add specialized wording for constants.
1958 * sem_util.adb (Add_Contract_Item): Add processing for constants.
1959 * sem_util.ads (Add_Contract_Item): Update the comment on usage.
1960 (Find_Placement_In_State_Space): Update the comment on usage.
1962 2015-05-21 Ed Schonberg <schonberg@adacore.com>
1964 * sem_ch5.adb: minor reformatting.
1966 2015-05-21 Robert Dewar <dewar@adacore.com>
1968 * freeze.adb (Freeze_Entity): Properly tag -gnatw.z messages.
1970 2015-05-21 Robert Dewar <dewar@adacore.com>
1972 * freeze.adb: Minor reformatting.
1973 * cstand.adb (Print_Standard): Fix bad printing of Duration
1975 * a-reatim.adb (Time_Of): Complete rewrite to properly detect
1978 2015-05-21 Ed Schonberg <schonberg@adacore.com>
1980 * sem_ch5.adb: add (useless) initial value.
1981 * sem_ch3.adb (Replace_Anonymous_Access_To_Protected_Subprogram):
1982 Check whether the procedure has parameters before processing
1983 formals in ASIS mode.
1985 2015-05-21 Ed Schonberg <schonberg@adacore.com>
1987 * sem_ch13.adb (Check_Iterator_Functions): Emit error on Iterator
1988 aspect as well when indexing function is illegal.
1989 (Valid_Default_Iterator): Handle properly somme illegal cases
1990 to prevent compilation abandoned messages.
1991 (Check_Primitive_Function): Verify that type and indexing function
1992 are in the same scope.
1993 * freeze.adb (Freeze_Record): Extend patch on the presence of
1994 indexing aspects to aspect Default_Iterator.
1996 2015-05-19 David Malcolm <dmalcolm@redhat.com>
1998 * gcc-interface/trans.c (Sloc_to_locus1): Strenghthen local "map"
1999 from line_map * to line_map_ordinary *.
2001 2015-05-12 Jason Merrill <jason@redhat.com>
2003 * sigtramp-vxworks.c: Add space between string literal and macro
2006 2015-05-12 Arnaud Charlet <charlet@adacore.com>
2008 * gnat_rm.texi, gnat_ugn.texi, doc: Documentation updates and clean ups
2010 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2012 * sem_ch5.adb (Analyze_Iterator_Specifications): Additional
2013 legality checks for array and container iterators:
2014 a) The domain of iteration cannot be a component that depends
2015 on discriminants of a mutable object. The check was recently
2016 added for element iterators.
2017 b) The cursor type cannot be a limited type at the point of the
2018 iteration, because the cursor will be assigned to in the body
2021 2015-05-12 Robert Dewar <dewar@adacore.com>
2023 * freeze.adb (Freeze_Record_Type): Make sure that if we have
2024 aspect Iterator_Element, then we have either Constant_Indexing
2025 or Variable_Indexing.
2027 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2029 * a-coormu.ads, a-coormu.adb: Add Indexing aspect, Reference_Type,
2030 and Reference_Control_Type to support element iterators over
2032 * a-ciormu.ads, a-ciormu.adb: Ditto for
2033 indefinite_ordered_multisets.
2035 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
2037 * exp_ch4.adb (Expand_N_Expression_With_Actions): Force
2038 the evaluation of the EWA expression. Code cleanup.
2039 (Process_Transient_Object): Code cleanup.
2040 * exp_util.adb (Is_Aliased): Controlled transient objects found
2041 within EWA nodes are not aliased.
2042 (Is_Finalizable_Transient): Iterators are not finalizable transients.
2044 2015-05-12 Robert Dewar <dewar@adacore.com>
2046 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
2047 Don't allow Atomic and Volatile_Full_Access for the same entity.
2049 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2051 * sem_ch5.adb (Analyze_Iterator_Specification): Implement new
2052 semantics and safety checks specified in AI12-0151.
2054 2015-05-12 Pierre-Marie de Rodat <derodat@adacore.com>
2056 * sem_ch10.adb (Sem_Ch10.Analyze_Proper_Body): Generate SCOs
2057 for subunit in generic units.
2059 2015-05-12 Robert Dewar <dewar@adacore.com>
2061 * sem_elab.adb (Check_A_Call): Avoid checking internal call
2064 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2066 * sem_ch6.adb (Process_Formals): An untagged incomplete type
2067 is legal in the profile of a null procedure.
2069 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2071 * sem_ch12.adb (Validate_Derived_Type_Instance): Handle properly
2072 the checks on a derived formal whose parent type is a previous
2073 formal that is not a derived type.
2075 2015-05-12 Robert Dewar <dewar@adacore.com>
2077 * aspects.ads, aspects.adb: Add entries for aspect Volatile_Full_Access
2078 * einfo.adb (Has_Volatile_Full_Access): New flag.
2079 (Has_Volatile_Full_Access): New flag.
2080 * einfo.ads (Has_Volatile_Full_Access): New flag.
2081 * par-prag.adb: Add dummy entry for Volatile_Full_Access.
2082 * sem_prag.adb (Analyze_Pragma, case Volatile_Full_Access):
2083 Implement new pragma.
2084 * snames.ads-tmpl: Add entries for pragma Volatile_Full_Access.
2086 2015-05-12 Robert Dewar <dewar@adacore.com>
2088 * targparm.ads: Minor reformatting.
2090 2015-05-12 Robert Dewar <dewar@adacore.com>
2092 * a-reatim.adb (Time_Of): Properly detect overflow when TS = 0.0.
2093 * a-reatim.ads: Minor reformatting.
2095 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
2097 * einfo.ads: Update the documentation of flags
2098 Has_Inherited_Default_Init_Cond and Has_Default_Init_Cond.
2100 2015-05-12 Robert Dewar <dewar@adacore.com>
2102 * impunit.adb: Add entry for a-dhfina.ads
2103 * a-dhfina.ads: New file.
2105 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2107 * exp_ch5.adb (Expand_Iterator_Loop_Over_Array): if the array
2108 type has convention Fortran, a multidimensional iterator varies
2109 the first dimension fastest.
2111 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
2113 * einfo.adb: Node32 is now used as Encapsulating_State.
2114 Node37 is now used as Associated_Entity.
2115 (Associated_Entity): New routine.
2116 (Encapsulating_State): Update the assertion guard to include constants.
2117 (Set_Associated_Entity): New routine.
2118 (Set_Encapsulating_State): Update the assertion guard to
2120 (Write_Field10_Name): Remove the output for Encapsulating_State.
2121 (Write_Field32_Name): Add output for Encapsulating_State.
2122 (Write_Field37_Name): Add output for Associated_Entity.
2123 * einfo.ads New attribute Associated_Entity along with placement
2124 in entities. Attribute Encapsulating_State now uses Node32.
2125 (Associated_Entity): New routine along with pragma Inline.
2126 (Set_Associated_Entity): New routine along with pragma Inline.
2127 * inline.ads Code reformatting.
2128 * sem_attr.adb (Analyze_Attribute): Correct the prefix of
2129 attribute 'Result when the context is a generic instantiation.
2130 (Analyze_Attribute_Old_Result): Pragmas Depends and
2131 Refined_Depends are a valid context for attribute 'Result.
2132 (Denote_Same_Function): Allow attribute 'Result to denote
2134 * sem_ch3.adb Add with and use clauses for Sem_Ch12.
2135 (Analyze_Declarations): Capture global references within the
2136 contracts of packages, subprograms and their respective bodies.
2137 * sem_ch6.adb (Analyze_Aspects_On_Body_Or_Stub): Removed.
2138 (Analyze_Completion_Contract): Removed.
2139 (Analyze_Generic_Subprogram_Body): Enchange the aspects after
2140 creating the generic copy. Create a generic contract for the
2141 template. Analyze the aspects of the generic body. Analyze the
2142 contract of the generic body when it is a compilation unit and
2143 capture global references.
2144 (Analyze_Subprogram_Body_Contract): Code cleanup.
2145 (Analyze_Subprogram_Contract): Do not save global references here.
2146 (Save_Global_References_In_List): Removed.
2147 * sem_ch7.adb (Analyze_Package_Body_Contract): Code cleanup.
2148 (Analyze_Package_Body_Helper): Create a generic contract for
2150 (Analyze_Package_Contract): Code cleanup.
2151 * sem_ch10.adb Add with and use clauses for Sem_Ch12.
2152 (Analyze_Compilation_Unit): Capture global references in a
2153 generic subprogram declaration that acts as a compilation unit.
2154 * sem_ch12.adb Add with and use clauses for Sem_Prag. Illustrate
2155 the implementation of generic contracts. Alphabetize various
2157 (Analyze_Generic_Package_Declaration):
2158 Create a generic contract for the template.
2159 (Analyze_Generic_Subprogram_Declaration): Create a generic
2160 contract for the template.
2161 (Analyze_Subprogram_Instantiation): Instantiate the contract of the
2163 (Copy_Generic_Node): Link defining entities of the generic template
2164 with the corresponding defining entities of the generic copy. Update
2165 the processing of pragmas.
2166 (Instantiate_Contract): Removed.
2167 (Instantiate_Subprogram_Contract): New routine.
2168 (Requires_Delayed_Save): New routine.
2169 (Save_Global_References): Rename formal parameter N to Templ. Various
2171 (Save_Global_References_In_Aspects): Moved from the spec.
2172 (Save_Global_References_In_Contract): New routine.
2173 (Save_References_In_Aggregate): New routine.
2174 (Save_References_In_Char_Lit_Or_Op_Symbol): New routine.
2175 (Save_References_In_Descendants): New routine.
2176 (Save_References_In_Identifier): New routine.
2177 (Save_References_In_Operator): New routine.
2178 (Save_References_In_Pragma): New routine.
2179 * sem_ch12.ads (Save_Global_References): Rename formal
2180 parameter N to Templ. Update the comment on usage.
2181 (Save_Global_References_In_Aspects): Moved to the body.
2182 (Save_Global_References_In_Contract): New routine.
2183 * sem_ch13.adb (Analyze_Aspect_Specifications_On_Body_Or_Stub):
2185 * sem_ch13.ads (Analyze_Aspect_Specifications_On_Body_Or_Stub):
2187 * sem_prag.adb (Add_Item_To_Name_Buffer): Add support for
2189 (Analyze_Contract_Cases_In_Decl_Part): Code cleanup.
2190 (Analyze_Depends_Global): New routine.
2191 (Analyze_Depends_In_Decl_Part): Code cleanup.
2192 (Analyze_Global_In_Decl_Part): Code cleanup.
2193 (Analyze_Global_Item): Constants are now valid global items. Do
2194 not perform state-related checks in an instance. Change the way
2195 renamings are handled. (Analyze_Initial_Condition_In_Decl_Part):
2197 (Analyze_Initializes_In_Decl_Part): Code cleanup.
2198 (Analyze_Input_Output): The analysis of attribute 'Result in
2199 the context of pragmas Depends or Refined_Depends now reuses
2200 the existing attribute analysis machinery. Constants and
2201 generic parameters are now valid dependency items. Do not
2202 perform state-related checks in an instance. Change the way
2203 renamings are handled. (Analyze_Pragma): Add a "characteristics"
2204 section for pragmas Abstract_State, Contract_Cases, Depends,
2205 Extensions_Visible, Global, Initial_Condition, Initializes,
2206 Post, Post_Class, Postcondition, Pre, Pre_Class, Precondition,
2207 Refined_Depends, Refined_Global, Refined_Post, Refined_State, Test_Case.
2208 (Analyze_Pre_Post_Condition): Do not create a generic
2210 (Analyze_Pre_Post_Condition_In_Decl_Part): Code cleanup.
2211 (Analyze_Refined_Depends_Global_Post): New routine.
2212 (Analyze_Refined_Depends_In_Decl_Part): Code cleanup.
2213 (Analyze_Refined_Global_In_Decl_Part): Code cleanup.
2214 (Analyze_Refined_Pragma): Removed.
2215 (Analyze_Refined_State_In_Decl_Part): Code cleanup.
2216 (Analyze_Test_Case_In_Decl_Part): Code cleanup.
2217 (Check_Dependency_Clause): Do not perform this check in an instance.
2218 (Check_Function_Return): Add support for generic functions.
2219 (Check_In_Out_States): Do not perform this check in an instance.
2220 (Check_Input_States): Do not perform this check in an instance.
2221 (Check_Mode_Restriction_In_Function): Add support for generic functions.
2222 (Check_Output_States): Do not perform this check in an instance.
2223 (Check_Postcondition_Use_In_Inlined_Subprogram): Rename
2224 parameter Subp_Id to Spec_Id and update comment on usage.
2225 (Check_Proof_In_States): Do not perform this check in an instance.
2226 (Check_Refined_Global_Item): Add support for constants.
2227 (Check_Refined_Global_List): Do not perform this check in an instance.
2228 (Collect_Global_Items): Reimplemented.
2229 (Collect_Subprogram_Inputs_Outputs): Add support for generic parameters.
2230 (Create_Generic_Template): Removed.
2231 (Find_Related_Package_Or_Body): Moved to spec.
2232 (Find_Role): Add support for generic parameters and constants.
2233 (Get_Argument): Moved to spec. Rename parameter Spec_Id to Context_Id.
2234 (Match_Item): Add support for constants.
2235 (Preanalyze_Test_Case_Arg): Reimplemented.
2236 (Report_Extra_Clauses): Do not perform this check in an instance.
2237 (Report_Extra_Constituents): Do not perform this check in an instance.
2238 * sem_prag.ads (Collect_Subprogram_Inputs_Outputs): Update
2239 the comment on usage.
2240 (Find_Related_Package_Or_Body): Moved from body.
2241 (Get_Argument): Moved from body.
2242 * sem_util.adb Add with and use clauses for Sem_Ch12.
2243 (Corresponding_Spec_Of): Add support for packages and package bodies.
2244 (Create_Generic_Contract): New routine.
2245 (Is_Contract_Annotation): Reimplemented.
2246 (Is_Generic_Declaration_Or_Body): New routine.
2247 (Is_Package_Contract_Annotation): New routine.
2248 (Is_Subprogram_Contract_Annotation): New routine.
2249 * sem_util.ads (Corresponding_Spec_Of): Update the comment on usage.
2250 (Create_Generic_Contract): New routine.
2251 (Is_Generic_Declaration_Or_Body): New routine.
2252 (Is_Package_Contract_Annotation): New routine.
2253 (Is_Subprogram_Contract_Annotation): New routine.
2254 * sinfo.adb (Is_Generic_Contract_Pragma): New routine.
2255 (Set_Is_Generic_Contract_Pragma): New routine.
2256 * sinfo.ads Add new attribute Is_Generic_Contract_Pragma along
2257 with occurrences in nodes.
2258 (Is_Generic_Contract_Pragma): New routine along with pragma Inline.
2259 (Set_Is_Generic_Contract_Pragma): New routine along with pragma Inline.
2260 * treepr.adb (Print_Entity_Info): Output fields 36 to 41.
2262 2015-05-12 Robert Dewar <dewar@adacore.com>
2264 * a-taster.ads: Minor comment fix: fix bad header, this is a
2267 2015-05-12 Robert Dewar <dewar@adacore.com>
2269 * sem_intr.adb: (Check_Shift): Diagnose bad modulus value.
2271 2015-05-12 Robert Dewar <dewar@adacore.com>
2273 * gnat1drv.adb (Adjust_Global_Switches): Default to suppressing
2274 Alignment_Checks on non-strict alignment machine.
2275 * sem_ch13.adb (Validate_Address_Clauses): Don't give
2276 compile-time alignment warnings if run time Alignment_Check
2279 2015-05-12 Thomas Quinot <quinot@adacore.com>
2281 * g-sercom.ads, g-sercom-linux.adb (GNAT.Serial_Communications.
2282 Data_Rate): New literals B75, B110, B150, B300, B600.
2284 2015-05-12 Doug Rupp <rupp@adacore.com>
2286 * init.c (__gnat_init_float) [vxworks]: For e500v2,
2287 do nothing and leave the responsibility to install the handler
2288 and enable the exceptions to the BSP.
2290 2015-05-12 Robert Dewar <dewar@adacore.com>
2292 * sem_ch9.adb, einfo.ads, exp_intr.adb: Minor reformatting.
2293 * sem_disp.adb: Minor code reorganization (remove junk redundant
2295 * exp_unst.adb (Unnest_Subprogram.Uplev_Refs): Ignore uplevel
2296 references to bounds of types coming from original type reference.
2297 * checks.ads: Minor reformatting.
2298 * checks.adb: Minor reformatting.
2299 * sem_prag.adb (Analyze_Pragma, case Check): If in ignored
2300 assertion, then make sure we do not drag in bignum stuff.
2302 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2304 * sem_ch9.adb (Collect_Interfaces): Initialize
2305 Direct_Primitive_Operations for a tagged synchronized type,
2306 so it can used in ASIS mode.
2307 * sem_disp.adb (Check_Dispatching_Operation): If expansion is
2308 disabled, attach subprogram to list of Direct_Primitive_Operations
2309 of synchronized type itself, for ASIS use, because in this case
2310 Corresponding_Record_Type is not built.
2311 * einfo.ads: Indicate use of Direct_Primitive_Operations on
2314 2015-05-12 Pierre-Marie de Rodat <derodat@adacore.com>
2316 * exp_pakd.adb: Make clearer the comment in exp_pakd.adb about
2319 2015-05-12 Robert Dewar <dewar@adacore.com>
2321 * sem_ch3.adb, sem_util.adb, sem_ch6.adb: Minor reformatting.
2323 2015-05-12 Robert Dewar <dewar@adacore.com>
2325 * exp_unst.adb (Visit_Node): Deal with subprogram and package stubs.
2327 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2329 * exp_intr.adb (Expand_Dispatching_Constructor_Call): The
2330 tag to be retrieved for the generated call is the first entry
2331 in the dispatch table for the return type of the instantiated
2334 2015-05-12 Bob Duff <duff@adacore.com>
2336 * exp_ch7.adb, exp_ch7.ads, exp_intr.adb, exp_util.adb,
2337 exp_util.ads: Update comments.
2339 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2341 * sem_ch3.adb (Add_Internal_Interface_Entities): Do no generate
2342 freeze nodes for these in ASIS mode, because they lead to
2343 elaoration order issues in gigi.
2345 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
2347 * sem_ch6.adb (Analyze_Expression_Function): Code
2348 cleanup. Use Copy_Subprogram_Spec to create a proper spec.
2349 (Analyze_Subprogram_Body_Helper): Code cleanup. Do not
2350 prepare a stand alone body for inlining in GNATprove mode
2351 when inside a generic. (Body_Has_Contract): Reimplemented.
2352 (Build_Subprogram_Declaration): New routine.
2353 * sem_ch10.adb (Analyze_Compilation_Unit): Capture global
2354 references within generic bodies by loading them.
2355 * sem_util.adb (Copy_Parameter_List): Code cleanup.
2356 (Copy_Subprogram_Spec): New routine.
2357 (Is_Contract_Annotation): New routine.
2358 * sem_util.ads (Copy_Subprogram_Spec): New routine.
2359 (Is_Contract_Annotation): New routine.
2361 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
2363 * sem_attr.adb (Resolve_Attribute): Do not analyze the generated
2364 body of an expression function when the prefix of attribute
2365 'Access is the body.
2367 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2369 * sem_ch3.adb (Build_Derived_Enumeration_Type): The anonymous base
2370 created for a derived enumeration type is not a first subtype,
2371 even though it is defined through a full type declaration.
2372 * sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): Do not process
2373 aspects for the anonymous base type constructed for a derived
2374 scalar type, because they will be set when the first subtype
2376 (Inherit_Aspects_At_Freeze_Point): Fix typos on handling of
2377 Default_Value and Default_Component_Value, that prevented the
2378 proper inheritance of these aspects.
2380 2015-05-12 Gary Dismukes <dismukes@adacore.com>
2382 * exp_ch6.adb, exp_unst.adb: Minor typo fixes.
2384 2015-05-12 Robert Dewar <dewar@adacore.com>
2386 * sem_ch3.adb: Minor reformatting.
2388 2015-05-12 Vincent Celier <celier@adacore.com>
2390 * gnatcmd.adb: If we want to invoke gnatmake (gnatclean) with
2391 -P, then check if gprbuild (gprclean) is available; if it is,
2392 use gprbuild (gprclean) instead of gnatmake (gnatclean).
2394 2015-05-12 Robert Dewar <dewar@adacore.com>
2396 * debug.adb: Add flag -gnatd.3 to output diagnostic info from
2398 * einfo.ad, einfo.adb: Reorganize (and remove most of) flags used by
2400 * exp_ch6.adb (Unest_Bodies): Table for delayed calls to
2401 Unnest_Subprogram (Expand_N_Subprogram_Body): Add entry to table
2402 for later call instead of calling Unnest_Subprogram directly
2403 (Initialize): New procedure (Unnest_Subprograms): New procedure
2404 * exp_ch6.ads (Add_Extra_Actual_To_Call): Move into proper
2406 (Initialize): New procedure.
2407 (Unnest_Subprograms): New procedure.
2408 * exp_unst.adb (Unnest_Subprogram): Major rewrite, moving
2409 all processing to this routine which is now called late
2410 after instantiating bodies. Fully handles the case of generic
2412 * exp_unst.ads: Major rewrite, moving all processing to
2414 * frontend.adb (Frontend): Add call to Exp_Ch6.Initialize.
2415 (Frontend): Add call to Unnest_Subprograms.
2416 * sem_ch8.adb (Find_Direct_Name): Back to old calling sequence
2417 for Check_Nested_Access.
2418 * sem_util.adb (Build_Default_Subtype): Minor reformatting
2419 (Check_Nested_Access): Back to original VM-only form (we
2420 now do all the processing for Unnest_Subprogram at the time
2422 (Denotes_Same_Object): Minor reformatting
2423 (Note_Possible_Modification): Old calling sequence for
2424 Check_Nested_Access.
2425 * sem_util.ads (Check_Nested_Access): Back to original VM-only
2426 form (we now do all the processing for Unnest_Subprogram at the
2429 2015-05-12 Robert Dewar <dewar@adacore.com>
2431 * sem_ch3.adb, freeze.adb, sem_ch6.adb: Minor reformatting.
2433 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2435 * sem_ch3.adb (Analyze_Object_Declaration): New function
2436 Has_Delayed_Aspect, used to defer resolution of an aggregate
2437 expression when the object declaration carries aspects Address
2439 * freeze.adb (Freeze_Object_Declaration): New subsidiary procedure
2440 to Freeze_Entity. In addition to the previous processing steps
2441 at the freeze point of an object, this procedure also handles
2442 aggregates in object declarations, when the declaration carries
2443 delayed aspects that require that the initialization of the
2444 object be attached to its freeze actions.
2446 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2448 * sem_ch6.adb (Analyze_Subprogram_Declaration): Following
2449 AI12-0147, null procedures and expression functions are allowed
2450 in protected bodies.
2452 2015-05-12 Tristan Gingold <gingold@adacore.com>
2454 * i-cpoint.adb (Copy_Terminated_Array): Copy nothing if Length is 0.
2456 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2458 * sem_ch3.adb (Complete_Private_Subtype): Propagate
2459 Has_Delayed_Aspects flag from private to full view, to ensure
2460 that predicate functions are constructed.
2462 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2464 * sem_ch6.adb (Process_Formals): If a tagged formal is an
2465 incomplete class-wide type, the subprogram must have a delayed
2466 freeze even though the opertation is not a primitive of the
2467 type. THis ensures that the backend can recover the full view
2468 when elaborating the subprogram declaration.
2470 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2472 * exp_util.adb (Get_Current_Value_Condition): Nothing to be
2473 done if an elsif part has been rewritten so that it is not part
2474 of an enclosing if_statement.
2476 2015-05-12 Robert Dewar <dewar@adacore.com>
2478 * sem_type.adb, sem_ch10.adb, freeze.adb, sem_ch6.adb, exp_disp.adb:
2481 2015-05-12 Bob Duff <duff@adacore.com>
2483 * exp_attr.adb (Size): Remove unnecessary check for types with
2484 unknown discriminants. That was causing the compiler to build
2485 a function call _size(T), where T is a type, not an object.
2487 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2489 * sem_ch4.adb (Extended_Primitive_Ops): Exclude overriding
2490 primitive operations of a type extension declared in the package
2491 body, to prevent duplicates in extended list.
2493 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2495 * sem_ch3.adb (Analyze_Component_Declaration): If the component is
2496 an unconstrained synchronized type with discriminants, create a
2497 constrained default subtype for it, so that the enclosing record
2498 can be given the proper size.
2499 * sem_util.adb (Build_Default_Subtype): If the subtype is created
2500 for a record discriminant, do not analyze the declarztion at
2501 once because it is added to the freezing actions of the enclosing
2504 2015-05-12 Robert Dewar <dewar@adacore.com>
2506 * exp_prag.adb (Expand_N_Pragma): Rewrite ignored pragma as
2508 * namet.ads (Boolean3): Document this flag used for Ignore_Pragma.
2509 * par-prag.adb (Prag): Implement Ignore_Pragma.
2510 * sem_prag.adb: Implement Ignore_Pragma.
2511 * snames.ads-tmpl: Add entries for pragma Ignore_Pragma.
2513 2015-05-12 Javier Miranda <miranda@adacore.com>
2515 * sem_ch10.adb (Build_Shadow_Entity): Link the class-wide shadow
2516 entity with its corresponding real entity.
2517 (Decorate_Type): Unconditionally build the class-wide shadow entity of
2519 * einfo.ads, einfo.adb (Has_Non_Limited_View): New synthesized
2521 (Non_Limited_View): Moved from field 17 to field 19 be available
2522 in class-wide entities.
2523 * exp_attr.adb (Access_Cases): Code cleanup.
2524 * exp_disp.adb (Expand_Interface_Actuals): Ditto.
2525 * exp_util.adb (Non_Limited_Designated_Type): Ditto.
2526 * freeze.adb (Build_Renamed_Bdody): Ditto.
2527 * sem_aux.adb (Available_View): Ditto.
2528 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
2529 (Try_One_Prefix_Interpretation): Ditto.
2530 * sem_ch5.adb (Analyze_Assignment): Ditto.
2531 * sem_ch6.adb (Detect_And_Exchange): Ditto.
2532 * sem_ch8.adb (Find_Expanded_Name): Ditto.
2533 * sem_disp.adb (Check_Controlling_Type): Ditto.
2534 * sem_res.adb (Resolve_Type_Conversion): Ditto.
2535 (Full_Designated_Type): Ditto.
2536 * sem_type.adb (Covers): Ditto.
2537 * sem_util.adb: Fix typo in comment.
2539 2015-05-12 Robert Dewar <dewar@adacore.com>
2541 * exp_unst.adb (Get_Real_Subp): New subprogram.
2542 (Unnest_Subprogram): Use Get_Real_Subp.
2543 (Uplev_Refs_For_One_Subp): Skip if no ARECnU entity.
2544 (Uplev_Refs_For_One_Subp): Use actual subtype in unconstrained case.
2546 2015-05-12 Robert Dewar <dewar@adacore.com>
2548 * a-reatim.adb ("/"): Add explicit check for Time_Span_First / -1.
2550 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2552 * sem_ch4.adb (Extended_Primitive_Ops): New subprogram,
2553 auxiliary to Try_Primitive_Operation to handle properly prefixed
2554 calls where the operation is not a primitive of the type, but
2555 is declared in the package body that is in the immediate scope
2558 2015-05-12 Robert Dewar <dewar@adacore.com>
2560 * sem_util.adb (Is_Variable): Allow X'Deref(Y) as a variable.
2562 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2564 * sem_ch8.adb (Find_Expanded_Name): Handle properly a fully
2565 qualified name for an instance of a generic grand-child unit in
2566 the body its parent.
2568 2015-05-12 Robert Dewar <dewar@adacore.com>
2570 * exp_unst.adb (Upref_Name): New subprogram.
2571 (Unnest_Subprogram): Use Upref_Name.
2572 (Unnest_Subprogram): Use new Deref attribute.
2573 * exp_unst.ads: Doc updates.
2575 2015-05-12 Thomas Quinot <quinot@adacore.com>
2577 * adaint.c: Enable Large File Support in adaint so that __gnat_readdir
2578 can access files on filesystems mounted from servers that use large
2581 2015-05-09 Eric Botcazou <ebotcazou@adacore.com>
2583 * gcc-interface/utils.c (gnat_write_global_declarations): Use type_decl
2584 method instead of global_decl for TYPE_DECLs.
2586 2015-04-27 Jim Wilson <jim.wilson@linaro.org>
2588 * gcc-interface/Makefile-lan.in (ada.mostlyclean): Remove gnatbind
2591 2015-04-13 Eric Botcazou <ebotcazou@adacore.com>
2593 * gnatvsn.ads (Library_Version): Bump to 6.
2595 2015-04-09 Iain Sandoe <iain@codesourcery.com>
2597 * gcc-interface/Makefile.in (darwin, powerpc): Enable atomics.
2599 2015-04-08 Eric Botcazou <ebotcazou@adacore.com>
2601 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Do not make
2602 a function returning an unconstrained type 'const' for the middle-end.
2604 * gcc-interface/trans.c (Pragma_to_gnu) <case Pragma_Warning>: Use
2605 exact condition to detect Reason => "..." pattern.
2607 2015-03-31 Tom de Vries <tom@codesourcery.com>
2610 * terminals.c (child_setup_tty): Fix warning 'argument to sizeof in
2611 bzero call is the same expression as the destination'.
2613 2015-03-26 Eric Botcazou <ebotcazou@adacore.com>
2615 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Deref>: New case.
2617 2015-03-24 Gary Dismukes <dismukes@adacore.com>
2619 * sem_ch3.adb: Minor typo fix (missing paren).
2621 2015-03-24 Robert Dewar <dewar@adacore.com>
2623 * sinfo.ads: Update comment.
2625 2015-03-24 Robert Dewar <dewar@adacore.com>
2627 * exp_attr.adb: Add entry for typ'Deref.
2628 * sem_attr.adb (Deref): New GNAT attribute.
2629 * sem_attr.ads: Add entry for new GNAT attribute Deref.
2630 * snames.ads-tmpl: Add entries for new attribute Deref.
2632 2015-03-24 Ed Schonberg <schonberg@adacore.com>
2634 * sem_ch13.adb (Rep_Item_Too_Early): allow pragma Convention
2637 2015-03-24 Gary Dismukes <dismukes@adacore.com>
2639 * inline.adb: Minor typo fix.
2641 2015-03-24 Arnaud Charlet <charlet@adacore.com>
2643 * doc/gnat_ugn/building_executable_programs_with_gnat.rst,
2644 doc/gnat_ugn/gnat_utility_programs.rst
2645 doc/gnat_rm/implementation_defined_attributes.rst
2646 doc/gnat_rm/implementation_defined_pragmas.rst
2647 doc/gnat_rm/representation_clauses_and_pragmas.rst
2648 doc/gnat_rm/about_this_guide.rst
2649 doc/gnat_rm/implementation_of_ada_2012_features.rst: Doc improvements.
2650 * gnat_rm.texi, gnat_ugn.texi: Regenerate.
2652 2015-03-23 Jakub Jelinek <jakub@redhat.com>
2655 * adadecode.c (ada_demangle): Guard with IN_RTS instead of IN_GCC.
2657 2015-03-20 Eric Botcazou <ebotcazou@adacore.com>
2660 * gcc-interface/utils.c (gnat_pushdecl): Tidy up and improve comment.
2661 Make sure to chain only main variants through TYPE_NEXT_PTR_TO.
2663 * gcc-interface/trans.c (Attribute_to_gnu): Revert latest change.
2665 2015-03-16 Eric Botcazou <ebotcazou@adacore.com>
2667 * gcc-interface/utils2.c (gnat_invariant_expr): Return null if the type
2668 of the expression ends up being composite.
2670 2015-03-16 Eric Botcazou <ebotcazou@adacore.com>
2672 * gcc-interface/decl.c (is_from_limited_with_of_main): New predicate.
2673 (gnat_to_gnu_entity) <E_Subprogram_Type>: Invoke it on return and
2674 parameter types to detect circularities in ASIS mode.
2675 * gcc-interface/trans.c (Attribute_to_gnu): Mention AI05-0151.
2677 2015-03-16 Eric Botcazou <ebotcazou@adacore.com>
2679 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Abstract_State>: Do not
2680 short-circuit the regular handling.
2682 2015-03-13 Robert Dewar <dewar@adacore.com>
2684 * exp_unst.adb (Note_Uplevel_Reference): Eliminate duplicate
2686 (Actual_Ref): New function.
2687 (AREC_String): Minor reformatting.
2688 (Unnest_Subprogram): Use Actual_Ref.
2689 * frontend.adb (Frontend): Turn off Unnest_Subprogram_Mode
2690 before call to Instantiate_Bodies.
2692 2015-03-13 Ed Schonberg <schonberg@adacore.com>
2694 * freeze.adb (Freeze_Profile): If the return type of a function
2695 being frozen is an untagged limited view and the function is
2696 abstract, mark the type as frozen because there is no later
2697 point at which the profile of the subprogram will be elaborated.
2699 2015-03-13 Robert Dewar <dewar@adacore.com>
2701 * einfo.adb, einfo.ads, atree.adb, atree.ads, atree.h: Add seventh
2702 component to entities. Add new fields Field36-41 and Node36-41.
2704 2015-03-13 Claire Dross <dross@adacore.com>
2706 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Rewrite after review.
2708 2015-03-13 Robert Dewar <dewar@adacore.com>
2710 * exp_util.adb (Is_Volatile_Reference): Compile time known
2711 value is never considered to be a volatile reference.
2713 2015-03-13 Robert Dewar <dewar@adacore.com>
2715 * sem_ch3.adb (Analyze_Object_Contract): Suppress "constant
2716 cannot be volatile" for internally generated object (such as
2717 FIRST and LAST constants).
2719 2015-03-13 Ed Schonberg <schonberg@adacore.com>
2721 * sem_ch12.adb (Validate_Access_Subprogram_Instance): If a
2722 convention is specified for the formal parameter, verify that
2723 the actual has the same convention.
2724 * sem_prag.adb (Set_Convention_From_Pragma): Allow convention
2725 pragma to be set on a generic formal type.
2726 * sem_util.adb (Set_Convention): Ignore within an instance,
2727 as it has already been verified in the generic unit.
2729 2015-03-13 Claire Dross <dross@adacore.com>
2731 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do not inline
2732 subprograms with unconstrained record parameters containing
2734 * sinfo.ads Document GNATprove assumption that type should match
2736 * sem_ch6.adb (Analyze_Subprogram_Body_Contract):
2737 Do not check for Refined_Depends and Refined_Globals contracts
2738 as they are optional.
2740 2015-03-13 Ed Schonberg <schonberg@adacore.com>
2742 * sem_ch12.adb (Instantiate_Type): For a floating-point type,
2743 capture dimension info if any, because the generated subtype
2744 declaration does not come from source and will not process dimensions.
2745 * sem_dim,adb (Analyze_Dimension_Extension_Or_Record_Aggregate):
2746 Do not analyze expressions with an initialization procedure
2747 because aggregates will have been checked at the point of record
2750 2015-03-13 Robert Dewar <dewar@adacore.com>
2752 * aspects.ads, aspects.adb: Add entries for aspect Unimplemented.
2753 * einfo.ads, einfo.adb (Is_Unimplemented): New flag.
2754 * sem_ch13.adb: Add dummy entry for aspect Unimplemented.
2755 * snames.ads-tmpl: Add entry for Name_Unimplemented.
2757 2015-03-13 Gary Dismukes <dismukes@adacore.com>
2759 * style.adb (Missing_Overriding): Apply the
2760 Comes_From_Source test to the Original_Node of the subprogram
2761 node, to handle the case of a null procedure declaration that
2762 has been rewritten as an empty procedure body.
2764 2015-03-13 Robert Dewar <dewar@adacore.com>
2766 * exp_util.ads: Minor fix to comment.
2767 * sem_ch3.adb (Constrain_Index): Correct pasto from previous
2770 2015-03-13 Robert Dewar <dewar@adacore.com>
2772 * exp_util.ads, exp_util.adb (Force_Evaluation): Add Related_Id and
2773 Is_Low/High_Bound params.
2774 * sem_ch3.adb (Constrain_Index): Use new Force_Evaluation calling
2775 sequence to simplify generation of FIRST/LAST temps for bounds.
2777 2015-03-12 Olivier Hainque <hainque@adacore.com>
2779 * gcc-interface/trans.c (Attribute_to_gnu) <Code_Address case>:
2780 On targets where a function symbol designates a function descriptor,
2781 fetch the function code address from the descriptor.
2782 (USE_RUNTIME_DESCRIPTORS): Provide a default definition.
2784 2015-03-04 Robert Dewar <dewar@adacore.com>
2786 * sem_warn.adb: Minor reformatting.
2787 * init.c: Minor tweaks.
2789 2015-03-04 Dmitriy Anisimko <anisimko@adacore.com>
2791 * a-coinho-shared.adb: Fix clear of already empty holder.
2793 2015-03-04 Robert Dewar <dewar@adacore.com>
2795 * exp_unst.adb (Check_Dynamic_Type): Ignore library level types.
2796 (Check_Uplevel_Reference_To_Type): Ignore call inside generic.
2797 (Note_Uplevel_Reference): Ignore call inside generic.
2798 (Note_Uplevel_Reference): Fix check for no entity field.
2799 (Unnest_Subprogram): Ignore call inside generic.
2800 (Find_Current_Subprogram): Use Defining_Entity, not Defining_Unit_Name.
2801 (Visit_Node): Ignore calls to Imported subprograms.
2802 (Visit_Node): Fix problem in finding subprogram body in some cases.
2803 (Add_Form_To_Spec): Use Defining_Entity, not Defining_Unit_Name.
2805 2015-03-04 Robert Dewar <dewar@adacore.com>
2807 * einfo.adb (Is_ARECnF_Entity): Removed.
2808 (Last_Formal): Remove special handling of Is_ARECnF_Entity.
2809 (Next_Formal): Remove special handling of Is_ARECnF_Entity.
2810 (Next_Formal_With_Extras): Remove special handling of Is_ARECnF_Entity.
2811 (Number_Entries): Minor reformatting.
2812 * einfo.ads (Is_ARECnF_Entity): Removed.
2813 * exp_unst.adb (Unnest_Subprogram): Remove setting of
2815 (Add_Extra_Formal): Use normal Extra_Formal circuit.
2816 * sprint.adb (Write_Param_Specs): Properly handle case where
2817 there are no source formals, but we have at least one Extra_Formal
2820 2015-03-04 Ed Schonberg <schonberg@adacore.com>
2822 * sem_aggr.adb (Resolve_Record_Aggregate,
2823 Add_Discriminant_Values): If the value is a reference to the
2824 current instance of an enclosing type, use its base type to check
2825 against prefix of attribute reference, because the target type
2826 may be otherwise constrained.
2828 2015-03-04 Robert Dewar <dewar@adacore.com>
2830 * atree.h: Add entries for Flag287-Flag309.
2831 * einfo.adb: Add (unused) flags Flag287-Flag309.
2833 2015-03-04 Ed Schonberg <schonberg@adacore.com>
2835 * sem_util.adb (Collect_Interfaces, Collect): When gathering
2836 interfaces of ancestors, handle properly a subtype of a private
2839 2015-03-04 Robert Dewar <dewar@adacore.com>
2841 * einfo.adb (Is_ARECnF_Entity): New flag (ARECnF is an extra formal).
2842 (Next_Formal): Don't return ARECnF formal.
2843 (Last_Formal): Don't consider ARECnF formal.
2844 (Next_Formal_With_Extras): Do consider ARECnF formal.
2845 * einfo.ads (Is_ARECnF_Entity): New flag (ARECnF is an extra formal).
2846 * exp_unst.adb (Create_Entities): Set Is_ARECnF_Entity flag.
2848 2015-03-04 Javier Miranda <miranda@adacore.com>
2850 * exp_ch6.adb (Expand_Simple_Function_Return): When the returned
2851 object is a class-wide interface object and we generate the
2852 accessibility described in RM 6.5(8/3) then displace the pointer
2853 to the object to reference the base of the object (to get access
2854 to the TSD of the object).
2856 2015-03-04 Hristian Kirtchev <kirtchev@adacore.com>
2858 * sem_prag.adb (Analyze_Abstract_State): Use routine
2859 Malformed_State_Error to issue general errors.
2860 (Analyze_Pragma): Diagnose a syntax error related to a state
2861 declaration with a simple option.
2862 (Malformed_State_Error): New routine.
2864 2015-03-04 Robert Dewar <dewar@adacore.com>
2866 * a-strsup.adb (Super_Slice): Deal with super flat case.
2867 * einfo.ads: Minor reformatting.
2868 * s-imgdec.adb (Set_Decimal_Digits): Add comment about possibly
2871 2015-03-04 Claire Dross <dross@adacore.com>
2873 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
2874 a-cforse.ads, a-cofove.ads: Use Default_Initial_Condition on formal
2877 2015-03-04 Ed Schonberg <schonberg@adacore.com>
2879 * sem_warn.adb (Check_References): When checking for an unused
2880 in-out parameter of a class- wide type, use its type to determine
2881 whether it is private, in order to avoid a spurious warning when
2882 subprogram spec and body are in different units.
2884 2015-03-04 Yannick Moy <moy@adacore.com>
2886 * sem_attr.adb: Improve warning messages.
2888 2015-03-04 Robert Dewar <dewar@adacore.com>
2890 * exp_ch6.adb (Expand_N_Subprogram_Body): Avoid trying to unnest
2891 generic subprograms.
2892 * exp_unst.adb (Check_Dynamic_Type): Handle record types properly
2893 (Note_Uplevel_Reference): Ignore uplevel references to non-types
2894 (Get_Level): Consider only subprograms, not blocks.
2895 (Visit_Node): Set proper condition for generating ARECnF entity.
2896 Ignore indirect calls. Ignore calls to subprograms
2898 (Unnest_Subprogram): Minor changes in dealing with ARECnF entity.
2899 (Add_Form_To_Spec): Properly set Last_Entity field.
2900 (Unnest_Subprogram): Set current subprogram scope for analyze calls.
2901 Handle case of no uplevel refs in outer subprogram
2902 Don't mark uplevel entities as aliased.
2903 Don't deal with calls with no ARECnF requirement.
2905 2015-03-04 Robert Dewar <dewar@adacore.com>
2907 * s-valrea.adb (Scan_Real): Remove redundant tests from scaling loops.
2908 * s-imgdec.adb (Set_Decimal_Digits): Remove redundant Max
2909 operation in computing LZ.
2910 * sem_attr.adb: Minor typo fix
2912 2015-03-04 Robert Dewar <dewar@adacore.com>
2914 * exp_ch7.adb: Minor reformatting.
2915 * exp_unst.adb (Build_Tables): Fix minor glitch for no separate
2917 * erroutc.adb (Delete_Msg): add missing decrement of info msg counter.
2919 2015-03-04 Hristian Kirtchev <kirtchev@adacore.com>
2921 * exp_ch6.adb (Build_Pragma_Check_Equivalent): Suppress
2922 references to formal parameters subject to pragma Unreferenced.
2923 (Suppress_Reference): New routine.
2924 * sem_attr.adb (Analyze_Attribute): Reimplement the analysis
2925 of attribute 'Old. Attributes 'Old and 'Result now share
2927 (Analyze_Old_Result_Attribute): New routine.
2928 (Check_Placement_In_Check): Removed.
2929 (Check_Placement_In_Contract_Cases): Removed.
2930 (Check_Placement_In_Test_Case): Removed.
2931 (Check_Use_In_Contract_Cases): Removed.
2932 (Check_Use_In_Test_Case): Removed.
2933 (In_Refined_Post): Removed.
2934 (Is_Within): Removed.
2935 * sem_warn.adb (Check_Low_Bound_Tested): Code cleanup.
2936 (Check_Low_Bound_Tested_For): New routine.
2938 2015-03-04 Hristian Kirtchev <kirtchev@adacore.com>
2940 * exp_ch3.adb (Expand_N_Object_Declaration):
2941 Generate a runtime check to test the expression of pragma
2942 Default_Initial_Condition when the object is default initialized.
2944 2015-03-02 Robert Dewar <dewar@adacore.com>
2946 * scng.adb (Scan): Ignore illegal character in relaxed
2949 2015-03-02 Ed Schonberg <schonberg@adacore.com>
2951 * sem_ch4.adb (Analyze_Set_Membership); Retain Overloaded flag
2952 on left operand, so it can be properly resolved with type of
2953 alternatives of right operand.
2954 * sem_res.adb (Resolve_Set_Membership): Handle properly an
2955 overloaded left-hand side when the alternatives on the right
2956 hand side are literals of some universal type. Use first
2957 non-overloaded alternative to find expected type.
2959 2015-03-02 Ed Schonberg <schonberg@adacore.com>
2961 * exp_ch7.adb (Make_Set_Finalize_Address_Call): Use underlying
2962 type to retrieve designated type, because the purported access
2963 type may be a partial (private) view, when it is declared in
2964 the private part of a nested package, and finalization actions
2965 are generated when completing compilation of enclosing unit.
2967 2015-03-02 Robert Dewar <dewar@adacore.com>
2969 * back_end.adb (Call_Back_End): Remove previous patch,
2970 the back end now gets to see the result of -gnatd.1
2971 (Unnest_Subprogram_Mode) processing.
2972 * elists.ads, elists.adb (List_Length): New function.
2973 * exp_unst.ads, exp_unst.adb: Major changes, first complete version.
2974 * sem_util.adb (Check_Nested_Access): Handle formals in
2975 Unnest_Subprogram_Mode.
2976 (Adjust_Named_Associations): Minor reformatting.
2977 * sprint.adb (Sprint_Node_Actual): Fix failure to print aliased
2980 2015-03-02 Robert Dewar <dewar@adacore.com>
2982 * atree.ads, atree.adb (Uint24): New function
2983 (Set_Uint24): New procedure.
2984 * atree.h (Uint24): New macro for field access.
2985 * back_end.adb (Call_Back_End): For now, don't call back end
2986 if unnesting subprogs.
2987 * einfo.adb (Activation_Record_Component): New field
2988 (Subps_Index): New field.
2989 * einfo.ads (Activation_Record_Component): New field
2990 (Subps_Index): New field Minor reordering of comments into alpha order.
2991 * exp_unst.ads, exp_unst.adb: Continued development.
2993 2015-03-02 Gary Dismukes <dismukes@adacore.com>
2995 * exp_disp.ads: Minor reformatting.
2997 2015-03-02 Ed Schonberg <schonberg@adacore.com>
2999 * sem_ch8.adb (Chain_Use_Clause): Do not chain use clause from
3000 ancestor to list of use clauses active in descendant unit if we
3001 are within the private part of an intervening parent, to prevent
3002 circularities in use clause list.
3004 2015-03-02 Javier Miranda <miranda@adacore.com>
3006 * exp_ch9.adb (Build_Corresponding_Record): Propagate type
3007 invariants to the corresponding record type.
3008 * exp_disp.ad[sb] (Set_DT_Position_Value): New subprogram
3009 which sets the value of the DTC_Entity associated with a given
3010 primitive of a tagged type and propagates the value to the
3012 (Set_DTC_Entity_Value): Propagate the DTC
3013 value to the wrapped entity.
3014 * sem_ch13.adb (Build_Invariant_Procedure): Append the code
3015 associated with invariants of progenitors.
3016 * sem_ch3.adb (Build_Derived_Record_Type): Inherit type invariants
3017 of parents and progenitors.
3018 (Process_Full_View): Check hidden inheritance of class-wide type
3020 * sem_ch7.adb (Analyze_Package_Specification): Do not generate
3021 the invariant procedure for interface types; build the invariant
3022 procedure for tagged types inheriting invariants from their
3024 * sem_prag.adb (Pragma_Invariant) Allow invariants in interface
3025 types but do not build their invariant procedure since their
3026 invariants will be propagated to the invariant procedure of
3027 types covering the interface.
3028 * exp_ch6.adb, exp_disp.adb, sem_ch3.adb, sem_ch7.adb,
3029 sem_ch8.adb, sem_disp.adb: Replace all calls to Set_DT_Position
3030 by calls to Set_DT_Position_Value.
3032 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
3034 * sem_attr.adb (Analyze_Attribute): Factor out heavily indented
3035 code in Denote_Same_Function. Do not analyze attribute 'Result
3036 when it is inside procedure _Postconditions. Remove a misplaced
3037 warning diagnostic. Code cleanup.
3038 (Denote_Same_Function): New routine.
3039 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Code
3040 cleanup. Warn on pre/postconditions on an inlined subprogram.
3041 (Analyze_Pragma, Refined_Post case): Warn on pre/postconditions on
3042 an inlined subprogram.
3043 (Analyze_Pre_Post_Condition_In_Decl_Part): Code cleanup. Warn on
3044 pre/post condition on an inlined subprogram.
3045 (Analyze_Test_Case_In_Decl_Part): Code cleanup. Warn on
3046 pre/postconditions on an inlined subprogram.
3047 (Check_Postcondition_Use_In_Inlined_Subprogram): New routine.
3049 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
3051 * sem_prag.adb (Ensure_Aggregate_Form):
3052 Ensure that the name denoted by the Chars of a pragma argument
3053 association has the proper Sloc when converted into an aggregate.
3055 2015-03-02 Bob Duff <duff@adacore.com>
3057 * sem_ch6.adb (Check_Private_Overriding): Capture
3058 Incomplete_Or_Partial_View in a constant. This is cleaner and
3061 2015-03-02 Gary Dismukes <dismukes@adacore.com>
3063 * einfo.ads, exp_unst.ads: Minor reformatting.
3065 2015-03-02 Ed Schonberg <schonberg@adacore.com>
3067 * a-strsea.adb (Find_Token): Ensure that the range of iteration
3068 does not perform any improper character access. This prevents
3069 erroneous access in the unusual case of an empty string target
3070 and a From parameter less than Source'First.
3072 2015-03-02 Robert Dewar <dewar@adacore.com>
3074 * elists.adb (List_Length): Fix incorrect result.
3076 2015-03-02 Bob Duff <duff@adacore.com>
3078 * sem_ch6.adb (Check_Private_Overriding): Refine the legality
3079 checks here. It used to check that the function is merely
3080 overriding SOMEthing. Now it checks that the function is
3081 overriding a corresponding public operation. This is a correction
3082 to the implementation of the rule in RM-3.9.3(10).
3084 2015-03-02 Robert Dewar <dewar@adacore.com>
3086 * debug.adb: Document new debug flag -gnatd.1.
3087 * einfo.ads, einfo.adb (Has_Nested_Subprogram): New flag.
3088 (Has_Uplevel_Reference): New flag (Is_Static_Type): New flag.
3089 (Uplevel_Reference_Noted):New flag (Uplevel_References): New field.
3090 * elists.ads elists.adb (List_Length): New function.
3091 * exp_ch6.adb (Expand_N_Subprogram_Body): Call Unnest_Subprogram
3092 when appropriate (Process_Preconditions): Minor code
3093 reorganization and reformatting
3094 * exp_unst.ads, exp_unst.adb: New files.
3095 * gnat1drv.adb (Adjust_Global_Switches): Set
3096 Unnest_Subprogram_Mode if -gnatd.1
3097 * namet.ads, namet.adb (Name_Find_Str): New version of Name_Find with
3099 * opt.ads (Unnest_Subprogram_Mode): New flag.
3100 * par-ch3.adb (P_Identifier_Declarations): Fixes to -gnatd.2 handling.
3101 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set
3102 Has_Nested_Subprogram flag.
3103 * sem_ch8.adb (Find_Direct_Name): New calling sequence for
3104 Check_Nested_Access.
3105 (Find_Selected_Component): Minor comment addition.
3106 * sem_util.adb (Check_Nested_Access): New version for use with Exp_Unst.
3107 (Note_Possible_Modification): New calling sequence for
3108 Check_Nested_Access.
3109 * sem_util.ads (Check_Nested_Access): New version for use with Exp_Unst.
3110 * gcc-interface/Make-lang.in (GNAT1_OBJS): Add exp_unst.o
3112 2015-03-02 Pierre-Marie de Rodat <derodat@adacore.com>
3114 * gcc-interface/utils.c (gnat_pushdecl): For non-artificial pointer
3115 types, preserve the original type and create copies just like the C
3116 front-end does. For artificial ones, do not define a name for
3118 (create_type_decl): When gnat_pushdecl made the input type the
3119 original type for the new declaration, do not define a stub
3121 * gcc-interface/utils2.c (build_binary_op): Accept two different
3122 pointer types when they point to the same type.
3124 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
3126 * exp_util.adb (Possible_Bit_Aligned_Component): Do not process
3128 * sem_util.adb (Kill_Current_Values): Do not invalidate and
3131 2015-03-02 Robert Dewar <dewar@adacore.com>
3133 * sem_ch3.adb, exp_attr.adb, checks.adb, exp_aggr.adb: Minor
3136 2015-03-02 Ed Schonberg <schonberg@adacore.com>
3138 * sem_ch8.adb: extend use of Available_Subtype.
3140 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
3142 * sem_prag.adb (Duplication_Error): Remove the special handling
3143 of 'Class or _Class in the context of pre/postconditions.
3144 (Process_Class_Wide_Condition): Remove the special handling of
3145 'Class or _Class in the context of pre/postconditions.
3146 * sem_util.adb (Original_Aspect_Pragma_Name): Names Pre_Class
3147 and Post_Class no longer need to be converted to _Pre and _Post.
3148 * sem_util.ads (Original_Aspect_Pragma_Name): Update the comment
3151 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
3153 * exp_ch6.adb (Process_Preconditions): Modify the
3154 mechanism that find the first source declaration to correct exit
3155 the loop once it has been found.
3157 2015-03-02 Gary Dismukes <dismukes@adacore.com>
3159 * a-strsea.adb: Minor typo fix.
3161 2015-03-02 Bob Duff <duff@adacore.com>
3163 * einfo.ads: Minor comment fixes.
3165 2015-03-02 Gary Dismukes <dismukes@adacore.com>
3167 * einfo.adb, checks.adb: Minor reformatting and typo fixes.
3169 2015-03-02 Ed Schonberg <schonberg@adacore.com>
3171 * exp_aggr.adb (Get_Assoc_Expr): If the Default_Component_Value
3172 is defined for the array type, use it instead of a Default_Value
3173 specified for the component type itself.
3175 2015-03-02 Thomas Quinot <quinot@adacore.com>
3177 * exp_attr.adb (Expand_N_Attribute_Reference, case Input): When
3178 expanding a 'Input attribute reference for a class-wide type,
3179 do not generate a separate object declaration for the controlling
3180 tag dummy object; instead, generate the expression inline in the
3181 dispatching call. Otherwise, the declaration (which involves a
3182 call to String'Input, returning a dynamically sized value on the
3183 secondary stack) will be expanded outside of proper secondary
3184 stack mark/release operations, and will thus cause a secondary
3187 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
3189 * checks.adb (Add_Validity_Check): Change the names of all
3190 formal parameters to better illustrate their purpose. Update
3191 the subprogram documentation. Update all occurrences of the
3192 formal parameters. Generate a pre/postcondition pragma by
3193 calling Build_Pre_Post_Condition.
3194 (Build_PPC_Pragma): Removed.
3195 (Build_Pre_Post_Condition): New routine.
3196 * einfo.adb Node8 is no longer used as Postcondition_Proc. Node14
3197 is now used as Postconditions_Proc. Flag240 is now renamed to
3198 Has_Expanded_Contract. (First_Formal): The routine can now
3199 operate on generic subprograms.
3200 (First_Formal_With_Extras): The routine can now operate on generic
3202 (Has_Expanded_Contract): New routine.
3203 (Has_Postconditions): Removed.
3204 (Postcondition_Proc): Removed.
3205 (Postconditions_Proc): New routine.
3206 (Set_Has_Expanded_Contract): New routine.
3207 (Set_Has_Postconditions): Removed.
3208 (Set_Postcondition_Proc): Removed.
3209 (Set_Postconditions_Proc): New routine.
3210 (Write_Entity_Flags): Remove the output of Has_Postconditions. Add
3211 the output of Has_Expanded_Contract.
3212 (Write_Field8_Name): Remove the output of Postcondition_Proc.
3213 (Write_Field14_Name): Add the output of Postconditions_Proc.
3214 * einfo.ads New attributes Has_Expanded_Contract and
3215 Postconditions_Proc along with occurrences in entities.
3216 Remove attributes Has_Postconditions and Postcondition_Proc
3217 along with occurrences in entities.
3218 (Has_Expanded_Contract): New routine along with pragma Inline.
3219 (Has_Postconditions): Removed along with pragma Inline.
3220 (Postcondition_Proc): Removed along with pragma Inline.
3221 (Postconditions_Proc): New routine along with pragma Inline.
3222 (Set_Has_Expanded_Contract): New routine along with pragma Inline.
3223 (Set_Has_Postconditions): Removed along with pragma Inline.
3224 (Set_Postcondition_Proc): Removed along with pragma Inline.
3225 (Set_Postconditions_Proc): New routine along with pragma Inline.
3226 * exp_ch6.adb (Add_Return): Code cleanup. Update the
3227 generation of the call to the _Postconditions routine of
3228 the procedure. (Expand_Non_Function_Return): Reformat the
3229 comment on usage. Code cleanup. Update the generation of
3230 the call to the _Postconditions routine of the procedure or
3232 (Expand_Simple_Function_Return): Update the
3233 generation of the _Postconditions routine of the function.
3234 (Expand_Subprogram_Contract): Reimplemented.
3235 * exp_ch6.ads (Expand_Subprogram_Contract): Update the parameter
3236 profile along the comment on usage.
3237 * exp_ch9.adb (Build_PPC_Wrapper): Code cleanup.
3238 (Expand_N_Task_Type_Declaration): Generate pre/postconditions
3239 wrapper when the entry [family] has a contract with
3241 * exp_prag.adb (Expand_Attributes_In_Consequence): New routine.
3242 (Expand_Contract_Cases): This routine and its subsidiaries now
3243 analyze all generated code.
3244 (Expand_Old_In_Consequence): Removed.
3245 * sem_attr.adb Add with and use clause for Sem_Prag.
3246 (Analyze_Attribute): Reimplment the analysis of attribute 'Result.
3247 (Check_Use_In_Test_Case): Use routine Test_Case_Arg to obtain
3249 * sem_ch3.adb (Analyze_Declarations): Analyze the contract of
3250 a generic subprogram.
3251 (Analyze_Object_Declaration): Do not create a contract node.
3252 (Derive_Subprogram): Do not create a contract node.
3253 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Do
3254 not create a contract node.
3255 (Analyze_Completion_Contract): New routine.
3256 (Analyze_Function_Return): Alphabetize.
3257 (Analyze_Generic_Subprogram_Body): Alphabetize. Do not create a
3258 contract node. Do not copy pre/postconditions to the original
3260 (Analyze_Null_Procedure): Do not create a contract node.
3261 (Analyze_Subprogram_Body_Contract): Reimplemented.
3262 (Analyze_Subprogram_Body_Helper): Do not mark the enclosing scope
3263 as having postconditions. Do not create a contract node. Analyze
3264 the subprogram body contract of a body that acts as a compilation
3265 unit. Expand the subprogram contract after the declarations have
3267 (Analyze_Subprogram_Contract): Reimplemented.
3268 (Analyze_Subprogram_Specification): Do not create a contract node.
3269 (List_Inherited_Pre_Post_Aspects): Code cleanup.
3270 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Update the
3272 (Analyze_Subprogram_Contract): Update the
3273 parameter profile and the comment on usage.
3274 * sem_ch7.adb (Analyze_Package_Body_Helper): Do not create a
3276 (Analyze_Package_Declaration): Do not create a
3278 (Is_Subp_Or_Const_Ref): Ensure that the prefix has an entity.
3279 * sem_ch8.adb (Analyze_Subprogram_Renaming): Do not create a
3281 * sem_ch9.adb (Analyze_Entry_Declaration): Do not create a
3283 * sem_ch10.adb (Analyze_Compilation_Unit): Move local variables to
3284 their proper section and alphabetize them. Analyze the contract of
3285 a [generic] subprogram after all Pragmas_After have been analyzed.
3286 (Analyze_Subprogram_Body_Stub_Contract): Alphabetize.
3287 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Do not
3288 create a contract node.
3289 (Analyze_Generic_Subprogram_Declaration):
3290 Alphabetize local variables. Do not create a contract
3291 node. Do not generate aspects out of pragmas for ASIS.
3292 (Analyze_Subprogram_Instantiation): Instantiate
3293 the contract of the subprogram. Do not create a
3294 contract node. (Instantiate_Contract): New routine.
3295 (Instantiate_Subprogram_Body): Alphabetize local variables.
3296 (Save_Global_References_In_Aspects): New routine.
3297 (Save_References): Do not save the global references found within
3298 the aspects of a generic subprogram.
3299 * sem_ch12.ads (Save_Global_References_In_Aspects): New routine.
3300 * sem_ch13.adb (Analyze_Aspect_Specifications): Do not use
3301 Original_Node for establishing linkages.
3302 (Insert_Pragma): Insertion in a subprogram body takes precedence over
3303 the case where the subprogram body is also a compilation unit.
3304 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Use
3305 Get_Argument to obtain the proper expression. Install the generic
3306 formals when the related context is a generic subprogram.
3307 (Analyze_Depends_In_Decl_Part): Use Get_Argument to obtain
3308 the proper expression. Use Corresponding_Spec_Of to obtain
3309 the spec. Install the generic formal when the related context
3310 is a generic subprogram.
3311 (Analyze_Global_In_Decl_Part): Use Get_Argument to obtain the proper
3312 expression. Use Corresponding_Spec_Of to obtain the spec. Install the
3313 generic formal when the related context is a generic subprogram.
3314 (Analyze_Initial_Condition_In_Decl_Part): Use Get_Argument
3315 to obtain the proper expression. Remove the call to
3316 Check_SPARK_Aspect_For_ASIS as the analysis is now done
3318 (Analyze_Pragma): Update all occurrences
3319 to Original_Aspect_Name. Pragmas Contract_Cases, Depends,
3320 Extensions_Visible, Global, Postcondition, Precondition and
3321 Test_Case now carry generic templates when the related context
3322 is a generic subprogram. The same pragmas are no longer
3323 forcefully fully analyzed when the context is a subprogram
3324 that acts as a compilation unit. Pragmas Abstract_State,
3325 Initial_Condition, Initializes and Refined_State have been clean
3326 up. Pragmas Post, Post_Class, Postcondition, Pre, Pre_Class
3327 and Precondition now use the same routine for analysis. Pragma
3328 Refined_Post does not need to check the use of 'Result or
3329 the lack of a post-state in its expression. Reimplement the
3330 analysis of pragma Test_Case.
3331 (Analyze_Pre_Post_Condition): New routine.
3332 (Analyze_Pre_Post_Condition_In_Decl_Part):
3334 (Analyze_Refined_Depends_In_Decl_Part): Use Get_Argument to obtain the
3336 (Analyze_Refined_Global_In_Decl_Part): Use Get_Argument to obtain
3337 the proper expression.
3338 (Analyze_Test_Case_In_Decl_Part): Reimplemented.
3339 (Check_Pre_Post): Removed.
3340 (Check_Precondition_Postcondition): Removed.
3341 (Check_SPARK_Aspect_For_ASIS): Removed.
3342 (Check_Test_Case): Removed.
3343 (Collect_Subprogram_Inputs_Outputs): Use Get_Argument
3344 to obtain the proper expression. Use Corresponding_Spec_Of to
3345 find the proper spec.
3346 (Create_Generic_Template): New routine.
3347 (Duplication_Error): New routine.
3348 (Expression_Function_Error): New routine.
3349 (Find_Related_Subprogram_Or_Body): Moved to the spec
3350 of Sem_Prag. Emit precise error messages. Account for cases of
3351 rewritten expression functions, generic instantiations, handled
3352 sequence of statements and pragmas from aspects.
3353 (Get_Argument): New routine.
3354 (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Removed.
3355 (Preanalyze_CTC_Args): Removed.
3356 (Process_Class_Wide_Condition): New routine.
3357 * sem_prag.ads (Analyze_Test_Case_In_Decl_Part): Update
3358 the parameter profile along with the comment on usage.
3359 (Find_Related_Subprogram_Or_Body): Moved from the body of Sem_Prag.
3360 (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Removed.
3361 (Test_Case_Arg): New routine.
3362 * sem_util.adb Add with and use clauses for Sem_Ch6.
3363 (Add_Contract_Item): This routine now creates a contract
3364 node the first time an item is added. Remove the duplicate
3365 aspect/pragma checks.
3366 (Check_Result_And_Post_State): Reimplemented.
3367 (Corresponding_Spec_Of): New routine.
3368 (Get_Ensures_From_CTC_Pragma): Removed.
3369 (Get_Requires_From_CTC_Pragma): Removed.
3370 (Has_Significant_Contract): New routine.
3371 (Inherit_Subprogram_Contract): Inherit only if the source
3373 (Install_Generic_Formals): New routine.
3374 (Original_Aspect_Name): Removed.
3375 (Original_Aspect_Pragma_Name): New routine.
3376 * sem_util.ads (Check_Result_And_Post_State): Reimplemented.
3377 (Corresponding_Spec_Of): New routine.
3378 (Get_Ensures_From_CTC_Pragma): Removed.
3379 (Get_Requires_From_CTC_Pragma): Removed.
3380 (Has_Significant_Contract): New routine.
3381 (Install_Generic_Formals): New routine.
3382 (Original_Aspect_Name): Removed.
3383 (Original_Aspect_Pragma_Name): New routine.
3384 * sem_warn.adb Add with and use clauses for Sem_Prag.
3385 (Within_Postcondition): Use Test_Case_Arg to extract "Ensures".
3387 2015-03-02 Ed Schonberg <schonberg@adacore.com>
3389 * sem_ch8.adb (Available_Subtype): Optimization in
3390 Find_Selected_Component: when safe, use existing subtype of
3391 array component, possibly discriminant-dependent, rather than
3392 creating new subtype declaration for it. In this fashion different
3393 occurrences of the component have the same subtype, rather than
3394 just equivalent ones. Simplifies value tracing in GNATProve.
3396 2015-03-01 Arnaud Charlet <charlet@adacore.com>
3400 * doc/gnat_ugn/gnat_project_manager.rst,
3401 doc/gnat_ugn/platform_specific_information.rst: Remove reference to
3402 image, too troublesome with texi format.
3403 * gnat_ugn.texi: Regenerate.
3405 2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
3408 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8): Remove.
3409 (DEF_FUNCTION_TYPE_VAR_12): Likewise.
3410 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
3412 2015-02-23 Thomas Schwinge <thomas@codesourcery.com>
3414 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8): Fix number of
3415 arguments parameter.
3416 (DEF_FUNCTION_TYPE_VAR_12): Likewise.
3418 2015-02-22 Arnaud Charlet <charlet@adacore.com>
3420 * doc/Makefile: postprocess texinfo files to update @dircategory
3421 and update texi files under gcc/ada.
3422 * gnat_ugn.texi, gnat_rm.texi: Regenerated.
3424 2015-02-22 Arnaud Charlet <charlet@adacore.com>
3426 * doc/gnat_ugn/project-manager-figure.png,
3427 doc/gnat_ugn/rtlibrary-structure.png: New.
3429 2015-02-22 Tom de Vries <tom@codesourcery.com>
3432 * gnat-style.texi (@subsection Loop Statements): Replace @noindent by
3433 @item, and fix warning '@itemize has text but no @item'.
3435 2015-02-20 Ed Schonberg <schonberg@adacore.com>
3437 * sem_prag.adb (Analyze_Pragma, case Obsolescent): Pragma
3438 legally applies to an abstract subprogram declaration.
3439 * freeze.adb: Minor comment addition.
3441 2015-02-20 Robert Dewar <dewar@adacore.com>
3443 * errout.ads: Document replacement of Name_uPre/Post/Type_Invariant.
3444 * erroutc.adb (Set_Msg_Str): Replace _xxx.
3445 (Pre/Post/Type_Invariant) by xxx'Class.
3446 * erroutc.ads (Set_Msg_Str): Replace _xxx.
3447 (Pre/Post/Type_Invariant) by xxx'Class.
3448 * sem_prag.adb (Fix_Error): Remove special casing of
3449 Name_uType_Invariant.
3450 (Analyze_Pre_Post_Condition_In_Decl_Part): Remove special casing of
3451 Name_uPre and Name_uPost in aspect case (done in Errout now).
3453 2015-02-20 Robert Dewar <dewar@adacore.com>
3455 * g-alveop.adb: Minor style fixes.
3457 2015-02-20 Robert Dewar <dewar@adacore.com>
3459 * freeze.adb (Warn_Overlay): Guard against blow up with address
3462 2015-02-20 Bob Duff <duff@adacore.com>
3464 * exp_attr.adb (May_Be_External_Call): Remove this. There is no need
3465 for the compiler to guess whether the call is internal or external --
3466 it is always external.
3467 (Expand_Access_To_Protected_Op): For P'Access, where P
3468 is a protected subprogram, always create a pointer to the
3469 External_Subprogram.
3471 2015-02-20 Robert Dewar <dewar@adacore.com>
3473 * a-dispat.adb, a-stcoed.ads: Minor reformatting.
3475 2015-02-20 Robert Dewar <dewar@adacore.com>
3477 * sem_ch13.adb (Build_Discrete_Static_Predicate): Allow static
3478 predicate for non-static subtype.
3479 (Build_Predicate_Functions): Do not assume subtype associated with a
3480 static predicate must be static.
3482 2015-02-20 Robert Dewar <dewar@adacore.com>
3484 * errout.adb (Set_Msg_Node): Better handling of internal names
3485 (Set_Msg_Node): Kill message when we cannot eliminate internal name.
3486 * errout.ads: Document additional case of message deletion.
3487 * namet.adb (Is_Internal_Name): Refined to consider wide
3488 strings in brackets notation and character literals not to be
3490 * sem_ch8.adb (Find_Selected_Component): Give additional error
3491 when selector name is a subprogram whose first parameter has
3492 the same type as the prefix, but that type is untagged.
3494 2015-02-20 Robert Dewar <dewar@adacore.com>
3496 * g-allein.ads, g-alveop.adb, g-alveop.ads, opt.ads: Minor reformatting
3498 2015-02-20 Tristan Gingold <gingold@adacore.com>
3500 * opt.ads (GNAT_Mode_Config): New variable.
3501 * opt.adb (Set_Opt_Config_Switches): Consider GNAT_Mode_Config
3502 to set Assertions_Enabled.
3503 * switch-c.adb (Scan_Front_End_Switches): Set GNAT_Mode_Config
3506 2015-02-20 Robert Dewar <dewar@adacore.com>
3508 * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Add an additional
3509 comment regarding the handling of unterminated fixed-point
3511 * s-valuns.ads (Scan_Raw_Unsigned): Add comments
3512 corresponding to those previously added for
3513 System.Val_LLU.Scan_Raw_Long_Long_Unsigned.
3515 2015-02-20 Olivier Hainque <hainque@adacore.com>
3517 * g-allein.ads, g-alveop.ads, g-alveop.adb: Code clean ups.
3519 2015-02-20 Robert Dewar <dewar@adacore.com>
3521 * sem_prag.adb: Minor comment clarification.
3523 2015-02-20 Olivier Hainque <hainque@adacore.com>
3525 * g-allein.ads (vec_ctf, vec_vcsfx, vec_vcfux): Remove.
3526 * g-alleve.ads, g-alleva.adb (vcfux): Likewise.
3527 * g-alveop.ads (vec_vcfsx, vec_vcfux): Just rename the ll versions.
3528 (vec_ctf): Now renamings as well.
3530 2015-02-20 Robert Dewar <dewar@adacore.com>
3532 * switch-c.adb, bindgen.adb: Minor reformatting.
3534 2015-02-20 Ed Schonberg <schonberg@adacore.com>
3536 * sem_prag.adb (Analyze_Pragma, case Type_Invariant):
3537 Invariant'class is allowed on an abstract type.
3539 2015-02-20 Ed Schonberg <schonberg@adacore.com>
3541 * sem_ch3.adb (Access_Definition): If the access definition is
3542 for a protected component and defines an access to protected
3543 subprogram, do not create an itype reference for it because a
3544 full type declaration will be built in order to generate the
3545 proper equivalent type.
3546 (Analyze_Subtype_Declaration): Add information of incomplete
3547 subtypes, for Ada 2012 extended uses of incomplete types.
3549 2015-02-20 Gary Dismukes <dismukes@adacore.com>
3551 * sem_res.adb: Minor reformatting.
3553 2015-02-20 Vincent Celier <celier@adacore.com>
3555 * switch-c.adb (Scan_Front_End_Switches): When comparing runtime
3556 path name for several switches --RTS, use the normalized path
3559 2015-02-20 Vincent Celier <celier@adacore.com>
3561 * bindgen.adb: Minor reformatting and code reorganization.
3563 2015-02-20 Jose Ruiz <ruiz@adacore.com>
3565 * a-stcoed.ads: Add spec for this package (Unimplemented_Unit).
3566 * impunit.adb (Non_Imp_File_Names_12): Mark unit a-stcoed.ads as
3567 defined by Ada 2012.
3569 2015-02-20 Arnaud Charlet <charlet@adacore.com>
3571 * sysdep.c, expect.c, s-oscons-tmplt.c, gsocket.h, adaint.c: Remove
3572 obsolete references to RTX, nucleus, VMS.
3574 2015-02-20 Ed Schonberg <schonberg@adacore.com>
3576 * sem_prag.adb (Fix_Error): For an illegal Type_Invariant'Class
3577 aspect, use name that mentions Class explicitly, rather than
3578 compiler-internal name.
3580 2015-02-20 Robert Dewar <dewar@adacore.com>
3582 * debug.adb: Add documentation for -gnatd.2 (allow statements
3584 * par-ch3.adb (P_Identifier_Declarations): Handle
3585 statement appearing where declaration expected more cleanly.
3586 (Statement_When_Declaration_Expected): Implement debug flag
3589 2015-02-20 Jose Ruiz <ruiz@adacore.com>
3591 * a-dinopr.ads: Add spec for this package (Unimplemented_Unit).
3592 * a-dispat.ads (Yield): Include procedure added in Ada 2012.
3593 * a-dispat.adb (Yield): Implement procedure added in Ada 2012.
3594 * impunit.adb (Non_Imp_File_Names_05): Mark unit a-dinopr.ads as
3595 defined by Ada 2005.
3596 * snames.ads-tmpl (Name_Non_Preemptive_FIFO_Within_Priorities):
3597 This is the correct name for the dispatching policy (FIFO was
3600 2015-02-20 Javier Miranda <miranda@adacore.com>
3602 * sem_res.adb (Resolve_Type_Conversion): If the type of the
3603 operand is the limited-view of a class-wide type then recover
3604 the class-wide type of the non-limited view.
3606 2015-02-20 Arnaud Charlet <charlet@adacore.com>
3608 * gcc-interface/Makefile.in: Remove references to nucleus.
3609 * gcc-interface/decl.c (gnat_to_gnu_entity, case E_Procedure): Set
3610 extern_flag to true for Inline_Always subprograms with
3611 Intrinsic convention.
3613 2015-02-20 Yannick Moy <moy@adacore.com>
3615 * sem_prag.ads: Minor typo in comment.
3617 2015-02-20 Pascal Obry <obry@adacore.com>
3619 * s-osprim-mingw.adb: Fix Get_Base_Time parameter mode.
3621 2015-02-20 Vincent Celier <celier@adacore.com>
3623 * makeutl.adb (Get_Directories.Add_Dir): Add a directory only
3626 2015-02-20 Robert Dewar <dewar@adacore.com>
3628 * sem_eval.ads: Minor reformatting.
3630 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
3632 * freeze.adb (Size_Known): Do not set the packed size for
3633 independent type or component.
3634 (Freeze_Array_Type): Check for Independent[_Components] with packing
3635 or explicit component size clause.
3636 * gnat1drv.adb (Post_Compilation_Validation_Checks): Do the validation
3637 of independence pragmas only for non-GCC back-ends.
3638 * sem_ch13.adb (Initialize): Likewise for the initialization.
3639 * sem_prag.adb (Record_Independence_Check): New procedure to record an
3640 independence check in the table.
3641 (Analyze_Pragma): Use it throughout instead of doing it manually.
3642 * gcc-interface/decl.c (gnat_to_gnu_field): Add support for
3643 independent type or component.
3645 2015-02-20 Thomas Quinot <quinot@adacore.com>
3647 * adaint.c (__gnat_readdir): For Solaris, use 64 bit variants of
3648 struct direct and readdir. This is required for NFS filesystems
3649 mounted from servers that use 64-bit cookies.
3651 2015-02-20 Ed Schonberg <schonberg@adacore.com>
3653 * sem_ch12.adb (Analyze_Subprogram_Instantiaion): New subprogram
3654 Build_Subprogram_Renaming, to create renaming of subprogram
3655 instance in the the declaration of the wrapper package rather
3656 than in its body, so that it is available for analysis of aspects
3657 propagated from generic to instantiation.
3658 (Check_Mismatch): An actual for a formal package that is an
3659 incomplete type matches a formal type that is incomplete.
3660 (Instantiate_Package_Body): Move code that builds subprogram
3661 renaming to Analyze_Subprogram_Instantiation.
3662 (Instantiate_Type): The generated subtype is a limited view if
3663 the actual is a limited view.
3664 (Load_Parent_Of_Generic): Retrieve instance declaration from
3665 its new position within wrapper package.
3667 2015-02-20 Arnaud Charlet <charlet@adacore.com>
3669 * s-parame-vxworks.adb, s-os_lib.ads: Update comments.
3671 2015-02-20 Robert Dewar <dewar@adacore.com>
3673 * s-osinte-vxworks.ads (To_Timespec): Add comment about the
3674 issue of negative arguments.
3676 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
3678 * gnat1drv.adb: Minor consistency fix.
3680 2015-02-20 Pascal Obry <obry@adacore.com>
3682 * s-osprim-mingw.adb (Get_Base_Time): Properly release lock in all
3685 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
3687 * inline.adb (Expand_Inlined_Call): Skip again calls to subprogram
3689 * exp_ch6.adb (Expand_Call): Use back-end inlining
3690 instead of expansion for simple subprogram renamings.
3692 2015-02-20 Robert Dewar <dewar@adacore.com>
3694 * exp_util.adb: Minor reformatting.
3696 2015-02-20 Vincent Celier <celier@adacore.com>
3698 * switch-c.adb (Scan_Front_End_Switches): Do not fail when --RTS=
3699 is specified several times with different values that indicates
3700 the same runtime directory.
3702 2015-02-20 Ed Schonberg <schonberg@adacore.com>
3704 * sem_attr.adb (Check_Not_Incomplete_Type): Clean up code to
3705 handle properly illegal uses of attributes on prefixes on an
3706 incomplete type, both when the type of the prefix is locally
3707 incomplete, and when it is a limited view of a type whose
3708 non-limited view is not available.
3709 (Analyze_Attribute): Add calls to Check_Not_Incomplete_Type for
3710 'Address and others.
3712 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
3714 * exp_ch6.adb: Fix minor typo in comment.
3716 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
3718 * sinfo.ads: Add comment.
3720 2015-02-20 Olivier Hainque <hainque@adacore.com>
3722 * opt.ads: Replace Opt.Suppress_All_Inlining by two separate
3723 flags controlling the actual FE inlining out of pragma Inline
3724 and pragma Inline_Always.
3725 * adabkend.adb (Scan_Compiler_Arguments): Set both flags to True
3726 on -fno-inline, which disables all inlining in compilers with
3727 an Ada back-end and without back-end inlining support.
3728 * back_end.adb (Scan_Back_End_Switches): Set the Inline related
3729 flag to True on -fno-inline and leave Inline_Always alone for
3731 * back_end.ads (Scan_Compiler_Arguments): Adjust spec wrt the
3732 names of the Opt flags it sets.
3733 * gnat1drv.adb (Adjust_Global_Switches): Remove test on
3734 Opt.Suppress_All_Inlining in the Back_End_Inlining computation.
3735 * sem_prag.adb (Make_Inline): Remove early return conditioned
3736 on Opt.Suppress_All_Inlining.
3737 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Use the flags to
3738 disable the calls to Build_Body_To_Inline otherwise triggered
3739 by pragma Inline or Inline_Always. This will prevent actual
3740 front-end inlining of the subprogram on calls.
3742 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
3744 * exp_ch3.adb (Default_Initialize_Object): Call Add_Inlined_Body on the
3745 Abort_Undefer_Direct function.
3746 * exp_ch5.adb (Expand_N_Assignment_Statement): Likewise.
3747 * exp_intr.adb (Expand_Unc_Deallocation): Likewise.
3748 * exp_prag.adb (Expand_Pragma_Abort_Defer): Likewise.
3749 * exp_ch4.adb (Expand_N_Selected_Component): Adjust call to
3751 * exp_ch6.adb (Expand_Call): Adjust calls to Add_Inlined_Body.
3752 Remove call to Register_Backend_Call and move code resetting
3753 Needs_Debug_Info on inlined subprograms to...
3754 * inline.ads (Add_Inlined_Body): Add N parameter.
3755 (Register_Backend_Call): Delete.
3756 * inline.adb (Add_Inlined_Body): ...here and simplify.
3757 Register the call with Backend_Calls directly.
3758 (Register_Backend_Call): Delete.
3759 * s-stalib.ads (Abort_Undefer_Direct): Restore pragma Inline.
3761 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
3763 * s-stalib.ads: Fix typo.
3765 2015-02-20 Ed Schonberg <schonberg@adacore.com>
3767 * exp_ch3.adb (Default_Initialize_Object): If the object has a
3768 delayed freeze, the actions associated with default initialization
3769 must be part of the freeze actions, rather that being inserted
3770 directly after the object declaration.
3772 2015-02-20 Robert Dewar <dewar@adacore.com>
3774 * lib-load.adb: Minor comment update.
3776 2015-02-20 Vincent Celier <celier@adacore.com>
3778 * prj-proc.adb (Process_Case_Construction): When there are
3779 incomplete withed projects and the case variable is unknown,
3780 skip the case construction.
3782 2015-02-20 Ed Schonberg <schonberg@adacore.com>
3784 * exp_ch6.adb (Expand_Actuals): Add caller-side invariant checks
3785 when an actual is a view conversion, either because the call is
3786 to an inherited operation, or because the actual is an explicit
3787 type conversion to an ancestor type. Fixes ACATS 4.0D: C732001
3789 2015-02-20 Robert Dewar <dewar@adacore.com>
3791 * einfo.ads: Minor comment updates Fix missing pragma Inline
3792 for Set_Partial_View_Has_Unknown_Discr.
3793 * einfo.adb (Write_Entity_Flags): Add missing entry for
3794 Partial_View_Has_Unknown_Discr.
3795 * sem_ch3.adb: Minor reformatting.
3797 2015-02-20 Vincent Celier <celier@adacore.com>
3799 * opt.ads: Minor cleanup: remove mention of gprmake.
3800 * s-stalib.ads (Abort_Undefer_Direct): Do not inline.
3801 * s-tataat.adb: Do not call System.Tasking.Self but directly
3802 System.Task_Primitives.Operations.Self.
3804 2015-02-20 Arnaud Charlet <charlet@adacore.com>
3806 * gnat_rm.texi, gnat_ugn.texi: Now automatically generated from
3807 sphinx in the doc directory.
3808 * doc: New directory containing sphinx versions of gnat_rm and gnat_ugn
3810 2015-02-20 Robert Dewar <dewar@adacore.com>
3812 * sem_res.adb: Minor reformatting.
3813 * exp_ch9.adb (Build_Protected_Spec): Copy Aliased setting when
3815 * sem_ch13.adb (Analyze_Aspect_Specifications): Exclude Boolean
3816 aspects from circuitry setting delay required to false if the
3817 argument is an integer literal.
3819 2015-02-20 Ed Schonberg <schonberg@adacore.com>
3821 * einfo.ads. einfo.adb (Partial_View_Has_Unknown_Discr): New flag
3822 on type entities, to enforce AI12-0133: default initialization
3823 of types whose partial view has unknown discriminants does not
3824 get an invariant check, because clients of the unit can never
3825 declare objects of such types.
3826 * sem_ch3.adb (Find_Type_Name); Set new flag
3827 Partial_View_Has_Unknown_Discr when needed.
3828 * exp_ch3.adb (Expand_N_Object_Declaration): Use flag to suppress
3829 generation of invariant call on default-initialized object.
3831 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
3833 * gcc-interface/decl.c (gnat_to_gnu_param): Do not strip the padding
3834 if the parameter either is passed by reference or if the alignment
3837 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
3839 * gcc-interface/decl.c (is_cplusplus_method): Use Is_Primitive flag to
3840 detect primitive operations of tagged and untagged types.
3842 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
3844 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not bother about alias
3845 sets in presence of derivation for subprogram types.
3847 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
3849 * gcc-interface/utils.c (begin_subprog_body): Assert that the body is
3850 present in the same context as the declaration.
3852 2015-02-07 Jakub Jelinek <jakub@redhat.com>
3855 * gcc-interface/trans.c (gigi): Recreate optimization_default_node
3856 and optimization_current_node after tweaking global_options.
3858 2015-02-05 Robert Dewar <dewar@adacore.com>
3860 * prj-proc.adb, sem_aux.adb, exp_ch9.adb, errout.adb, prj-dect.adb,
3861 prj-nmsc.adb: Minor reformatting.
3863 2015-02-05 Ed Schonberg <schonberg@adacore.com>
3865 * sem_type.adb (Covers): In ASIS_Mode the Corresponding_Record
3866 of a protected type may not be available, so to check conformance
3867 with an interface type, examine the interface list in the type
3868 declaration directly.
3869 (Write_Overloads): Improve information for indirect calls,
3872 2015-02-05 Ed Schonberg <schonberg@adacore.com>
3874 * exp_ch3.adb (Make_Tag_Assignment): Do not perform this
3875 expansion activity in ASIS mode.
3877 2015-02-05 Javier Miranda <miranda@adacore.com>
3879 * errout.adb (Error_Msg_PT): Add missing error.
3880 * sem_ch6.adb (Check_Synchronized_Overriding): Check the missing
3881 RM rule. Code cleanup.
3882 * exp_ch9.adb (Build_Wrapper_Spec): Propagate "constant" in
3883 anonymous access types. Found working on the tests. Code cleanup.
3885 2015-02-05 Vincent Celier <celier@adacore.com>
3887 * prj-dect.adb (Parse_Attribute_Declaration): Continue scanning
3888 when there are incomplete withs.
3889 * prj-nmsc.adb (Process_Naming): Do not try to get the value
3890 of an element when it is nil.
3891 (Check_Naming): Do not check a nil suffix for illegality
3892 * prj-proc.adb (Expression): Do not process an empty term.
3893 * prj-strt.adb (Attribute_Reference): If attribute cannot be
3894 found, parse a possible index to avoid cascading errors.
3896 2015-02-05 Ed Schonberg <schonberg@adacore.com>
3898 * sem_aux.adb (Is_Derived_Type): A subprogram_type generated
3899 for an access_to_subprogram declaration is not a derived type.
3901 2015-02-05 Robert Dewar <dewar@adacore.com>
3903 * errout.adb (Error_Msg_Internal): For non-serious error set
3904 Fatal_Error to Ignored.
3905 * lib-load.adb (Load_Unit): Minor comment updates.
3906 * sem_ch10.adb (Analyze_With_Clause): Propagate Fatal_Error
3907 setting from with'ed unit to with'ing unit.
3908 * sem_prag.adb (Analyze_Pragma, case Warnings): Document handling
3911 2015-02-05 Yannick Moy <moy@adacore.com>
3913 * sem_prag.adb, par-prag.adb: Minor code clean up.
3915 2015-02-05 Yannick Moy <moy@adacore.com>
3917 * par-prag.adb (Pragma_Warnings): Update for extended form
3918 of pragma Warnings. The "one" argument case may now have 2 or
3920 * sem_prag.adb (Analyze_Pragma/Pragma_Warnings): Update for
3921 extended form of pragma Warnings. Pragma with tool name is either
3922 rewritten as null or as an equivalent form without tool name,
3924 * snames.ads-tmpl (Name_Gnatprove): New name.
3926 2015-02-05 Robert Dewar <dewar@adacore.com>
3928 * sem_ch13.adb (Add_Invariants): Don't assume invariant is
3930 * sem_prag.adb (Analyze_Pragma, case Check): Don't assume
3931 condition is standard Boolean, it can be non-standard derived
3934 2015-02-05 Robert Dewar <dewar@adacore.com>
3936 * checks.adb (Enable_Range_Check): Disconnect attempted
3937 optimization for the case of range check for subscript of
3938 unconstrained array.
3940 2015-02-05 Robert Dewar <dewar@adacore.com>
3942 * par-ch13.adb (With_Present): New function
3943 (Aspect_Specifications_Present): Handle WHEN in place of WITH
3944 (Get_Aspect_Specifications): Comment update.
3945 * par.adb: Comment updates.
3947 2015-02-05 Robert Dewar <dewar@adacore.com>
3949 * errout.adb (Handle_Serious_Error): New setting of Fatal_Error.
3950 * frontend.adb (Frontend): New setting of Fatal_Error.
3951 * lib-load.adb (Create_Dummy_Package_Unit): New setting of
3953 (Load_Main_Source): New setting of Fatal_Error
3954 (Load_Unit): New setting of Fatal_Error.
3955 * lib-writ.adb (Add_Preprocessing_Dependency): New setting of
3957 (Ensure_System_Dependency): New setting of Fatal_Error.
3958 * lib.adb (Fatal_Error): New setting of Fatal_Error
3959 (Set_Fatal_Error): New setting of Fatal_Error.
3960 * lib.ads: New definition of Fatal_Error and associated routines.
3961 * par-ch10.adb (P_Compilation_Unit): New setting of Fatal_Error.
3962 * par-load.adb (Load): New setting of Fatal_Error.
3963 * rtsfind.adb (Load_RTU): New setting of Fatal_Error.
3964 * sem_ch10.adb (Analyze_Compilation_Unit): New setting of
3966 (Optional_Subunit): New setting of Fatal_Error.
3967 (Analyze_Proper_Body): New setting of Fatal_Error.
3968 (Load_Needed_Body): New setting of Fatal_Error.
3970 2015-02-05 Ed Schonberg <schonberg@adacore.com>
3972 * sem_res.adb (Resolve_Call): If the function being called has
3973 out parameters do not check for language version if the function
3974 comes from a predefined unit, as those are always compiled in
3977 2015-02-05 Ed Schonberg <schonberg@adacore.com>
3979 * sem_ch3.adb (Process_Full_View): Verify that the full view
3980 of a type extension must carry an explicit limited keyword if
3981 the partial view does (RM 7.3 (10.1)).
3983 2015-02-05 Robert Dewar <dewar@adacore.com>
3985 * g-rannum.adb, g-rannum.ads, s-rannum.adb, s-rannum.ads,
3986 sem_warn.ads: Minor reformatting.
3987 * exp_ch13.adb (Expand_N_Freeze_Entity): Add guard for aspect
3989 * sem_prag.adb (Analyze_Pragma, case Type_Invariant): Give
3990 error for abstract type.
3992 2015-02-05 Yannick Moy <moy@adacore.com>
3994 * opt.ads (Warn_On_Suspicious_Contract): Update comment
3996 * sem_attr.adb (Analyze_Attribute/Attribute_Update): Warn on
3997 suspicious uses of 'Update.
3998 * sem_warn.adb, sem_warn.ads (Warn_On_Suspicious_Update): New
3999 function issues warning on suspicious uses of 'Update.
4000 * g-rannum.adb, g-rannum.ads, s-rannum.adb, s-rannum.ads: Mark
4001 package spec and body as SPARK_Mode Off.
4003 2015-02-05 Robert Dewar <dewar@adacore.com>
4005 * sem_prag.adb (Set_Elab_Unit_Name): New name for Set_Unit_Name
4006 (Analyze_Pragma): Change Set_Unit_Name to Set_Elab_Unit_Name
4007 (Set_Elab_Unit_Name): Generate reference for Elaborate[_All]
4008 * sem_warn.adb (Warn_On_Unreferenced_Entity): Suppress warning
4009 for exported entity.
4011 2015-02-05 Hristian Kirtchev <kirtchev@adacore.com>
4013 * sem_prag.adb (Check_Pragma_Conformance): Add
4014 local variable Arg. Ensure that all errors are associated with
4015 the pragma if it appears without an argument. Add comments on
4018 2015-02-05 Robert Dewar <dewar@adacore.com>
4020 * lib-xref.adb: Minor reformatting.
4022 2015-02-05 Tristan Gingold <gingold@adacore.com>
4025 * env.c: Fix thinko: handle Darwin case before default one.
4027 2015-01-30 Robert Dewar <dewar@adacore.com>
4029 * a-assert.adb: Minor reformatting.
4030 * sem_ch13.adb: Minor comment clarification.
4031 * types.ads: Minor comment update.
4032 * sem_eval.adb (Real_Or_String_Static_Predicate_Matches): Avoid blow up
4033 when we have a predicate that is nothing but an inherited dynamic
4036 2015-01-30 Jerome Guitton <guitton@adacore.com>
4038 * gcc-interface/Makefile.in (x86-vxworks): Update GCC_SPEC_FILES to
4039 include cert link spec.
4041 2015-01-30 Robert Dewar <dewar@adacore.com>
4043 * einfo.ads: Minor comment fix.
4044 * freeze.adb (Freeze_Profile): Add test for suspicious import
4046 * sem_prag.adb (Process_Import_Or_Interface): Test for suspicious
4047 use in Pure unit is now moved to Freeze (to properly catch
4048 Pure_Function exemption).
4050 2015-01-30 Bob Duff <duff@adacore.com>
4052 * sem_res.ads: Minor comment fix.
4053 * sem_type.adb: sem_type.adb (Remove_Conversions): Need to
4054 check both operands of an operator.
4056 2015-01-30 Yannick Moy <moy@adacore.com>
4058 * a-assert.ads, a-assert.adb: Mark package spec in SPARK. Set assertion
4059 policy for Pre to Ignore.
4060 (Assert): Add precondition.
4062 2015-01-30 Robert Dewar <dewar@adacore.com>
4064 * sem_prag.adb (Process_Import_Or_Interface): Warn if used in
4066 * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Clarify
4067 documentation for some special cases of invalid attempts at
4070 2015-01-30 Gary Dismukes <dismukes@adacore.com>
4072 * errout.ads: Minor reformatting.
4074 2015-01-30 Yannick Moy <moy@adacore.com>
4076 * inline.adb (Process_Formals): Use the sloc of
4077 the inlined node instead of the sloc of the actual parameter,
4078 when replacing formal parameters by the actual one.
4080 2015-01-30 Arnaud Charlet <charlet@adacore.com>
4082 * g-expect.adb (Get_Command_Output): Use infinite timeout when
4085 2015-01-30 Ed Schonberg <schonberg@adacore.com>
4087 * sem_ch12.adb (Analyze_Associations): If an in-parameter is
4088 defaulted in an instantiation, add an entry in the list of actuals
4089 to indicate the default value of the formal (as is already done
4090 for defaulted subprograms).
4092 2015-01-30 Javier Miranda <miranda@adacore.com>
4094 * errout.adb (Error_Msg_PT): Minor error phrasing update.
4096 2015-01-30 Robert Dewar <dewar@adacore.com>
4098 * sem_warn.adb (Warn_On_Known_Condition): Improve error message
4101 2015-01-30 Pierre-Marie de Rodat <derodat@adacore.com>
4103 * exp_dbug.adb (Get_Encoded_Name): When
4104 -fgnat-encodings=minimal, do not generate names for biased types.
4106 2015-01-30 Tristan Gingold <gingold@adacore.com>
4109 * env.c: Move vxworks and darwin includes out of #ifdef IN_RTS.
4111 2015-01-30 Gary Dismukes <dismukes@adacore.com>
4113 * freeze.adb: Minor reformatting.
4115 2015-01-30 Javier Miranda <miranda@adacore.com>
4117 * errout.ads (Error_Msg_PT): Replace Node_Id by Entity_Id and
4118 improve its documentation.
4119 * errout.adb (Error_Msg_PT): Improve the error message.
4120 * sem_ch6.adb (Check_Conformance): Update call to Error_Msg_PT.
4121 (Check_Synchronized_Overriding): Update call to Error_Msg_PT.
4122 * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup.
4124 2015-01-30 Robert Dewar <dewar@adacore.com>
4126 * sem_warn.adb (Warn_On_Known_Condition): Do special casing of
4127 message for False case.
4129 2015-01-30 Doug Rupp <rupp@adacore.com>
4131 * s-vxwext-kernel.ads (Task_Cont): Remove imported subprogram body.
4132 * s-vxwext-kernel.adb (Task_Cont): New subpprogram body specialized for
4135 2015-01-30 Gary Dismukes <dismukes@adacore.com>
4137 * sem_attr.adb (Declared_Within_Generic_Unit):
4138 New function to test whether an entity is declared within the
4139 declarative region of a given generic unit.
4140 (Resolve_Attribute): For checking legality of subprogram'Access within
4141 a generic unit, call new Boolean function Declared_Within_Generic_Unit
4142 instead of simply comparing the results of Enclosing_Generic_Unit on
4143 the prefix and access type. Correct minor comment typos.
4145 2015-01-30 Robert Dewar <dewar@adacore.com>
4147 * freeze.adb, exp_util.ads: Update comment.
4148 * exp_util.adb, exp_ch3.adb: Minor code reorganization and reformatting.
4149 * sem_util.adb: Minor: fix typo.
4151 2015-01-30 Hristian Kirtchev <kirtchev@adacore.com>
4153 * sem_attr.adb (Analyze_Attribute): Ensure that
4154 the check concerning Refined_Post takes precedence over the
4157 2015-01-30 Gary Dismukes <dismukes@adacore.com>
4159 * sem_prag.adb: Minor typo fixes and reformatting.
4161 2015-01-30 Yannick Moy <moy@adacore.com>
4163 * sem_attr.adb: Code clean up.
4165 2015-01-30 Robert Dewar <dewar@adacore.com>
4167 * ali.adb (Scan_ALI): Set Serious_Errors flag in Unit record.
4168 * ali.ads (Unit_Record): Add new field Serious_Errors.
4169 * lib-writ.adb (Write_Unit_Information): Set SE (serious errors)
4170 attribute in U line.
4171 * lib-writ.ads: New attribute SE (serious erors) in unit line.
4173 2015-01-30 Hristian Kirtchev <kirtchev@adacore.com>
4175 * einfo.adb Update the usage of attributes Entry_Bodies_Array,
4176 Lit_Indexes, Scale_Value, Storage_Size_Variable,
4177 String_Literal_Low_Bound along associated routines and
4179 (Pending_Access_Types): New routine.
4180 (Set_Pending_Access_Types): New routine.
4181 (Write_Field15_Name): Add an entry for Pending_Access_Types.
4182 * einfo.ads Add new attribute Pending_Access_Types along
4183 with usage in nodes. Update the usage of attributes
4184 Entry_Bodies_Array, Lit_Indexes, Scale_Value,
4185 Storage_Size_Variable, String_Literal_Low_Bound.
4186 (Pending_Access_Types): New routine along with pragma Inline.
4187 (Set_Pending_Access_Types): New routine along with pragma Inline.
4188 * exp_ch3.adb (Expand_Freeze_Array_Type): Add new local variable
4189 Ins_Node. Determine the insertion node for anonynous access type
4190 that acts as a component type of an array. Update the call to
4191 Build_Finalization_Master.
4192 (Expand_Freeze_Record_Type): Update
4193 the calls to Build_Finalization_Master.
4194 (Freeze_Type): Remove
4195 local variable RACW_Seen. Factor out the code that deals with
4196 remote access-to-class-wide types. Create a finalization master
4197 when the designated type contains a private component. Fully
4198 initialize all pending access types.
4199 (Process_RACW_Types): New routine.
4200 (Process_Pending_Access_Types): New routine.
4201 * exp_ch4.adb (Expand_Allocator_Expression): Allocation no longer
4202 needs to set primitive Finalize_Address.
4203 (Expand_N_Allocator): Allocation no longer sets primitive
4205 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
4206 Update the call to Build_Finalization_Master.
4207 (Make_Build_In_Place_Call_In_Allocator): Allocation no longer
4208 needs to set primitive Finalize_Address.
4209 * exp_ch7.adb (Add_Pending_Access_Type): New routine.
4210 (Build_Finalization_Master): New parameter profile. Associate
4211 primitive Finalize_Address with the finalization master if the
4212 designated type has been frozen, otherwise treat the access
4213 type as pending. Simplify the insertion of the master and
4214 related initialization code.
4215 (Make_Finalize_Address_Body): Allow Finalize_Address for class-wide
4217 (Make_Set_Finalize_Address_Call): Remove forlam parameter Typ.
4218 Simplify the implementation.
4219 * exp_ch7.ads (Build_Finalization_Master): New parameter profile
4220 along with comment on usage.
4221 (Make_Set_Finalize_Address_Call): Remove formal parameter Typ. Update
4222 the comment on usage.
4223 * exp_util.adb (Build_Allocate_Deallocate_Proc): Use routine
4224 Finalize_Address to retrieve the primitive.
4225 (Finalize_Address): New routine.
4226 (Find_Finalize_Address): Removed.
4227 * exp_util.ads (Finalize_Address): New routine.
4228 * freeze.adb (Freeze_All): Remove the generation of finalization
4230 * sem_ch3.adb (Analyze_Full_Type_Declaration): Propagate any
4231 pending access types from the partial to the full view.
4233 2015-01-30 Robert Dewar <dewar@adacore.com>
4235 * sem_disp.adb: Minor reformatting.
4236 * sem_disp.ads: Documentation update.
4238 2015-01-30 Ed Schonberg <schonberg@adacore.com>
4240 * sem_disp.adb (Is_Dynamically_Tagged): when applied to an entity
4241 or a function call, return True if type is class-wide.
4242 * sem_res.adb (Resolve_Case_Expression, Resolve_If_Expression);
4243 Apply RM 4.5.7 (17/3): all or none of the dependent expression
4244 of a conditional expression must be dynamically tagged.
4246 2015-01-30 Ed Schonberg <schonberg@adacore.com>
4248 * sem_ch6.adb (Analyze_Function_Return): In an extended return
4249 statement, apply accessibility check to result object when there
4250 is no initializing expression (Ada 2012 RM 6.5 (5.4/3))
4252 2015-01-30 Robert Dewar <dewar@adacore.com>
4254 * sem_ch4.adb (Analyze_If_Expression): Allow for non-standard
4255 Boolean for case where ELSE is omitted.
4256 * sem_res.adb: Minor reformatting.
4258 2015-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
4260 Fix build under cygwin/64.
4261 * adaint.h: Add check for __CYGWIN__.
4262 * mingw32.h: Prevent windows.h from including x86intrin.h in GCC.
4264 2015-01-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
4267 * adaint.c: Handle __CYGWIN__ like __MINGW32__ here.
4268 * mingw32.h: Don't include <tchar.h> under cygwin.
4269 (_O_U8TEXT, _O_U16TEXT, _O_WTEXT): Set to _O_TEXT if not yet defined.
4271 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
4273 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8)
4274 (DEF_FUNCTION_TYPE_VAR_12): New macros.
4276 2015-01-09 Michael Collison <michael.collison@linaro.org>
4278 * gcc-interface/cuintp.c: Include hash-set.h, machmode.h,
4279 vec.h, double-int.h, input.h, alias.h, symtab.h,
4280 fold-const.h, wide-int.h, and inchash.h due to
4281 flattening of tree.h.
4282 * gcc-interface/decl.c: Ditto.
4283 * gcc-interface/misc.c: Ditto.
4284 * gcc-interface/targtyps.c: Include hash-set.h, machmode.h,
4285 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h,
4286 fold-const.h, wide-int.h, and inchash.h due to
4287 flattening of tree.h.
4288 * gcc-interface/trans.c: Include hash-set.h, machmode.h,
4289 vec.h, double-int.h, input.h, alias.h, symtab.h, real.h,
4290 fold-const.h, wide-int.h, inchash.h due to
4291 flattening of tree.h.
4292 * gcc-interface/utils.c: Include hash-set.h, machmode.h,
4293 vec.h, double-int.h, input.h, alias.h, symtab.h,
4294 fold-const.h, wide-int.h, and inchash.h due to
4295 flattening of tree.h.
4296 * gcc-interface/utils2.c: Ditto.
4298 2015-01-07 Robert Dewar <dewar@adacore.com>
4300 * sem_warn.adb (Check_One_Unit): Don't give unused entities
4301 warning for a package which is used as a generic parameter.
4303 2015-01-07 Bob Duff <duff@adacore.com>
4305 * usage.adb (Usage): Correct documentation of
4308 2015-01-07 Robert Dewar <dewar@adacore.com>
4310 * s-fileio.adb: Minor reformatting.
4312 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4314 * sem_ch12.adb (Instantiate_Object): If formal is an anonymous
4315 access to subprogram, replace its formals with new entities when
4316 building the object declaration, both if actual is present and
4317 when it is defaulted.
4319 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4321 * sem_ch5.adb (Analyze_Assignment): If left-hand side is a view
4322 conversion and type of expression has invariant, apply invariant
4323 check on expression.
4325 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4327 * sem_ch3.adb (Create_Constrained_Components): A call to
4328 Gather_Components may detect an error if an inherited discriminant
4329 that controls a variant is non-static.
4330 * sem_aggr.adb (Resolve_Record_Aggregate, Step 5): The call to
4331 Gather_Components may report an error if an inherited discriminant
4332 in a variant in non-static.
4333 * sem_util.adb (Gather_Components): If a non-static discriminant
4334 is inherited do not report error here, but let caller handle it.
4335 (Find_Actual): Small optimization.
4337 2015-01-07 Bob Duff <duff@adacore.com>
4339 * usage.adb (Usage): Document -gnatw.f switch.
4341 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4343 * sem_ch12.adb: Code clean up and minor reformatting.
4345 2015-01-07 Robert Dewar <dewar@adacore.com>
4347 * exp_ch4.adb (Expand_N_Type_Conversion): Add guard for
4348 Raise_Accessibility_Error call.
4349 * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Add documentation
4350 on handling of invalid digits in based constants.
4351 * s-fatgen.ads: Minor reformatting.
4352 * sem_attr.adb (Analyze_Attribute, case Unrestricted_Access):
4353 Avoid noting bogus modification for Valid test.
4354 * snames.ads-tmpl (Name_Attr_Long_Float): New Name.
4355 * einfo.ads: Minor reformatting.
4356 * sem_warn.adb: Minor comment clarification.
4357 * sem_ch12.adb: Minor reformatting.
4359 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4361 * exp_ch5.adb (Expand_Predicated_Loop): Handle properly loops
4362 over static predicates when the loop parameter specification
4363 carries a Reverse indicator.
4365 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4367 * sem_ch12.adb (Instantiate_Object): If formal has a default,
4368 actual is missing and formal has an anonymous access type, copy
4369 access definition in full so that tree for instance is properly
4370 formatted for ASIS use.
4372 2015-01-07 Bob Duff <duff@adacore.com>
4374 * sem_elab.adb (Check_Internal_Call_Continue): Give a warning
4375 for P'Access, where P is a subprogram in the same package as
4376 the P'Access, and the P'Access is evaluated at elaboration
4377 time, and occurs before the body of P. For example, "X : T :=
4378 P'Access;" would allow a subsequent call to X.all to be an
4379 access-before-elaboration error; hence the warning. This warning
4380 is enabled by the -gnatw.f switch.
4381 * opt.ads (Warn_On_Elab_Access): New flag for warning switch.
4382 * warnsw.adb (Set_Dot_Warning_Switch): Set Warn_On_Elab_Access.
4383 * gnat_ugn.texi: Document the new warning.
4385 2015-01-07 Johannes Kanig <kanig@adacore.com>
4387 * lib-xref-spark_specific.adb (Collect_SPARK_Xrefs): Skip unneeded
4390 2015-01-07 Robert Dewar <dewar@adacore.com>
4392 * s-taprop-linux.adb, clean.adb: Minor reformatting.
4394 2015-01-07 Arnaud Charlet <charlet@adacore.com>
4396 * s-tassta.adb: Relax some overzealous assertions.
4398 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4400 * sem_ch6.adb (Analyze_Return_Type): An call that returns a limited
4401 view of a type is legal when context is a thunk generated for
4402 operation inherited from an interface.
4403 * exp_ch6.adb (Expand_Simple_Function_Return): If context is
4404 a thunk and return type is an incomplete type do not continue
4405 expansion; thunk will be fully elaborated when generating code.
4407 2015-01-07 Doug Rupp <rupp@adacore.com>
4409 * s-osinte-mingw.ads (LARGE_INTEGR): New subtype.
4410 (QueryPerformanceFrequency): New imported procedure.
4411 * s-taprop-mingw.adb (RT_Resolution): Call above and return
4412 resolution vice a hardcoded value.
4413 * s-taprop-solaris.adb (RT_Resolution): Call clock_getres and return
4414 resolution vice a hardcoded value.
4415 * s-linux-android.ads (clockid_t): New subtype.
4416 * s-osinte-aix.ads (clock_getres): New imported subprogram.
4417 * s-osinte-android.ads (clock_getres): Likewise.
4418 * s-osinte-freebsd.ads (clock_getres): Likewise.
4419 * s-osinte-solaris-posix.ads (clock_getres): Likewise.
4420 * s-osinte-darwin.ads (clock_getres): New subprogram.
4421 * s-osinte-darwin.adb (clock_getres): New subprogram.
4422 * thread.c (__gnat_clock_get_res) [__APPLE__]: New function.
4423 * s-taprop-posix.adb (RT_Resolution): Call clock_getres to
4424 calculate resolution vice hard coded value.
4426 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4428 * exp_util.adb (Make_CW_Equivalent_Type): If root type is a
4429 limited view, use non-limited view when available to create
4430 equivalent record type.
4432 2015-01-07 Vincent Celier <celier@adacore.com>
4434 * gnatcmd.adb: Remove command Sync and any data and processing
4435 related to this command. Remove project processing for gnatstack.
4436 * prj-attr.adb: Remove package Synchonize and its attributes.
4438 2015-01-07 Vincent Celier <celier@adacore.com>
4440 * clean.adb: Minor error message change.
4442 2015-01-07 Tristan Gingold <gingold@adacore.com>
4445 * env.c (__gnat_environ): Adjust for darwin9/darwin10.
4447 2015-01-07 Javier Miranda <miranda@adacore.com>
4449 * sem_ch10.adb (Analyze_With_Clause): Compiling under -gnatq
4450 protect the frontend against never ending recursion caused by
4451 circularities in the sources.
4453 2015-01-07 Robert Dewar <dewar@adacore.com>
4455 * a-reatim.adb, make.adb, exp_pakd.adb, i-cpoint.adb, sem_ch8.adb,
4456 exp_ch3.adb: Minor reformatting.
4458 2015-01-07 Doug Rupp <rupp@adacore.com>
4460 * s-linux.ads (clockid_t): New subtype.
4461 * s-osinte-linux.ads (pragma Linker Options): Add -lrt.
4462 (clockid_t): New subtype.
4463 (clock_getres): Import system call.
4464 * s-taprop-linux.adb (System.OS_Constants): With and rename.
4465 (RT_Resolution): Remove
4466 hardcoded value and call clock_getres.
4467 * s-linux-sparc.ads, s-linux-mipsel.ads, s-linux-hppa.ads,
4468 s-linux-alpha.ads, s-linux-x32.ads (clockid_t): Add new subtype.
4470 2015-01-07 Robert Dewar <dewar@adacore.com>
4472 * sem_warn.adb (Check_One_Unit): Guard against context item
4473 with no Entity field.
4475 2015-01-07 Vincent Celier <celier@adacore.com>
4477 * clean.adb (Gnatclean): Warn that 'gnatclean -P' is obsolete.
4478 * make.adb (Initialize): Warn that 'gnatmake -P' is obsolete.
4480 2015-01-07 Vincent Celier <celier@adacore.com>
4482 * prj-conf.adb (Parse_Project_And_Apply_Config): Always finalize
4483 errors/warnings in the first parsing of the project files,
4484 to display the warnings when there is no errors.
4486 2015-01-07 Tristan Gingold <gingold@adacore.com>
4488 * i-cpoint.adb (Copy_Terminated_Array): Nicely handle null target.
4490 2015-01-07 Doug Rupp <rupp@adacore.com>
4492 * s-taprop-vxworks.adb (Stop_All_Tasks): Pass return
4493 value from Int_Lock as parameter to Int_Unlock.
4494 * s-osinte-vxworks.ads (Int_Unlock): Add parameter.
4495 * s-vxwext.ads (Int_Unlock): Likewise.
4496 * s-vxwext-kernel.adb (intUnlock, Int_Unlock): Likewise.
4497 * s-vxwext-kernel.ads (Int_Unlock): Likewise.
4498 * s-vxwext-rtp.adb (Int_Unlock): Likewise.
4499 * s-vxwext-rtp.ads (Int_Unlock): Likewise.
4501 2015-01-07 Pierre-Marie de Rodat <derodat@adacore.com>
4503 * exp_pakd.adb: Add a comment in exp_pakd.adb to explain why we
4506 2015-01-07 Tristan Gingold <gingold@adacore.com>
4508 * i-cpoint.adb (Copy_Terminated_Array): Use Copy_Array to
4511 2015-01-07 Eric Botcazou <ebotcazou@adacore.com>
4513 * sem_ch3.adb (Analyze_Full_Type_Declaration): Do not
4514 automatically set No_Strict_Aliasing on access types.
4515 * fe.h (No_Strict_Aliasing_CP): Declare.
4516 * gcc-interface/trans.c (gigi): Force flag_strict_aliasing to 0 if
4517 No_Strict_Aliasing_CP is set.
4519 2015-01-07 Johannes Kanig <kanig@adacore.com>
4521 * sem_ch8.adb (Analyze_Subprogram_Renaming) do
4522 not build function wrapper in gnatprove mode when the package
4523 is externally axiomatized.
4525 2015-01-07 Jose Ruiz <ruiz@adacore.com>
4527 * a-reatim.adb (Time_Of): Reduce the number of spurious overflows in
4528 intermediate computations when the parameters have different signs.
4530 2015-01-07 Javier Miranda <miranda@adacore.com>
4532 * exp_ch3.adb (Build_Init_Procedure): For derived types,
4533 improve the code which takes care of identifying and moving to
4534 the beginning of the init-proc the call to the init-proc of the
4537 2015-01-07 Olivier Hainque <hainque@adacore.com>
4539 * gcc-interface/trans.c (gnat_to_gnu, <N_Expression_With_Action>):
4540 Elaborate the expression as part of the same stmt group as the actions.
4542 2015-01-07 Robert Dewar <dewar@adacore.com>
4544 * sem_ch3.adb: Minor error message change.
4546 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4548 * sem_prag.adb (Analyze_Pragma, case Preelaborable_Initialization):
4549 Following AI05-028, the pragam applies legally to any composite type.
4551 2015-01-07 Arnaud Charlet <charlet@adacore.com>
4553 * s-osinte-vxworks.adb, s-osinte-vxworks.ads
4554 (sigwait, sigwaitinfo): Removed, not needed after all on any
4555 VxWorks configurations.
4557 2015-01-07 Robert Dewar <dewar@adacore.com>
4559 * sem_ch3.adb, freeze.adb, exp_disp.adb: Minor reformatting.
4561 2015-01-07 Javier Miranda <miranda@adacore.com>
4563 * exp_disp.adb (Expand_Interface_Conversion): Adding missing
4564 generation of accessibility check.
4566 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4568 * sem_ch3.adb (Derived_Type_Declaration): In the case of an
4569 illegal completion from a class- wide type, set etype of the
4570 derived type properly to prevent cascaded errors.
4572 2015-01-07 Robert Dewar <dewar@adacore.com>
4574 * prj.ads, i-cpoint.adb, freeze.adb, ghost.adb, prj-err.adb: Minor
4577 2015-01-07 Robert Dewar <dewar@adacore.com>
4579 * restrict.adb (Check_Restriction_No_Use_Of_Attribute):
4581 (OK_No_Use_Of_Entity_Name): New function.
4582 (Set_Restriction_No_Use_Of_Entity): New procedure.
4583 * restrict.ads (Check_Restriction_No_Use_Of_Attribute):
4585 (OK_No_Use_Of_Entity_Name): New function.
4586 (Set_Restriction_No_Use_Of_Entity): New procedure.
4587 * sem_ch8.adb (Find_Direct_Name): Add check for violation of
4589 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
4590 Add processing for new restriction No_Use_Of_Entity.
4592 2015-01-07 Eric Botcazou <ebotcazou@adacore.com>
4594 * freeze.adb (Freeze_Array_Type): Apply same handling to Is_Atomic
4595 component type as to Has_Atomic_Components type. Remove useless
4596 test on Is_Aliased component type.
4598 2015-01-07 Hristian Kirtchev <kirtchev@adacore.com>
4600 * alloc.ads Alphabetize several declarations. Add constants
4601 Ignored_Ghost_Units_Initial and Ignored_Ghost_Units_Increment.
4602 * atree.adb Add with and use clauses for Opt.
4603 (Allocate_Initialize_Node): Mark a node as ignored Ghost
4604 if it is created in an ignored Ghost region.
4605 (Ekind_In): New variant.
4606 (Is_Ignored_Ghost_Node): New routine.
4607 (Set_Is_Ignored_Ghost_Node): New routine.
4608 * atree.adb Aplhabetize several subprograms declarations. Flag
4609 Spare0 is now known as Is_Ignored_Ghost_Node.
4610 (Ekind_In): New variant.
4611 (Is_Ignored_Ghost_Node): New routine.
4612 (Set_Is_Ignored_Ghost_Node): New routine.
4613 * einfo.adb: Flag 279 is now known as Contains_Ignored_Ghost_Code.
4614 (Contains_Ignored_Ghost_Code): New routine.
4615 (Set_Contains_Ignored_Ghost_Code): New routine.
4616 (Set_Is_Checked_Ghost_Entity, Set_Is_Ignored_Ghost_Entity):
4617 It is now possible to set this property on an unanalyzed entity.
4618 (Write_Entity_Flags): Output the status of flag
4619 Contains_Ignored_Ghost_Code.
4620 * einfo.ads New attribute Contains_Ignored_Ghost_Code along with
4622 (Contains_Ignored_Ghost_Code): New routine
4623 along with pragma Inline.
4624 (Set_Contains_Ignored_Ghost_Code): New routine along with pragma Inline.
4625 * exp_ch3.adb Add with and use clauses for Ghost.
4626 (Freeze_Type): Capture/restore the value of Ghost_Mode on entry/exit.
4627 Set the Ghost_Mode in effect.
4628 (Restore_Globals): New routine.
4629 * exp_ch7.adb (Process_Declarations): Do not process a context
4630 that invoves an ignored Ghost entity.
4631 * exp_dbug.adb (Qualify_All_Entity_Names): Skip an ignored Ghost
4632 construct that has been rewritten as a null statement.
4633 * exp_disp.adb Add with and use clauses for Ghost.
4634 (Make_DT): Capture/restore the value of Ghost_Mode on entry/exit. Set
4635 the Ghost_Mode in effect.
4636 (Restore_Globals): New routine.
4637 * exp_util.adb (Requires_Cleanup_Actions): An ignored Ghost entity
4638 does not require any clean up. Add two missing cases that deal
4639 with block statements.
4640 * freeze.adb Add with and use clauses for Ghost.
4641 (Freeze_Entity): Capture/restore the value of Ghost_Mode on entry/exit.
4642 Set the Ghost_Mode in effect.
4643 (Restore_Globals): New routine.
4644 * frontend.adb Add with and use clauses for Ghost. Remove any
4645 ignored Ghost code from all units that qualify.
4646 * ghost.adb New unit.
4647 * ghost.ads New unit.
4648 * gnat1drv.adb Add with clause for Ghost. Initialize and lock
4649 the table in package Ghost.
4650 * lib.ads: Alphabetize several subprogram declarations.
4651 * lib-xref.adb (Output_References): Do not generate reference
4652 information for ignored Ghost entities.
4653 * opt.ads Add new type Ghost_Mode_Type and new global variable
4655 * rtsfind.adb (Load_RTU): Provide a clean environment when
4656 loading a runtime unit.
4657 * sem.adb (Analyze): Capture/restore the value of Ghost_Mode on
4658 entry/exit as the node may set a different mode.
4660 Capture/restore the value of Ghost_Mode on entry/exit as the
4661 unit may be withed from a unit with a different Ghost mode.
4662 * sem_ch3.adb Add with and use clauses for Ghost.
4663 (Analyze_Full_Type_Declaration, Analyze_Incomplete_Type_Decl,
4664 Analyze_Number_Declaration, Analyze_Private_Extension_Declaration,
4665 Analyze_Subtype_Declaration): Set the Ghost_Mode in effect. Mark
4666 the entity as Ghost when there is a Ghost_Mode in effect.
4667 (Array_Type_Declaration): The implicit base type inherits the
4668 "ghostness" from the array type.
4669 (Derive_Subprogram): The
4670 alias inherits the "ghostness" from the parent subprogram.
4671 (Make_Implicit_Base): The implicit base type inherits the
4672 "ghostness" from the parent type.
4673 * sem_ch5.adb Add with and use clauses for Ghost.
4674 (Analyze_Assignment): Set the Ghost_Mode in effect.
4675 * sem_ch6.adb Add with and use clauses for Ghost.
4676 (Analyze_Abstract_Subprogram_Declaration, Analyze_Procedure_Call,
4677 Analyze_Subprogram_Body_Helper, Analyze_Subprogram_Declaration):
4678 Set the Ghost_Mode in effect. Mark the entity as Ghost when
4679 there is a Ghost_Mode in effect.
4680 * sem_ch7.adb Add with and use clauses for Ghost.
4681 (Analyze_Package_Body_Helper, Analyze_Package_Declaration,
4682 Analyze_Private_Type_Declaration): Set the Ghost_Mode in
4683 effect. Mark the entity as Ghost when there is a Ghost_Mode
4685 * sem_ch8.adb Add with and use clauses for Ghost.
4686 (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
4687 Analyze_Object_Renaming, Analyze_Package_Renaming,
4688 Analyze_Subprogram_Renaming): Set the Ghost_Mode in effect. Mark
4689 the entity as Ghost when there is a Ghost_Mode in effect.
4690 (Find_Type): Check the Ghost context of a type.
4691 * sem_ch11.adb Add with and use clauses for Ghost.
4692 (Analyze_Exception_Declaration): Set the Ghost_Mode in
4693 effect. Mark the entity as Ghost when there is a Ghost_Mode
4695 * sem_ch12.adb Add with and use clauses for Ghost.
4696 (Analyze_Generic_Package_Declaration,
4697 Analyze_Generic_Subprogram_Declaration): Set the Ghost_Mode in effect.
4698 Mark the entity as Ghost when there is a Ghost_Mode in effect.
4699 * sem_prag.adb Add with and use clauses for Ghost.
4700 (Analyze_Pragma): Ghost-related checks are triggered when there
4701 is a Ghost mode in effect.
4702 (Create_Abstract_State): Mark the
4703 entity as Ghost when there is a Ghost_Mode in effect.
4704 * sem_res.adb Add with and use clauses for Ghost.
4705 (Check_Ghost_Context): Removed.
4706 * sem_util.adb (Check_Ghost_Completion): Removed.
4707 (Check_Ghost_Derivation): Removed.
4708 (Incomplete_Or_Partial_View):
4709 Add a guard in case the entity has not been analyzed yet
4710 and does carry a scope.
4711 (Is_Declaration): New routine.
4712 (Is_Ghost_Entity): Removed.
4713 (Is_Ghost_Statement_Or_Pragma):
4715 (Is_Subject_To_Ghost): Removed.
4716 (Set_Is_Ghost_Entity):
4718 (Within_Ghost_Scope): Removed.
4719 * sem_util.adb (Check_Ghost_Completion): Removed.
4720 (Check_Ghost_Derivation): Removed.
4721 (Is_Declaration): New routine.
4722 (Is_Ghost_Entity): Removed.
4723 (Is_Ghost_Statement_Or_Pragma): Removed.
4724 (Is_Subject_To_Ghost): Removed.
4725 (Set_Is_Ghost_Entity): Removed.
4726 (Within_Ghost_Scope): Removed.
4727 * sinfo.ads Add a section on Ghost mode.
4728 * treepr.adb (Print_Header_Flag): New routine.
4729 (Print_Node_Header): Factor out code. Output flag
4730 Is_Ignored_Ghost_Node.
4731 * gcc-interface/Make-lang.in: Add dependency for unit Ghost.
4733 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
4735 * freeze.adb (Freeze_Array_Type) <Complain_CS>: Remove always
4736 true test and unreachable 'else' arm.
4738 2015-01-06 Vincent Celier <celier@adacore.com>
4740 * prj-conf.adb (Check_Target): Improve error message when
4741 there are mismatched targets between the on in the configuration
4742 project file and the specified one, either in the main project
4743 file or in the --target= switch.
4745 2015-01-06 Pascal Obry <obry@adacore.com>
4747 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Mode and
4748 Install_Name attribute definitions.
4750 2015-01-06 Ed Schonberg <schonberg@adacore.com>
4752 * freeze.adb (Wrap_Imported_Subprogram): Indicate that the
4753 generated Import pragma for the internal imported procedure does
4754 not come from an aspect, so that Is_Imported can be properly
4757 2015-01-06 Gary Dismukes <dismukes@adacore.com>
4759 * sem_ch12.adb (Might_Inline_Subp): Record whether
4760 any subprograms in the generic package are marked with
4761 pragma Inline_Always (setting flag Has_Inline_Always).
4762 (Analyze_Package_Instantiation): Add test of Has_Inline_Always
4763 alongside existing test of Front_End_Inlining as alternative
4764 conditions for setting Inline_Now. Also add test of
4765 Has_Inline_Always along with Front_End_Inlining test as an
4766 alternative condition for setting Needs_Body to False.
4768 2015-01-06 Tristan Gingold <gingold@adacore.com>
4770 * i-cpoint.adb (Copy_Array): Handle overlap.
4772 2015-01-06 Pascal Obry <obry@adacore.com>
4774 * bindgen.adb: Minor style fix.
4776 2015-01-06 Robert Dewar <dewar@adacore.com>
4778 * sem_util.ads, sem_util.adb: Minor reformatting.
4780 2015-01-06 Vincent Celier <celier@adacore.com>
4782 * prj-conf.adb (Parse_Project_And_Apply_Config): Reset incomplete
4783 with flags before parsing the projects.
4784 * prj-err.adb (Error_Msg): Do nothing if there are incomplete withs.
4785 * prj-part.adb (Post_Parse_Context_Clause): Set Incomplete_Withs
4786 to True in the flags, when Ignore_Missing_With is True and an
4787 imported project cannot be found.
4788 * prj-proc.adb (Expression): When there are incomplete withs and
4789 a variable or attribute is not found, set the variable/attribute
4791 * prj.ads (Processing_Flags): New flag Incomplete_Withs,
4794 2015-01-06 Vasiliy Fofanov <fofanov@adacore.com>
4796 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-conf.adb,
4797 prj-err.adb: Add new switch --no-command-line.
4799 2015-01-06 Ed Schonberg <schonberg@adacore.com>
4801 * sem_ch12.adb: Sloc of wrapper is that of instantiation.
4803 2015-01-06 Robert Dewar <dewar@adacore.com>
4805 * sem_ch11.adb: Minor reformatting.
4807 2015-01-06 Ed Schonberg <schonberg@adacore.com>
4809 * exp_aggr.adb (Get_Assoc_Expr): New routine internal to
4810 Build_Array_Aggr_Code, used to initialized components covered
4811 by a box association. If the component type is scalar and has
4812 a default aspect, use it to initialize such components.
4814 2015-01-06 Pascal Obry <obry@adacore.com>
4816 * rtinit.c (__gnat_runtime_initialize): Add a parameter to
4817 control the setup of the exception handler.
4818 * initialize.c: Remove unused declaration.
4819 * bindgen.adb: Always call __gnat_runtime_initialize and pass
4820 whether the exeception handler must be set or not.
4822 2015-01-06 Thomas Quinot <quinot@adacore.com>
4824 * freeze.adb (Set_SSO_From_Defaults): When setting scalar storage
4825 order to native from default, make sure to also adjust bit order.
4826 * exp_aggr.adb: Minor reformatting.
4828 2015-01-06 Robert Dewar <dewar@adacore.com>
4830 * s-valllu.adb, s-valllu.ads, s-valuti.ads, s-valuns.adb, s-valuns.ads,
4831 s-valrea.adb, s-valrea.ads: Add some additional guards for
4832 Str'Last = Positive'Last.
4834 2015-01-06 Ed Schonberg <schonberg@adacore.com>
4836 * sem_ch12.adb, sem_ch8.adb: Ongoing work for wrappers for actual
4839 2015-01-06 Javier Miranda <miranda@adacore.com>
4841 * exp_disp.adb (Expand_Interface_Conversion): Reapply patch.
4843 2015-01-06 Thomas Quinot <quinot@adacore.com>
4845 * sem_util.ads: Minor reformatting.
4846 * sem_cat.adb (In_RCI_Visible_Declarations): Change back to...
4847 (In_RCI_Declaration) Return to old name, as proper checking of
4848 entity being in the visible part depends on entity kind and must
4849 be done by the caller.
4851 2015-01-06 Ed Schonberg <schonberg@adacore.com>
4853 * sem_ch12.adb, sem_ch12.ads, sem_ch8.adb: Ongoing work for wrappers
4854 for operators in SPARK.
4856 2015-01-06 Ed Schonberg <schonberg@adacore.com>
4858 * sem_aggr.adb (Get_Value): In ASIS mode, preanalyze the
4859 expression in an others association before making copies for
4860 separate resolution and accessibility checks. This ensures that
4861 the type of the expression is available to ASIS in all cases,
4862 in particular if the expression is itself an aggregate.
4864 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
4866 * einfo.ads (Has_Independent_Components): Document extended
4868 * einfo.adb (Has_Independent_Components): Remove obsolete assertion.
4869 (Set_Has_Independent_Components): Adjust assertion.
4870 * sem_prag.adb (Analyze_Pragma): Also set Has_Independent_Components
4871 for pragma Atomic_Components. Set Has_Independent_Components
4872 on the object instead of the type for an object declaration with
4873 pragma Independent_Components.
4875 2015-01-06 Olivier Hainque <hainque@adacore.com>
4877 * set_targ.adb (Read_Target_Dependent_Values): Set
4878 Long_Double_Index when "long double" is read.
4879 (elaboration code): Register_Back_End_Types only when not reading from
4880 config files. Doing otherwise is pointless and error prone.
4882 2015-01-06 Robert Dewar <dewar@adacore.com>
4884 * s-valrea.adb (Value_Real): Check for Str'Last = Positive'Last
4886 2015-01-06 Robert Dewar <dewar@adacore.com>
4888 * a-wtgeau.adb, a-ztgeau.adb, a-tigeau.adb (String_Skip): Raise PE if
4889 Str'Last = Positive'Last.
4891 2015-01-06 Ed Schonberg <schonberg@adacore.com>
4893 * sem_ch6.adb (Matches_Limited_View): Handle properly the case
4894 where the non-limited type is a generic actual and appears as
4895 a subtype of the non-limited view of the other.
4896 * freeze.adb (Build_Renamed_Body): If the return type of the
4897 declaration that is being completed is a limited view and the
4898 non-limited view is available, use it in the specification of
4901 2015-01-06 Ed Schonberg <schonberg@adacore.com>
4903 * sem_ch3.adb (Find_Type_Name): If there is a previous tagged
4904 incomplete view, the type of the classwide type common to both
4905 views is the type being declared.
4907 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
4909 * einfo.ads (Is_Independent): Further document extended usage.
4911 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
4913 * einfo.ads (Is_Independent): Document extended usage.
4914 * einfo.adb (Is_Independent): Remove obsolete assertion.
4915 (Set_Is_Independent): Likewise.
4916 * sem_prag.adb (Process_Atomic_Shared_Volatile): Rename into...
4917 (Process_Atomic_Independent_Shared_Volatile): ...this.
4918 Deal with pragma Independent here.
4919 (Analyze_Pragma): Adjust
4920 to above renaming and also invoke it for pragma Independent.
4921 Adjust comment for Independent_Components.
4923 2015-01-06 Robert Dewar <dewar@adacore.com>
4925 * snames.ads-tmpl: Remove entries for attribute Enum_Image.
4926 * exp_attr.adb: Remove reference to Attribute_Enum_Image.
4928 2015-01-06 Robert Dewar <dewar@adacore.com>
4930 * s-vallli.adb (Value_Long_Long_Integer): Handle case of Str'Last
4932 * s-valllu.adb (Value_Long_Long_Unsigned): Handle case of
4933 Str'Last = Positive'Last.
4935 2015-01-06 Robert Dewar <dewar@adacore.com>
4937 * sem_prag.adb (Process_Inline): Remove redundant construct
4938 warning (-gnatw.r) for an ineffective pragma Inline.
4940 2015-01-06 Robert Dewar <dewar@adacore.com>
4942 * s-valint.adb: Fix typo in last checkin.
4943 * s-valuns.adb (Value_Unsigned): More efficient fix for
4945 * sem_attr.adb (Analyze_Attribute): Minor reformatting
4946 (Eval_Attribute): Static ervaluation of 'Img for enumeration types.
4948 2015-01-06 Robert Dewar <dewar@adacore.com>
4950 * s-valint.adb, s-valuns.adb (Value_Integer): Deal with case where
4951 Str'Last = Positive'Last
4953 2015-01-06 Thomas Quinot <quinot@adacore.com>
4955 * xoscons.adb: Display exception information and return non-zero
4956 exit status in top level exception handler.
4958 2015-01-06 Ed Schonberg <schonberg@adacore.com>
4960 * sem_ch8.adb: Code clean up.
4962 2015-01-06 Tristan Gingold <gingold@adacore.com>
4964 * targparm.ads: Remove obsolete comment.
4966 2015-01-06 Olivier Hainque <hainque@adacore.com>
4968 * gcc-interface/decl.c (gnat_to_gnu_entity, case E_Variable): When
4969 constructing a ref to variable, update inner_const_flag from the
4970 variable TREE_READONLY attribute.
4971 * gcc-interface/targtyps.c (WIDEST_HARDWARE_FP_SIZE): Remove default
4973 (get_target_float_size): Remove.
4974 (get_target_double_size): Remove.
4975 (get_target_long_double_size): Remove.
4977 2015-01-06 Pascal Obry <obry@adacore.com>
4979 * adaint.c (ProcListEvt): Set to NULL.
4980 * rtinit.c: New file.
4981 (__gnat_rt_init_count): New reference counter set to 0.
4982 (__gnat_runtime_initialize): Move code here from __gnat_initialize when
4983 this code is actually needed for the runtime initialization. This
4984 routine returns immediately if the initialization has already been done.
4985 * final.c: Revert previous change.
4986 * rtfinal.c: New file.
4987 (__gnat_runtime_finalize)[Win32]: Add finalization of the critical
4988 section and event. The default version of this routine is empty (except
4989 for the reference counting code). This routine returns immediately if
4990 some others libraries are referencing the runtime.
4991 * bindgen.adb (Gen_Adainit): Generate call to Runtime_Initialize
4992 remove circuitry to initialize the signal handler as this is
4993 now done by the runtime initialization routine.
4994 (Gen_Adafinal): Generate call to Runtime_Finalize.
4995 * gnat_ugn.texi: Update documentation about concurrency and
4996 initialization/finalization of the run-time.
4997 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Add
4998 references to rtfinal.o and rtinit.o
5000 2015-01-06 Robert Dewar <dewar@adacore.com>
5002 * exp_attr.adb (Expand_N_Attribute_Reference): Add dummy entry
5004 * sem_attr.adb: Implement Enum_Image attribute.
5005 * snames.ads-tmpl: Add entries for Enum_Image attribute.
5007 2015-01-06 Robert Dewar <dewar@adacore.com>
5009 * namet.ads: Document use of Boolean2 for No_Use_Of_Entity.
5010 * restrict.ads (No_Use_Of_Entity): New table.
5011 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
5012 Ignore No_Use_Of_Entity (will be processed in parser).
5013 * snames.ads-tmpl: Add entry for Name_No_Use_Of_Entity.
5015 2015-01-06 Vincent Celier <celier@adacore.com>
5017 * prj-tree.adb (Imported_Or_Extended_Project_Of): Do not try
5018 to check for an extended project, if a project does not have
5019 yet a project declaration.
5021 2015-01-06 Pierre-Marie Derodat <derodat@adacore.com>
5023 * scos.ads: Update documentation about the SCO table build
5024 process and about table records format.
5025 * par_sco.ads (SCO_Record): Rename to SCO_Record_Raw.
5026 (SCO_Record_Filtered): New procedure.
5027 (Set_SCO_Logical_Operator): New procedure.
5028 (dsco): Update documentation.
5029 * par_sco.adb: Update library-level comments.
5030 (SCO_Generation_State_Type): New type.
5031 (SCO_Generation_State): New variable.
5032 (SCO_Raw_Table): New package instanciation.
5033 (Condition_Pragma_Hash_Table): Rename to SCO_Raw_Hash_Table.
5035 (Tristate): New type.
5036 (Is_Logical_Operator): Return Tristate and update documentation.
5037 (Has_Decision): Update call to Is_Logical_Operator and complete
5039 (Set_Table_Entry): Rename to Set_Raw_Table_Entry, update
5040 comment, add an assertion for state checking and change
5041 references to SCO_Table into SCO_Raw_Table.
5042 (dsco): Refactor to dump the raw and the filtered tables.
5043 (Process_Decisions.Output_Decision_Operand): Handle putative
5044 short-circuit operators.
5045 (Process_Decisions.Output_Element): Update references
5046 to Set_Table_Entry and to Condition_Pragma_Hash_Table.
5047 (Process_Decisions.Process_Decision_Operand): Update call
5048 to Is_Logical_Operator.
5049 (Process_Decisions.Process_Node): Handle putative short-circuit
5050 operators and change references to
5051 SCO_Table into SCO_Raw_Table.
5052 (SCO_Output): Add an assertion
5053 for state checking and remove code that used to stamp out SCO entries.
5054 (SCO_Pragma_Disabled): Change reference to SCO_Table
5056 (SCO_Record): Rename to SCO_Record_Raw,
5057 add an assertion for state checking and change references
5058 to SCO_Table into SCO_Raw_Table.
5059 (Set_SCO_Condition): Add an assertion for state checking, update
5060 references to Condition_Pragma_Hash_Table and change references to
5061 SCO_Table into SCO_Raw_Table.
5062 (Set_SCO_Pragma_Enabled): Add an assertion for state checking and
5063 change references to SCO_Table into SCO_Raw_Table.
5064 (Set_SCO_Logical_Operator): New procedure.
5065 (Traverse_Declarations_Or_Statements.Set_Statement_Entry): Update
5066 references to Set_Table_Entry and to Condition_Pragma_Hash_Table.
5067 (SCO_Record_Fildered): New procedure.
5068 * gnat1drv.adb (Gnat1drv): Invoke the SCO filtering pass.
5069 * lib-writ.adb (Write_ALI): Invoke the SCO filtering pass and
5071 * par-load.adb (Load): Update reference to SCO_Record.
5072 * par.adb (Par): Update reference to SCO_Record.
5073 * put_scos.adb (Put_SCOs): Add an assertion to check that no
5074 putative SCO condition reaches this end.
5075 * sem_ch10.adb (Analyze_Proper_Body): Update reference to SCO_Record.
5076 * sem_res.adb (Resolve_Logical_Op): Validate putative SCOs
5077 when corresponding to an "and"/"or" operator affected by the
5078 Short_Circuit_And_Or pragma.
5080 2015-01-06 Robert Dewar <dewar@adacore.com>
5082 * sem_ch8.adb (Analyze_Use_Package): Give more specific error
5083 msg for attempted USE of generic subprogram or subprogram.
5085 2015-01-06 Robert Dewar <dewar@adacore.com>
5087 * s-valllu.adb, a-tiinau.adb, a-timoau.adb, a-ztinau.adb, a-ztmoau.adb,
5088 s-valuns.adb, s-valrea.adb, a-wtflau.adb, a-tiflau.adb, a-ztflau.adb,
5089 a-wtinau.adb, a-wtmoau.adb: Document recognition of : in place of #.
5091 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5093 * sem_ch13.adb (Analyze_Aspect_Specifications): For aspects
5094 that specify stream subprograms, if the prefix is a class-wide
5095 type then the generated attribute definition clause must apply
5096 to the same class-wide type.
5097 (Default_Iterator): An iterator defined by an aspect of some
5098 container type T must have a first parameter of type T, T'class,
5099 or an access to such (from code reading RM 5.5.1 (2/3)).
5101 2015-01-06 Arnaud Charlet <charlet@adacore.com>
5103 * gnat1drv.adb: Minor: complete previous change.
5105 2015-01-06 Olivier Hainque <hainque@adacore.com>
5107 * set_targ.ads (C_Type_For): New function. Return the name of
5108 a C type supported by the back-end and suitable as a basis to
5109 construct the standard Ada floating point type identified by
5110 the T parameter. This is used as a common ground to feed both
5111 ttypes values and the GNAT tree nodes for the standard floating
5113 * set_targ.adb (Long_Double_Index): The index at which "long
5114 double" gets registered in the FPT_Mode_Table. This is useful to
5115 know whether we have a "long double" available at all and get at
5116 it's characteristics without having to search the FPT_Mode_Table
5117 when we need to decide which C type should be used as the
5118 basis for Long_Long_Float in Ada.
5119 (Register_Float_Type): Fill Long_Double_Index.
5120 (FPT_Mode_Index_For): New function. Return the index in
5121 FPT_Mode_Table that designates the entry corresponding to the
5122 provided C type name.
5123 (FPT_Mode_Index_For): New function. Return the index in
5124 FPT_Mode_Table that designates the entry for a back-end type
5125 suitable as a basis to construct the standard Ada floating point
5126 type identified by the input T parameter.
5127 (elaboration code): Register_Back_End_Types unconditionally,
5128 so C_Type_For can operate regardless of -gnateT. Do it
5129 early so we can query it for the floating point sizes, via
5130 FPT_Mode_Index_For. Initialize Float_Size, Double_Size and
5131 Long_Double_Size from the FPT_Mode_Table, as cstand will do.
5132 * cstand.adb (Create_Float_Types): Use C_Type_For to determine
5133 which C type should be used as the basis for the construction
5134 of the Standard Ada floating point types.
5135 * get_targ.ads (Get_Float_Size, Get_Double_Size,
5136 Get_Long_Double_Size): Remove.
5137 * get_targ.adb: Likewise.
5139 2015-01-06 Thomas Quinot <quinot@adacore.com>
5141 * sem_cat.adb (In_RCI_Declaration): Remove unnecessary
5142 parameter and rename to...
5143 (In_RCI_Visible_Declarations): Fix handling of private part of nested
5145 (Validate_RCI_Subprogram_Declaration): Reject illegal function
5146 returning anonymous access in RCI unit.
5148 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5150 * sem_ch6.adb (New_Overloaded_Entity): In GNATprove mode, a
5151 function wrapper may be a homonym of another local declaration.
5152 * sem_ch8.adb (Analyze_Subprogram_Renaming): In GNATprove mode,
5153 build function and operator wrappers after the actual subprogram
5154 has been resolved, and replace the standard renaming declaration
5155 with the declaration of wrapper.
5156 * sem_ch12.ads (Build_Function_Wrapper, Build_Operator_Wraooer):
5157 make public for use elsewhere.
5158 * sem_ch12.adb (Build_Function_Wrapper, Build_Operator_Wraooer):
5159 rewrite, now that actual is fully resolved when wrapper is
5162 2015-01-06 Javier Miranda <miranda@adacore.com>
5164 * exp_disp.adb: Revert previous change.
5166 2015-01-06 Robert Dewar <dewar@adacore.com>
5168 * exp_util.adb: Change name Name_Table_Boolean to
5169 Name_Table_Boolean1.
5170 * namet.adb: Change name Name_Table_Boolean to Name_Table_Boolean1
5171 Introduce Name_Table_Boolean2/3.
5172 * namet.ads: Change name Name_Table_Boolean to Name_Table_Boolean1
5173 Introduce Name_Table_Boolean2/3.
5174 * par-ch13.adb: Change name Name_Table_Boolean to
5175 Name_Table_Boolean1.
5177 2015-01-06 Bob Duff <duff@adacore.com>
5179 * gnat_rm.texi: Improve documentation regarding No_Task_Termination.
5181 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5183 * sem_aggr.adb (Resolve_Record_Aggregte, Get_Value): For an
5184 others choice that covers multiple components, analyze each
5185 copy with the type of the component even in compile-only mode,
5186 to detect potential accessibility errors.
5188 2015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
5190 * sem_res.adb (Is_Assignment_Or_Object_Expression): New routine.
5191 (Resolve_Actuals): An effectively volatile out
5192 parameter cannot act as an in or in out actual in a call.
5193 (Resolve_Entity_Name): An effectively volatile out parameter
5196 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5198 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If the body is
5199 the expansion of an expression function it may be pre-analyzed
5200 if a 'access attribute is applied to the function, in which case
5201 last_entity may have been assigned already.
5203 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5205 * sem_ch4.adb (Analyze_One_Call): If formal has an incomplete
5206 type and actual has the corresponding full view, there is no
5207 error, but a case of use of incomplete type in a predicate or
5208 invariant expression.
5210 2015-01-06 Vincent Celier <celier@adacore.com>
5212 * makeutl.adb (Insert_No_Roots): Make sure that the same source
5213 in two different project tree is checked in both trees, if they
5214 are sources of two different projects, extended or not.
5216 2015-01-06 Arnaud Charlet <charlet@adacore.com>
5218 * gnat1drv.adb: Minor code clean up.
5219 (Adjust_Global_Switches): Ignore gnatprove_mode in codepeer_mode.
5221 2015-01-06 Bob Duff <duff@adacore.com>
5223 * osint.adb (Read_Source_File): Don't print out
5224 file name unless T = Source.
5226 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5228 * sem_util.adb (Is_Variable, Is_OK_Variable_For_Out_Formal):
5229 recognize improper uses of constant_reference types as actuals
5230 for in-out parameters.
5231 (Check_Function_Call): Do not collect identifiers if function
5232 name is missing because of previous error.
5234 2015-01-06 Robert Dewar <dewar@adacore.com>
5236 * ali-util.adb, sem_prag.adb, rtsfind.adb, sem_util.adb, sem_res.adb,
5237 ali.adb, binde.adb, namet.adb, namet.ads, gnatls.adb, bcheck.adb:
5238 Minor change of name Name_Table_Info => Name_Table_Int.
5240 2015-01-06 Robert Dewar <dewar@adacore.com>
5242 * exp_strm.adb (Build_Elementary_Input_Call): Clarify comments
5243 in previous checkin.
5244 * freeze.adb (Freeze_Fixed_Point_Type): Add warning for shaving
5246 * sem_prag.adb, sem_ch10.adb, sem_ch6.adb: Minor reformatting.
5248 2015-01-06 Vincent Celier <celier@adacore.com>
5250 * a-strsup.adb (Times (Natural;String;Positive)): Raise
5251 Length_Error, not Index_Error, when the result is too long.
5253 2015-01-06 Thomas Quinot <quinot@adacore.com>
5255 * a-direct.adb (Create_Path): Minor error handling and
5256 performance improvement.
5258 2015-01-06 Robert Dewar <dewar@adacore.com>
5260 * checks.ads, sem_ch12.adb: Minor reformatting.
5261 * exp_ch4.adb (Expand_N_Op_Divide): Generate explicit divide by
5262 zero check for fixed-point case if Backend_Divide_Checks_On_Target
5265 2015-01-06 Robert Dewar <dewar@adacore.com>
5267 * sem_prag.adb (Analyze_Pragma, case No_Elaboration_Code_All):
5268 Do not set restriction No_Elaboration_Code unless the pragma
5269 appears in the main unit).
5271 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5273 * sem_ch10.adb (Is_Regular_With_Clause): Add guard to verify
5274 that with clause has already been analyzed before checking kind
5277 2015-01-06 Robert Dewar <dewar@adacore.com>
5279 * exp_strm.adb (Build_Elementary_Input_Call): Return base type
5280 (as required by RM).
5282 2015-01-06 Arnaud Charlet <charlet@adacore.com>
5284 * a-reatim.adb ("/"): Add explicit pragma Unsuppress (Division_Check).
5286 2015-01-06 Robert Dewar <dewar@adacore.com>
5288 * sem_prag.adb (Process_Suppress_Unsuppress): Add extra warning
5289 for ignoring pragma Suppress (Elaboration_Check) in SPARK mode.
5291 2015-01-06 Javier Miranda <miranda@adacore.com>
5293 * exp_disp.adb (Expand_Interface_Conversion): No displacement
5294 of the pointer to the object needed when the type of the operand
5295 is not an interface type and the interface is one of its parent
5296 types (since they share the primary dispatch table).
5298 2015-01-06 Vincent Celier <celier@adacore.com>
5300 * prj-env.adb: Minor comment update.
5302 2015-01-06 Javier Miranda <miranda@adacore.com>
5304 * sem_res.adb (Valid_Conversion): Restrict the checks on anonymous
5305 access types whose target type is an interface type to operands
5306 that are access types; required to report an error when the
5307 operand is not an access type.
5309 2015-01-06 Bob Duff <duff@adacore.com>
5311 * a-cfinve.adb (Copy): Set the discriminant to the Length when
5313 * a-cofove.ads (Capacity): Add a postcondition.
5314 * a-cfinve.ads (Capacity): Add a postcondition.
5315 (Reserve_Capacity): Correct the postcondition in the case where
5316 Capacity = 0; that means "Capacity => Length (Container)".
5317 * a-cofove.adb (Elems[c]): Add a comment
5318 explaining the dangers and how to avoid them.
5320 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5322 * sem_ch12.adb: Code clean up.
5324 2015-01-06 Arnaud Charlet <charlet@adacore.com>
5326 * gnatvsn.ads: Bump copyright year.
5328 2015-01-06 Robert Dewar <dewar@adacore.com>
5330 * s-taskin.ads, s-traces.ads: Minor reformatting.
5331 * exp_util.adb: Minor typo fix.
5333 2015-01-06 Vincent Celier <celier@adacore.com>
5335 * gnatls.adb (Search_RTS): Invoke Initialize_Default_Project_Path
5336 with the runtime name.
5337 * prj-env.adb (Initialize_Default_Project_Path): When both
5338 Target_Name and Runtime_Name are not empty string, add to the
5339 project path the two directories .../lib/gnat and .../share/gpr
5340 related to the runtime.
5341 * prj-env.ads (Initialize_Default_Project_Path): New String
5342 parameter Runtime_Name, defaulted to the empty string.
5344 2015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
5346 * frontend.adb: Guard against the case where a configuration
5347 pragma may be split into multiple pragmas and the original
5348 rewritten as a null statement.
5349 * sem_prag.adb (Analyze_Pragma): Insert a brand new Check_Policy
5350 pragma using Insert_Before rather than Insert_Action. This
5351 takes care of the configuration pragma case where Insert_Action
5354 2015-01-06 Bob Duff <duff@adacore.com>
5356 * a-coboho.ads (Element_Access): Add "pragma
5357 No_Strict_Aliasing (Element_Access);". This is needed because
5358 we are unchecked-converting from Address to Element_Access.
5359 * a-cofove.ads, a-cofove.adb (Elems,Elemsc): Fix bounds of the
5362 2015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
5364 * sem_res.adb (Resolve_Actuals): Remove the
5365 restriction which prohibits volatile actual parameters with
5366 enabled external propery Async_Writers to act appear in procedure
5367 calls where the corresponding formal is of mode OUT.
5369 2015-01-05 Jakub Jelinek <jakub@redhat.com>
5371 * gnat_ugn.texi: Bump @copying's copyright year.
5373 2015-01-05 Eric Botcazou <ebotcazou@adacore.com>
5376 * gcc-interface/Makefile.in (../stamp-tools): Reinstate dropped code.
5378 2015-01-04 Uros Bizjak <ubizjak@gmail.com>
5380 * gcc-interface/misc.c (internal_error_function): Use xasprintf instead
5381 of unchecked asprintf.
5384 Copyright (C) 2015 Free Software Foundation, Inc.
5386 Copying and distribution of this file, with or without modification,
5387 are permitted in any medium without royalty provided the copyright
5388 notice and this notice are preserved.