1 2015-10-16 Arnaud Charlet <charlet@adacore.com>
3 * exp_ch5.adb, sem_ch3.adb, frontend.adb, exp_ch7.adb, exp_ch7.ads,
4 sem_ch5.adb, sem_type.adb, exp_util.adb, exp_util.ads, comperr.adb,
5 exp_attr.adb, sinfo.ads, exp_ch9.adb, make.adb, usage.adb,
6 lib-writ.adb, sem_ch9.adb, bindgen.adb, debug.adb, einfo.adb,
7 einfo.ads, types.ads, checks.adb, sem_prag.adb, s-tasini.adb,
8 rtsfind.ads, freeze.adb, sem_util.adb, sem_util.ads, exp_dbug.adb,
9 gnatlink.adb, gnat1drv.adb, targparm.adb, targparm.ads, exp_ch4.adb,
10 exp_ch11.adb, repinfo.adb, s-soflin.adb, s-soflin.ads, exp_ch6.adb,
11 exp_ch13.adb, sem_mech.adb, sem_ch6.adb, par-prag.adb, exp_disp.adb,
12 sem_ch8.adb, exp_disp.ads, snames.adb-tmpl, exp_aggr.adb, sem_eval.adb,
13 exp_intr.adb, sem_ch13.adb, snames.ads-tmpl, sem_disp.adb, exp_ch3.adb:
14 Code clean up: remove special handling for .NET and JVM.
16 2015-10-16 Arnaud Charlet <charlet@adacore.com>
18 * sem_ch12.adb: Minor punctuation fix in comment
19 * s-rident.ads: Minor consistency fix in comment
20 * exp_attr.adb, g-spipat.ads: punctuation fixes in comments.
21 * restrict.ads: Style fix in comments.
22 * sem_prag.adb: Minor grammar fix in comment
24 2015-10-16 Gary Dismukes <dismukes@adacore.com>
26 * sem_ch12.adb: Minor reformatting/rewording.
28 2015-10-16 Arnaud Charlet <charlet@adacore.com>
30 * einfo.ads: Minor fix of duplicate words
31 * rident.ads: Minor style fix in comment
33 2015-10-16 Hristian Kirtchev <kirtchev@adacore.com>
35 * exp_ch3.adb (Expand_N_Full_Type_Declaration): Do not capture,
36 set and restore the Ghost mode.
37 (Expand_N_Object_Declaration): Do not capture, set and restore the
39 (Freeze_Type): Redo the capture and restore of the Ghost mode.
40 (Restore_Globals): Removed.
41 * exp_ch5.adb (Expand_N_Assignment_Statement): Redo the capture
42 and restore of the Ghost mode.
43 (Restore_Globals): Removed.
44 * exp_ch6.adb (Expand_N_Procedure_Call_Statement):
45 Redo the capture and restore of the Ghost mode.
46 (Expand_N_Subprogram_Body): Redo the capture, set and restore
48 (Expand_N_Subprogram_Declaration): Do not
49 capture, set and restore the Ghost mode.
50 (Restore_Globals): Removed.
51 * exp_ch7.adb (Expand_N_Package_Body): Redo the capture, set
52 and restore of the Ghost mode.
53 (Expand_N_Package_Declaration): Do not capture, set and restore the
55 * exp_ch8.adb (Expand_N_Exception_Renaming_Declaration):
56 Redo the capture and restore of the Ghost mode.
57 (Expand_N_Object_Renaming_Declaration): Redo
58 the capture and restore of the Ghost mode.
59 (Expand_N_Package_Renaming_Declaration):
60 Redo the capture and restore of the Ghost mode.
61 (Expand_N_Subprogram_Renaming_Declaration): Redo the capture
62 and restore of the Ghost mode.
63 * exp_ch11.adb Remove with and use clauses for Ghost.
64 (Expand_N_Exception_Declaration): Do not capture, set and restore
66 * exp_disp.adb (Make_DT): Redo the capture and restore of the
68 (Restore_Globals): Removed.
69 * exp_prag.adb (Expand_Pragma_Check): Do not capture, set
70 and restore the Ghost mode.
71 (Expand_Pragma_Contract_Cases):
72 Redo the capture and restore of the Ghost mode. Preserve the
73 original context of contract cases by setting / resetting the
74 In_Assertion_Expr counter.
75 (Expand_Pragma_Initial_Condition):
76 Redo the capture and restore of the Ghost mode.
77 (Expand_Pragma_Loop_Variant): Redo the capture and restore of
79 (Restore_Globals): Removed.
80 * exp_util.adb (Make_Predicate_Call): Redo the capture and
81 restore of the Ghost mode.
82 (Restore_Globals): Removed.
83 * freeze.adb (Freeze_Entity): Redo the capture and restore of
85 (Restore_Globals): Removed.
86 * ghost.adb (Check_Ghost_Context): Remove the RM reference from
88 (Is_OK_Statement): Account for statements
89 that appear in assertion expressions.
90 (Is_Subject_To_Ghost):
92 * ghost.ads (Is_Subject_To_Ghost): Moved to body.
93 * rtsfind.ads (Load_RTU): Redo the capture and restore of the
95 * sem.adb Add with and use clauses for Ghost.
97 the capture and restore of the Ghost mode. Set the Ghost mode
98 when analyzing a declaration.
99 (Do_Analyze): Redo the capture
100 and restore of the Ghost mode.
101 * sem_ch3.adb (Analyze_Full_Type_Declaration): Do not capture, set
102 and restore the Ghost mode.
103 (Analyze_Incomplete_Type_Decl):
104 Do not capture, set and restore the Ghost mode.
105 (Analyze_Number_Declaration): Do not capture, set and restore the
107 (Analyze_Object_Declaration): Do not capture, set and
108 restore the Ghost mode.
109 (Analyze_Private_Extension_Declaration):
110 Do not capture, set and restore the Ghost mode.
111 (Analyze_Subtype_Declaration): Do not capture, set and restore
113 (Restore_Globals): Removed.
114 * sem_ch5.adb (Analyze_Assignment): Redo the capture and restore
116 (Restore_Globals): Removed.
117 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration):
118 Do not capture, set and restore the Ghost mode.
119 (Analyze_Procedure_Call): Redo the capture and restore of the
121 (Analyze_Subprogram_Body_Helper): Redo the capture
122 and restore of the Ghost mode. (Analyze_Subprogram_Declaration):
123 Do not capture, set and restore the Ghost mode.
124 (Restore_Globals): Removed.
125 * sem_ch7.adb (Analyze_Package_Body_Helper): Redo the capture and
126 restore of the Ghost mode.
127 (Analyze_Package_Declaration):
128 Do not capture, set and restore the Ghost mode.
129 (Analyze_Private_Type_Declaration): Do not capture, set and
130 restore the Ghost mode.
131 (Restore_Globals): Removed.
132 * sem_ch8.adb (Analyze_Exception_Renaming): Do not capture,
133 set and restore the Ghost mode.
134 (Analyze_Generic_Renaming): Do not capture, set and restore the Ghost
136 (Analyze_Object_Renaming): Do not capture, set and restore the
138 (Analyze_Package_Renaming): Do not capture, set and restore the Ghost
140 (Analyze_Subprogram_Renaming): Do not capture, set and restore the
142 (Restore_Globals): Removed.
143 * sem_ch11.adb (Analyze_Exception_Declaration): Do not capture,
144 set and restore the Ghost mode.
145 * sem_ch12.adb (Analyze_Generic_Package_Declaration):
146 Do not capture, set and restore the Ghost mode.
147 (Analyze_Generic_Subprogram_Declaration): Do not capture, set
148 and restore the Ghost mode.
149 * sem_ch13.adb (Build_Invariant_Procedure_Declaration): Redo
150 the capture and restore of the Ghost mode.
151 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
152 Redo the capture and restore of the Ghost mode.
153 (Analyze_External_Property_In_Decl_Part):
154 Redo the capture and restore of the Ghost mode.
155 (Analyze_Initial_Condition_In_Decl_Part): Redo the
156 capture and restore of the Ghost mode. (Analyze_Pragma):
157 Do not capture, set and restore the Ghost mode for Assert.
158 Redo the capture and restore of the Ghost mode for Check. Do
159 not capture and restore the Ghost mode for Invariant.
160 (Analyze_Pre_Post_Condition_In_Decl_Part): Redo the capture and
161 restore of the Ghost mode.
162 * sem_res.adb (Resolve): Capture, set and restore the Ghost mode
163 when resolving a declaration.
164 * sem_util.adb (Build_Default_Init_Cond_Procedure_Body):
165 Redo the capture and restore of the Ghost mode.
166 (Build_Default_Init_Cond_Procedure_Declaration): Redo the capture
167 and restore of the Ghost mode.
169 2015-10-16 Bob Duff <duff@adacore.com>
171 * debug.adb: Document -gnatdQ switch.
173 2015-10-16 Ed Schonberg <schonberg@adacore.com>
175 * sem_ch12.adb (Analyze_Formal_Subprogram): Implement rule that
176 a formal abstract subprogram cannot have a null default: RM 12.6
179 2015-10-16 Bob Duff <duff@adacore.com>
181 * sem_util.ads, sinput.ads, bcheck.adb: Minor comment fixes.
183 2015-10-16 Javier Miranda <miranda@adacore.com>
185 * inline.adb (Add_Inlined_Body): Ensure that
186 Analyze_Inlined_Bodies will be invoked after completing the
187 analysis of the current unit.
189 2015-10-16 Arnaud Charlet <charlet@adacore.com>
191 * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order): Fix error
192 message for bad last bit position.
193 * sem_ch3.adb, sem_util.adb, sem_util.ads: Minor reformatting.
195 2015-10-16 Ed Schonberg <schonberg@adacore.com>
197 * exp_ch5.adb (Expand_N_Case_Statement): If expression is
198 compile-time known but does not obey a static predicate on
199 its type, replace the case statement with a raise statement,
200 as with other statically detected constraint violations.
202 2015-10-16 Bob Duff <duff@adacore.com>
204 * s-traceb.adb, s-traceb.ads, s-traceb-hpux.adb, s-traceb-mastop.adb:
206 * opt.ads: Minor typo.
208 2015-10-16 Ed Schonberg <schonberg@adacore.com>
210 * sem_util.adb (Gather_Components): When gathering components
211 of a nested variant, the record type used in legality checks is
212 the enclosing record type.
214 2015-10-13 Jakub Jelinek <jakub@redhat.com>
216 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10,
217 DEF_FUNCTION_TYPE_11): Define.
219 2015-10-09 Eric Botcazou <ebotcazou@adacore.com>
221 * gcc-interface/Make-lang.in: Make sure that GNAT1_OBJS and not just
222 GNAT1_ADA_OBJS are compiled only after generated files are created.
224 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
226 * gcc-interface/trans.c (convert_with_check): Use real_arithmetic
227 instead of REAL_ARITHMETIC.
229 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
231 * gcc-interface/trans.c (convert_with_check): Use real_less instead
234 2015-10-02 Doug Rupp <rupp@adacore.com>
235 Olivier Hainque <hainque@adacore.com>
237 * gcc-interface/lang.opt (fbuiltin-printf): Accept.
238 * gcc-interface/misc.c (gnat_handle_option): Ignore it.
239 * gcc-interface/lang-specs.h (@ada, @adawhy, @adascil): Propagate -f*
240 flags as -g* and -m* flags past -gnatez.
242 2015-10-02 Eric Botcazou <ebotcazou@adacore.com>
244 * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Warnings>: Replace
245 linear search with call to find_opt and issue warnings if the -W
246 switch is not appropriate.
248 2015-10-02 Eric Botcazou <ebotcazou@adacore.com>
250 * gcc-interface/ada-tree.h (DECL_RESTRICTED_ALIASING_P): New flag.
251 * gcc-interface/decl.c (gnat_to_gnu_param): For parameters passed by
252 reference but whose type isn't by-ref and whose mechanism hasn't been
253 forced to by-ref, set the DECL_RESTRICTED_ALIASING_P flag directly on
254 them instead of changing their type.
255 * gcc-interface/trans.c (scan_rhs_r): New helper function.
256 (independent_iterations_p): New predicate.
257 (Loop_Statement_to_gnu): For a loop with an iteration scheme, set an
258 ivdep pragma if the iterations are independent.
260 2015-10-02 Eric Botcazou <ebotcazou@adacore.com>
262 * gcc-interface/trans.c (find_loop_for): Use FOR_EACH_VEC_ELT_REVERSE.
263 (Loop_Statement_to_gnu): Use FOR_EACH_VEC_ELT.
264 (finalize_nrv): Use FOR_EACH_VEC_SAFE_ELT and initialize field.
265 (build_stmt_group): Add blank lines.
267 2015-09-30 Thomas Schwinge <thomas@codesourcery.com>
269 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_11): Don't define.
271 2015-09-28 Tom de Vries <tom@codesourcery.com>
273 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_6): Define.
275 2015-09-17 Eric Botcazou <ebotcazou@adacore.com>
277 * gcc-interface/trans.c (emit_check): Do not touch TREE_SIDE_EFFECTS.
279 2015-09-14 Pierre-Marie de Rodat <derodat@adacore.com>
281 * gcc-interface/misc.c (gnat_post_options): Issue a warning if
282 generating STABS debugging information when not the default.
284 2015-09-14 Eric Botcazou <ebotcazou@adacore.com>
286 * gcc-interface/gigi.h (ref_filename): Delete.
287 (Sloc_to_locus): Add clean_column parameter defaulting to false.
288 (build_call_raise): Adjust comment.
289 (build_call_raise_range): Move around.
290 * gcc-interface/trans.c (ref_filename): Delete.
291 (gigi): Fix formatting.
292 (block_end_locus_sink): Delete.
293 (Sloc_to_locus1): Tidy up and reformat. Rename into...
294 (Sloc_to_locus): ...this. Add default for clean_colmun parameter.
295 (set_expr_location_from_node1): Rename into...
296 (set_expr_location_from_node): ...this.
297 (set_end_locus_from_node): Move around. Adjust for renaming.
298 (Handled_Sequence_Of_Statements_to_gnu): Likewise.
299 (add_cleanup): Likewise.
300 * gcc-interface/utils2.c (expand_sloc): New static function.
301 (build_call_raise): Call it.
302 (build_call_raise_column): Likewise.
303 (build_call_raise_range): Likewise. Move around.
305 2015-09-14 Eric Botcazou <ebotcazou@adacore.com>
307 * gcc-interface/utils2.c (gnat_rewrite_reference) <COMPOUND_EXPR>: Add
308 another acceptable pattern for the RHS.
310 2015-07-24 Micahel Darling <darlingm@gmail.com>
313 * prj-nmsc.adb: Reflects renaming of configure.in to configure.ac
314 * gcc-interface/Makefile.in: Likewise
316 2015-07-12 Aldy Hernandez <aldyh@redhat.com>
318 * gcc-interface/utils.c: Fix double word typos.
319 * gnat_ugn.texi: Same.
322 * projects.texi: Same.
326 * sem_eval.adb: Same.
327 * sem_prag.adb: Same.
328 * sem_warn.adb: Same.
330 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
332 * gcc-interface/cuintp.c: Adjust includes.
333 * gcc-interface/decl.c: Likewise.
334 * gcc-interface/misc.c: Likewise.
335 * gcc-interface/targtyps.c: Likewise.
336 * gcc-interface/trans.c: Likewise.
337 * gcc-interface/utils.c: Likewise.
338 * gcc-interface/utils2.c: Likewise.
340 2015-07-06 John Marino <gnugcc@marino.st>
342 * s-oscons-tmplt.c: Add support for DragonFly alongside FreeBSD.
344 2015-06-29 Eric Botcazou <ebotcazou@adacore.com>
347 * gcc-interface/utils.c (gnat_write_global_declarations): Always
348 build the dummy global variable if code was generated.
350 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
353 * gcc-interface/misc.c (gnat_post_options): No need to disable
354 warn_unused_parameter anymore.
356 2015-06-26 Eric Botcazou <ebotcazou@adacore.com>
358 * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): When
359 not optimizing the CFG, clear the DECL_DECLARED_INLINE_P flag on the
362 2015-06-26 Eric Botcazou <ebotcazou@adacore.com>
364 * gcc-interface/gigi.h (note_types_used_by_globals): Delete.
365 (gnat_write_global_declarations): New prototype.
366 * gcc-interface/utils.c (type_decls): Rename back to...
367 (global_decls): ...this.
368 (gnat_pushdecls): Revert previous change.
369 (create_var_decl): Do not output global variables.
370 (note_types_used_by_globals): Rename back to...
371 (gnat_write_global_declarations): ...this. Output variables on the
373 * gcc-interface/misc.c (gnat_parse_file): Adjust to above renaming.
375 2015-06-26 Eric Botcazou <ebotcazou@adacore.com>
377 * gcc-interface/gigi.h (create_var_decl_1): Rename into...
378 (create_var_decl): ...this. Add default value for last parameter.
379 (create_type_stub_decl): Adjust.
380 (create_type_decl): Likewise.
381 (create_field_decl): Likewise.
382 (create_param_decl): Likewise.
383 (create_label_decl): Likewise.
384 (create_subprog_decl): Likewise.
385 * gcc-interface/utils.c (create_var_decl_1): Rename into...
386 (create_var_decl): ...this. Rename var_name into name and var_init
387 into init, move const_decl_allowed_p last and adjust accordingly.
388 (create_type_stub_decl): Rename type_name into name and adjust.
389 (create_type_decl): Likewise.
390 (create_field_decl): Likewise for field_name and field_type.
391 (create_param_decl): Likewise for param_name and param_type.
392 (create_label_decl): Likewise for label_name.
393 (create_subprog_decl): Likewise for subprog_name and subprog_type.
394 * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust couple of calls
395 to create_var_decl_1.
397 2015-06-26 Eric Botcazou <ebotcazou@adacore.com>
399 * gcc-interface/trans.c (loop_info_d): Add low_bound, high_bound,
400 artificial, has_checks and warned_aggressive_loop_optimizations.
401 (gigi): Set warn_aggressive_loop_optimizations to 0.
402 (inside_loop_p): New inline predicate.
403 (push_range_check_info): Rename into...
404 (find_loop_for): ...this and do not push range_check_info_d object.
405 (Loop_Statement_to_gnu): Set artificial, low_bound and high_bound
406 fields of gnu_loop_info. Adjust detection of checks enabled by
407 -funswitch-loops and adds one for -faggressive-loop-optimizations.
408 (gnat_to_gnu) <N_Indexed_Component>: If aggressive loop optimizations
409 are enabled, warn for loops overrunning an array of size 1 not at the
412 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
414 * gcc-interface/trans.c: Remove ipa-ref.h and plugin-api.h from include
416 * gcc-interface/utils.c: Likewise.
418 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
420 * gcc-interface/decl.c (value_annotation_hasher): Inherit from
421 ggc_cache_ptr_hash rather than ggc_cache_hasher.
422 * gcc-interface/utils.c (pad_type_hasher): Likewise.
424 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
426 * gcc-interface/decl.c (value_annotation_hasher::handle_cache_entry):
428 (value_annotation_hasher::keep_cache_entry): New function.
429 * gcc-interface/utils.c (pad_type_hasher::handle_cache_entry):
431 (pad_type_hasher::keep_cache_entry): New function.
433 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
435 * gcc-interface/misc.c: Include calls.h not function.h.
437 2015-06-19 Eric Botcazou <ebotcazou@adacore.com>
439 * gcc-interface/gigi.h (record_builtin_type): Adjust comment.
440 (tree create_type_decl): Likewise.
441 (create_var_decl_1): Add artificial_p and debug_info_p parameters.
442 (create_var_decl): Likewise.
443 (create_true_var_decl): Delete.
444 (create_subprog_decl): Add debug_info_p parameter.
445 * gcc-interface/decl.c (gnat_to_gnu_entity): Add artificial_p local
446 variable and use it throughout. Remove DECL_ARTIFICIAL settings.
447 <E_Variable>: Adjust calls to create_var_decl and create_var_decl_1.
448 Remove DECL_IGNORED_P settings.
449 <E_Enumeration_Type>: Likewise.
450 <E_Record_Type>: Likewise.
451 <E_Subprogram_Type>: Likewise. Remove artificial_flag local variable.
452 Adjust call to create_subprog_decl.
453 (get_minimal_subprog_decl): Likewise.
454 (elaborate_expression_1): Adjust call to create_var_decl.
455 * gcc-interface/trans.c (gigi): Adjust calls to create_var_decl and
456 create_subprog_decl. Remove DECL_ARTIFICIAL & DECL_IGNORED_P settings.
457 * gcc-interface/utils.c (maybe_pad_type): Likewise.
458 (record_builtin_type): Adjust comment.
459 (create_type_stub_decl): Remove obsolete comment.
460 (create_var_decl_1): Add artificial_p and debug_info_p parameters.
461 Set DECL_ARTIFICIAL and DECL_IGNORED_P accordingly.
462 (create_subprog_decl): Add debug_info_p parameter. Set DECL_IGNORED_P
465 2015-06-19 Eric Botcazou <ebotcazou@adacore.com>
467 * gcc-interface/misc.c (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): Define.
469 2015-06-19 Eric Botcazou <ebotcazou@adacore.com>
471 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Make sure
472 the size of a padding type built around the return type is positive.
473 * gcc-interface/trans.c (gnat_to_gnu) <N_Simple_Return_Statement>:
474 Use INIT_EXPR instead of MODIFY_EXPR to assign to the return object.
476 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
478 * gcc-interface/cuintp.c: Do not include input.h, line-map.h or is-a.h.
479 * gcc-interface/decl.c: Likewise.
480 * gcc-interface/misc.c: Likewise.
481 * gcc-interface/targtyps.c: Likewise.
482 * gcc-interface/trans.c: Likewise.
483 * gcc-interface/utils.c: Likewise.
484 * gcc-interface/utils2.c: Likewise.
486 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
488 * gcc-interface/utils.c (get_global_context): Register the main
489 translation unit through the new debug hook.
491 2015-06-09 Eric Botcazou <ebotcazou@adacore.com>
493 * gcc-interface/misc.c: Remove duplicate include directives.
494 * gcc-interface/trans.c: Likewise.
495 * gcc-interface/utils.c: Likewise.
497 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
499 * gcc-interface/cuintp.c : Adjust include files.
500 * gcc-interface/decl.c : Likewise.
501 * gcc-interface/misc.c : Likewise.
502 * gcc-interface/targtyps.c : Likewise.
503 * gcc-interface/trans.c : Likewise.
504 * gcc-interface/utils.c : Likewise.
505 * gcc-interface/utils2.c : Likewise.
507 2015-06-08 John Marino <gnugcc@marino.st>
509 * a-intnam-dragonfly.ads: New.
510 * s-osinte-dragonfly.adb: Likewise.
511 * s-osinte-dragonfly.ads: Likewise.
512 * system-dragonfly-x86_64.ads: Likewise.
513 * adaint.c: Add BSD macros.
514 * cstreams.c: Likewise.
515 * gsocket.h: Likewise.
517 * socket.c: Likewise.
518 * env.c: Add __DragonFly__, remove __FreeBSD__ macro.
519 * init.c: Add __DragonFly__, change __gnat_install_handler
520 prototype from empty to void.
521 * initialize.c: Add __DragonFly__.
522 * sysdep.c: Likewise.
523 * s-osinte-freebsd.adb: Use __get_errno instead of __error.
524 * tracebak.c: Set unwinder for i386 BSD.
525 * gcc-interface/Makefile.in: Add x86_64 DragonFly, tweak
526 x86_64 FreeBSD and x86 FreeBSD.
528 2015-06-06 Eric Botcazou <ebotcazou@adacore.com>
530 * gcc-interface/utils.c (note_types_used_by_globals): Tweak comment.
531 * gcc-interface/decl.c (gnat_to_gnu_entity): Likewise.
533 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
535 * gcc-interface/gigi.h (note_types_used_by_globals): Rename from
536 gnat_write_global_declarations.
537 * gcc-interface/misc.c (gnat_parse_file): Call
538 note_types_used_by_globals.
539 Remove LANG_HOOKS_WRITE_GLOBALS.
540 * gcc-interface/utils.c: Rename global_decls to type_decls.
541 (gnat_write_global_declarations): Rename
542 to note_types_used_by_globals.
543 Remove call to finalize_compilation_unit.
544 Remove call to debug_hooks->global_decl for globals.
545 (gnat_pushdecls): Only insert into type_decls if TYPE_DECL.
547 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
549 * gcc-interface/cuintp.c: Adjust includes for restructured coretypes.h.
550 * gcc-interface/decl.c: Likewise.
551 * gcc-interface/misc.c: Likewise.
552 * gcc-interface/targtyps.c: Likewise.
553 * gcc-interface/trans.c: Likewise.
554 * gcc-interface/utils.c: Likewise.
555 * gcc-interface/utils2.c: Likewise.
557 2015-06-04 Pierre-Marie de Rodat <derodat@adacore.com>
559 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: If
560 processing a definition, create definitions for padding types
563 2015-06-03 Eric Botcazou <ebotcazou@adacore.com>
565 * gcc-interface/utils.c (copy_type): Also set TYPE_CANONICAL.
567 2015-06-03 Eric Botcazou <ebotcazou@adacore.com>
569 * gcc-interface/trans.c (gnat_to_gnu) <N_Simple_Return_Statement>: Fix
570 typo in latest change.
572 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
574 * gcc-interface/Makefile.in: Fix ARM/Darwin configuration.
576 2015-06-01 Pierre-Marie de Rodat <derodat@adacore.com>
578 * gcc-interface/utils.c (scale_by_factor_of): When handling a function
579 call expression, process the corresponding function body. Also handle
582 2015-06-01 Pierre-Marie de Rodat <derodat@adacore.com>
584 * gcc-interface/decl.c (gnat_to_gnu_entity): Replace pointer types with
585 references ones for functions that return references.
587 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
589 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: For a
590 definition of a type coming from a limited_with, get to the full view
591 if it is not in the main code unit.
593 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
595 * gcc-interface/utils.c (create_var_decl_1): If an assembler name is
596 specified, let the target mangle it before settting.
597 (create_subprog_decl): Likewise and move this treatment last.
599 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
601 * gcc-interface/lang-specs.h (TARGET_VXWORKS_RTP): Move substitution to
602 before first -gnatez switch. Simplify and add trailing space.
604 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
606 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: If the
607 record has a parent field and a representation clause, make sure that
608 it is properly aligned.
610 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
612 * gcc-interface/trans.c (lvalue_required_p) <N_Indexed_Component>: Deal
613 with character and enumeration literals as index values.
615 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
617 * gcc-interface/gigi.h (build_simple_component_ref): Declare.
618 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Deal with
619 address clause on aliased object with unconstrained nominal subtype.
620 Mark the aligning variable as artificial, do not convert the address
621 expression immediately but mark it as constant instead.
622 * gcc-interface/utils.c (convert): If the target type contains a
623 template, be prepared for an empty array.
624 (maybe_unconstrained_array): Likewise.
625 * gcc-interface/utils2.c (known_alignment) <POINTER_PLUS_EXPR>: Deal
626 with the pattern built for aligning types.
627 <INTEGER_CST>: Do not cap the value at BIGGEST_ALIGNMENT.
628 (build_simple_component_ref): Make public.
629 If the base object is a constructor that contains a template, fold the
630 result field by field.
632 2015-05-31 Eric Botcazou <ebotcazou@adacore.com>
634 * s-oscons-tmplt.c: Add explicit tests for Android alongside Linux.
636 2015-05-30 Eric Botcazou <ebotcazou@adacore.com>
638 * adaint.c: Test for __linux__ instead of linux and __sun__ instead
639 of sun. Add missing leading underscore to AIX. Remove #elif 0.
640 * adaint.h: Likewise.
642 * cstreams.c: Likewise.
644 * gsocket.h: Likewise.
645 * init.c: Likewise. Test for __i386__ instead of i386.
647 * s-oscons-tmplt.c: Likewise.
648 * sysdep.c: Likewise.
649 * terminals.c: Likewise. Use BSD symbol instead of FREEBSD.
650 * tracebak.c: Likewise. Test for __sparc__ instead of sparc.
652 2015-05-28 Eric Botcazou <ebotcazou@adacore.com>
654 * gcc-interface/utils.c (max_size) <tcc_binary>: Add special code to
655 deal with the subtraction of a "negative" value in an unsigned type.
657 2015-05-28 Eric Botcazou <ebotcazou@adacore.com>
659 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Do
660 not error out on a return type which has a size that overflows if the
661 return is done by invisible reference.
663 2015-05-28 Eric Botcazou <ebotcazou@adacore.com>
665 * gcc-interface/utils.c (gnat_pushdecl): Reunify the handling of array
666 and pointer types wrt DECL_ORIGINAL_TYPE and adjust left and right.
668 2015-05-28 Eric Botcazou <ebotcazou@adacore.com>
670 * gcc-interface/gigi.h (gnat_stabilize_reference): Adjust.
671 (rewrite_fn): Remove third parameter.
672 (type_is_padding_self_referential): New inline predicate.
673 (return_type_with_variable_size_p): Likewise.
674 * gcc-interface/decl.c (allocatable_size_p): More around.
675 (cannot_be_superflat_p): Rename into...
676 (cannot_be_superflat ): ...this.
677 (initial_value_needs_conversion): New predicate.
678 (gnat_to_gnu_entity): Invoke type_is_padding_self_referential,
679 initial_value_needs_conversion and adjust to above renaming.
680 For a renaming, force the materialization if the inner expression
681 is compound. Adjust calls to elaborate_reference and build a
682 compound expression if needed.
683 (struct er_dat): Add N field.
684 (elaborate_reference_1): Remove N parameter and adjust.
685 (elaborate_reference): Add INIT parameter and pass it in the call to
686 gnat_rewrite_reference. Adjust initial expression.
687 * gcc-interface/trans.c (Call_to_gnu): Treat renamings the same way as
688 regular object declarations when it comes to creating a temporary.
689 Adjust call to gnat_stabilize_reference and build a compound expression
690 if needed. Invoke return_type_with_variable_size_p.
691 (gnat_to_gnu): Invoke type_is_padding_self_referential. In case #4,
692 return a call to a function unmodified if it returns with variable size
693 and is also the initial expression in an object declaration.
694 * gcc-interface/utils2.c (build_binary_op) <INIT_EXPR>: Use the RHS'
695 type if it is a call to a function that returns with variable size.
696 (build_unary_op): Invoke type_is_padding_self_referential.
697 (gnat_stabilize_reference_1): Remove N parameter and adjust.
698 (gnat_stabilize_reference): Add INIT parameter and pass it in the call
699 to gnat_rewrite_reference.
700 (gnat_rewrite_reference): Remove N, add INIT parameter and adjust.
701 <COMPOUND_EXPR>: New case.
703 2015-05-28 Ed Schonberg <schonberg@adacore.com>
705 * sem_ch3.adb (Is_Visible_Component): Component is visible
706 in a derived type if inherited through an ancestor that has a
707 partial view of the original type holding the component, if the
708 full view of that original type is in scope.
709 * sem_util.ads (Get_Body_From_Stub): Works for all kinds of stubs.
711 2015-05-28 Bob Duff <duff@adacore.com>
713 * sem_util.adb (Requires_Transient_Scope): For definite untagged
714 subtypes, we should never have to use the secondary stack. This moves
715 toward that goal. But there are still cases that don't work.
716 Here, we move the check for Is_Definite first, but add a
717 special-purpose check for Has_Discrim_Dep_Array.
719 2015-05-28 Bob Duff <duff@adacore.com>
721 * sem_util.adb (Requires_Transient_Scope): Avoid returning
722 function results on the secondary stack in so many cases.
724 2015-05-28 Ed Schonberg <schonberg@adacore.com>
726 * sem_util.adb (Wrong_Type): In any instance, do not emit error
727 if type of expression is the partial view of the expected type.
729 2015-05-28 Ed Schonberg <schonberg@adacore.com>
731 * sem_res.adb (Resolve_Actuals): a) The replacement of formal
732 names in named associations only needs to be done within an
733 instance, on a call to a primitive of a formal derived type,
734 where the actual subprogram may have different formal names than
735 those of the primitive operation of the formal type.
736 b) Defaulted parameters must be taken into account when obtaining
737 the names of the formals of the actual subprogram being called.
739 2015-05-28 Robert Dewar <dewar@adacore.com>
741 * sem_ch13.adb, sem_disp.ads: Minor reformatting.
743 2015-05-28 Ed Schonberg <schonberg@adacore.com>
745 * sem_util.adb (Set_Debug_Info_Needed): For a private type
746 whose full view is itself a derived private type, set flag on
747 underlying full view as well, for proper gdb display.
749 2015-05-28 Bob Duff <duff@adacore.com>
751 * exp_tss.ads: Minor comment fix.
752 * exp_ch3.adb (Build_Array_Init_Proc, Build_Record_Init_Proc):
753 Inline init_procs when the type has controlled parts. Remove
754 obsolete comments about those init_procs -- init_procs for
755 such types are no longer complex. A typical init_proc just
756 initializes the 'Tag field, and calls the parent init_proc
757 (e.g. for Limited_Controlled), which calls the grandparent
758 (for Root_Controlled), which does nothing. This all boils down
759 to one instruction when inlined.
760 * exp_ch7.adb (Create_Finalizer): Inline the finalizer.
762 2015-05-28 Ed Schonberg <schonberg@adacore.com>
764 * sem_ch4.adb (Analyze_Selected_Component): If the type to use
765 is a derived type and is a generic actual, the selected component
766 appears within an instance body, and the check over the type
767 has failed, examine ancestor types for the desired component.
768 (Find_Component_In_Instance): If record type is a derived type,
769 examine all ancestors in order to locate desired component.
771 2015-05-27 H.J. Lu <hongjiu.lu@intel.com>
773 * gcc-interface/Makefile.in (TOOLS_LIBS): Add @NO_PIE_FLAG@.
775 2015-05-27 Eric Botcazou <ebotcazou@adacore.com>
777 * gcc-interface/trans.c (elaborate_all_entities): Do not elaborate an
778 incomplete type coming from a limited_with and whose non-limited view
779 comes from the main unit.
781 2015-05-27 Eric Botcazou <ebotcazou@adacore.com>
783 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Move down
784 code applying atomic checks to the object.
786 2015-05-27 Robert Dewar <dewar@adacore.com>
788 * sem_aux.adb: Minor rewording.
790 2015-05-27 Bob Duff <duff@adacore.com>
792 * exp_prag.adb (Expand_Pragma_Abort_Defer): Make
793 pragma Abort_Defer do nothing if Abort_Allowed is False.
795 2015-05-27 Arnaud Charlet <charlet@adacore.com>
797 * exp_ch9.adb, sem_util.adb, sem_util.ads, s-stposu.adb, s-spsufi.ads,
798 sem_elab.ads, g-comlin.ads, errout.ads, exp_ch6.adb, sem_ch4.adb,
799 opt.ads, s-bignum.adb, output.ads, sem_ch13.adb, erroutc.ads,
800 sem_disp.ads, exp_ch3.adb: Minor fixes of duplicate words in comments.
802 2015-05-27 Doug Rupp <rupp@adacore.com>
804 * adaint.c (__gnat_tmp_name) [vxworks]: Robustify and use for rtp as
807 2015-05-27 Pierre-Marie de Rodat <derodat@adacore.com>
809 * par_sco.adb (Process_Decision): Store sloc to
810 condition/pragmas SCOs associations into a temporary table before
811 moving them to the SCO_Raw_Hash_Table so that we can back them
812 out just like we do for SCO entries that are simple decisions
813 in an expression context.
815 2015-05-27 Ed Schonberg <schonberg@adacore.com>
817 * sem_ch6.adb (Process_Formals): A non-private formal type that
818 is a limited view does not have a list of private dependents.
820 2015-05-27 Ed Schonberg <schonberg@adacore.com>
822 * exp_ch5.adb (Expand_N_Case_Statement): If the expression in
823 the case statement is a compile-time known value, we look for a
824 corresponding alternative to optimize the case statement into a
825 single case. If the type has a static predicate and the expression
826 does not satisfy the predicate, there is no legal alternative and
827 this optimization is not applicable. Excecution is erroneous,
828 or else if assertions are enabled, an exception will be raised
829 earlier, at the point the expression is elaborated.
831 2015-05-27 Robert Dewar <dewar@adacore.com>
833 * sem_elab.adb (Check_Internal_Call_Continue): Suppress
834 warning on Finalize, Adjust, or Initialize if type involved has
837 2015-05-27 Ed Schonberg <schonberg@adacore.com>
839 * sem_aux.adb, sem_aux.ads (First_Discriminant): Return empty when
840 applied to a type with no known discriminants.
842 2015-05-26 Robert Dewar <dewar@adacore.com>
844 * errout.ads, sem_ch4.adb, sem_ch6.adb: Minor reformatting.
846 2015-05-26 Bob Duff <duff@adacore.com>
848 * sem_elab.adb (Check_A_Call): In the case where we're
849 calling something in an instance of a generic package that is
850 within this same unit (as the call), make sure we treat it
851 as a call to an entity within the same unit. That is, call
852 Check_Internal_Call, rather than putting "Elaborate_All(X)"
853 on X, which would necessarily result in an elaboration cycle in
854 static-elaboration mode.
856 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
858 * freeze.ads (Is_Atomic_VFA_Aggregate): Adjust profile.
859 * freeze.adb (Is_Atomic_VFA_Aggregate): Change Entity
860 parameter into Node parameter and remove Type parameter.
861 Look at Is_Atomic_Or_VFA both on the type and on the object.
862 (Freeze_Entity): Adjust call to Is_Atomic_VFA_Aggregate.
863 * exp_aggr.adb (Expand_Record_Aggregate): Likewise.
864 (Process_Atomic_Independent_Shared_Volatile): Remove code
865 propagating Atomic or VFA from object to locally-defined type.
867 2015-05-26 Bob Duff <duff@adacore.com>
869 * exp_ch7.adb: Minor comment fix.
871 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
873 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Min/Attr_Max>: Do not
874 bother about NaN's if Machine_Overflows is true.
876 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
878 * gcc-interface/trans.c (gnat_to_gnu) <N_Object_Declaration>: Really
879 force evaluation of the expression, if any, when the object has its
880 elaboration delayed. Do not create a variable at global level.
882 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
884 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Machine>: Do not apply
885 extra-precision trick to literals. Build SAVE_EXPR manually.
887 * gcc-interface/misc.c (enumerate_modes): Add bypass for x86/x86-64.
889 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
891 * gcc-interface/ada-tree.h (DECL_GLOBAL_NONCONSTANT_RENAMING_P): Delete
892 (DECL_RENAMED_OBJECT): Adjust comment.
893 * gcc-interface/gigi.h (record_global_nonconstant_renaming): Delete.
894 (invalidate_global_nonconstant_renamings): Likewise.
895 (gnat_constant_reference_p): Likewise.
896 (rewrite_fn): New function type.
897 (gnat_rewrite_reference): Declare.
898 (call_is_atomic_load): New inline predicate.
899 * gcc-interface/decl.c (elaborate_reference_1): New function.
900 (elaborate_reference): Likewise.
901 (gnat_to_gnu_entity): Call elaborate_reference to elaborate renamings
902 and simplify associated code. Set const_flag to true consistently in
903 conjunction with used_by_ref.
904 * gcc-interface/trans.c (Identifier_to_gnu): Always replace renaming
905 pointers by renamed objects.
906 (outer_atomic_access_required_p): Deal with renamings.
907 (Compilation_Unit_to_gnu): Do not call
908 invalidate_global_nonconstant_renamings.
909 (gnat_to_gnu) <N_Object_Renaming_Declaration>: Adjust comment.
910 (gnat_gimplify_expr): Deal with atomic loads.
911 * gcc-interface/utils.c (global_nonconstant_renamings): Delete.
912 (destroy_gnat_utils): Do not call
913 invalidate_global_nonconstant_renamings.
914 (record_global_nonconstant_renaming): Delete.
915 (invalidate_global_nonconstant_renamings): Likewise.
916 * gcc-interface/utils2.c (call_is_atomic_load): Move to gigi.h.
917 (build_load_modify_store): Build a copy of the destination.
918 (gnat_stabilize_reference_1): Adjust.
919 (gnat_stabilize_reference): Call gnat_stabilize_reference_1 through
920 gnat_rewrite_reference and move bulk of code to...
921 (gnat_rewrite_reference): ...here. New global function.
922 (gnat_constant_reference_p): Delete.
924 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
926 * gcc-interface/gigi.h (gnat_stabilize_reference): Adjust prototype.
927 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not rely on const_flag
928 to detect constant renamings. Be prepared for specific pattern of
929 renamed object based on function calls. Create a constant object
930 for the renaming of a NULL_EXPR or of a CONSTRUCTOR. Adjust calls
931 to gnat_stabilize_reference and tidy up. Remove redundant tests.
932 (elaborate_expression_1): Remove obsolete test and tidy up.
933 * gcc-interface/trans.c (Call_to_gnu): Do not stabilize In/Out or Out
934 parameters passed by reference.
935 (gnat_to_gnu) <N_Selected_Component>: Remove redundant protection again
937 Use gnat_protect_expr instead of gnat_stabilize_reference for general
938 protection against side-effects.
939 * gcc-interface/utils2.c (gnat_stable_expr_p): New predicate.
940 (gnat_save_expr): Invoke it.
941 (gnat_protect_expr): Likewise.
942 (gnat_stabilize_reference_1): Likewise. Remove useless propagation
944 (gnat_stabilize_reference): Remove parameter and adjust throughout.
945 Delete ADDR_EXDR, COMPOUND_EXPR and CONSTRUCTOR cases.
946 Restrict CALL_EXPR case to atomic loads and tweak ERROR_MARK case.
948 2015-05-26 Ed Schonberg <schonberg@adacore.com>
950 * sinfo.ads: Minor reformatting.
951 * sem_aux.ads: Clarify use of First_Discriminant.
952 * sem_ch4.adb (Analyze_Explicit_Dereference): The use of a limited
953 view is replaced with the non-limited view in an instance body,
954 where the enclosing unit must have a regular with_clause on the
956 * sem_ch12.adb (Install_Body): Freeze instantation after its
957 body. Remove useless freeze nodes for incomplete actuals to
958 prevent multiple generation of internal operations.
959 (Instantiate_Package_Body): Set sloc of body appropriately when
960 there are incomplete actuals and the instance body is placed in
961 the body of the enclosing unit.
962 * errout.ads: Consistent punctuation, better alignment and trivial
964 * err_vars.ads: Fix typo.
966 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
968 * sem_ch8.adb (Analyze_Object_Renaming): Lift restriction on
969 components of Volatile_Full_Access objects.
971 2015-05-26 Ed Schonberg <schonberg@adacore.com>
973 * sem_ch6.adb (Is_Non_Overriding_Operation,
974 Get_Generic_Parent_Type): Handle properly the case of a derived
975 scalar type by using the first subtype rather than its generated
978 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
980 * einfo.adb (Write_Field17_Name): Move E_Incomplete_Subtype
982 (Write_Field19_Name): ...here.
984 2015-05-26 Ed Schonberg <schonberg@adacore.com>
986 * sem_ch13.adb: sem_ch13.adb (Add_Predicates): Undo analysis
987 of original expression in ASIS mode: does not solve the ASIS
988 problem of a usable type information, and crashes the back-end
989 when performing type annotations.
991 2015-05-26 Robert Dewar <dewar@adacore.com>
993 * sem_disp.adb (Inherited_Subprograms): Add One_Only parameter.
994 (Is_Overriding_Subprogram): Use One_Only_Parameter.
995 * sem_disp.ads (Inherited_Subprograms): Add One_Only parameter.
997 2015-05-26 Robert Dewar <dewar@adacore.com>
999 * exp_prag.adb, sem_ch3.adb, sem_ch5.adb, exp_ch11.adb, ghost.adb,
1000 exp_ch6.adb, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb, sem_ch13.adb,
1001 exp_ch3.adb: Minor reformatting.
1003 2015-05-26 Bob Duff <duff@adacore.com>
1005 * treepr.adb: Minor improvement to debugging routines (pp, pn)
1006 robustness. Rearrange the code so passing a nonexistent Node_Id
1007 prints "No such node" rather than crashing, and causing gdb to
1008 generate confusing messages.
1010 2015-05-26 Gary Dismukes <dismukes@adacore.com>
1012 * sem_util.adb: Minor typo fix.
1014 2015-05-26 Yannick Moy <moy@adacore.com>
1016 * sem_aux.adb (Subprogram_Body_Entity): Deal with subprogram stubs.
1018 2015-05-26 Hristian Kirtchev <kirtchev@adacore.com>
1020 * exp_ch3.adb (Expand_N_Full_Type_Declaration): Capture, set and
1021 restore the Ghost mode.
1022 (Expand_N_Object_Declaration): Capture, set and restore the Ghost mode.
1023 (Freeze_Type): Update the call to Set_Ghost_Mode.
1024 (Restore_Globals): New routine.
1025 * exp_ch5.adb Add with and use clauses for Ghost.
1026 (Expand_N_Assignment_Statement): Capture, set and restore the
1028 (Restore_Globals): New routine.
1029 * exp_ch6.adb Add with and use clauses for Ghost.
1030 (Expand_N_Procedure_Call_Statement): Capture, set and
1031 restore the Ghost mode.
1032 (Expand_N_Subprogram_Body):
1033 Code cleanup. Capture, set and restore the Ghost mode.
1034 (Expand_N_Subprogram_Declaration): Capture, set and restore the
1036 (Restore_Globals): New routine.
1037 * exp_ch7.adb Add with and use clauses for Ghost.
1038 (Expand_N_Package_Body): Capture, set and restore the Ghost mode.
1039 (Expand_N_Package_Declaration): Capture, set and restore the
1041 (Wrap_HSS_In_Block): Create a proper identifier for the block.
1042 * exp_ch8.adb Add with and use clauses for Ghost.
1043 (Expand_N_Exception_Renaming_Declaration): Code
1044 cleanup. Capture, set and restore the Ghost mode.
1045 (Expand_N_Object_Renaming_Declaration): Capture, set and restore
1047 (Expand_N_Package_Renaming_Declaration): Capture, set and restore the
1049 (Expand_N_Subprogram_Renaming_Declaration): Capture, set and
1050 restore the Ghost mode.
1051 * exp_ch11.adb (Expand_N_Exception_Declaration): Code
1052 cleanup. Capture, set and restore the Ghost mode.
1053 * exp_disp.adb (Make_DT): Update the call to Set_Ghost_Mode. Do
1054 not initialize the dispatch table slot of a Ghost subprogram.
1055 * exp_prag.adb Add with and use clauses for Ghost.
1056 (Expand_Pragma_Check): Capture, set and restore the Ghost mode.
1057 (Expand_Pragma_Contract_Cases): Capture, set and restore the
1059 (Expand_Pragma_Initial_Condition): Capture, set and
1060 restore the Ghost mode.
1061 (Expand_Pragma_Loop_Variant): Capture,
1062 set and restore the Ghost mode.
1063 (Restore_Globals): New routine.
1064 * exp_util.adb Add with and use clauses for Ghost.
1065 (Make_Predicate_Call): Code cleanup. Capture, set and restore
1067 (Restore_Globals): New routine.
1068 * freeze.adb (Freeze_Entity): Code cleanup. Update the call
1070 * ghost.adb Add with and use clause for Sem_Prag.
1071 (Check_Ghost_Completion): Code cleanup.
1072 (Check_Ghost_Overriding): New routine.
1073 (Check_Ghost_Policy): Code cleanup.
1074 (Ghost_Entity): New routine.
1075 (Is_Ghost_Declaration): Removed.
1076 (Is_Ghost_Statement_Or_Pragma): Removed.
1077 (Is_OK_Context): Reimplemented.
1078 (Is_OK_Declaration): New routine.
1079 (Is_OK_Pragma): New routine.
1080 (Is_OK_Statement): New routine.
1081 (Mark_Full_View_As_Ghost): New routine.
1082 (Mark_Pragma_As_Ghost): New routine.
1083 (Mark_Renaming_As_Ghost): New routine.
1084 (Propagate_Ignored_Ghost_Code): Update the comment on usage.
1085 (Set_From_Entity): New routine.
1086 (Set_From_Policy): New routine.
1087 (Set_Ghost_Mode): This routine now handles pragmas and freeze nodes.
1088 (Set_Ghost_Mode_For_Freeze): Removed.
1089 (Set_Ghost_Mode_From_Entity): New routine.
1090 (Set_Ghost_Mode_From_Policy): Removed.
1091 * ghost.ads (Check_Ghost_Overriding): New routine.
1092 (Mark_Full_View_As_Ghost): New routine.
1093 (Mark_Pragma_As_Ghost): New routine.
1094 (Mark_Renaming_As_Ghost): New routine.
1095 (Set_Ghost_Mode): Update the parameter profile. Update the
1097 (Set_Ghost_Mode_For_Freeze): Removed.
1098 (Set_Ghost_Mode_From_Entity): New routine.
1099 * sem_ch3.adb (Analyze_Full_Type_Declaration):
1100 Capture and restore the Ghost mode. Mark a type
1101 as Ghost regardless of whether it comes from source.
1102 (Analyze_Incomplete_Type_Decl): Capture, set and restore the
1104 (Analyze_Number_Declaration): Capture and restore the Ghost mode.
1105 (Analyze_Object_Declaration): Capture and restore the Ghost mode.
1106 (Analyze_Private_Extension_Declaration): Capture and
1107 restore the Ghost mode.
1108 (Analyze_Subtype_Declaration): Capture and restore the Ghost mode.
1109 (Process_Full_View): The full view inherits all Ghost-related
1110 attributes from the private view.
1111 (Restore_Globals): New routine.
1112 * sem_ch5.adb (Analyze_Assignment): Capture and restore the
1114 (Restore_Globals): New routine.
1115 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration):
1116 Code cleanup. Capture and restore the Ghost mode. Mark a
1117 subprogram as Ghost regarless of whether it comes from source.
1118 (Analyze_Procedure_Call): Capture and restore the Ghost mode.
1119 (Analyze_Subprogram_Body_Helper): Capture and restore the Ghost mode.
1120 (Analyze_Subprogram_Declaration): Capture and restore the Ghost mode.
1121 (New_Overloaded_Entity): Ensure that a
1122 parent subprogram and an overriding subprogram have compatible
1124 * sem_ch7.adb (Analyze_Package_Body_Helper): Capture and restore
1126 (Analyze_Package_Declaration): Capture and
1127 restore the Ghost mode. Mark a package as Ghost when it is
1128 declared in a Ghost region.
1129 (Analyze_Private_Type_Declaration): Capture and restore the Ghost mode.
1130 (Restore_Globals): New routine.
1131 * sem_ch8.adb (Analyze_Exception_Renaming): Code
1132 reformatting. Capture and restore the Ghost mode. A renaming
1133 becomes Ghost when its name references a Ghost entity.
1134 (Analyze_Generic_Renaming): Capture and restore the Ghost mode. A
1135 renaming becomes Ghost when its name references a Ghost entity.
1136 (Analyze_Object_Renaming): Capture and restore the Ghost mode. A
1137 renaming becomes Ghost when its name references a Ghost entity.
1138 (Analyze_Package_Renaming): Capture and restore the Ghost mode. A
1139 renaming becomes Ghost when its name references a Ghost entity.
1140 (Analyze_Subprogram_Renaming): Capture and restore the Ghost
1141 mode. A renaming becomes Ghost when its name references a
1143 * sem_ch11.adb (Analyze_Exception_Declaration): Capture, set
1144 and restore the Ghost mode.
1145 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Capture and
1146 restore the Ghost mode.
1147 (Analyze_Generic_Subprogram_Declaration):
1148 Capture and restore the Ghost mode.
1149 * sem_ch13.adb Add with and use clauses for Ghost.
1150 (Add_Invariant): New routine.
1151 (Add_Invariants): Factor out code.
1152 (Add_Predicate): New routine.
1153 (Add_Predicates): Factor out code.
1154 (Build_Invariant_Procedure_Declaration): Code cleanup. Capture,
1155 set and restore the Ghost mode.
1156 (Build_Invariant_Procedure): Code cleanup.
1157 (Build_Predicate_Functions): Capture, set and
1158 restore the Ghost mode. Mark the generated functions as Ghost.
1159 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
1160 Capture, set and restore the Ghost mode.
1161 (Analyze_External_Property_In_Decl_Part): Capture, set and restore
1163 (Analyze_Initial_Condition_In_Decl_Part):
1164 Capture, set and restore the Ghost mode.
1166 Code cleanup. Capture, set and restore the Ghost mode. Flag
1167 pragmas Linker_Section, No_Return, Unmodified, Unreferenced and
1168 Unreferenced_Objects as illegal when it applies to both Ghost
1169 and living arguments. Pragma Ghost cannot apply to synchronized
1171 (Check_Kind): Moved to the spec of Sem_Prag.
1172 (Process_Inline): Flag the pragma as illegal when it applies to
1173 both Ghost and living arguments.
1174 (Restore_Globals): New routine.
1175 * sem_prag.ads Add pragma Default_Initial_Condition
1176 to table Assertion_Expression_Pragma. Add new table
1177 Is_Aspect_Specifying_Pragma.
1178 (Check_Kind): Moved from body of Sem_Prag.
1179 * sem_util.adb Add with and use clauses for Ghost.
1180 (Build_Default_Init_Cond_Procedure_Body): Capture, set and restore
1182 (Build_Default_Init_Cond_Procedure_Declaration):
1183 Capture, set and restore the Ghost mode. Mark the default
1184 initial condition procedure as Ghost when it is declared
1186 (Is_Renaming_Declaration): New routine.
1187 (Policy_In_List): Account for the single argument version of
1189 * sem_util.ads (Is_Renaming_Declaration): New routine.
1190 * sinfo.adb (Is_Ghost_Pragma): New routine.
1191 (Set_Is_Ghost_Pragma): New routine.
1192 * sinfo.ads New attribute Is_Ghost_Pragma.
1193 (Is_Ghost_Pragma): New routine along with pragma Inline.
1194 (Set_Is_Ghost_Pragma): New routine along with pragma Inline.
1196 2015-05-26 Robert Dewar <dewar@adacore.com>
1198 * sem_ch3.adb, sem_aux.adb, sem_aux.ads, exp_ch6.adb, sprint.adb:
1201 2015-05-26 Gary Dismukes <dismukes@adacore.com>
1203 * gnat1drv.adb, targparm.adb, targparm.ads, restrict.adb: Minor
1204 reformatting and typo fixes in comments.
1206 2015-05-26 Ed Schonberg <schonberg@adacore.com>
1208 * sem_ch7.adb (Swap_Private_Dependets): Set visibility of
1209 the two views of a private dependent in two separate steps,
1210 to ensure proper visibility in parent units analyzed for inlining.
1212 2015-05-26 Yannick Moy <moy@adacore.com>
1214 * sem_aux.adb, sem_aux.ads (Get_Low_Bound): Use Type_Low_Bound.
1215 (Package_Body, Package_Spec): New queries moved
1216 here from GNATprove.
1217 (Package_Specification): Simplify query to remove use of loop.
1218 * sem_util.adb, sem_util.ads (Enclosing_Declaration,
1219 Enclosing_Package_Or_Subprogram, Is_Attribute_Update): New
1220 queries moved here from GNATprove.
1222 2015-05-26 Bob Duff <duff@adacore.com>
1224 * einfo.adb, einfo.ads, sprint.adb, lib-xref.ads: Minor cleanup: Remove
1225 obsolete Entity_Kinds E_String_Type and E_String_Subtype. Update
1226 redundant assertions.
1228 2015-05-26 Gary Dismukes <dismukes@adacore.com>
1230 * sem_util.adb, sem_util.ads, sem_ch13.adb: Minor typo fixes.
1232 2015-05-26 Doug Rupp <rupp@adacore.com>
1234 * init.c [vxworks]: Refine previous checkin.
1236 2015-05-26 Robert Dewar <dewar@adacore.com>
1238 * exp_ch4.adb (Wrap_MA): New function.
1239 (Expand_N_Op_Expon): Use Wrap_MA.
1241 2015-05-26 Bob Duff <duff@adacore.com>
1243 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
1244 Do not use secondary stack to return limited records with
1245 defaulted discriminants. This is an efficiency improvement.
1246 * exp_ch6.adb, exp_dist.adb, sem_attr.adb, sem_aux.adb, sem_aux.ads,
1247 sem_ch12.adb, sem_ch3.adb, sem_ch4.adb, sem_ch6.adb, sem_ch7.adb,
1248 sem_util.adb: Change the sense of Is_Indefinite_Subtype to be
1249 Is_Definite_Subtype. This is an improvement to readability (the double
1250 negative in "not Is_Indefinite_Subtype" was slightly confusing). Also
1251 disallow passing non-[sub]type entities, an unnecessary and slightly
1252 bug-prone flexibility.
1254 2015-05-26 Robert Dewar <dewar@adacore.com>
1256 * sem_aggr.adb (Resolve_Array_Aggregate): Defend against
1258 * debug.adb: Document -gnatd.k.
1259 * erroutc.adb (Set_Msg_Insertion_Line_Number): Implement -gnatd.k.
1261 2015-05-26 Robert Dewar <dewar@adacore.com>
1263 * gnat1drv.adb (Gnat1drv): Provide new arguments for
1264 Get_Target_Parameters.
1265 * restrict.adb (Set_Restriction_No_Specification_Of_Aspect):
1267 (Set_Restriction_No_Use_Of_Attribute): new procedure.
1268 * restrict.ads (Set_Restriction_No_Specification_Of_Aspect):
1270 (Set_Restriction_No_Use_Of_Attribute): new procedure.
1271 * s-rident.ads (Integer_Parameter_Restrictions): New subtype.
1272 * targparm.adb (Get_Target_Parameters): Allow new restriction
1273 pragmas No_Specification_Of_Aspect No_Use_Of_Attribute
1275 * targparm.ads: New parameters for Get_Target_Parameters.
1276 * tbuild.adb (Set_NOD): New name for Set_RND.
1277 (Set_NSA): New procedure.
1278 (Set_NUA): New procedure.
1279 (Set_NUP): New procedure.
1280 * tbuild.ads (Make_SC): Minor reformatting.
1281 (Set_NOD): New name for Set_RND.
1282 (Set_NSA, Set_NUA, Set_NUP): New procedure.
1284 2015-05-26 Ed Schonberg <schonberg@adacore.com>
1286 * a-stwise.adb (Find_Token): If source'first is not positive,
1287 an exception must be raised, as specified by RM 2005 A.4.3
1288 (68/1). This must be checked explicitly, given that run-time
1289 files are normally compiled without constraint checks.
1290 * a-stzsea.adb (Find_Token): Ditto.
1292 2015-05-26 Ed Schonberg <schonberg@adacore.com>
1294 * sem_util.ads sem_util.adb (Is_Current_Instance): New predicate
1295 to fully implement RM 8.6 (17/3). which earlier only applied
1296 to synchronized types. Used to preanalyze aspects that include
1297 current instances of types, such as Predicate and Invariant.
1298 * sem_res.adb (Resolve_Entity_Name): Use Is_Current_Instance.
1299 * sem_ch13.adb (Add_Predicates): In ASIS mode, preserve original
1300 expression of aspect and analyze it to provide proper type
1303 2015-05-26 Robert Dewar <dewar@adacore.com>
1305 * rtsfind.ads: Add entries for RE_Exn[_Long]_Float.
1306 * s-exnllf.adb (Exn_Float): New function.
1307 (Exn_Long_Float): New function.
1308 (Exn_Long_Long_Float): Rewritten interface.
1309 (Exp): New name for what used to be Exn_Long_Long_Float.
1310 * s-exnllf.ads (Exn_Float): New function.
1311 (Exn_Long_Float): New function.
1313 2015-05-26 Ed Schonberg <schonberg@adacore.com>
1315 * sem_ch8.adb (Find_Selected_Component): Do not emit an error
1316 on a selected component when the prefix is a type name that is
1318 * einfo.ads: Minor grammar fix.
1320 2015-05-26 Doug Rupp <rupp@adacore.com>
1322 * init.c [vxworks] (sysLib.h): Only for x86.
1324 2015-05-26 Doug Rupp <rupp@adacore.com>
1326 * init-vxsim.c (CPU): define as __VXSIM_CPU__
1327 * sigtramp-vxworks-vxsim.c (CPU): Likewise.
1328 sigtramp-vxworks-target.inc: Add check for SIMLINUX.
1329 * sigtramp.h: Likewise.
1331 2015-05-26 Robert Dewar <dewar@adacore.com>
1333 * sem_aux.adb, sem_disp.adb, sem_util.ads: Add comment.
1334 * sem_util.adb: Minor reformatting
1336 2015-05-26 Yannick Moy <moy@adacore.com>
1338 * inline.adb (Has_Initialized_Type): Adapt to new names.
1339 * sem_aux.adb, sem_aux.ads (Get_Low_Bound, Number_Components,
1340 Subprogram_Body, Subprogram_Body_Entity, Subprogram_Spec,
1341 Subprogram_Specification): New query functions used in GNATprove.
1342 * sem_disp.adb, sem_disp.ads (Is_Overriding_Subprogram): New
1343 query functions used in GNATprove.
1344 * sem_util.adb, sem_util.adso (Enclosing_Lib_Unit_Node,
1345 Get_Cursor_Type, Get_Return_Object, Get_User_Defined_Eq,
1346 Is_Double_Precision_Floating_Point_Type,
1347 Is_Single_Precision_Floating_Point_Type): New query functions
1350 2015-05-26 Bob Duff <duff@adacore.com>
1352 * s-rpc.ads (Partition_ID): Increase maximum Partition_ID to
1354 * a-except-2005.adb, a-except-2005.ads, a-except.adb,
1355 a-except.ads, a-exexda.adb, a-exstat.adb: Minor comment fixes.
1357 2015-05-26 Robert Dewar <dewar@adacore.com>
1359 * sinfo.adb: Minor comment addition.
1360 * einfo.adb: Minor whitespace and punctuation fix.
1361 * sem_util.adb: Minor editing of comments.
1363 2015-05-26 Ed Schonberg <schonberg@adacore.com>
1365 * sem_ch7.adb (Install_Private_Declarations,
1366 Swap_Private_Dependents): Ensure that both views of the dependent
1367 subtype are immediately visible if we are within their scope. This
1368 may be needed when a procedure body is both the parent of an
1369 instantiated child unit, and is itself used to inline a local
1372 2015-05-26 Gary Dismukes <dismukes@adacore.com>
1374 * exp_prag.adb, gnat1drv.adb: Minor reformatting.
1376 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
1378 * exp_ch4.adb (Expand_N_Indexed_Component): In the circuit
1379 detecting exceptions to the rewriting, deal with implicit
1380 dereferences in the selected component case.
1382 2015-05-26 Bob Duff <duff@adacore.com>
1384 * sem_ch13.adb (Analyze_One_Aspect): Do not
1385 require the expression of the Disable_Controlled aspect to be
1386 static in a generic template, because 'Enabled is not known
1389 2015-05-26 Doug Rupp <rupp@adacore.com>
1391 * init-vxsim.c: New file for vxsim ZCX
1392 * sigtramp-vxworks-vxsim.c: Likewise.
1393 * sigtramp-vxworks.c: Factor out target dependent bits into ...
1394 * sigtramp-vxworks-target.inc: ... here.
1395 * sigtramp.h: Add vxsim zcx protos.
1396 * init.c [vxworks...] (sysLib.h): Include.
1397 (__gnat_map_signal): Make global.
1398 [...i386] (__gnat_error_handler): Call __gnat_vxsim_error_handler if
1400 [...i386] (__gnat_install_handler): Test if on vxsim.
1402 2015-05-26 Ed Schonberg <schonberg@adacore.com>
1404 * sem_ch5.adb (Analyze_Iterator_Specification): For an element
1405 iterator over an array, if the component is aliased, the loop
1406 variable is aliased as well.
1408 2015-05-26 Ed Schonberg <schonberg@adacore.com>
1410 * exp_ch6.adb (Expand_Actuals): For a function call with in-out
1411 parameters that is rewritten as an expression_with_actions,
1412 we preserve the original function call node for further use by
1413 the caller (typically Expand_Call). In the presence of validity
1414 checks, that function call, though it is labelled Analyzed to
1415 prevent an infinite recursion, may be rewritten as a temporary
1416 by Remove_Side_Effects. Ensure that the caller has access to
1417 the original function call to continue expansion.
1418 * atree.ads: Minor typo in comment.
1420 2015-05-26 Javier Miranda <miranda@adacore.com>
1422 * sem_util.adb (Check_Function_Writable_Actuals):
1423 Add missing support to check the violation of writable actuals
1424 in array aggregates that have a nonstatic range.
1426 2015-05-26 Hristian Kirtchev <kirtchev@adacore.com>
1428 * exp_ch6.adb (Process_Contract_Cases_For): Update the call to
1429 Expand_Pragma_Contract_Cases.
1430 * exp_prag.ads, exp_prag.adb (Expand_Contract_Cases): Rename to
1431 Expand_Pragma_Contract_Cases.
1432 * sem_ch13.adb (Add_Invariants): Use the original aspect name
1433 when creating the arguments of pragma Check. This ensures that
1434 'Class is properly recognized and handled.
1436 2015-05-26 Arnaud Charlet <charlet@adacore.com>
1438 * gnat1drv.adb: Minor adjustments.
1439 (Adjust_Global_Switches): Disable some related flags in CodePeer mode.
1440 * sem_ch4.adb (Has_Arbitrary_Evaluation_Order,
1441 Stop_Subtree_Climbind): Code cleanup.
1442 * einfo.ads: Minor comment change.
1444 2015-05-26 Javier Miranda <miranda@adacore.com>
1446 * sem_aggr.adb (Resolve_Aggregate, Resolve_Extension_Aggregate):
1448 * sem_ch3.adb (Build_Derived_Record_Type,
1449 Record_Type_Declaration): Code cleanup.
1450 * sem_ch4.adb (Has_Arbitrary_Evaluation_Order,
1451 Stop_Subtree_Climbind): Tables which speed up the identification
1452 of dangerous calls to Ada 2012 functions with writable actuals
1454 (Analyze_Arithmetic_Op, Analyze_Call, Analyze_Comparison_Op,
1455 Analyze_Equality_Op, Analyze_Logical_Op, Analyze_Membership_Op,
1456 Analyze_Range): Code cleanup.
1457 (Is_Arbitrary_Evaluation_Order_Construct): Removed.
1458 (Check_Writable_Actuals): Code cleanup using the added tables.
1459 * sem_util.adb (Check_Function_Writable_Actuals): Return
1460 immediately if the node does not have the flag Check_Actuals
1463 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
1465 * exp_ch6.adb (Add_Call_By_Copy_Code): Remove restrictive
1466 condition in the detection of the effects of Remove_Side_Effects.
1467 * exp_util.ads (Remove_Side_Effects): Add general and historical note.
1468 * exp_util.adb (Is_Name_Reference): New predicate.
1469 (Remove_Side_Effects): Use it in lieu of Is_Object_Reference
1470 in order to decide whether to use the renaming to capture the
1471 side effects of the subexpression.
1472 (Side_Effect_Free): Remove obsolete test.
1474 2015-05-26 Robert Dewar <dewar@adacore.com>
1476 * aspects.ads, aspects.adb: Add aspect Disable_Controlled.
1477 * einfo.ads, einfo.adb (Disable_Controlled): New flag.
1478 (Is_Controlled_Active): New function.
1479 * exp_ch3.adb (Expand_Freeze_Record_Type): Use
1480 Is_Controlled_Active.
1481 * exp_util.adb (Needs_Finalization): Finalization not needed
1482 if Disable_Controlled set.
1483 * freeze.adb (Freeze_Array_Type): Do not set
1484 Has_Controlled_Component if the component has Disable_Controlled.
1485 (Freeze_Record_Type): ditto.
1486 * sem_ch13.adb (Decorate): Minor reformatting.
1487 (Analyze_Aspect_Specifications): Implement Disable_Controlled.
1488 * sem_ch3.adb (Analyze_Object_Declaration): Handle
1490 (Array_Type_Declaration): ditto.
1491 (Build_Derived_Private_Type): ditto.
1492 (Build_Derived_Type): ditto.
1493 (Record_Type_Definition): ditto.
1494 * snames.ads-tmpl: Add Name_Disable_Controlled.
1496 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
1498 * exp_ch6.adb (Expand_Actuals): Use a constant declaration instead
1499 of a renaming to capture the return value of a function call.
1500 (Expand_Simple_Function_Return): Call Remove_Side_Effects
1501 instead of removing side effects manually before the call to
1504 2015-05-26 Robert Dewar <dewar@adacore.com>
1506 * exp_ch4.adb (Expand_N_Op_Expon): Deal with problem of wrong
1507 order in calling Duplicate_Subexpr.
1508 * einfo.ads: Fix documentation of Object/Value size for scalar types.
1510 2015-05-26 Ed Schonberg <schonberg@adacore.com>
1512 * exp_aggr.adb (Build_Array_Aggr_Code, Gen_Assign):
1513 If a component is default-initialized and its type has an
1514 invariant procedure, insert an invariant test after code for
1515 default-initialization of the component.
1517 2015-05-26 Gary Dismukes <dismukes@adacore.com>
1519 * einfo.ads, sem_util.adb, sem_ch4.adb: Minor reformatting.
1521 2015-05-26 Robert Dewar <dewar@adacore.com>
1523 * exp_unst.adb, exp_unst.ads: Change to using Subps table index for
1524 making AREC entity names unique.
1526 2015-05-26 Ed Schonberg <schonberg@adacore.com>
1528 * sem_cat.adb (Has_Stream_Attribute_Definition): If the type
1529 has aspect specifications, examine the corresponding list of
1530 representation items to determine whether there is a visible
1531 stream operation. The attribute definition clause generated from
1532 the aspect will be inserted at the freeze point of the type,
1533 which may be in the private part and not directly visible,
1534 but the aspect makes the operation available to a client.
1536 2015-05-26 Robert Dewar <dewar@adacore.com>
1538 * sem_util.adb: Minor code reorganization.
1539 * sem_ch6.adb: Minor reformatting.
1541 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
1543 * gcc-interface/utils.c (maybe_pad_type): Do not apply adjustment to
1544 original size for elementary types before issuing the size warning.
1546 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
1548 * get_targ.adb (C_Get_Float_Words_BE): Adjust import name.
1549 (C_Get_Words_BE): Likewise.
1550 (C_Get_Bytes_BE): Likewise.
1551 (C_Get_Bits_BE): Likewise.
1552 (Width_From_Size): Remove superfluous space.
1553 * gcc-interface/targtyps.c (get_float_words_be): Rename into...
1554 (get_target_float_words_be): ...this.
1555 (get_words_be): Rename into...
1556 (get_target_words_be): ...this.
1557 (get_bytes_be): Rename into...
1558 (get_target_bytes_be): ...this.
1559 (get_bits_be): Rename into...
1560 (get_target_bits_be): ...this.
1561 * gcc-interface/gigi.h (standard_datatypes): Remove ADT_ptr_void_type.
1562 (ptr_void_type_node): Delete.
1563 (get_target_float_size): Likewise.
1564 (get_target_double_size): Likewise.
1565 (get_target_long_double_size): Likewise.
1566 (get_float_words_be): Likewise.
1567 (get_words_be): Likewise.
1568 (get_bytes_be): Likewise.
1569 (get_bits_be): Likewise.
1570 (get_target_float_words_be): Declare.
1571 (get_target_words_be): Likewise.
1572 (get_target_bytes_be): Likewise.
1573 (get_target_bits_be): Likewise.
1574 * gcc-interface/decl.c (gnat_to_gnu_entity): Replace ptr_void_type_node
1576 (intrin_return_compatible_p): Likewise.
1577 * gcc-interface/trans.c (gigi): Likewise.
1578 * gcc-interface/utils2.c (maybe_wrap_malloc): Likewise.
1579 (maybe_wrap_free): Likewise.
1580 * gcc-interface/utils.c (maybe_pad_type): Remove superfluous space.
1581 * gcc-interface/misc.c (gnat_init): Do not set ptr_void_type_node.
1583 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
1585 * gcc-interface/decl.c (elaborate_expression): Take a const string
1586 suffix instead of a tree.
1587 (elaborate_expression_1): Likewise.
1588 (elaborate_expression_2): Likewise.
1589 (gnat_to_gnu_entity): Adjust to above changes.
1590 (build_subst_list): Likewise.
1591 (get_entity_char): New static function.
1593 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
1595 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: Move around.
1596 <E_Exception>: Merge with E_Variable case.
1597 <E_Variable>: Remove 'object' label.
1599 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
1601 * gcc-interface/decl.c (gnat_to_gnu_entity): Minor tweak.
1602 * gcc-interface/trans.c (finalize_nrv_unc_r): Use CONSTRUCTOR_ELT.
1603 * gcc-interface/utils.c (convert): Likewise and simplify.
1604 (remove_conversions): Likewise.
1605 * gcc-interface/utils2.c (compare_fat_pointers): Likewise.
1606 (build_unary_op): Likewise and simplify.
1608 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
1610 * gcc-interface/gigi.h (build_atomic_load): Adjust prototype.
1611 (build_atomic_store): Likewise.
1612 (build_load_modify_store): Declare.
1613 (VECTOR_TYPE_P): Delete.
1614 * gcc-interface/decl.c (gnat_to_gnu_entity): Replace Is_Atomic with
1615 Is_Atomic_Or_VFA throughout.
1616 <E_Array_Type>: Build a variant of the XUA type instead of forcing
1617 TYPE_VOLATILE on it.
1618 <E_Array_Subtype>: Use the main variant of the base type.
1619 Do not force TYPE_VOLATILE on the type being built.
1620 <E_Record_Type>: Likewise.
1621 <E_Array_Subtype>: Likewise.
1622 <E_Subprogram_Type>: Rename local variable.
1623 Add Atomic qualifier in conjunction with Volatile on types if needed.
1624 Force BLKmode for by-ref types only at the end of the processing.
1625 Change qualifiers only after changing the mode of the type. Set
1626 TYPE_UNIVERSAL_ALIASING_P on the type directly.
1627 (check_ok_for_atomic_type): Issue specific error message for VFA.
1628 (gnat_to_gnu_component_type): Replace Is_Atomic with
1629 Is_Atomic_Or_VFA throughout.
1630 * gcc-interface/misc.c (gnat_get_alias_set): Test
1631 TYPE_UNIVERSAL_ALIASING_P on the type directly.
1632 * gcc-interface/trans.c (lvalue_required_p): Replace Is_Atomic with
1633 Is_Atomic_Or_VFA throughout. Add missing guard.
1634 (node_is_atomic): New predicate.
1635 (node_has_volatile_full_access): Likewise.
1636 (gnat_strip_type_conversion): New function.
1637 (outer_atomic_access_required_p): New predicate.
1638 (atomic_sync_required_p): Rename into...
1639 (atomic_access_required_p): ...this. Add SYNC parameter, scan the
1640 parent node first and then look for the atomic setting. Add support
1641 for Volatile_Full_Access.
1642 (Call_to_gnu): Add atomic_access and outer_atomic_access parameters
1643 and adjusts calls to above functions. Use load-modify-store sequence
1644 for updates of In/Out and Out parameters if required, as well as for
1645 moving the result to the target if required. Add couple of missing
1647 (gnat_to_gnu): Adjust calls to above functions.
1648 <N_Object_Renaming_Declaration>: If the renamed object has side-effects
1649 evaluate only its address.
1650 <N_Assignment_Statement>: Adjust call to Call_to_gnu. Use load-modify
1651 store sequence if required.
1652 <N_Function_Call>: Adjust call to Call_to_gnu.
1653 (extract_values): Adjust comment.
1654 * gcc-interface/utils2.c (build_atomic_load): Add SYNC parameter and
1655 use relaxed memory model if it is not set.
1656 (build_atomic_store): Likewise.
1657 (call_is_atomic_load): New predicate.
1658 (build_load_modify_store): New function.
1659 (build_binary_op) <MODIFY_EXPR>: Accept SAVE_EXPR on the LHS.
1660 (gnat_stabilize_reference) <CALL_EXPR>: Deal with atomic loads.
1662 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
1664 * gcc-interface/ada-tree.h (DECL_RENAMING_GLOBAL_P): Rename into...
1665 (DECL_GLOBAL_NONCONSTANT_RENAMING_P): ...this.
1666 * gcc-interface/gigi.h (record_global_renaming_pointer): Delete.
1667 (invalidate_global_renaming_pointers): Likewise.
1668 (record_global_nonconstant_renaming): New.
1669 (invalidate_global_nonconstant_renamings): Likewise.
1670 (get_inner_constant_reference): Likewise.
1671 (gnat_constant_reference_p): Likewise.
1672 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Adjust to above
1673 and register the renaming pointer only if the object is non-constant.
1674 (elaborate_expression_1): Call get_inner_constant_reference instead
1675 of get_inner_reference.
1676 * gcc-interface/trans.c (fold_constant_decl_in_expr): Minor tweak.
1677 (Identifier_to_gnu): Adjust to above and do not recheck the renamed
1678 object before substituting it.
1679 (Compilation_Unit_to_gnu): Adjust to above renaming. Minor tweaks.
1680 (gnat_to_gnu) <N_Object_Renaming_Declaration>: Do not return the
1681 result at the global level.
1682 (N_Exception_Renaming_Declaration): Likewise.
1683 * gcc-interface/utils.c (global_renaming_pointers): Rename into...
1684 (global_nonconstant_renamings): ...this.
1685 (destroy_gnat_utils): Adjust to above renaming.
1686 (record_global_renaming_pointer): Rename into...
1687 (record_global_nonconstant_renaming): ...this.
1688 (invalidate_global_renaming_pointers): Rename into...
1689 (invalidate_global_nonconstant_renamings): ...this and do not recheck
1690 the renamed object before invalidating.
1691 * gcc-interface/utils2.c (gnat_stabilize_reference): Minor tweak.
1692 (get_inner_constant_reference): New public function.
1693 (gnat_constant_reference_p): New predicate.
1695 2015-05-25 Javier Miranda <miranda@adacore.com>
1697 * einfo.ads, einfo.adb (Has_Out_Or_In_Out_Parameter): This attribute
1698 is now present in subprograms, generic subprograms, entries and
1700 * sem_ch6.adb (Set_Formal_Mode): Set As_Out_Or_In_Out_Parameter
1701 on entries, entry families, subprograms and generic subprograms.
1702 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration):
1703 Minor code reorganization to ensure that the Ekind attribute
1704 of the subprogram entity is set before its formals are
1705 processed. Required to allow the use of the attribute
1706 Has_Out_Or_In_Out_Parameter on the subprogram entity.
1707 * sem_aggr.adb (Resolve_Aggregate, Resolve_Extension_Aggregate):
1708 Perform the check on writable actuals only if the value of some
1709 component of the aggregate involves calling a function with
1710 out-mode parameters.
1711 (Resolve_Record_Aggregate): Propagate the Check_Actuals flag to the
1712 internally built aggregate.
1713 * sem_ch3.adb (Build_Derived_Record_Type, Record_Type_Declaration):
1714 Perform the check on writable actuals only if the initialization of
1715 some component involves calling a function with out-mode parameters.
1716 * sem_ch4.adb (Analyze_Arithmetic_Op, Analyze_Comparison_Op,
1717 Analyze_Equality_Op, Analyze_Logical_Op, Analyze_Membership_Op,
1718 Analyze_Range): Check writable actuals only if the
1719 subtrees have a call to a function with out-mode parameters
1720 (Analyze_Call.Check_Writable_Actuals): New subprogram. If the call
1721 has out or in-out parameters then mark its outermost enclosing
1722 construct as a node on which the writable actuals check must
1724 (Analyze_Call): Check if the flag must be set and if the outermost
1725 enclosing construct.
1726 * sem_util.adb (Check_Function_Writable_Actuals): Code cleanup
1727 and reorganization. We skip processing aggregate discriminants
1728 since their precise analysis involves two phases traversal.
1729 * sem_res.adb (Resolve_Actuals, Resolve_Arithmetic_Op,
1730 Resolve_Logical_Op, Resolve_Membership_Op): Remove call to
1731 check_writable_actuals.
1733 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1735 * sem_ch3.adb (Constrain_Concurrent): If the context is a
1736 type declaration, generate an Itype_Reference for the anonymous
1737 subtype, to force elaboration at this point in gigi.
1739 2015-05-22 Gary Dismukes <dismukes@adacore.com>
1741 * layout.adb, einfo.ads, sem_ch12.adb, freeze.adb, sem_util.ads,
1742 exp_ch4.adb, sem_ch6.adb: Minor reformatting and typo fixes.
1744 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1746 * sem_res.adb (Resolve_Actuals): If the call is to an overridden
1747 operation, replace the names of the actuals in named associations
1748 with the names of the actuals of the subprogram that is eventually
1749 executed. The names of the formals and the defaults can differ
1750 between the two operations when they are operations of a formal
1753 2015-05-22 Bob Duff <duff@adacore.com>
1755 * a-convec.ads, a-convec.adb (Append): Check for fast path. Split
1756 out slow path into separate procedure. Inline Append. Fast path
1757 now avoids calling Insert.
1758 (Finalize): Do the busy checking last, so the container gets emptied.
1759 (Insert, Insert_Space): Remove redundancy.
1761 2015-05-22 Robert Dewar <dewar@adacore.com>
1763 * switch-c.adb (Scan_Front_End_Switches): Insist on -gnatc
1766 2015-05-22 Arnaud Charlet <charlet@adacore.com>
1768 * gnatvsn.ads: Minor code reorg to remember more easily to update
1771 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1773 * sem_ch10.adb (Analyze_With_Clause): In ASIS_Mode, a
1774 limited_with clause on a predefined unit is not transformed into
1775 a regular with_clause, to preserve the original tree structure.
1776 * sinfo.ads (N_With_Clause): Add comment on handling of
1778 * sem_ch10.adb: Minor reformatting.
1780 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1782 * sem_ch8.adb (Freeze_Profile): A limited view of a type in
1783 the profile of a subprogram renaming does not require freezing,
1784 because it is declared in a different unit.
1786 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1788 * exp_aggr.adb (Get_Constraint_Association): If type (of ancestor
1789 composite type) is private, go to full view. This was previously
1790 done only in an instance context, but is happen whenever a chain
1791 of private extensions includes one inherited discriminant.
1793 2015-05-22 Robert Dewar <dewar@adacore.com>
1795 * einfo.ads: Minor comment updates.
1796 * exp_unst.adb: Move Subps table to spec Don't remove old entries
1797 from table Add Last field to record last entry used.
1798 * exp_unst.ads: Move Subps table here from body So that Cprint
1799 can access saved values.
1801 2015-05-22 Bob Duff <duff@adacore.com>
1803 * a-cdlili.adb, a-cdlili.ads, a-cohama.adb, a-cohama.ads,
1804 * a-cohase.adb, a-cohase.ads, a-convec.adb, a-convec.ads,
1805 * a-coorma.adb, a-coorma.ads, a-coorse.adb, a-coorse.ads:
1806 (Pseudo_Reference, Element_Access, Get_Element_Access): New
1807 declarations added for use by performance improvements in exp_ch5.adb.
1808 * snames.ads-tmpl: New names referenced by exp_ch5.adb.
1809 * exp_ch5.adb: Speed up "for ... of" loops for predefined containers.
1810 Instead of doing literally what the RM calls for, we do something
1811 equivalent that avoids expensive operations inside the loop. If the
1812 container package has appropriate Next, Pseudo_Reference,
1813 Element_Access, Get_Element_Access declarations, we invoke the
1815 * snames.ads-tmpl: Note speed improvement.
1817 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
1819 * einfo.ads (Is_Atomic_Or_VFA): Move to XEINFO INLINES section.
1820 * xeinfo.adb: Replace a-einfo.h with einfo.h throughout.
1821 Add pattern to translate "or else" into "||".
1823 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
1825 * einfo.ads (Has_Volatile_Full_Access): Rename into...
1826 (Is_Volatile_Full_Access): ...this.
1827 (Set_Has_Volatile_Full_Access): Rename into...
1828 (Set_Is_Volatile_Full_Access): ...this.
1829 * einfo.adb (Has_Volatile_Full_Access): Rename into...
1830 (Is_Volatile_Full_Access): ...this.
1831 (Set_Has_Volatile_Full_Access): Rename into...
1832 (Set_Is_Volatile_Full_Access): ...this.
1833 (Is_Atomic_Or_VFA): Adjust to above renaming.
1834 * errout.adb (Special_Msg_Delete): Likewise.
1835 * exp_pakd.adb (Install_PAT): Likewise.
1836 * freeze.adb (Freeze_Array_Type): Likewise.
1837 * sem_ch8.adb (Analyze_Object_Renaming): Likewise.
1838 * sem_ch13.adb (Inherit_Delayed_Rep_Aspects): Likewise.
1839 (Inherit_Aspects_At_Freeze_Point): Likewise.
1840 * sem_prag.adb (Set_Atomic_VFA): Likewise.
1841 (Process_Atomic_Independent_Shared_Volatile): Likewise.
1842 * sem_util.adb (Is_Atomic_Or_VFA_Object): Likewise.
1844 2015-05-22 Robert Dewar <dewar@adacore.com>
1846 * exp_ch5.adb, layout.adb, einfo.adb, einfo.ads, sem_prag.adb,
1847 freeze.adb, freeze.ads, sem_util.adb, sem_util.ads, exp_ch2.adb,
1848 exp_ch4.adb, errout.adb, exp_aggr.adb, sem_ch13.adb: This is a general
1849 change that deals with the fact that most of the special coding for
1850 Atomic should also apply to the case of Volatile_Full_Access.
1851 A new attribute Is_Atomic_Or_VFA is introduced, and many of the
1852 references to Is_Atomic now use this new attribute.
1854 2015-05-22 Robert Dewar <dewar@adacore.com>
1856 * exp_ch4.adb (Expand_N_Op_Eq): Introduce 'Machine for 'Result
1859 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
1861 * sprint.adb (Source_Dump): When generating debug files, deal
1862 with the case of a stand-alone package instantiation by dumping
1863 together the spec and the body in the common debug file.
1865 2015-05-22 Robert Dewar <dewar@adacore.com>
1867 * sem_ch13.adb (Minimum_Size): Size is zero for null range
1870 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1872 * einfo.adb (Anonymous_Master): This attribute now applies
1873 to package and subprogram bodies.
1874 (Set_Anonymous_Master): This attribute now applies to package and
1876 (Write_Field36_Name): Add output for package and subprogram bodies.
1877 * einfo.ads Update the documentation on attribute Anonymous_Master
1878 along with occurrences in entities.
1879 * exp_ch4.adb (Create_Anonymous_Master): Reimplemented to
1880 handle spec and body anonymous masters of the same unit.
1881 (Current_Anonymous_Master): Reimplemented. Handle a
1882 package instantiation that acts as a compilation unit.
1883 (Insert_And_Analyze): Reimplemented.
1885 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1887 * sem_ch10.adb (Analyze_With_Clause): A limited_with_clause on a
1888 predefined unit is treated as a regular with_clause.
1890 2015-05-22 Robert Dewar <dewar@adacore.com>
1892 * sem_ch12.adb, prj.ads, makeutl.ads, sem_ch6.adb, prj-nmsc.adb,
1893 prj-conf.adb, sem_disp.adb: Minor reformatting.
1895 2015-05-22 Vincent Celier <celier@adacore.com>
1897 * clean.adb (Parse_Cmd_Line): For native gnatclean, check
1898 for switch -P and, if found and gprclean is available, invoke
1900 * make.adb (Initialize): For native gnatmake, check for switch -P
1901 and, if found and gprbuild is available, invoke silently gprbuild.
1903 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
1905 * sem_ch13.adb (Validate_Unchecked_Conversions): Also issue
1906 specific warning for discrete types when the source is larger
1909 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1911 * einfo.ads, einfo.adb (Incomplete_Actuals): New attribute of
1912 package instantiations. Holds the list of actuals in the instance
1913 that are incomplete types, to determine where the corresponding
1914 instance body must be placed.
1915 * sem_ch6.adb (Conforming_Types): An incomplete type used as an
1916 actual in an instance matches an incomplete formal.
1917 * sem_disp.adb (Check_Dispatching_Call): Handle missing case of
1918 explicit dereference.
1919 (Inherited_Subprograms): In the presence of a limited view there
1920 are no subprograms to inherit.
1921 * sem_ch12.adb (Preanalyze_Actuals): Build list of incomplete
1922 actuals of instance, for later placement of instance body and
1923 freeze nodes for actuals.
1924 (Install_Body): In the presence of actuals that incomplete types
1925 from a limited view, the instance body cannot be placed after
1926 the declaration because full views have not been seen yet. Any
1927 use of the non-limited views in the instance body requires
1928 the presence of a regular with_clause in the enclosing unit,
1929 and will fail if this with_clause is missing. We place the
1930 instance body at the beginning of the enclosing body, which is
1931 the unit being compiled, and ensure that freeze nodes for the
1932 full views of the incomplete types appear before the instance.
1934 2015-05-22 Pascal Obry <obry@adacore.com>
1936 * makeutl.ads, prj-conf.adb, prj-nmsc.adb, prj.ads
1937 (In_Place_Option): Removed.
1938 (Relocate_Build_Tree_Option): New constant.
1939 (Root_Dir_Option): New constant.
1940 (Obj_Root_Dir): Removed.
1941 (Build_Tree_Dir): New variable.
1942 (Root_Src_Tree): Removed.
1943 (Root_Dir): New variable.
1944 * prj-conf.adb (Get_Or_Create_Configuration_File): Add check
1945 for improper relocation.
1946 * prj-nmsc.adb (Locate_Directory): Add check for improper
1949 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1951 * einfo.adb (Default_Init_Cond_Procedure): Code cleanup. The
1952 attribute now applies to the base type.
1953 (Has_Default_Init_Cond): Now applies to the base type.
1954 (Has_Inherited_Default_Init_Cond): Now applies to the base type.
1955 (Set_Default_Init_Cond_Procedure): Code cleanup. The attribute now
1956 applies to the base type.
1957 (Set_Has_Default_Init_Cond): Now applies to the base type.
1958 (Set_Has_Inherited_Default_Init_Cond): Now applies to the base type.
1959 * exp_ch3.adb (Expand_N_Object_Declaration): No need to use the
1960 base type when adding a call to the Default_Initial_Condition.
1962 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1964 * einfo.adb: Node36 is now used as Anonymous_Master. Flag253
1966 (Anonymous_Master): New routine.
1967 (Has_Anonymous_Master): Removed.
1968 (Set_Anonymous_Master): New routine.
1969 (Set_Has_Anonymous_Master): Removed.
1970 (Write_Entity_Flags): Remove the output for Has_Anonymous_Maser.
1971 (Write_Field36_Name): Add output for Anonymous_Master.
1972 * einfo.ads Add new attribute Anonymous_Master along with
1973 occurrences in nodes. Remove attribute Has_Anonymous_Master along
1974 with occurrences in nodes.
1975 (Anonymous_Master): New routine along with pragma Inline.
1976 (Has_Anonymous_Master): Removed along with pragma Inline.
1977 (Set_Anonymous_Master): New routine along with pragma Inline.
1978 (Set_Has_Anonymous_Master): Removed along with pragma Inline.
1979 * exp_ch4.adb (Create_Anonymous_Master): New routine.
1980 (Current_Anonymous_Master): Reimplemented.
1982 2015-05-22 Bob Duff <duff@adacore.com>
1984 * freeze.adb (Freeze_Profile): Suppress warning if imported
1985 subprogram is not at library level.
1987 2015-05-22 Robert Dewar <dewar@adacore.com>
1989 * sem_ch8.adb (Analyze_Object_Renaming): Check for renaming
1990 component of an object to which Volatile_Full_Access applies.
1992 2015-05-22 Jerome Guitton <guitton@adacore.com>
1994 * exp_dbug.ads: Add note about non bit-packed arrays.
1996 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
1998 * sem_prag.adb: Fix typo.
1999 * einfo.ads: Grammar fixes in comments.
2001 2015-05-22 Bob Duff <duff@adacore.com>
2003 * a-cborma.ads, a-cidlli.ads, a-cimutr.ads, a-ciormu.ads,
2004 * a-cihase.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
2005 * a-cborse.ads, a-comutr.ads, a-ciorma.ads, a-cobove.ads,
2006 * a-coormu.ads, a-convec.ads, a-cohase.ads, a-coinho.ads,
2007 * a-cbdlli.ads, a-cbmutr.ads, a-cbhase.ads, a-cdlili.ads,
2008 * a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
2009 * a-coinho-shared.ads (Constant_Reference_Type, Reference_Type):
2010 Add an initialization expression "raise Program_Error". See,
2011 for example, RM-A.18.2(148.4).
2013 2015-05-22 Robert Dewar <dewar@adacore.com>
2015 * debug.adb: Update documentation.
2016 * einfo.ads, einfo.adb (Needs_Typedef): New flag
2017 * exp_unst.adb (Unnest_Subprogram): Mark AREC types as needing
2019 * frontend.adb: Update comments.
2020 * gnat1drv.adb (Adjust_Global_Switches): Set all needed flags
2022 * opt.ads (Generate_C_Code): New switch.
2023 * osint-c.adb (Write_C_File_Info): Removed, not used
2024 (Write_H_File_Info): Removed, not used
2025 * osint-c.ads (Write_C_File_Info): Removed, not used
2026 (Write_H_File_Info): Removed, not used
2027 * osint.ads (Write_Info): Minor comment updates.
2028 (Output_FD): Moved from private part to public part of spec.
2029 * sem.adb (Semantics): Force expansion on if in Generate_C_Code
2031 * atree.ads: minor typo in comment.
2032 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
2033 Do not allow VFA on composite object with aliased component.
2035 2015-05-22 Arnaud Charlet <charlet@adacore.com>
2037 * osint-c.adb, osint-c.ads (Set_File_Name): Move back to spec.
2039 2015-05-22 Pascal Obry <obry@adacore.com>
2041 * prj-util.adb: Minor comment editing.
2043 2015-05-22 Pascal Obry <obry@adacore.com>
2045 * makeutl.ads (In_Place_Option): New constant.
2046 * prj.ads (Obj_Root_Dir): New variable (absolute path to relocate
2048 (Root_Src_Tree): New variable (absolute path of root source tree).
2049 * prj-conf.adb (Do_Autoconf): Take into account the object root
2050 directory (if defined) to generate configuration project.
2051 * prj-nmsc.adb (Get_Directories): Handle case where Obj_Root_Dir
2053 (Locate_Directory): Likewise.
2055 2015-05-22 Pascal Obry <obry@adacore.com>
2057 * prj-util.ads, prj-util.adb (Relative_Path): New routine.
2059 2015-05-22 Bob Duff <duff@adacore.com>
2061 * exp_utils.ads, exp_utils.adb (Find_Optional_Prim_Op): New
2062 interface to return Empty when not found, so we can avoid handling
2063 Program_Error in that case.
2064 (Find_Prim_Op): Fix latent bug: raise Program_Error when there are no
2066 * exp_ch7.adb, sem_util.adb: Use Find_Optional_Prim_Op when the
2067 code is expecting Empty.
2068 * sem_ch8.adb: Use Find_Optional_Prim_Op to avoid handling
2071 2015-05-22 Robert Dewar <dewar@adacore.com>
2073 * sem_ch3.adb, sem_intr.adb, exp_ch4.adb, s-rannum.adb,
2074 sem_eval.adb, s-fatgen.adb, s-expmod.ads: Remove incorrect hyphen in
2076 * exp_util.adb: Add comment.
2077 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move from spec to
2079 (Set_File_Name): New name for the above.
2080 (Create_C_File, Create_H_File, Write_C_File_Info, Write_H_File_Info,
2081 Close_C_File, Close_H_File): New procedure.
2082 * osint.adb: Minor reformatting.
2083 * osint.ads: Minor comment updates.
2085 2015-05-22 Robert Dewar <dewar@adacore.com>
2087 * exp_ch4.adb: Minor rewording.
2088 * exp_util.ads: Clarify that Find_Prim_Op is only for
2091 2015-05-22 Robert Dewar <dewar@adacore.com>
2093 * atree.adb, atree.ads, treepr.adb: Change name Needs_Actuals_Check to
2095 * exp_ch4.adb (Expand_N_Op_Expon): Optimize 2**x in modular
2098 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
2100 * exp_pakd.adb (Install_PAT): Propagate representation aspects
2101 from the original array type to the PAT.
2103 2015-05-22 Robert Dewar <dewar@adacore.com>
2105 * treepr.adb (Print_Node_Header): Add output of Needs_Actuals_Check.
2107 2015-05-22 Robert Dewar <dewar@adacore.com>
2109 * atree.adb, atree.ads (Needs_Actuals_Check): New flag.
2111 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
2113 * sem_prag.adb (Analyze_Pragma): Remove the detection
2114 of a useless Part_Of indicator when the related item is a constant.
2115 (Check_Matching_Constituent): Do not emit an error on a constant.
2116 (Check_Missing_Part_Of): Do not check for a missing Part_Of indicator
2117 when the related item is a constant.
2118 (Collect_Body_States): Code cleanup.
2119 (Collect_Visible_States): Code cleanup.
2120 (Report_Unused_States): Do not emit an error on a constant.
2121 * sem_util.ads, sem_util.adb (Has_Variable_Input): Removed.
2123 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
2125 * sem_ch8.adb (Analyze_Object_Renaming): Copy
2126 Has_Volatile_Full_Access from renamed to renaming entities.
2127 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
2128 Tidy up and remove redundant setting of Has_Volatile_Full_Access.
2130 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
2132 * ghost.adb (Check_Ghost_Completion): Update references to SPARK
2134 (Check_Ghost_Policy): Update references to SPARK RM 6.9 rules.
2135 * sem_ch3.adb (Analyze_Object_Declaration): Update references
2136 to SPARK RM 6.9 rules.
2137 (Check_Completion): Ghost entities do not require a special form of
2139 * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Update references
2140 to SPARK RM 6.9 rules.
2141 (Analyze_Subprogram_Body_Helper): Update references to SPARK RM 6.9
2143 * sem_ch7.adb (Analyze_Package_Body_Helper): Update references
2144 to SPARK RM 6.9 rules.
2145 (Requires_Completion_In_Body): Ghost entities do not require a special
2148 2015-05-22 Robert Dewar <dewar@adacore.com>
2150 * a-csquin.ads: Use Ada 2012 notation.
2151 * sem_ch8.adb: Minor reformatting.
2153 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
2155 * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect Import
2156 acts as a completion.
2158 2015-05-22 Ed Schonberg <schonberg@adacore.com>
2160 * sem_ch13.adb: Minor reformatting.
2162 2015-05-22 Jose Ruiz <ruiz@adacore.com>
2164 * a-reatim.adb: Minor change, fix typo.
2166 2015-05-22 Robert Dewar <dewar@adacore.com>
2168 * sem_util.ads: Minor addition of ??? comment.
2169 * sem_prag.adb, sem_util.adb: Minor reformatting.
2170 * sem_ch13.adb: minor reformatting.
2172 2015-05-22 Robert Dewar <dewar@adacore.com>
2174 * a-reatim.ads: Add Compile_Time_Error to ensure Duration
2176 * sem_ch13.adb: Improve error message.
2177 * exp_ch4.adb: Minor reformatting.
2179 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
2181 * sem_prag.adb (Analyze_Pragma): Constants without variable
2182 input do not require indicator Part_Of.
2183 (Check_Missing_Part_Of): Constants without variable input do not
2184 requrie indicator Part_Of.
2185 (Collect_Visible_States): Constants without variable input are
2186 not part of the hidden state of a package.
2187 * sem_util.ads, sem_util.adb (Has_Variable_Input): New routine.
2189 2015-05-22 Robert Dewar <dewar@adacore.com>
2191 * exp_util.adb (Activate_Atomic_Synchronization): Do not set
2192 Atomic_Sync_Required for an object renaming declaration.
2193 * sem_ch8.adb (Analyze_Object_Renaming): Copy Is_Atomic and
2194 Is_Independent to renaming object.
2196 2015-05-22 Ed Schonberg <schonberg@adacore.com>
2198 * sem_ch5.adb (Analyze_Iterator_Specification): Diagnose
2199 various illegalities in iterators over arrays and containers:
2200 a) New function Get_Cursor_Type, to verify that the cursor is
2201 not a limited type at the point of iteration.
2202 b) If the container is a constant, an element_iterator is illegal
2203 if the container type does not have a Constant_Indexing aspect.
2204 c) If the iterate function has an in-out controlling parameter,
2205 the container cannot be a constant object.
2206 d) Reject additional cases of iterators over a
2207 discriminant-dependent component of a mutable object.
2209 2015-05-21 Hristian Kirtchev <kirtchev@adacore.com>
2211 * einfo.adb (Contract): This attribute now applies to constants.
2212 (Set_Contract): This attribute now applies to constants.
2213 (Write_Field34_Name): Add output for constants.
2214 * einfo.ads Attribute Contract now applies to constants.
2215 * sem_ch3.adb (Analyze_Object_Contract): Constants now have
2216 their Part_Of indicator verified.
2217 * sem_prag.adb (Analyze_Constituent): A constant is now a valid
2219 (Analyze_Global_Item): A constant cannot act as an output.
2220 (Analyze_Initialization_Item): Constants are now a valid
2221 initialization item.
2222 (Analyze_Initializes_In_Decl_Part): Rename
2223 global variable States_And_Vars to States_And_Objs and update
2224 all its occurrences.
2225 (Analyze_Input_Item): Constants are now a
2226 valid initialization item. Remove SPARM RM references from error
2228 (Analyze_Pragma): Indicator Part_Of can now apply to a constant.
2229 (Collect_Body_States): Collect both source constants
2231 (Collect_States_And_Objects): Collect both source constants and
2233 (Collect_States_And_Variables): Rename
2234 to Collect_States_And_Objects and update all its occurrences.
2235 (Collect_Visible_States): Do not collect constants and variables
2236 used to map generic formals to actuals.
2237 (Find_Role): The role of a constant is that of an input. Separate the
2238 role of a variable from that of a constant.
2239 (Report_Unused_Constituents): Add specialized wording for constants.
2240 (Report_Unused_States): Add specialized wording for constants.
2241 * sem_util.adb (Add_Contract_Item): Add processing for constants.
2242 * sem_util.ads (Add_Contract_Item): Update the comment on usage.
2243 (Find_Placement_In_State_Space): Update the comment on usage.
2245 2015-05-21 Ed Schonberg <schonberg@adacore.com>
2247 * sem_ch5.adb: minor reformatting.
2249 2015-05-21 Robert Dewar <dewar@adacore.com>
2251 * freeze.adb (Freeze_Entity): Properly tag -gnatw.z messages.
2253 2015-05-21 Robert Dewar <dewar@adacore.com>
2255 * freeze.adb: Minor reformatting.
2256 * cstand.adb (Print_Standard): Fix bad printing of Duration
2258 * a-reatim.adb (Time_Of): Complete rewrite to properly detect
2261 2015-05-21 Ed Schonberg <schonberg@adacore.com>
2263 * sem_ch5.adb: add (useless) initial value.
2264 * sem_ch3.adb (Replace_Anonymous_Access_To_Protected_Subprogram):
2265 Check whether the procedure has parameters before processing
2266 formals in ASIS mode.
2268 2015-05-21 Ed Schonberg <schonberg@adacore.com>
2270 * sem_ch13.adb (Check_Iterator_Functions): Emit error on Iterator
2271 aspect as well when indexing function is illegal.
2272 (Valid_Default_Iterator): Handle properly somme illegal cases
2273 to prevent compilation abandoned messages.
2274 (Check_Primitive_Function): Verify that type and indexing function
2275 are in the same scope.
2276 * freeze.adb (Freeze_Record): Extend patch on the presence of
2277 indexing aspects to aspect Default_Iterator.
2279 2015-05-19 David Malcolm <dmalcolm@redhat.com>
2281 * gcc-interface/trans.c (Sloc_to_locus1): Strenghthen local "map"
2282 from line_map * to line_map_ordinary *.
2284 2015-05-12 Jason Merrill <jason@redhat.com>
2286 * sigtramp-vxworks.c: Add space between string literal and macro
2289 2015-05-12 Arnaud Charlet <charlet@adacore.com>
2291 * gnat_rm.texi, gnat_ugn.texi, doc: Documentation updates and clean ups
2293 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2295 * sem_ch5.adb (Analyze_Iterator_Specifications): Additional
2296 legality checks for array and container iterators:
2297 a) The domain of iteration cannot be a component that depends
2298 on discriminants of a mutable object. The check was recently
2299 added for element iterators.
2300 b) The cursor type cannot be a limited type at the point of the
2301 iteration, because the cursor will be assigned to in the body
2304 2015-05-12 Robert Dewar <dewar@adacore.com>
2306 * freeze.adb (Freeze_Record_Type): Make sure that if we have
2307 aspect Iterator_Element, then we have either Constant_Indexing
2308 or Variable_Indexing.
2310 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2312 * a-coormu.ads, a-coormu.adb: Add Indexing aspect, Reference_Type,
2313 and Reference_Control_Type to support element iterators over
2315 * a-ciormu.ads, a-ciormu.adb: Ditto for
2316 indefinite_ordered_multisets.
2318 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
2320 * exp_ch4.adb (Expand_N_Expression_With_Actions): Force
2321 the evaluation of the EWA expression. Code cleanup.
2322 (Process_Transient_Object): Code cleanup.
2323 * exp_util.adb (Is_Aliased): Controlled transient objects found
2324 within EWA nodes are not aliased.
2325 (Is_Finalizable_Transient): Iterators are not finalizable transients.
2327 2015-05-12 Robert Dewar <dewar@adacore.com>
2329 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
2330 Don't allow Atomic and Volatile_Full_Access for the same entity.
2332 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2334 * sem_ch5.adb (Analyze_Iterator_Specification): Implement new
2335 semantics and safety checks specified in AI12-0151.
2337 2015-05-12 Pierre-Marie de Rodat <derodat@adacore.com>
2339 * sem_ch10.adb (Sem_Ch10.Analyze_Proper_Body): Generate SCOs
2340 for subunit in generic units.
2342 2015-05-12 Robert Dewar <dewar@adacore.com>
2344 * sem_elab.adb (Check_A_Call): Avoid checking internal call
2347 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2349 * sem_ch6.adb (Process_Formals): An untagged incomplete type
2350 is legal in the profile of a null procedure.
2352 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2354 * sem_ch12.adb (Validate_Derived_Type_Instance): Handle properly
2355 the checks on a derived formal whose parent type is a previous
2356 formal that is not a derived type.
2358 2015-05-12 Robert Dewar <dewar@adacore.com>
2360 * aspects.ads, aspects.adb: Add entries for aspect Volatile_Full_Access
2361 * einfo.adb (Has_Volatile_Full_Access): New flag.
2362 (Has_Volatile_Full_Access): New flag.
2363 * einfo.ads (Has_Volatile_Full_Access): New flag.
2364 * par-prag.adb: Add dummy entry for Volatile_Full_Access.
2365 * sem_prag.adb (Analyze_Pragma, case Volatile_Full_Access):
2366 Implement new pragma.
2367 * snames.ads-tmpl: Add entries for pragma Volatile_Full_Access.
2369 2015-05-12 Robert Dewar <dewar@adacore.com>
2371 * targparm.ads: Minor reformatting.
2373 2015-05-12 Robert Dewar <dewar@adacore.com>
2375 * a-reatim.adb (Time_Of): Properly detect overflow when TS = 0.0.
2376 * a-reatim.ads: Minor reformatting.
2378 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
2380 * einfo.ads: Update the documentation of flags
2381 Has_Inherited_Default_Init_Cond and Has_Default_Init_Cond.
2383 2015-05-12 Robert Dewar <dewar@adacore.com>
2385 * impunit.adb: Add entry for a-dhfina.ads
2386 * a-dhfina.ads: New file.
2388 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2390 * exp_ch5.adb (Expand_Iterator_Loop_Over_Array): if the array
2391 type has convention Fortran, a multidimensional iterator varies
2392 the first dimension fastest.
2394 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
2396 * einfo.adb: Node32 is now used as Encapsulating_State.
2397 Node37 is now used as Associated_Entity.
2398 (Associated_Entity): New routine.
2399 (Encapsulating_State): Update the assertion guard to include constants.
2400 (Set_Associated_Entity): New routine.
2401 (Set_Encapsulating_State): Update the assertion guard to
2403 (Write_Field10_Name): Remove the output for Encapsulating_State.
2404 (Write_Field32_Name): Add output for Encapsulating_State.
2405 (Write_Field37_Name): Add output for Associated_Entity.
2406 * einfo.ads New attribute Associated_Entity along with placement
2407 in entities. Attribute Encapsulating_State now uses Node32.
2408 (Associated_Entity): New routine along with pragma Inline.
2409 (Set_Associated_Entity): New routine along with pragma Inline.
2410 * inline.ads Code reformatting.
2411 * sem_attr.adb (Analyze_Attribute): Correct the prefix of
2412 attribute 'Result when the context is a generic instantiation.
2413 (Analyze_Attribute_Old_Result): Pragmas Depends and
2414 Refined_Depends are a valid context for attribute 'Result.
2415 (Denote_Same_Function): Allow attribute 'Result to denote
2417 * sem_ch3.adb Add with and use clauses for Sem_Ch12.
2418 (Analyze_Declarations): Capture global references within the
2419 contracts of packages, subprograms and their respective bodies.
2420 * sem_ch6.adb (Analyze_Aspects_On_Body_Or_Stub): Removed.
2421 (Analyze_Completion_Contract): Removed.
2422 (Analyze_Generic_Subprogram_Body): Enchange the aspects after
2423 creating the generic copy. Create a generic contract for the
2424 template. Analyze the aspects of the generic body. Analyze the
2425 contract of the generic body when it is a compilation unit and
2426 capture global references.
2427 (Analyze_Subprogram_Body_Contract): Code cleanup.
2428 (Analyze_Subprogram_Contract): Do not save global references here.
2429 (Save_Global_References_In_List): Removed.
2430 * sem_ch7.adb (Analyze_Package_Body_Contract): Code cleanup.
2431 (Analyze_Package_Body_Helper): Create a generic contract for
2433 (Analyze_Package_Contract): Code cleanup.
2434 * sem_ch10.adb Add with and use clauses for Sem_Ch12.
2435 (Analyze_Compilation_Unit): Capture global references in a
2436 generic subprogram declaration that acts as a compilation unit.
2437 * sem_ch12.adb Add with and use clauses for Sem_Prag. Illustrate
2438 the implementation of generic contracts. Alphabetize various
2440 (Analyze_Generic_Package_Declaration):
2441 Create a generic contract for the template.
2442 (Analyze_Generic_Subprogram_Declaration): Create a generic
2443 contract for the template.
2444 (Analyze_Subprogram_Instantiation): Instantiate the contract of the
2446 (Copy_Generic_Node): Link defining entities of the generic template
2447 with the corresponding defining entities of the generic copy. Update
2448 the processing of pragmas.
2449 (Instantiate_Contract): Removed.
2450 (Instantiate_Subprogram_Contract): New routine.
2451 (Requires_Delayed_Save): New routine.
2452 (Save_Global_References): Rename formal parameter N to Templ. Various
2454 (Save_Global_References_In_Aspects): Moved from the spec.
2455 (Save_Global_References_In_Contract): New routine.
2456 (Save_References_In_Aggregate): New routine.
2457 (Save_References_In_Char_Lit_Or_Op_Symbol): New routine.
2458 (Save_References_In_Descendants): New routine.
2459 (Save_References_In_Identifier): New routine.
2460 (Save_References_In_Operator): New routine.
2461 (Save_References_In_Pragma): New routine.
2462 * sem_ch12.ads (Save_Global_References): Rename formal
2463 parameter N to Templ. Update the comment on usage.
2464 (Save_Global_References_In_Aspects): Moved to the body.
2465 (Save_Global_References_In_Contract): New routine.
2466 * sem_ch13.adb (Analyze_Aspect_Specifications_On_Body_Or_Stub):
2468 * sem_ch13.ads (Analyze_Aspect_Specifications_On_Body_Or_Stub):
2470 * sem_prag.adb (Add_Item_To_Name_Buffer): Add support for
2472 (Analyze_Contract_Cases_In_Decl_Part): Code cleanup.
2473 (Analyze_Depends_Global): New routine.
2474 (Analyze_Depends_In_Decl_Part): Code cleanup.
2475 (Analyze_Global_In_Decl_Part): Code cleanup.
2476 (Analyze_Global_Item): Constants are now valid global items. Do
2477 not perform state-related checks in an instance. Change the way
2478 renamings are handled. (Analyze_Initial_Condition_In_Decl_Part):
2480 (Analyze_Initializes_In_Decl_Part): Code cleanup.
2481 (Analyze_Input_Output): The analysis of attribute 'Result in
2482 the context of pragmas Depends or Refined_Depends now reuses
2483 the existing attribute analysis machinery. Constants and
2484 generic parameters are now valid dependency items. Do not
2485 perform state-related checks in an instance. Change the way
2486 renamings are handled. (Analyze_Pragma): Add a "characteristics"
2487 section for pragmas Abstract_State, Contract_Cases, Depends,
2488 Extensions_Visible, Global, Initial_Condition, Initializes,
2489 Post, Post_Class, Postcondition, Pre, Pre_Class, Precondition,
2490 Refined_Depends, Refined_Global, Refined_Post, Refined_State, Test_Case.
2491 (Analyze_Pre_Post_Condition): Do not create a generic
2493 (Analyze_Pre_Post_Condition_In_Decl_Part): Code cleanup.
2494 (Analyze_Refined_Depends_Global_Post): New routine.
2495 (Analyze_Refined_Depends_In_Decl_Part): Code cleanup.
2496 (Analyze_Refined_Global_In_Decl_Part): Code cleanup.
2497 (Analyze_Refined_Pragma): Removed.
2498 (Analyze_Refined_State_In_Decl_Part): Code cleanup.
2499 (Analyze_Test_Case_In_Decl_Part): Code cleanup.
2500 (Check_Dependency_Clause): Do not perform this check in an instance.
2501 (Check_Function_Return): Add support for generic functions.
2502 (Check_In_Out_States): Do not perform this check in an instance.
2503 (Check_Input_States): Do not perform this check in an instance.
2504 (Check_Mode_Restriction_In_Function): Add support for generic functions.
2505 (Check_Output_States): Do not perform this check in an instance.
2506 (Check_Postcondition_Use_In_Inlined_Subprogram): Rename
2507 parameter Subp_Id to Spec_Id and update comment on usage.
2508 (Check_Proof_In_States): Do not perform this check in an instance.
2509 (Check_Refined_Global_Item): Add support for constants.
2510 (Check_Refined_Global_List): Do not perform this check in an instance.
2511 (Collect_Global_Items): Reimplemented.
2512 (Collect_Subprogram_Inputs_Outputs): Add support for generic parameters.
2513 (Create_Generic_Template): Removed.
2514 (Find_Related_Package_Or_Body): Moved to spec.
2515 (Find_Role): Add support for generic parameters and constants.
2516 (Get_Argument): Moved to spec. Rename parameter Spec_Id to Context_Id.
2517 (Match_Item): Add support for constants.
2518 (Preanalyze_Test_Case_Arg): Reimplemented.
2519 (Report_Extra_Clauses): Do not perform this check in an instance.
2520 (Report_Extra_Constituents): Do not perform this check in an instance.
2521 * sem_prag.ads (Collect_Subprogram_Inputs_Outputs): Update
2522 the comment on usage.
2523 (Find_Related_Package_Or_Body): Moved from body.
2524 (Get_Argument): Moved from body.
2525 * sem_util.adb Add with and use clauses for Sem_Ch12.
2526 (Corresponding_Spec_Of): Add support for packages and package bodies.
2527 (Create_Generic_Contract): New routine.
2528 (Is_Contract_Annotation): Reimplemented.
2529 (Is_Generic_Declaration_Or_Body): New routine.
2530 (Is_Package_Contract_Annotation): New routine.
2531 (Is_Subprogram_Contract_Annotation): New routine.
2532 * sem_util.ads (Corresponding_Spec_Of): Update the comment on usage.
2533 (Create_Generic_Contract): New routine.
2534 (Is_Generic_Declaration_Or_Body): New routine.
2535 (Is_Package_Contract_Annotation): New routine.
2536 (Is_Subprogram_Contract_Annotation): New routine.
2537 * sinfo.adb (Is_Generic_Contract_Pragma): New routine.
2538 (Set_Is_Generic_Contract_Pragma): New routine.
2539 * sinfo.ads Add new attribute Is_Generic_Contract_Pragma along
2540 with occurrences in nodes.
2541 (Is_Generic_Contract_Pragma): New routine along with pragma Inline.
2542 (Set_Is_Generic_Contract_Pragma): New routine along with pragma Inline.
2543 * treepr.adb (Print_Entity_Info): Output fields 36 to 41.
2545 2015-05-12 Robert Dewar <dewar@adacore.com>
2547 * a-taster.ads: Minor comment fix: fix bad header, this is a
2550 2015-05-12 Robert Dewar <dewar@adacore.com>
2552 * sem_intr.adb: (Check_Shift): Diagnose bad modulus value.
2554 2015-05-12 Robert Dewar <dewar@adacore.com>
2556 * gnat1drv.adb (Adjust_Global_Switches): Default to suppressing
2557 Alignment_Checks on non-strict alignment machine.
2558 * sem_ch13.adb (Validate_Address_Clauses): Don't give
2559 compile-time alignment warnings if run time Alignment_Check
2562 2015-05-12 Thomas Quinot <quinot@adacore.com>
2564 * g-sercom.ads, g-sercom-linux.adb (GNAT.Serial_Communications.
2565 Data_Rate): New literals B75, B110, B150, B300, B600.
2567 2015-05-12 Doug Rupp <rupp@adacore.com>
2569 * init.c (__gnat_init_float) [vxworks]: For e500v2,
2570 do nothing and leave the responsibility to install the handler
2571 and enable the exceptions to the BSP.
2573 2015-05-12 Robert Dewar <dewar@adacore.com>
2575 * sem_ch9.adb, einfo.ads, exp_intr.adb: Minor reformatting.
2576 * sem_disp.adb: Minor code reorganization (remove junk redundant
2578 * exp_unst.adb (Unnest_Subprogram.Uplev_Refs): Ignore uplevel
2579 references to bounds of types coming from original type reference.
2580 * checks.ads: Minor reformatting.
2581 * checks.adb: Minor reformatting.
2582 * sem_prag.adb (Analyze_Pragma, case Check): If in ignored
2583 assertion, then make sure we do not drag in bignum stuff.
2585 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2587 * sem_ch9.adb (Collect_Interfaces): Initialize
2588 Direct_Primitive_Operations for a tagged synchronized type,
2589 so it can used in ASIS mode.
2590 * sem_disp.adb (Check_Dispatching_Operation): If expansion is
2591 disabled, attach subprogram to list of Direct_Primitive_Operations
2592 of synchronized type itself, for ASIS use, because in this case
2593 Corresponding_Record_Type is not built.
2594 * einfo.ads: Indicate use of Direct_Primitive_Operations on
2597 2015-05-12 Pierre-Marie de Rodat <derodat@adacore.com>
2599 * exp_pakd.adb: Make clearer the comment in exp_pakd.adb about
2602 2015-05-12 Robert Dewar <dewar@adacore.com>
2604 * sem_ch3.adb, sem_util.adb, sem_ch6.adb: Minor reformatting.
2606 2015-05-12 Robert Dewar <dewar@adacore.com>
2608 * exp_unst.adb (Visit_Node): Deal with subprogram and package stubs.
2610 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2612 * exp_intr.adb (Expand_Dispatching_Constructor_Call): The
2613 tag to be retrieved for the generated call is the first entry
2614 in the dispatch table for the return type of the instantiated
2617 2015-05-12 Bob Duff <duff@adacore.com>
2619 * exp_ch7.adb, exp_ch7.ads, exp_intr.adb, exp_util.adb,
2620 exp_util.ads: Update comments.
2622 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2624 * sem_ch3.adb (Add_Internal_Interface_Entities): Do no generate
2625 freeze nodes for these in ASIS mode, because they lead to
2626 elaoration order issues in gigi.
2628 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
2630 * sem_ch6.adb (Analyze_Expression_Function): Code
2631 cleanup. Use Copy_Subprogram_Spec to create a proper spec.
2632 (Analyze_Subprogram_Body_Helper): Code cleanup. Do not
2633 prepare a stand alone body for inlining in GNATprove mode
2634 when inside a generic. (Body_Has_Contract): Reimplemented.
2635 (Build_Subprogram_Declaration): New routine.
2636 * sem_ch10.adb (Analyze_Compilation_Unit): Capture global
2637 references within generic bodies by loading them.
2638 * sem_util.adb (Copy_Parameter_List): Code cleanup.
2639 (Copy_Subprogram_Spec): New routine.
2640 (Is_Contract_Annotation): New routine.
2641 * sem_util.ads (Copy_Subprogram_Spec): New routine.
2642 (Is_Contract_Annotation): New routine.
2644 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
2646 * sem_attr.adb (Resolve_Attribute): Do not analyze the generated
2647 body of an expression function when the prefix of attribute
2648 'Access is the body.
2650 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2652 * sem_ch3.adb (Build_Derived_Enumeration_Type): The anonymous base
2653 created for a derived enumeration type is not a first subtype,
2654 even though it is defined through a full type declaration.
2655 * sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): Do not process
2656 aspects for the anonymous base type constructed for a derived
2657 scalar type, because they will be set when the first subtype
2659 (Inherit_Aspects_At_Freeze_Point): Fix typos on handling of
2660 Default_Value and Default_Component_Value, that prevented the
2661 proper inheritance of these aspects.
2663 2015-05-12 Gary Dismukes <dismukes@adacore.com>
2665 * exp_ch6.adb, exp_unst.adb: Minor typo fixes.
2667 2015-05-12 Robert Dewar <dewar@adacore.com>
2669 * sem_ch3.adb: Minor reformatting.
2671 2015-05-12 Vincent Celier <celier@adacore.com>
2673 * gnatcmd.adb: If we want to invoke gnatmake (gnatclean) with
2674 -P, then check if gprbuild (gprclean) is available; if it is,
2675 use gprbuild (gprclean) instead of gnatmake (gnatclean).
2677 2015-05-12 Robert Dewar <dewar@adacore.com>
2679 * debug.adb: Add flag -gnatd.3 to output diagnostic info from
2681 * einfo.ad, einfo.adb: Reorganize (and remove most of) flags used by
2683 * exp_ch6.adb (Unest_Bodies): Table for delayed calls to
2684 Unnest_Subprogram (Expand_N_Subprogram_Body): Add entry to table
2685 for later call instead of calling Unnest_Subprogram directly
2686 (Initialize): New procedure (Unnest_Subprograms): New procedure
2687 * exp_ch6.ads (Add_Extra_Actual_To_Call): Move into proper
2689 (Initialize): New procedure.
2690 (Unnest_Subprograms): New procedure.
2691 * exp_unst.adb (Unnest_Subprogram): Major rewrite, moving
2692 all processing to this routine which is now called late
2693 after instantiating bodies. Fully handles the case of generic
2695 * exp_unst.ads: Major rewrite, moving all processing to
2697 * frontend.adb (Frontend): Add call to Exp_Ch6.Initialize.
2698 (Frontend): Add call to Unnest_Subprograms.
2699 * sem_ch8.adb (Find_Direct_Name): Back to old calling sequence
2700 for Check_Nested_Access.
2701 * sem_util.adb (Build_Default_Subtype): Minor reformatting
2702 (Check_Nested_Access): Back to original VM-only form (we
2703 now do all the processing for Unnest_Subprogram at the time
2705 (Denotes_Same_Object): Minor reformatting
2706 (Note_Possible_Modification): Old calling sequence for
2707 Check_Nested_Access.
2708 * sem_util.ads (Check_Nested_Access): Back to original VM-only
2709 form (we now do all the processing for Unnest_Subprogram at the
2712 2015-05-12 Robert Dewar <dewar@adacore.com>
2714 * sem_ch3.adb, freeze.adb, sem_ch6.adb: Minor reformatting.
2716 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2718 * sem_ch3.adb (Analyze_Object_Declaration): New function
2719 Has_Delayed_Aspect, used to defer resolution of an aggregate
2720 expression when the object declaration carries aspects Address
2722 * freeze.adb (Freeze_Object_Declaration): New subsidiary procedure
2723 to Freeze_Entity. In addition to the previous processing steps
2724 at the freeze point of an object, this procedure also handles
2725 aggregates in object declarations, when the declaration carries
2726 delayed aspects that require that the initialization of the
2727 object be attached to its freeze actions.
2729 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2731 * sem_ch6.adb (Analyze_Subprogram_Declaration): Following
2732 AI12-0147, null procedures and expression functions are allowed
2733 in protected bodies.
2735 2015-05-12 Tristan Gingold <gingold@adacore.com>
2737 * i-cpoint.adb (Copy_Terminated_Array): Copy nothing if Length is 0.
2739 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2741 * sem_ch3.adb (Complete_Private_Subtype): Propagate
2742 Has_Delayed_Aspects flag from private to full view, to ensure
2743 that predicate functions are constructed.
2745 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2747 * sem_ch6.adb (Process_Formals): If a tagged formal is an
2748 incomplete class-wide type, the subprogram must have a delayed
2749 freeze even though the opertation is not a primitive of the
2750 type. THis ensures that the backend can recover the full view
2751 when elaborating the subprogram declaration.
2753 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2755 * exp_util.adb (Get_Current_Value_Condition): Nothing to be
2756 done if an elsif part has been rewritten so that it is not part
2757 of an enclosing if_statement.
2759 2015-05-12 Robert Dewar <dewar@adacore.com>
2761 * sem_type.adb, sem_ch10.adb, freeze.adb, sem_ch6.adb, exp_disp.adb:
2764 2015-05-12 Bob Duff <duff@adacore.com>
2766 * exp_attr.adb (Size): Remove unnecessary check for types with
2767 unknown discriminants. That was causing the compiler to build
2768 a function call _size(T), where T is a type, not an object.
2770 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2772 * sem_ch4.adb (Extended_Primitive_Ops): Exclude overriding
2773 primitive operations of a type extension declared in the package
2774 body, to prevent duplicates in extended list.
2776 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2778 * sem_ch3.adb (Analyze_Component_Declaration): If the component is
2779 an unconstrained synchronized type with discriminants, create a
2780 constrained default subtype for it, so that the enclosing record
2781 can be given the proper size.
2782 * sem_util.adb (Build_Default_Subtype): If the subtype is created
2783 for a record discriminant, do not analyze the declarztion at
2784 once because it is added to the freezing actions of the enclosing
2787 2015-05-12 Robert Dewar <dewar@adacore.com>
2789 * exp_prag.adb (Expand_N_Pragma): Rewrite ignored pragma as
2791 * namet.ads (Boolean3): Document this flag used for Ignore_Pragma.
2792 * par-prag.adb (Prag): Implement Ignore_Pragma.
2793 * sem_prag.adb: Implement Ignore_Pragma.
2794 * snames.ads-tmpl: Add entries for pragma Ignore_Pragma.
2796 2015-05-12 Javier Miranda <miranda@adacore.com>
2798 * sem_ch10.adb (Build_Shadow_Entity): Link the class-wide shadow
2799 entity with its corresponding real entity.
2800 (Decorate_Type): Unconditionally build the class-wide shadow entity of
2802 * einfo.ads, einfo.adb (Has_Non_Limited_View): New synthesized
2804 (Non_Limited_View): Moved from field 17 to field 19 be available
2805 in class-wide entities.
2806 * exp_attr.adb (Access_Cases): Code cleanup.
2807 * exp_disp.adb (Expand_Interface_Actuals): Ditto.
2808 * exp_util.adb (Non_Limited_Designated_Type): Ditto.
2809 * freeze.adb (Build_Renamed_Bdody): Ditto.
2810 * sem_aux.adb (Available_View): Ditto.
2811 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
2812 (Try_One_Prefix_Interpretation): Ditto.
2813 * sem_ch5.adb (Analyze_Assignment): Ditto.
2814 * sem_ch6.adb (Detect_And_Exchange): Ditto.
2815 * sem_ch8.adb (Find_Expanded_Name): Ditto.
2816 * sem_disp.adb (Check_Controlling_Type): Ditto.
2817 * sem_res.adb (Resolve_Type_Conversion): Ditto.
2818 (Full_Designated_Type): Ditto.
2819 * sem_type.adb (Covers): Ditto.
2820 * sem_util.adb: Fix typo in comment.
2822 2015-05-12 Robert Dewar <dewar@adacore.com>
2824 * exp_unst.adb (Get_Real_Subp): New subprogram.
2825 (Unnest_Subprogram): Use Get_Real_Subp.
2826 (Uplev_Refs_For_One_Subp): Skip if no ARECnU entity.
2827 (Uplev_Refs_For_One_Subp): Use actual subtype in unconstrained case.
2829 2015-05-12 Robert Dewar <dewar@adacore.com>
2831 * a-reatim.adb ("/"): Add explicit check for Time_Span_First / -1.
2833 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2835 * sem_ch4.adb (Extended_Primitive_Ops): New subprogram,
2836 auxiliary to Try_Primitive_Operation to handle properly prefixed
2837 calls where the operation is not a primitive of the type, but
2838 is declared in the package body that is in the immediate scope
2841 2015-05-12 Robert Dewar <dewar@adacore.com>
2843 * sem_util.adb (Is_Variable): Allow X'Deref(Y) as a variable.
2845 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2847 * sem_ch8.adb (Find_Expanded_Name): Handle properly a fully
2848 qualified name for an instance of a generic grand-child unit in
2849 the body its parent.
2851 2015-05-12 Robert Dewar <dewar@adacore.com>
2853 * exp_unst.adb (Upref_Name): New subprogram.
2854 (Unnest_Subprogram): Use Upref_Name.
2855 (Unnest_Subprogram): Use new Deref attribute.
2856 * exp_unst.ads: Doc updates.
2858 2015-05-12 Thomas Quinot <quinot@adacore.com>
2860 * adaint.c: Enable Large File Support in adaint so that __gnat_readdir
2861 can access files on filesystems mounted from servers that use large
2864 2015-05-09 Eric Botcazou <ebotcazou@adacore.com>
2866 * gcc-interface/utils.c (gnat_write_global_declarations): Use type_decl
2867 method instead of global_decl for TYPE_DECLs.
2869 2015-04-27 Jim Wilson <jim.wilson@linaro.org>
2871 * gcc-interface/Makefile-lan.in (ada.mostlyclean): Remove gnatbind
2874 2015-04-13 Eric Botcazou <ebotcazou@adacore.com>
2876 * gnatvsn.ads (Library_Version): Bump to 6.
2878 2015-04-09 Iain Sandoe <iain@codesourcery.com>
2880 * gcc-interface/Makefile.in (darwin, powerpc): Enable atomics.
2882 2015-04-08 Eric Botcazou <ebotcazou@adacore.com>
2884 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Do not make
2885 a function returning an unconstrained type 'const' for the middle-end.
2887 * gcc-interface/trans.c (Pragma_to_gnu) <case Pragma_Warning>: Use
2888 exact condition to detect Reason => "..." pattern.
2890 2015-03-31 Tom de Vries <tom@codesourcery.com>
2893 * terminals.c (child_setup_tty): Fix warning 'argument to sizeof in
2894 bzero call is the same expression as the destination'.
2896 2015-03-26 Eric Botcazou <ebotcazou@adacore.com>
2898 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Deref>: New case.
2900 2015-03-24 Gary Dismukes <dismukes@adacore.com>
2902 * sem_ch3.adb: Minor typo fix (missing paren).
2904 2015-03-24 Robert Dewar <dewar@adacore.com>
2906 * sinfo.ads: Update comment.
2908 2015-03-24 Robert Dewar <dewar@adacore.com>
2910 * exp_attr.adb: Add entry for typ'Deref.
2911 * sem_attr.adb (Deref): New GNAT attribute.
2912 * sem_attr.ads: Add entry for new GNAT attribute Deref.
2913 * snames.ads-tmpl: Add entries for new attribute Deref.
2915 2015-03-24 Ed Schonberg <schonberg@adacore.com>
2917 * sem_ch13.adb (Rep_Item_Too_Early): allow pragma Convention
2920 2015-03-24 Gary Dismukes <dismukes@adacore.com>
2922 * inline.adb: Minor typo fix.
2924 2015-03-24 Arnaud Charlet <charlet@adacore.com>
2926 * doc/gnat_ugn/building_executable_programs_with_gnat.rst,
2927 doc/gnat_ugn/gnat_utility_programs.rst
2928 doc/gnat_rm/implementation_defined_attributes.rst
2929 doc/gnat_rm/implementation_defined_pragmas.rst
2930 doc/gnat_rm/representation_clauses_and_pragmas.rst
2931 doc/gnat_rm/about_this_guide.rst
2932 doc/gnat_rm/implementation_of_ada_2012_features.rst: Doc improvements.
2933 * gnat_rm.texi, gnat_ugn.texi: Regenerate.
2935 2015-03-23 Jakub Jelinek <jakub@redhat.com>
2938 * adadecode.c (ada_demangle): Guard with IN_RTS instead of IN_GCC.
2940 2015-03-20 Eric Botcazou <ebotcazou@adacore.com>
2943 * gcc-interface/utils.c (gnat_pushdecl): Tidy up and improve comment.
2944 Make sure to chain only main variants through TYPE_NEXT_PTR_TO.
2946 * gcc-interface/trans.c (Attribute_to_gnu): Revert latest change.
2948 2015-03-16 Eric Botcazou <ebotcazou@adacore.com>
2950 * gcc-interface/utils2.c (gnat_invariant_expr): Return null if the type
2951 of the expression ends up being composite.
2953 2015-03-16 Eric Botcazou <ebotcazou@adacore.com>
2955 * gcc-interface/decl.c (is_from_limited_with_of_main): New predicate.
2956 (gnat_to_gnu_entity) <E_Subprogram_Type>: Invoke it on return and
2957 parameter types to detect circularities in ASIS mode.
2958 * gcc-interface/trans.c (Attribute_to_gnu): Mention AI05-0151.
2960 2015-03-16 Eric Botcazou <ebotcazou@adacore.com>
2962 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Abstract_State>: Do not
2963 short-circuit the regular handling.
2965 2015-03-13 Robert Dewar <dewar@adacore.com>
2967 * exp_unst.adb (Note_Uplevel_Reference): Eliminate duplicate
2969 (Actual_Ref): New function.
2970 (AREC_String): Minor reformatting.
2971 (Unnest_Subprogram): Use Actual_Ref.
2972 * frontend.adb (Frontend): Turn off Unnest_Subprogram_Mode
2973 before call to Instantiate_Bodies.
2975 2015-03-13 Ed Schonberg <schonberg@adacore.com>
2977 * freeze.adb (Freeze_Profile): If the return type of a function
2978 being frozen is an untagged limited view and the function is
2979 abstract, mark the type as frozen because there is no later
2980 point at which the profile of the subprogram will be elaborated.
2982 2015-03-13 Robert Dewar <dewar@adacore.com>
2984 * einfo.adb, einfo.ads, atree.adb, atree.ads, atree.h: Add seventh
2985 component to entities. Add new fields Field36-41 and Node36-41.
2987 2015-03-13 Claire Dross <dross@adacore.com>
2989 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Rewrite after review.
2991 2015-03-13 Robert Dewar <dewar@adacore.com>
2993 * exp_util.adb (Is_Volatile_Reference): Compile time known
2994 value is never considered to be a volatile reference.
2996 2015-03-13 Robert Dewar <dewar@adacore.com>
2998 * sem_ch3.adb (Analyze_Object_Contract): Suppress "constant
2999 cannot be volatile" for internally generated object (such as
3000 FIRST and LAST constants).
3002 2015-03-13 Ed Schonberg <schonberg@adacore.com>
3004 * sem_ch12.adb (Validate_Access_Subprogram_Instance): If a
3005 convention is specified for the formal parameter, verify that
3006 the actual has the same convention.
3007 * sem_prag.adb (Set_Convention_From_Pragma): Allow convention
3008 pragma to be set on a generic formal type.
3009 * sem_util.adb (Set_Convention): Ignore within an instance,
3010 as it has already been verified in the generic unit.
3012 2015-03-13 Claire Dross <dross@adacore.com>
3014 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do not inline
3015 subprograms with unconstrained record parameters containing
3017 * sinfo.ads Document GNATprove assumption that type should match
3019 * sem_ch6.adb (Analyze_Subprogram_Body_Contract):
3020 Do not check for Refined_Depends and Refined_Globals contracts
3021 as they are optional.
3023 2015-03-13 Ed Schonberg <schonberg@adacore.com>
3025 * sem_ch12.adb (Instantiate_Type): For a floating-point type,
3026 capture dimension info if any, because the generated subtype
3027 declaration does not come from source and will not process dimensions.
3028 * sem_dim,adb (Analyze_Dimension_Extension_Or_Record_Aggregate):
3029 Do not analyze expressions with an initialization procedure
3030 because aggregates will have been checked at the point of record
3033 2015-03-13 Robert Dewar <dewar@adacore.com>
3035 * aspects.ads, aspects.adb: Add entries for aspect Unimplemented.
3036 * einfo.ads, einfo.adb (Is_Unimplemented): New flag.
3037 * sem_ch13.adb: Add dummy entry for aspect Unimplemented.
3038 * snames.ads-tmpl: Add entry for Name_Unimplemented.
3040 2015-03-13 Gary Dismukes <dismukes@adacore.com>
3042 * style.adb (Missing_Overriding): Apply the
3043 Comes_From_Source test to the Original_Node of the subprogram
3044 node, to handle the case of a null procedure declaration that
3045 has been rewritten as an empty procedure body.
3047 2015-03-13 Robert Dewar <dewar@adacore.com>
3049 * exp_util.ads: Minor fix to comment.
3050 * sem_ch3.adb (Constrain_Index): Correct pasto from previous
3053 2015-03-13 Robert Dewar <dewar@adacore.com>
3055 * exp_util.ads, exp_util.adb (Force_Evaluation): Add Related_Id and
3056 Is_Low/High_Bound params.
3057 * sem_ch3.adb (Constrain_Index): Use new Force_Evaluation calling
3058 sequence to simplify generation of FIRST/LAST temps for bounds.
3060 2015-03-12 Olivier Hainque <hainque@adacore.com>
3062 * gcc-interface/trans.c (Attribute_to_gnu) <Code_Address case>:
3063 On targets where a function symbol designates a function descriptor,
3064 fetch the function code address from the descriptor.
3065 (USE_RUNTIME_DESCRIPTORS): Provide a default definition.
3067 2015-03-04 Robert Dewar <dewar@adacore.com>
3069 * sem_warn.adb: Minor reformatting.
3070 * init.c: Minor tweaks.
3072 2015-03-04 Dmitriy Anisimko <anisimko@adacore.com>
3074 * a-coinho-shared.adb: Fix clear of already empty holder.
3076 2015-03-04 Robert Dewar <dewar@adacore.com>
3078 * exp_unst.adb (Check_Dynamic_Type): Ignore library level types.
3079 (Check_Uplevel_Reference_To_Type): Ignore call inside generic.
3080 (Note_Uplevel_Reference): Ignore call inside generic.
3081 (Note_Uplevel_Reference): Fix check for no entity field.
3082 (Unnest_Subprogram): Ignore call inside generic.
3083 (Find_Current_Subprogram): Use Defining_Entity, not Defining_Unit_Name.
3084 (Visit_Node): Ignore calls to Imported subprograms.
3085 (Visit_Node): Fix problem in finding subprogram body in some cases.
3086 (Add_Form_To_Spec): Use Defining_Entity, not Defining_Unit_Name.
3088 2015-03-04 Robert Dewar <dewar@adacore.com>
3090 * einfo.adb (Is_ARECnF_Entity): Removed.
3091 (Last_Formal): Remove special handling of Is_ARECnF_Entity.
3092 (Next_Formal): Remove special handling of Is_ARECnF_Entity.
3093 (Next_Formal_With_Extras): Remove special handling of Is_ARECnF_Entity.
3094 (Number_Entries): Minor reformatting.
3095 * einfo.ads (Is_ARECnF_Entity): Removed.
3096 * exp_unst.adb (Unnest_Subprogram): Remove setting of
3098 (Add_Extra_Formal): Use normal Extra_Formal circuit.
3099 * sprint.adb (Write_Param_Specs): Properly handle case where
3100 there are no source formals, but we have at least one Extra_Formal
3103 2015-03-04 Ed Schonberg <schonberg@adacore.com>
3105 * sem_aggr.adb (Resolve_Record_Aggregate,
3106 Add_Discriminant_Values): If the value is a reference to the
3107 current instance of an enclosing type, use its base type to check
3108 against prefix of attribute reference, because the target type
3109 may be otherwise constrained.
3111 2015-03-04 Robert Dewar <dewar@adacore.com>
3113 * atree.h: Add entries for Flag287-Flag309.
3114 * einfo.adb: Add (unused) flags Flag287-Flag309.
3116 2015-03-04 Ed Schonberg <schonberg@adacore.com>
3118 * sem_util.adb (Collect_Interfaces, Collect): When gathering
3119 interfaces of ancestors, handle properly a subtype of a private
3122 2015-03-04 Robert Dewar <dewar@adacore.com>
3124 * einfo.adb (Is_ARECnF_Entity): New flag (ARECnF is an extra formal).
3125 (Next_Formal): Don't return ARECnF formal.
3126 (Last_Formal): Don't consider ARECnF formal.
3127 (Next_Formal_With_Extras): Do consider ARECnF formal.
3128 * einfo.ads (Is_ARECnF_Entity): New flag (ARECnF is an extra formal).
3129 * exp_unst.adb (Create_Entities): Set Is_ARECnF_Entity flag.
3131 2015-03-04 Javier Miranda <miranda@adacore.com>
3133 * exp_ch6.adb (Expand_Simple_Function_Return): When the returned
3134 object is a class-wide interface object and we generate the
3135 accessibility described in RM 6.5(8/3) then displace the pointer
3136 to the object to reference the base of the object (to get access
3137 to the TSD of the object).
3139 2015-03-04 Hristian Kirtchev <kirtchev@adacore.com>
3141 * sem_prag.adb (Analyze_Abstract_State): Use routine
3142 Malformed_State_Error to issue general errors.
3143 (Analyze_Pragma): Diagnose a syntax error related to a state
3144 declaration with a simple option.
3145 (Malformed_State_Error): New routine.
3147 2015-03-04 Robert Dewar <dewar@adacore.com>
3149 * a-strsup.adb (Super_Slice): Deal with super flat case.
3150 * einfo.ads: Minor reformatting.
3151 * s-imgdec.adb (Set_Decimal_Digits): Add comment about possibly
3154 2015-03-04 Claire Dross <dross@adacore.com>
3156 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
3157 a-cforse.ads, a-cofove.ads: Use Default_Initial_Condition on formal
3160 2015-03-04 Ed Schonberg <schonberg@adacore.com>
3162 * sem_warn.adb (Check_References): When checking for an unused
3163 in-out parameter of a class- wide type, use its type to determine
3164 whether it is private, in order to avoid a spurious warning when
3165 subprogram spec and body are in different units.
3167 2015-03-04 Yannick Moy <moy@adacore.com>
3169 * sem_attr.adb: Improve warning messages.
3171 2015-03-04 Robert Dewar <dewar@adacore.com>
3173 * exp_ch6.adb (Expand_N_Subprogram_Body): Avoid trying to unnest
3174 generic subprograms.
3175 * exp_unst.adb (Check_Dynamic_Type): Handle record types properly
3176 (Note_Uplevel_Reference): Ignore uplevel references to non-types
3177 (Get_Level): Consider only subprograms, not blocks.
3178 (Visit_Node): Set proper condition for generating ARECnF entity.
3179 Ignore indirect calls. Ignore calls to subprograms
3181 (Unnest_Subprogram): Minor changes in dealing with ARECnF entity.
3182 (Add_Form_To_Spec): Properly set Last_Entity field.
3183 (Unnest_Subprogram): Set current subprogram scope for analyze calls.
3184 Handle case of no uplevel refs in outer subprogram
3185 Don't mark uplevel entities as aliased.
3186 Don't deal with calls with no ARECnF requirement.
3188 2015-03-04 Robert Dewar <dewar@adacore.com>
3190 * s-valrea.adb (Scan_Real): Remove redundant tests from scaling loops.
3191 * s-imgdec.adb (Set_Decimal_Digits): Remove redundant Max
3192 operation in computing LZ.
3193 * sem_attr.adb: Minor typo fix
3195 2015-03-04 Robert Dewar <dewar@adacore.com>
3197 * exp_ch7.adb: Minor reformatting.
3198 * exp_unst.adb (Build_Tables): Fix minor glitch for no separate
3200 * erroutc.adb (Delete_Msg): add missing decrement of info msg counter.
3202 2015-03-04 Hristian Kirtchev <kirtchev@adacore.com>
3204 * exp_ch6.adb (Build_Pragma_Check_Equivalent): Suppress
3205 references to formal parameters subject to pragma Unreferenced.
3206 (Suppress_Reference): New routine.
3207 * sem_attr.adb (Analyze_Attribute): Reimplement the analysis
3208 of attribute 'Old. Attributes 'Old and 'Result now share
3210 (Analyze_Old_Result_Attribute): New routine.
3211 (Check_Placement_In_Check): Removed.
3212 (Check_Placement_In_Contract_Cases): Removed.
3213 (Check_Placement_In_Test_Case): Removed.
3214 (Check_Use_In_Contract_Cases): Removed.
3215 (Check_Use_In_Test_Case): Removed.
3216 (In_Refined_Post): Removed.
3217 (Is_Within): Removed.
3218 * sem_warn.adb (Check_Low_Bound_Tested): Code cleanup.
3219 (Check_Low_Bound_Tested_For): New routine.
3221 2015-03-04 Hristian Kirtchev <kirtchev@adacore.com>
3223 * exp_ch3.adb (Expand_N_Object_Declaration):
3224 Generate a runtime check to test the expression of pragma
3225 Default_Initial_Condition when the object is default initialized.
3227 2015-03-02 Robert Dewar <dewar@adacore.com>
3229 * scng.adb (Scan): Ignore illegal character in relaxed
3232 2015-03-02 Ed Schonberg <schonberg@adacore.com>
3234 * sem_ch4.adb (Analyze_Set_Membership); Retain Overloaded flag
3235 on left operand, so it can be properly resolved with type of
3236 alternatives of right operand.
3237 * sem_res.adb (Resolve_Set_Membership): Handle properly an
3238 overloaded left-hand side when the alternatives on the right
3239 hand side are literals of some universal type. Use first
3240 non-overloaded alternative to find expected type.
3242 2015-03-02 Ed Schonberg <schonberg@adacore.com>
3244 * exp_ch7.adb (Make_Set_Finalize_Address_Call): Use underlying
3245 type to retrieve designated type, because the purported access
3246 type may be a partial (private) view, when it is declared in
3247 the private part of a nested package, and finalization actions
3248 are generated when completing compilation of enclosing unit.
3250 2015-03-02 Robert Dewar <dewar@adacore.com>
3252 * back_end.adb (Call_Back_End): Remove previous patch,
3253 the back end now gets to see the result of -gnatd.1
3254 (Unnest_Subprogram_Mode) processing.
3255 * elists.ads, elists.adb (List_Length): New function.
3256 * exp_unst.ads, exp_unst.adb: Major changes, first complete version.
3257 * sem_util.adb (Check_Nested_Access): Handle formals in
3258 Unnest_Subprogram_Mode.
3259 (Adjust_Named_Associations): Minor reformatting.
3260 * sprint.adb (Sprint_Node_Actual): Fix failure to print aliased
3263 2015-03-02 Robert Dewar <dewar@adacore.com>
3265 * atree.ads, atree.adb (Uint24): New function
3266 (Set_Uint24): New procedure.
3267 * atree.h (Uint24): New macro for field access.
3268 * back_end.adb (Call_Back_End): For now, don't call back end
3269 if unnesting subprogs.
3270 * einfo.adb (Activation_Record_Component): New field
3271 (Subps_Index): New field.
3272 * einfo.ads (Activation_Record_Component): New field
3273 (Subps_Index): New field Minor reordering of comments into alpha order.
3274 * exp_unst.ads, exp_unst.adb: Continued development.
3276 2015-03-02 Gary Dismukes <dismukes@adacore.com>
3278 * exp_disp.ads: Minor reformatting.
3280 2015-03-02 Ed Schonberg <schonberg@adacore.com>
3282 * sem_ch8.adb (Chain_Use_Clause): Do not chain use clause from
3283 ancestor to list of use clauses active in descendant unit if we
3284 are within the private part of an intervening parent, to prevent
3285 circularities in use clause list.
3287 2015-03-02 Javier Miranda <miranda@adacore.com>
3289 * exp_ch9.adb (Build_Corresponding_Record): Propagate type
3290 invariants to the corresponding record type.
3291 * exp_disp.ad[sb] (Set_DT_Position_Value): New subprogram
3292 which sets the value of the DTC_Entity associated with a given
3293 primitive of a tagged type and propagates the value to the
3295 (Set_DTC_Entity_Value): Propagate the DTC
3296 value to the wrapped entity.
3297 * sem_ch13.adb (Build_Invariant_Procedure): Append the code
3298 associated with invariants of progenitors.
3299 * sem_ch3.adb (Build_Derived_Record_Type): Inherit type invariants
3300 of parents and progenitors.
3301 (Process_Full_View): Check hidden inheritance of class-wide type
3303 * sem_ch7.adb (Analyze_Package_Specification): Do not generate
3304 the invariant procedure for interface types; build the invariant
3305 procedure for tagged types inheriting invariants from their
3307 * sem_prag.adb (Pragma_Invariant) Allow invariants in interface
3308 types but do not build their invariant procedure since their
3309 invariants will be propagated to the invariant procedure of
3310 types covering the interface.
3311 * exp_ch6.adb, exp_disp.adb, sem_ch3.adb, sem_ch7.adb,
3312 sem_ch8.adb, sem_disp.adb: Replace all calls to Set_DT_Position
3313 by calls to Set_DT_Position_Value.
3315 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
3317 * sem_attr.adb (Analyze_Attribute): Factor out heavily indented
3318 code in Denote_Same_Function. Do not analyze attribute 'Result
3319 when it is inside procedure _Postconditions. Remove a misplaced
3320 warning diagnostic. Code cleanup.
3321 (Denote_Same_Function): New routine.
3322 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Code
3323 cleanup. Warn on pre/postconditions on an inlined subprogram.
3324 (Analyze_Pragma, Refined_Post case): Warn on pre/postconditions on
3325 an inlined subprogram.
3326 (Analyze_Pre_Post_Condition_In_Decl_Part): Code cleanup. Warn on
3327 pre/post condition on an inlined subprogram.
3328 (Analyze_Test_Case_In_Decl_Part): Code cleanup. Warn on
3329 pre/postconditions on an inlined subprogram.
3330 (Check_Postcondition_Use_In_Inlined_Subprogram): New routine.
3332 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
3334 * sem_prag.adb (Ensure_Aggregate_Form):
3335 Ensure that the name denoted by the Chars of a pragma argument
3336 association has the proper Sloc when converted into an aggregate.
3338 2015-03-02 Bob Duff <duff@adacore.com>
3340 * sem_ch6.adb (Check_Private_Overriding): Capture
3341 Incomplete_Or_Partial_View in a constant. This is cleaner and
3344 2015-03-02 Gary Dismukes <dismukes@adacore.com>
3346 * einfo.ads, exp_unst.ads: Minor reformatting.
3348 2015-03-02 Ed Schonberg <schonberg@adacore.com>
3350 * a-strsea.adb (Find_Token): Ensure that the range of iteration
3351 does not perform any improper character access. This prevents
3352 erroneous access in the unusual case of an empty string target
3353 and a From parameter less than Source'First.
3355 2015-03-02 Robert Dewar <dewar@adacore.com>
3357 * elists.adb (List_Length): Fix incorrect result.
3359 2015-03-02 Bob Duff <duff@adacore.com>
3361 * sem_ch6.adb (Check_Private_Overriding): Refine the legality
3362 checks here. It used to check that the function is merely
3363 overriding SOMEthing. Now it checks that the function is
3364 overriding a corresponding public operation. This is a correction
3365 to the implementation of the rule in RM-3.9.3(10).
3367 2015-03-02 Robert Dewar <dewar@adacore.com>
3369 * debug.adb: Document new debug flag -gnatd.1.
3370 * einfo.ads, einfo.adb (Has_Nested_Subprogram): New flag.
3371 (Has_Uplevel_Reference): New flag (Is_Static_Type): New flag.
3372 (Uplevel_Reference_Noted):New flag (Uplevel_References): New field.
3373 * elists.ads elists.adb (List_Length): New function.
3374 * exp_ch6.adb (Expand_N_Subprogram_Body): Call Unnest_Subprogram
3375 when appropriate (Process_Preconditions): Minor code
3376 reorganization and reformatting
3377 * exp_unst.ads, exp_unst.adb: New files.
3378 * gnat1drv.adb (Adjust_Global_Switches): Set
3379 Unnest_Subprogram_Mode if -gnatd.1
3380 * namet.ads, namet.adb (Name_Find_Str): New version of Name_Find with
3382 * opt.ads (Unnest_Subprogram_Mode): New flag.
3383 * par-ch3.adb (P_Identifier_Declarations): Fixes to -gnatd.2 handling.
3384 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set
3385 Has_Nested_Subprogram flag.
3386 * sem_ch8.adb (Find_Direct_Name): New calling sequence for
3387 Check_Nested_Access.
3388 (Find_Selected_Component): Minor comment addition.
3389 * sem_util.adb (Check_Nested_Access): New version for use with Exp_Unst.
3390 (Note_Possible_Modification): New calling sequence for
3391 Check_Nested_Access.
3392 * sem_util.ads (Check_Nested_Access): New version for use with Exp_Unst.
3393 * gcc-interface/Make-lang.in (GNAT1_OBJS): Add exp_unst.o
3395 2015-03-02 Pierre-Marie de Rodat <derodat@adacore.com>
3397 * gcc-interface/utils.c (gnat_pushdecl): For non-artificial pointer
3398 types, preserve the original type and create copies just like the C
3399 front-end does. For artificial ones, do not define a name for
3401 (create_type_decl): When gnat_pushdecl made the input type the
3402 original type for the new declaration, do not define a stub
3404 * gcc-interface/utils2.c (build_binary_op): Accept two different
3405 pointer types when they point to the same type.
3407 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
3409 * exp_util.adb (Possible_Bit_Aligned_Component): Do not process
3411 * sem_util.adb (Kill_Current_Values): Do not invalidate and
3414 2015-03-02 Robert Dewar <dewar@adacore.com>
3416 * sem_ch3.adb, exp_attr.adb, checks.adb, exp_aggr.adb: Minor
3419 2015-03-02 Ed Schonberg <schonberg@adacore.com>
3421 * sem_ch8.adb: extend use of Available_Subtype.
3423 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
3425 * sem_prag.adb (Duplication_Error): Remove the special handling
3426 of 'Class or _Class in the context of pre/postconditions.
3427 (Process_Class_Wide_Condition): Remove the special handling of
3428 'Class or _Class in the context of pre/postconditions.
3429 * sem_util.adb (Original_Aspect_Pragma_Name): Names Pre_Class
3430 and Post_Class no longer need to be converted to _Pre and _Post.
3431 * sem_util.ads (Original_Aspect_Pragma_Name): Update the comment
3434 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
3436 * exp_ch6.adb (Process_Preconditions): Modify the
3437 mechanism that find the first source declaration to correct exit
3438 the loop once it has been found.
3440 2015-03-02 Gary Dismukes <dismukes@adacore.com>
3442 * a-strsea.adb: Minor typo fix.
3444 2015-03-02 Bob Duff <duff@adacore.com>
3446 * einfo.ads: Minor comment fixes.
3448 2015-03-02 Gary Dismukes <dismukes@adacore.com>
3450 * einfo.adb, checks.adb: Minor reformatting and typo fixes.
3452 2015-03-02 Ed Schonberg <schonberg@adacore.com>
3454 * exp_aggr.adb (Get_Assoc_Expr): If the Default_Component_Value
3455 is defined for the array type, use it instead of a Default_Value
3456 specified for the component type itself.
3458 2015-03-02 Thomas Quinot <quinot@adacore.com>
3460 * exp_attr.adb (Expand_N_Attribute_Reference, case Input): When
3461 expanding a 'Input attribute reference for a class-wide type,
3462 do not generate a separate object declaration for the controlling
3463 tag dummy object; instead, generate the expression inline in the
3464 dispatching call. Otherwise, the declaration (which involves a
3465 call to String'Input, returning a dynamically sized value on the
3466 secondary stack) will be expanded outside of proper secondary
3467 stack mark/release operations, and will thus cause a secondary
3470 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
3472 * checks.adb (Add_Validity_Check): Change the names of all
3473 formal parameters to better illustrate their purpose. Update
3474 the subprogram documentation. Update all occurrences of the
3475 formal parameters. Generate a pre/postcondition pragma by
3476 calling Build_Pre_Post_Condition.
3477 (Build_PPC_Pragma): Removed.
3478 (Build_Pre_Post_Condition): New routine.
3479 * einfo.adb Node8 is no longer used as Postcondition_Proc. Node14
3480 is now used as Postconditions_Proc. Flag240 is now renamed to
3481 Has_Expanded_Contract. (First_Formal): The routine can now
3482 operate on generic subprograms.
3483 (First_Formal_With_Extras): The routine can now operate on generic
3485 (Has_Expanded_Contract): New routine.
3486 (Has_Postconditions): Removed.
3487 (Postcondition_Proc): Removed.
3488 (Postconditions_Proc): New routine.
3489 (Set_Has_Expanded_Contract): New routine.
3490 (Set_Has_Postconditions): Removed.
3491 (Set_Postcondition_Proc): Removed.
3492 (Set_Postconditions_Proc): New routine.
3493 (Write_Entity_Flags): Remove the output of Has_Postconditions. Add
3494 the output of Has_Expanded_Contract.
3495 (Write_Field8_Name): Remove the output of Postcondition_Proc.
3496 (Write_Field14_Name): Add the output of Postconditions_Proc.
3497 * einfo.ads New attributes Has_Expanded_Contract and
3498 Postconditions_Proc along with occurrences in entities.
3499 Remove attributes Has_Postconditions and Postcondition_Proc
3500 along with occurrences in entities.
3501 (Has_Expanded_Contract): New routine along with pragma Inline.
3502 (Has_Postconditions): Removed along with pragma Inline.
3503 (Postcondition_Proc): Removed along with pragma Inline.
3504 (Postconditions_Proc): New routine along with pragma Inline.
3505 (Set_Has_Expanded_Contract): New routine along with pragma Inline.
3506 (Set_Has_Postconditions): Removed along with pragma Inline.
3507 (Set_Postcondition_Proc): Removed along with pragma Inline.
3508 (Set_Postconditions_Proc): New routine along with pragma Inline.
3509 * exp_ch6.adb (Add_Return): Code cleanup. Update the
3510 generation of the call to the _Postconditions routine of
3511 the procedure. (Expand_Non_Function_Return): Reformat the
3512 comment on usage. Code cleanup. Update the generation of
3513 the call to the _Postconditions routine of the procedure or
3515 (Expand_Simple_Function_Return): Update the
3516 generation of the _Postconditions routine of the function.
3517 (Expand_Subprogram_Contract): Reimplemented.
3518 * exp_ch6.ads (Expand_Subprogram_Contract): Update the parameter
3519 profile along the comment on usage.
3520 * exp_ch9.adb (Build_PPC_Wrapper): Code cleanup.
3521 (Expand_N_Task_Type_Declaration): Generate pre/postconditions
3522 wrapper when the entry [family] has a contract with
3524 * exp_prag.adb (Expand_Attributes_In_Consequence): New routine.
3525 (Expand_Contract_Cases): This routine and its subsidiaries now
3526 analyze all generated code.
3527 (Expand_Old_In_Consequence): Removed.
3528 * sem_attr.adb Add with and use clause for Sem_Prag.
3529 (Analyze_Attribute): Reimplment the analysis of attribute 'Result.
3530 (Check_Use_In_Test_Case): Use routine Test_Case_Arg to obtain
3532 * sem_ch3.adb (Analyze_Declarations): Analyze the contract of
3533 a generic subprogram.
3534 (Analyze_Object_Declaration): Do not create a contract node.
3535 (Derive_Subprogram): Do not create a contract node.
3536 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Do
3537 not create a contract node.
3538 (Analyze_Completion_Contract): New routine.
3539 (Analyze_Function_Return): Alphabetize.
3540 (Analyze_Generic_Subprogram_Body): Alphabetize. Do not create a
3541 contract node. Do not copy pre/postconditions to the original
3543 (Analyze_Null_Procedure): Do not create a contract node.
3544 (Analyze_Subprogram_Body_Contract): Reimplemented.
3545 (Analyze_Subprogram_Body_Helper): Do not mark the enclosing scope
3546 as having postconditions. Do not create a contract node. Analyze
3547 the subprogram body contract of a body that acts as a compilation
3548 unit. Expand the subprogram contract after the declarations have
3550 (Analyze_Subprogram_Contract): Reimplemented.
3551 (Analyze_Subprogram_Specification): Do not create a contract node.
3552 (List_Inherited_Pre_Post_Aspects): Code cleanup.
3553 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Update the
3555 (Analyze_Subprogram_Contract): Update the
3556 parameter profile and the comment on usage.
3557 * sem_ch7.adb (Analyze_Package_Body_Helper): Do not create a
3559 (Analyze_Package_Declaration): Do not create a
3561 (Is_Subp_Or_Const_Ref): Ensure that the prefix has an entity.
3562 * sem_ch8.adb (Analyze_Subprogram_Renaming): Do not create a
3564 * sem_ch9.adb (Analyze_Entry_Declaration): Do not create a
3566 * sem_ch10.adb (Analyze_Compilation_Unit): Move local variables to
3567 their proper section and alphabetize them. Analyze the contract of
3568 a [generic] subprogram after all Pragmas_After have been analyzed.
3569 (Analyze_Subprogram_Body_Stub_Contract): Alphabetize.
3570 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Do not
3571 create a contract node.
3572 (Analyze_Generic_Subprogram_Declaration):
3573 Alphabetize local variables. Do not create a contract
3574 node. Do not generate aspects out of pragmas for ASIS.
3575 (Analyze_Subprogram_Instantiation): Instantiate
3576 the contract of the subprogram. Do not create a
3577 contract node. (Instantiate_Contract): New routine.
3578 (Instantiate_Subprogram_Body): Alphabetize local variables.
3579 (Save_Global_References_In_Aspects): New routine.
3580 (Save_References): Do not save the global references found within
3581 the aspects of a generic subprogram.
3582 * sem_ch12.ads (Save_Global_References_In_Aspects): New routine.
3583 * sem_ch13.adb (Analyze_Aspect_Specifications): Do not use
3584 Original_Node for establishing linkages.
3585 (Insert_Pragma): Insertion in a subprogram body takes precedence over
3586 the case where the subprogram body is also a compilation unit.
3587 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Use
3588 Get_Argument to obtain the proper expression. Install the generic
3589 formals when the related context is a generic subprogram.
3590 (Analyze_Depends_In_Decl_Part): Use Get_Argument to obtain
3591 the proper expression. Use Corresponding_Spec_Of to obtain
3592 the spec. Install the generic formal when the related context
3593 is a generic subprogram.
3594 (Analyze_Global_In_Decl_Part): Use Get_Argument to obtain the proper
3595 expression. Use Corresponding_Spec_Of to obtain the spec. Install the
3596 generic formal when the related context is a generic subprogram.
3597 (Analyze_Initial_Condition_In_Decl_Part): Use Get_Argument
3598 to obtain the proper expression. Remove the call to
3599 Check_SPARK_Aspect_For_ASIS as the analysis is now done
3601 (Analyze_Pragma): Update all occurrences
3602 to Original_Aspect_Name. Pragmas Contract_Cases, Depends,
3603 Extensions_Visible, Global, Postcondition, Precondition and
3604 Test_Case now carry generic templates when the related context
3605 is a generic subprogram. The same pragmas are no longer
3606 forcefully fully analyzed when the context is a subprogram
3607 that acts as a compilation unit. Pragmas Abstract_State,
3608 Initial_Condition, Initializes and Refined_State have been clean
3609 up. Pragmas Post, Post_Class, Postcondition, Pre, Pre_Class
3610 and Precondition now use the same routine for analysis. Pragma
3611 Refined_Post does not need to check the use of 'Result or
3612 the lack of a post-state in its expression. Reimplement the
3613 analysis of pragma Test_Case.
3614 (Analyze_Pre_Post_Condition): New routine.
3615 (Analyze_Pre_Post_Condition_In_Decl_Part):
3617 (Analyze_Refined_Depends_In_Decl_Part): Use Get_Argument to obtain the
3619 (Analyze_Refined_Global_In_Decl_Part): Use Get_Argument to obtain
3620 the proper expression.
3621 (Analyze_Test_Case_In_Decl_Part): Reimplemented.
3622 (Check_Pre_Post): Removed.
3623 (Check_Precondition_Postcondition): Removed.
3624 (Check_SPARK_Aspect_For_ASIS): Removed.
3625 (Check_Test_Case): Removed.
3626 (Collect_Subprogram_Inputs_Outputs): Use Get_Argument
3627 to obtain the proper expression. Use Corresponding_Spec_Of to
3628 find the proper spec.
3629 (Create_Generic_Template): New routine.
3630 (Duplication_Error): New routine.
3631 (Expression_Function_Error): New routine.
3632 (Find_Related_Subprogram_Or_Body): Moved to the spec
3633 of Sem_Prag. Emit precise error messages. Account for cases of
3634 rewritten expression functions, generic instantiations, handled
3635 sequence of statements and pragmas from aspects.
3636 (Get_Argument): New routine.
3637 (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Removed.
3638 (Preanalyze_CTC_Args): Removed.
3639 (Process_Class_Wide_Condition): New routine.
3640 * sem_prag.ads (Analyze_Test_Case_In_Decl_Part): Update
3641 the parameter profile along with the comment on usage.
3642 (Find_Related_Subprogram_Or_Body): Moved from the body of Sem_Prag.
3643 (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Removed.
3644 (Test_Case_Arg): New routine.
3645 * sem_util.adb Add with and use clauses for Sem_Ch6.
3646 (Add_Contract_Item): This routine now creates a contract
3647 node the first time an item is added. Remove the duplicate
3648 aspect/pragma checks.
3649 (Check_Result_And_Post_State): Reimplemented.
3650 (Corresponding_Spec_Of): New routine.
3651 (Get_Ensures_From_CTC_Pragma): Removed.
3652 (Get_Requires_From_CTC_Pragma): Removed.
3653 (Has_Significant_Contract): New routine.
3654 (Inherit_Subprogram_Contract): Inherit only if the source
3656 (Install_Generic_Formals): New routine.
3657 (Original_Aspect_Name): Removed.
3658 (Original_Aspect_Pragma_Name): New routine.
3659 * sem_util.ads (Check_Result_And_Post_State): Reimplemented.
3660 (Corresponding_Spec_Of): New routine.
3661 (Get_Ensures_From_CTC_Pragma): Removed.
3662 (Get_Requires_From_CTC_Pragma): Removed.
3663 (Has_Significant_Contract): New routine.
3664 (Install_Generic_Formals): New routine.
3665 (Original_Aspect_Name): Removed.
3666 (Original_Aspect_Pragma_Name): New routine.
3667 * sem_warn.adb Add with and use clauses for Sem_Prag.
3668 (Within_Postcondition): Use Test_Case_Arg to extract "Ensures".
3670 2015-03-02 Ed Schonberg <schonberg@adacore.com>
3672 * sem_ch8.adb (Available_Subtype): Optimization in
3673 Find_Selected_Component: when safe, use existing subtype of
3674 array component, possibly discriminant-dependent, rather than
3675 creating new subtype declaration for it. In this fashion different
3676 occurrences of the component have the same subtype, rather than
3677 just equivalent ones. Simplifies value tracing in GNATProve.
3679 2015-03-01 Arnaud Charlet <charlet@adacore.com>
3683 * doc/gnat_ugn/gnat_project_manager.rst,
3684 doc/gnat_ugn/platform_specific_information.rst: Remove reference to
3685 image, too troublesome with texi format.
3686 * gnat_ugn.texi: Regenerate.
3688 2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
3691 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8): Remove.
3692 (DEF_FUNCTION_TYPE_VAR_12): Likewise.
3693 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
3695 2015-02-23 Thomas Schwinge <thomas@codesourcery.com>
3697 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8): Fix number of
3698 arguments parameter.
3699 (DEF_FUNCTION_TYPE_VAR_12): Likewise.
3701 2015-02-22 Arnaud Charlet <charlet@adacore.com>
3703 * doc/Makefile: postprocess texinfo files to update @dircategory
3704 and update texi files under gcc/ada.
3705 * gnat_ugn.texi, gnat_rm.texi: Regenerated.
3707 2015-02-22 Arnaud Charlet <charlet@adacore.com>
3709 * doc/gnat_ugn/project-manager-figure.png,
3710 doc/gnat_ugn/rtlibrary-structure.png: New.
3712 2015-02-22 Tom de Vries <tom@codesourcery.com>
3715 * gnat-style.texi (@subsection Loop Statements): Replace @noindent by
3716 @item, and fix warning '@itemize has text but no @item'.
3718 2015-02-20 Ed Schonberg <schonberg@adacore.com>
3720 * sem_prag.adb (Analyze_Pragma, case Obsolescent): Pragma
3721 legally applies to an abstract subprogram declaration.
3722 * freeze.adb: Minor comment addition.
3724 2015-02-20 Robert Dewar <dewar@adacore.com>
3726 * errout.ads: Document replacement of Name_uPre/Post/Type_Invariant.
3727 * erroutc.adb (Set_Msg_Str): Replace _xxx.
3728 (Pre/Post/Type_Invariant) by xxx'Class.
3729 * erroutc.ads (Set_Msg_Str): Replace _xxx.
3730 (Pre/Post/Type_Invariant) by xxx'Class.
3731 * sem_prag.adb (Fix_Error): Remove special casing of
3732 Name_uType_Invariant.
3733 (Analyze_Pre_Post_Condition_In_Decl_Part): Remove special casing of
3734 Name_uPre and Name_uPost in aspect case (done in Errout now).
3736 2015-02-20 Robert Dewar <dewar@adacore.com>
3738 * g-alveop.adb: Minor style fixes.
3740 2015-02-20 Robert Dewar <dewar@adacore.com>
3742 * freeze.adb (Warn_Overlay): Guard against blow up with address
3745 2015-02-20 Bob Duff <duff@adacore.com>
3747 * exp_attr.adb (May_Be_External_Call): Remove this. There is no need
3748 for the compiler to guess whether the call is internal or external --
3749 it is always external.
3750 (Expand_Access_To_Protected_Op): For P'Access, where P
3751 is a protected subprogram, always create a pointer to the
3752 External_Subprogram.
3754 2015-02-20 Robert Dewar <dewar@adacore.com>
3756 * a-dispat.adb, a-stcoed.ads: Minor reformatting.
3758 2015-02-20 Robert Dewar <dewar@adacore.com>
3760 * sem_ch13.adb (Build_Discrete_Static_Predicate): Allow static
3761 predicate for non-static subtype.
3762 (Build_Predicate_Functions): Do not assume subtype associated with a
3763 static predicate must be static.
3765 2015-02-20 Robert Dewar <dewar@adacore.com>
3767 * errout.adb (Set_Msg_Node): Better handling of internal names
3768 (Set_Msg_Node): Kill message when we cannot eliminate internal name.
3769 * errout.ads: Document additional case of message deletion.
3770 * namet.adb (Is_Internal_Name): Refined to consider wide
3771 strings in brackets notation and character literals not to be
3773 * sem_ch8.adb (Find_Selected_Component): Give additional error
3774 when selector name is a subprogram whose first parameter has
3775 the same type as the prefix, but that type is untagged.
3777 2015-02-20 Robert Dewar <dewar@adacore.com>
3779 * g-allein.ads, g-alveop.adb, g-alveop.ads, opt.ads: Minor reformatting
3781 2015-02-20 Tristan Gingold <gingold@adacore.com>
3783 * opt.ads (GNAT_Mode_Config): New variable.
3784 * opt.adb (Set_Opt_Config_Switches): Consider GNAT_Mode_Config
3785 to set Assertions_Enabled.
3786 * switch-c.adb (Scan_Front_End_Switches): Set GNAT_Mode_Config
3789 2015-02-20 Robert Dewar <dewar@adacore.com>
3791 * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Add an additional
3792 comment regarding the handling of unterminated fixed-point
3794 * s-valuns.ads (Scan_Raw_Unsigned): Add comments
3795 corresponding to those previously added for
3796 System.Val_LLU.Scan_Raw_Long_Long_Unsigned.
3798 2015-02-20 Olivier Hainque <hainque@adacore.com>
3800 * g-allein.ads, g-alveop.ads, g-alveop.adb: Code clean ups.
3802 2015-02-20 Robert Dewar <dewar@adacore.com>
3804 * sem_prag.adb: Minor comment clarification.
3806 2015-02-20 Olivier Hainque <hainque@adacore.com>
3808 * g-allein.ads (vec_ctf, vec_vcsfx, vec_vcfux): Remove.
3809 * g-alleve.ads, g-alleva.adb (vcfux): Likewise.
3810 * g-alveop.ads (vec_vcfsx, vec_vcfux): Just rename the ll versions.
3811 (vec_ctf): Now renamings as well.
3813 2015-02-20 Robert Dewar <dewar@adacore.com>
3815 * switch-c.adb, bindgen.adb: Minor reformatting.
3817 2015-02-20 Ed Schonberg <schonberg@adacore.com>
3819 * sem_prag.adb (Analyze_Pragma, case Type_Invariant):
3820 Invariant'class is allowed on an abstract type.
3822 2015-02-20 Ed Schonberg <schonberg@adacore.com>
3824 * sem_ch3.adb (Access_Definition): If the access definition is
3825 for a protected component and defines an access to protected
3826 subprogram, do not create an itype reference for it because a
3827 full type declaration will be built in order to generate the
3828 proper equivalent type.
3829 (Analyze_Subtype_Declaration): Add information of incomplete
3830 subtypes, for Ada 2012 extended uses of incomplete types.
3832 2015-02-20 Gary Dismukes <dismukes@adacore.com>
3834 * sem_res.adb: Minor reformatting.
3836 2015-02-20 Vincent Celier <celier@adacore.com>
3838 * switch-c.adb (Scan_Front_End_Switches): When comparing runtime
3839 path name for several switches --RTS, use the normalized path
3842 2015-02-20 Vincent Celier <celier@adacore.com>
3844 * bindgen.adb: Minor reformatting and code reorganization.
3846 2015-02-20 Jose Ruiz <ruiz@adacore.com>
3848 * a-stcoed.ads: Add spec for this package (Unimplemented_Unit).
3849 * impunit.adb (Non_Imp_File_Names_12): Mark unit a-stcoed.ads as
3850 defined by Ada 2012.
3852 2015-02-20 Arnaud Charlet <charlet@adacore.com>
3854 * sysdep.c, expect.c, s-oscons-tmplt.c, gsocket.h, adaint.c: Remove
3855 obsolete references to RTX, nucleus, VMS.
3857 2015-02-20 Ed Schonberg <schonberg@adacore.com>
3859 * sem_prag.adb (Fix_Error): For an illegal Type_Invariant'Class
3860 aspect, use name that mentions Class explicitly, rather than
3861 compiler-internal name.
3863 2015-02-20 Robert Dewar <dewar@adacore.com>
3865 * debug.adb: Add documentation for -gnatd.2 (allow statements
3867 * par-ch3.adb (P_Identifier_Declarations): Handle
3868 statement appearing where declaration expected more cleanly.
3869 (Statement_When_Declaration_Expected): Implement debug flag
3872 2015-02-20 Jose Ruiz <ruiz@adacore.com>
3874 * a-dinopr.ads: Add spec for this package (Unimplemented_Unit).
3875 * a-dispat.ads (Yield): Include procedure added in Ada 2012.
3876 * a-dispat.adb (Yield): Implement procedure added in Ada 2012.
3877 * impunit.adb (Non_Imp_File_Names_05): Mark unit a-dinopr.ads as
3878 defined by Ada 2005.
3879 * snames.ads-tmpl (Name_Non_Preemptive_FIFO_Within_Priorities):
3880 This is the correct name for the dispatching policy (FIFO was
3883 2015-02-20 Javier Miranda <miranda@adacore.com>
3885 * sem_res.adb (Resolve_Type_Conversion): If the type of the
3886 operand is the limited-view of a class-wide type then recover
3887 the class-wide type of the non-limited view.
3889 2015-02-20 Arnaud Charlet <charlet@adacore.com>
3891 * gcc-interface/Makefile.in: Remove references to nucleus.
3892 * gcc-interface/decl.c (gnat_to_gnu_entity, case E_Procedure): Set
3893 extern_flag to true for Inline_Always subprograms with
3894 Intrinsic convention.
3896 2015-02-20 Yannick Moy <moy@adacore.com>
3898 * sem_prag.ads: Minor typo in comment.
3900 2015-02-20 Pascal Obry <obry@adacore.com>
3902 * s-osprim-mingw.adb: Fix Get_Base_Time parameter mode.
3904 2015-02-20 Vincent Celier <celier@adacore.com>
3906 * makeutl.adb (Get_Directories.Add_Dir): Add a directory only
3909 2015-02-20 Robert Dewar <dewar@adacore.com>
3911 * sem_eval.ads: Minor reformatting.
3913 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
3915 * freeze.adb (Size_Known): Do not set the packed size for
3916 independent type or component.
3917 (Freeze_Array_Type): Check for Independent[_Components] with packing
3918 or explicit component size clause.
3919 * gnat1drv.adb (Post_Compilation_Validation_Checks): Do the validation
3920 of independence pragmas only for non-GCC back-ends.
3921 * sem_ch13.adb (Initialize): Likewise for the initialization.
3922 * sem_prag.adb (Record_Independence_Check): New procedure to record an
3923 independence check in the table.
3924 (Analyze_Pragma): Use it throughout instead of doing it manually.
3925 * gcc-interface/decl.c (gnat_to_gnu_field): Add support for
3926 independent type or component.
3928 2015-02-20 Thomas Quinot <quinot@adacore.com>
3930 * adaint.c (__gnat_readdir): For Solaris, use 64 bit variants of
3931 struct direct and readdir. This is required for NFS filesystems
3932 mounted from servers that use 64-bit cookies.
3934 2015-02-20 Ed Schonberg <schonberg@adacore.com>
3936 * sem_ch12.adb (Analyze_Subprogram_Instantiaion): New subprogram
3937 Build_Subprogram_Renaming, to create renaming of subprogram
3938 instance in the the declaration of the wrapper package rather
3939 than in its body, so that it is available for analysis of aspects
3940 propagated from generic to instantiation.
3941 (Check_Mismatch): An actual for a formal package that is an
3942 incomplete type matches a formal type that is incomplete.
3943 (Instantiate_Package_Body): Move code that builds subprogram
3944 renaming to Analyze_Subprogram_Instantiation.
3945 (Instantiate_Type): The generated subtype is a limited view if
3946 the actual is a limited view.
3947 (Load_Parent_Of_Generic): Retrieve instance declaration from
3948 its new position within wrapper package.
3950 2015-02-20 Arnaud Charlet <charlet@adacore.com>
3952 * s-parame-vxworks.adb, s-os_lib.ads: Update comments.
3954 2015-02-20 Robert Dewar <dewar@adacore.com>
3956 * s-osinte-vxworks.ads (To_Timespec): Add comment about the
3957 issue of negative arguments.
3959 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
3961 * gnat1drv.adb: Minor consistency fix.
3963 2015-02-20 Pascal Obry <obry@adacore.com>
3965 * s-osprim-mingw.adb (Get_Base_Time): Properly release lock in all
3968 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
3970 * inline.adb (Expand_Inlined_Call): Skip again calls to subprogram
3972 * exp_ch6.adb (Expand_Call): Use back-end inlining
3973 instead of expansion for simple subprogram renamings.
3975 2015-02-20 Robert Dewar <dewar@adacore.com>
3977 * exp_util.adb: Minor reformatting.
3979 2015-02-20 Vincent Celier <celier@adacore.com>
3981 * switch-c.adb (Scan_Front_End_Switches): Do not fail when --RTS=
3982 is specified several times with different values that indicates
3983 the same runtime directory.
3985 2015-02-20 Ed Schonberg <schonberg@adacore.com>
3987 * sem_attr.adb (Check_Not_Incomplete_Type): Clean up code to
3988 handle properly illegal uses of attributes on prefixes on an
3989 incomplete type, both when the type of the prefix is locally
3990 incomplete, and when it is a limited view of a type whose
3991 non-limited view is not available.
3992 (Analyze_Attribute): Add calls to Check_Not_Incomplete_Type for
3993 'Address and others.
3995 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
3997 * exp_ch6.adb: Fix minor typo in comment.
3999 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
4001 * sinfo.ads: Add comment.
4003 2015-02-20 Olivier Hainque <hainque@adacore.com>
4005 * opt.ads: Replace Opt.Suppress_All_Inlining by two separate
4006 flags controlling the actual FE inlining out of pragma Inline
4007 and pragma Inline_Always.
4008 * adabkend.adb (Scan_Compiler_Arguments): Set both flags to True
4009 on -fno-inline, which disables all inlining in compilers with
4010 an Ada back-end and without back-end inlining support.
4011 * back_end.adb (Scan_Back_End_Switches): Set the Inline related
4012 flag to True on -fno-inline and leave Inline_Always alone for
4014 * back_end.ads (Scan_Compiler_Arguments): Adjust spec wrt the
4015 names of the Opt flags it sets.
4016 * gnat1drv.adb (Adjust_Global_Switches): Remove test on
4017 Opt.Suppress_All_Inlining in the Back_End_Inlining computation.
4018 * sem_prag.adb (Make_Inline): Remove early return conditioned
4019 on Opt.Suppress_All_Inlining.
4020 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Use the flags to
4021 disable the calls to Build_Body_To_Inline otherwise triggered
4022 by pragma Inline or Inline_Always. This will prevent actual
4023 front-end inlining of the subprogram on calls.
4025 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
4027 * exp_ch3.adb (Default_Initialize_Object): Call Add_Inlined_Body on the
4028 Abort_Undefer_Direct function.
4029 * exp_ch5.adb (Expand_N_Assignment_Statement): Likewise.
4030 * exp_intr.adb (Expand_Unc_Deallocation): Likewise.
4031 * exp_prag.adb (Expand_Pragma_Abort_Defer): Likewise.
4032 * exp_ch4.adb (Expand_N_Selected_Component): Adjust call to
4034 * exp_ch6.adb (Expand_Call): Adjust calls to Add_Inlined_Body.
4035 Remove call to Register_Backend_Call and move code resetting
4036 Needs_Debug_Info on inlined subprograms to...
4037 * inline.ads (Add_Inlined_Body): Add N parameter.
4038 (Register_Backend_Call): Delete.
4039 * inline.adb (Add_Inlined_Body): ...here and simplify.
4040 Register the call with Backend_Calls directly.
4041 (Register_Backend_Call): Delete.
4042 * s-stalib.ads (Abort_Undefer_Direct): Restore pragma Inline.
4044 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
4046 * s-stalib.ads: Fix typo.
4048 2015-02-20 Ed Schonberg <schonberg@adacore.com>
4050 * exp_ch3.adb (Default_Initialize_Object): If the object has a
4051 delayed freeze, the actions associated with default initialization
4052 must be part of the freeze actions, rather that being inserted
4053 directly after the object declaration.
4055 2015-02-20 Robert Dewar <dewar@adacore.com>
4057 * lib-load.adb: Minor comment update.
4059 2015-02-20 Vincent Celier <celier@adacore.com>
4061 * prj-proc.adb (Process_Case_Construction): When there are
4062 incomplete withed projects and the case variable is unknown,
4063 skip the case construction.
4065 2015-02-20 Ed Schonberg <schonberg@adacore.com>
4067 * exp_ch6.adb (Expand_Actuals): Add caller-side invariant checks
4068 when an actual is a view conversion, either because the call is
4069 to an inherited operation, or because the actual is an explicit
4070 type conversion to an ancestor type. Fixes ACATS 4.0D: C732001
4072 2015-02-20 Robert Dewar <dewar@adacore.com>
4074 * einfo.ads: Minor comment updates Fix missing pragma Inline
4075 for Set_Partial_View_Has_Unknown_Discr.
4076 * einfo.adb (Write_Entity_Flags): Add missing entry for
4077 Partial_View_Has_Unknown_Discr.
4078 * sem_ch3.adb: Minor reformatting.
4080 2015-02-20 Vincent Celier <celier@adacore.com>
4082 * opt.ads: Minor cleanup: remove mention of gprmake.
4083 * s-stalib.ads (Abort_Undefer_Direct): Do not inline.
4084 * s-tataat.adb: Do not call System.Tasking.Self but directly
4085 System.Task_Primitives.Operations.Self.
4087 2015-02-20 Arnaud Charlet <charlet@adacore.com>
4089 * gnat_rm.texi, gnat_ugn.texi: Now automatically generated from
4090 sphinx in the doc directory.
4091 * doc: New directory containing sphinx versions of gnat_rm and gnat_ugn
4093 2015-02-20 Robert Dewar <dewar@adacore.com>
4095 * sem_res.adb: Minor reformatting.
4096 * exp_ch9.adb (Build_Protected_Spec): Copy Aliased setting when
4098 * sem_ch13.adb (Analyze_Aspect_Specifications): Exclude Boolean
4099 aspects from circuitry setting delay required to false if the
4100 argument is an integer literal.
4102 2015-02-20 Ed Schonberg <schonberg@adacore.com>
4104 * einfo.ads. einfo.adb (Partial_View_Has_Unknown_Discr): New flag
4105 on type entities, to enforce AI12-0133: default initialization
4106 of types whose partial view has unknown discriminants does not
4107 get an invariant check, because clients of the unit can never
4108 declare objects of such types.
4109 * sem_ch3.adb (Find_Type_Name); Set new flag
4110 Partial_View_Has_Unknown_Discr when needed.
4111 * exp_ch3.adb (Expand_N_Object_Declaration): Use flag to suppress
4112 generation of invariant call on default-initialized object.
4114 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
4116 * gcc-interface/decl.c (gnat_to_gnu_param): Do not strip the padding
4117 if the parameter either is passed by reference or if the alignment
4120 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
4122 * gcc-interface/decl.c (is_cplusplus_method): Use Is_Primitive flag to
4123 detect primitive operations of tagged and untagged types.
4125 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
4127 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not bother about alias
4128 sets in presence of derivation for subprogram types.
4130 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
4132 * gcc-interface/utils.c (begin_subprog_body): Assert that the body is
4133 present in the same context as the declaration.
4135 2015-02-07 Jakub Jelinek <jakub@redhat.com>
4138 * gcc-interface/trans.c (gigi): Recreate optimization_default_node
4139 and optimization_current_node after tweaking global_options.
4141 2015-02-05 Robert Dewar <dewar@adacore.com>
4143 * prj-proc.adb, sem_aux.adb, exp_ch9.adb, errout.adb, prj-dect.adb,
4144 prj-nmsc.adb: Minor reformatting.
4146 2015-02-05 Ed Schonberg <schonberg@adacore.com>
4148 * sem_type.adb (Covers): In ASIS_Mode the Corresponding_Record
4149 of a protected type may not be available, so to check conformance
4150 with an interface type, examine the interface list in the type
4151 declaration directly.
4152 (Write_Overloads): Improve information for indirect calls,
4155 2015-02-05 Ed Schonberg <schonberg@adacore.com>
4157 * exp_ch3.adb (Make_Tag_Assignment): Do not perform this
4158 expansion activity in ASIS mode.
4160 2015-02-05 Javier Miranda <miranda@adacore.com>
4162 * errout.adb (Error_Msg_PT): Add missing error.
4163 * sem_ch6.adb (Check_Synchronized_Overriding): Check the missing
4164 RM rule. Code cleanup.
4165 * exp_ch9.adb (Build_Wrapper_Spec): Propagate "constant" in
4166 anonymous access types. Found working on the tests. Code cleanup.
4168 2015-02-05 Vincent Celier <celier@adacore.com>
4170 * prj-dect.adb (Parse_Attribute_Declaration): Continue scanning
4171 when there are incomplete withs.
4172 * prj-nmsc.adb (Process_Naming): Do not try to get the value
4173 of an element when it is nil.
4174 (Check_Naming): Do not check a nil suffix for illegality
4175 * prj-proc.adb (Expression): Do not process an empty term.
4176 * prj-strt.adb (Attribute_Reference): If attribute cannot be
4177 found, parse a possible index to avoid cascading errors.
4179 2015-02-05 Ed Schonberg <schonberg@adacore.com>
4181 * sem_aux.adb (Is_Derived_Type): A subprogram_type generated
4182 for an access_to_subprogram declaration is not a derived type.
4184 2015-02-05 Robert Dewar <dewar@adacore.com>
4186 * errout.adb (Error_Msg_Internal): For non-serious error set
4187 Fatal_Error to Ignored.
4188 * lib-load.adb (Load_Unit): Minor comment updates.
4189 * sem_ch10.adb (Analyze_With_Clause): Propagate Fatal_Error
4190 setting from with'ed unit to with'ing unit.
4191 * sem_prag.adb (Analyze_Pragma, case Warnings): Document handling
4194 2015-02-05 Yannick Moy <moy@adacore.com>
4196 * sem_prag.adb, par-prag.adb: Minor code clean up.
4198 2015-02-05 Yannick Moy <moy@adacore.com>
4200 * par-prag.adb (Pragma_Warnings): Update for extended form
4201 of pragma Warnings. The "one" argument case may now have 2 or
4203 * sem_prag.adb (Analyze_Pragma/Pragma_Warnings): Update for
4204 extended form of pragma Warnings. Pragma with tool name is either
4205 rewritten as null or as an equivalent form without tool name,
4207 * snames.ads-tmpl (Name_Gnatprove): New name.
4209 2015-02-05 Robert Dewar <dewar@adacore.com>
4211 * sem_ch13.adb (Add_Invariants): Don't assume invariant is
4213 * sem_prag.adb (Analyze_Pragma, case Check): Don't assume
4214 condition is standard Boolean, it can be non-standard derived
4217 2015-02-05 Robert Dewar <dewar@adacore.com>
4219 * checks.adb (Enable_Range_Check): Disconnect attempted
4220 optimization for the case of range check for subscript of
4221 unconstrained array.
4223 2015-02-05 Robert Dewar <dewar@adacore.com>
4225 * par-ch13.adb (With_Present): New function
4226 (Aspect_Specifications_Present): Handle WHEN in place of WITH
4227 (Get_Aspect_Specifications): Comment update.
4228 * par.adb: Comment updates.
4230 2015-02-05 Robert Dewar <dewar@adacore.com>
4232 * errout.adb (Handle_Serious_Error): New setting of Fatal_Error.
4233 * frontend.adb (Frontend): New setting of Fatal_Error.
4234 * lib-load.adb (Create_Dummy_Package_Unit): New setting of
4236 (Load_Main_Source): New setting of Fatal_Error
4237 (Load_Unit): New setting of Fatal_Error.
4238 * lib-writ.adb (Add_Preprocessing_Dependency): New setting of
4240 (Ensure_System_Dependency): New setting of Fatal_Error.
4241 * lib.adb (Fatal_Error): New setting of Fatal_Error
4242 (Set_Fatal_Error): New setting of Fatal_Error.
4243 * lib.ads: New definition of Fatal_Error and associated routines.
4244 * par-ch10.adb (P_Compilation_Unit): New setting of Fatal_Error.
4245 * par-load.adb (Load): New setting of Fatal_Error.
4246 * rtsfind.adb (Load_RTU): New setting of Fatal_Error.
4247 * sem_ch10.adb (Analyze_Compilation_Unit): New setting of
4249 (Optional_Subunit): New setting of Fatal_Error.
4250 (Analyze_Proper_Body): New setting of Fatal_Error.
4251 (Load_Needed_Body): New setting of Fatal_Error.
4253 2015-02-05 Ed Schonberg <schonberg@adacore.com>
4255 * sem_res.adb (Resolve_Call): If the function being called has
4256 out parameters do not check for language version if the function
4257 comes from a predefined unit, as those are always compiled in
4260 2015-02-05 Ed Schonberg <schonberg@adacore.com>
4262 * sem_ch3.adb (Process_Full_View): Verify that the full view
4263 of a type extension must carry an explicit limited keyword if
4264 the partial view does (RM 7.3 (10.1)).
4266 2015-02-05 Robert Dewar <dewar@adacore.com>
4268 * g-rannum.adb, g-rannum.ads, s-rannum.adb, s-rannum.ads,
4269 sem_warn.ads: Minor reformatting.
4270 * exp_ch13.adb (Expand_N_Freeze_Entity): Add guard for aspect
4272 * sem_prag.adb (Analyze_Pragma, case Type_Invariant): Give
4273 error for abstract type.
4275 2015-02-05 Yannick Moy <moy@adacore.com>
4277 * opt.ads (Warn_On_Suspicious_Contract): Update comment
4279 * sem_attr.adb (Analyze_Attribute/Attribute_Update): Warn on
4280 suspicious uses of 'Update.
4281 * sem_warn.adb, sem_warn.ads (Warn_On_Suspicious_Update): New
4282 function issues warning on suspicious uses of 'Update.
4283 * g-rannum.adb, g-rannum.ads, s-rannum.adb, s-rannum.ads: Mark
4284 package spec and body as SPARK_Mode Off.
4286 2015-02-05 Robert Dewar <dewar@adacore.com>
4288 * sem_prag.adb (Set_Elab_Unit_Name): New name for Set_Unit_Name
4289 (Analyze_Pragma): Change Set_Unit_Name to Set_Elab_Unit_Name
4290 (Set_Elab_Unit_Name): Generate reference for Elaborate[_All]
4291 * sem_warn.adb (Warn_On_Unreferenced_Entity): Suppress warning
4292 for exported entity.
4294 2015-02-05 Hristian Kirtchev <kirtchev@adacore.com>
4296 * sem_prag.adb (Check_Pragma_Conformance): Add
4297 local variable Arg. Ensure that all errors are associated with
4298 the pragma if it appears without an argument. Add comments on
4301 2015-02-05 Robert Dewar <dewar@adacore.com>
4303 * lib-xref.adb: Minor reformatting.
4305 2015-02-05 Tristan Gingold <gingold@adacore.com>
4308 * env.c: Fix thinko: handle Darwin case before default one.
4310 2015-01-30 Robert Dewar <dewar@adacore.com>
4312 * a-assert.adb: Minor reformatting.
4313 * sem_ch13.adb: Minor comment clarification.
4314 * types.ads: Minor comment update.
4315 * sem_eval.adb (Real_Or_String_Static_Predicate_Matches): Avoid blow up
4316 when we have a predicate that is nothing but an inherited dynamic
4319 2015-01-30 Jerome Guitton <guitton@adacore.com>
4321 * gcc-interface/Makefile.in (x86-vxworks): Update GCC_SPEC_FILES to
4322 include cert link spec.
4324 2015-01-30 Robert Dewar <dewar@adacore.com>
4326 * einfo.ads: Minor comment fix.
4327 * freeze.adb (Freeze_Profile): Add test for suspicious import
4329 * sem_prag.adb (Process_Import_Or_Interface): Test for suspicious
4330 use in Pure unit is now moved to Freeze (to properly catch
4331 Pure_Function exemption).
4333 2015-01-30 Bob Duff <duff@adacore.com>
4335 * sem_res.ads: Minor comment fix.
4336 * sem_type.adb: sem_type.adb (Remove_Conversions): Need to
4337 check both operands of an operator.
4339 2015-01-30 Yannick Moy <moy@adacore.com>
4341 * a-assert.ads, a-assert.adb: Mark package spec in SPARK. Set assertion
4342 policy for Pre to Ignore.
4343 (Assert): Add precondition.
4345 2015-01-30 Robert Dewar <dewar@adacore.com>
4347 * sem_prag.adb (Process_Import_Or_Interface): Warn if used in
4349 * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Clarify
4350 documentation for some special cases of invalid attempts at
4353 2015-01-30 Gary Dismukes <dismukes@adacore.com>
4355 * errout.ads: Minor reformatting.
4357 2015-01-30 Yannick Moy <moy@adacore.com>
4359 * inline.adb (Process_Formals): Use the sloc of
4360 the inlined node instead of the sloc of the actual parameter,
4361 when replacing formal parameters by the actual one.
4363 2015-01-30 Arnaud Charlet <charlet@adacore.com>
4365 * g-expect.adb (Get_Command_Output): Use infinite timeout when
4368 2015-01-30 Ed Schonberg <schonberg@adacore.com>
4370 * sem_ch12.adb (Analyze_Associations): If an in-parameter is
4371 defaulted in an instantiation, add an entry in the list of actuals
4372 to indicate the default value of the formal (as is already done
4373 for defaulted subprograms).
4375 2015-01-30 Javier Miranda <miranda@adacore.com>
4377 * errout.adb (Error_Msg_PT): Minor error phrasing update.
4379 2015-01-30 Robert Dewar <dewar@adacore.com>
4381 * sem_warn.adb (Warn_On_Known_Condition): Improve error message
4384 2015-01-30 Pierre-Marie de Rodat <derodat@adacore.com>
4386 * exp_dbug.adb (Get_Encoded_Name): When
4387 -fgnat-encodings=minimal, do not generate names for biased types.
4389 2015-01-30 Tristan Gingold <gingold@adacore.com>
4392 * env.c: Move vxworks and darwin includes out of #ifdef IN_RTS.
4394 2015-01-30 Gary Dismukes <dismukes@adacore.com>
4396 * freeze.adb: Minor reformatting.
4398 2015-01-30 Javier Miranda <miranda@adacore.com>
4400 * errout.ads (Error_Msg_PT): Replace Node_Id by Entity_Id and
4401 improve its documentation.
4402 * errout.adb (Error_Msg_PT): Improve the error message.
4403 * sem_ch6.adb (Check_Conformance): Update call to Error_Msg_PT.
4404 (Check_Synchronized_Overriding): Update call to Error_Msg_PT.
4405 * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup.
4407 2015-01-30 Robert Dewar <dewar@adacore.com>
4409 * sem_warn.adb (Warn_On_Known_Condition): Do special casing of
4410 message for False case.
4412 2015-01-30 Doug Rupp <rupp@adacore.com>
4414 * s-vxwext-kernel.ads (Task_Cont): Remove imported subprogram body.
4415 * s-vxwext-kernel.adb (Task_Cont): New subpprogram body specialized for
4418 2015-01-30 Gary Dismukes <dismukes@adacore.com>
4420 * sem_attr.adb (Declared_Within_Generic_Unit):
4421 New function to test whether an entity is declared within the
4422 declarative region of a given generic unit.
4423 (Resolve_Attribute): For checking legality of subprogram'Access within
4424 a generic unit, call new Boolean function Declared_Within_Generic_Unit
4425 instead of simply comparing the results of Enclosing_Generic_Unit on
4426 the prefix and access type. Correct minor comment typos.
4428 2015-01-30 Robert Dewar <dewar@adacore.com>
4430 * freeze.adb, exp_util.ads: Update comment.
4431 * exp_util.adb, exp_ch3.adb: Minor code reorganization and reformatting.
4432 * sem_util.adb: Minor: fix typo.
4434 2015-01-30 Hristian Kirtchev <kirtchev@adacore.com>
4436 * sem_attr.adb (Analyze_Attribute): Ensure that
4437 the check concerning Refined_Post takes precedence over the
4440 2015-01-30 Gary Dismukes <dismukes@adacore.com>
4442 * sem_prag.adb: Minor typo fixes and reformatting.
4444 2015-01-30 Yannick Moy <moy@adacore.com>
4446 * sem_attr.adb: Code clean up.
4448 2015-01-30 Robert Dewar <dewar@adacore.com>
4450 * ali.adb (Scan_ALI): Set Serious_Errors flag in Unit record.
4451 * ali.ads (Unit_Record): Add new field Serious_Errors.
4452 * lib-writ.adb (Write_Unit_Information): Set SE (serious errors)
4453 attribute in U line.
4454 * lib-writ.ads: New attribute SE (serious erors) in unit line.
4456 2015-01-30 Hristian Kirtchev <kirtchev@adacore.com>
4458 * einfo.adb Update the usage of attributes Entry_Bodies_Array,
4459 Lit_Indexes, Scale_Value, Storage_Size_Variable,
4460 String_Literal_Low_Bound along associated routines and
4462 (Pending_Access_Types): New routine.
4463 (Set_Pending_Access_Types): New routine.
4464 (Write_Field15_Name): Add an entry for Pending_Access_Types.
4465 * einfo.ads Add new attribute Pending_Access_Types along
4466 with usage in nodes. Update the usage of attributes
4467 Entry_Bodies_Array, Lit_Indexes, Scale_Value,
4468 Storage_Size_Variable, String_Literal_Low_Bound.
4469 (Pending_Access_Types): New routine along with pragma Inline.
4470 (Set_Pending_Access_Types): New routine along with pragma Inline.
4471 * exp_ch3.adb (Expand_Freeze_Array_Type): Add new local variable
4472 Ins_Node. Determine the insertion node for anonynous access type
4473 that acts as a component type of an array. Update the call to
4474 Build_Finalization_Master.
4475 (Expand_Freeze_Record_Type): Update
4476 the calls to Build_Finalization_Master.
4477 (Freeze_Type): Remove
4478 local variable RACW_Seen. Factor out the code that deals with
4479 remote access-to-class-wide types. Create a finalization master
4480 when the designated type contains a private component. Fully
4481 initialize all pending access types.
4482 (Process_RACW_Types): New routine.
4483 (Process_Pending_Access_Types): New routine.
4484 * exp_ch4.adb (Expand_Allocator_Expression): Allocation no longer
4485 needs to set primitive Finalize_Address.
4486 (Expand_N_Allocator): Allocation no longer sets primitive
4488 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
4489 Update the call to Build_Finalization_Master.
4490 (Make_Build_In_Place_Call_In_Allocator): Allocation no longer
4491 needs to set primitive Finalize_Address.
4492 * exp_ch7.adb (Add_Pending_Access_Type): New routine.
4493 (Build_Finalization_Master): New parameter profile. Associate
4494 primitive Finalize_Address with the finalization master if the
4495 designated type has been frozen, otherwise treat the access
4496 type as pending. Simplify the insertion of the master and
4497 related initialization code.
4498 (Make_Finalize_Address_Body): Allow Finalize_Address for class-wide
4500 (Make_Set_Finalize_Address_Call): Remove forlam parameter Typ.
4501 Simplify the implementation.
4502 * exp_ch7.ads (Build_Finalization_Master): New parameter profile
4503 along with comment on usage.
4504 (Make_Set_Finalize_Address_Call): Remove formal parameter Typ. Update
4505 the comment on usage.
4506 * exp_util.adb (Build_Allocate_Deallocate_Proc): Use routine
4507 Finalize_Address to retrieve the primitive.
4508 (Finalize_Address): New routine.
4509 (Find_Finalize_Address): Removed.
4510 * exp_util.ads (Finalize_Address): New routine.
4511 * freeze.adb (Freeze_All): Remove the generation of finalization
4513 * sem_ch3.adb (Analyze_Full_Type_Declaration): Propagate any
4514 pending access types from the partial to the full view.
4516 2015-01-30 Robert Dewar <dewar@adacore.com>
4518 * sem_disp.adb: Minor reformatting.
4519 * sem_disp.ads: Documentation update.
4521 2015-01-30 Ed Schonberg <schonberg@adacore.com>
4523 * sem_disp.adb (Is_Dynamically_Tagged): when applied to an entity
4524 or a function call, return True if type is class-wide.
4525 * sem_res.adb (Resolve_Case_Expression, Resolve_If_Expression);
4526 Apply RM 4.5.7 (17/3): all or none of the dependent expression
4527 of a conditional expression must be dynamically tagged.
4529 2015-01-30 Ed Schonberg <schonberg@adacore.com>
4531 * sem_ch6.adb (Analyze_Function_Return): In an extended return
4532 statement, apply accessibility check to result object when there
4533 is no initializing expression (Ada 2012 RM 6.5 (5.4/3))
4535 2015-01-30 Robert Dewar <dewar@adacore.com>
4537 * sem_ch4.adb (Analyze_If_Expression): Allow for non-standard
4538 Boolean for case where ELSE is omitted.
4539 * sem_res.adb: Minor reformatting.
4541 2015-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
4543 Fix build under cygwin/64.
4544 * adaint.h: Add check for __CYGWIN__.
4545 * mingw32.h: Prevent windows.h from including x86intrin.h in GCC.
4547 2015-01-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
4550 * adaint.c: Handle __CYGWIN__ like __MINGW32__ here.
4551 * mingw32.h: Don't include <tchar.h> under cygwin.
4552 (_O_U8TEXT, _O_U16TEXT, _O_WTEXT): Set to _O_TEXT if not yet defined.
4554 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
4556 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8)
4557 (DEF_FUNCTION_TYPE_VAR_12): New macros.
4559 2015-01-09 Michael Collison <michael.collison@linaro.org>
4561 * gcc-interface/cuintp.c: Include hash-set.h, machmode.h,
4562 vec.h, double-int.h, input.h, alias.h, symtab.h,
4563 fold-const.h, wide-int.h, and inchash.h due to
4564 flattening of tree.h.
4565 * gcc-interface/decl.c: Ditto.
4566 * gcc-interface/misc.c: Ditto.
4567 * gcc-interface/targtyps.c: Include hash-set.h, machmode.h,
4568 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h,
4569 fold-const.h, wide-int.h, and inchash.h due to
4570 flattening of tree.h.
4571 * gcc-interface/trans.c: Include hash-set.h, machmode.h,
4572 vec.h, double-int.h, input.h, alias.h, symtab.h, real.h,
4573 fold-const.h, wide-int.h, inchash.h due to
4574 flattening of tree.h.
4575 * gcc-interface/utils.c: Include hash-set.h, machmode.h,
4576 vec.h, double-int.h, input.h, alias.h, symtab.h,
4577 fold-const.h, wide-int.h, and inchash.h due to
4578 flattening of tree.h.
4579 * gcc-interface/utils2.c: Ditto.
4581 2015-01-07 Robert Dewar <dewar@adacore.com>
4583 * sem_warn.adb (Check_One_Unit): Don't give unused entities
4584 warning for a package which is used as a generic parameter.
4586 2015-01-07 Bob Duff <duff@adacore.com>
4588 * usage.adb (Usage): Correct documentation of
4591 2015-01-07 Robert Dewar <dewar@adacore.com>
4593 * s-fileio.adb: Minor reformatting.
4595 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4597 * sem_ch12.adb (Instantiate_Object): If formal is an anonymous
4598 access to subprogram, replace its formals with new entities when
4599 building the object declaration, both if actual is present and
4600 when it is defaulted.
4602 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4604 * sem_ch5.adb (Analyze_Assignment): If left-hand side is a view
4605 conversion and type of expression has invariant, apply invariant
4606 check on expression.
4608 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4610 * sem_ch3.adb (Create_Constrained_Components): A call to
4611 Gather_Components may detect an error if an inherited discriminant
4612 that controls a variant is non-static.
4613 * sem_aggr.adb (Resolve_Record_Aggregate, Step 5): The call to
4614 Gather_Components may report an error if an inherited discriminant
4615 in a variant in non-static.
4616 * sem_util.adb (Gather_Components): If a non-static discriminant
4617 is inherited do not report error here, but let caller handle it.
4618 (Find_Actual): Small optimization.
4620 2015-01-07 Bob Duff <duff@adacore.com>
4622 * usage.adb (Usage): Document -gnatw.f switch.
4624 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4626 * sem_ch12.adb: Code clean up and minor reformatting.
4628 2015-01-07 Robert Dewar <dewar@adacore.com>
4630 * exp_ch4.adb (Expand_N_Type_Conversion): Add guard for
4631 Raise_Accessibility_Error call.
4632 * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Add documentation
4633 on handling of invalid digits in based constants.
4634 * s-fatgen.ads: Minor reformatting.
4635 * sem_attr.adb (Analyze_Attribute, case Unrestricted_Access):
4636 Avoid noting bogus modification for Valid test.
4637 * snames.ads-tmpl (Name_Attr_Long_Float): New Name.
4638 * einfo.ads: Minor reformatting.
4639 * sem_warn.adb: Minor comment clarification.
4640 * sem_ch12.adb: Minor reformatting.
4642 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4644 * exp_ch5.adb (Expand_Predicated_Loop): Handle properly loops
4645 over static predicates when the loop parameter specification
4646 carries a Reverse indicator.
4648 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4650 * sem_ch12.adb (Instantiate_Object): If formal has a default,
4651 actual is missing and formal has an anonymous access type, copy
4652 access definition in full so that tree for instance is properly
4653 formatted for ASIS use.
4655 2015-01-07 Bob Duff <duff@adacore.com>
4657 * sem_elab.adb (Check_Internal_Call_Continue): Give a warning
4658 for P'Access, where P is a subprogram in the same package as
4659 the P'Access, and the P'Access is evaluated at elaboration
4660 time, and occurs before the body of P. For example, "X : T :=
4661 P'Access;" would allow a subsequent call to X.all to be an
4662 access-before-elaboration error; hence the warning. This warning
4663 is enabled by the -gnatw.f switch.
4664 * opt.ads (Warn_On_Elab_Access): New flag for warning switch.
4665 * warnsw.adb (Set_Dot_Warning_Switch): Set Warn_On_Elab_Access.
4666 * gnat_ugn.texi: Document the new warning.
4668 2015-01-07 Johannes Kanig <kanig@adacore.com>
4670 * lib-xref-spark_specific.adb (Collect_SPARK_Xrefs): Skip unneeded
4673 2015-01-07 Robert Dewar <dewar@adacore.com>
4675 * s-taprop-linux.adb, clean.adb: Minor reformatting.
4677 2015-01-07 Arnaud Charlet <charlet@adacore.com>
4679 * s-tassta.adb: Relax some overzealous assertions.
4681 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4683 * sem_ch6.adb (Analyze_Return_Type): An call that returns a limited
4684 view of a type is legal when context is a thunk generated for
4685 operation inherited from an interface.
4686 * exp_ch6.adb (Expand_Simple_Function_Return): If context is
4687 a thunk and return type is an incomplete type do not continue
4688 expansion; thunk will be fully elaborated when generating code.
4690 2015-01-07 Doug Rupp <rupp@adacore.com>
4692 * s-osinte-mingw.ads (LARGE_INTEGR): New subtype.
4693 (QueryPerformanceFrequency): New imported procedure.
4694 * s-taprop-mingw.adb (RT_Resolution): Call above and return
4695 resolution vice a hardcoded value.
4696 * s-taprop-solaris.adb (RT_Resolution): Call clock_getres and return
4697 resolution vice a hardcoded value.
4698 * s-linux-android.ads (clockid_t): New subtype.
4699 * s-osinte-aix.ads (clock_getres): New imported subprogram.
4700 * s-osinte-android.ads (clock_getres): Likewise.
4701 * s-osinte-freebsd.ads (clock_getres): Likewise.
4702 * s-osinte-solaris-posix.ads (clock_getres): Likewise.
4703 * s-osinte-darwin.ads (clock_getres): New subprogram.
4704 * s-osinte-darwin.adb (clock_getres): New subprogram.
4705 * thread.c (__gnat_clock_get_res) [__APPLE__]: New function.
4706 * s-taprop-posix.adb (RT_Resolution): Call clock_getres to
4707 calculate resolution vice hard coded value.
4709 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4711 * exp_util.adb (Make_CW_Equivalent_Type): If root type is a
4712 limited view, use non-limited view when available to create
4713 equivalent record type.
4715 2015-01-07 Vincent Celier <celier@adacore.com>
4717 * gnatcmd.adb: Remove command Sync and any data and processing
4718 related to this command. Remove project processing for gnatstack.
4719 * prj-attr.adb: Remove package Synchonize and its attributes.
4721 2015-01-07 Vincent Celier <celier@adacore.com>
4723 * clean.adb: Minor error message change.
4725 2015-01-07 Tristan Gingold <gingold@adacore.com>
4728 * env.c (__gnat_environ): Adjust for darwin9/darwin10.
4730 2015-01-07 Javier Miranda <miranda@adacore.com>
4732 * sem_ch10.adb (Analyze_With_Clause): Compiling under -gnatq
4733 protect the frontend against never ending recursion caused by
4734 circularities in the sources.
4736 2015-01-07 Robert Dewar <dewar@adacore.com>
4738 * a-reatim.adb, make.adb, exp_pakd.adb, i-cpoint.adb, sem_ch8.adb,
4739 exp_ch3.adb: Minor reformatting.
4741 2015-01-07 Doug Rupp <rupp@adacore.com>
4743 * s-linux.ads (clockid_t): New subtype.
4744 * s-osinte-linux.ads (pragma Linker Options): Add -lrt.
4745 (clockid_t): New subtype.
4746 (clock_getres): Import system call.
4747 * s-taprop-linux.adb (System.OS_Constants): With and rename.
4748 (RT_Resolution): Remove
4749 hardcoded value and call clock_getres.
4750 * s-linux-sparc.ads, s-linux-mipsel.ads, s-linux-hppa.ads,
4751 s-linux-alpha.ads, s-linux-x32.ads (clockid_t): Add new subtype.
4753 2015-01-07 Robert Dewar <dewar@adacore.com>
4755 * sem_warn.adb (Check_One_Unit): Guard against context item
4756 with no Entity field.
4758 2015-01-07 Vincent Celier <celier@adacore.com>
4760 * clean.adb (Gnatclean): Warn that 'gnatclean -P' is obsolete.
4761 * make.adb (Initialize): Warn that 'gnatmake -P' is obsolete.
4763 2015-01-07 Vincent Celier <celier@adacore.com>
4765 * prj-conf.adb (Parse_Project_And_Apply_Config): Always finalize
4766 errors/warnings in the first parsing of the project files,
4767 to display the warnings when there is no errors.
4769 2015-01-07 Tristan Gingold <gingold@adacore.com>
4771 * i-cpoint.adb (Copy_Terminated_Array): Nicely handle null target.
4773 2015-01-07 Doug Rupp <rupp@adacore.com>
4775 * s-taprop-vxworks.adb (Stop_All_Tasks): Pass return
4776 value from Int_Lock as parameter to Int_Unlock.
4777 * s-osinte-vxworks.ads (Int_Unlock): Add parameter.
4778 * s-vxwext.ads (Int_Unlock): Likewise.
4779 * s-vxwext-kernel.adb (intUnlock, Int_Unlock): Likewise.
4780 * s-vxwext-kernel.ads (Int_Unlock): Likewise.
4781 * s-vxwext-rtp.adb (Int_Unlock): Likewise.
4782 * s-vxwext-rtp.ads (Int_Unlock): Likewise.
4784 2015-01-07 Pierre-Marie de Rodat <derodat@adacore.com>
4786 * exp_pakd.adb: Add a comment in exp_pakd.adb to explain why we
4789 2015-01-07 Tristan Gingold <gingold@adacore.com>
4791 * i-cpoint.adb (Copy_Terminated_Array): Use Copy_Array to
4794 2015-01-07 Eric Botcazou <ebotcazou@adacore.com>
4796 * sem_ch3.adb (Analyze_Full_Type_Declaration): Do not
4797 automatically set No_Strict_Aliasing on access types.
4798 * fe.h (No_Strict_Aliasing_CP): Declare.
4799 * gcc-interface/trans.c (gigi): Force flag_strict_aliasing to 0 if
4800 No_Strict_Aliasing_CP is set.
4802 2015-01-07 Johannes Kanig <kanig@adacore.com>
4804 * sem_ch8.adb (Analyze_Subprogram_Renaming) do
4805 not build function wrapper in gnatprove mode when the package
4806 is externally axiomatized.
4808 2015-01-07 Jose Ruiz <ruiz@adacore.com>
4810 * a-reatim.adb (Time_Of): Reduce the number of spurious overflows in
4811 intermediate computations when the parameters have different signs.
4813 2015-01-07 Javier Miranda <miranda@adacore.com>
4815 * exp_ch3.adb (Build_Init_Procedure): For derived types,
4816 improve the code which takes care of identifying and moving to
4817 the beginning of the init-proc the call to the init-proc of the
4820 2015-01-07 Olivier Hainque <hainque@adacore.com>
4822 * gcc-interface/trans.c (gnat_to_gnu, <N_Expression_With_Action>):
4823 Elaborate the expression as part of the same stmt group as the actions.
4825 2015-01-07 Robert Dewar <dewar@adacore.com>
4827 * sem_ch3.adb: Minor error message change.
4829 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4831 * sem_prag.adb (Analyze_Pragma, case Preelaborable_Initialization):
4832 Following AI05-028, the pragam applies legally to any composite type.
4834 2015-01-07 Arnaud Charlet <charlet@adacore.com>
4836 * s-osinte-vxworks.adb, s-osinte-vxworks.ads
4837 (sigwait, sigwaitinfo): Removed, not needed after all on any
4838 VxWorks configurations.
4840 2015-01-07 Robert Dewar <dewar@adacore.com>
4842 * sem_ch3.adb, freeze.adb, exp_disp.adb: Minor reformatting.
4844 2015-01-07 Javier Miranda <miranda@adacore.com>
4846 * exp_disp.adb (Expand_Interface_Conversion): Adding missing
4847 generation of accessibility check.
4849 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4851 * sem_ch3.adb (Derived_Type_Declaration): In the case of an
4852 illegal completion from a class- wide type, set etype of the
4853 derived type properly to prevent cascaded errors.
4855 2015-01-07 Robert Dewar <dewar@adacore.com>
4857 * prj.ads, i-cpoint.adb, freeze.adb, ghost.adb, prj-err.adb: Minor
4860 2015-01-07 Robert Dewar <dewar@adacore.com>
4862 * restrict.adb (Check_Restriction_No_Use_Of_Attribute):
4864 (OK_No_Use_Of_Entity_Name): New function.
4865 (Set_Restriction_No_Use_Of_Entity): New procedure.
4866 * restrict.ads (Check_Restriction_No_Use_Of_Attribute):
4868 (OK_No_Use_Of_Entity_Name): New function.
4869 (Set_Restriction_No_Use_Of_Entity): New procedure.
4870 * sem_ch8.adb (Find_Direct_Name): Add check for violation of
4872 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
4873 Add processing for new restriction No_Use_Of_Entity.
4875 2015-01-07 Eric Botcazou <ebotcazou@adacore.com>
4877 * freeze.adb (Freeze_Array_Type): Apply same handling to Is_Atomic
4878 component type as to Has_Atomic_Components type. Remove useless
4879 test on Is_Aliased component type.
4881 2015-01-07 Hristian Kirtchev <kirtchev@adacore.com>
4883 * alloc.ads Alphabetize several declarations. Add constants
4884 Ignored_Ghost_Units_Initial and Ignored_Ghost_Units_Increment.
4885 * atree.adb Add with and use clauses for Opt.
4886 (Allocate_Initialize_Node): Mark a node as ignored Ghost
4887 if it is created in an ignored Ghost region.
4888 (Ekind_In): New variant.
4889 (Is_Ignored_Ghost_Node): New routine.
4890 (Set_Is_Ignored_Ghost_Node): New routine.
4891 * atree.adb Aplhabetize several subprograms declarations. Flag
4892 Spare0 is now known as Is_Ignored_Ghost_Node.
4893 (Ekind_In): New variant.
4894 (Is_Ignored_Ghost_Node): New routine.
4895 (Set_Is_Ignored_Ghost_Node): New routine.
4896 * einfo.adb: Flag 279 is now known as Contains_Ignored_Ghost_Code.
4897 (Contains_Ignored_Ghost_Code): New routine.
4898 (Set_Contains_Ignored_Ghost_Code): New routine.
4899 (Set_Is_Checked_Ghost_Entity, Set_Is_Ignored_Ghost_Entity):
4900 It is now possible to set this property on an unanalyzed entity.
4901 (Write_Entity_Flags): Output the status of flag
4902 Contains_Ignored_Ghost_Code.
4903 * einfo.ads New attribute Contains_Ignored_Ghost_Code along with
4905 (Contains_Ignored_Ghost_Code): New routine
4906 along with pragma Inline.
4907 (Set_Contains_Ignored_Ghost_Code): New routine along with pragma Inline.
4908 * exp_ch3.adb Add with and use clauses for Ghost.
4909 (Freeze_Type): Capture/restore the value of Ghost_Mode on entry/exit.
4910 Set the Ghost_Mode in effect.
4911 (Restore_Globals): New routine.
4912 * exp_ch7.adb (Process_Declarations): Do not process a context
4913 that invoves an ignored Ghost entity.
4914 * exp_dbug.adb (Qualify_All_Entity_Names): Skip an ignored Ghost
4915 construct that has been rewritten as a null statement.
4916 * exp_disp.adb Add with and use clauses for Ghost.
4917 (Make_DT): Capture/restore the value of Ghost_Mode on entry/exit. Set
4918 the Ghost_Mode in effect.
4919 (Restore_Globals): New routine.
4920 * exp_util.adb (Requires_Cleanup_Actions): An ignored Ghost entity
4921 does not require any clean up. Add two missing cases that deal
4922 with block statements.
4923 * freeze.adb Add with and use clauses for Ghost.
4924 (Freeze_Entity): Capture/restore the value of Ghost_Mode on entry/exit.
4925 Set the Ghost_Mode in effect.
4926 (Restore_Globals): New routine.
4927 * frontend.adb Add with and use clauses for Ghost. Remove any
4928 ignored Ghost code from all units that qualify.
4929 * ghost.adb New unit.
4930 * ghost.ads New unit.
4931 * gnat1drv.adb Add with clause for Ghost. Initialize and lock
4932 the table in package Ghost.
4933 * lib.ads: Alphabetize several subprogram declarations.
4934 * lib-xref.adb (Output_References): Do not generate reference
4935 information for ignored Ghost entities.
4936 * opt.ads Add new type Ghost_Mode_Type and new global variable
4938 * rtsfind.adb (Load_RTU): Provide a clean environment when
4939 loading a runtime unit.
4940 * sem.adb (Analyze): Capture/restore the value of Ghost_Mode on
4941 entry/exit as the node may set a different mode.
4943 Capture/restore the value of Ghost_Mode on entry/exit as the
4944 unit may be withed from a unit with a different Ghost mode.
4945 * sem_ch3.adb Add with and use clauses for Ghost.
4946 (Analyze_Full_Type_Declaration, Analyze_Incomplete_Type_Decl,
4947 Analyze_Number_Declaration, Analyze_Private_Extension_Declaration,
4948 Analyze_Subtype_Declaration): Set the Ghost_Mode in effect. Mark
4949 the entity as Ghost when there is a Ghost_Mode in effect.
4950 (Array_Type_Declaration): The implicit base type inherits the
4951 "ghostness" from the array type.
4952 (Derive_Subprogram): The
4953 alias inherits the "ghostness" from the parent subprogram.
4954 (Make_Implicit_Base): The implicit base type inherits the
4955 "ghostness" from the parent type.
4956 * sem_ch5.adb Add with and use clauses for Ghost.
4957 (Analyze_Assignment): Set the Ghost_Mode in effect.
4958 * sem_ch6.adb Add with and use clauses for Ghost.
4959 (Analyze_Abstract_Subprogram_Declaration, Analyze_Procedure_Call,
4960 Analyze_Subprogram_Body_Helper, Analyze_Subprogram_Declaration):
4961 Set the Ghost_Mode in effect. Mark the entity as Ghost when
4962 there is a Ghost_Mode in effect.
4963 * sem_ch7.adb Add with and use clauses for Ghost.
4964 (Analyze_Package_Body_Helper, Analyze_Package_Declaration,
4965 Analyze_Private_Type_Declaration): Set the Ghost_Mode in
4966 effect. Mark the entity as Ghost when there is a Ghost_Mode
4968 * sem_ch8.adb Add with and use clauses for Ghost.
4969 (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
4970 Analyze_Object_Renaming, Analyze_Package_Renaming,
4971 Analyze_Subprogram_Renaming): Set the Ghost_Mode in effect. Mark
4972 the entity as Ghost when there is a Ghost_Mode in effect.
4973 (Find_Type): Check the Ghost context of a type.
4974 * sem_ch11.adb Add with and use clauses for Ghost.
4975 (Analyze_Exception_Declaration): Set the Ghost_Mode in
4976 effect. Mark the entity as Ghost when there is a Ghost_Mode
4978 * sem_ch12.adb Add with and use clauses for Ghost.
4979 (Analyze_Generic_Package_Declaration,
4980 Analyze_Generic_Subprogram_Declaration): Set the Ghost_Mode in effect.
4981 Mark the entity as Ghost when there is a Ghost_Mode in effect.
4982 * sem_prag.adb Add with and use clauses for Ghost.
4983 (Analyze_Pragma): Ghost-related checks are triggered when there
4984 is a Ghost mode in effect.
4985 (Create_Abstract_State): Mark the
4986 entity as Ghost when there is a Ghost_Mode in effect.
4987 * sem_res.adb Add with and use clauses for Ghost.
4988 (Check_Ghost_Context): Removed.
4989 * sem_util.adb (Check_Ghost_Completion): Removed.
4990 (Check_Ghost_Derivation): Removed.
4991 (Incomplete_Or_Partial_View):
4992 Add a guard in case the entity has not been analyzed yet
4993 and does carry a scope.
4994 (Is_Declaration): New routine.
4995 (Is_Ghost_Entity): Removed.
4996 (Is_Ghost_Statement_Or_Pragma):
4998 (Is_Subject_To_Ghost): Removed.
4999 (Set_Is_Ghost_Entity):
5001 (Within_Ghost_Scope): Removed.
5002 * sem_util.adb (Check_Ghost_Completion): Removed.
5003 (Check_Ghost_Derivation): Removed.
5004 (Is_Declaration): New routine.
5005 (Is_Ghost_Entity): Removed.
5006 (Is_Ghost_Statement_Or_Pragma): Removed.
5007 (Is_Subject_To_Ghost): Removed.
5008 (Set_Is_Ghost_Entity): Removed.
5009 (Within_Ghost_Scope): Removed.
5010 * sinfo.ads Add a section on Ghost mode.
5011 * treepr.adb (Print_Header_Flag): New routine.
5012 (Print_Node_Header): Factor out code. Output flag
5013 Is_Ignored_Ghost_Node.
5014 * gcc-interface/Make-lang.in: Add dependency for unit Ghost.
5016 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
5018 * freeze.adb (Freeze_Array_Type) <Complain_CS>: Remove always
5019 true test and unreachable 'else' arm.
5021 2015-01-06 Vincent Celier <celier@adacore.com>
5023 * prj-conf.adb (Check_Target): Improve error message when
5024 there are mismatched targets between the on in the configuration
5025 project file and the specified one, either in the main project
5026 file or in the --target= switch.
5028 2015-01-06 Pascal Obry <obry@adacore.com>
5030 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Mode and
5031 Install_Name attribute definitions.
5033 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5035 * freeze.adb (Wrap_Imported_Subprogram): Indicate that the
5036 generated Import pragma for the internal imported procedure does
5037 not come from an aspect, so that Is_Imported can be properly
5040 2015-01-06 Gary Dismukes <dismukes@adacore.com>
5042 * sem_ch12.adb (Might_Inline_Subp): Record whether
5043 any subprograms in the generic package are marked with
5044 pragma Inline_Always (setting flag Has_Inline_Always).
5045 (Analyze_Package_Instantiation): Add test of Has_Inline_Always
5046 alongside existing test of Front_End_Inlining as alternative
5047 conditions for setting Inline_Now. Also add test of
5048 Has_Inline_Always along with Front_End_Inlining test as an
5049 alternative condition for setting Needs_Body to False.
5051 2015-01-06 Tristan Gingold <gingold@adacore.com>
5053 * i-cpoint.adb (Copy_Array): Handle overlap.
5055 2015-01-06 Pascal Obry <obry@adacore.com>
5057 * bindgen.adb: Minor style fix.
5059 2015-01-06 Robert Dewar <dewar@adacore.com>
5061 * sem_util.ads, sem_util.adb: Minor reformatting.
5063 2015-01-06 Vincent Celier <celier@adacore.com>
5065 * prj-conf.adb (Parse_Project_And_Apply_Config): Reset incomplete
5066 with flags before parsing the projects.
5067 * prj-err.adb (Error_Msg): Do nothing if there are incomplete withs.
5068 * prj-part.adb (Post_Parse_Context_Clause): Set Incomplete_Withs
5069 to True in the flags, when Ignore_Missing_With is True and an
5070 imported project cannot be found.
5071 * prj-proc.adb (Expression): When there are incomplete withs and
5072 a variable or attribute is not found, set the variable/attribute
5074 * prj.ads (Processing_Flags): New flag Incomplete_Withs,
5077 2015-01-06 Vasiliy Fofanov <fofanov@adacore.com>
5079 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-conf.adb,
5080 prj-err.adb: Add new switch --no-command-line.
5082 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5084 * sem_ch12.adb: Sloc of wrapper is that of instantiation.
5086 2015-01-06 Robert Dewar <dewar@adacore.com>
5088 * sem_ch11.adb: Minor reformatting.
5090 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5092 * exp_aggr.adb (Get_Assoc_Expr): New routine internal to
5093 Build_Array_Aggr_Code, used to initialized components covered
5094 by a box association. If the component type is scalar and has
5095 a default aspect, use it to initialize such components.
5097 2015-01-06 Pascal Obry <obry@adacore.com>
5099 * rtinit.c (__gnat_runtime_initialize): Add a parameter to
5100 control the setup of the exception handler.
5101 * initialize.c: Remove unused declaration.
5102 * bindgen.adb: Always call __gnat_runtime_initialize and pass
5103 whether the exeception handler must be set or not.
5105 2015-01-06 Thomas Quinot <quinot@adacore.com>
5107 * freeze.adb (Set_SSO_From_Defaults): When setting scalar storage
5108 order to native from default, make sure to also adjust bit order.
5109 * exp_aggr.adb: Minor reformatting.
5111 2015-01-06 Robert Dewar <dewar@adacore.com>
5113 * s-valllu.adb, s-valllu.ads, s-valuti.ads, s-valuns.adb, s-valuns.ads,
5114 s-valrea.adb, s-valrea.ads: Add some additional guards for
5115 Str'Last = Positive'Last.
5117 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5119 * sem_ch12.adb, sem_ch8.adb: Ongoing work for wrappers for actual
5122 2015-01-06 Javier Miranda <miranda@adacore.com>
5124 * exp_disp.adb (Expand_Interface_Conversion): Reapply patch.
5126 2015-01-06 Thomas Quinot <quinot@adacore.com>
5128 * sem_util.ads: Minor reformatting.
5129 * sem_cat.adb (In_RCI_Visible_Declarations): Change back to...
5130 (In_RCI_Declaration) Return to old name, as proper checking of
5131 entity being in the visible part depends on entity kind and must
5132 be done by the caller.
5134 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5136 * sem_ch12.adb, sem_ch12.ads, sem_ch8.adb: Ongoing work for wrappers
5137 for operators in SPARK.
5139 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5141 * sem_aggr.adb (Get_Value): In ASIS mode, preanalyze the
5142 expression in an others association before making copies for
5143 separate resolution and accessibility checks. This ensures that
5144 the type of the expression is available to ASIS in all cases,
5145 in particular if the expression is itself an aggregate.
5147 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
5149 * einfo.ads (Has_Independent_Components): Document extended
5151 * einfo.adb (Has_Independent_Components): Remove obsolete assertion.
5152 (Set_Has_Independent_Components): Adjust assertion.
5153 * sem_prag.adb (Analyze_Pragma): Also set Has_Independent_Components
5154 for pragma Atomic_Components. Set Has_Independent_Components
5155 on the object instead of the type for an object declaration with
5156 pragma Independent_Components.
5158 2015-01-06 Olivier Hainque <hainque@adacore.com>
5160 * set_targ.adb (Read_Target_Dependent_Values): Set
5161 Long_Double_Index when "long double" is read.
5162 (elaboration code): Register_Back_End_Types only when not reading from
5163 config files. Doing otherwise is pointless and error prone.
5165 2015-01-06 Robert Dewar <dewar@adacore.com>
5167 * s-valrea.adb (Value_Real): Check for Str'Last = Positive'Last
5169 2015-01-06 Robert Dewar <dewar@adacore.com>
5171 * a-wtgeau.adb, a-ztgeau.adb, a-tigeau.adb (String_Skip): Raise PE if
5172 Str'Last = Positive'Last.
5174 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5176 * sem_ch6.adb (Matches_Limited_View): Handle properly the case
5177 where the non-limited type is a generic actual and appears as
5178 a subtype of the non-limited view of the other.
5179 * freeze.adb (Build_Renamed_Body): If the return type of the
5180 declaration that is being completed is a limited view and the
5181 non-limited view is available, use it in the specification of
5184 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5186 * sem_ch3.adb (Find_Type_Name): If there is a previous tagged
5187 incomplete view, the type of the classwide type common to both
5188 views is the type being declared.
5190 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
5192 * einfo.ads (Is_Independent): Further document extended usage.
5194 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
5196 * einfo.ads (Is_Independent): Document extended usage.
5197 * einfo.adb (Is_Independent): Remove obsolete assertion.
5198 (Set_Is_Independent): Likewise.
5199 * sem_prag.adb (Process_Atomic_Shared_Volatile): Rename into...
5200 (Process_Atomic_Independent_Shared_Volatile): ...this.
5201 Deal with pragma Independent here.
5202 (Analyze_Pragma): Adjust
5203 to above renaming and also invoke it for pragma Independent.
5204 Adjust comment for Independent_Components.
5206 2015-01-06 Robert Dewar <dewar@adacore.com>
5208 * snames.ads-tmpl: Remove entries for attribute Enum_Image.
5209 * exp_attr.adb: Remove reference to Attribute_Enum_Image.
5211 2015-01-06 Robert Dewar <dewar@adacore.com>
5213 * s-vallli.adb (Value_Long_Long_Integer): Handle case of Str'Last
5215 * s-valllu.adb (Value_Long_Long_Unsigned): Handle case of
5216 Str'Last = Positive'Last.
5218 2015-01-06 Robert Dewar <dewar@adacore.com>
5220 * sem_prag.adb (Process_Inline): Remove redundant construct
5221 warning (-gnatw.r) for an ineffective pragma Inline.
5223 2015-01-06 Robert Dewar <dewar@adacore.com>
5225 * s-valint.adb: Fix typo in last checkin.
5226 * s-valuns.adb (Value_Unsigned): More efficient fix for
5228 * sem_attr.adb (Analyze_Attribute): Minor reformatting
5229 (Eval_Attribute): Static ervaluation of 'Img for enumeration types.
5231 2015-01-06 Robert Dewar <dewar@adacore.com>
5233 * s-valint.adb, s-valuns.adb (Value_Integer): Deal with case where
5234 Str'Last = Positive'Last
5236 2015-01-06 Thomas Quinot <quinot@adacore.com>
5238 * xoscons.adb: Display exception information and return non-zero
5239 exit status in top level exception handler.
5241 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5243 * sem_ch8.adb: Code clean up.
5245 2015-01-06 Tristan Gingold <gingold@adacore.com>
5247 * targparm.ads: Remove obsolete comment.
5249 2015-01-06 Olivier Hainque <hainque@adacore.com>
5251 * gcc-interface/decl.c (gnat_to_gnu_entity, case E_Variable): When
5252 constructing a ref to variable, update inner_const_flag from the
5253 variable TREE_READONLY attribute.
5254 * gcc-interface/targtyps.c (WIDEST_HARDWARE_FP_SIZE): Remove default
5256 (get_target_float_size): Remove.
5257 (get_target_double_size): Remove.
5258 (get_target_long_double_size): Remove.
5260 2015-01-06 Pascal Obry <obry@adacore.com>
5262 * adaint.c (ProcListEvt): Set to NULL.
5263 * rtinit.c: New file.
5264 (__gnat_rt_init_count): New reference counter set to 0.
5265 (__gnat_runtime_initialize): Move code here from __gnat_initialize when
5266 this code is actually needed for the runtime initialization. This
5267 routine returns immediately if the initialization has already been done.
5268 * final.c: Revert previous change.
5269 * rtfinal.c: New file.
5270 (__gnat_runtime_finalize)[Win32]: Add finalization of the critical
5271 section and event. The default version of this routine is empty (except
5272 for the reference counting code). This routine returns immediately if
5273 some others libraries are referencing the runtime.
5274 * bindgen.adb (Gen_Adainit): Generate call to Runtime_Initialize
5275 remove circuitry to initialize the signal handler as this is
5276 now done by the runtime initialization routine.
5277 (Gen_Adafinal): Generate call to Runtime_Finalize.
5278 * gnat_ugn.texi: Update documentation about concurrency and
5279 initialization/finalization of the run-time.
5280 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Add
5281 references to rtfinal.o and rtinit.o
5283 2015-01-06 Robert Dewar <dewar@adacore.com>
5285 * exp_attr.adb (Expand_N_Attribute_Reference): Add dummy entry
5287 * sem_attr.adb: Implement Enum_Image attribute.
5288 * snames.ads-tmpl: Add entries for Enum_Image attribute.
5290 2015-01-06 Robert Dewar <dewar@adacore.com>
5292 * namet.ads: Document use of Boolean2 for No_Use_Of_Entity.
5293 * restrict.ads (No_Use_Of_Entity): New table.
5294 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
5295 Ignore No_Use_Of_Entity (will be processed in parser).
5296 * snames.ads-tmpl: Add entry for Name_No_Use_Of_Entity.
5298 2015-01-06 Vincent Celier <celier@adacore.com>
5300 * prj-tree.adb (Imported_Or_Extended_Project_Of): Do not try
5301 to check for an extended project, if a project does not have
5302 yet a project declaration.
5304 2015-01-06 Pierre-Marie Derodat <derodat@adacore.com>
5306 * scos.ads: Update documentation about the SCO table build
5307 process and about table records format.
5308 * par_sco.ads (SCO_Record): Rename to SCO_Record_Raw.
5309 (SCO_Record_Filtered): New procedure.
5310 (Set_SCO_Logical_Operator): New procedure.
5311 (dsco): Update documentation.
5312 * par_sco.adb: Update library-level comments.
5313 (SCO_Generation_State_Type): New type.
5314 (SCO_Generation_State): New variable.
5315 (SCO_Raw_Table): New package instanciation.
5316 (Condition_Pragma_Hash_Table): Rename to SCO_Raw_Hash_Table.
5318 (Tristate): New type.
5319 (Is_Logical_Operator): Return Tristate and update documentation.
5320 (Has_Decision): Update call to Is_Logical_Operator and complete
5322 (Set_Table_Entry): Rename to Set_Raw_Table_Entry, update
5323 comment, add an assertion for state checking and change
5324 references to SCO_Table into SCO_Raw_Table.
5325 (dsco): Refactor to dump the raw and the filtered tables.
5326 (Process_Decisions.Output_Decision_Operand): Handle putative
5327 short-circuit operators.
5328 (Process_Decisions.Output_Element): Update references
5329 to Set_Table_Entry and to Condition_Pragma_Hash_Table.
5330 (Process_Decisions.Process_Decision_Operand): Update call
5331 to Is_Logical_Operator.
5332 (Process_Decisions.Process_Node): Handle putative short-circuit
5333 operators and change references to
5334 SCO_Table into SCO_Raw_Table.
5335 (SCO_Output): Add an assertion
5336 for state checking and remove code that used to stamp out SCO entries.
5337 (SCO_Pragma_Disabled): Change reference to SCO_Table
5339 (SCO_Record): Rename to SCO_Record_Raw,
5340 add an assertion for state checking and change references
5341 to SCO_Table into SCO_Raw_Table.
5342 (Set_SCO_Condition): Add an assertion for state checking, update
5343 references to Condition_Pragma_Hash_Table and change references to
5344 SCO_Table into SCO_Raw_Table.
5345 (Set_SCO_Pragma_Enabled): Add an assertion for state checking and
5346 change references to SCO_Table into SCO_Raw_Table.
5347 (Set_SCO_Logical_Operator): New procedure.
5348 (Traverse_Declarations_Or_Statements.Set_Statement_Entry): Update
5349 references to Set_Table_Entry and to Condition_Pragma_Hash_Table.
5350 (SCO_Record_Fildered): New procedure.
5351 * gnat1drv.adb (Gnat1drv): Invoke the SCO filtering pass.
5352 * lib-writ.adb (Write_ALI): Invoke the SCO filtering pass and
5354 * par-load.adb (Load): Update reference to SCO_Record.
5355 * par.adb (Par): Update reference to SCO_Record.
5356 * put_scos.adb (Put_SCOs): Add an assertion to check that no
5357 putative SCO condition reaches this end.
5358 * sem_ch10.adb (Analyze_Proper_Body): Update reference to SCO_Record.
5359 * sem_res.adb (Resolve_Logical_Op): Validate putative SCOs
5360 when corresponding to an "and"/"or" operator affected by the
5361 Short_Circuit_And_Or pragma.
5363 2015-01-06 Robert Dewar <dewar@adacore.com>
5365 * sem_ch8.adb (Analyze_Use_Package): Give more specific error
5366 msg for attempted USE of generic subprogram or subprogram.
5368 2015-01-06 Robert Dewar <dewar@adacore.com>
5370 * s-valllu.adb, a-tiinau.adb, a-timoau.adb, a-ztinau.adb, a-ztmoau.adb,
5371 s-valuns.adb, s-valrea.adb, a-wtflau.adb, a-tiflau.adb, a-ztflau.adb,
5372 a-wtinau.adb, a-wtmoau.adb: Document recognition of : in place of #.
5374 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5376 * sem_ch13.adb (Analyze_Aspect_Specifications): For aspects
5377 that specify stream subprograms, if the prefix is a class-wide
5378 type then the generated attribute definition clause must apply
5379 to the same class-wide type.
5380 (Default_Iterator): An iterator defined by an aspect of some
5381 container type T must have a first parameter of type T, T'class,
5382 or an access to such (from code reading RM 5.5.1 (2/3)).
5384 2015-01-06 Arnaud Charlet <charlet@adacore.com>
5386 * gnat1drv.adb: Minor: complete previous change.
5388 2015-01-06 Olivier Hainque <hainque@adacore.com>
5390 * set_targ.ads (C_Type_For): New function. Return the name of
5391 a C type supported by the back-end and suitable as a basis to
5392 construct the standard Ada floating point type identified by
5393 the T parameter. This is used as a common ground to feed both
5394 ttypes values and the GNAT tree nodes for the standard floating
5396 * set_targ.adb (Long_Double_Index): The index at which "long
5397 double" gets registered in the FPT_Mode_Table. This is useful to
5398 know whether we have a "long double" available at all and get at
5399 it's characteristics without having to search the FPT_Mode_Table
5400 when we need to decide which C type should be used as the
5401 basis for Long_Long_Float in Ada.
5402 (Register_Float_Type): Fill Long_Double_Index.
5403 (FPT_Mode_Index_For): New function. Return the index in
5404 FPT_Mode_Table that designates the entry corresponding to the
5405 provided C type name.
5406 (FPT_Mode_Index_For): New function. Return the index in
5407 FPT_Mode_Table that designates the entry for a back-end type
5408 suitable as a basis to construct the standard Ada floating point
5409 type identified by the input T parameter.
5410 (elaboration code): Register_Back_End_Types unconditionally,
5411 so C_Type_For can operate regardless of -gnateT. Do it
5412 early so we can query it for the floating point sizes, via
5413 FPT_Mode_Index_For. Initialize Float_Size, Double_Size and
5414 Long_Double_Size from the FPT_Mode_Table, as cstand will do.
5415 * cstand.adb (Create_Float_Types): Use C_Type_For to determine
5416 which C type should be used as the basis for the construction
5417 of the Standard Ada floating point types.
5418 * get_targ.ads (Get_Float_Size, Get_Double_Size,
5419 Get_Long_Double_Size): Remove.
5420 * get_targ.adb: Likewise.
5422 2015-01-06 Thomas Quinot <quinot@adacore.com>
5424 * sem_cat.adb (In_RCI_Declaration): Remove unnecessary
5425 parameter and rename to...
5426 (In_RCI_Visible_Declarations): Fix handling of private part of nested
5428 (Validate_RCI_Subprogram_Declaration): Reject illegal function
5429 returning anonymous access in RCI unit.
5431 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5433 * sem_ch6.adb (New_Overloaded_Entity): In GNATprove mode, a
5434 function wrapper may be a homonym of another local declaration.
5435 * sem_ch8.adb (Analyze_Subprogram_Renaming): In GNATprove mode,
5436 build function and operator wrappers after the actual subprogram
5437 has been resolved, and replace the standard renaming declaration
5438 with the declaration of wrapper.
5439 * sem_ch12.ads (Build_Function_Wrapper, Build_Operator_Wraooer):
5440 make public for use elsewhere.
5441 * sem_ch12.adb (Build_Function_Wrapper, Build_Operator_Wraooer):
5442 rewrite, now that actual is fully resolved when wrapper is
5445 2015-01-06 Javier Miranda <miranda@adacore.com>
5447 * exp_disp.adb: Revert previous change.
5449 2015-01-06 Robert Dewar <dewar@adacore.com>
5451 * exp_util.adb: Change name Name_Table_Boolean to
5452 Name_Table_Boolean1.
5453 * namet.adb: Change name Name_Table_Boolean to Name_Table_Boolean1
5454 Introduce Name_Table_Boolean2/3.
5455 * namet.ads: Change name Name_Table_Boolean to Name_Table_Boolean1
5456 Introduce Name_Table_Boolean2/3.
5457 * par-ch13.adb: Change name Name_Table_Boolean to
5458 Name_Table_Boolean1.
5460 2015-01-06 Bob Duff <duff@adacore.com>
5462 * gnat_rm.texi: Improve documentation regarding No_Task_Termination.
5464 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5466 * sem_aggr.adb (Resolve_Record_Aggregte, Get_Value): For an
5467 others choice that covers multiple components, analyze each
5468 copy with the type of the component even in compile-only mode,
5469 to detect potential accessibility errors.
5471 2015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
5473 * sem_res.adb (Is_Assignment_Or_Object_Expression): New routine.
5474 (Resolve_Actuals): An effectively volatile out
5475 parameter cannot act as an in or in out actual in a call.
5476 (Resolve_Entity_Name): An effectively volatile out parameter
5479 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5481 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If the body is
5482 the expansion of an expression function it may be pre-analyzed
5483 if a 'access attribute is applied to the function, in which case
5484 last_entity may have been assigned already.
5486 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5488 * sem_ch4.adb (Analyze_One_Call): If formal has an incomplete
5489 type and actual has the corresponding full view, there is no
5490 error, but a case of use of incomplete type in a predicate or
5491 invariant expression.
5493 2015-01-06 Vincent Celier <celier@adacore.com>
5495 * makeutl.adb (Insert_No_Roots): Make sure that the same source
5496 in two different project tree is checked in both trees, if they
5497 are sources of two different projects, extended or not.
5499 2015-01-06 Arnaud Charlet <charlet@adacore.com>
5501 * gnat1drv.adb: Minor code clean up.
5502 (Adjust_Global_Switches): Ignore gnatprove_mode in codepeer_mode.
5504 2015-01-06 Bob Duff <duff@adacore.com>
5506 * osint.adb (Read_Source_File): Don't print out
5507 file name unless T = Source.
5509 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5511 * sem_util.adb (Is_Variable, Is_OK_Variable_For_Out_Formal):
5512 recognize improper uses of constant_reference types as actuals
5513 for in-out parameters.
5514 (Check_Function_Call): Do not collect identifiers if function
5515 name is missing because of previous error.
5517 2015-01-06 Robert Dewar <dewar@adacore.com>
5519 * ali-util.adb, sem_prag.adb, rtsfind.adb, sem_util.adb, sem_res.adb,
5520 ali.adb, binde.adb, namet.adb, namet.ads, gnatls.adb, bcheck.adb:
5521 Minor change of name Name_Table_Info => Name_Table_Int.
5523 2015-01-06 Robert Dewar <dewar@adacore.com>
5525 * exp_strm.adb (Build_Elementary_Input_Call): Clarify comments
5526 in previous checkin.
5527 * freeze.adb (Freeze_Fixed_Point_Type): Add warning for shaving
5529 * sem_prag.adb, sem_ch10.adb, sem_ch6.adb: Minor reformatting.
5531 2015-01-06 Vincent Celier <celier@adacore.com>
5533 * a-strsup.adb (Times (Natural;String;Positive)): Raise
5534 Length_Error, not Index_Error, when the result is too long.
5536 2015-01-06 Thomas Quinot <quinot@adacore.com>
5538 * a-direct.adb (Create_Path): Minor error handling and
5539 performance improvement.
5541 2015-01-06 Robert Dewar <dewar@adacore.com>
5543 * checks.ads, sem_ch12.adb: Minor reformatting.
5544 * exp_ch4.adb (Expand_N_Op_Divide): Generate explicit divide by
5545 zero check for fixed-point case if Backend_Divide_Checks_On_Target
5548 2015-01-06 Robert Dewar <dewar@adacore.com>
5550 * sem_prag.adb (Analyze_Pragma, case No_Elaboration_Code_All):
5551 Do not set restriction No_Elaboration_Code unless the pragma
5552 appears in the main unit).
5554 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5556 * sem_ch10.adb (Is_Regular_With_Clause): Add guard to verify
5557 that with clause has already been analyzed before checking kind
5560 2015-01-06 Robert Dewar <dewar@adacore.com>
5562 * exp_strm.adb (Build_Elementary_Input_Call): Return base type
5563 (as required by RM).
5565 2015-01-06 Arnaud Charlet <charlet@adacore.com>
5567 * a-reatim.adb ("/"): Add explicit pragma Unsuppress (Division_Check).
5569 2015-01-06 Robert Dewar <dewar@adacore.com>
5571 * sem_prag.adb (Process_Suppress_Unsuppress): Add extra warning
5572 for ignoring pragma Suppress (Elaboration_Check) in SPARK mode.
5574 2015-01-06 Javier Miranda <miranda@adacore.com>
5576 * exp_disp.adb (Expand_Interface_Conversion): No displacement
5577 of the pointer to the object needed when the type of the operand
5578 is not an interface type and the interface is one of its parent
5579 types (since they share the primary dispatch table).
5581 2015-01-06 Vincent Celier <celier@adacore.com>
5583 * prj-env.adb: Minor comment update.
5585 2015-01-06 Javier Miranda <miranda@adacore.com>
5587 * sem_res.adb (Valid_Conversion): Restrict the checks on anonymous
5588 access types whose target type is an interface type to operands
5589 that are access types; required to report an error when the
5590 operand is not an access type.
5592 2015-01-06 Bob Duff <duff@adacore.com>
5594 * a-cfinve.adb (Copy): Set the discriminant to the Length when
5596 * a-cofove.ads (Capacity): Add a postcondition.
5597 * a-cfinve.ads (Capacity): Add a postcondition.
5598 (Reserve_Capacity): Correct the postcondition in the case where
5599 Capacity = 0; that means "Capacity => Length (Container)".
5600 * a-cofove.adb (Elems[c]): Add a comment
5601 explaining the dangers and how to avoid them.
5603 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5605 * sem_ch12.adb: Code clean up.
5607 2015-01-06 Arnaud Charlet <charlet@adacore.com>
5609 * gnatvsn.ads: Bump copyright year.
5611 2015-01-06 Robert Dewar <dewar@adacore.com>
5613 * s-taskin.ads, s-traces.ads: Minor reformatting.
5614 * exp_util.adb: Minor typo fix.
5616 2015-01-06 Vincent Celier <celier@adacore.com>
5618 * gnatls.adb (Search_RTS): Invoke Initialize_Default_Project_Path
5619 with the runtime name.
5620 * prj-env.adb (Initialize_Default_Project_Path): When both
5621 Target_Name and Runtime_Name are not empty string, add to the
5622 project path the two directories .../lib/gnat and .../share/gpr
5623 related to the runtime.
5624 * prj-env.ads (Initialize_Default_Project_Path): New String
5625 parameter Runtime_Name, defaulted to the empty string.
5627 2015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
5629 * frontend.adb: Guard against the case where a configuration
5630 pragma may be split into multiple pragmas and the original
5631 rewritten as a null statement.
5632 * sem_prag.adb (Analyze_Pragma): Insert a brand new Check_Policy
5633 pragma using Insert_Before rather than Insert_Action. This
5634 takes care of the configuration pragma case where Insert_Action
5637 2015-01-06 Bob Duff <duff@adacore.com>
5639 * a-coboho.ads (Element_Access): Add "pragma
5640 No_Strict_Aliasing (Element_Access);". This is needed because
5641 we are unchecked-converting from Address to Element_Access.
5642 * a-cofove.ads, a-cofove.adb (Elems,Elemsc): Fix bounds of the
5645 2015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
5647 * sem_res.adb (Resolve_Actuals): Remove the
5648 restriction which prohibits volatile actual parameters with
5649 enabled external propery Async_Writers to act appear in procedure
5650 calls where the corresponding formal is of mode OUT.
5652 2015-01-05 Jakub Jelinek <jakub@redhat.com>
5654 * gnat_ugn.texi: Bump @copying's copyright year.
5656 2015-01-05 Eric Botcazou <ebotcazou@adacore.com>
5659 * gcc-interface/Makefile.in (../stamp-tools): Reinstate dropped code.
5661 2015-01-04 Uros Bizjak <ubizjak@gmail.com>
5663 * gcc-interface/misc.c (internal_error_function): Use xasprintf instead
5664 of unchecked asprintf.
5667 Copyright (C) 2015 Free Software Foundation, Inc.
5669 Copying and distribution of this file, with or without modification,
5670 are permitted in any medium without royalty provided the copyright
5671 notice and this notice are preserved.