1 2015-10-16 Hristian Kirtchev <kirtchev@adacore.com>
3 * exp_ch3.adb (Expand_N_Full_Type_Declaration): Do not capture,
4 set and restore the Ghost mode.
5 (Expand_N_Object_Declaration): Do not capture, set and restore the
7 (Freeze_Type): Redo the capture and restore of the Ghost mode.
8 (Restore_Globals): Removed.
9 * exp_ch5.adb (Expand_N_Assignment_Statement): Redo the capture
10 and restore of the Ghost mode.
11 (Restore_Globals): Removed.
12 * exp_ch6.adb (Expand_N_Procedure_Call_Statement):
13 Redo the capture and restore of the Ghost mode.
14 (Expand_N_Subprogram_Body): Redo the capture, set and restore
16 (Expand_N_Subprogram_Declaration): Do not
17 capture, set and restore the Ghost mode.
18 (Restore_Globals): Removed.
19 * exp_ch7.adb (Expand_N_Package_Body): Redo the capture, set
20 and restore of the Ghost mode.
21 (Expand_N_Package_Declaration): Do not capture, set and restore the
23 * exp_ch8.adb (Expand_N_Exception_Renaming_Declaration):
24 Redo the capture and restore of the Ghost mode.
25 (Expand_N_Object_Renaming_Declaration): Redo
26 the capture and restore of the Ghost mode.
27 (Expand_N_Package_Renaming_Declaration):
28 Redo the capture and restore of the Ghost mode.
29 (Expand_N_Subprogram_Renaming_Declaration): Redo the capture
30 and restore of the Ghost mode.
31 * exp_ch11.adb Remove with and use clauses for Ghost.
32 (Expand_N_Exception_Declaration): Do not capture, set and restore
34 * exp_disp.adb (Make_DT): Redo the capture and restore of the
36 (Restore_Globals): Removed.
37 * exp_prag.adb (Expand_Pragma_Check): Do not capture, set
38 and restore the Ghost mode.
39 (Expand_Pragma_Contract_Cases):
40 Redo the capture and restore of the Ghost mode. Preserve the
41 original context of contract cases by setting / resetting the
42 In_Assertion_Expr counter.
43 (Expand_Pragma_Initial_Condition):
44 Redo the capture and restore of the Ghost mode.
45 (Expand_Pragma_Loop_Variant): Redo the capture and restore of
47 (Restore_Globals): Removed.
48 * exp_util.adb (Make_Predicate_Call): Redo the capture and
49 restore of the Ghost mode.
50 (Restore_Globals): Removed.
51 * freeze.adb (Freeze_Entity): Redo the capture and restore of
53 (Restore_Globals): Removed.
54 * ghost.adb (Check_Ghost_Context): Remove the RM reference from
56 (Is_OK_Statement): Account for statements
57 that appear in assertion expressions.
58 (Is_Subject_To_Ghost):
60 * ghost.ads (Is_Subject_To_Ghost): Moved to body.
61 * rtsfind.ads (Load_RTU): Redo the capture and restore of the
63 * sem.adb Add with and use clauses for Ghost.
65 the capture and restore of the Ghost mode. Set the Ghost mode
66 when analyzing a declaration.
67 (Do_Analyze): Redo the capture
68 and restore of the Ghost mode.
69 * sem_ch3.adb (Analyze_Full_Type_Declaration): Do not capture, set
70 and restore the Ghost mode.
71 (Analyze_Incomplete_Type_Decl):
72 Do not capture, set and restore the Ghost mode.
73 (Analyze_Number_Declaration): Do not capture, set and restore the
75 (Analyze_Object_Declaration): Do not capture, set and
76 restore the Ghost mode.
77 (Analyze_Private_Extension_Declaration):
78 Do not capture, set and restore the Ghost mode.
79 (Analyze_Subtype_Declaration): Do not capture, set and restore
81 (Restore_Globals): Removed.
82 * sem_ch5.adb (Analyze_Assignment): Redo the capture and restore
84 (Restore_Globals): Removed.
85 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration):
86 Do not capture, set and restore the Ghost mode.
87 (Analyze_Procedure_Call): Redo the capture and restore of the
89 (Analyze_Subprogram_Body_Helper): Redo the capture
90 and restore of the Ghost mode. (Analyze_Subprogram_Declaration):
91 Do not capture, set and restore the Ghost mode.
92 (Restore_Globals): Removed.
93 * sem_ch7.adb (Analyze_Package_Body_Helper): Redo the capture and
94 restore of the Ghost mode.
95 (Analyze_Package_Declaration):
96 Do not capture, set and restore the Ghost mode.
97 (Analyze_Private_Type_Declaration): Do not capture, set and
98 restore the Ghost mode.
99 (Restore_Globals): Removed.
100 * sem_ch8.adb (Analyze_Exception_Renaming): Do not capture,
101 set and restore the Ghost mode.
102 (Analyze_Generic_Renaming): Do not capture, set and restore the Ghost
104 (Analyze_Object_Renaming): Do not capture, set and restore the
106 (Analyze_Package_Renaming): Do not capture, set and restore the Ghost
108 (Analyze_Subprogram_Renaming): Do not capture, set and restore the
110 (Restore_Globals): Removed.
111 * sem_ch11.adb (Analyze_Exception_Declaration): Do not capture,
112 set and restore the Ghost mode.
113 * sem_ch12.adb (Analyze_Generic_Package_Declaration):
114 Do not capture, set and restore the Ghost mode.
115 (Analyze_Generic_Subprogram_Declaration): Do not capture, set
116 and restore the Ghost mode.
117 * sem_ch13.adb (Build_Invariant_Procedure_Declaration): Redo
118 the capture and restore of the Ghost mode.
119 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
120 Redo the capture and restore of the Ghost mode.
121 (Analyze_External_Property_In_Decl_Part):
122 Redo the capture and restore of the Ghost mode.
123 (Analyze_Initial_Condition_In_Decl_Part): Redo the
124 capture and restore of the Ghost mode. (Analyze_Pragma):
125 Do not capture, set and restore the Ghost mode for Assert.
126 Redo the capture and restore of the Ghost mode for Check. Do
127 not capture and restore the Ghost mode for Invariant.
128 (Analyze_Pre_Post_Condition_In_Decl_Part): Redo the capture and
129 restore of the Ghost mode.
130 * sem_res.adb (Resolve): Capture, set and restore the Ghost mode
131 when resolving a declaration.
132 * sem_util.adb (Build_Default_Init_Cond_Procedure_Body):
133 Redo the capture and restore of the Ghost mode.
134 (Build_Default_Init_Cond_Procedure_Declaration): Redo the capture
135 and restore of the Ghost mode.
137 2015-10-16 Bob Duff <duff@adacore.com>
139 * debug.adb: Document -gnatdQ switch.
141 2015-10-16 Ed Schonberg <schonberg@adacore.com>
143 * sem_ch12.adb (Analyze_Formal_Subprogram): Implement rule that
144 a formal abstract subprogram cannot have a null default: RM 12.6
147 2015-10-16 Bob Duff <duff@adacore.com>
149 * sem_util.ads, sinput.ads, bcheck.adb: Minor comment fixes.
151 2015-10-16 Javier Miranda <miranda@adacore.com>
153 * inline.adb (Add_Inlined_Body): Ensure that
154 Analyze_Inlined_Bodies will be invoked after completing the
155 analysis of the current unit.
157 2015-10-16 Arnaud Charlet <charlet@adacore.com>
159 * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order): Fix error
160 message for bad last bit position.
161 * sem_ch3.adb, sem_util.adb, sem_util.ads: Minor reformatting.
163 2015-10-16 Ed Schonberg <schonberg@adacore.com>
165 * exp_ch5.adb (Expand_N_Case_Statement): If expression is
166 compile-time known but does not obey a static predicate on
167 its type, replace the case statement with a raise statement,
168 as with other statically detected constraint violations.
170 2015-10-16 Bob Duff <duff@adacore.com>
172 * s-traceb.adb, s-traceb.ads, s-traceb-hpux.adb, s-traceb-mastop.adb:
174 * opt.ads: Minor typo.
176 2015-10-16 Ed Schonberg <schonberg@adacore.com>
178 * sem_util.adb (Gather_Components): When gathering components
179 of a nested variant, the record type used in legality checks is
180 the enclosing record type.
182 2015-10-13 Jakub Jelinek <jakub@redhat.com>
184 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10,
185 DEF_FUNCTION_TYPE_11): Define.
187 2015-10-09 Eric Botcazou <ebotcazou@adacore.com>
189 * gcc-interface/Make-lang.in: Make sure that GNAT1_OBJS and not just
190 GNAT1_ADA_OBJS are compiled only after generated files are created.
192 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
194 * gcc-interface/trans.c (convert_with_check): Use real_arithmetic
195 instead of REAL_ARITHMETIC.
197 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
199 * gcc-interface/trans.c (convert_with_check): Use real_less instead
202 2015-10-02 Doug Rupp <rupp@adacore.com>
203 Olivier Hainque <hainque@adacore.com>
205 * gcc-interface/lang.opt (fbuiltin-printf): Accept.
206 * gcc-interface/misc.c (gnat_handle_option): Ignore it.
207 * gcc-interface/lang-specs.h (@ada, @adawhy, @adascil): Propagate -f*
208 flags as -g* and -m* flags past -gnatez.
210 2015-10-02 Eric Botcazou <ebotcazou@adacore.com>
212 * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Warnings>: Replace
213 linear search with call to find_opt and issue warnings if the -W
214 switch is not appropriate.
216 2015-10-02 Eric Botcazou <ebotcazou@adacore.com>
218 * gcc-interface/ada-tree.h (DECL_RESTRICTED_ALIASING_P): New flag.
219 * gcc-interface/decl.c (gnat_to_gnu_param): For parameters passed by
220 reference but whose type isn't by-ref and whose mechanism hasn't been
221 forced to by-ref, set the DECL_RESTRICTED_ALIASING_P flag directly on
222 them instead of changing their type.
223 * gcc-interface/trans.c (scan_rhs_r): New helper function.
224 (independent_iterations_p): New predicate.
225 (Loop_Statement_to_gnu): For a loop with an iteration scheme, set an
226 ivdep pragma if the iterations are independent.
228 2015-10-02 Eric Botcazou <ebotcazou@adacore.com>
230 * gcc-interface/trans.c (find_loop_for): Use FOR_EACH_VEC_ELT_REVERSE.
231 (Loop_Statement_to_gnu): Use FOR_EACH_VEC_ELT.
232 (finalize_nrv): Use FOR_EACH_VEC_SAFE_ELT and initialize field.
233 (build_stmt_group): Add blank lines.
235 2015-09-30 Thomas Schwinge <thomas@codesourcery.com>
237 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_11): Don't define.
239 2015-09-28 Tom de Vries <tom@codesourcery.com>
241 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_6): Define.
243 2015-09-17 Eric Botcazou <ebotcazou@adacore.com>
245 * gcc-interface/trans.c (emit_check): Do not touch TREE_SIDE_EFFECTS.
247 2015-09-14 Pierre-Marie de Rodat <derodat@adacore.com>
249 * gcc-interface/misc.c (gnat_post_options): Issue a warning if
250 generating STABS debugging information when not the default.
252 2015-09-14 Eric Botcazou <ebotcazou@adacore.com>
254 * gcc-interface/gigi.h (ref_filename): Delete.
255 (Sloc_to_locus): Add clean_column parameter defaulting to false.
256 (build_call_raise): Adjust comment.
257 (build_call_raise_range): Move around.
258 * gcc-interface/trans.c (ref_filename): Delete.
259 (gigi): Fix formatting.
260 (block_end_locus_sink): Delete.
261 (Sloc_to_locus1): Tidy up and reformat. Rename into...
262 (Sloc_to_locus): ...this. Add default for clean_colmun parameter.
263 (set_expr_location_from_node1): Rename into...
264 (set_expr_location_from_node): ...this.
265 (set_end_locus_from_node): Move around. Adjust for renaming.
266 (Handled_Sequence_Of_Statements_to_gnu): Likewise.
267 (add_cleanup): Likewise.
268 * gcc-interface/utils2.c (expand_sloc): New static function.
269 (build_call_raise): Call it.
270 (build_call_raise_column): Likewise.
271 (build_call_raise_range): Likewise. Move around.
273 2015-09-14 Eric Botcazou <ebotcazou@adacore.com>
275 * gcc-interface/utils2.c (gnat_rewrite_reference) <COMPOUND_EXPR>: Add
276 another acceptable pattern for the RHS.
278 2015-07-24 Micahel Darling <darlingm@gmail.com>
281 * prj-nmsc.adb: Reflects renaming of configure.in to configure.ac
282 * gcc-interface/Makefile.in: Likewise
284 2015-07-12 Aldy Hernandez <aldyh@redhat.com>
286 * gcc-interface/utils.c: Fix double word typos.
287 * gnat_ugn.texi: Same.
290 * projects.texi: Same.
294 * sem_eval.adb: Same.
295 * sem_prag.adb: Same.
296 * sem_warn.adb: Same.
298 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
300 * gcc-interface/cuintp.c: Adjust includes.
301 * gcc-interface/decl.c: Likewise.
302 * gcc-interface/misc.c: Likewise.
303 * gcc-interface/targtyps.c: Likewise.
304 * gcc-interface/trans.c: Likewise.
305 * gcc-interface/utils.c: Likewise.
306 * gcc-interface/utils2.c: Likewise.
308 2015-07-06 John Marino <gnugcc@marino.st>
310 * s-oscons-tmplt.c: Add support for DragonFly alongside FreeBSD.
312 2015-06-29 Eric Botcazou <ebotcazou@adacore.com>
315 * gcc-interface/utils.c (gnat_write_global_declarations): Always
316 build the dummy global variable if code was generated.
318 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
321 * gcc-interface/misc.c (gnat_post_options): No need to disable
322 warn_unused_parameter anymore.
324 2015-06-26 Eric Botcazou <ebotcazou@adacore.com>
326 * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): When
327 not optimizing the CFG, clear the DECL_DECLARED_INLINE_P flag on the
330 2015-06-26 Eric Botcazou <ebotcazou@adacore.com>
332 * gcc-interface/gigi.h (note_types_used_by_globals): Delete.
333 (gnat_write_global_declarations): New prototype.
334 * gcc-interface/utils.c (type_decls): Rename back to...
335 (global_decls): ...this.
336 (gnat_pushdecls): Revert previous change.
337 (create_var_decl): Do not output global variables.
338 (note_types_used_by_globals): Rename back to...
339 (gnat_write_global_declarations): ...this. Output variables on the
341 * gcc-interface/misc.c (gnat_parse_file): Adjust to above renaming.
343 2015-06-26 Eric Botcazou <ebotcazou@adacore.com>
345 * gcc-interface/gigi.h (create_var_decl_1): Rename into...
346 (create_var_decl): ...this. Add default value for last parameter.
347 (create_type_stub_decl): Adjust.
348 (create_type_decl): Likewise.
349 (create_field_decl): Likewise.
350 (create_param_decl): Likewise.
351 (create_label_decl): Likewise.
352 (create_subprog_decl): Likewise.
353 * gcc-interface/utils.c (create_var_decl_1): Rename into...
354 (create_var_decl): ...this. Rename var_name into name and var_init
355 into init, move const_decl_allowed_p last and adjust accordingly.
356 (create_type_stub_decl): Rename type_name into name and adjust.
357 (create_type_decl): Likewise.
358 (create_field_decl): Likewise for field_name and field_type.
359 (create_param_decl): Likewise for param_name and param_type.
360 (create_label_decl): Likewise for label_name.
361 (create_subprog_decl): Likewise for subprog_name and subprog_type.
362 * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust couple of calls
363 to create_var_decl_1.
365 2015-06-26 Eric Botcazou <ebotcazou@adacore.com>
367 * gcc-interface/trans.c (loop_info_d): Add low_bound, high_bound,
368 artificial, has_checks and warned_aggressive_loop_optimizations.
369 (gigi): Set warn_aggressive_loop_optimizations to 0.
370 (inside_loop_p): New inline predicate.
371 (push_range_check_info): Rename into...
372 (find_loop_for): ...this and do not push range_check_info_d object.
373 (Loop_Statement_to_gnu): Set artificial, low_bound and high_bound
374 fields of gnu_loop_info. Adjust detection of checks enabled by
375 -funswitch-loops and adds one for -faggressive-loop-optimizations.
376 (gnat_to_gnu) <N_Indexed_Component>: If aggressive loop optimizations
377 are enabled, warn for loops overrunning an array of size 1 not at the
380 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
382 * gcc-interface/trans.c: Remove ipa-ref.h and plugin-api.h from include
384 * gcc-interface/utils.c: Likewise.
386 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
388 * gcc-interface/decl.c (value_annotation_hasher): Inherit from
389 ggc_cache_ptr_hash rather than ggc_cache_hasher.
390 * gcc-interface/utils.c (pad_type_hasher): Likewise.
392 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
394 * gcc-interface/decl.c (value_annotation_hasher::handle_cache_entry):
396 (value_annotation_hasher::keep_cache_entry): New function.
397 * gcc-interface/utils.c (pad_type_hasher::handle_cache_entry):
399 (pad_type_hasher::keep_cache_entry): New function.
401 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
403 * gcc-interface/misc.c: Include calls.h not function.h.
405 2015-06-19 Eric Botcazou <ebotcazou@adacore.com>
407 * gcc-interface/gigi.h (record_builtin_type): Adjust comment.
408 (tree create_type_decl): Likewise.
409 (create_var_decl_1): Add artificial_p and debug_info_p parameters.
410 (create_var_decl): Likewise.
411 (create_true_var_decl): Delete.
412 (create_subprog_decl): Add debug_info_p parameter.
413 * gcc-interface/decl.c (gnat_to_gnu_entity): Add artificial_p local
414 variable and use it throughout. Remove DECL_ARTIFICIAL settings.
415 <E_Variable>: Adjust calls to create_var_decl and create_var_decl_1.
416 Remove DECL_IGNORED_P settings.
417 <E_Enumeration_Type>: Likewise.
418 <E_Record_Type>: Likewise.
419 <E_Subprogram_Type>: Likewise. Remove artificial_flag local variable.
420 Adjust call to create_subprog_decl.
421 (get_minimal_subprog_decl): Likewise.
422 (elaborate_expression_1): Adjust call to create_var_decl.
423 * gcc-interface/trans.c (gigi): Adjust calls to create_var_decl and
424 create_subprog_decl. Remove DECL_ARTIFICIAL & DECL_IGNORED_P settings.
425 * gcc-interface/utils.c (maybe_pad_type): Likewise.
426 (record_builtin_type): Adjust comment.
427 (create_type_stub_decl): Remove obsolete comment.
428 (create_var_decl_1): Add artificial_p and debug_info_p parameters.
429 Set DECL_ARTIFICIAL and DECL_IGNORED_P accordingly.
430 (create_subprog_decl): Add debug_info_p parameter. Set DECL_IGNORED_P
433 2015-06-19 Eric Botcazou <ebotcazou@adacore.com>
435 * gcc-interface/misc.c (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): Define.
437 2015-06-19 Eric Botcazou <ebotcazou@adacore.com>
439 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Make sure
440 the size of a padding type built around the return type is positive.
441 * gcc-interface/trans.c (gnat_to_gnu) <N_Simple_Return_Statement>:
442 Use INIT_EXPR instead of MODIFY_EXPR to assign to the return object.
444 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
446 * gcc-interface/cuintp.c: Do not include input.h, line-map.h or is-a.h.
447 * gcc-interface/decl.c: Likewise.
448 * gcc-interface/misc.c: Likewise.
449 * gcc-interface/targtyps.c: Likewise.
450 * gcc-interface/trans.c: Likewise.
451 * gcc-interface/utils.c: Likewise.
452 * gcc-interface/utils2.c: Likewise.
454 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
456 * gcc-interface/utils.c (get_global_context): Register the main
457 translation unit through the new debug hook.
459 2015-06-09 Eric Botcazou <ebotcazou@adacore.com>
461 * gcc-interface/misc.c: Remove duplicate include directives.
462 * gcc-interface/trans.c: Likewise.
463 * gcc-interface/utils.c: Likewise.
465 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
467 * gcc-interface/cuintp.c : Adjust include files.
468 * gcc-interface/decl.c : Likewise.
469 * gcc-interface/misc.c : Likewise.
470 * gcc-interface/targtyps.c : Likewise.
471 * gcc-interface/trans.c : Likewise.
472 * gcc-interface/utils.c : Likewise.
473 * gcc-interface/utils2.c : Likewise.
475 2015-06-08 John Marino <gnugcc@marino.st>
477 * a-intnam-dragonfly.ads: New.
478 * s-osinte-dragonfly.adb: Likewise.
479 * s-osinte-dragonfly.ads: Likewise.
480 * system-dragonfly-x86_64.ads: Likewise.
481 * adaint.c: Add BSD macros.
482 * cstreams.c: Likewise.
483 * gsocket.h: Likewise.
485 * socket.c: Likewise.
486 * env.c: Add __DragonFly__, remove __FreeBSD__ macro.
487 * init.c: Add __DragonFly__, change __gnat_install_handler
488 prototype from empty to void.
489 * initialize.c: Add __DragonFly__.
490 * sysdep.c: Likewise.
491 * s-osinte-freebsd.adb: Use __get_errno instead of __error.
492 * tracebak.c: Set unwinder for i386 BSD.
493 * gcc-interface/Makefile.in: Add x86_64 DragonFly, tweak
494 x86_64 FreeBSD and x86 FreeBSD.
496 2015-06-06 Eric Botcazou <ebotcazou@adacore.com>
498 * gcc-interface/utils.c (note_types_used_by_globals): Tweak comment.
499 * gcc-interface/decl.c (gnat_to_gnu_entity): Likewise.
501 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
503 * gcc-interface/gigi.h (note_types_used_by_globals): Rename from
504 gnat_write_global_declarations.
505 * gcc-interface/misc.c (gnat_parse_file): Call
506 note_types_used_by_globals.
507 Remove LANG_HOOKS_WRITE_GLOBALS.
508 * gcc-interface/utils.c: Rename global_decls to type_decls.
509 (gnat_write_global_declarations): Rename
510 to note_types_used_by_globals.
511 Remove call to finalize_compilation_unit.
512 Remove call to debug_hooks->global_decl for globals.
513 (gnat_pushdecls): Only insert into type_decls if TYPE_DECL.
515 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
517 * gcc-interface/cuintp.c: Adjust includes for restructured coretypes.h.
518 * gcc-interface/decl.c: Likewise.
519 * gcc-interface/misc.c: Likewise.
520 * gcc-interface/targtyps.c: Likewise.
521 * gcc-interface/trans.c: Likewise.
522 * gcc-interface/utils.c: Likewise.
523 * gcc-interface/utils2.c: Likewise.
525 2015-06-04 Pierre-Marie de Rodat <derodat@adacore.com>
527 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: If
528 processing a definition, create definitions for padding types
531 2015-06-03 Eric Botcazou <ebotcazou@adacore.com>
533 * gcc-interface/utils.c (copy_type): Also set TYPE_CANONICAL.
535 2015-06-03 Eric Botcazou <ebotcazou@adacore.com>
537 * gcc-interface/trans.c (gnat_to_gnu) <N_Simple_Return_Statement>: Fix
538 typo in latest change.
540 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
542 * gcc-interface/Makefile.in: Fix ARM/Darwin configuration.
544 2015-06-01 Pierre-Marie de Rodat <derodat@adacore.com>
546 * gcc-interface/utils.c (scale_by_factor_of): When handling a function
547 call expression, process the corresponding function body. Also handle
550 2015-06-01 Pierre-Marie de Rodat <derodat@adacore.com>
552 * gcc-interface/decl.c (gnat_to_gnu_entity): Replace pointer types with
553 references ones for functions that return references.
555 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
557 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: For a
558 definition of a type coming from a limited_with, get to the full view
559 if it is not in the main code unit.
561 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
563 * gcc-interface/utils.c (create_var_decl_1): If an assembler name is
564 specified, let the target mangle it before settting.
565 (create_subprog_decl): Likewise and move this treatment last.
567 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
569 * gcc-interface/lang-specs.h (TARGET_VXWORKS_RTP): Move substitution to
570 before first -gnatez switch. Simplify and add trailing space.
572 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
574 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: If the
575 record has a parent field and a representation clause, make sure that
576 it is properly aligned.
578 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
580 * gcc-interface/trans.c (lvalue_required_p) <N_Indexed_Component>: Deal
581 with character and enumeration literals as index values.
583 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
585 * gcc-interface/gigi.h (build_simple_component_ref): Declare.
586 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Deal with
587 address clause on aliased object with unconstrained nominal subtype.
588 Mark the aligning variable as artificial, do not convert the address
589 expression immediately but mark it as constant instead.
590 * gcc-interface/utils.c (convert): If the target type contains a
591 template, be prepared for an empty array.
592 (maybe_unconstrained_array): Likewise.
593 * gcc-interface/utils2.c (known_alignment) <POINTER_PLUS_EXPR>: Deal
594 with the pattern built for aligning types.
595 <INTEGER_CST>: Do not cap the value at BIGGEST_ALIGNMENT.
596 (build_simple_component_ref): Make public.
597 If the base object is a constructor that contains a template, fold the
598 result field by field.
600 2015-05-31 Eric Botcazou <ebotcazou@adacore.com>
602 * s-oscons-tmplt.c: Add explicit tests for Android alongside Linux.
604 2015-05-30 Eric Botcazou <ebotcazou@adacore.com>
606 * adaint.c: Test for __linux__ instead of linux and __sun__ instead
607 of sun. Add missing leading underscore to AIX. Remove #elif 0.
608 * adaint.h: Likewise.
610 * cstreams.c: Likewise.
612 * gsocket.h: Likewise.
613 * init.c: Likewise. Test for __i386__ instead of i386.
615 * s-oscons-tmplt.c: Likewise.
616 * sysdep.c: Likewise.
617 * terminals.c: Likewise. Use BSD symbol instead of FREEBSD.
618 * tracebak.c: Likewise. Test for __sparc__ instead of sparc.
620 2015-05-28 Eric Botcazou <ebotcazou@adacore.com>
622 * gcc-interface/utils.c (max_size) <tcc_binary>: Add special code to
623 deal with the subtraction of a "negative" value in an unsigned type.
625 2015-05-28 Eric Botcazou <ebotcazou@adacore.com>
627 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Do
628 not error out on a return type which has a size that overflows if the
629 return is done by invisible reference.
631 2015-05-28 Eric Botcazou <ebotcazou@adacore.com>
633 * gcc-interface/utils.c (gnat_pushdecl): Reunify the handling of array
634 and pointer types wrt DECL_ORIGINAL_TYPE and adjust left and right.
636 2015-05-28 Eric Botcazou <ebotcazou@adacore.com>
638 * gcc-interface/gigi.h (gnat_stabilize_reference): Adjust.
639 (rewrite_fn): Remove third parameter.
640 (type_is_padding_self_referential): New inline predicate.
641 (return_type_with_variable_size_p): Likewise.
642 * gcc-interface/decl.c (allocatable_size_p): More around.
643 (cannot_be_superflat_p): Rename into...
644 (cannot_be_superflat ): ...this.
645 (initial_value_needs_conversion): New predicate.
646 (gnat_to_gnu_entity): Invoke type_is_padding_self_referential,
647 initial_value_needs_conversion and adjust to above renaming.
648 For a renaming, force the materialization if the inner expression
649 is compound. Adjust calls to elaborate_reference and build a
650 compound expression if needed.
651 (struct er_dat): Add N field.
652 (elaborate_reference_1): Remove N parameter and adjust.
653 (elaborate_reference): Add INIT parameter and pass it in the call to
654 gnat_rewrite_reference. Adjust initial expression.
655 * gcc-interface/trans.c (Call_to_gnu): Treat renamings the same way as
656 regular object declarations when it comes to creating a temporary.
657 Adjust call to gnat_stabilize_reference and build a compound expression
658 if needed. Invoke return_type_with_variable_size_p.
659 (gnat_to_gnu): Invoke type_is_padding_self_referential. In case #4,
660 return a call to a function unmodified if it returns with variable size
661 and is also the initial expression in an object declaration.
662 * gcc-interface/utils2.c (build_binary_op) <INIT_EXPR>: Use the RHS'
663 type if it is a call to a function that returns with variable size.
664 (build_unary_op): Invoke type_is_padding_self_referential.
665 (gnat_stabilize_reference_1): Remove N parameter and adjust.
666 (gnat_stabilize_reference): Add INIT parameter and pass it in the call
667 to gnat_rewrite_reference.
668 (gnat_rewrite_reference): Remove N, add INIT parameter and adjust.
669 <COMPOUND_EXPR>: New case.
671 2015-05-28 Ed Schonberg <schonberg@adacore.com>
673 * sem_ch3.adb (Is_Visible_Component): Component is visible
674 in a derived type if inherited through an ancestor that has a
675 partial view of the original type holding the component, if the
676 full view of that original type is in scope.
677 * sem_util.ads (Get_Body_From_Stub): Works for all kinds of stubs.
679 2015-05-28 Bob Duff <duff@adacore.com>
681 * sem_util.adb (Requires_Transient_Scope): For definite untagged
682 subtypes, we should never have to use the secondary stack. This moves
683 toward that goal. But there are still cases that don't work.
684 Here, we move the check for Is_Definite first, but add a
685 special-purpose check for Has_Discrim_Dep_Array.
687 2015-05-28 Bob Duff <duff@adacore.com>
689 * sem_util.adb (Requires_Transient_Scope): Avoid returning
690 function results on the secondary stack in so many cases.
692 2015-05-28 Ed Schonberg <schonberg@adacore.com>
694 * sem_util.adb (Wrong_Type): In any instance, do not emit error
695 if type of expression is the partial view of the expected type.
697 2015-05-28 Ed Schonberg <schonberg@adacore.com>
699 * sem_res.adb (Resolve_Actuals): a) The replacement of formal
700 names in named associations only needs to be done within an
701 instance, on a call to a primitive of a formal derived type,
702 where the actual subprogram may have different formal names than
703 those of the primitive operation of the formal type.
704 b) Defaulted parameters must be taken into account when obtaining
705 the names of the formals of the actual subprogram being called.
707 2015-05-28 Robert Dewar <dewar@adacore.com>
709 * sem_ch13.adb, sem_disp.ads: Minor reformatting.
711 2015-05-28 Ed Schonberg <schonberg@adacore.com>
713 * sem_util.adb (Set_Debug_Info_Needed): For a private type
714 whose full view is itself a derived private type, set flag on
715 underlying full view as well, for proper gdb display.
717 2015-05-28 Bob Duff <duff@adacore.com>
719 * exp_tss.ads: Minor comment fix.
720 * exp_ch3.adb (Build_Array_Init_Proc, Build_Record_Init_Proc):
721 Inline init_procs when the type has controlled parts. Remove
722 obsolete comments about those init_procs -- init_procs for
723 such types are no longer complex. A typical init_proc just
724 initializes the 'Tag field, and calls the parent init_proc
725 (e.g. for Limited_Controlled), which calls the grandparent
726 (for Root_Controlled), which does nothing. This all boils down
727 to one instruction when inlined.
728 * exp_ch7.adb (Create_Finalizer): Inline the finalizer.
730 2015-05-28 Ed Schonberg <schonberg@adacore.com>
732 * sem_ch4.adb (Analyze_Selected_Component): If the type to use
733 is a derived type and is a generic actual, the selected component
734 appears within an instance body, and the check over the type
735 has failed, examine ancestor types for the desired component.
736 (Find_Component_In_Instance): If record type is a derived type,
737 examine all ancestors in order to locate desired component.
739 2015-05-27 H.J. Lu <hongjiu.lu@intel.com>
741 * gcc-interface/Makefile.in (TOOLS_LIBS): Add @NO_PIE_FLAG@.
743 2015-05-27 Eric Botcazou <ebotcazou@adacore.com>
745 * gcc-interface/trans.c (elaborate_all_entities): Do not elaborate an
746 incomplete type coming from a limited_with and whose non-limited view
747 comes from the main unit.
749 2015-05-27 Eric Botcazou <ebotcazou@adacore.com>
751 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Move down
752 code applying atomic checks to the object.
754 2015-05-27 Robert Dewar <dewar@adacore.com>
756 * sem_aux.adb: Minor rewording.
758 2015-05-27 Bob Duff <duff@adacore.com>
760 * exp_prag.adb (Expand_Pragma_Abort_Defer): Make
761 pragma Abort_Defer do nothing if Abort_Allowed is False.
763 2015-05-27 Arnaud Charlet <charlet@adacore.com>
765 * exp_ch9.adb, sem_util.adb, sem_util.ads, s-stposu.adb, s-spsufi.ads,
766 sem_elab.ads, g-comlin.ads, errout.ads, exp_ch6.adb, sem_ch4.adb,
767 opt.ads, s-bignum.adb, output.ads, sem_ch13.adb, erroutc.ads,
768 sem_disp.ads, exp_ch3.adb: Minor fixes of duplicate words in comments.
770 2015-05-27 Doug Rupp <rupp@adacore.com>
772 * adaint.c (__gnat_tmp_name) [vxworks]: Robustify and use for rtp as
775 2015-05-27 Pierre-Marie de Rodat <derodat@adacore.com>
777 * par_sco.adb (Process_Decision): Store sloc to
778 condition/pragmas SCOs associations into a temporary table before
779 moving them to the SCO_Raw_Hash_Table so that we can back them
780 out just like we do for SCO entries that are simple decisions
781 in an expression context.
783 2015-05-27 Ed Schonberg <schonberg@adacore.com>
785 * sem_ch6.adb (Process_Formals): A non-private formal type that
786 is a limited view does not have a list of private dependents.
788 2015-05-27 Ed Schonberg <schonberg@adacore.com>
790 * exp_ch5.adb (Expand_N_Case_Statement): If the expression in
791 the case statement is a compile-time known value, we look for a
792 corresponding alternative to optimize the case statement into a
793 single case. If the type has a static predicate and the expression
794 does not satisfy the predicate, there is no legal alternative and
795 this optimization is not applicable. Excecution is erroneous,
796 or else if assertions are enabled, an exception will be raised
797 earlier, at the point the expression is elaborated.
799 2015-05-27 Robert Dewar <dewar@adacore.com>
801 * sem_elab.adb (Check_Internal_Call_Continue): Suppress
802 warning on Finalize, Adjust, or Initialize if type involved has
805 2015-05-27 Ed Schonberg <schonberg@adacore.com>
807 * sem_aux.adb, sem_aux.ads (First_Discriminant): Return empty when
808 applied to a type with no known discriminants.
810 2015-05-26 Robert Dewar <dewar@adacore.com>
812 * errout.ads, sem_ch4.adb, sem_ch6.adb: Minor reformatting.
814 2015-05-26 Bob Duff <duff@adacore.com>
816 * sem_elab.adb (Check_A_Call): In the case where we're
817 calling something in an instance of a generic package that is
818 within this same unit (as the call), make sure we treat it
819 as a call to an entity within the same unit. That is, call
820 Check_Internal_Call, rather than putting "Elaborate_All(X)"
821 on X, which would necessarily result in an elaboration cycle in
822 static-elaboration mode.
824 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
826 * freeze.ads (Is_Atomic_VFA_Aggregate): Adjust profile.
827 * freeze.adb (Is_Atomic_VFA_Aggregate): Change Entity
828 parameter into Node parameter and remove Type parameter.
829 Look at Is_Atomic_Or_VFA both on the type and on the object.
830 (Freeze_Entity): Adjust call to Is_Atomic_VFA_Aggregate.
831 * exp_aggr.adb (Expand_Record_Aggregate): Likewise.
832 (Process_Atomic_Independent_Shared_Volatile): Remove code
833 propagating Atomic or VFA from object to locally-defined type.
835 2015-05-26 Bob Duff <duff@adacore.com>
837 * exp_ch7.adb: Minor comment fix.
839 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
841 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Min/Attr_Max>: Do not
842 bother about NaN's if Machine_Overflows is true.
844 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
846 * gcc-interface/trans.c (gnat_to_gnu) <N_Object_Declaration>: Really
847 force evaluation of the expression, if any, when the object has its
848 elaboration delayed. Do not create a variable at global level.
850 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
852 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Machine>: Do not apply
853 extra-precision trick to literals. Build SAVE_EXPR manually.
855 * gcc-interface/misc.c (enumerate_modes): Add bypass for x86/x86-64.
857 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
859 * gcc-interface/ada-tree.h (DECL_GLOBAL_NONCONSTANT_RENAMING_P): Delete
860 (DECL_RENAMED_OBJECT): Adjust comment.
861 * gcc-interface/gigi.h (record_global_nonconstant_renaming): Delete.
862 (invalidate_global_nonconstant_renamings): Likewise.
863 (gnat_constant_reference_p): Likewise.
864 (rewrite_fn): New function type.
865 (gnat_rewrite_reference): Declare.
866 (call_is_atomic_load): New inline predicate.
867 * gcc-interface/decl.c (elaborate_reference_1): New function.
868 (elaborate_reference): Likewise.
869 (gnat_to_gnu_entity): Call elaborate_reference to elaborate renamings
870 and simplify associated code. Set const_flag to true consistently in
871 conjunction with used_by_ref.
872 * gcc-interface/trans.c (Identifier_to_gnu): Always replace renaming
873 pointers by renamed objects.
874 (outer_atomic_access_required_p): Deal with renamings.
875 (Compilation_Unit_to_gnu): Do not call
876 invalidate_global_nonconstant_renamings.
877 (gnat_to_gnu) <N_Object_Renaming_Declaration>: Adjust comment.
878 (gnat_gimplify_expr): Deal with atomic loads.
879 * gcc-interface/utils.c (global_nonconstant_renamings): Delete.
880 (destroy_gnat_utils): Do not call
881 invalidate_global_nonconstant_renamings.
882 (record_global_nonconstant_renaming): Delete.
883 (invalidate_global_nonconstant_renamings): Likewise.
884 * gcc-interface/utils2.c (call_is_atomic_load): Move to gigi.h.
885 (build_load_modify_store): Build a copy of the destination.
886 (gnat_stabilize_reference_1): Adjust.
887 (gnat_stabilize_reference): Call gnat_stabilize_reference_1 through
888 gnat_rewrite_reference and move bulk of code to...
889 (gnat_rewrite_reference): ...here. New global function.
890 (gnat_constant_reference_p): Delete.
892 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
894 * gcc-interface/gigi.h (gnat_stabilize_reference): Adjust prototype.
895 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not rely on const_flag
896 to detect constant renamings. Be prepared for specific pattern of
897 renamed object based on function calls. Create a constant object
898 for the renaming of a NULL_EXPR or of a CONSTRUCTOR. Adjust calls
899 to gnat_stabilize_reference and tidy up. Remove redundant tests.
900 (elaborate_expression_1): Remove obsolete test and tidy up.
901 * gcc-interface/trans.c (Call_to_gnu): Do not stabilize In/Out or Out
902 parameters passed by reference.
903 (gnat_to_gnu) <N_Selected_Component>: Remove redundant protection again
905 Use gnat_protect_expr instead of gnat_stabilize_reference for general
906 protection against side-effects.
907 * gcc-interface/utils2.c (gnat_stable_expr_p): New predicate.
908 (gnat_save_expr): Invoke it.
909 (gnat_protect_expr): Likewise.
910 (gnat_stabilize_reference_1): Likewise. Remove useless propagation
912 (gnat_stabilize_reference): Remove parameter and adjust throughout.
913 Delete ADDR_EXDR, COMPOUND_EXPR and CONSTRUCTOR cases.
914 Restrict CALL_EXPR case to atomic loads and tweak ERROR_MARK case.
916 2015-05-26 Ed Schonberg <schonberg@adacore.com>
918 * sinfo.ads: Minor reformatting.
919 * sem_aux.ads: Clarify use of First_Discriminant.
920 * sem_ch4.adb (Analyze_Explicit_Dereference): The use of a limited
921 view is replaced with the non-limited view in an instance body,
922 where the enclosing unit must have a regular with_clause on the
924 * sem_ch12.adb (Install_Body): Freeze instantation after its
925 body. Remove useless freeze nodes for incomplete actuals to
926 prevent multiple generation of internal operations.
927 (Instantiate_Package_Body): Set sloc of body appropriately when
928 there are incomplete actuals and the instance body is placed in
929 the body of the enclosing unit.
930 * errout.ads: Consistent punctuation, better alignment and trivial
932 * err_vars.ads: Fix typo.
934 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
936 * sem_ch8.adb (Analyze_Object_Renaming): Lift restriction on
937 components of Volatile_Full_Access objects.
939 2015-05-26 Ed Schonberg <schonberg@adacore.com>
941 * sem_ch6.adb (Is_Non_Overriding_Operation,
942 Get_Generic_Parent_Type): Handle properly the case of a derived
943 scalar type by using the first subtype rather than its generated
946 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
948 * einfo.adb (Write_Field17_Name): Move E_Incomplete_Subtype
950 (Write_Field19_Name): ...here.
952 2015-05-26 Ed Schonberg <schonberg@adacore.com>
954 * sem_ch13.adb: sem_ch13.adb (Add_Predicates): Undo analysis
955 of original expression in ASIS mode: does not solve the ASIS
956 problem of a usable type information, and crashes the back-end
957 when performing type annotations.
959 2015-05-26 Robert Dewar <dewar@adacore.com>
961 * sem_disp.adb (Inherited_Subprograms): Add One_Only parameter.
962 (Is_Overriding_Subprogram): Use One_Only_Parameter.
963 * sem_disp.ads (Inherited_Subprograms): Add One_Only parameter.
965 2015-05-26 Robert Dewar <dewar@adacore.com>
967 * exp_prag.adb, sem_ch3.adb, sem_ch5.adb, exp_ch11.adb, ghost.adb,
968 exp_ch6.adb, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb, sem_ch13.adb,
969 exp_ch3.adb: Minor reformatting.
971 2015-05-26 Bob Duff <duff@adacore.com>
973 * treepr.adb: Minor improvement to debugging routines (pp, pn)
974 robustness. Rearrange the code so passing a nonexistent Node_Id
975 prints "No such node" rather than crashing, and causing gdb to
976 generate confusing messages.
978 2015-05-26 Gary Dismukes <dismukes@adacore.com>
980 * sem_util.adb: Minor typo fix.
982 2015-05-26 Yannick Moy <moy@adacore.com>
984 * sem_aux.adb (Subprogram_Body_Entity): Deal with subprogram stubs.
986 2015-05-26 Hristian Kirtchev <kirtchev@adacore.com>
988 * exp_ch3.adb (Expand_N_Full_Type_Declaration): Capture, set and
989 restore the Ghost mode.
990 (Expand_N_Object_Declaration): Capture, set and restore the Ghost mode.
991 (Freeze_Type): Update the call to Set_Ghost_Mode.
992 (Restore_Globals): New routine.
993 * exp_ch5.adb Add with and use clauses for Ghost.
994 (Expand_N_Assignment_Statement): Capture, set and restore the
996 (Restore_Globals): New routine.
997 * exp_ch6.adb Add with and use clauses for Ghost.
998 (Expand_N_Procedure_Call_Statement): Capture, set and
999 restore the Ghost mode.
1000 (Expand_N_Subprogram_Body):
1001 Code cleanup. Capture, set and restore the Ghost mode.
1002 (Expand_N_Subprogram_Declaration): Capture, set and restore the
1004 (Restore_Globals): New routine.
1005 * exp_ch7.adb Add with and use clauses for Ghost.
1006 (Expand_N_Package_Body): Capture, set and restore the Ghost mode.
1007 (Expand_N_Package_Declaration): Capture, set and restore the
1009 (Wrap_HSS_In_Block): Create a proper identifier for the block.
1010 * exp_ch8.adb Add with and use clauses for Ghost.
1011 (Expand_N_Exception_Renaming_Declaration): Code
1012 cleanup. Capture, set and restore the Ghost mode.
1013 (Expand_N_Object_Renaming_Declaration): Capture, set and restore
1015 (Expand_N_Package_Renaming_Declaration): Capture, set and restore the
1017 (Expand_N_Subprogram_Renaming_Declaration): Capture, set and
1018 restore the Ghost mode.
1019 * exp_ch11.adb (Expand_N_Exception_Declaration): Code
1020 cleanup. Capture, set and restore the Ghost mode.
1021 * exp_disp.adb (Make_DT): Update the call to Set_Ghost_Mode. Do
1022 not initialize the dispatch table slot of a Ghost subprogram.
1023 * exp_prag.adb Add with and use clauses for Ghost.
1024 (Expand_Pragma_Check): Capture, set and restore the Ghost mode.
1025 (Expand_Pragma_Contract_Cases): Capture, set and restore the
1027 (Expand_Pragma_Initial_Condition): Capture, set and
1028 restore the Ghost mode.
1029 (Expand_Pragma_Loop_Variant): Capture,
1030 set and restore the Ghost mode.
1031 (Restore_Globals): New routine.
1032 * exp_util.adb Add with and use clauses for Ghost.
1033 (Make_Predicate_Call): Code cleanup. Capture, set and restore
1035 (Restore_Globals): New routine.
1036 * freeze.adb (Freeze_Entity): Code cleanup. Update the call
1038 * ghost.adb Add with and use clause for Sem_Prag.
1039 (Check_Ghost_Completion): Code cleanup.
1040 (Check_Ghost_Overriding): New routine.
1041 (Check_Ghost_Policy): Code cleanup.
1042 (Ghost_Entity): New routine.
1043 (Is_Ghost_Declaration): Removed.
1044 (Is_Ghost_Statement_Or_Pragma): Removed.
1045 (Is_OK_Context): Reimplemented.
1046 (Is_OK_Declaration): New routine.
1047 (Is_OK_Pragma): New routine.
1048 (Is_OK_Statement): New routine.
1049 (Mark_Full_View_As_Ghost): New routine.
1050 (Mark_Pragma_As_Ghost): New routine.
1051 (Mark_Renaming_As_Ghost): New routine.
1052 (Propagate_Ignored_Ghost_Code): Update the comment on usage.
1053 (Set_From_Entity): New routine.
1054 (Set_From_Policy): New routine.
1055 (Set_Ghost_Mode): This routine now handles pragmas and freeze nodes.
1056 (Set_Ghost_Mode_For_Freeze): Removed.
1057 (Set_Ghost_Mode_From_Entity): New routine.
1058 (Set_Ghost_Mode_From_Policy): Removed.
1059 * ghost.ads (Check_Ghost_Overriding): New routine.
1060 (Mark_Full_View_As_Ghost): New routine.
1061 (Mark_Pragma_As_Ghost): New routine.
1062 (Mark_Renaming_As_Ghost): New routine.
1063 (Set_Ghost_Mode): Update the parameter profile. Update the
1065 (Set_Ghost_Mode_For_Freeze): Removed.
1066 (Set_Ghost_Mode_From_Entity): New routine.
1067 * sem_ch3.adb (Analyze_Full_Type_Declaration):
1068 Capture and restore the Ghost mode. Mark a type
1069 as Ghost regardless of whether it comes from source.
1070 (Analyze_Incomplete_Type_Decl): Capture, set and restore the
1072 (Analyze_Number_Declaration): Capture and restore the Ghost mode.
1073 (Analyze_Object_Declaration): Capture and restore the Ghost mode.
1074 (Analyze_Private_Extension_Declaration): Capture and
1075 restore the Ghost mode.
1076 (Analyze_Subtype_Declaration): Capture and restore the Ghost mode.
1077 (Process_Full_View): The full view inherits all Ghost-related
1078 attributes from the private view.
1079 (Restore_Globals): New routine.
1080 * sem_ch5.adb (Analyze_Assignment): Capture and restore the
1082 (Restore_Globals): New routine.
1083 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration):
1084 Code cleanup. Capture and restore the Ghost mode. Mark a
1085 subprogram as Ghost regarless of whether it comes from source.
1086 (Analyze_Procedure_Call): Capture and restore the Ghost mode.
1087 (Analyze_Subprogram_Body_Helper): Capture and restore the Ghost mode.
1088 (Analyze_Subprogram_Declaration): Capture and restore the Ghost mode.
1089 (New_Overloaded_Entity): Ensure that a
1090 parent subprogram and an overriding subprogram have compatible
1092 * sem_ch7.adb (Analyze_Package_Body_Helper): Capture and restore
1094 (Analyze_Package_Declaration): Capture and
1095 restore the Ghost mode. Mark a package as Ghost when it is
1096 declared in a Ghost region.
1097 (Analyze_Private_Type_Declaration): Capture and restore the Ghost mode.
1098 (Restore_Globals): New routine.
1099 * sem_ch8.adb (Analyze_Exception_Renaming): Code
1100 reformatting. Capture and restore the Ghost mode. A renaming
1101 becomes Ghost when its name references a Ghost entity.
1102 (Analyze_Generic_Renaming): Capture and restore the Ghost mode. A
1103 renaming becomes Ghost when its name references a Ghost entity.
1104 (Analyze_Object_Renaming): Capture and restore the Ghost mode. A
1105 renaming becomes Ghost when its name references a Ghost entity.
1106 (Analyze_Package_Renaming): Capture and restore the Ghost mode. A
1107 renaming becomes Ghost when its name references a Ghost entity.
1108 (Analyze_Subprogram_Renaming): Capture and restore the Ghost
1109 mode. A renaming becomes Ghost when its name references a
1111 * sem_ch11.adb (Analyze_Exception_Declaration): Capture, set
1112 and restore the Ghost mode.
1113 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Capture and
1114 restore the Ghost mode.
1115 (Analyze_Generic_Subprogram_Declaration):
1116 Capture and restore the Ghost mode.
1117 * sem_ch13.adb Add with and use clauses for Ghost.
1118 (Add_Invariant): New routine.
1119 (Add_Invariants): Factor out code.
1120 (Add_Predicate): New routine.
1121 (Add_Predicates): Factor out code.
1122 (Build_Invariant_Procedure_Declaration): Code cleanup. Capture,
1123 set and restore the Ghost mode.
1124 (Build_Invariant_Procedure): Code cleanup.
1125 (Build_Predicate_Functions): Capture, set and
1126 restore the Ghost mode. Mark the generated functions as Ghost.
1127 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
1128 Capture, set and restore the Ghost mode.
1129 (Analyze_External_Property_In_Decl_Part): Capture, set and restore
1131 (Analyze_Initial_Condition_In_Decl_Part):
1132 Capture, set and restore the Ghost mode.
1134 Code cleanup. Capture, set and restore the Ghost mode. Flag
1135 pragmas Linker_Section, No_Return, Unmodified, Unreferenced and
1136 Unreferenced_Objects as illegal when it applies to both Ghost
1137 and living arguments. Pragma Ghost cannot apply to synchronized
1139 (Check_Kind): Moved to the spec of Sem_Prag.
1140 (Process_Inline): Flag the pragma as illegal when it applies to
1141 both Ghost and living arguments.
1142 (Restore_Globals): New routine.
1143 * sem_prag.ads Add pragma Default_Initial_Condition
1144 to table Assertion_Expression_Pragma. Add new table
1145 Is_Aspect_Specifying_Pragma.
1146 (Check_Kind): Moved from body of Sem_Prag.
1147 * sem_util.adb Add with and use clauses for Ghost.
1148 (Build_Default_Init_Cond_Procedure_Body): Capture, set and restore
1150 (Build_Default_Init_Cond_Procedure_Declaration):
1151 Capture, set and restore the Ghost mode. Mark the default
1152 initial condition procedure as Ghost when it is declared
1154 (Is_Renaming_Declaration): New routine.
1155 (Policy_In_List): Account for the single argument version of
1157 * sem_util.ads (Is_Renaming_Declaration): New routine.
1158 * sinfo.adb (Is_Ghost_Pragma): New routine.
1159 (Set_Is_Ghost_Pragma): New routine.
1160 * sinfo.ads New attribute Is_Ghost_Pragma.
1161 (Is_Ghost_Pragma): New routine along with pragma Inline.
1162 (Set_Is_Ghost_Pragma): New routine along with pragma Inline.
1164 2015-05-26 Robert Dewar <dewar@adacore.com>
1166 * sem_ch3.adb, sem_aux.adb, sem_aux.ads, exp_ch6.adb, sprint.adb:
1169 2015-05-26 Gary Dismukes <dismukes@adacore.com>
1171 * gnat1drv.adb, targparm.adb, targparm.ads, restrict.adb: Minor
1172 reformatting and typo fixes in comments.
1174 2015-05-26 Ed Schonberg <schonberg@adacore.com>
1176 * sem_ch7.adb (Swap_Private_Dependets): Set visibility of
1177 the two views of a private dependent in two separate steps,
1178 to ensure proper visibility in parent units analyzed for inlining.
1180 2015-05-26 Yannick Moy <moy@adacore.com>
1182 * sem_aux.adb, sem_aux.ads (Get_Low_Bound): Use Type_Low_Bound.
1183 (Package_Body, Package_Spec): New queries moved
1184 here from GNATprove.
1185 (Package_Specification): Simplify query to remove use of loop.
1186 * sem_util.adb, sem_util.ads (Enclosing_Declaration,
1187 Enclosing_Package_Or_Subprogram, Is_Attribute_Update): New
1188 queries moved here from GNATprove.
1190 2015-05-26 Bob Duff <duff@adacore.com>
1192 * einfo.adb, einfo.ads, sprint.adb, lib-xref.ads: Minor cleanup: Remove
1193 obsolete Entity_Kinds E_String_Type and E_String_Subtype. Update
1194 redundant assertions.
1196 2015-05-26 Gary Dismukes <dismukes@adacore.com>
1198 * sem_util.adb, sem_util.ads, sem_ch13.adb: Minor typo fixes.
1200 2015-05-26 Doug Rupp <rupp@adacore.com>
1202 * init.c [vxworks]: Refine previous checkin.
1204 2015-05-26 Robert Dewar <dewar@adacore.com>
1206 * exp_ch4.adb (Wrap_MA): New function.
1207 (Expand_N_Op_Expon): Use Wrap_MA.
1209 2015-05-26 Bob Duff <duff@adacore.com>
1211 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
1212 Do not use secondary stack to return limited records with
1213 defaulted discriminants. This is an efficiency improvement.
1214 * exp_ch6.adb, exp_dist.adb, sem_attr.adb, sem_aux.adb, sem_aux.ads,
1215 sem_ch12.adb, sem_ch3.adb, sem_ch4.adb, sem_ch6.adb, sem_ch7.adb,
1216 sem_util.adb: Change the sense of Is_Indefinite_Subtype to be
1217 Is_Definite_Subtype. This is an improvement to readability (the double
1218 negative in "not Is_Indefinite_Subtype" was slightly confusing). Also
1219 disallow passing non-[sub]type entities, an unnecessary and slightly
1220 bug-prone flexibility.
1222 2015-05-26 Robert Dewar <dewar@adacore.com>
1224 * sem_aggr.adb (Resolve_Array_Aggregate): Defend against
1226 * debug.adb: Document -gnatd.k.
1227 * erroutc.adb (Set_Msg_Insertion_Line_Number): Implement -gnatd.k.
1229 2015-05-26 Robert Dewar <dewar@adacore.com>
1231 * gnat1drv.adb (Gnat1drv): Provide new arguments for
1232 Get_Target_Parameters.
1233 * restrict.adb (Set_Restriction_No_Specification_Of_Aspect):
1235 (Set_Restriction_No_Use_Of_Attribute): new procedure.
1236 * restrict.ads (Set_Restriction_No_Specification_Of_Aspect):
1238 (Set_Restriction_No_Use_Of_Attribute): new procedure.
1239 * s-rident.ads (Integer_Parameter_Restrictions): New subtype.
1240 * targparm.adb (Get_Target_Parameters): Allow new restriction
1241 pragmas No_Specification_Of_Aspect No_Use_Of_Attribute
1243 * targparm.ads: New parameters for Get_Target_Parameters.
1244 * tbuild.adb (Set_NOD): New name for Set_RND.
1245 (Set_NSA): New procedure.
1246 (Set_NUA): New procedure.
1247 (Set_NUP): New procedure.
1248 * tbuild.ads (Make_SC): Minor reformatting.
1249 (Set_NOD): New name for Set_RND.
1250 (Set_NSA, Set_NUA, Set_NUP): New procedure.
1252 2015-05-26 Ed Schonberg <schonberg@adacore.com>
1254 * a-stwise.adb (Find_Token): If source'first is not positive,
1255 an exception must be raised, as specified by RM 2005 A.4.3
1256 (68/1). This must be checked explicitly, given that run-time
1257 files are normally compiled without constraint checks.
1258 * a-stzsea.adb (Find_Token): Ditto.
1260 2015-05-26 Ed Schonberg <schonberg@adacore.com>
1262 * sem_util.ads sem_util.adb (Is_Current_Instance): New predicate
1263 to fully implement RM 8.6 (17/3). which earlier only applied
1264 to synchronized types. Used to preanalyze aspects that include
1265 current instances of types, such as Predicate and Invariant.
1266 * sem_res.adb (Resolve_Entity_Name): Use Is_Current_Instance.
1267 * sem_ch13.adb (Add_Predicates): In ASIS mode, preserve original
1268 expression of aspect and analyze it to provide proper type
1271 2015-05-26 Robert Dewar <dewar@adacore.com>
1273 * rtsfind.ads: Add entries for RE_Exn[_Long]_Float.
1274 * s-exnllf.adb (Exn_Float): New function.
1275 (Exn_Long_Float): New function.
1276 (Exn_Long_Long_Float): Rewritten interface.
1277 (Exp): New name for what used to be Exn_Long_Long_Float.
1278 * s-exnllf.ads (Exn_Float): New function.
1279 (Exn_Long_Float): New function.
1281 2015-05-26 Ed Schonberg <schonberg@adacore.com>
1283 * sem_ch8.adb (Find_Selected_Component): Do not emit an error
1284 on a selected component when the prefix is a type name that is
1286 * einfo.ads: Minor grammar fix.
1288 2015-05-26 Doug Rupp <rupp@adacore.com>
1290 * init.c [vxworks] (sysLib.h): Only for x86.
1292 2015-05-26 Doug Rupp <rupp@adacore.com>
1294 * init-vxsim.c (CPU): define as __VXSIM_CPU__
1295 * sigtramp-vxworks-vxsim.c (CPU): Likewise.
1296 sigtramp-vxworks-target.inc: Add check for SIMLINUX.
1297 * sigtramp.h: Likewise.
1299 2015-05-26 Robert Dewar <dewar@adacore.com>
1301 * sem_aux.adb, sem_disp.adb, sem_util.ads: Add comment.
1302 * sem_util.adb: Minor reformatting
1304 2015-05-26 Yannick Moy <moy@adacore.com>
1306 * inline.adb (Has_Initialized_Type): Adapt to new names.
1307 * sem_aux.adb, sem_aux.ads (Get_Low_Bound, Number_Components,
1308 Subprogram_Body, Subprogram_Body_Entity, Subprogram_Spec,
1309 Subprogram_Specification): New query functions used in GNATprove.
1310 * sem_disp.adb, sem_disp.ads (Is_Overriding_Subprogram): New
1311 query functions used in GNATprove.
1312 * sem_util.adb, sem_util.adso (Enclosing_Lib_Unit_Node,
1313 Get_Cursor_Type, Get_Return_Object, Get_User_Defined_Eq,
1314 Is_Double_Precision_Floating_Point_Type,
1315 Is_Single_Precision_Floating_Point_Type): New query functions
1318 2015-05-26 Bob Duff <duff@adacore.com>
1320 * s-rpc.ads (Partition_ID): Increase maximum Partition_ID to
1322 * a-except-2005.adb, a-except-2005.ads, a-except.adb,
1323 a-except.ads, a-exexda.adb, a-exstat.adb: Minor comment fixes.
1325 2015-05-26 Robert Dewar <dewar@adacore.com>
1327 * sinfo.adb: Minor comment addition.
1328 * einfo.adb: Minor whitespace and punctuation fix.
1329 * sem_util.adb: Minor editing of comments.
1331 2015-05-26 Ed Schonberg <schonberg@adacore.com>
1333 * sem_ch7.adb (Install_Private_Declarations,
1334 Swap_Private_Dependents): Ensure that both views of the dependent
1335 subtype are immediately visible if we are within their scope. This
1336 may be needed when a procedure body is both the parent of an
1337 instantiated child unit, and is itself used to inline a local
1340 2015-05-26 Gary Dismukes <dismukes@adacore.com>
1342 * exp_prag.adb, gnat1drv.adb: Minor reformatting.
1344 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
1346 * exp_ch4.adb (Expand_N_Indexed_Component): In the circuit
1347 detecting exceptions to the rewriting, deal with implicit
1348 dereferences in the selected component case.
1350 2015-05-26 Bob Duff <duff@adacore.com>
1352 * sem_ch13.adb (Analyze_One_Aspect): Do not
1353 require the expression of the Disable_Controlled aspect to be
1354 static in a generic template, because 'Enabled is not known
1357 2015-05-26 Doug Rupp <rupp@adacore.com>
1359 * init-vxsim.c: New file for vxsim ZCX
1360 * sigtramp-vxworks-vxsim.c: Likewise.
1361 * sigtramp-vxworks.c: Factor out target dependent bits into ...
1362 * sigtramp-vxworks-target.inc: ... here.
1363 * sigtramp.h: Add vxsim zcx protos.
1364 * init.c [vxworks...] (sysLib.h): Include.
1365 (__gnat_map_signal): Make global.
1366 [...i386] (__gnat_error_handler): Call __gnat_vxsim_error_handler if
1368 [...i386] (__gnat_install_handler): Test if on vxsim.
1370 2015-05-26 Ed Schonberg <schonberg@adacore.com>
1372 * sem_ch5.adb (Analyze_Iterator_Specification): For an element
1373 iterator over an array, if the component is aliased, the loop
1374 variable is aliased as well.
1376 2015-05-26 Ed Schonberg <schonberg@adacore.com>
1378 * exp_ch6.adb (Expand_Actuals): For a function call with in-out
1379 parameters that is rewritten as an expression_with_actions,
1380 we preserve the original function call node for further use by
1381 the caller (typically Expand_Call). In the presence of validity
1382 checks, that function call, though it is labelled Analyzed to
1383 prevent an infinite recursion, may be rewritten as a temporary
1384 by Remove_Side_Effects. Ensure that the caller has access to
1385 the original function call to continue expansion.
1386 * atree.ads: Minor typo in comment.
1388 2015-05-26 Javier Miranda <miranda@adacore.com>
1390 * sem_util.adb (Check_Function_Writable_Actuals):
1391 Add missing support to check the violation of writable actuals
1392 in array aggregates that have a nonstatic range.
1394 2015-05-26 Hristian Kirtchev <kirtchev@adacore.com>
1396 * exp_ch6.adb (Process_Contract_Cases_For): Update the call to
1397 Expand_Pragma_Contract_Cases.
1398 * exp_prag.ads, exp_prag.adb (Expand_Contract_Cases): Rename to
1399 Expand_Pragma_Contract_Cases.
1400 * sem_ch13.adb (Add_Invariants): Use the original aspect name
1401 when creating the arguments of pragma Check. This ensures that
1402 'Class is properly recognized and handled.
1404 2015-05-26 Arnaud Charlet <charlet@adacore.com>
1406 * gnat1drv.adb: Minor adjustments.
1407 (Adjust_Global_Switches): Disable some related flags in CodePeer mode.
1408 * sem_ch4.adb (Has_Arbitrary_Evaluation_Order,
1409 Stop_Subtree_Climbind): Code cleanup.
1410 * einfo.ads: Minor comment change.
1412 2015-05-26 Javier Miranda <miranda@adacore.com>
1414 * sem_aggr.adb (Resolve_Aggregate, Resolve_Extension_Aggregate):
1416 * sem_ch3.adb (Build_Derived_Record_Type,
1417 Record_Type_Declaration): Code cleanup.
1418 * sem_ch4.adb (Has_Arbitrary_Evaluation_Order,
1419 Stop_Subtree_Climbind): Tables which speed up the identification
1420 of dangerous calls to Ada 2012 functions with writable actuals
1422 (Analyze_Arithmetic_Op, Analyze_Call, Analyze_Comparison_Op,
1423 Analyze_Equality_Op, Analyze_Logical_Op, Analyze_Membership_Op,
1424 Analyze_Range): Code cleanup.
1425 (Is_Arbitrary_Evaluation_Order_Construct): Removed.
1426 (Check_Writable_Actuals): Code cleanup using the added tables.
1427 * sem_util.adb (Check_Function_Writable_Actuals): Return
1428 immediately if the node does not have the flag Check_Actuals
1431 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
1433 * exp_ch6.adb (Add_Call_By_Copy_Code): Remove restrictive
1434 condition in the detection of the effects of Remove_Side_Effects.
1435 * exp_util.ads (Remove_Side_Effects): Add general and historical note.
1436 * exp_util.adb (Is_Name_Reference): New predicate.
1437 (Remove_Side_Effects): Use it in lieu of Is_Object_Reference
1438 in order to decide whether to use the renaming to capture the
1439 side effects of the subexpression.
1440 (Side_Effect_Free): Remove obsolete test.
1442 2015-05-26 Robert Dewar <dewar@adacore.com>
1444 * aspects.ads, aspects.adb: Add aspect Disable_Controlled.
1445 * einfo.ads, einfo.adb (Disable_Controlled): New flag.
1446 (Is_Controlled_Active): New function.
1447 * exp_ch3.adb (Expand_Freeze_Record_Type): Use
1448 Is_Controlled_Active.
1449 * exp_util.adb (Needs_Finalization): Finalization not needed
1450 if Disable_Controlled set.
1451 * freeze.adb (Freeze_Array_Type): Do not set
1452 Has_Controlled_Component if the component has Disable_Controlled.
1453 (Freeze_Record_Type): ditto.
1454 * sem_ch13.adb (Decorate): Minor reformatting.
1455 (Analyze_Aspect_Specifications): Implement Disable_Controlled.
1456 * sem_ch3.adb (Analyze_Object_Declaration): Handle
1458 (Array_Type_Declaration): ditto.
1459 (Build_Derived_Private_Type): ditto.
1460 (Build_Derived_Type): ditto.
1461 (Record_Type_Definition): ditto.
1462 * snames.ads-tmpl: Add Name_Disable_Controlled.
1464 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
1466 * exp_ch6.adb (Expand_Actuals): Use a constant declaration instead
1467 of a renaming to capture the return value of a function call.
1468 (Expand_Simple_Function_Return): Call Remove_Side_Effects
1469 instead of removing side effects manually before the call to
1472 2015-05-26 Robert Dewar <dewar@adacore.com>
1474 * exp_ch4.adb (Expand_N_Op_Expon): Deal with problem of wrong
1475 order in calling Duplicate_Subexpr.
1476 * einfo.ads: Fix documentation of Object/Value size for scalar types.
1478 2015-05-26 Ed Schonberg <schonberg@adacore.com>
1480 * exp_aggr.adb (Build_Array_Aggr_Code, Gen_Assign):
1481 If a component is default-initialized and its type has an
1482 invariant procedure, insert an invariant test after code for
1483 default-initialization of the component.
1485 2015-05-26 Gary Dismukes <dismukes@adacore.com>
1487 * einfo.ads, sem_util.adb, sem_ch4.adb: Minor reformatting.
1489 2015-05-26 Robert Dewar <dewar@adacore.com>
1491 * exp_unst.adb, exp_unst.ads: Change to using Subps table index for
1492 making AREC entity names unique.
1494 2015-05-26 Ed Schonberg <schonberg@adacore.com>
1496 * sem_cat.adb (Has_Stream_Attribute_Definition): If the type
1497 has aspect specifications, examine the corresponding list of
1498 representation items to determine whether there is a visible
1499 stream operation. The attribute definition clause generated from
1500 the aspect will be inserted at the freeze point of the type,
1501 which may be in the private part and not directly visible,
1502 but the aspect makes the operation available to a client.
1504 2015-05-26 Robert Dewar <dewar@adacore.com>
1506 * sem_util.adb: Minor code reorganization.
1507 * sem_ch6.adb: Minor reformatting.
1509 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
1511 * gcc-interface/utils.c (maybe_pad_type): Do not apply adjustment to
1512 original size for elementary types before issuing the size warning.
1514 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
1516 * get_targ.adb (C_Get_Float_Words_BE): Adjust import name.
1517 (C_Get_Words_BE): Likewise.
1518 (C_Get_Bytes_BE): Likewise.
1519 (C_Get_Bits_BE): Likewise.
1520 (Width_From_Size): Remove superfluous space.
1521 * gcc-interface/targtyps.c (get_float_words_be): Rename into...
1522 (get_target_float_words_be): ...this.
1523 (get_words_be): Rename into...
1524 (get_target_words_be): ...this.
1525 (get_bytes_be): Rename into...
1526 (get_target_bytes_be): ...this.
1527 (get_bits_be): Rename into...
1528 (get_target_bits_be): ...this.
1529 * gcc-interface/gigi.h (standard_datatypes): Remove ADT_ptr_void_type.
1530 (ptr_void_type_node): Delete.
1531 (get_target_float_size): Likewise.
1532 (get_target_double_size): Likewise.
1533 (get_target_long_double_size): Likewise.
1534 (get_float_words_be): Likewise.
1535 (get_words_be): Likewise.
1536 (get_bytes_be): Likewise.
1537 (get_bits_be): Likewise.
1538 (get_target_float_words_be): Declare.
1539 (get_target_words_be): Likewise.
1540 (get_target_bytes_be): Likewise.
1541 (get_target_bits_be): Likewise.
1542 * gcc-interface/decl.c (gnat_to_gnu_entity): Replace ptr_void_type_node
1544 (intrin_return_compatible_p): Likewise.
1545 * gcc-interface/trans.c (gigi): Likewise.
1546 * gcc-interface/utils2.c (maybe_wrap_malloc): Likewise.
1547 (maybe_wrap_free): Likewise.
1548 * gcc-interface/utils.c (maybe_pad_type): Remove superfluous space.
1549 * gcc-interface/misc.c (gnat_init): Do not set ptr_void_type_node.
1551 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
1553 * gcc-interface/decl.c (elaborate_expression): Take a const string
1554 suffix instead of a tree.
1555 (elaborate_expression_1): Likewise.
1556 (elaborate_expression_2): Likewise.
1557 (gnat_to_gnu_entity): Adjust to above changes.
1558 (build_subst_list): Likewise.
1559 (get_entity_char): New static function.
1561 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
1563 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: Move around.
1564 <E_Exception>: Merge with E_Variable case.
1565 <E_Variable>: Remove 'object' label.
1567 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
1569 * gcc-interface/decl.c (gnat_to_gnu_entity): Minor tweak.
1570 * gcc-interface/trans.c (finalize_nrv_unc_r): Use CONSTRUCTOR_ELT.
1571 * gcc-interface/utils.c (convert): Likewise and simplify.
1572 (remove_conversions): Likewise.
1573 * gcc-interface/utils2.c (compare_fat_pointers): Likewise.
1574 (build_unary_op): Likewise and simplify.
1576 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
1578 * gcc-interface/gigi.h (build_atomic_load): Adjust prototype.
1579 (build_atomic_store): Likewise.
1580 (build_load_modify_store): Declare.
1581 (VECTOR_TYPE_P): Delete.
1582 * gcc-interface/decl.c (gnat_to_gnu_entity): Replace Is_Atomic with
1583 Is_Atomic_Or_VFA throughout.
1584 <E_Array_Type>: Build a variant of the XUA type instead of forcing
1585 TYPE_VOLATILE on it.
1586 <E_Array_Subtype>: Use the main variant of the base type.
1587 Do not force TYPE_VOLATILE on the type being built.
1588 <E_Record_Type>: Likewise.
1589 <E_Array_Subtype>: Likewise.
1590 <E_Subprogram_Type>: Rename local variable.
1591 Add Atomic qualifier in conjunction with Volatile on types if needed.
1592 Force BLKmode for by-ref types only at the end of the processing.
1593 Change qualifiers only after changing the mode of the type. Set
1594 TYPE_UNIVERSAL_ALIASING_P on the type directly.
1595 (check_ok_for_atomic_type): Issue specific error message for VFA.
1596 (gnat_to_gnu_component_type): Replace Is_Atomic with
1597 Is_Atomic_Or_VFA throughout.
1598 * gcc-interface/misc.c (gnat_get_alias_set): Test
1599 TYPE_UNIVERSAL_ALIASING_P on the type directly.
1600 * gcc-interface/trans.c (lvalue_required_p): Replace Is_Atomic with
1601 Is_Atomic_Or_VFA throughout. Add missing guard.
1602 (node_is_atomic): New predicate.
1603 (node_has_volatile_full_access): Likewise.
1604 (gnat_strip_type_conversion): New function.
1605 (outer_atomic_access_required_p): New predicate.
1606 (atomic_sync_required_p): Rename into...
1607 (atomic_access_required_p): ...this. Add SYNC parameter, scan the
1608 parent node first and then look for the atomic setting. Add support
1609 for Volatile_Full_Access.
1610 (Call_to_gnu): Add atomic_access and outer_atomic_access parameters
1611 and adjusts calls to above functions. Use load-modify-store sequence
1612 for updates of In/Out and Out parameters if required, as well as for
1613 moving the result to the target if required. Add couple of missing
1615 (gnat_to_gnu): Adjust calls to above functions.
1616 <N_Object_Renaming_Declaration>: If the renamed object has side-effects
1617 evaluate only its address.
1618 <N_Assignment_Statement>: Adjust call to Call_to_gnu. Use load-modify
1619 store sequence if required.
1620 <N_Function_Call>: Adjust call to Call_to_gnu.
1621 (extract_values): Adjust comment.
1622 * gcc-interface/utils2.c (build_atomic_load): Add SYNC parameter and
1623 use relaxed memory model if it is not set.
1624 (build_atomic_store): Likewise.
1625 (call_is_atomic_load): New predicate.
1626 (build_load_modify_store): New function.
1627 (build_binary_op) <MODIFY_EXPR>: Accept SAVE_EXPR on the LHS.
1628 (gnat_stabilize_reference) <CALL_EXPR>: Deal with atomic loads.
1630 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
1632 * gcc-interface/ada-tree.h (DECL_RENAMING_GLOBAL_P): Rename into...
1633 (DECL_GLOBAL_NONCONSTANT_RENAMING_P): ...this.
1634 * gcc-interface/gigi.h (record_global_renaming_pointer): Delete.
1635 (invalidate_global_renaming_pointers): Likewise.
1636 (record_global_nonconstant_renaming): New.
1637 (invalidate_global_nonconstant_renamings): Likewise.
1638 (get_inner_constant_reference): Likewise.
1639 (gnat_constant_reference_p): Likewise.
1640 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Adjust to above
1641 and register the renaming pointer only if the object is non-constant.
1642 (elaborate_expression_1): Call get_inner_constant_reference instead
1643 of get_inner_reference.
1644 * gcc-interface/trans.c (fold_constant_decl_in_expr): Minor tweak.
1645 (Identifier_to_gnu): Adjust to above and do not recheck the renamed
1646 object before substituting it.
1647 (Compilation_Unit_to_gnu): Adjust to above renaming. Minor tweaks.
1648 (gnat_to_gnu) <N_Object_Renaming_Declaration>: Do not return the
1649 result at the global level.
1650 (N_Exception_Renaming_Declaration): Likewise.
1651 * gcc-interface/utils.c (global_renaming_pointers): Rename into...
1652 (global_nonconstant_renamings): ...this.
1653 (destroy_gnat_utils): Adjust to above renaming.
1654 (record_global_renaming_pointer): Rename into...
1655 (record_global_nonconstant_renaming): ...this.
1656 (invalidate_global_renaming_pointers): Rename into...
1657 (invalidate_global_nonconstant_renamings): ...this and do not recheck
1658 the renamed object before invalidating.
1659 * gcc-interface/utils2.c (gnat_stabilize_reference): Minor tweak.
1660 (get_inner_constant_reference): New public function.
1661 (gnat_constant_reference_p): New predicate.
1663 2015-05-25 Javier Miranda <miranda@adacore.com>
1665 * einfo.ads, einfo.adb (Has_Out_Or_In_Out_Parameter): This attribute
1666 is now present in subprograms, generic subprograms, entries and
1668 * sem_ch6.adb (Set_Formal_Mode): Set As_Out_Or_In_Out_Parameter
1669 on entries, entry families, subprograms and generic subprograms.
1670 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration):
1671 Minor code reorganization to ensure that the Ekind attribute
1672 of the subprogram entity is set before its formals are
1673 processed. Required to allow the use of the attribute
1674 Has_Out_Or_In_Out_Parameter on the subprogram entity.
1675 * sem_aggr.adb (Resolve_Aggregate, Resolve_Extension_Aggregate):
1676 Perform the check on writable actuals only if the value of some
1677 component of the aggregate involves calling a function with
1678 out-mode parameters.
1679 (Resolve_Record_Aggregate): Propagate the Check_Actuals flag to the
1680 internally built aggregate.
1681 * sem_ch3.adb (Build_Derived_Record_Type, Record_Type_Declaration):
1682 Perform the check on writable actuals only if the initialization of
1683 some component involves calling a function with out-mode parameters.
1684 * sem_ch4.adb (Analyze_Arithmetic_Op, Analyze_Comparison_Op,
1685 Analyze_Equality_Op, Analyze_Logical_Op, Analyze_Membership_Op,
1686 Analyze_Range): Check writable actuals only if the
1687 subtrees have a call to a function with out-mode parameters
1688 (Analyze_Call.Check_Writable_Actuals): New subprogram. If the call
1689 has out or in-out parameters then mark its outermost enclosing
1690 construct as a node on which the writable actuals check must
1692 (Analyze_Call): Check if the flag must be set and if the outermost
1693 enclosing construct.
1694 * sem_util.adb (Check_Function_Writable_Actuals): Code cleanup
1695 and reorganization. We skip processing aggregate discriminants
1696 since their precise analysis involves two phases traversal.
1697 * sem_res.adb (Resolve_Actuals, Resolve_Arithmetic_Op,
1698 Resolve_Logical_Op, Resolve_Membership_Op): Remove call to
1699 check_writable_actuals.
1701 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1703 * sem_ch3.adb (Constrain_Concurrent): If the context is a
1704 type declaration, generate an Itype_Reference for the anonymous
1705 subtype, to force elaboration at this point in gigi.
1707 2015-05-22 Gary Dismukes <dismukes@adacore.com>
1709 * layout.adb, einfo.ads, sem_ch12.adb, freeze.adb, sem_util.ads,
1710 exp_ch4.adb, sem_ch6.adb: Minor reformatting and typo fixes.
1712 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1714 * sem_res.adb (Resolve_Actuals): If the call is to an overridden
1715 operation, replace the names of the actuals in named associations
1716 with the names of the actuals of the subprogram that is eventually
1717 executed. The names of the formals and the defaults can differ
1718 between the two operations when they are operations of a formal
1721 2015-05-22 Bob Duff <duff@adacore.com>
1723 * a-convec.ads, a-convec.adb (Append): Check for fast path. Split
1724 out slow path into separate procedure. Inline Append. Fast path
1725 now avoids calling Insert.
1726 (Finalize): Do the busy checking last, so the container gets emptied.
1727 (Insert, Insert_Space): Remove redundancy.
1729 2015-05-22 Robert Dewar <dewar@adacore.com>
1731 * switch-c.adb (Scan_Front_End_Switches): Insist on -gnatc
1734 2015-05-22 Arnaud Charlet <charlet@adacore.com>
1736 * gnatvsn.ads: Minor code reorg to remember more easily to update
1739 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1741 * sem_ch10.adb (Analyze_With_Clause): In ASIS_Mode, a
1742 limited_with clause on a predefined unit is not transformed into
1743 a regular with_clause, to preserve the original tree structure.
1744 * sinfo.ads (N_With_Clause): Add comment on handling of
1746 * sem_ch10.adb: Minor reformatting.
1748 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1750 * sem_ch8.adb (Freeze_Profile): A limited view of a type in
1751 the profile of a subprogram renaming does not require freezing,
1752 because it is declared in a different unit.
1754 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1756 * exp_aggr.adb (Get_Constraint_Association): If type (of ancestor
1757 composite type) is private, go to full view. This was previously
1758 done only in an instance context, but is happen whenever a chain
1759 of private extensions includes one inherited discriminant.
1761 2015-05-22 Robert Dewar <dewar@adacore.com>
1763 * einfo.ads: Minor comment updates.
1764 * exp_unst.adb: Move Subps table to spec Don't remove old entries
1765 from table Add Last field to record last entry used.
1766 * exp_unst.ads: Move Subps table here from body So that Cprint
1767 can access saved values.
1769 2015-05-22 Bob Duff <duff@adacore.com>
1771 * a-cdlili.adb, a-cdlili.ads, a-cohama.adb, a-cohama.ads,
1772 * a-cohase.adb, a-cohase.ads, a-convec.adb, a-convec.ads,
1773 * a-coorma.adb, a-coorma.ads, a-coorse.adb, a-coorse.ads:
1774 (Pseudo_Reference, Element_Access, Get_Element_Access): New
1775 declarations added for use by performance improvements in exp_ch5.adb.
1776 * snames.ads-tmpl: New names referenced by exp_ch5.adb.
1777 * exp_ch5.adb: Speed up "for ... of" loops for predefined containers.
1778 Instead of doing literally what the RM calls for, we do something
1779 equivalent that avoids expensive operations inside the loop. If the
1780 container package has appropriate Next, Pseudo_Reference,
1781 Element_Access, Get_Element_Access declarations, we invoke the
1783 * snames.ads-tmpl: Note speed improvement.
1785 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
1787 * einfo.ads (Is_Atomic_Or_VFA): Move to XEINFO INLINES section.
1788 * xeinfo.adb: Replace a-einfo.h with einfo.h throughout.
1789 Add pattern to translate "or else" into "||".
1791 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
1793 * einfo.ads (Has_Volatile_Full_Access): Rename into...
1794 (Is_Volatile_Full_Access): ...this.
1795 (Set_Has_Volatile_Full_Access): Rename into...
1796 (Set_Is_Volatile_Full_Access): ...this.
1797 * einfo.adb (Has_Volatile_Full_Access): Rename into...
1798 (Is_Volatile_Full_Access): ...this.
1799 (Set_Has_Volatile_Full_Access): Rename into...
1800 (Set_Is_Volatile_Full_Access): ...this.
1801 (Is_Atomic_Or_VFA): Adjust to above renaming.
1802 * errout.adb (Special_Msg_Delete): Likewise.
1803 * exp_pakd.adb (Install_PAT): Likewise.
1804 * freeze.adb (Freeze_Array_Type): Likewise.
1805 * sem_ch8.adb (Analyze_Object_Renaming): Likewise.
1806 * sem_ch13.adb (Inherit_Delayed_Rep_Aspects): Likewise.
1807 (Inherit_Aspects_At_Freeze_Point): Likewise.
1808 * sem_prag.adb (Set_Atomic_VFA): Likewise.
1809 (Process_Atomic_Independent_Shared_Volatile): Likewise.
1810 * sem_util.adb (Is_Atomic_Or_VFA_Object): Likewise.
1812 2015-05-22 Robert Dewar <dewar@adacore.com>
1814 * exp_ch5.adb, layout.adb, einfo.adb, einfo.ads, sem_prag.adb,
1815 freeze.adb, freeze.ads, sem_util.adb, sem_util.ads, exp_ch2.adb,
1816 exp_ch4.adb, errout.adb, exp_aggr.adb, sem_ch13.adb: This is a general
1817 change that deals with the fact that most of the special coding for
1818 Atomic should also apply to the case of Volatile_Full_Access.
1819 A new attribute Is_Atomic_Or_VFA is introduced, and many of the
1820 references to Is_Atomic now use this new attribute.
1822 2015-05-22 Robert Dewar <dewar@adacore.com>
1824 * exp_ch4.adb (Expand_N_Op_Eq): Introduce 'Machine for 'Result
1827 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
1829 * sprint.adb (Source_Dump): When generating debug files, deal
1830 with the case of a stand-alone package instantiation by dumping
1831 together the spec and the body in the common debug file.
1833 2015-05-22 Robert Dewar <dewar@adacore.com>
1835 * sem_ch13.adb (Minimum_Size): Size is zero for null range
1838 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1840 * einfo.adb (Anonymous_Master): This attribute now applies
1841 to package and subprogram bodies.
1842 (Set_Anonymous_Master): This attribute now applies to package and
1844 (Write_Field36_Name): Add output for package and subprogram bodies.
1845 * einfo.ads Update the documentation on attribute Anonymous_Master
1846 along with occurrences in entities.
1847 * exp_ch4.adb (Create_Anonymous_Master): Reimplemented to
1848 handle spec and body anonymous masters of the same unit.
1849 (Current_Anonymous_Master): Reimplemented. Handle a
1850 package instantiation that acts as a compilation unit.
1851 (Insert_And_Analyze): Reimplemented.
1853 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1855 * sem_ch10.adb (Analyze_With_Clause): A limited_with_clause on a
1856 predefined unit is treated as a regular with_clause.
1858 2015-05-22 Robert Dewar <dewar@adacore.com>
1860 * sem_ch12.adb, prj.ads, makeutl.ads, sem_ch6.adb, prj-nmsc.adb,
1861 prj-conf.adb, sem_disp.adb: Minor reformatting.
1863 2015-05-22 Vincent Celier <celier@adacore.com>
1865 * clean.adb (Parse_Cmd_Line): For native gnatclean, check
1866 for switch -P and, if found and gprclean is available, invoke
1868 * make.adb (Initialize): For native gnatmake, check for switch -P
1869 and, if found and gprbuild is available, invoke silently gprbuild.
1871 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
1873 * sem_ch13.adb (Validate_Unchecked_Conversions): Also issue
1874 specific warning for discrete types when the source is larger
1877 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1879 * einfo.ads, einfo.adb (Incomplete_Actuals): New attribute of
1880 package instantiations. Holds the list of actuals in the instance
1881 that are incomplete types, to determine where the corresponding
1882 instance body must be placed.
1883 * sem_ch6.adb (Conforming_Types): An incomplete type used as an
1884 actual in an instance matches an incomplete formal.
1885 * sem_disp.adb (Check_Dispatching_Call): Handle missing case of
1886 explicit dereference.
1887 (Inherited_Subprograms): In the presence of a limited view there
1888 are no subprograms to inherit.
1889 * sem_ch12.adb (Preanalyze_Actuals): Build list of incomplete
1890 actuals of instance, for later placement of instance body and
1891 freeze nodes for actuals.
1892 (Install_Body): In the presence of actuals that incomplete types
1893 from a limited view, the instance body cannot be placed after
1894 the declaration because full views have not been seen yet. Any
1895 use of the non-limited views in the instance body requires
1896 the presence of a regular with_clause in the enclosing unit,
1897 and will fail if this with_clause is missing. We place the
1898 instance body at the beginning of the enclosing body, which is
1899 the unit being compiled, and ensure that freeze nodes for the
1900 full views of the incomplete types appear before the instance.
1902 2015-05-22 Pascal Obry <obry@adacore.com>
1904 * makeutl.ads, prj-conf.adb, prj-nmsc.adb, prj.ads
1905 (In_Place_Option): Removed.
1906 (Relocate_Build_Tree_Option): New constant.
1907 (Root_Dir_Option): New constant.
1908 (Obj_Root_Dir): Removed.
1909 (Build_Tree_Dir): New variable.
1910 (Root_Src_Tree): Removed.
1911 (Root_Dir): New variable.
1912 * prj-conf.adb (Get_Or_Create_Configuration_File): Add check
1913 for improper relocation.
1914 * prj-nmsc.adb (Locate_Directory): Add check for improper
1917 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1919 * einfo.adb (Default_Init_Cond_Procedure): Code cleanup. The
1920 attribute now applies to the base type.
1921 (Has_Default_Init_Cond): Now applies to the base type.
1922 (Has_Inherited_Default_Init_Cond): Now applies to the base type.
1923 (Set_Default_Init_Cond_Procedure): Code cleanup. The attribute now
1924 applies to the base type.
1925 (Set_Has_Default_Init_Cond): Now applies to the base type.
1926 (Set_Has_Inherited_Default_Init_Cond): Now applies to the base type.
1927 * exp_ch3.adb (Expand_N_Object_Declaration): No need to use the
1928 base type when adding a call to the Default_Initial_Condition.
1930 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1932 * einfo.adb: Node36 is now used as Anonymous_Master. Flag253
1934 (Anonymous_Master): New routine.
1935 (Has_Anonymous_Master): Removed.
1936 (Set_Anonymous_Master): New routine.
1937 (Set_Has_Anonymous_Master): Removed.
1938 (Write_Entity_Flags): Remove the output for Has_Anonymous_Maser.
1939 (Write_Field36_Name): Add output for Anonymous_Master.
1940 * einfo.ads Add new attribute Anonymous_Master along with
1941 occurrences in nodes. Remove attribute Has_Anonymous_Master along
1942 with occurrences in nodes.
1943 (Anonymous_Master): New routine along with pragma Inline.
1944 (Has_Anonymous_Master): Removed along with pragma Inline.
1945 (Set_Anonymous_Master): New routine along with pragma Inline.
1946 (Set_Has_Anonymous_Master): Removed along with pragma Inline.
1947 * exp_ch4.adb (Create_Anonymous_Master): New routine.
1948 (Current_Anonymous_Master): Reimplemented.
1950 2015-05-22 Bob Duff <duff@adacore.com>
1952 * freeze.adb (Freeze_Profile): Suppress warning if imported
1953 subprogram is not at library level.
1955 2015-05-22 Robert Dewar <dewar@adacore.com>
1957 * sem_ch8.adb (Analyze_Object_Renaming): Check for renaming
1958 component of an object to which Volatile_Full_Access applies.
1960 2015-05-22 Jerome Guitton <guitton@adacore.com>
1962 * exp_dbug.ads: Add note about non bit-packed arrays.
1964 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
1966 * sem_prag.adb: Fix typo.
1967 * einfo.ads: Grammar fixes in comments.
1969 2015-05-22 Bob Duff <duff@adacore.com>
1971 * a-cborma.ads, a-cidlli.ads, a-cimutr.ads, a-ciormu.ads,
1972 * a-cihase.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
1973 * a-cborse.ads, a-comutr.ads, a-ciorma.ads, a-cobove.ads,
1974 * a-coormu.ads, a-convec.ads, a-cohase.ads, a-coinho.ads,
1975 * a-cbdlli.ads, a-cbmutr.ads, a-cbhase.ads, a-cdlili.ads,
1976 * a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
1977 * a-coinho-shared.ads (Constant_Reference_Type, Reference_Type):
1978 Add an initialization expression "raise Program_Error". See,
1979 for example, RM-A.18.2(148.4).
1981 2015-05-22 Robert Dewar <dewar@adacore.com>
1983 * debug.adb: Update documentation.
1984 * einfo.ads, einfo.adb (Needs_Typedef): New flag
1985 * exp_unst.adb (Unnest_Subprogram): Mark AREC types as needing
1987 * frontend.adb: Update comments.
1988 * gnat1drv.adb (Adjust_Global_Switches): Set all needed flags
1990 * opt.ads (Generate_C_Code): New switch.
1991 * osint-c.adb (Write_C_File_Info): Removed, not used
1992 (Write_H_File_Info): Removed, not used
1993 * osint-c.ads (Write_C_File_Info): Removed, not used
1994 (Write_H_File_Info): Removed, not used
1995 * osint.ads (Write_Info): Minor comment updates.
1996 (Output_FD): Moved from private part to public part of spec.
1997 * sem.adb (Semantics): Force expansion on if in Generate_C_Code
1999 * atree.ads: minor typo in comment.
2000 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
2001 Do not allow VFA on composite object with aliased component.
2003 2015-05-22 Arnaud Charlet <charlet@adacore.com>
2005 * osint-c.adb, osint-c.ads (Set_File_Name): Move back to spec.
2007 2015-05-22 Pascal Obry <obry@adacore.com>
2009 * prj-util.adb: Minor comment editing.
2011 2015-05-22 Pascal Obry <obry@adacore.com>
2013 * makeutl.ads (In_Place_Option): New constant.
2014 * prj.ads (Obj_Root_Dir): New variable (absolute path to relocate
2016 (Root_Src_Tree): New variable (absolute path of root source tree).
2017 * prj-conf.adb (Do_Autoconf): Take into account the object root
2018 directory (if defined) to generate configuration project.
2019 * prj-nmsc.adb (Get_Directories): Handle case where Obj_Root_Dir
2021 (Locate_Directory): Likewise.
2023 2015-05-22 Pascal Obry <obry@adacore.com>
2025 * prj-util.ads, prj-util.adb (Relative_Path): New routine.
2027 2015-05-22 Bob Duff <duff@adacore.com>
2029 * exp_utils.ads, exp_utils.adb (Find_Optional_Prim_Op): New
2030 interface to return Empty when not found, so we can avoid handling
2031 Program_Error in that case.
2032 (Find_Prim_Op): Fix latent bug: raise Program_Error when there are no
2034 * exp_ch7.adb, sem_util.adb: Use Find_Optional_Prim_Op when the
2035 code is expecting Empty.
2036 * sem_ch8.adb: Use Find_Optional_Prim_Op to avoid handling
2039 2015-05-22 Robert Dewar <dewar@adacore.com>
2041 * sem_ch3.adb, sem_intr.adb, exp_ch4.adb, s-rannum.adb,
2042 sem_eval.adb, s-fatgen.adb, s-expmod.ads: Remove incorrect hyphen in
2044 * exp_util.adb: Add comment.
2045 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move from spec to
2047 (Set_File_Name): New name for the above.
2048 (Create_C_File, Create_H_File, Write_C_File_Info, Write_H_File_Info,
2049 Close_C_File, Close_H_File): New procedure.
2050 * osint.adb: Minor reformatting.
2051 * osint.ads: Minor comment updates.
2053 2015-05-22 Robert Dewar <dewar@adacore.com>
2055 * exp_ch4.adb: Minor rewording.
2056 * exp_util.ads: Clarify that Find_Prim_Op is only for
2059 2015-05-22 Robert Dewar <dewar@adacore.com>
2061 * atree.adb, atree.ads, treepr.adb: Change name Needs_Actuals_Check to
2063 * exp_ch4.adb (Expand_N_Op_Expon): Optimize 2**x in modular
2066 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
2068 * exp_pakd.adb (Install_PAT): Propagate representation aspects
2069 from the original array type to the PAT.
2071 2015-05-22 Robert Dewar <dewar@adacore.com>
2073 * treepr.adb (Print_Node_Header): Add output of Needs_Actuals_Check.
2075 2015-05-22 Robert Dewar <dewar@adacore.com>
2077 * atree.adb, atree.ads (Needs_Actuals_Check): New flag.
2079 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
2081 * sem_prag.adb (Analyze_Pragma): Remove the detection
2082 of a useless Part_Of indicator when the related item is a constant.
2083 (Check_Matching_Constituent): Do not emit an error on a constant.
2084 (Check_Missing_Part_Of): Do not check for a missing Part_Of indicator
2085 when the related item is a constant.
2086 (Collect_Body_States): Code cleanup.
2087 (Collect_Visible_States): Code cleanup.
2088 (Report_Unused_States): Do not emit an error on a constant.
2089 * sem_util.ads, sem_util.adb (Has_Variable_Input): Removed.
2091 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
2093 * sem_ch8.adb (Analyze_Object_Renaming): Copy
2094 Has_Volatile_Full_Access from renamed to renaming entities.
2095 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
2096 Tidy up and remove redundant setting of Has_Volatile_Full_Access.
2098 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
2100 * ghost.adb (Check_Ghost_Completion): Update references to SPARK
2102 (Check_Ghost_Policy): Update references to SPARK RM 6.9 rules.
2103 * sem_ch3.adb (Analyze_Object_Declaration): Update references
2104 to SPARK RM 6.9 rules.
2105 (Check_Completion): Ghost entities do not require a special form of
2107 * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Update references
2108 to SPARK RM 6.9 rules.
2109 (Analyze_Subprogram_Body_Helper): Update references to SPARK RM 6.9
2111 * sem_ch7.adb (Analyze_Package_Body_Helper): Update references
2112 to SPARK RM 6.9 rules.
2113 (Requires_Completion_In_Body): Ghost entities do not require a special
2116 2015-05-22 Robert Dewar <dewar@adacore.com>
2118 * a-csquin.ads: Use Ada 2012 notation.
2119 * sem_ch8.adb: Minor reformatting.
2121 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
2123 * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect Import
2124 acts as a completion.
2126 2015-05-22 Ed Schonberg <schonberg@adacore.com>
2128 * sem_ch13.adb: Minor reformatting.
2130 2015-05-22 Jose Ruiz <ruiz@adacore.com>
2132 * a-reatim.adb: Minor change, fix typo.
2134 2015-05-22 Robert Dewar <dewar@adacore.com>
2136 * sem_util.ads: Minor addition of ??? comment.
2137 * sem_prag.adb, sem_util.adb: Minor reformatting.
2138 * sem_ch13.adb: minor reformatting.
2140 2015-05-22 Robert Dewar <dewar@adacore.com>
2142 * a-reatim.ads: Add Compile_Time_Error to ensure Duration
2144 * sem_ch13.adb: Improve error message.
2145 * exp_ch4.adb: Minor reformatting.
2147 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
2149 * sem_prag.adb (Analyze_Pragma): Constants without variable
2150 input do not require indicator Part_Of.
2151 (Check_Missing_Part_Of): Constants without variable input do not
2152 requrie indicator Part_Of.
2153 (Collect_Visible_States): Constants without variable input are
2154 not part of the hidden state of a package.
2155 * sem_util.ads, sem_util.adb (Has_Variable_Input): New routine.
2157 2015-05-22 Robert Dewar <dewar@adacore.com>
2159 * exp_util.adb (Activate_Atomic_Synchronization): Do not set
2160 Atomic_Sync_Required for an object renaming declaration.
2161 * sem_ch8.adb (Analyze_Object_Renaming): Copy Is_Atomic and
2162 Is_Independent to renaming object.
2164 2015-05-22 Ed Schonberg <schonberg@adacore.com>
2166 * sem_ch5.adb (Analyze_Iterator_Specification): Diagnose
2167 various illegalities in iterators over arrays and containers:
2168 a) New function Get_Cursor_Type, to verify that the cursor is
2169 not a limited type at the point of iteration.
2170 b) If the container is a constant, an element_iterator is illegal
2171 if the container type does not have a Constant_Indexing aspect.
2172 c) If the iterate function has an in-out controlling parameter,
2173 the container cannot be a constant object.
2174 d) Reject additional cases of iterators over a
2175 discriminant-dependent component of a mutable object.
2177 2015-05-21 Hristian Kirtchev <kirtchev@adacore.com>
2179 * einfo.adb (Contract): This attribute now applies to constants.
2180 (Set_Contract): This attribute now applies to constants.
2181 (Write_Field34_Name): Add output for constants.
2182 * einfo.ads Attribute Contract now applies to constants.
2183 * sem_ch3.adb (Analyze_Object_Contract): Constants now have
2184 their Part_Of indicator verified.
2185 * sem_prag.adb (Analyze_Constituent): A constant is now a valid
2187 (Analyze_Global_Item): A constant cannot act as an output.
2188 (Analyze_Initialization_Item): Constants are now a valid
2189 initialization item.
2190 (Analyze_Initializes_In_Decl_Part): Rename
2191 global variable States_And_Vars to States_And_Objs and update
2192 all its occurrences.
2193 (Analyze_Input_Item): Constants are now a
2194 valid initialization item. Remove SPARM RM references from error
2196 (Analyze_Pragma): Indicator Part_Of can now apply to a constant.
2197 (Collect_Body_States): Collect both source constants
2199 (Collect_States_And_Objects): Collect both source constants and
2201 (Collect_States_And_Variables): Rename
2202 to Collect_States_And_Objects and update all its occurrences.
2203 (Collect_Visible_States): Do not collect constants and variables
2204 used to map generic formals to actuals.
2205 (Find_Role): The role of a constant is that of an input. Separate the
2206 role of a variable from that of a constant.
2207 (Report_Unused_Constituents): Add specialized wording for constants.
2208 (Report_Unused_States): Add specialized wording for constants.
2209 * sem_util.adb (Add_Contract_Item): Add processing for constants.
2210 * sem_util.ads (Add_Contract_Item): Update the comment on usage.
2211 (Find_Placement_In_State_Space): Update the comment on usage.
2213 2015-05-21 Ed Schonberg <schonberg@adacore.com>
2215 * sem_ch5.adb: minor reformatting.
2217 2015-05-21 Robert Dewar <dewar@adacore.com>
2219 * freeze.adb (Freeze_Entity): Properly tag -gnatw.z messages.
2221 2015-05-21 Robert Dewar <dewar@adacore.com>
2223 * freeze.adb: Minor reformatting.
2224 * cstand.adb (Print_Standard): Fix bad printing of Duration
2226 * a-reatim.adb (Time_Of): Complete rewrite to properly detect
2229 2015-05-21 Ed Schonberg <schonberg@adacore.com>
2231 * sem_ch5.adb: add (useless) initial value.
2232 * sem_ch3.adb (Replace_Anonymous_Access_To_Protected_Subprogram):
2233 Check whether the procedure has parameters before processing
2234 formals in ASIS mode.
2236 2015-05-21 Ed Schonberg <schonberg@adacore.com>
2238 * sem_ch13.adb (Check_Iterator_Functions): Emit error on Iterator
2239 aspect as well when indexing function is illegal.
2240 (Valid_Default_Iterator): Handle properly somme illegal cases
2241 to prevent compilation abandoned messages.
2242 (Check_Primitive_Function): Verify that type and indexing function
2243 are in the same scope.
2244 * freeze.adb (Freeze_Record): Extend patch on the presence of
2245 indexing aspects to aspect Default_Iterator.
2247 2015-05-19 David Malcolm <dmalcolm@redhat.com>
2249 * gcc-interface/trans.c (Sloc_to_locus1): Strenghthen local "map"
2250 from line_map * to line_map_ordinary *.
2252 2015-05-12 Jason Merrill <jason@redhat.com>
2254 * sigtramp-vxworks.c: Add space between string literal and macro
2257 2015-05-12 Arnaud Charlet <charlet@adacore.com>
2259 * gnat_rm.texi, gnat_ugn.texi, doc: Documentation updates and clean ups
2261 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2263 * sem_ch5.adb (Analyze_Iterator_Specifications): Additional
2264 legality checks for array and container iterators:
2265 a) The domain of iteration cannot be a component that depends
2266 on discriminants of a mutable object. The check was recently
2267 added for element iterators.
2268 b) The cursor type cannot be a limited type at the point of the
2269 iteration, because the cursor will be assigned to in the body
2272 2015-05-12 Robert Dewar <dewar@adacore.com>
2274 * freeze.adb (Freeze_Record_Type): Make sure that if we have
2275 aspect Iterator_Element, then we have either Constant_Indexing
2276 or Variable_Indexing.
2278 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2280 * a-coormu.ads, a-coormu.adb: Add Indexing aspect, Reference_Type,
2281 and Reference_Control_Type to support element iterators over
2283 * a-ciormu.ads, a-ciormu.adb: Ditto for
2284 indefinite_ordered_multisets.
2286 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
2288 * exp_ch4.adb (Expand_N_Expression_With_Actions): Force
2289 the evaluation of the EWA expression. Code cleanup.
2290 (Process_Transient_Object): Code cleanup.
2291 * exp_util.adb (Is_Aliased): Controlled transient objects found
2292 within EWA nodes are not aliased.
2293 (Is_Finalizable_Transient): Iterators are not finalizable transients.
2295 2015-05-12 Robert Dewar <dewar@adacore.com>
2297 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
2298 Don't allow Atomic and Volatile_Full_Access for the same entity.
2300 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2302 * sem_ch5.adb (Analyze_Iterator_Specification): Implement new
2303 semantics and safety checks specified in AI12-0151.
2305 2015-05-12 Pierre-Marie de Rodat <derodat@adacore.com>
2307 * sem_ch10.adb (Sem_Ch10.Analyze_Proper_Body): Generate SCOs
2308 for subunit in generic units.
2310 2015-05-12 Robert Dewar <dewar@adacore.com>
2312 * sem_elab.adb (Check_A_Call): Avoid checking internal call
2315 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2317 * sem_ch6.adb (Process_Formals): An untagged incomplete type
2318 is legal in the profile of a null procedure.
2320 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2322 * sem_ch12.adb (Validate_Derived_Type_Instance): Handle properly
2323 the checks on a derived formal whose parent type is a previous
2324 formal that is not a derived type.
2326 2015-05-12 Robert Dewar <dewar@adacore.com>
2328 * aspects.ads, aspects.adb: Add entries for aspect Volatile_Full_Access
2329 * einfo.adb (Has_Volatile_Full_Access): New flag.
2330 (Has_Volatile_Full_Access): New flag.
2331 * einfo.ads (Has_Volatile_Full_Access): New flag.
2332 * par-prag.adb: Add dummy entry for Volatile_Full_Access.
2333 * sem_prag.adb (Analyze_Pragma, case Volatile_Full_Access):
2334 Implement new pragma.
2335 * snames.ads-tmpl: Add entries for pragma Volatile_Full_Access.
2337 2015-05-12 Robert Dewar <dewar@adacore.com>
2339 * targparm.ads: Minor reformatting.
2341 2015-05-12 Robert Dewar <dewar@adacore.com>
2343 * a-reatim.adb (Time_Of): Properly detect overflow when TS = 0.0.
2344 * a-reatim.ads: Minor reformatting.
2346 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
2348 * einfo.ads: Update the documentation of flags
2349 Has_Inherited_Default_Init_Cond and Has_Default_Init_Cond.
2351 2015-05-12 Robert Dewar <dewar@adacore.com>
2353 * impunit.adb: Add entry for a-dhfina.ads
2354 * a-dhfina.ads: New file.
2356 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2358 * exp_ch5.adb (Expand_Iterator_Loop_Over_Array): if the array
2359 type has convention Fortran, a multidimensional iterator varies
2360 the first dimension fastest.
2362 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
2364 * einfo.adb: Node32 is now used as Encapsulating_State.
2365 Node37 is now used as Associated_Entity.
2366 (Associated_Entity): New routine.
2367 (Encapsulating_State): Update the assertion guard to include constants.
2368 (Set_Associated_Entity): New routine.
2369 (Set_Encapsulating_State): Update the assertion guard to
2371 (Write_Field10_Name): Remove the output for Encapsulating_State.
2372 (Write_Field32_Name): Add output for Encapsulating_State.
2373 (Write_Field37_Name): Add output for Associated_Entity.
2374 * einfo.ads New attribute Associated_Entity along with placement
2375 in entities. Attribute Encapsulating_State now uses Node32.
2376 (Associated_Entity): New routine along with pragma Inline.
2377 (Set_Associated_Entity): New routine along with pragma Inline.
2378 * inline.ads Code reformatting.
2379 * sem_attr.adb (Analyze_Attribute): Correct the prefix of
2380 attribute 'Result when the context is a generic instantiation.
2381 (Analyze_Attribute_Old_Result): Pragmas Depends and
2382 Refined_Depends are a valid context for attribute 'Result.
2383 (Denote_Same_Function): Allow attribute 'Result to denote
2385 * sem_ch3.adb Add with and use clauses for Sem_Ch12.
2386 (Analyze_Declarations): Capture global references within the
2387 contracts of packages, subprograms and their respective bodies.
2388 * sem_ch6.adb (Analyze_Aspects_On_Body_Or_Stub): Removed.
2389 (Analyze_Completion_Contract): Removed.
2390 (Analyze_Generic_Subprogram_Body): Enchange the aspects after
2391 creating the generic copy. Create a generic contract for the
2392 template. Analyze the aspects of the generic body. Analyze the
2393 contract of the generic body when it is a compilation unit and
2394 capture global references.
2395 (Analyze_Subprogram_Body_Contract): Code cleanup.
2396 (Analyze_Subprogram_Contract): Do not save global references here.
2397 (Save_Global_References_In_List): Removed.
2398 * sem_ch7.adb (Analyze_Package_Body_Contract): Code cleanup.
2399 (Analyze_Package_Body_Helper): Create a generic contract for
2401 (Analyze_Package_Contract): Code cleanup.
2402 * sem_ch10.adb Add with and use clauses for Sem_Ch12.
2403 (Analyze_Compilation_Unit): Capture global references in a
2404 generic subprogram declaration that acts as a compilation unit.
2405 * sem_ch12.adb Add with and use clauses for Sem_Prag. Illustrate
2406 the implementation of generic contracts. Alphabetize various
2408 (Analyze_Generic_Package_Declaration):
2409 Create a generic contract for the template.
2410 (Analyze_Generic_Subprogram_Declaration): Create a generic
2411 contract for the template.
2412 (Analyze_Subprogram_Instantiation): Instantiate the contract of the
2414 (Copy_Generic_Node): Link defining entities of the generic template
2415 with the corresponding defining entities of the generic copy. Update
2416 the processing of pragmas.
2417 (Instantiate_Contract): Removed.
2418 (Instantiate_Subprogram_Contract): New routine.
2419 (Requires_Delayed_Save): New routine.
2420 (Save_Global_References): Rename formal parameter N to Templ. Various
2422 (Save_Global_References_In_Aspects): Moved from the spec.
2423 (Save_Global_References_In_Contract): New routine.
2424 (Save_References_In_Aggregate): New routine.
2425 (Save_References_In_Char_Lit_Or_Op_Symbol): New routine.
2426 (Save_References_In_Descendants): New routine.
2427 (Save_References_In_Identifier): New routine.
2428 (Save_References_In_Operator): New routine.
2429 (Save_References_In_Pragma): New routine.
2430 * sem_ch12.ads (Save_Global_References): Rename formal
2431 parameter N to Templ. Update the comment on usage.
2432 (Save_Global_References_In_Aspects): Moved to the body.
2433 (Save_Global_References_In_Contract): New routine.
2434 * sem_ch13.adb (Analyze_Aspect_Specifications_On_Body_Or_Stub):
2436 * sem_ch13.ads (Analyze_Aspect_Specifications_On_Body_Or_Stub):
2438 * sem_prag.adb (Add_Item_To_Name_Buffer): Add support for
2440 (Analyze_Contract_Cases_In_Decl_Part): Code cleanup.
2441 (Analyze_Depends_Global): New routine.
2442 (Analyze_Depends_In_Decl_Part): Code cleanup.
2443 (Analyze_Global_In_Decl_Part): Code cleanup.
2444 (Analyze_Global_Item): Constants are now valid global items. Do
2445 not perform state-related checks in an instance. Change the way
2446 renamings are handled. (Analyze_Initial_Condition_In_Decl_Part):
2448 (Analyze_Initializes_In_Decl_Part): Code cleanup.
2449 (Analyze_Input_Output): The analysis of attribute 'Result in
2450 the context of pragmas Depends or Refined_Depends now reuses
2451 the existing attribute analysis machinery. Constants and
2452 generic parameters are now valid dependency items. Do not
2453 perform state-related checks in an instance. Change the way
2454 renamings are handled. (Analyze_Pragma): Add a "characteristics"
2455 section for pragmas Abstract_State, Contract_Cases, Depends,
2456 Extensions_Visible, Global, Initial_Condition, Initializes,
2457 Post, Post_Class, Postcondition, Pre, Pre_Class, Precondition,
2458 Refined_Depends, Refined_Global, Refined_Post, Refined_State, Test_Case.
2459 (Analyze_Pre_Post_Condition): Do not create a generic
2461 (Analyze_Pre_Post_Condition_In_Decl_Part): Code cleanup.
2462 (Analyze_Refined_Depends_Global_Post): New routine.
2463 (Analyze_Refined_Depends_In_Decl_Part): Code cleanup.
2464 (Analyze_Refined_Global_In_Decl_Part): Code cleanup.
2465 (Analyze_Refined_Pragma): Removed.
2466 (Analyze_Refined_State_In_Decl_Part): Code cleanup.
2467 (Analyze_Test_Case_In_Decl_Part): Code cleanup.
2468 (Check_Dependency_Clause): Do not perform this check in an instance.
2469 (Check_Function_Return): Add support for generic functions.
2470 (Check_In_Out_States): Do not perform this check in an instance.
2471 (Check_Input_States): Do not perform this check in an instance.
2472 (Check_Mode_Restriction_In_Function): Add support for generic functions.
2473 (Check_Output_States): Do not perform this check in an instance.
2474 (Check_Postcondition_Use_In_Inlined_Subprogram): Rename
2475 parameter Subp_Id to Spec_Id and update comment on usage.
2476 (Check_Proof_In_States): Do not perform this check in an instance.
2477 (Check_Refined_Global_Item): Add support for constants.
2478 (Check_Refined_Global_List): Do not perform this check in an instance.
2479 (Collect_Global_Items): Reimplemented.
2480 (Collect_Subprogram_Inputs_Outputs): Add support for generic parameters.
2481 (Create_Generic_Template): Removed.
2482 (Find_Related_Package_Or_Body): Moved to spec.
2483 (Find_Role): Add support for generic parameters and constants.
2484 (Get_Argument): Moved to spec. Rename parameter Spec_Id to Context_Id.
2485 (Match_Item): Add support for constants.
2486 (Preanalyze_Test_Case_Arg): Reimplemented.
2487 (Report_Extra_Clauses): Do not perform this check in an instance.
2488 (Report_Extra_Constituents): Do not perform this check in an instance.
2489 * sem_prag.ads (Collect_Subprogram_Inputs_Outputs): Update
2490 the comment on usage.
2491 (Find_Related_Package_Or_Body): Moved from body.
2492 (Get_Argument): Moved from body.
2493 * sem_util.adb Add with and use clauses for Sem_Ch12.
2494 (Corresponding_Spec_Of): Add support for packages and package bodies.
2495 (Create_Generic_Contract): New routine.
2496 (Is_Contract_Annotation): Reimplemented.
2497 (Is_Generic_Declaration_Or_Body): New routine.
2498 (Is_Package_Contract_Annotation): New routine.
2499 (Is_Subprogram_Contract_Annotation): New routine.
2500 * sem_util.ads (Corresponding_Spec_Of): Update the comment on usage.
2501 (Create_Generic_Contract): New routine.
2502 (Is_Generic_Declaration_Or_Body): New routine.
2503 (Is_Package_Contract_Annotation): New routine.
2504 (Is_Subprogram_Contract_Annotation): New routine.
2505 * sinfo.adb (Is_Generic_Contract_Pragma): New routine.
2506 (Set_Is_Generic_Contract_Pragma): New routine.
2507 * sinfo.ads Add new attribute Is_Generic_Contract_Pragma along
2508 with occurrences in nodes.
2509 (Is_Generic_Contract_Pragma): New routine along with pragma Inline.
2510 (Set_Is_Generic_Contract_Pragma): New routine along with pragma Inline.
2511 * treepr.adb (Print_Entity_Info): Output fields 36 to 41.
2513 2015-05-12 Robert Dewar <dewar@adacore.com>
2515 * a-taster.ads: Minor comment fix: fix bad header, this is a
2518 2015-05-12 Robert Dewar <dewar@adacore.com>
2520 * sem_intr.adb: (Check_Shift): Diagnose bad modulus value.
2522 2015-05-12 Robert Dewar <dewar@adacore.com>
2524 * gnat1drv.adb (Adjust_Global_Switches): Default to suppressing
2525 Alignment_Checks on non-strict alignment machine.
2526 * sem_ch13.adb (Validate_Address_Clauses): Don't give
2527 compile-time alignment warnings if run time Alignment_Check
2530 2015-05-12 Thomas Quinot <quinot@adacore.com>
2532 * g-sercom.ads, g-sercom-linux.adb (GNAT.Serial_Communications.
2533 Data_Rate): New literals B75, B110, B150, B300, B600.
2535 2015-05-12 Doug Rupp <rupp@adacore.com>
2537 * init.c (__gnat_init_float) [vxworks]: For e500v2,
2538 do nothing and leave the responsibility to install the handler
2539 and enable the exceptions to the BSP.
2541 2015-05-12 Robert Dewar <dewar@adacore.com>
2543 * sem_ch9.adb, einfo.ads, exp_intr.adb: Minor reformatting.
2544 * sem_disp.adb: Minor code reorganization (remove junk redundant
2546 * exp_unst.adb (Unnest_Subprogram.Uplev_Refs): Ignore uplevel
2547 references to bounds of types coming from original type reference.
2548 * checks.ads: Minor reformatting.
2549 * checks.adb: Minor reformatting.
2550 * sem_prag.adb (Analyze_Pragma, case Check): If in ignored
2551 assertion, then make sure we do not drag in bignum stuff.
2553 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2555 * sem_ch9.adb (Collect_Interfaces): Initialize
2556 Direct_Primitive_Operations for a tagged synchronized type,
2557 so it can used in ASIS mode.
2558 * sem_disp.adb (Check_Dispatching_Operation): If expansion is
2559 disabled, attach subprogram to list of Direct_Primitive_Operations
2560 of synchronized type itself, for ASIS use, because in this case
2561 Corresponding_Record_Type is not built.
2562 * einfo.ads: Indicate use of Direct_Primitive_Operations on
2565 2015-05-12 Pierre-Marie de Rodat <derodat@adacore.com>
2567 * exp_pakd.adb: Make clearer the comment in exp_pakd.adb about
2570 2015-05-12 Robert Dewar <dewar@adacore.com>
2572 * sem_ch3.adb, sem_util.adb, sem_ch6.adb: Minor reformatting.
2574 2015-05-12 Robert Dewar <dewar@adacore.com>
2576 * exp_unst.adb (Visit_Node): Deal with subprogram and package stubs.
2578 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2580 * exp_intr.adb (Expand_Dispatching_Constructor_Call): The
2581 tag to be retrieved for the generated call is the first entry
2582 in the dispatch table for the return type of the instantiated
2585 2015-05-12 Bob Duff <duff@adacore.com>
2587 * exp_ch7.adb, exp_ch7.ads, exp_intr.adb, exp_util.adb,
2588 exp_util.ads: Update comments.
2590 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2592 * sem_ch3.adb (Add_Internal_Interface_Entities): Do no generate
2593 freeze nodes for these in ASIS mode, because they lead to
2594 elaoration order issues in gigi.
2596 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
2598 * sem_ch6.adb (Analyze_Expression_Function): Code
2599 cleanup. Use Copy_Subprogram_Spec to create a proper spec.
2600 (Analyze_Subprogram_Body_Helper): Code cleanup. Do not
2601 prepare a stand alone body for inlining in GNATprove mode
2602 when inside a generic. (Body_Has_Contract): Reimplemented.
2603 (Build_Subprogram_Declaration): New routine.
2604 * sem_ch10.adb (Analyze_Compilation_Unit): Capture global
2605 references within generic bodies by loading them.
2606 * sem_util.adb (Copy_Parameter_List): Code cleanup.
2607 (Copy_Subprogram_Spec): New routine.
2608 (Is_Contract_Annotation): New routine.
2609 * sem_util.ads (Copy_Subprogram_Spec): New routine.
2610 (Is_Contract_Annotation): New routine.
2612 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
2614 * sem_attr.adb (Resolve_Attribute): Do not analyze the generated
2615 body of an expression function when the prefix of attribute
2616 'Access is the body.
2618 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2620 * sem_ch3.adb (Build_Derived_Enumeration_Type): The anonymous base
2621 created for a derived enumeration type is not a first subtype,
2622 even though it is defined through a full type declaration.
2623 * sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): Do not process
2624 aspects for the anonymous base type constructed for a derived
2625 scalar type, because they will be set when the first subtype
2627 (Inherit_Aspects_At_Freeze_Point): Fix typos on handling of
2628 Default_Value and Default_Component_Value, that prevented the
2629 proper inheritance of these aspects.
2631 2015-05-12 Gary Dismukes <dismukes@adacore.com>
2633 * exp_ch6.adb, exp_unst.adb: Minor typo fixes.
2635 2015-05-12 Robert Dewar <dewar@adacore.com>
2637 * sem_ch3.adb: Minor reformatting.
2639 2015-05-12 Vincent Celier <celier@adacore.com>
2641 * gnatcmd.adb: If we want to invoke gnatmake (gnatclean) with
2642 -P, then check if gprbuild (gprclean) is available; if it is,
2643 use gprbuild (gprclean) instead of gnatmake (gnatclean).
2645 2015-05-12 Robert Dewar <dewar@adacore.com>
2647 * debug.adb: Add flag -gnatd.3 to output diagnostic info from
2649 * einfo.ad, einfo.adb: Reorganize (and remove most of) flags used by
2651 * exp_ch6.adb (Unest_Bodies): Table for delayed calls to
2652 Unnest_Subprogram (Expand_N_Subprogram_Body): Add entry to table
2653 for later call instead of calling Unnest_Subprogram directly
2654 (Initialize): New procedure (Unnest_Subprograms): New procedure
2655 * exp_ch6.ads (Add_Extra_Actual_To_Call): Move into proper
2657 (Initialize): New procedure.
2658 (Unnest_Subprograms): New procedure.
2659 * exp_unst.adb (Unnest_Subprogram): Major rewrite, moving
2660 all processing to this routine which is now called late
2661 after instantiating bodies. Fully handles the case of generic
2663 * exp_unst.ads: Major rewrite, moving all processing to
2665 * frontend.adb (Frontend): Add call to Exp_Ch6.Initialize.
2666 (Frontend): Add call to Unnest_Subprograms.
2667 * sem_ch8.adb (Find_Direct_Name): Back to old calling sequence
2668 for Check_Nested_Access.
2669 * sem_util.adb (Build_Default_Subtype): Minor reformatting
2670 (Check_Nested_Access): Back to original VM-only form (we
2671 now do all the processing for Unnest_Subprogram at the time
2673 (Denotes_Same_Object): Minor reformatting
2674 (Note_Possible_Modification): Old calling sequence for
2675 Check_Nested_Access.
2676 * sem_util.ads (Check_Nested_Access): Back to original VM-only
2677 form (we now do all the processing for Unnest_Subprogram at the
2680 2015-05-12 Robert Dewar <dewar@adacore.com>
2682 * sem_ch3.adb, freeze.adb, sem_ch6.adb: Minor reformatting.
2684 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2686 * sem_ch3.adb (Analyze_Object_Declaration): New function
2687 Has_Delayed_Aspect, used to defer resolution of an aggregate
2688 expression when the object declaration carries aspects Address
2690 * freeze.adb (Freeze_Object_Declaration): New subsidiary procedure
2691 to Freeze_Entity. In addition to the previous processing steps
2692 at the freeze point of an object, this procedure also handles
2693 aggregates in object declarations, when the declaration carries
2694 delayed aspects that require that the initialization of the
2695 object be attached to its freeze actions.
2697 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2699 * sem_ch6.adb (Analyze_Subprogram_Declaration): Following
2700 AI12-0147, null procedures and expression functions are allowed
2701 in protected bodies.
2703 2015-05-12 Tristan Gingold <gingold@adacore.com>
2705 * i-cpoint.adb (Copy_Terminated_Array): Copy nothing if Length is 0.
2707 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2709 * sem_ch3.adb (Complete_Private_Subtype): Propagate
2710 Has_Delayed_Aspects flag from private to full view, to ensure
2711 that predicate functions are constructed.
2713 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2715 * sem_ch6.adb (Process_Formals): If a tagged formal is an
2716 incomplete class-wide type, the subprogram must have a delayed
2717 freeze even though the opertation is not a primitive of the
2718 type. THis ensures that the backend can recover the full view
2719 when elaborating the subprogram declaration.
2721 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2723 * exp_util.adb (Get_Current_Value_Condition): Nothing to be
2724 done if an elsif part has been rewritten so that it is not part
2725 of an enclosing if_statement.
2727 2015-05-12 Robert Dewar <dewar@adacore.com>
2729 * sem_type.adb, sem_ch10.adb, freeze.adb, sem_ch6.adb, exp_disp.adb:
2732 2015-05-12 Bob Duff <duff@adacore.com>
2734 * exp_attr.adb (Size): Remove unnecessary check for types with
2735 unknown discriminants. That was causing the compiler to build
2736 a function call _size(T), where T is a type, not an object.
2738 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2740 * sem_ch4.adb (Extended_Primitive_Ops): Exclude overriding
2741 primitive operations of a type extension declared in the package
2742 body, to prevent duplicates in extended list.
2744 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2746 * sem_ch3.adb (Analyze_Component_Declaration): If the component is
2747 an unconstrained synchronized type with discriminants, create a
2748 constrained default subtype for it, so that the enclosing record
2749 can be given the proper size.
2750 * sem_util.adb (Build_Default_Subtype): If the subtype is created
2751 for a record discriminant, do not analyze the declarztion at
2752 once because it is added to the freezing actions of the enclosing
2755 2015-05-12 Robert Dewar <dewar@adacore.com>
2757 * exp_prag.adb (Expand_N_Pragma): Rewrite ignored pragma as
2759 * namet.ads (Boolean3): Document this flag used for Ignore_Pragma.
2760 * par-prag.adb (Prag): Implement Ignore_Pragma.
2761 * sem_prag.adb: Implement Ignore_Pragma.
2762 * snames.ads-tmpl: Add entries for pragma Ignore_Pragma.
2764 2015-05-12 Javier Miranda <miranda@adacore.com>
2766 * sem_ch10.adb (Build_Shadow_Entity): Link the class-wide shadow
2767 entity with its corresponding real entity.
2768 (Decorate_Type): Unconditionally build the class-wide shadow entity of
2770 * einfo.ads, einfo.adb (Has_Non_Limited_View): New synthesized
2772 (Non_Limited_View): Moved from field 17 to field 19 be available
2773 in class-wide entities.
2774 * exp_attr.adb (Access_Cases): Code cleanup.
2775 * exp_disp.adb (Expand_Interface_Actuals): Ditto.
2776 * exp_util.adb (Non_Limited_Designated_Type): Ditto.
2777 * freeze.adb (Build_Renamed_Bdody): Ditto.
2778 * sem_aux.adb (Available_View): Ditto.
2779 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
2780 (Try_One_Prefix_Interpretation): Ditto.
2781 * sem_ch5.adb (Analyze_Assignment): Ditto.
2782 * sem_ch6.adb (Detect_And_Exchange): Ditto.
2783 * sem_ch8.adb (Find_Expanded_Name): Ditto.
2784 * sem_disp.adb (Check_Controlling_Type): Ditto.
2785 * sem_res.adb (Resolve_Type_Conversion): Ditto.
2786 (Full_Designated_Type): Ditto.
2787 * sem_type.adb (Covers): Ditto.
2788 * sem_util.adb: Fix typo in comment.
2790 2015-05-12 Robert Dewar <dewar@adacore.com>
2792 * exp_unst.adb (Get_Real_Subp): New subprogram.
2793 (Unnest_Subprogram): Use Get_Real_Subp.
2794 (Uplev_Refs_For_One_Subp): Skip if no ARECnU entity.
2795 (Uplev_Refs_For_One_Subp): Use actual subtype in unconstrained case.
2797 2015-05-12 Robert Dewar <dewar@adacore.com>
2799 * a-reatim.adb ("/"): Add explicit check for Time_Span_First / -1.
2801 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2803 * sem_ch4.adb (Extended_Primitive_Ops): New subprogram,
2804 auxiliary to Try_Primitive_Operation to handle properly prefixed
2805 calls where the operation is not a primitive of the type, but
2806 is declared in the package body that is in the immediate scope
2809 2015-05-12 Robert Dewar <dewar@adacore.com>
2811 * sem_util.adb (Is_Variable): Allow X'Deref(Y) as a variable.
2813 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2815 * sem_ch8.adb (Find_Expanded_Name): Handle properly a fully
2816 qualified name for an instance of a generic grand-child unit in
2817 the body its parent.
2819 2015-05-12 Robert Dewar <dewar@adacore.com>
2821 * exp_unst.adb (Upref_Name): New subprogram.
2822 (Unnest_Subprogram): Use Upref_Name.
2823 (Unnest_Subprogram): Use new Deref attribute.
2824 * exp_unst.ads: Doc updates.
2826 2015-05-12 Thomas Quinot <quinot@adacore.com>
2828 * adaint.c: Enable Large File Support in adaint so that __gnat_readdir
2829 can access files on filesystems mounted from servers that use large
2832 2015-05-09 Eric Botcazou <ebotcazou@adacore.com>
2834 * gcc-interface/utils.c (gnat_write_global_declarations): Use type_decl
2835 method instead of global_decl for TYPE_DECLs.
2837 2015-04-27 Jim Wilson <jim.wilson@linaro.org>
2839 * gcc-interface/Makefile-lan.in (ada.mostlyclean): Remove gnatbind
2842 2015-04-13 Eric Botcazou <ebotcazou@adacore.com>
2844 * gnatvsn.ads (Library_Version): Bump to 6.
2846 2015-04-09 Iain Sandoe <iain@codesourcery.com>
2848 * gcc-interface/Makefile.in (darwin, powerpc): Enable atomics.
2850 2015-04-08 Eric Botcazou <ebotcazou@adacore.com>
2852 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Do not make
2853 a function returning an unconstrained type 'const' for the middle-end.
2855 * gcc-interface/trans.c (Pragma_to_gnu) <case Pragma_Warning>: Use
2856 exact condition to detect Reason => "..." pattern.
2858 2015-03-31 Tom de Vries <tom@codesourcery.com>
2861 * terminals.c (child_setup_tty): Fix warning 'argument to sizeof in
2862 bzero call is the same expression as the destination'.
2864 2015-03-26 Eric Botcazou <ebotcazou@adacore.com>
2866 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Deref>: New case.
2868 2015-03-24 Gary Dismukes <dismukes@adacore.com>
2870 * sem_ch3.adb: Minor typo fix (missing paren).
2872 2015-03-24 Robert Dewar <dewar@adacore.com>
2874 * sinfo.ads: Update comment.
2876 2015-03-24 Robert Dewar <dewar@adacore.com>
2878 * exp_attr.adb: Add entry for typ'Deref.
2879 * sem_attr.adb (Deref): New GNAT attribute.
2880 * sem_attr.ads: Add entry for new GNAT attribute Deref.
2881 * snames.ads-tmpl: Add entries for new attribute Deref.
2883 2015-03-24 Ed Schonberg <schonberg@adacore.com>
2885 * sem_ch13.adb (Rep_Item_Too_Early): allow pragma Convention
2888 2015-03-24 Gary Dismukes <dismukes@adacore.com>
2890 * inline.adb: Minor typo fix.
2892 2015-03-24 Arnaud Charlet <charlet@adacore.com>
2894 * doc/gnat_ugn/building_executable_programs_with_gnat.rst,
2895 doc/gnat_ugn/gnat_utility_programs.rst
2896 doc/gnat_rm/implementation_defined_attributes.rst
2897 doc/gnat_rm/implementation_defined_pragmas.rst
2898 doc/gnat_rm/representation_clauses_and_pragmas.rst
2899 doc/gnat_rm/about_this_guide.rst
2900 doc/gnat_rm/implementation_of_ada_2012_features.rst: Doc improvements.
2901 * gnat_rm.texi, gnat_ugn.texi: Regenerate.
2903 2015-03-23 Jakub Jelinek <jakub@redhat.com>
2906 * adadecode.c (ada_demangle): Guard with IN_RTS instead of IN_GCC.
2908 2015-03-20 Eric Botcazou <ebotcazou@adacore.com>
2911 * gcc-interface/utils.c (gnat_pushdecl): Tidy up and improve comment.
2912 Make sure to chain only main variants through TYPE_NEXT_PTR_TO.
2914 * gcc-interface/trans.c (Attribute_to_gnu): Revert latest change.
2916 2015-03-16 Eric Botcazou <ebotcazou@adacore.com>
2918 * gcc-interface/utils2.c (gnat_invariant_expr): Return null if the type
2919 of the expression ends up being composite.
2921 2015-03-16 Eric Botcazou <ebotcazou@adacore.com>
2923 * gcc-interface/decl.c (is_from_limited_with_of_main): New predicate.
2924 (gnat_to_gnu_entity) <E_Subprogram_Type>: Invoke it on return and
2925 parameter types to detect circularities in ASIS mode.
2926 * gcc-interface/trans.c (Attribute_to_gnu): Mention AI05-0151.
2928 2015-03-16 Eric Botcazou <ebotcazou@adacore.com>
2930 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Abstract_State>: Do not
2931 short-circuit the regular handling.
2933 2015-03-13 Robert Dewar <dewar@adacore.com>
2935 * exp_unst.adb (Note_Uplevel_Reference): Eliminate duplicate
2937 (Actual_Ref): New function.
2938 (AREC_String): Minor reformatting.
2939 (Unnest_Subprogram): Use Actual_Ref.
2940 * frontend.adb (Frontend): Turn off Unnest_Subprogram_Mode
2941 before call to Instantiate_Bodies.
2943 2015-03-13 Ed Schonberg <schonberg@adacore.com>
2945 * freeze.adb (Freeze_Profile): If the return type of a function
2946 being frozen is an untagged limited view and the function is
2947 abstract, mark the type as frozen because there is no later
2948 point at which the profile of the subprogram will be elaborated.
2950 2015-03-13 Robert Dewar <dewar@adacore.com>
2952 * einfo.adb, einfo.ads, atree.adb, atree.ads, atree.h: Add seventh
2953 component to entities. Add new fields Field36-41 and Node36-41.
2955 2015-03-13 Claire Dross <dross@adacore.com>
2957 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Rewrite after review.
2959 2015-03-13 Robert Dewar <dewar@adacore.com>
2961 * exp_util.adb (Is_Volatile_Reference): Compile time known
2962 value is never considered to be a volatile reference.
2964 2015-03-13 Robert Dewar <dewar@adacore.com>
2966 * sem_ch3.adb (Analyze_Object_Contract): Suppress "constant
2967 cannot be volatile" for internally generated object (such as
2968 FIRST and LAST constants).
2970 2015-03-13 Ed Schonberg <schonberg@adacore.com>
2972 * sem_ch12.adb (Validate_Access_Subprogram_Instance): If a
2973 convention is specified for the formal parameter, verify that
2974 the actual has the same convention.
2975 * sem_prag.adb (Set_Convention_From_Pragma): Allow convention
2976 pragma to be set on a generic formal type.
2977 * sem_util.adb (Set_Convention): Ignore within an instance,
2978 as it has already been verified in the generic unit.
2980 2015-03-13 Claire Dross <dross@adacore.com>
2982 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do not inline
2983 subprograms with unconstrained record parameters containing
2985 * sinfo.ads Document GNATprove assumption that type should match
2987 * sem_ch6.adb (Analyze_Subprogram_Body_Contract):
2988 Do not check for Refined_Depends and Refined_Globals contracts
2989 as they are optional.
2991 2015-03-13 Ed Schonberg <schonberg@adacore.com>
2993 * sem_ch12.adb (Instantiate_Type): For a floating-point type,
2994 capture dimension info if any, because the generated subtype
2995 declaration does not come from source and will not process dimensions.
2996 * sem_dim,adb (Analyze_Dimension_Extension_Or_Record_Aggregate):
2997 Do not analyze expressions with an initialization procedure
2998 because aggregates will have been checked at the point of record
3001 2015-03-13 Robert Dewar <dewar@adacore.com>
3003 * aspects.ads, aspects.adb: Add entries for aspect Unimplemented.
3004 * einfo.ads, einfo.adb (Is_Unimplemented): New flag.
3005 * sem_ch13.adb: Add dummy entry for aspect Unimplemented.
3006 * snames.ads-tmpl: Add entry for Name_Unimplemented.
3008 2015-03-13 Gary Dismukes <dismukes@adacore.com>
3010 * style.adb (Missing_Overriding): Apply the
3011 Comes_From_Source test to the Original_Node of the subprogram
3012 node, to handle the case of a null procedure declaration that
3013 has been rewritten as an empty procedure body.
3015 2015-03-13 Robert Dewar <dewar@adacore.com>
3017 * exp_util.ads: Minor fix to comment.
3018 * sem_ch3.adb (Constrain_Index): Correct pasto from previous
3021 2015-03-13 Robert Dewar <dewar@adacore.com>
3023 * exp_util.ads, exp_util.adb (Force_Evaluation): Add Related_Id and
3024 Is_Low/High_Bound params.
3025 * sem_ch3.adb (Constrain_Index): Use new Force_Evaluation calling
3026 sequence to simplify generation of FIRST/LAST temps for bounds.
3028 2015-03-12 Olivier Hainque <hainque@adacore.com>
3030 * gcc-interface/trans.c (Attribute_to_gnu) <Code_Address case>:
3031 On targets where a function symbol designates a function descriptor,
3032 fetch the function code address from the descriptor.
3033 (USE_RUNTIME_DESCRIPTORS): Provide a default definition.
3035 2015-03-04 Robert Dewar <dewar@adacore.com>
3037 * sem_warn.adb: Minor reformatting.
3038 * init.c: Minor tweaks.
3040 2015-03-04 Dmitriy Anisimko <anisimko@adacore.com>
3042 * a-coinho-shared.adb: Fix clear of already empty holder.
3044 2015-03-04 Robert Dewar <dewar@adacore.com>
3046 * exp_unst.adb (Check_Dynamic_Type): Ignore library level types.
3047 (Check_Uplevel_Reference_To_Type): Ignore call inside generic.
3048 (Note_Uplevel_Reference): Ignore call inside generic.
3049 (Note_Uplevel_Reference): Fix check for no entity field.
3050 (Unnest_Subprogram): Ignore call inside generic.
3051 (Find_Current_Subprogram): Use Defining_Entity, not Defining_Unit_Name.
3052 (Visit_Node): Ignore calls to Imported subprograms.
3053 (Visit_Node): Fix problem in finding subprogram body in some cases.
3054 (Add_Form_To_Spec): Use Defining_Entity, not Defining_Unit_Name.
3056 2015-03-04 Robert Dewar <dewar@adacore.com>
3058 * einfo.adb (Is_ARECnF_Entity): Removed.
3059 (Last_Formal): Remove special handling of Is_ARECnF_Entity.
3060 (Next_Formal): Remove special handling of Is_ARECnF_Entity.
3061 (Next_Formal_With_Extras): Remove special handling of Is_ARECnF_Entity.
3062 (Number_Entries): Minor reformatting.
3063 * einfo.ads (Is_ARECnF_Entity): Removed.
3064 * exp_unst.adb (Unnest_Subprogram): Remove setting of
3066 (Add_Extra_Formal): Use normal Extra_Formal circuit.
3067 * sprint.adb (Write_Param_Specs): Properly handle case where
3068 there are no source formals, but we have at least one Extra_Formal
3071 2015-03-04 Ed Schonberg <schonberg@adacore.com>
3073 * sem_aggr.adb (Resolve_Record_Aggregate,
3074 Add_Discriminant_Values): If the value is a reference to the
3075 current instance of an enclosing type, use its base type to check
3076 against prefix of attribute reference, because the target type
3077 may be otherwise constrained.
3079 2015-03-04 Robert Dewar <dewar@adacore.com>
3081 * atree.h: Add entries for Flag287-Flag309.
3082 * einfo.adb: Add (unused) flags Flag287-Flag309.
3084 2015-03-04 Ed Schonberg <schonberg@adacore.com>
3086 * sem_util.adb (Collect_Interfaces, Collect): When gathering
3087 interfaces of ancestors, handle properly a subtype of a private
3090 2015-03-04 Robert Dewar <dewar@adacore.com>
3092 * einfo.adb (Is_ARECnF_Entity): New flag (ARECnF is an extra formal).
3093 (Next_Formal): Don't return ARECnF formal.
3094 (Last_Formal): Don't consider ARECnF formal.
3095 (Next_Formal_With_Extras): Do consider ARECnF formal.
3096 * einfo.ads (Is_ARECnF_Entity): New flag (ARECnF is an extra formal).
3097 * exp_unst.adb (Create_Entities): Set Is_ARECnF_Entity flag.
3099 2015-03-04 Javier Miranda <miranda@adacore.com>
3101 * exp_ch6.adb (Expand_Simple_Function_Return): When the returned
3102 object is a class-wide interface object and we generate the
3103 accessibility described in RM 6.5(8/3) then displace the pointer
3104 to the object to reference the base of the object (to get access
3105 to the TSD of the object).
3107 2015-03-04 Hristian Kirtchev <kirtchev@adacore.com>
3109 * sem_prag.adb (Analyze_Abstract_State): Use routine
3110 Malformed_State_Error to issue general errors.
3111 (Analyze_Pragma): Diagnose a syntax error related to a state
3112 declaration with a simple option.
3113 (Malformed_State_Error): New routine.
3115 2015-03-04 Robert Dewar <dewar@adacore.com>
3117 * a-strsup.adb (Super_Slice): Deal with super flat case.
3118 * einfo.ads: Minor reformatting.
3119 * s-imgdec.adb (Set_Decimal_Digits): Add comment about possibly
3122 2015-03-04 Claire Dross <dross@adacore.com>
3124 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
3125 a-cforse.ads, a-cofove.ads: Use Default_Initial_Condition on formal
3128 2015-03-04 Ed Schonberg <schonberg@adacore.com>
3130 * sem_warn.adb (Check_References): When checking for an unused
3131 in-out parameter of a class- wide type, use its type to determine
3132 whether it is private, in order to avoid a spurious warning when
3133 subprogram spec and body are in different units.
3135 2015-03-04 Yannick Moy <moy@adacore.com>
3137 * sem_attr.adb: Improve warning messages.
3139 2015-03-04 Robert Dewar <dewar@adacore.com>
3141 * exp_ch6.adb (Expand_N_Subprogram_Body): Avoid trying to unnest
3142 generic subprograms.
3143 * exp_unst.adb (Check_Dynamic_Type): Handle record types properly
3144 (Note_Uplevel_Reference): Ignore uplevel references to non-types
3145 (Get_Level): Consider only subprograms, not blocks.
3146 (Visit_Node): Set proper condition for generating ARECnF entity.
3147 Ignore indirect calls. Ignore calls to subprograms
3149 (Unnest_Subprogram): Minor changes in dealing with ARECnF entity.
3150 (Add_Form_To_Spec): Properly set Last_Entity field.
3151 (Unnest_Subprogram): Set current subprogram scope for analyze calls.
3152 Handle case of no uplevel refs in outer subprogram
3153 Don't mark uplevel entities as aliased.
3154 Don't deal with calls with no ARECnF requirement.
3156 2015-03-04 Robert Dewar <dewar@adacore.com>
3158 * s-valrea.adb (Scan_Real): Remove redundant tests from scaling loops.
3159 * s-imgdec.adb (Set_Decimal_Digits): Remove redundant Max
3160 operation in computing LZ.
3161 * sem_attr.adb: Minor typo fix
3163 2015-03-04 Robert Dewar <dewar@adacore.com>
3165 * exp_ch7.adb: Minor reformatting.
3166 * exp_unst.adb (Build_Tables): Fix minor glitch for no separate
3168 * erroutc.adb (Delete_Msg): add missing decrement of info msg counter.
3170 2015-03-04 Hristian Kirtchev <kirtchev@adacore.com>
3172 * exp_ch6.adb (Build_Pragma_Check_Equivalent): Suppress
3173 references to formal parameters subject to pragma Unreferenced.
3174 (Suppress_Reference): New routine.
3175 * sem_attr.adb (Analyze_Attribute): Reimplement the analysis
3176 of attribute 'Old. Attributes 'Old and 'Result now share
3178 (Analyze_Old_Result_Attribute): New routine.
3179 (Check_Placement_In_Check): Removed.
3180 (Check_Placement_In_Contract_Cases): Removed.
3181 (Check_Placement_In_Test_Case): Removed.
3182 (Check_Use_In_Contract_Cases): Removed.
3183 (Check_Use_In_Test_Case): Removed.
3184 (In_Refined_Post): Removed.
3185 (Is_Within): Removed.
3186 * sem_warn.adb (Check_Low_Bound_Tested): Code cleanup.
3187 (Check_Low_Bound_Tested_For): New routine.
3189 2015-03-04 Hristian Kirtchev <kirtchev@adacore.com>
3191 * exp_ch3.adb (Expand_N_Object_Declaration):
3192 Generate a runtime check to test the expression of pragma
3193 Default_Initial_Condition when the object is default initialized.
3195 2015-03-02 Robert Dewar <dewar@adacore.com>
3197 * scng.adb (Scan): Ignore illegal character in relaxed
3200 2015-03-02 Ed Schonberg <schonberg@adacore.com>
3202 * sem_ch4.adb (Analyze_Set_Membership); Retain Overloaded flag
3203 on left operand, so it can be properly resolved with type of
3204 alternatives of right operand.
3205 * sem_res.adb (Resolve_Set_Membership): Handle properly an
3206 overloaded left-hand side when the alternatives on the right
3207 hand side are literals of some universal type. Use first
3208 non-overloaded alternative to find expected type.
3210 2015-03-02 Ed Schonberg <schonberg@adacore.com>
3212 * exp_ch7.adb (Make_Set_Finalize_Address_Call): Use underlying
3213 type to retrieve designated type, because the purported access
3214 type may be a partial (private) view, when it is declared in
3215 the private part of a nested package, and finalization actions
3216 are generated when completing compilation of enclosing unit.
3218 2015-03-02 Robert Dewar <dewar@adacore.com>
3220 * back_end.adb (Call_Back_End): Remove previous patch,
3221 the back end now gets to see the result of -gnatd.1
3222 (Unnest_Subprogram_Mode) processing.
3223 * elists.ads, elists.adb (List_Length): New function.
3224 * exp_unst.ads, exp_unst.adb: Major changes, first complete version.
3225 * sem_util.adb (Check_Nested_Access): Handle formals in
3226 Unnest_Subprogram_Mode.
3227 (Adjust_Named_Associations): Minor reformatting.
3228 * sprint.adb (Sprint_Node_Actual): Fix failure to print aliased
3231 2015-03-02 Robert Dewar <dewar@adacore.com>
3233 * atree.ads, atree.adb (Uint24): New function
3234 (Set_Uint24): New procedure.
3235 * atree.h (Uint24): New macro for field access.
3236 * back_end.adb (Call_Back_End): For now, don't call back end
3237 if unnesting subprogs.
3238 * einfo.adb (Activation_Record_Component): New field
3239 (Subps_Index): New field.
3240 * einfo.ads (Activation_Record_Component): New field
3241 (Subps_Index): New field Minor reordering of comments into alpha order.
3242 * exp_unst.ads, exp_unst.adb: Continued development.
3244 2015-03-02 Gary Dismukes <dismukes@adacore.com>
3246 * exp_disp.ads: Minor reformatting.
3248 2015-03-02 Ed Schonberg <schonberg@adacore.com>
3250 * sem_ch8.adb (Chain_Use_Clause): Do not chain use clause from
3251 ancestor to list of use clauses active in descendant unit if we
3252 are within the private part of an intervening parent, to prevent
3253 circularities in use clause list.
3255 2015-03-02 Javier Miranda <miranda@adacore.com>
3257 * exp_ch9.adb (Build_Corresponding_Record): Propagate type
3258 invariants to the corresponding record type.
3259 * exp_disp.ad[sb] (Set_DT_Position_Value): New subprogram
3260 which sets the value of the DTC_Entity associated with a given
3261 primitive of a tagged type and propagates the value to the
3263 (Set_DTC_Entity_Value): Propagate the DTC
3264 value to the wrapped entity.
3265 * sem_ch13.adb (Build_Invariant_Procedure): Append the code
3266 associated with invariants of progenitors.
3267 * sem_ch3.adb (Build_Derived_Record_Type): Inherit type invariants
3268 of parents and progenitors.
3269 (Process_Full_View): Check hidden inheritance of class-wide type
3271 * sem_ch7.adb (Analyze_Package_Specification): Do not generate
3272 the invariant procedure for interface types; build the invariant
3273 procedure for tagged types inheriting invariants from their
3275 * sem_prag.adb (Pragma_Invariant) Allow invariants in interface
3276 types but do not build their invariant procedure since their
3277 invariants will be propagated to the invariant procedure of
3278 types covering the interface.
3279 * exp_ch6.adb, exp_disp.adb, sem_ch3.adb, sem_ch7.adb,
3280 sem_ch8.adb, sem_disp.adb: Replace all calls to Set_DT_Position
3281 by calls to Set_DT_Position_Value.
3283 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
3285 * sem_attr.adb (Analyze_Attribute): Factor out heavily indented
3286 code in Denote_Same_Function. Do not analyze attribute 'Result
3287 when it is inside procedure _Postconditions. Remove a misplaced
3288 warning diagnostic. Code cleanup.
3289 (Denote_Same_Function): New routine.
3290 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Code
3291 cleanup. Warn on pre/postconditions on an inlined subprogram.
3292 (Analyze_Pragma, Refined_Post case): Warn on pre/postconditions on
3293 an inlined subprogram.
3294 (Analyze_Pre_Post_Condition_In_Decl_Part): Code cleanup. Warn on
3295 pre/post condition on an inlined subprogram.
3296 (Analyze_Test_Case_In_Decl_Part): Code cleanup. Warn on
3297 pre/postconditions on an inlined subprogram.
3298 (Check_Postcondition_Use_In_Inlined_Subprogram): New routine.
3300 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
3302 * sem_prag.adb (Ensure_Aggregate_Form):
3303 Ensure that the name denoted by the Chars of a pragma argument
3304 association has the proper Sloc when converted into an aggregate.
3306 2015-03-02 Bob Duff <duff@adacore.com>
3308 * sem_ch6.adb (Check_Private_Overriding): Capture
3309 Incomplete_Or_Partial_View in a constant. This is cleaner and
3312 2015-03-02 Gary Dismukes <dismukes@adacore.com>
3314 * einfo.ads, exp_unst.ads: Minor reformatting.
3316 2015-03-02 Ed Schonberg <schonberg@adacore.com>
3318 * a-strsea.adb (Find_Token): Ensure that the range of iteration
3319 does not perform any improper character access. This prevents
3320 erroneous access in the unusual case of an empty string target
3321 and a From parameter less than Source'First.
3323 2015-03-02 Robert Dewar <dewar@adacore.com>
3325 * elists.adb (List_Length): Fix incorrect result.
3327 2015-03-02 Bob Duff <duff@adacore.com>
3329 * sem_ch6.adb (Check_Private_Overriding): Refine the legality
3330 checks here. It used to check that the function is merely
3331 overriding SOMEthing. Now it checks that the function is
3332 overriding a corresponding public operation. This is a correction
3333 to the implementation of the rule in RM-3.9.3(10).
3335 2015-03-02 Robert Dewar <dewar@adacore.com>
3337 * debug.adb: Document new debug flag -gnatd.1.
3338 * einfo.ads, einfo.adb (Has_Nested_Subprogram): New flag.
3339 (Has_Uplevel_Reference): New flag (Is_Static_Type): New flag.
3340 (Uplevel_Reference_Noted):New flag (Uplevel_References): New field.
3341 * elists.ads elists.adb (List_Length): New function.
3342 * exp_ch6.adb (Expand_N_Subprogram_Body): Call Unnest_Subprogram
3343 when appropriate (Process_Preconditions): Minor code
3344 reorganization and reformatting
3345 * exp_unst.ads, exp_unst.adb: New files.
3346 * gnat1drv.adb (Adjust_Global_Switches): Set
3347 Unnest_Subprogram_Mode if -gnatd.1
3348 * namet.ads, namet.adb (Name_Find_Str): New version of Name_Find with
3350 * opt.ads (Unnest_Subprogram_Mode): New flag.
3351 * par-ch3.adb (P_Identifier_Declarations): Fixes to -gnatd.2 handling.
3352 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set
3353 Has_Nested_Subprogram flag.
3354 * sem_ch8.adb (Find_Direct_Name): New calling sequence for
3355 Check_Nested_Access.
3356 (Find_Selected_Component): Minor comment addition.
3357 * sem_util.adb (Check_Nested_Access): New version for use with Exp_Unst.
3358 (Note_Possible_Modification): New calling sequence for
3359 Check_Nested_Access.
3360 * sem_util.ads (Check_Nested_Access): New version for use with Exp_Unst.
3361 * gcc-interface/Make-lang.in (GNAT1_OBJS): Add exp_unst.o
3363 2015-03-02 Pierre-Marie de Rodat <derodat@adacore.com>
3365 * gcc-interface/utils.c (gnat_pushdecl): For non-artificial pointer
3366 types, preserve the original type and create copies just like the C
3367 front-end does. For artificial ones, do not define a name for
3369 (create_type_decl): When gnat_pushdecl made the input type the
3370 original type for the new declaration, do not define a stub
3372 * gcc-interface/utils2.c (build_binary_op): Accept two different
3373 pointer types when they point to the same type.
3375 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
3377 * exp_util.adb (Possible_Bit_Aligned_Component): Do not process
3379 * sem_util.adb (Kill_Current_Values): Do not invalidate and
3382 2015-03-02 Robert Dewar <dewar@adacore.com>
3384 * sem_ch3.adb, exp_attr.adb, checks.adb, exp_aggr.adb: Minor
3387 2015-03-02 Ed Schonberg <schonberg@adacore.com>
3389 * sem_ch8.adb: extend use of Available_Subtype.
3391 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
3393 * sem_prag.adb (Duplication_Error): Remove the special handling
3394 of 'Class or _Class in the context of pre/postconditions.
3395 (Process_Class_Wide_Condition): Remove the special handling of
3396 'Class or _Class in the context of pre/postconditions.
3397 * sem_util.adb (Original_Aspect_Pragma_Name): Names Pre_Class
3398 and Post_Class no longer need to be converted to _Pre and _Post.
3399 * sem_util.ads (Original_Aspect_Pragma_Name): Update the comment
3402 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
3404 * exp_ch6.adb (Process_Preconditions): Modify the
3405 mechanism that find the first source declaration to correct exit
3406 the loop once it has been found.
3408 2015-03-02 Gary Dismukes <dismukes@adacore.com>
3410 * a-strsea.adb: Minor typo fix.
3412 2015-03-02 Bob Duff <duff@adacore.com>
3414 * einfo.ads: Minor comment fixes.
3416 2015-03-02 Gary Dismukes <dismukes@adacore.com>
3418 * einfo.adb, checks.adb: Minor reformatting and typo fixes.
3420 2015-03-02 Ed Schonberg <schonberg@adacore.com>
3422 * exp_aggr.adb (Get_Assoc_Expr): If the Default_Component_Value
3423 is defined for the array type, use it instead of a Default_Value
3424 specified for the component type itself.
3426 2015-03-02 Thomas Quinot <quinot@adacore.com>
3428 * exp_attr.adb (Expand_N_Attribute_Reference, case Input): When
3429 expanding a 'Input attribute reference for a class-wide type,
3430 do not generate a separate object declaration for the controlling
3431 tag dummy object; instead, generate the expression inline in the
3432 dispatching call. Otherwise, the declaration (which involves a
3433 call to String'Input, returning a dynamically sized value on the
3434 secondary stack) will be expanded outside of proper secondary
3435 stack mark/release operations, and will thus cause a secondary
3438 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
3440 * checks.adb (Add_Validity_Check): Change the names of all
3441 formal parameters to better illustrate their purpose. Update
3442 the subprogram documentation. Update all occurrences of the
3443 formal parameters. Generate a pre/postcondition pragma by
3444 calling Build_Pre_Post_Condition.
3445 (Build_PPC_Pragma): Removed.
3446 (Build_Pre_Post_Condition): New routine.
3447 * einfo.adb Node8 is no longer used as Postcondition_Proc. Node14
3448 is now used as Postconditions_Proc. Flag240 is now renamed to
3449 Has_Expanded_Contract. (First_Formal): The routine can now
3450 operate on generic subprograms.
3451 (First_Formal_With_Extras): The routine can now operate on generic
3453 (Has_Expanded_Contract): New routine.
3454 (Has_Postconditions): Removed.
3455 (Postcondition_Proc): Removed.
3456 (Postconditions_Proc): New routine.
3457 (Set_Has_Expanded_Contract): New routine.
3458 (Set_Has_Postconditions): Removed.
3459 (Set_Postcondition_Proc): Removed.
3460 (Set_Postconditions_Proc): New routine.
3461 (Write_Entity_Flags): Remove the output of Has_Postconditions. Add
3462 the output of Has_Expanded_Contract.
3463 (Write_Field8_Name): Remove the output of Postcondition_Proc.
3464 (Write_Field14_Name): Add the output of Postconditions_Proc.
3465 * einfo.ads New attributes Has_Expanded_Contract and
3466 Postconditions_Proc along with occurrences in entities.
3467 Remove attributes Has_Postconditions and Postcondition_Proc
3468 along with occurrences in entities.
3469 (Has_Expanded_Contract): New routine along with pragma Inline.
3470 (Has_Postconditions): Removed along with pragma Inline.
3471 (Postcondition_Proc): Removed along with pragma Inline.
3472 (Postconditions_Proc): New routine along with pragma Inline.
3473 (Set_Has_Expanded_Contract): New routine along with pragma Inline.
3474 (Set_Has_Postconditions): Removed along with pragma Inline.
3475 (Set_Postcondition_Proc): Removed along with pragma Inline.
3476 (Set_Postconditions_Proc): New routine along with pragma Inline.
3477 * exp_ch6.adb (Add_Return): Code cleanup. Update the
3478 generation of the call to the _Postconditions routine of
3479 the procedure. (Expand_Non_Function_Return): Reformat the
3480 comment on usage. Code cleanup. Update the generation of
3481 the call to the _Postconditions routine of the procedure or
3483 (Expand_Simple_Function_Return): Update the
3484 generation of the _Postconditions routine of the function.
3485 (Expand_Subprogram_Contract): Reimplemented.
3486 * exp_ch6.ads (Expand_Subprogram_Contract): Update the parameter
3487 profile along the comment on usage.
3488 * exp_ch9.adb (Build_PPC_Wrapper): Code cleanup.
3489 (Expand_N_Task_Type_Declaration): Generate pre/postconditions
3490 wrapper when the entry [family] has a contract with
3492 * exp_prag.adb (Expand_Attributes_In_Consequence): New routine.
3493 (Expand_Contract_Cases): This routine and its subsidiaries now
3494 analyze all generated code.
3495 (Expand_Old_In_Consequence): Removed.
3496 * sem_attr.adb Add with and use clause for Sem_Prag.
3497 (Analyze_Attribute): Reimplment the analysis of attribute 'Result.
3498 (Check_Use_In_Test_Case): Use routine Test_Case_Arg to obtain
3500 * sem_ch3.adb (Analyze_Declarations): Analyze the contract of
3501 a generic subprogram.
3502 (Analyze_Object_Declaration): Do not create a contract node.
3503 (Derive_Subprogram): Do not create a contract node.
3504 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Do
3505 not create a contract node.
3506 (Analyze_Completion_Contract): New routine.
3507 (Analyze_Function_Return): Alphabetize.
3508 (Analyze_Generic_Subprogram_Body): Alphabetize. Do not create a
3509 contract node. Do not copy pre/postconditions to the original
3511 (Analyze_Null_Procedure): Do not create a contract node.
3512 (Analyze_Subprogram_Body_Contract): Reimplemented.
3513 (Analyze_Subprogram_Body_Helper): Do not mark the enclosing scope
3514 as having postconditions. Do not create a contract node. Analyze
3515 the subprogram body contract of a body that acts as a compilation
3516 unit. Expand the subprogram contract after the declarations have
3518 (Analyze_Subprogram_Contract): Reimplemented.
3519 (Analyze_Subprogram_Specification): Do not create a contract node.
3520 (List_Inherited_Pre_Post_Aspects): Code cleanup.
3521 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Update the
3523 (Analyze_Subprogram_Contract): Update the
3524 parameter profile and the comment on usage.
3525 * sem_ch7.adb (Analyze_Package_Body_Helper): Do not create a
3527 (Analyze_Package_Declaration): Do not create a
3529 (Is_Subp_Or_Const_Ref): Ensure that the prefix has an entity.
3530 * sem_ch8.adb (Analyze_Subprogram_Renaming): Do not create a
3532 * sem_ch9.adb (Analyze_Entry_Declaration): Do not create a
3534 * sem_ch10.adb (Analyze_Compilation_Unit): Move local variables to
3535 their proper section and alphabetize them. Analyze the contract of
3536 a [generic] subprogram after all Pragmas_After have been analyzed.
3537 (Analyze_Subprogram_Body_Stub_Contract): Alphabetize.
3538 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Do not
3539 create a contract node.
3540 (Analyze_Generic_Subprogram_Declaration):
3541 Alphabetize local variables. Do not create a contract
3542 node. Do not generate aspects out of pragmas for ASIS.
3543 (Analyze_Subprogram_Instantiation): Instantiate
3544 the contract of the subprogram. Do not create a
3545 contract node. (Instantiate_Contract): New routine.
3546 (Instantiate_Subprogram_Body): Alphabetize local variables.
3547 (Save_Global_References_In_Aspects): New routine.
3548 (Save_References): Do not save the global references found within
3549 the aspects of a generic subprogram.
3550 * sem_ch12.ads (Save_Global_References_In_Aspects): New routine.
3551 * sem_ch13.adb (Analyze_Aspect_Specifications): Do not use
3552 Original_Node for establishing linkages.
3553 (Insert_Pragma): Insertion in a subprogram body takes precedence over
3554 the case where the subprogram body is also a compilation unit.
3555 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Use
3556 Get_Argument to obtain the proper expression. Install the generic
3557 formals when the related context is a generic subprogram.
3558 (Analyze_Depends_In_Decl_Part): Use Get_Argument to obtain
3559 the proper expression. Use Corresponding_Spec_Of to obtain
3560 the spec. Install the generic formal when the related context
3561 is a generic subprogram.
3562 (Analyze_Global_In_Decl_Part): Use Get_Argument to obtain the proper
3563 expression. Use Corresponding_Spec_Of to obtain the spec. Install the
3564 generic formal when the related context is a generic subprogram.
3565 (Analyze_Initial_Condition_In_Decl_Part): Use Get_Argument
3566 to obtain the proper expression. Remove the call to
3567 Check_SPARK_Aspect_For_ASIS as the analysis is now done
3569 (Analyze_Pragma): Update all occurrences
3570 to Original_Aspect_Name. Pragmas Contract_Cases, Depends,
3571 Extensions_Visible, Global, Postcondition, Precondition and
3572 Test_Case now carry generic templates when the related context
3573 is a generic subprogram. The same pragmas are no longer
3574 forcefully fully analyzed when the context is a subprogram
3575 that acts as a compilation unit. Pragmas Abstract_State,
3576 Initial_Condition, Initializes and Refined_State have been clean
3577 up. Pragmas Post, Post_Class, Postcondition, Pre, Pre_Class
3578 and Precondition now use the same routine for analysis. Pragma
3579 Refined_Post does not need to check the use of 'Result or
3580 the lack of a post-state in its expression. Reimplement the
3581 analysis of pragma Test_Case.
3582 (Analyze_Pre_Post_Condition): New routine.
3583 (Analyze_Pre_Post_Condition_In_Decl_Part):
3585 (Analyze_Refined_Depends_In_Decl_Part): Use Get_Argument to obtain the
3587 (Analyze_Refined_Global_In_Decl_Part): Use Get_Argument to obtain
3588 the proper expression.
3589 (Analyze_Test_Case_In_Decl_Part): Reimplemented.
3590 (Check_Pre_Post): Removed.
3591 (Check_Precondition_Postcondition): Removed.
3592 (Check_SPARK_Aspect_For_ASIS): Removed.
3593 (Check_Test_Case): Removed.
3594 (Collect_Subprogram_Inputs_Outputs): Use Get_Argument
3595 to obtain the proper expression. Use Corresponding_Spec_Of to
3596 find the proper spec.
3597 (Create_Generic_Template): New routine.
3598 (Duplication_Error): New routine.
3599 (Expression_Function_Error): New routine.
3600 (Find_Related_Subprogram_Or_Body): Moved to the spec
3601 of Sem_Prag. Emit precise error messages. Account for cases of
3602 rewritten expression functions, generic instantiations, handled
3603 sequence of statements and pragmas from aspects.
3604 (Get_Argument): New routine.
3605 (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Removed.
3606 (Preanalyze_CTC_Args): Removed.
3607 (Process_Class_Wide_Condition): New routine.
3608 * sem_prag.ads (Analyze_Test_Case_In_Decl_Part): Update
3609 the parameter profile along with the comment on usage.
3610 (Find_Related_Subprogram_Or_Body): Moved from the body of Sem_Prag.
3611 (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Removed.
3612 (Test_Case_Arg): New routine.
3613 * sem_util.adb Add with and use clauses for Sem_Ch6.
3614 (Add_Contract_Item): This routine now creates a contract
3615 node the first time an item is added. Remove the duplicate
3616 aspect/pragma checks.
3617 (Check_Result_And_Post_State): Reimplemented.
3618 (Corresponding_Spec_Of): New routine.
3619 (Get_Ensures_From_CTC_Pragma): Removed.
3620 (Get_Requires_From_CTC_Pragma): Removed.
3621 (Has_Significant_Contract): New routine.
3622 (Inherit_Subprogram_Contract): Inherit only if the source
3624 (Install_Generic_Formals): New routine.
3625 (Original_Aspect_Name): Removed.
3626 (Original_Aspect_Pragma_Name): New routine.
3627 * sem_util.ads (Check_Result_And_Post_State): Reimplemented.
3628 (Corresponding_Spec_Of): New routine.
3629 (Get_Ensures_From_CTC_Pragma): Removed.
3630 (Get_Requires_From_CTC_Pragma): Removed.
3631 (Has_Significant_Contract): New routine.
3632 (Install_Generic_Formals): New routine.
3633 (Original_Aspect_Name): Removed.
3634 (Original_Aspect_Pragma_Name): New routine.
3635 * sem_warn.adb Add with and use clauses for Sem_Prag.
3636 (Within_Postcondition): Use Test_Case_Arg to extract "Ensures".
3638 2015-03-02 Ed Schonberg <schonberg@adacore.com>
3640 * sem_ch8.adb (Available_Subtype): Optimization in
3641 Find_Selected_Component: when safe, use existing subtype of
3642 array component, possibly discriminant-dependent, rather than
3643 creating new subtype declaration for it. In this fashion different
3644 occurrences of the component have the same subtype, rather than
3645 just equivalent ones. Simplifies value tracing in GNATProve.
3647 2015-03-01 Arnaud Charlet <charlet@adacore.com>
3651 * doc/gnat_ugn/gnat_project_manager.rst,
3652 doc/gnat_ugn/platform_specific_information.rst: Remove reference to
3653 image, too troublesome with texi format.
3654 * gnat_ugn.texi: Regenerate.
3656 2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
3659 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8): Remove.
3660 (DEF_FUNCTION_TYPE_VAR_12): Likewise.
3661 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
3663 2015-02-23 Thomas Schwinge <thomas@codesourcery.com>
3665 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8): Fix number of
3666 arguments parameter.
3667 (DEF_FUNCTION_TYPE_VAR_12): Likewise.
3669 2015-02-22 Arnaud Charlet <charlet@adacore.com>
3671 * doc/Makefile: postprocess texinfo files to update @dircategory
3672 and update texi files under gcc/ada.
3673 * gnat_ugn.texi, gnat_rm.texi: Regenerated.
3675 2015-02-22 Arnaud Charlet <charlet@adacore.com>
3677 * doc/gnat_ugn/project-manager-figure.png,
3678 doc/gnat_ugn/rtlibrary-structure.png: New.
3680 2015-02-22 Tom de Vries <tom@codesourcery.com>
3683 * gnat-style.texi (@subsection Loop Statements): Replace @noindent by
3684 @item, and fix warning '@itemize has text but no @item'.
3686 2015-02-20 Ed Schonberg <schonberg@adacore.com>
3688 * sem_prag.adb (Analyze_Pragma, case Obsolescent): Pragma
3689 legally applies to an abstract subprogram declaration.
3690 * freeze.adb: Minor comment addition.
3692 2015-02-20 Robert Dewar <dewar@adacore.com>
3694 * errout.ads: Document replacement of Name_uPre/Post/Type_Invariant.
3695 * erroutc.adb (Set_Msg_Str): Replace _xxx.
3696 (Pre/Post/Type_Invariant) by xxx'Class.
3697 * erroutc.ads (Set_Msg_Str): Replace _xxx.
3698 (Pre/Post/Type_Invariant) by xxx'Class.
3699 * sem_prag.adb (Fix_Error): Remove special casing of
3700 Name_uType_Invariant.
3701 (Analyze_Pre_Post_Condition_In_Decl_Part): Remove special casing of
3702 Name_uPre and Name_uPost in aspect case (done in Errout now).
3704 2015-02-20 Robert Dewar <dewar@adacore.com>
3706 * g-alveop.adb: Minor style fixes.
3708 2015-02-20 Robert Dewar <dewar@adacore.com>
3710 * freeze.adb (Warn_Overlay): Guard against blow up with address
3713 2015-02-20 Bob Duff <duff@adacore.com>
3715 * exp_attr.adb (May_Be_External_Call): Remove this. There is no need
3716 for the compiler to guess whether the call is internal or external --
3717 it is always external.
3718 (Expand_Access_To_Protected_Op): For P'Access, where P
3719 is a protected subprogram, always create a pointer to the
3720 External_Subprogram.
3722 2015-02-20 Robert Dewar <dewar@adacore.com>
3724 * a-dispat.adb, a-stcoed.ads: Minor reformatting.
3726 2015-02-20 Robert Dewar <dewar@adacore.com>
3728 * sem_ch13.adb (Build_Discrete_Static_Predicate): Allow static
3729 predicate for non-static subtype.
3730 (Build_Predicate_Functions): Do not assume subtype associated with a
3731 static predicate must be static.
3733 2015-02-20 Robert Dewar <dewar@adacore.com>
3735 * errout.adb (Set_Msg_Node): Better handling of internal names
3736 (Set_Msg_Node): Kill message when we cannot eliminate internal name.
3737 * errout.ads: Document additional case of message deletion.
3738 * namet.adb (Is_Internal_Name): Refined to consider wide
3739 strings in brackets notation and character literals not to be
3741 * sem_ch8.adb (Find_Selected_Component): Give additional error
3742 when selector name is a subprogram whose first parameter has
3743 the same type as the prefix, but that type is untagged.
3745 2015-02-20 Robert Dewar <dewar@adacore.com>
3747 * g-allein.ads, g-alveop.adb, g-alveop.ads, opt.ads: Minor reformatting
3749 2015-02-20 Tristan Gingold <gingold@adacore.com>
3751 * opt.ads (GNAT_Mode_Config): New variable.
3752 * opt.adb (Set_Opt_Config_Switches): Consider GNAT_Mode_Config
3753 to set Assertions_Enabled.
3754 * switch-c.adb (Scan_Front_End_Switches): Set GNAT_Mode_Config
3757 2015-02-20 Robert Dewar <dewar@adacore.com>
3759 * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Add an additional
3760 comment regarding the handling of unterminated fixed-point
3762 * s-valuns.ads (Scan_Raw_Unsigned): Add comments
3763 corresponding to those previously added for
3764 System.Val_LLU.Scan_Raw_Long_Long_Unsigned.
3766 2015-02-20 Olivier Hainque <hainque@adacore.com>
3768 * g-allein.ads, g-alveop.ads, g-alveop.adb: Code clean ups.
3770 2015-02-20 Robert Dewar <dewar@adacore.com>
3772 * sem_prag.adb: Minor comment clarification.
3774 2015-02-20 Olivier Hainque <hainque@adacore.com>
3776 * g-allein.ads (vec_ctf, vec_vcsfx, vec_vcfux): Remove.
3777 * g-alleve.ads, g-alleva.adb (vcfux): Likewise.
3778 * g-alveop.ads (vec_vcfsx, vec_vcfux): Just rename the ll versions.
3779 (vec_ctf): Now renamings as well.
3781 2015-02-20 Robert Dewar <dewar@adacore.com>
3783 * switch-c.adb, bindgen.adb: Minor reformatting.
3785 2015-02-20 Ed Schonberg <schonberg@adacore.com>
3787 * sem_prag.adb (Analyze_Pragma, case Type_Invariant):
3788 Invariant'class is allowed on an abstract type.
3790 2015-02-20 Ed Schonberg <schonberg@adacore.com>
3792 * sem_ch3.adb (Access_Definition): If the access definition is
3793 for a protected component and defines an access to protected
3794 subprogram, do not create an itype reference for it because a
3795 full type declaration will be built in order to generate the
3796 proper equivalent type.
3797 (Analyze_Subtype_Declaration): Add information of incomplete
3798 subtypes, for Ada 2012 extended uses of incomplete types.
3800 2015-02-20 Gary Dismukes <dismukes@adacore.com>
3802 * sem_res.adb: Minor reformatting.
3804 2015-02-20 Vincent Celier <celier@adacore.com>
3806 * switch-c.adb (Scan_Front_End_Switches): When comparing runtime
3807 path name for several switches --RTS, use the normalized path
3810 2015-02-20 Vincent Celier <celier@adacore.com>
3812 * bindgen.adb: Minor reformatting and code reorganization.
3814 2015-02-20 Jose Ruiz <ruiz@adacore.com>
3816 * a-stcoed.ads: Add spec for this package (Unimplemented_Unit).
3817 * impunit.adb (Non_Imp_File_Names_12): Mark unit a-stcoed.ads as
3818 defined by Ada 2012.
3820 2015-02-20 Arnaud Charlet <charlet@adacore.com>
3822 * sysdep.c, expect.c, s-oscons-tmplt.c, gsocket.h, adaint.c: Remove
3823 obsolete references to RTX, nucleus, VMS.
3825 2015-02-20 Ed Schonberg <schonberg@adacore.com>
3827 * sem_prag.adb (Fix_Error): For an illegal Type_Invariant'Class
3828 aspect, use name that mentions Class explicitly, rather than
3829 compiler-internal name.
3831 2015-02-20 Robert Dewar <dewar@adacore.com>
3833 * debug.adb: Add documentation for -gnatd.2 (allow statements
3835 * par-ch3.adb (P_Identifier_Declarations): Handle
3836 statement appearing where declaration expected more cleanly.
3837 (Statement_When_Declaration_Expected): Implement debug flag
3840 2015-02-20 Jose Ruiz <ruiz@adacore.com>
3842 * a-dinopr.ads: Add spec for this package (Unimplemented_Unit).
3843 * a-dispat.ads (Yield): Include procedure added in Ada 2012.
3844 * a-dispat.adb (Yield): Implement procedure added in Ada 2012.
3845 * impunit.adb (Non_Imp_File_Names_05): Mark unit a-dinopr.ads as
3846 defined by Ada 2005.
3847 * snames.ads-tmpl (Name_Non_Preemptive_FIFO_Within_Priorities):
3848 This is the correct name for the dispatching policy (FIFO was
3851 2015-02-20 Javier Miranda <miranda@adacore.com>
3853 * sem_res.adb (Resolve_Type_Conversion): If the type of the
3854 operand is the limited-view of a class-wide type then recover
3855 the class-wide type of the non-limited view.
3857 2015-02-20 Arnaud Charlet <charlet@adacore.com>
3859 * gcc-interface/Makefile.in: Remove references to nucleus.
3860 * gcc-interface/decl.c (gnat_to_gnu_entity, case E_Procedure): Set
3861 extern_flag to true for Inline_Always subprograms with
3862 Intrinsic convention.
3864 2015-02-20 Yannick Moy <moy@adacore.com>
3866 * sem_prag.ads: Minor typo in comment.
3868 2015-02-20 Pascal Obry <obry@adacore.com>
3870 * s-osprim-mingw.adb: Fix Get_Base_Time parameter mode.
3872 2015-02-20 Vincent Celier <celier@adacore.com>
3874 * makeutl.adb (Get_Directories.Add_Dir): Add a directory only
3877 2015-02-20 Robert Dewar <dewar@adacore.com>
3879 * sem_eval.ads: Minor reformatting.
3881 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
3883 * freeze.adb (Size_Known): Do not set the packed size for
3884 independent type or component.
3885 (Freeze_Array_Type): Check for Independent[_Components] with packing
3886 or explicit component size clause.
3887 * gnat1drv.adb (Post_Compilation_Validation_Checks): Do the validation
3888 of independence pragmas only for non-GCC back-ends.
3889 * sem_ch13.adb (Initialize): Likewise for the initialization.
3890 * sem_prag.adb (Record_Independence_Check): New procedure to record an
3891 independence check in the table.
3892 (Analyze_Pragma): Use it throughout instead of doing it manually.
3893 * gcc-interface/decl.c (gnat_to_gnu_field): Add support for
3894 independent type or component.
3896 2015-02-20 Thomas Quinot <quinot@adacore.com>
3898 * adaint.c (__gnat_readdir): For Solaris, use 64 bit variants of
3899 struct direct and readdir. This is required for NFS filesystems
3900 mounted from servers that use 64-bit cookies.
3902 2015-02-20 Ed Schonberg <schonberg@adacore.com>
3904 * sem_ch12.adb (Analyze_Subprogram_Instantiaion): New subprogram
3905 Build_Subprogram_Renaming, to create renaming of subprogram
3906 instance in the the declaration of the wrapper package rather
3907 than in its body, so that it is available for analysis of aspects
3908 propagated from generic to instantiation.
3909 (Check_Mismatch): An actual for a formal package that is an
3910 incomplete type matches a formal type that is incomplete.
3911 (Instantiate_Package_Body): Move code that builds subprogram
3912 renaming to Analyze_Subprogram_Instantiation.
3913 (Instantiate_Type): The generated subtype is a limited view if
3914 the actual is a limited view.
3915 (Load_Parent_Of_Generic): Retrieve instance declaration from
3916 its new position within wrapper package.
3918 2015-02-20 Arnaud Charlet <charlet@adacore.com>
3920 * s-parame-vxworks.adb, s-os_lib.ads: Update comments.
3922 2015-02-20 Robert Dewar <dewar@adacore.com>
3924 * s-osinte-vxworks.ads (To_Timespec): Add comment about the
3925 issue of negative arguments.
3927 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
3929 * gnat1drv.adb: Minor consistency fix.
3931 2015-02-20 Pascal Obry <obry@adacore.com>
3933 * s-osprim-mingw.adb (Get_Base_Time): Properly release lock in all
3936 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
3938 * inline.adb (Expand_Inlined_Call): Skip again calls to subprogram
3940 * exp_ch6.adb (Expand_Call): Use back-end inlining
3941 instead of expansion for simple subprogram renamings.
3943 2015-02-20 Robert Dewar <dewar@adacore.com>
3945 * exp_util.adb: Minor reformatting.
3947 2015-02-20 Vincent Celier <celier@adacore.com>
3949 * switch-c.adb (Scan_Front_End_Switches): Do not fail when --RTS=
3950 is specified several times with different values that indicates
3951 the same runtime directory.
3953 2015-02-20 Ed Schonberg <schonberg@adacore.com>
3955 * sem_attr.adb (Check_Not_Incomplete_Type): Clean up code to
3956 handle properly illegal uses of attributes on prefixes on an
3957 incomplete type, both when the type of the prefix is locally
3958 incomplete, and when it is a limited view of a type whose
3959 non-limited view is not available.
3960 (Analyze_Attribute): Add calls to Check_Not_Incomplete_Type for
3961 'Address and others.
3963 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
3965 * exp_ch6.adb: Fix minor typo in comment.
3967 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
3969 * sinfo.ads: Add comment.
3971 2015-02-20 Olivier Hainque <hainque@adacore.com>
3973 * opt.ads: Replace Opt.Suppress_All_Inlining by two separate
3974 flags controlling the actual FE inlining out of pragma Inline
3975 and pragma Inline_Always.
3976 * adabkend.adb (Scan_Compiler_Arguments): Set both flags to True
3977 on -fno-inline, which disables all inlining in compilers with
3978 an Ada back-end and without back-end inlining support.
3979 * back_end.adb (Scan_Back_End_Switches): Set the Inline related
3980 flag to True on -fno-inline and leave Inline_Always alone for
3982 * back_end.ads (Scan_Compiler_Arguments): Adjust spec wrt the
3983 names of the Opt flags it sets.
3984 * gnat1drv.adb (Adjust_Global_Switches): Remove test on
3985 Opt.Suppress_All_Inlining in the Back_End_Inlining computation.
3986 * sem_prag.adb (Make_Inline): Remove early return conditioned
3987 on Opt.Suppress_All_Inlining.
3988 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Use the flags to
3989 disable the calls to Build_Body_To_Inline otherwise triggered
3990 by pragma Inline or Inline_Always. This will prevent actual
3991 front-end inlining of the subprogram on calls.
3993 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
3995 * exp_ch3.adb (Default_Initialize_Object): Call Add_Inlined_Body on the
3996 Abort_Undefer_Direct function.
3997 * exp_ch5.adb (Expand_N_Assignment_Statement): Likewise.
3998 * exp_intr.adb (Expand_Unc_Deallocation): Likewise.
3999 * exp_prag.adb (Expand_Pragma_Abort_Defer): Likewise.
4000 * exp_ch4.adb (Expand_N_Selected_Component): Adjust call to
4002 * exp_ch6.adb (Expand_Call): Adjust calls to Add_Inlined_Body.
4003 Remove call to Register_Backend_Call and move code resetting
4004 Needs_Debug_Info on inlined subprograms to...
4005 * inline.ads (Add_Inlined_Body): Add N parameter.
4006 (Register_Backend_Call): Delete.
4007 * inline.adb (Add_Inlined_Body): ...here and simplify.
4008 Register the call with Backend_Calls directly.
4009 (Register_Backend_Call): Delete.
4010 * s-stalib.ads (Abort_Undefer_Direct): Restore pragma Inline.
4012 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
4014 * s-stalib.ads: Fix typo.
4016 2015-02-20 Ed Schonberg <schonberg@adacore.com>
4018 * exp_ch3.adb (Default_Initialize_Object): If the object has a
4019 delayed freeze, the actions associated with default initialization
4020 must be part of the freeze actions, rather that being inserted
4021 directly after the object declaration.
4023 2015-02-20 Robert Dewar <dewar@adacore.com>
4025 * lib-load.adb: Minor comment update.
4027 2015-02-20 Vincent Celier <celier@adacore.com>
4029 * prj-proc.adb (Process_Case_Construction): When there are
4030 incomplete withed projects and the case variable is unknown,
4031 skip the case construction.
4033 2015-02-20 Ed Schonberg <schonberg@adacore.com>
4035 * exp_ch6.adb (Expand_Actuals): Add caller-side invariant checks
4036 when an actual is a view conversion, either because the call is
4037 to an inherited operation, or because the actual is an explicit
4038 type conversion to an ancestor type. Fixes ACATS 4.0D: C732001
4040 2015-02-20 Robert Dewar <dewar@adacore.com>
4042 * einfo.ads: Minor comment updates Fix missing pragma Inline
4043 for Set_Partial_View_Has_Unknown_Discr.
4044 * einfo.adb (Write_Entity_Flags): Add missing entry for
4045 Partial_View_Has_Unknown_Discr.
4046 * sem_ch3.adb: Minor reformatting.
4048 2015-02-20 Vincent Celier <celier@adacore.com>
4050 * opt.ads: Minor cleanup: remove mention of gprmake.
4051 * s-stalib.ads (Abort_Undefer_Direct): Do not inline.
4052 * s-tataat.adb: Do not call System.Tasking.Self but directly
4053 System.Task_Primitives.Operations.Self.
4055 2015-02-20 Arnaud Charlet <charlet@adacore.com>
4057 * gnat_rm.texi, gnat_ugn.texi: Now automatically generated from
4058 sphinx in the doc directory.
4059 * doc: New directory containing sphinx versions of gnat_rm and gnat_ugn
4061 2015-02-20 Robert Dewar <dewar@adacore.com>
4063 * sem_res.adb: Minor reformatting.
4064 * exp_ch9.adb (Build_Protected_Spec): Copy Aliased setting when
4066 * sem_ch13.adb (Analyze_Aspect_Specifications): Exclude Boolean
4067 aspects from circuitry setting delay required to false if the
4068 argument is an integer literal.
4070 2015-02-20 Ed Schonberg <schonberg@adacore.com>
4072 * einfo.ads. einfo.adb (Partial_View_Has_Unknown_Discr): New flag
4073 on type entities, to enforce AI12-0133: default initialization
4074 of types whose partial view has unknown discriminants does not
4075 get an invariant check, because clients of the unit can never
4076 declare objects of such types.
4077 * sem_ch3.adb (Find_Type_Name); Set new flag
4078 Partial_View_Has_Unknown_Discr when needed.
4079 * exp_ch3.adb (Expand_N_Object_Declaration): Use flag to suppress
4080 generation of invariant call on default-initialized object.
4082 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
4084 * gcc-interface/decl.c (gnat_to_gnu_param): Do not strip the padding
4085 if the parameter either is passed by reference or if the alignment
4088 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
4090 * gcc-interface/decl.c (is_cplusplus_method): Use Is_Primitive flag to
4091 detect primitive operations of tagged and untagged types.
4093 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
4095 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not bother about alias
4096 sets in presence of derivation for subprogram types.
4098 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
4100 * gcc-interface/utils.c (begin_subprog_body): Assert that the body is
4101 present in the same context as the declaration.
4103 2015-02-07 Jakub Jelinek <jakub@redhat.com>
4106 * gcc-interface/trans.c (gigi): Recreate optimization_default_node
4107 and optimization_current_node after tweaking global_options.
4109 2015-02-05 Robert Dewar <dewar@adacore.com>
4111 * prj-proc.adb, sem_aux.adb, exp_ch9.adb, errout.adb, prj-dect.adb,
4112 prj-nmsc.adb: Minor reformatting.
4114 2015-02-05 Ed Schonberg <schonberg@adacore.com>
4116 * sem_type.adb (Covers): In ASIS_Mode the Corresponding_Record
4117 of a protected type may not be available, so to check conformance
4118 with an interface type, examine the interface list in the type
4119 declaration directly.
4120 (Write_Overloads): Improve information for indirect calls,
4123 2015-02-05 Ed Schonberg <schonberg@adacore.com>
4125 * exp_ch3.adb (Make_Tag_Assignment): Do not perform this
4126 expansion activity in ASIS mode.
4128 2015-02-05 Javier Miranda <miranda@adacore.com>
4130 * errout.adb (Error_Msg_PT): Add missing error.
4131 * sem_ch6.adb (Check_Synchronized_Overriding): Check the missing
4132 RM rule. Code cleanup.
4133 * exp_ch9.adb (Build_Wrapper_Spec): Propagate "constant" in
4134 anonymous access types. Found working on the tests. Code cleanup.
4136 2015-02-05 Vincent Celier <celier@adacore.com>
4138 * prj-dect.adb (Parse_Attribute_Declaration): Continue scanning
4139 when there are incomplete withs.
4140 * prj-nmsc.adb (Process_Naming): Do not try to get the value
4141 of an element when it is nil.
4142 (Check_Naming): Do not check a nil suffix for illegality
4143 * prj-proc.adb (Expression): Do not process an empty term.
4144 * prj-strt.adb (Attribute_Reference): If attribute cannot be
4145 found, parse a possible index to avoid cascading errors.
4147 2015-02-05 Ed Schonberg <schonberg@adacore.com>
4149 * sem_aux.adb (Is_Derived_Type): A subprogram_type generated
4150 for an access_to_subprogram declaration is not a derived type.
4152 2015-02-05 Robert Dewar <dewar@adacore.com>
4154 * errout.adb (Error_Msg_Internal): For non-serious error set
4155 Fatal_Error to Ignored.
4156 * lib-load.adb (Load_Unit): Minor comment updates.
4157 * sem_ch10.adb (Analyze_With_Clause): Propagate Fatal_Error
4158 setting from with'ed unit to with'ing unit.
4159 * sem_prag.adb (Analyze_Pragma, case Warnings): Document handling
4162 2015-02-05 Yannick Moy <moy@adacore.com>
4164 * sem_prag.adb, par-prag.adb: Minor code clean up.
4166 2015-02-05 Yannick Moy <moy@adacore.com>
4168 * par-prag.adb (Pragma_Warnings): Update for extended form
4169 of pragma Warnings. The "one" argument case may now have 2 or
4171 * sem_prag.adb (Analyze_Pragma/Pragma_Warnings): Update for
4172 extended form of pragma Warnings. Pragma with tool name is either
4173 rewritten as null or as an equivalent form without tool name,
4175 * snames.ads-tmpl (Name_Gnatprove): New name.
4177 2015-02-05 Robert Dewar <dewar@adacore.com>
4179 * sem_ch13.adb (Add_Invariants): Don't assume invariant is
4181 * sem_prag.adb (Analyze_Pragma, case Check): Don't assume
4182 condition is standard Boolean, it can be non-standard derived
4185 2015-02-05 Robert Dewar <dewar@adacore.com>
4187 * checks.adb (Enable_Range_Check): Disconnect attempted
4188 optimization for the case of range check for subscript of
4189 unconstrained array.
4191 2015-02-05 Robert Dewar <dewar@adacore.com>
4193 * par-ch13.adb (With_Present): New function
4194 (Aspect_Specifications_Present): Handle WHEN in place of WITH
4195 (Get_Aspect_Specifications): Comment update.
4196 * par.adb: Comment updates.
4198 2015-02-05 Robert Dewar <dewar@adacore.com>
4200 * errout.adb (Handle_Serious_Error): New setting of Fatal_Error.
4201 * frontend.adb (Frontend): New setting of Fatal_Error.
4202 * lib-load.adb (Create_Dummy_Package_Unit): New setting of
4204 (Load_Main_Source): New setting of Fatal_Error
4205 (Load_Unit): New setting of Fatal_Error.
4206 * lib-writ.adb (Add_Preprocessing_Dependency): New setting of
4208 (Ensure_System_Dependency): New setting of Fatal_Error.
4209 * lib.adb (Fatal_Error): New setting of Fatal_Error
4210 (Set_Fatal_Error): New setting of Fatal_Error.
4211 * lib.ads: New definition of Fatal_Error and associated routines.
4212 * par-ch10.adb (P_Compilation_Unit): New setting of Fatal_Error.
4213 * par-load.adb (Load): New setting of Fatal_Error.
4214 * rtsfind.adb (Load_RTU): New setting of Fatal_Error.
4215 * sem_ch10.adb (Analyze_Compilation_Unit): New setting of
4217 (Optional_Subunit): New setting of Fatal_Error.
4218 (Analyze_Proper_Body): New setting of Fatal_Error.
4219 (Load_Needed_Body): New setting of Fatal_Error.
4221 2015-02-05 Ed Schonberg <schonberg@adacore.com>
4223 * sem_res.adb (Resolve_Call): If the function being called has
4224 out parameters do not check for language version if the function
4225 comes from a predefined unit, as those are always compiled in
4228 2015-02-05 Ed Schonberg <schonberg@adacore.com>
4230 * sem_ch3.adb (Process_Full_View): Verify that the full view
4231 of a type extension must carry an explicit limited keyword if
4232 the partial view does (RM 7.3 (10.1)).
4234 2015-02-05 Robert Dewar <dewar@adacore.com>
4236 * g-rannum.adb, g-rannum.ads, s-rannum.adb, s-rannum.ads,
4237 sem_warn.ads: Minor reformatting.
4238 * exp_ch13.adb (Expand_N_Freeze_Entity): Add guard for aspect
4240 * sem_prag.adb (Analyze_Pragma, case Type_Invariant): Give
4241 error for abstract type.
4243 2015-02-05 Yannick Moy <moy@adacore.com>
4245 * opt.ads (Warn_On_Suspicious_Contract): Update comment
4247 * sem_attr.adb (Analyze_Attribute/Attribute_Update): Warn on
4248 suspicious uses of 'Update.
4249 * sem_warn.adb, sem_warn.ads (Warn_On_Suspicious_Update): New
4250 function issues warning on suspicious uses of 'Update.
4251 * g-rannum.adb, g-rannum.ads, s-rannum.adb, s-rannum.ads: Mark
4252 package spec and body as SPARK_Mode Off.
4254 2015-02-05 Robert Dewar <dewar@adacore.com>
4256 * sem_prag.adb (Set_Elab_Unit_Name): New name for Set_Unit_Name
4257 (Analyze_Pragma): Change Set_Unit_Name to Set_Elab_Unit_Name
4258 (Set_Elab_Unit_Name): Generate reference for Elaborate[_All]
4259 * sem_warn.adb (Warn_On_Unreferenced_Entity): Suppress warning
4260 for exported entity.
4262 2015-02-05 Hristian Kirtchev <kirtchev@adacore.com>
4264 * sem_prag.adb (Check_Pragma_Conformance): Add
4265 local variable Arg. Ensure that all errors are associated with
4266 the pragma if it appears without an argument. Add comments on
4269 2015-02-05 Robert Dewar <dewar@adacore.com>
4271 * lib-xref.adb: Minor reformatting.
4273 2015-02-05 Tristan Gingold <gingold@adacore.com>
4276 * env.c: Fix thinko: handle Darwin case before default one.
4278 2015-01-30 Robert Dewar <dewar@adacore.com>
4280 * a-assert.adb: Minor reformatting.
4281 * sem_ch13.adb: Minor comment clarification.
4282 * types.ads: Minor comment update.
4283 * sem_eval.adb (Real_Or_String_Static_Predicate_Matches): Avoid blow up
4284 when we have a predicate that is nothing but an inherited dynamic
4287 2015-01-30 Jerome Guitton <guitton@adacore.com>
4289 * gcc-interface/Makefile.in (x86-vxworks): Update GCC_SPEC_FILES to
4290 include cert link spec.
4292 2015-01-30 Robert Dewar <dewar@adacore.com>
4294 * einfo.ads: Minor comment fix.
4295 * freeze.adb (Freeze_Profile): Add test for suspicious import
4297 * sem_prag.adb (Process_Import_Or_Interface): Test for suspicious
4298 use in Pure unit is now moved to Freeze (to properly catch
4299 Pure_Function exemption).
4301 2015-01-30 Bob Duff <duff@adacore.com>
4303 * sem_res.ads: Minor comment fix.
4304 * sem_type.adb: sem_type.adb (Remove_Conversions): Need to
4305 check both operands of an operator.
4307 2015-01-30 Yannick Moy <moy@adacore.com>
4309 * a-assert.ads, a-assert.adb: Mark package spec in SPARK. Set assertion
4310 policy for Pre to Ignore.
4311 (Assert): Add precondition.
4313 2015-01-30 Robert Dewar <dewar@adacore.com>
4315 * sem_prag.adb (Process_Import_Or_Interface): Warn if used in
4317 * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Clarify
4318 documentation for some special cases of invalid attempts at
4321 2015-01-30 Gary Dismukes <dismukes@adacore.com>
4323 * errout.ads: Minor reformatting.
4325 2015-01-30 Yannick Moy <moy@adacore.com>
4327 * inline.adb (Process_Formals): Use the sloc of
4328 the inlined node instead of the sloc of the actual parameter,
4329 when replacing formal parameters by the actual one.
4331 2015-01-30 Arnaud Charlet <charlet@adacore.com>
4333 * g-expect.adb (Get_Command_Output): Use infinite timeout when
4336 2015-01-30 Ed Schonberg <schonberg@adacore.com>
4338 * sem_ch12.adb (Analyze_Associations): If an in-parameter is
4339 defaulted in an instantiation, add an entry in the list of actuals
4340 to indicate the default value of the formal (as is already done
4341 for defaulted subprograms).
4343 2015-01-30 Javier Miranda <miranda@adacore.com>
4345 * errout.adb (Error_Msg_PT): Minor error phrasing update.
4347 2015-01-30 Robert Dewar <dewar@adacore.com>
4349 * sem_warn.adb (Warn_On_Known_Condition): Improve error message
4352 2015-01-30 Pierre-Marie de Rodat <derodat@adacore.com>
4354 * exp_dbug.adb (Get_Encoded_Name): When
4355 -fgnat-encodings=minimal, do not generate names for biased types.
4357 2015-01-30 Tristan Gingold <gingold@adacore.com>
4360 * env.c: Move vxworks and darwin includes out of #ifdef IN_RTS.
4362 2015-01-30 Gary Dismukes <dismukes@adacore.com>
4364 * freeze.adb: Minor reformatting.
4366 2015-01-30 Javier Miranda <miranda@adacore.com>
4368 * errout.ads (Error_Msg_PT): Replace Node_Id by Entity_Id and
4369 improve its documentation.
4370 * errout.adb (Error_Msg_PT): Improve the error message.
4371 * sem_ch6.adb (Check_Conformance): Update call to Error_Msg_PT.
4372 (Check_Synchronized_Overriding): Update call to Error_Msg_PT.
4373 * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup.
4375 2015-01-30 Robert Dewar <dewar@adacore.com>
4377 * sem_warn.adb (Warn_On_Known_Condition): Do special casing of
4378 message for False case.
4380 2015-01-30 Doug Rupp <rupp@adacore.com>
4382 * s-vxwext-kernel.ads (Task_Cont): Remove imported subprogram body.
4383 * s-vxwext-kernel.adb (Task_Cont): New subpprogram body specialized for
4386 2015-01-30 Gary Dismukes <dismukes@adacore.com>
4388 * sem_attr.adb (Declared_Within_Generic_Unit):
4389 New function to test whether an entity is declared within the
4390 declarative region of a given generic unit.
4391 (Resolve_Attribute): For checking legality of subprogram'Access within
4392 a generic unit, call new Boolean function Declared_Within_Generic_Unit
4393 instead of simply comparing the results of Enclosing_Generic_Unit on
4394 the prefix and access type. Correct minor comment typos.
4396 2015-01-30 Robert Dewar <dewar@adacore.com>
4398 * freeze.adb, exp_util.ads: Update comment.
4399 * exp_util.adb, exp_ch3.adb: Minor code reorganization and reformatting.
4400 * sem_util.adb: Minor: fix typo.
4402 2015-01-30 Hristian Kirtchev <kirtchev@adacore.com>
4404 * sem_attr.adb (Analyze_Attribute): Ensure that
4405 the check concerning Refined_Post takes precedence over the
4408 2015-01-30 Gary Dismukes <dismukes@adacore.com>
4410 * sem_prag.adb: Minor typo fixes and reformatting.
4412 2015-01-30 Yannick Moy <moy@adacore.com>
4414 * sem_attr.adb: Code clean up.
4416 2015-01-30 Robert Dewar <dewar@adacore.com>
4418 * ali.adb (Scan_ALI): Set Serious_Errors flag in Unit record.
4419 * ali.ads (Unit_Record): Add new field Serious_Errors.
4420 * lib-writ.adb (Write_Unit_Information): Set SE (serious errors)
4421 attribute in U line.
4422 * lib-writ.ads: New attribute SE (serious erors) in unit line.
4424 2015-01-30 Hristian Kirtchev <kirtchev@adacore.com>
4426 * einfo.adb Update the usage of attributes Entry_Bodies_Array,
4427 Lit_Indexes, Scale_Value, Storage_Size_Variable,
4428 String_Literal_Low_Bound along associated routines and
4430 (Pending_Access_Types): New routine.
4431 (Set_Pending_Access_Types): New routine.
4432 (Write_Field15_Name): Add an entry for Pending_Access_Types.
4433 * einfo.ads Add new attribute Pending_Access_Types along
4434 with usage in nodes. Update the usage of attributes
4435 Entry_Bodies_Array, Lit_Indexes, Scale_Value,
4436 Storage_Size_Variable, String_Literal_Low_Bound.
4437 (Pending_Access_Types): New routine along with pragma Inline.
4438 (Set_Pending_Access_Types): New routine along with pragma Inline.
4439 * exp_ch3.adb (Expand_Freeze_Array_Type): Add new local variable
4440 Ins_Node. Determine the insertion node for anonynous access type
4441 that acts as a component type of an array. Update the call to
4442 Build_Finalization_Master.
4443 (Expand_Freeze_Record_Type): Update
4444 the calls to Build_Finalization_Master.
4445 (Freeze_Type): Remove
4446 local variable RACW_Seen. Factor out the code that deals with
4447 remote access-to-class-wide types. Create a finalization master
4448 when the designated type contains a private component. Fully
4449 initialize all pending access types.
4450 (Process_RACW_Types): New routine.
4451 (Process_Pending_Access_Types): New routine.
4452 * exp_ch4.adb (Expand_Allocator_Expression): Allocation no longer
4453 needs to set primitive Finalize_Address.
4454 (Expand_N_Allocator): Allocation no longer sets primitive
4456 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
4457 Update the call to Build_Finalization_Master.
4458 (Make_Build_In_Place_Call_In_Allocator): Allocation no longer
4459 needs to set primitive Finalize_Address.
4460 * exp_ch7.adb (Add_Pending_Access_Type): New routine.
4461 (Build_Finalization_Master): New parameter profile. Associate
4462 primitive Finalize_Address with the finalization master if the
4463 designated type has been frozen, otherwise treat the access
4464 type as pending. Simplify the insertion of the master and
4465 related initialization code.
4466 (Make_Finalize_Address_Body): Allow Finalize_Address for class-wide
4468 (Make_Set_Finalize_Address_Call): Remove forlam parameter Typ.
4469 Simplify the implementation.
4470 * exp_ch7.ads (Build_Finalization_Master): New parameter profile
4471 along with comment on usage.
4472 (Make_Set_Finalize_Address_Call): Remove formal parameter Typ. Update
4473 the comment on usage.
4474 * exp_util.adb (Build_Allocate_Deallocate_Proc): Use routine
4475 Finalize_Address to retrieve the primitive.
4476 (Finalize_Address): New routine.
4477 (Find_Finalize_Address): Removed.
4478 * exp_util.ads (Finalize_Address): New routine.
4479 * freeze.adb (Freeze_All): Remove the generation of finalization
4481 * sem_ch3.adb (Analyze_Full_Type_Declaration): Propagate any
4482 pending access types from the partial to the full view.
4484 2015-01-30 Robert Dewar <dewar@adacore.com>
4486 * sem_disp.adb: Minor reformatting.
4487 * sem_disp.ads: Documentation update.
4489 2015-01-30 Ed Schonberg <schonberg@adacore.com>
4491 * sem_disp.adb (Is_Dynamically_Tagged): when applied to an entity
4492 or a function call, return True if type is class-wide.
4493 * sem_res.adb (Resolve_Case_Expression, Resolve_If_Expression);
4494 Apply RM 4.5.7 (17/3): all or none of the dependent expression
4495 of a conditional expression must be dynamically tagged.
4497 2015-01-30 Ed Schonberg <schonberg@adacore.com>
4499 * sem_ch6.adb (Analyze_Function_Return): In an extended return
4500 statement, apply accessibility check to result object when there
4501 is no initializing expression (Ada 2012 RM 6.5 (5.4/3))
4503 2015-01-30 Robert Dewar <dewar@adacore.com>
4505 * sem_ch4.adb (Analyze_If_Expression): Allow for non-standard
4506 Boolean for case where ELSE is omitted.
4507 * sem_res.adb: Minor reformatting.
4509 2015-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
4511 Fix build under cygwin/64.
4512 * adaint.h: Add check for __CYGWIN__.
4513 * mingw32.h: Prevent windows.h from including x86intrin.h in GCC.
4515 2015-01-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
4518 * adaint.c: Handle __CYGWIN__ like __MINGW32__ here.
4519 * mingw32.h: Don't include <tchar.h> under cygwin.
4520 (_O_U8TEXT, _O_U16TEXT, _O_WTEXT): Set to _O_TEXT if not yet defined.
4522 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
4524 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8)
4525 (DEF_FUNCTION_TYPE_VAR_12): New macros.
4527 2015-01-09 Michael Collison <michael.collison@linaro.org>
4529 * gcc-interface/cuintp.c: Include hash-set.h, machmode.h,
4530 vec.h, double-int.h, input.h, alias.h, symtab.h,
4531 fold-const.h, wide-int.h, and inchash.h due to
4532 flattening of tree.h.
4533 * gcc-interface/decl.c: Ditto.
4534 * gcc-interface/misc.c: Ditto.
4535 * gcc-interface/targtyps.c: Include hash-set.h, machmode.h,
4536 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h,
4537 fold-const.h, wide-int.h, and inchash.h due to
4538 flattening of tree.h.
4539 * gcc-interface/trans.c: Include hash-set.h, machmode.h,
4540 vec.h, double-int.h, input.h, alias.h, symtab.h, real.h,
4541 fold-const.h, wide-int.h, inchash.h due to
4542 flattening of tree.h.
4543 * gcc-interface/utils.c: Include hash-set.h, machmode.h,
4544 vec.h, double-int.h, input.h, alias.h, symtab.h,
4545 fold-const.h, wide-int.h, and inchash.h due to
4546 flattening of tree.h.
4547 * gcc-interface/utils2.c: Ditto.
4549 2015-01-07 Robert Dewar <dewar@adacore.com>
4551 * sem_warn.adb (Check_One_Unit): Don't give unused entities
4552 warning for a package which is used as a generic parameter.
4554 2015-01-07 Bob Duff <duff@adacore.com>
4556 * usage.adb (Usage): Correct documentation of
4559 2015-01-07 Robert Dewar <dewar@adacore.com>
4561 * s-fileio.adb: Minor reformatting.
4563 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4565 * sem_ch12.adb (Instantiate_Object): If formal is an anonymous
4566 access to subprogram, replace its formals with new entities when
4567 building the object declaration, both if actual is present and
4568 when it is defaulted.
4570 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4572 * sem_ch5.adb (Analyze_Assignment): If left-hand side is a view
4573 conversion and type of expression has invariant, apply invariant
4574 check on expression.
4576 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4578 * sem_ch3.adb (Create_Constrained_Components): A call to
4579 Gather_Components may detect an error if an inherited discriminant
4580 that controls a variant is non-static.
4581 * sem_aggr.adb (Resolve_Record_Aggregate, Step 5): The call to
4582 Gather_Components may report an error if an inherited discriminant
4583 in a variant in non-static.
4584 * sem_util.adb (Gather_Components): If a non-static discriminant
4585 is inherited do not report error here, but let caller handle it.
4586 (Find_Actual): Small optimization.
4588 2015-01-07 Bob Duff <duff@adacore.com>
4590 * usage.adb (Usage): Document -gnatw.f switch.
4592 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4594 * sem_ch12.adb: Code clean up and minor reformatting.
4596 2015-01-07 Robert Dewar <dewar@adacore.com>
4598 * exp_ch4.adb (Expand_N_Type_Conversion): Add guard for
4599 Raise_Accessibility_Error call.
4600 * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Add documentation
4601 on handling of invalid digits in based constants.
4602 * s-fatgen.ads: Minor reformatting.
4603 * sem_attr.adb (Analyze_Attribute, case Unrestricted_Access):
4604 Avoid noting bogus modification for Valid test.
4605 * snames.ads-tmpl (Name_Attr_Long_Float): New Name.
4606 * einfo.ads: Minor reformatting.
4607 * sem_warn.adb: Minor comment clarification.
4608 * sem_ch12.adb: Minor reformatting.
4610 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4612 * exp_ch5.adb (Expand_Predicated_Loop): Handle properly loops
4613 over static predicates when the loop parameter specification
4614 carries a Reverse indicator.
4616 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4618 * sem_ch12.adb (Instantiate_Object): If formal has a default,
4619 actual is missing and formal has an anonymous access type, copy
4620 access definition in full so that tree for instance is properly
4621 formatted for ASIS use.
4623 2015-01-07 Bob Duff <duff@adacore.com>
4625 * sem_elab.adb (Check_Internal_Call_Continue): Give a warning
4626 for P'Access, where P is a subprogram in the same package as
4627 the P'Access, and the P'Access is evaluated at elaboration
4628 time, and occurs before the body of P. For example, "X : T :=
4629 P'Access;" would allow a subsequent call to X.all to be an
4630 access-before-elaboration error; hence the warning. This warning
4631 is enabled by the -gnatw.f switch.
4632 * opt.ads (Warn_On_Elab_Access): New flag for warning switch.
4633 * warnsw.adb (Set_Dot_Warning_Switch): Set Warn_On_Elab_Access.
4634 * gnat_ugn.texi: Document the new warning.
4636 2015-01-07 Johannes Kanig <kanig@adacore.com>
4638 * lib-xref-spark_specific.adb (Collect_SPARK_Xrefs): Skip unneeded
4641 2015-01-07 Robert Dewar <dewar@adacore.com>
4643 * s-taprop-linux.adb, clean.adb: Minor reformatting.
4645 2015-01-07 Arnaud Charlet <charlet@adacore.com>
4647 * s-tassta.adb: Relax some overzealous assertions.
4649 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4651 * sem_ch6.adb (Analyze_Return_Type): An call that returns a limited
4652 view of a type is legal when context is a thunk generated for
4653 operation inherited from an interface.
4654 * exp_ch6.adb (Expand_Simple_Function_Return): If context is
4655 a thunk and return type is an incomplete type do not continue
4656 expansion; thunk will be fully elaborated when generating code.
4658 2015-01-07 Doug Rupp <rupp@adacore.com>
4660 * s-osinte-mingw.ads (LARGE_INTEGR): New subtype.
4661 (QueryPerformanceFrequency): New imported procedure.
4662 * s-taprop-mingw.adb (RT_Resolution): Call above and return
4663 resolution vice a hardcoded value.
4664 * s-taprop-solaris.adb (RT_Resolution): Call clock_getres and return
4665 resolution vice a hardcoded value.
4666 * s-linux-android.ads (clockid_t): New subtype.
4667 * s-osinte-aix.ads (clock_getres): New imported subprogram.
4668 * s-osinte-android.ads (clock_getres): Likewise.
4669 * s-osinte-freebsd.ads (clock_getres): Likewise.
4670 * s-osinte-solaris-posix.ads (clock_getres): Likewise.
4671 * s-osinte-darwin.ads (clock_getres): New subprogram.
4672 * s-osinte-darwin.adb (clock_getres): New subprogram.
4673 * thread.c (__gnat_clock_get_res) [__APPLE__]: New function.
4674 * s-taprop-posix.adb (RT_Resolution): Call clock_getres to
4675 calculate resolution vice hard coded value.
4677 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4679 * exp_util.adb (Make_CW_Equivalent_Type): If root type is a
4680 limited view, use non-limited view when available to create
4681 equivalent record type.
4683 2015-01-07 Vincent Celier <celier@adacore.com>
4685 * gnatcmd.adb: Remove command Sync and any data and processing
4686 related to this command. Remove project processing for gnatstack.
4687 * prj-attr.adb: Remove package Synchonize and its attributes.
4689 2015-01-07 Vincent Celier <celier@adacore.com>
4691 * clean.adb: Minor error message change.
4693 2015-01-07 Tristan Gingold <gingold@adacore.com>
4696 * env.c (__gnat_environ): Adjust for darwin9/darwin10.
4698 2015-01-07 Javier Miranda <miranda@adacore.com>
4700 * sem_ch10.adb (Analyze_With_Clause): Compiling under -gnatq
4701 protect the frontend against never ending recursion caused by
4702 circularities in the sources.
4704 2015-01-07 Robert Dewar <dewar@adacore.com>
4706 * a-reatim.adb, make.adb, exp_pakd.adb, i-cpoint.adb, sem_ch8.adb,
4707 exp_ch3.adb: Minor reformatting.
4709 2015-01-07 Doug Rupp <rupp@adacore.com>
4711 * s-linux.ads (clockid_t): New subtype.
4712 * s-osinte-linux.ads (pragma Linker Options): Add -lrt.
4713 (clockid_t): New subtype.
4714 (clock_getres): Import system call.
4715 * s-taprop-linux.adb (System.OS_Constants): With and rename.
4716 (RT_Resolution): Remove
4717 hardcoded value and call clock_getres.
4718 * s-linux-sparc.ads, s-linux-mipsel.ads, s-linux-hppa.ads,
4719 s-linux-alpha.ads, s-linux-x32.ads (clockid_t): Add new subtype.
4721 2015-01-07 Robert Dewar <dewar@adacore.com>
4723 * sem_warn.adb (Check_One_Unit): Guard against context item
4724 with no Entity field.
4726 2015-01-07 Vincent Celier <celier@adacore.com>
4728 * clean.adb (Gnatclean): Warn that 'gnatclean -P' is obsolete.
4729 * make.adb (Initialize): Warn that 'gnatmake -P' is obsolete.
4731 2015-01-07 Vincent Celier <celier@adacore.com>
4733 * prj-conf.adb (Parse_Project_And_Apply_Config): Always finalize
4734 errors/warnings in the first parsing of the project files,
4735 to display the warnings when there is no errors.
4737 2015-01-07 Tristan Gingold <gingold@adacore.com>
4739 * i-cpoint.adb (Copy_Terminated_Array): Nicely handle null target.
4741 2015-01-07 Doug Rupp <rupp@adacore.com>
4743 * s-taprop-vxworks.adb (Stop_All_Tasks): Pass return
4744 value from Int_Lock as parameter to Int_Unlock.
4745 * s-osinte-vxworks.ads (Int_Unlock): Add parameter.
4746 * s-vxwext.ads (Int_Unlock): Likewise.
4747 * s-vxwext-kernel.adb (intUnlock, Int_Unlock): Likewise.
4748 * s-vxwext-kernel.ads (Int_Unlock): Likewise.
4749 * s-vxwext-rtp.adb (Int_Unlock): Likewise.
4750 * s-vxwext-rtp.ads (Int_Unlock): Likewise.
4752 2015-01-07 Pierre-Marie de Rodat <derodat@adacore.com>
4754 * exp_pakd.adb: Add a comment in exp_pakd.adb to explain why we
4757 2015-01-07 Tristan Gingold <gingold@adacore.com>
4759 * i-cpoint.adb (Copy_Terminated_Array): Use Copy_Array to
4762 2015-01-07 Eric Botcazou <ebotcazou@adacore.com>
4764 * sem_ch3.adb (Analyze_Full_Type_Declaration): Do not
4765 automatically set No_Strict_Aliasing on access types.
4766 * fe.h (No_Strict_Aliasing_CP): Declare.
4767 * gcc-interface/trans.c (gigi): Force flag_strict_aliasing to 0 if
4768 No_Strict_Aliasing_CP is set.
4770 2015-01-07 Johannes Kanig <kanig@adacore.com>
4772 * sem_ch8.adb (Analyze_Subprogram_Renaming) do
4773 not build function wrapper in gnatprove mode when the package
4774 is externally axiomatized.
4776 2015-01-07 Jose Ruiz <ruiz@adacore.com>
4778 * a-reatim.adb (Time_Of): Reduce the number of spurious overflows in
4779 intermediate computations when the parameters have different signs.
4781 2015-01-07 Javier Miranda <miranda@adacore.com>
4783 * exp_ch3.adb (Build_Init_Procedure): For derived types,
4784 improve the code which takes care of identifying and moving to
4785 the beginning of the init-proc the call to the init-proc of the
4788 2015-01-07 Olivier Hainque <hainque@adacore.com>
4790 * gcc-interface/trans.c (gnat_to_gnu, <N_Expression_With_Action>):
4791 Elaborate the expression as part of the same stmt group as the actions.
4793 2015-01-07 Robert Dewar <dewar@adacore.com>
4795 * sem_ch3.adb: Minor error message change.
4797 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4799 * sem_prag.adb (Analyze_Pragma, case Preelaborable_Initialization):
4800 Following AI05-028, the pragam applies legally to any composite type.
4802 2015-01-07 Arnaud Charlet <charlet@adacore.com>
4804 * s-osinte-vxworks.adb, s-osinte-vxworks.ads
4805 (sigwait, sigwaitinfo): Removed, not needed after all on any
4806 VxWorks configurations.
4808 2015-01-07 Robert Dewar <dewar@adacore.com>
4810 * sem_ch3.adb, freeze.adb, exp_disp.adb: Minor reformatting.
4812 2015-01-07 Javier Miranda <miranda@adacore.com>
4814 * exp_disp.adb (Expand_Interface_Conversion): Adding missing
4815 generation of accessibility check.
4817 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4819 * sem_ch3.adb (Derived_Type_Declaration): In the case of an
4820 illegal completion from a class- wide type, set etype of the
4821 derived type properly to prevent cascaded errors.
4823 2015-01-07 Robert Dewar <dewar@adacore.com>
4825 * prj.ads, i-cpoint.adb, freeze.adb, ghost.adb, prj-err.adb: Minor
4828 2015-01-07 Robert Dewar <dewar@adacore.com>
4830 * restrict.adb (Check_Restriction_No_Use_Of_Attribute):
4832 (OK_No_Use_Of_Entity_Name): New function.
4833 (Set_Restriction_No_Use_Of_Entity): New procedure.
4834 * restrict.ads (Check_Restriction_No_Use_Of_Attribute):
4836 (OK_No_Use_Of_Entity_Name): New function.
4837 (Set_Restriction_No_Use_Of_Entity): New procedure.
4838 * sem_ch8.adb (Find_Direct_Name): Add check for violation of
4840 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
4841 Add processing for new restriction No_Use_Of_Entity.
4843 2015-01-07 Eric Botcazou <ebotcazou@adacore.com>
4845 * freeze.adb (Freeze_Array_Type): Apply same handling to Is_Atomic
4846 component type as to Has_Atomic_Components type. Remove useless
4847 test on Is_Aliased component type.
4849 2015-01-07 Hristian Kirtchev <kirtchev@adacore.com>
4851 * alloc.ads Alphabetize several declarations. Add constants
4852 Ignored_Ghost_Units_Initial and Ignored_Ghost_Units_Increment.
4853 * atree.adb Add with and use clauses for Opt.
4854 (Allocate_Initialize_Node): Mark a node as ignored Ghost
4855 if it is created in an ignored Ghost region.
4856 (Ekind_In): New variant.
4857 (Is_Ignored_Ghost_Node): New routine.
4858 (Set_Is_Ignored_Ghost_Node): New routine.
4859 * atree.adb Aplhabetize several subprograms declarations. Flag
4860 Spare0 is now known as Is_Ignored_Ghost_Node.
4861 (Ekind_In): New variant.
4862 (Is_Ignored_Ghost_Node): New routine.
4863 (Set_Is_Ignored_Ghost_Node): New routine.
4864 * einfo.adb: Flag 279 is now known as Contains_Ignored_Ghost_Code.
4865 (Contains_Ignored_Ghost_Code): New routine.
4866 (Set_Contains_Ignored_Ghost_Code): New routine.
4867 (Set_Is_Checked_Ghost_Entity, Set_Is_Ignored_Ghost_Entity):
4868 It is now possible to set this property on an unanalyzed entity.
4869 (Write_Entity_Flags): Output the status of flag
4870 Contains_Ignored_Ghost_Code.
4871 * einfo.ads New attribute Contains_Ignored_Ghost_Code along with
4873 (Contains_Ignored_Ghost_Code): New routine
4874 along with pragma Inline.
4875 (Set_Contains_Ignored_Ghost_Code): New routine along with pragma Inline.
4876 * exp_ch3.adb Add with and use clauses for Ghost.
4877 (Freeze_Type): Capture/restore the value of Ghost_Mode on entry/exit.
4878 Set the Ghost_Mode in effect.
4879 (Restore_Globals): New routine.
4880 * exp_ch7.adb (Process_Declarations): Do not process a context
4881 that invoves an ignored Ghost entity.
4882 * exp_dbug.adb (Qualify_All_Entity_Names): Skip an ignored Ghost
4883 construct that has been rewritten as a null statement.
4884 * exp_disp.adb Add with and use clauses for Ghost.
4885 (Make_DT): Capture/restore the value of Ghost_Mode on entry/exit. Set
4886 the Ghost_Mode in effect.
4887 (Restore_Globals): New routine.
4888 * exp_util.adb (Requires_Cleanup_Actions): An ignored Ghost entity
4889 does not require any clean up. Add two missing cases that deal
4890 with block statements.
4891 * freeze.adb Add with and use clauses for Ghost.
4892 (Freeze_Entity): Capture/restore the value of Ghost_Mode on entry/exit.
4893 Set the Ghost_Mode in effect.
4894 (Restore_Globals): New routine.
4895 * frontend.adb Add with and use clauses for Ghost. Remove any
4896 ignored Ghost code from all units that qualify.
4897 * ghost.adb New unit.
4898 * ghost.ads New unit.
4899 * gnat1drv.adb Add with clause for Ghost. Initialize and lock
4900 the table in package Ghost.
4901 * lib.ads: Alphabetize several subprogram declarations.
4902 * lib-xref.adb (Output_References): Do not generate reference
4903 information for ignored Ghost entities.
4904 * opt.ads Add new type Ghost_Mode_Type and new global variable
4906 * rtsfind.adb (Load_RTU): Provide a clean environment when
4907 loading a runtime unit.
4908 * sem.adb (Analyze): Capture/restore the value of Ghost_Mode on
4909 entry/exit as the node may set a different mode.
4911 Capture/restore the value of Ghost_Mode on entry/exit as the
4912 unit may be withed from a unit with a different Ghost mode.
4913 * sem_ch3.adb Add with and use clauses for Ghost.
4914 (Analyze_Full_Type_Declaration, Analyze_Incomplete_Type_Decl,
4915 Analyze_Number_Declaration, Analyze_Private_Extension_Declaration,
4916 Analyze_Subtype_Declaration): Set the Ghost_Mode in effect. Mark
4917 the entity as Ghost when there is a Ghost_Mode in effect.
4918 (Array_Type_Declaration): The implicit base type inherits the
4919 "ghostness" from the array type.
4920 (Derive_Subprogram): The
4921 alias inherits the "ghostness" from the parent subprogram.
4922 (Make_Implicit_Base): The implicit base type inherits the
4923 "ghostness" from the parent type.
4924 * sem_ch5.adb Add with and use clauses for Ghost.
4925 (Analyze_Assignment): Set the Ghost_Mode in effect.
4926 * sem_ch6.adb Add with and use clauses for Ghost.
4927 (Analyze_Abstract_Subprogram_Declaration, Analyze_Procedure_Call,
4928 Analyze_Subprogram_Body_Helper, Analyze_Subprogram_Declaration):
4929 Set the Ghost_Mode in effect. Mark the entity as Ghost when
4930 there is a Ghost_Mode in effect.
4931 * sem_ch7.adb Add with and use clauses for Ghost.
4932 (Analyze_Package_Body_Helper, Analyze_Package_Declaration,
4933 Analyze_Private_Type_Declaration): Set the Ghost_Mode in
4934 effect. Mark the entity as Ghost when there is a Ghost_Mode
4936 * sem_ch8.adb Add with and use clauses for Ghost.
4937 (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
4938 Analyze_Object_Renaming, Analyze_Package_Renaming,
4939 Analyze_Subprogram_Renaming): Set the Ghost_Mode in effect. Mark
4940 the entity as Ghost when there is a Ghost_Mode in effect.
4941 (Find_Type): Check the Ghost context of a type.
4942 * sem_ch11.adb Add with and use clauses for Ghost.
4943 (Analyze_Exception_Declaration): Set the Ghost_Mode in
4944 effect. Mark the entity as Ghost when there is a Ghost_Mode
4946 * sem_ch12.adb Add with and use clauses for Ghost.
4947 (Analyze_Generic_Package_Declaration,
4948 Analyze_Generic_Subprogram_Declaration): Set the Ghost_Mode in effect.
4949 Mark the entity as Ghost when there is a Ghost_Mode in effect.
4950 * sem_prag.adb Add with and use clauses for Ghost.
4951 (Analyze_Pragma): Ghost-related checks are triggered when there
4952 is a Ghost mode in effect.
4953 (Create_Abstract_State): Mark the
4954 entity as Ghost when there is a Ghost_Mode in effect.
4955 * sem_res.adb Add with and use clauses for Ghost.
4956 (Check_Ghost_Context): Removed.
4957 * sem_util.adb (Check_Ghost_Completion): Removed.
4958 (Check_Ghost_Derivation): Removed.
4959 (Incomplete_Or_Partial_View):
4960 Add a guard in case the entity has not been analyzed yet
4961 and does carry a scope.
4962 (Is_Declaration): New routine.
4963 (Is_Ghost_Entity): Removed.
4964 (Is_Ghost_Statement_Or_Pragma):
4966 (Is_Subject_To_Ghost): Removed.
4967 (Set_Is_Ghost_Entity):
4969 (Within_Ghost_Scope): Removed.
4970 * sem_util.adb (Check_Ghost_Completion): Removed.
4971 (Check_Ghost_Derivation): Removed.
4972 (Is_Declaration): New routine.
4973 (Is_Ghost_Entity): Removed.
4974 (Is_Ghost_Statement_Or_Pragma): Removed.
4975 (Is_Subject_To_Ghost): Removed.
4976 (Set_Is_Ghost_Entity): Removed.
4977 (Within_Ghost_Scope): Removed.
4978 * sinfo.ads Add a section on Ghost mode.
4979 * treepr.adb (Print_Header_Flag): New routine.
4980 (Print_Node_Header): Factor out code. Output flag
4981 Is_Ignored_Ghost_Node.
4982 * gcc-interface/Make-lang.in: Add dependency for unit Ghost.
4984 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
4986 * freeze.adb (Freeze_Array_Type) <Complain_CS>: Remove always
4987 true test and unreachable 'else' arm.
4989 2015-01-06 Vincent Celier <celier@adacore.com>
4991 * prj-conf.adb (Check_Target): Improve error message when
4992 there are mismatched targets between the on in the configuration
4993 project file and the specified one, either in the main project
4994 file or in the --target= switch.
4996 2015-01-06 Pascal Obry <obry@adacore.com>
4998 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Mode and
4999 Install_Name attribute definitions.
5001 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5003 * freeze.adb (Wrap_Imported_Subprogram): Indicate that the
5004 generated Import pragma for the internal imported procedure does
5005 not come from an aspect, so that Is_Imported can be properly
5008 2015-01-06 Gary Dismukes <dismukes@adacore.com>
5010 * sem_ch12.adb (Might_Inline_Subp): Record whether
5011 any subprograms in the generic package are marked with
5012 pragma Inline_Always (setting flag Has_Inline_Always).
5013 (Analyze_Package_Instantiation): Add test of Has_Inline_Always
5014 alongside existing test of Front_End_Inlining as alternative
5015 conditions for setting Inline_Now. Also add test of
5016 Has_Inline_Always along with Front_End_Inlining test as an
5017 alternative condition for setting Needs_Body to False.
5019 2015-01-06 Tristan Gingold <gingold@adacore.com>
5021 * i-cpoint.adb (Copy_Array): Handle overlap.
5023 2015-01-06 Pascal Obry <obry@adacore.com>
5025 * bindgen.adb: Minor style fix.
5027 2015-01-06 Robert Dewar <dewar@adacore.com>
5029 * sem_util.ads, sem_util.adb: Minor reformatting.
5031 2015-01-06 Vincent Celier <celier@adacore.com>
5033 * prj-conf.adb (Parse_Project_And_Apply_Config): Reset incomplete
5034 with flags before parsing the projects.
5035 * prj-err.adb (Error_Msg): Do nothing if there are incomplete withs.
5036 * prj-part.adb (Post_Parse_Context_Clause): Set Incomplete_Withs
5037 to True in the flags, when Ignore_Missing_With is True and an
5038 imported project cannot be found.
5039 * prj-proc.adb (Expression): When there are incomplete withs and
5040 a variable or attribute is not found, set the variable/attribute
5042 * prj.ads (Processing_Flags): New flag Incomplete_Withs,
5045 2015-01-06 Vasiliy Fofanov <fofanov@adacore.com>
5047 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-conf.adb,
5048 prj-err.adb: Add new switch --no-command-line.
5050 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5052 * sem_ch12.adb: Sloc of wrapper is that of instantiation.
5054 2015-01-06 Robert Dewar <dewar@adacore.com>
5056 * sem_ch11.adb: Minor reformatting.
5058 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5060 * exp_aggr.adb (Get_Assoc_Expr): New routine internal to
5061 Build_Array_Aggr_Code, used to initialized components covered
5062 by a box association. If the component type is scalar and has
5063 a default aspect, use it to initialize such components.
5065 2015-01-06 Pascal Obry <obry@adacore.com>
5067 * rtinit.c (__gnat_runtime_initialize): Add a parameter to
5068 control the setup of the exception handler.
5069 * initialize.c: Remove unused declaration.
5070 * bindgen.adb: Always call __gnat_runtime_initialize and pass
5071 whether the exeception handler must be set or not.
5073 2015-01-06 Thomas Quinot <quinot@adacore.com>
5075 * freeze.adb (Set_SSO_From_Defaults): When setting scalar storage
5076 order to native from default, make sure to also adjust bit order.
5077 * exp_aggr.adb: Minor reformatting.
5079 2015-01-06 Robert Dewar <dewar@adacore.com>
5081 * s-valllu.adb, s-valllu.ads, s-valuti.ads, s-valuns.adb, s-valuns.ads,
5082 s-valrea.adb, s-valrea.ads: Add some additional guards for
5083 Str'Last = Positive'Last.
5085 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5087 * sem_ch12.adb, sem_ch8.adb: Ongoing work for wrappers for actual
5090 2015-01-06 Javier Miranda <miranda@adacore.com>
5092 * exp_disp.adb (Expand_Interface_Conversion): Reapply patch.
5094 2015-01-06 Thomas Quinot <quinot@adacore.com>
5096 * sem_util.ads: Minor reformatting.
5097 * sem_cat.adb (In_RCI_Visible_Declarations): Change back to...
5098 (In_RCI_Declaration) Return to old name, as proper checking of
5099 entity being in the visible part depends on entity kind and must
5100 be done by the caller.
5102 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5104 * sem_ch12.adb, sem_ch12.ads, sem_ch8.adb: Ongoing work for wrappers
5105 for operators in SPARK.
5107 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5109 * sem_aggr.adb (Get_Value): In ASIS mode, preanalyze the
5110 expression in an others association before making copies for
5111 separate resolution and accessibility checks. This ensures that
5112 the type of the expression is available to ASIS in all cases,
5113 in particular if the expression is itself an aggregate.
5115 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
5117 * einfo.ads (Has_Independent_Components): Document extended
5119 * einfo.adb (Has_Independent_Components): Remove obsolete assertion.
5120 (Set_Has_Independent_Components): Adjust assertion.
5121 * sem_prag.adb (Analyze_Pragma): Also set Has_Independent_Components
5122 for pragma Atomic_Components. Set Has_Independent_Components
5123 on the object instead of the type for an object declaration with
5124 pragma Independent_Components.
5126 2015-01-06 Olivier Hainque <hainque@adacore.com>
5128 * set_targ.adb (Read_Target_Dependent_Values): Set
5129 Long_Double_Index when "long double" is read.
5130 (elaboration code): Register_Back_End_Types only when not reading from
5131 config files. Doing otherwise is pointless and error prone.
5133 2015-01-06 Robert Dewar <dewar@adacore.com>
5135 * s-valrea.adb (Value_Real): Check for Str'Last = Positive'Last
5137 2015-01-06 Robert Dewar <dewar@adacore.com>
5139 * a-wtgeau.adb, a-ztgeau.adb, a-tigeau.adb (String_Skip): Raise PE if
5140 Str'Last = Positive'Last.
5142 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5144 * sem_ch6.adb (Matches_Limited_View): Handle properly the case
5145 where the non-limited type is a generic actual and appears as
5146 a subtype of the non-limited view of the other.
5147 * freeze.adb (Build_Renamed_Body): If the return type of the
5148 declaration that is being completed is a limited view and the
5149 non-limited view is available, use it in the specification of
5152 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5154 * sem_ch3.adb (Find_Type_Name): If there is a previous tagged
5155 incomplete view, the type of the classwide type common to both
5156 views is the type being declared.
5158 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
5160 * einfo.ads (Is_Independent): Further document extended usage.
5162 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
5164 * einfo.ads (Is_Independent): Document extended usage.
5165 * einfo.adb (Is_Independent): Remove obsolete assertion.
5166 (Set_Is_Independent): Likewise.
5167 * sem_prag.adb (Process_Atomic_Shared_Volatile): Rename into...
5168 (Process_Atomic_Independent_Shared_Volatile): ...this.
5169 Deal with pragma Independent here.
5170 (Analyze_Pragma): Adjust
5171 to above renaming and also invoke it for pragma Independent.
5172 Adjust comment for Independent_Components.
5174 2015-01-06 Robert Dewar <dewar@adacore.com>
5176 * snames.ads-tmpl: Remove entries for attribute Enum_Image.
5177 * exp_attr.adb: Remove reference to Attribute_Enum_Image.
5179 2015-01-06 Robert Dewar <dewar@adacore.com>
5181 * s-vallli.adb (Value_Long_Long_Integer): Handle case of Str'Last
5183 * s-valllu.adb (Value_Long_Long_Unsigned): Handle case of
5184 Str'Last = Positive'Last.
5186 2015-01-06 Robert Dewar <dewar@adacore.com>
5188 * sem_prag.adb (Process_Inline): Remove redundant construct
5189 warning (-gnatw.r) for an ineffective pragma Inline.
5191 2015-01-06 Robert Dewar <dewar@adacore.com>
5193 * s-valint.adb: Fix typo in last checkin.
5194 * s-valuns.adb (Value_Unsigned): More efficient fix for
5196 * sem_attr.adb (Analyze_Attribute): Minor reformatting
5197 (Eval_Attribute): Static ervaluation of 'Img for enumeration types.
5199 2015-01-06 Robert Dewar <dewar@adacore.com>
5201 * s-valint.adb, s-valuns.adb (Value_Integer): Deal with case where
5202 Str'Last = Positive'Last
5204 2015-01-06 Thomas Quinot <quinot@adacore.com>
5206 * xoscons.adb: Display exception information and return non-zero
5207 exit status in top level exception handler.
5209 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5211 * sem_ch8.adb: Code clean up.
5213 2015-01-06 Tristan Gingold <gingold@adacore.com>
5215 * targparm.ads: Remove obsolete comment.
5217 2015-01-06 Olivier Hainque <hainque@adacore.com>
5219 * gcc-interface/decl.c (gnat_to_gnu_entity, case E_Variable): When
5220 constructing a ref to variable, update inner_const_flag from the
5221 variable TREE_READONLY attribute.
5222 * gcc-interface/targtyps.c (WIDEST_HARDWARE_FP_SIZE): Remove default
5224 (get_target_float_size): Remove.
5225 (get_target_double_size): Remove.
5226 (get_target_long_double_size): Remove.
5228 2015-01-06 Pascal Obry <obry@adacore.com>
5230 * adaint.c (ProcListEvt): Set to NULL.
5231 * rtinit.c: New file.
5232 (__gnat_rt_init_count): New reference counter set to 0.
5233 (__gnat_runtime_initialize): Move code here from __gnat_initialize when
5234 this code is actually needed for the runtime initialization. This
5235 routine returns immediately if the initialization has already been done.
5236 * final.c: Revert previous change.
5237 * rtfinal.c: New file.
5238 (__gnat_runtime_finalize)[Win32]: Add finalization of the critical
5239 section and event. The default version of this routine is empty (except
5240 for the reference counting code). This routine returns immediately if
5241 some others libraries are referencing the runtime.
5242 * bindgen.adb (Gen_Adainit): Generate call to Runtime_Initialize
5243 remove circuitry to initialize the signal handler as this is
5244 now done by the runtime initialization routine.
5245 (Gen_Adafinal): Generate call to Runtime_Finalize.
5246 * gnat_ugn.texi: Update documentation about concurrency and
5247 initialization/finalization of the run-time.
5248 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Add
5249 references to rtfinal.o and rtinit.o
5251 2015-01-06 Robert Dewar <dewar@adacore.com>
5253 * exp_attr.adb (Expand_N_Attribute_Reference): Add dummy entry
5255 * sem_attr.adb: Implement Enum_Image attribute.
5256 * snames.ads-tmpl: Add entries for Enum_Image attribute.
5258 2015-01-06 Robert Dewar <dewar@adacore.com>
5260 * namet.ads: Document use of Boolean2 for No_Use_Of_Entity.
5261 * restrict.ads (No_Use_Of_Entity): New table.
5262 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
5263 Ignore No_Use_Of_Entity (will be processed in parser).
5264 * snames.ads-tmpl: Add entry for Name_No_Use_Of_Entity.
5266 2015-01-06 Vincent Celier <celier@adacore.com>
5268 * prj-tree.adb (Imported_Or_Extended_Project_Of): Do not try
5269 to check for an extended project, if a project does not have
5270 yet a project declaration.
5272 2015-01-06 Pierre-Marie Derodat <derodat@adacore.com>
5274 * scos.ads: Update documentation about the SCO table build
5275 process and about table records format.
5276 * par_sco.ads (SCO_Record): Rename to SCO_Record_Raw.
5277 (SCO_Record_Filtered): New procedure.
5278 (Set_SCO_Logical_Operator): New procedure.
5279 (dsco): Update documentation.
5280 * par_sco.adb: Update library-level comments.
5281 (SCO_Generation_State_Type): New type.
5282 (SCO_Generation_State): New variable.
5283 (SCO_Raw_Table): New package instanciation.
5284 (Condition_Pragma_Hash_Table): Rename to SCO_Raw_Hash_Table.
5286 (Tristate): New type.
5287 (Is_Logical_Operator): Return Tristate and update documentation.
5288 (Has_Decision): Update call to Is_Logical_Operator and complete
5290 (Set_Table_Entry): Rename to Set_Raw_Table_Entry, update
5291 comment, add an assertion for state checking and change
5292 references to SCO_Table into SCO_Raw_Table.
5293 (dsco): Refactor to dump the raw and the filtered tables.
5294 (Process_Decisions.Output_Decision_Operand): Handle putative
5295 short-circuit operators.
5296 (Process_Decisions.Output_Element): Update references
5297 to Set_Table_Entry and to Condition_Pragma_Hash_Table.
5298 (Process_Decisions.Process_Decision_Operand): Update call
5299 to Is_Logical_Operator.
5300 (Process_Decisions.Process_Node): Handle putative short-circuit
5301 operators and change references to
5302 SCO_Table into SCO_Raw_Table.
5303 (SCO_Output): Add an assertion
5304 for state checking and remove code that used to stamp out SCO entries.
5305 (SCO_Pragma_Disabled): Change reference to SCO_Table
5307 (SCO_Record): Rename to SCO_Record_Raw,
5308 add an assertion for state checking and change references
5309 to SCO_Table into SCO_Raw_Table.
5310 (Set_SCO_Condition): Add an assertion for state checking, update
5311 references to Condition_Pragma_Hash_Table and change references to
5312 SCO_Table into SCO_Raw_Table.
5313 (Set_SCO_Pragma_Enabled): Add an assertion for state checking and
5314 change references to SCO_Table into SCO_Raw_Table.
5315 (Set_SCO_Logical_Operator): New procedure.
5316 (Traverse_Declarations_Or_Statements.Set_Statement_Entry): Update
5317 references to Set_Table_Entry and to Condition_Pragma_Hash_Table.
5318 (SCO_Record_Fildered): New procedure.
5319 * gnat1drv.adb (Gnat1drv): Invoke the SCO filtering pass.
5320 * lib-writ.adb (Write_ALI): Invoke the SCO filtering pass and
5322 * par-load.adb (Load): Update reference to SCO_Record.
5323 * par.adb (Par): Update reference to SCO_Record.
5324 * put_scos.adb (Put_SCOs): Add an assertion to check that no
5325 putative SCO condition reaches this end.
5326 * sem_ch10.adb (Analyze_Proper_Body): Update reference to SCO_Record.
5327 * sem_res.adb (Resolve_Logical_Op): Validate putative SCOs
5328 when corresponding to an "and"/"or" operator affected by the
5329 Short_Circuit_And_Or pragma.
5331 2015-01-06 Robert Dewar <dewar@adacore.com>
5333 * sem_ch8.adb (Analyze_Use_Package): Give more specific error
5334 msg for attempted USE of generic subprogram or subprogram.
5336 2015-01-06 Robert Dewar <dewar@adacore.com>
5338 * s-valllu.adb, a-tiinau.adb, a-timoau.adb, a-ztinau.adb, a-ztmoau.adb,
5339 s-valuns.adb, s-valrea.adb, a-wtflau.adb, a-tiflau.adb, a-ztflau.adb,
5340 a-wtinau.adb, a-wtmoau.adb: Document recognition of : in place of #.
5342 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5344 * sem_ch13.adb (Analyze_Aspect_Specifications): For aspects
5345 that specify stream subprograms, if the prefix is a class-wide
5346 type then the generated attribute definition clause must apply
5347 to the same class-wide type.
5348 (Default_Iterator): An iterator defined by an aspect of some
5349 container type T must have a first parameter of type T, T'class,
5350 or an access to such (from code reading RM 5.5.1 (2/3)).
5352 2015-01-06 Arnaud Charlet <charlet@adacore.com>
5354 * gnat1drv.adb: Minor: complete previous change.
5356 2015-01-06 Olivier Hainque <hainque@adacore.com>
5358 * set_targ.ads (C_Type_For): New function. Return the name of
5359 a C type supported by the back-end and suitable as a basis to
5360 construct the standard Ada floating point type identified by
5361 the T parameter. This is used as a common ground to feed both
5362 ttypes values and the GNAT tree nodes for the standard floating
5364 * set_targ.adb (Long_Double_Index): The index at which "long
5365 double" gets registered in the FPT_Mode_Table. This is useful to
5366 know whether we have a "long double" available at all and get at
5367 it's characteristics without having to search the FPT_Mode_Table
5368 when we need to decide which C type should be used as the
5369 basis for Long_Long_Float in Ada.
5370 (Register_Float_Type): Fill Long_Double_Index.
5371 (FPT_Mode_Index_For): New function. Return the index in
5372 FPT_Mode_Table that designates the entry corresponding to the
5373 provided C type name.
5374 (FPT_Mode_Index_For): New function. Return the index in
5375 FPT_Mode_Table that designates the entry for a back-end type
5376 suitable as a basis to construct the standard Ada floating point
5377 type identified by the input T parameter.
5378 (elaboration code): Register_Back_End_Types unconditionally,
5379 so C_Type_For can operate regardless of -gnateT. Do it
5380 early so we can query it for the floating point sizes, via
5381 FPT_Mode_Index_For. Initialize Float_Size, Double_Size and
5382 Long_Double_Size from the FPT_Mode_Table, as cstand will do.
5383 * cstand.adb (Create_Float_Types): Use C_Type_For to determine
5384 which C type should be used as the basis for the construction
5385 of the Standard Ada floating point types.
5386 * get_targ.ads (Get_Float_Size, Get_Double_Size,
5387 Get_Long_Double_Size): Remove.
5388 * get_targ.adb: Likewise.
5390 2015-01-06 Thomas Quinot <quinot@adacore.com>
5392 * sem_cat.adb (In_RCI_Declaration): Remove unnecessary
5393 parameter and rename to...
5394 (In_RCI_Visible_Declarations): Fix handling of private part of nested
5396 (Validate_RCI_Subprogram_Declaration): Reject illegal function
5397 returning anonymous access in RCI unit.
5399 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5401 * sem_ch6.adb (New_Overloaded_Entity): In GNATprove mode, a
5402 function wrapper may be a homonym of another local declaration.
5403 * sem_ch8.adb (Analyze_Subprogram_Renaming): In GNATprove mode,
5404 build function and operator wrappers after the actual subprogram
5405 has been resolved, and replace the standard renaming declaration
5406 with the declaration of wrapper.
5407 * sem_ch12.ads (Build_Function_Wrapper, Build_Operator_Wraooer):
5408 make public for use elsewhere.
5409 * sem_ch12.adb (Build_Function_Wrapper, Build_Operator_Wraooer):
5410 rewrite, now that actual is fully resolved when wrapper is
5413 2015-01-06 Javier Miranda <miranda@adacore.com>
5415 * exp_disp.adb: Revert previous change.
5417 2015-01-06 Robert Dewar <dewar@adacore.com>
5419 * exp_util.adb: Change name Name_Table_Boolean to
5420 Name_Table_Boolean1.
5421 * namet.adb: Change name Name_Table_Boolean to Name_Table_Boolean1
5422 Introduce Name_Table_Boolean2/3.
5423 * namet.ads: Change name Name_Table_Boolean to Name_Table_Boolean1
5424 Introduce Name_Table_Boolean2/3.
5425 * par-ch13.adb: Change name Name_Table_Boolean to
5426 Name_Table_Boolean1.
5428 2015-01-06 Bob Duff <duff@adacore.com>
5430 * gnat_rm.texi: Improve documentation regarding No_Task_Termination.
5432 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5434 * sem_aggr.adb (Resolve_Record_Aggregte, Get_Value): For an
5435 others choice that covers multiple components, analyze each
5436 copy with the type of the component even in compile-only mode,
5437 to detect potential accessibility errors.
5439 2015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
5441 * sem_res.adb (Is_Assignment_Or_Object_Expression): New routine.
5442 (Resolve_Actuals): An effectively volatile out
5443 parameter cannot act as an in or in out actual in a call.
5444 (Resolve_Entity_Name): An effectively volatile out parameter
5447 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5449 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If the body is
5450 the expansion of an expression function it may be pre-analyzed
5451 if a 'access attribute is applied to the function, in which case
5452 last_entity may have been assigned already.
5454 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5456 * sem_ch4.adb (Analyze_One_Call): If formal has an incomplete
5457 type and actual has the corresponding full view, there is no
5458 error, but a case of use of incomplete type in a predicate or
5459 invariant expression.
5461 2015-01-06 Vincent Celier <celier@adacore.com>
5463 * makeutl.adb (Insert_No_Roots): Make sure that the same source
5464 in two different project tree is checked in both trees, if they
5465 are sources of two different projects, extended or not.
5467 2015-01-06 Arnaud Charlet <charlet@adacore.com>
5469 * gnat1drv.adb: Minor code clean up.
5470 (Adjust_Global_Switches): Ignore gnatprove_mode in codepeer_mode.
5472 2015-01-06 Bob Duff <duff@adacore.com>
5474 * osint.adb (Read_Source_File): Don't print out
5475 file name unless T = Source.
5477 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5479 * sem_util.adb (Is_Variable, Is_OK_Variable_For_Out_Formal):
5480 recognize improper uses of constant_reference types as actuals
5481 for in-out parameters.
5482 (Check_Function_Call): Do not collect identifiers if function
5483 name is missing because of previous error.
5485 2015-01-06 Robert Dewar <dewar@adacore.com>
5487 * ali-util.adb, sem_prag.adb, rtsfind.adb, sem_util.adb, sem_res.adb,
5488 ali.adb, binde.adb, namet.adb, namet.ads, gnatls.adb, bcheck.adb:
5489 Minor change of name Name_Table_Info => Name_Table_Int.
5491 2015-01-06 Robert Dewar <dewar@adacore.com>
5493 * exp_strm.adb (Build_Elementary_Input_Call): Clarify comments
5494 in previous checkin.
5495 * freeze.adb (Freeze_Fixed_Point_Type): Add warning for shaving
5497 * sem_prag.adb, sem_ch10.adb, sem_ch6.adb: Minor reformatting.
5499 2015-01-06 Vincent Celier <celier@adacore.com>
5501 * a-strsup.adb (Times (Natural;String;Positive)): Raise
5502 Length_Error, not Index_Error, when the result is too long.
5504 2015-01-06 Thomas Quinot <quinot@adacore.com>
5506 * a-direct.adb (Create_Path): Minor error handling and
5507 performance improvement.
5509 2015-01-06 Robert Dewar <dewar@adacore.com>
5511 * checks.ads, sem_ch12.adb: Minor reformatting.
5512 * exp_ch4.adb (Expand_N_Op_Divide): Generate explicit divide by
5513 zero check for fixed-point case if Backend_Divide_Checks_On_Target
5516 2015-01-06 Robert Dewar <dewar@adacore.com>
5518 * sem_prag.adb (Analyze_Pragma, case No_Elaboration_Code_All):
5519 Do not set restriction No_Elaboration_Code unless the pragma
5520 appears in the main unit).
5522 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5524 * sem_ch10.adb (Is_Regular_With_Clause): Add guard to verify
5525 that with clause has already been analyzed before checking kind
5528 2015-01-06 Robert Dewar <dewar@adacore.com>
5530 * exp_strm.adb (Build_Elementary_Input_Call): Return base type
5531 (as required by RM).
5533 2015-01-06 Arnaud Charlet <charlet@adacore.com>
5535 * a-reatim.adb ("/"): Add explicit pragma Unsuppress (Division_Check).
5537 2015-01-06 Robert Dewar <dewar@adacore.com>
5539 * sem_prag.adb (Process_Suppress_Unsuppress): Add extra warning
5540 for ignoring pragma Suppress (Elaboration_Check) in SPARK mode.
5542 2015-01-06 Javier Miranda <miranda@adacore.com>
5544 * exp_disp.adb (Expand_Interface_Conversion): No displacement
5545 of the pointer to the object needed when the type of the operand
5546 is not an interface type and the interface is one of its parent
5547 types (since they share the primary dispatch table).
5549 2015-01-06 Vincent Celier <celier@adacore.com>
5551 * prj-env.adb: Minor comment update.
5553 2015-01-06 Javier Miranda <miranda@adacore.com>
5555 * sem_res.adb (Valid_Conversion): Restrict the checks on anonymous
5556 access types whose target type is an interface type to operands
5557 that are access types; required to report an error when the
5558 operand is not an access type.
5560 2015-01-06 Bob Duff <duff@adacore.com>
5562 * a-cfinve.adb (Copy): Set the discriminant to the Length when
5564 * a-cofove.ads (Capacity): Add a postcondition.
5565 * a-cfinve.ads (Capacity): Add a postcondition.
5566 (Reserve_Capacity): Correct the postcondition in the case where
5567 Capacity = 0; that means "Capacity => Length (Container)".
5568 * a-cofove.adb (Elems[c]): Add a comment
5569 explaining the dangers and how to avoid them.
5571 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5573 * sem_ch12.adb: Code clean up.
5575 2015-01-06 Arnaud Charlet <charlet@adacore.com>
5577 * gnatvsn.ads: Bump copyright year.
5579 2015-01-06 Robert Dewar <dewar@adacore.com>
5581 * s-taskin.ads, s-traces.ads: Minor reformatting.
5582 * exp_util.adb: Minor typo fix.
5584 2015-01-06 Vincent Celier <celier@adacore.com>
5586 * gnatls.adb (Search_RTS): Invoke Initialize_Default_Project_Path
5587 with the runtime name.
5588 * prj-env.adb (Initialize_Default_Project_Path): When both
5589 Target_Name and Runtime_Name are not empty string, add to the
5590 project path the two directories .../lib/gnat and .../share/gpr
5591 related to the runtime.
5592 * prj-env.ads (Initialize_Default_Project_Path): New String
5593 parameter Runtime_Name, defaulted to the empty string.
5595 2015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
5597 * frontend.adb: Guard against the case where a configuration
5598 pragma may be split into multiple pragmas and the original
5599 rewritten as a null statement.
5600 * sem_prag.adb (Analyze_Pragma): Insert a brand new Check_Policy
5601 pragma using Insert_Before rather than Insert_Action. This
5602 takes care of the configuration pragma case where Insert_Action
5605 2015-01-06 Bob Duff <duff@adacore.com>
5607 * a-coboho.ads (Element_Access): Add "pragma
5608 No_Strict_Aliasing (Element_Access);". This is needed because
5609 we are unchecked-converting from Address to Element_Access.
5610 * a-cofove.ads, a-cofove.adb (Elems,Elemsc): Fix bounds of the
5613 2015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
5615 * sem_res.adb (Resolve_Actuals): Remove the
5616 restriction which prohibits volatile actual parameters with
5617 enabled external propery Async_Writers to act appear in procedure
5618 calls where the corresponding formal is of mode OUT.
5620 2015-01-05 Jakub Jelinek <jakub@redhat.com>
5622 * gnat_ugn.texi: Bump @copying's copyright year.
5624 2015-01-05 Eric Botcazou <ebotcazou@adacore.com>
5627 * gcc-interface/Makefile.in (../stamp-tools): Reinstate dropped code.
5629 2015-01-04 Uros Bizjak <ubizjak@gmail.com>
5631 * gcc-interface/misc.c (internal_error_function): Use xasprintf instead
5632 of unchecked asprintf.
5635 Copyright (C) 2015 Free Software Foundation, Inc.
5637 Copying and distribution of this file, with or without modification,
5638 are permitted in any medium without royalty provided the copyright
5639 notice and this notice are preserved.