1 2015-10-16 Gary Dismukes <dismukes@adacore.com>
3 * exp_ch9.adb (Build_Simple_Entry_Call): Set_Is_Internal on
4 the temporary object used for a by-copy entry parameter, to
5 ensure that the object doesn't get its No_Initialization flag
6 reset later in Default_Initialize_Object. Also, generate the
7 assignment of the actual to the temporary in the additional case
8 of a scalar out parameter whose type has a Default_Value aspect.
9 * exp_ch3.adb: Fix minor typo in comment.
11 2015-10-16 Hristian Kirtchev <kirtchev@adacore.com>
13 * exp_util.adb, sem_util.ads, sem_ch6.adb, sem_ch7.adb, sem_ch8.adb:
15 * sem_ch12.adb (Analyze_Formal_Package_Declaration): Set the
16 SPARK_Mode from the context.
18 2015-10-16 Bob Duff <duff@adacore.com>
20 * sem_util.adb (Requires_Transient_Scope):
21 If Typ is a generic formal incomplete type, look at the actual
22 type. Otherwise, we don't notice that the actual type is tagged,
23 has a variant part, etc, causing a mismatch of calling conventions
24 between caller and callee.
26 2015-10-16 Hristian Kirtchev <kirtchev@adacore.com>
28 * einfo.ads: Move the declaration of enumeration
29 literal E_Abstract_State above E_Entry. Update the upper bound
30 of subtype Overloadable_Kind.
32 2015-10-16 Gary Dismukes <dismukes@adacore.com>
34 * exp_attr.adb: Minor editorial changes.
36 2015-10-16 Arnaud Charlet <charlet@adacore.com>
38 * exp_ch5.adb, sem_ch3.adb, frontend.adb, exp_ch7.adb, exp_ch7.ads,
39 sem_ch5.adb, sem_type.adb, exp_util.adb, exp_util.ads, comperr.adb,
40 exp_attr.adb, sinfo.ads, exp_ch9.adb, make.adb, usage.adb,
41 lib-writ.adb, sem_ch9.adb, bindgen.adb, debug.adb, einfo.adb,
42 einfo.ads, types.ads, checks.adb, sem_prag.adb, s-tasini.adb,
43 rtsfind.ads, freeze.adb, sem_util.adb, sem_util.ads, exp_dbug.adb,
44 gnatlink.adb, gnat1drv.adb, targparm.adb, targparm.ads, exp_ch4.adb,
45 exp_ch11.adb, repinfo.adb, s-soflin.adb, s-soflin.ads, exp_ch6.adb,
46 exp_ch13.adb, sem_mech.adb, sem_ch6.adb, par-prag.adb, exp_disp.adb,
47 sem_ch8.adb, exp_disp.ads, snames.adb-tmpl, exp_aggr.adb, sem_eval.adb,
48 exp_intr.adb, sem_ch13.adb, snames.ads-tmpl, sem_disp.adb, exp_ch3.adb:
49 Code clean up: remove special handling for .NET and JVM.
51 2015-10-16 Arnaud Charlet <charlet@adacore.com>
53 * sem_ch12.adb: Minor punctuation fix in comment
54 * s-rident.ads: Minor consistency fix in comment
55 * exp_attr.adb, g-spipat.ads: punctuation fixes in comments.
56 * restrict.ads: Style fix in comments.
57 * sem_prag.adb: Minor grammar fix in comment
59 2015-10-16 Gary Dismukes <dismukes@adacore.com>
61 * sem_ch12.adb: Minor reformatting/rewording.
63 2015-10-16 Arnaud Charlet <charlet@adacore.com>
65 * einfo.ads: Minor fix of duplicate words
66 * rident.ads: Minor style fix in comment
68 2015-10-16 Hristian Kirtchev <kirtchev@adacore.com>
70 * exp_ch3.adb (Expand_N_Full_Type_Declaration): Do not capture,
71 set and restore the Ghost mode.
72 (Expand_N_Object_Declaration): Do not capture, set and restore the
74 (Freeze_Type): Redo the capture and restore of the Ghost mode.
75 (Restore_Globals): Removed.
76 * exp_ch5.adb (Expand_N_Assignment_Statement): Redo the capture
77 and restore of the Ghost mode.
78 (Restore_Globals): Removed.
79 * exp_ch6.adb (Expand_N_Procedure_Call_Statement):
80 Redo the capture and restore of the Ghost mode.
81 (Expand_N_Subprogram_Body): Redo the capture, set and restore
83 (Expand_N_Subprogram_Declaration): Do not
84 capture, set and restore the Ghost mode.
85 (Restore_Globals): Removed.
86 * exp_ch7.adb (Expand_N_Package_Body): Redo the capture, set
87 and restore of the Ghost mode.
88 (Expand_N_Package_Declaration): Do not capture, set and restore the
90 * exp_ch8.adb (Expand_N_Exception_Renaming_Declaration):
91 Redo the capture and restore of the Ghost mode.
92 (Expand_N_Object_Renaming_Declaration): Redo
93 the capture and restore of the Ghost mode.
94 (Expand_N_Package_Renaming_Declaration):
95 Redo the capture and restore of the Ghost mode.
96 (Expand_N_Subprogram_Renaming_Declaration): Redo the capture
97 and restore of the Ghost mode.
98 * exp_ch11.adb Remove with and use clauses for Ghost.
99 (Expand_N_Exception_Declaration): Do not capture, set and restore
101 * exp_disp.adb (Make_DT): Redo the capture and restore of the
103 (Restore_Globals): Removed.
104 * exp_prag.adb (Expand_Pragma_Check): Do not capture, set
105 and restore the Ghost mode.
106 (Expand_Pragma_Contract_Cases):
107 Redo the capture and restore of the Ghost mode. Preserve the
108 original context of contract cases by setting / resetting the
109 In_Assertion_Expr counter.
110 (Expand_Pragma_Initial_Condition):
111 Redo the capture and restore of the Ghost mode.
112 (Expand_Pragma_Loop_Variant): Redo the capture and restore of
114 (Restore_Globals): Removed.
115 * exp_util.adb (Make_Predicate_Call): Redo the capture and
116 restore of the Ghost mode.
117 (Restore_Globals): Removed.
118 * freeze.adb (Freeze_Entity): Redo the capture and restore of
120 (Restore_Globals): Removed.
121 * ghost.adb (Check_Ghost_Context): Remove the RM reference from
123 (Is_OK_Statement): Account for statements
124 that appear in assertion expressions.
125 (Is_Subject_To_Ghost):
127 * ghost.ads (Is_Subject_To_Ghost): Moved to body.
128 * rtsfind.ads (Load_RTU): Redo the capture and restore of the
130 * sem.adb Add with and use clauses for Ghost.
132 the capture and restore of the Ghost mode. Set the Ghost mode
133 when analyzing a declaration.
134 (Do_Analyze): Redo the capture
135 and restore of the Ghost mode.
136 * sem_ch3.adb (Analyze_Full_Type_Declaration): Do not capture, set
137 and restore the Ghost mode.
138 (Analyze_Incomplete_Type_Decl):
139 Do not capture, set and restore the Ghost mode.
140 (Analyze_Number_Declaration): Do not capture, set and restore the
142 (Analyze_Object_Declaration): Do not capture, set and
143 restore the Ghost mode.
144 (Analyze_Private_Extension_Declaration):
145 Do not capture, set and restore the Ghost mode.
146 (Analyze_Subtype_Declaration): Do not capture, set and restore
148 (Restore_Globals): Removed.
149 * sem_ch5.adb (Analyze_Assignment): Redo the capture and restore
151 (Restore_Globals): Removed.
152 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration):
153 Do not capture, set and restore the Ghost mode.
154 (Analyze_Procedure_Call): Redo the capture and restore of the
156 (Analyze_Subprogram_Body_Helper): Redo the capture
157 and restore of the Ghost mode. (Analyze_Subprogram_Declaration):
158 Do not capture, set and restore the Ghost mode.
159 (Restore_Globals): Removed.
160 * sem_ch7.adb (Analyze_Package_Body_Helper): Redo the capture and
161 restore of the Ghost mode.
162 (Analyze_Package_Declaration):
163 Do not capture, set and restore the Ghost mode.
164 (Analyze_Private_Type_Declaration): Do not capture, set and
165 restore the Ghost mode.
166 (Restore_Globals): Removed.
167 * sem_ch8.adb (Analyze_Exception_Renaming): Do not capture,
168 set and restore the Ghost mode.
169 (Analyze_Generic_Renaming): Do not capture, set and restore the Ghost
171 (Analyze_Object_Renaming): Do not capture, set and restore the
173 (Analyze_Package_Renaming): Do not capture, set and restore the Ghost
175 (Analyze_Subprogram_Renaming): Do not capture, set and restore the
177 (Restore_Globals): Removed.
178 * sem_ch11.adb (Analyze_Exception_Declaration): Do not capture,
179 set and restore the Ghost mode.
180 * sem_ch12.adb (Analyze_Generic_Package_Declaration):
181 Do not capture, set and restore the Ghost mode.
182 (Analyze_Generic_Subprogram_Declaration): Do not capture, set
183 and restore the Ghost mode.
184 * sem_ch13.adb (Build_Invariant_Procedure_Declaration): Redo
185 the capture and restore of the Ghost mode.
186 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
187 Redo the capture and restore of the Ghost mode.
188 (Analyze_External_Property_In_Decl_Part):
189 Redo the capture and restore of the Ghost mode.
190 (Analyze_Initial_Condition_In_Decl_Part): Redo the
191 capture and restore of the Ghost mode. (Analyze_Pragma):
192 Do not capture, set and restore the Ghost mode for Assert.
193 Redo the capture and restore of the Ghost mode for Check. Do
194 not capture and restore the Ghost mode for Invariant.
195 (Analyze_Pre_Post_Condition_In_Decl_Part): Redo the capture and
196 restore of the Ghost mode.
197 * sem_res.adb (Resolve): Capture, set and restore the Ghost mode
198 when resolving a declaration.
199 * sem_util.adb (Build_Default_Init_Cond_Procedure_Body):
200 Redo the capture and restore of the Ghost mode.
201 (Build_Default_Init_Cond_Procedure_Declaration): Redo the capture
202 and restore of the Ghost mode.
204 2015-10-16 Bob Duff <duff@adacore.com>
206 * debug.adb: Document -gnatdQ switch.
208 2015-10-16 Ed Schonberg <schonberg@adacore.com>
210 * sem_ch12.adb (Analyze_Formal_Subprogram): Implement rule that
211 a formal abstract subprogram cannot have a null default: RM 12.6
214 2015-10-16 Bob Duff <duff@adacore.com>
216 * sem_util.ads, sinput.ads, bcheck.adb: Minor comment fixes.
218 2015-10-16 Javier Miranda <miranda@adacore.com>
220 * inline.adb (Add_Inlined_Body): Ensure that
221 Analyze_Inlined_Bodies will be invoked after completing the
222 analysis of the current unit.
224 2015-10-16 Arnaud Charlet <charlet@adacore.com>
226 * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order): Fix error
227 message for bad last bit position.
228 * sem_ch3.adb, sem_util.adb, sem_util.ads: Minor reformatting.
230 2015-10-16 Ed Schonberg <schonberg@adacore.com>
232 * exp_ch5.adb (Expand_N_Case_Statement): If expression is
233 compile-time known but does not obey a static predicate on
234 its type, replace the case statement with a raise statement,
235 as with other statically detected constraint violations.
237 2015-10-16 Bob Duff <duff@adacore.com>
239 * s-traceb.adb, s-traceb.ads, s-traceb-hpux.adb, s-traceb-mastop.adb:
241 * opt.ads: Minor typo.
243 2015-10-16 Ed Schonberg <schonberg@adacore.com>
245 * sem_util.adb (Gather_Components): When gathering components
246 of a nested variant, the record type used in legality checks is
247 the enclosing record type.
249 2015-10-13 Jakub Jelinek <jakub@redhat.com>
251 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10,
252 DEF_FUNCTION_TYPE_11): Define.
254 2015-10-09 Eric Botcazou <ebotcazou@adacore.com>
256 * gcc-interface/Make-lang.in: Make sure that GNAT1_OBJS and not just
257 GNAT1_ADA_OBJS are compiled only after generated files are created.
259 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
261 * gcc-interface/trans.c (convert_with_check): Use real_arithmetic
262 instead of REAL_ARITHMETIC.
264 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
266 * gcc-interface/trans.c (convert_with_check): Use real_less instead
269 2015-10-02 Doug Rupp <rupp@adacore.com>
270 Olivier Hainque <hainque@adacore.com>
272 * gcc-interface/lang.opt (fbuiltin-printf): Accept.
273 * gcc-interface/misc.c (gnat_handle_option): Ignore it.
274 * gcc-interface/lang-specs.h (@ada, @adawhy, @adascil): Propagate -f*
275 flags as -g* and -m* flags past -gnatez.
277 2015-10-02 Eric Botcazou <ebotcazou@adacore.com>
279 * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Warnings>: Replace
280 linear search with call to find_opt and issue warnings if the -W
281 switch is not appropriate.
283 2015-10-02 Eric Botcazou <ebotcazou@adacore.com>
285 * gcc-interface/ada-tree.h (DECL_RESTRICTED_ALIASING_P): New flag.
286 * gcc-interface/decl.c (gnat_to_gnu_param): For parameters passed by
287 reference but whose type isn't by-ref and whose mechanism hasn't been
288 forced to by-ref, set the DECL_RESTRICTED_ALIASING_P flag directly on
289 them instead of changing their type.
290 * gcc-interface/trans.c (scan_rhs_r): New helper function.
291 (independent_iterations_p): New predicate.
292 (Loop_Statement_to_gnu): For a loop with an iteration scheme, set an
293 ivdep pragma if the iterations are independent.
295 2015-10-02 Eric Botcazou <ebotcazou@adacore.com>
297 * gcc-interface/trans.c (find_loop_for): Use FOR_EACH_VEC_ELT_REVERSE.
298 (Loop_Statement_to_gnu): Use FOR_EACH_VEC_ELT.
299 (finalize_nrv): Use FOR_EACH_VEC_SAFE_ELT and initialize field.
300 (build_stmt_group): Add blank lines.
302 2015-09-30 Thomas Schwinge <thomas@codesourcery.com>
304 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_11): Don't define.
306 2015-09-28 Tom de Vries <tom@codesourcery.com>
308 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_6): Define.
310 2015-09-17 Eric Botcazou <ebotcazou@adacore.com>
312 * gcc-interface/trans.c (emit_check): Do not touch TREE_SIDE_EFFECTS.
314 2015-09-14 Pierre-Marie de Rodat <derodat@adacore.com>
316 * gcc-interface/misc.c (gnat_post_options): Issue a warning if
317 generating STABS debugging information when not the default.
319 2015-09-14 Eric Botcazou <ebotcazou@adacore.com>
321 * gcc-interface/gigi.h (ref_filename): Delete.
322 (Sloc_to_locus): Add clean_column parameter defaulting to false.
323 (build_call_raise): Adjust comment.
324 (build_call_raise_range): Move around.
325 * gcc-interface/trans.c (ref_filename): Delete.
326 (gigi): Fix formatting.
327 (block_end_locus_sink): Delete.
328 (Sloc_to_locus1): Tidy up and reformat. Rename into...
329 (Sloc_to_locus): ...this. Add default for clean_colmun parameter.
330 (set_expr_location_from_node1): Rename into...
331 (set_expr_location_from_node): ...this.
332 (set_end_locus_from_node): Move around. Adjust for renaming.
333 (Handled_Sequence_Of_Statements_to_gnu): Likewise.
334 (add_cleanup): Likewise.
335 * gcc-interface/utils2.c (expand_sloc): New static function.
336 (build_call_raise): Call it.
337 (build_call_raise_column): Likewise.
338 (build_call_raise_range): Likewise. Move around.
340 2015-09-14 Eric Botcazou <ebotcazou@adacore.com>
342 * gcc-interface/utils2.c (gnat_rewrite_reference) <COMPOUND_EXPR>: Add
343 another acceptable pattern for the RHS.
345 2015-07-24 Micahel Darling <darlingm@gmail.com>
348 * prj-nmsc.adb: Reflects renaming of configure.in to configure.ac
349 * gcc-interface/Makefile.in: Likewise
351 2015-07-12 Aldy Hernandez <aldyh@redhat.com>
353 * gcc-interface/utils.c: Fix double word typos.
354 * gnat_ugn.texi: Same.
357 * projects.texi: Same.
361 * sem_eval.adb: Same.
362 * sem_prag.adb: Same.
363 * sem_warn.adb: Same.
365 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
367 * gcc-interface/cuintp.c: Adjust includes.
368 * gcc-interface/decl.c: Likewise.
369 * gcc-interface/misc.c: Likewise.
370 * gcc-interface/targtyps.c: Likewise.
371 * gcc-interface/trans.c: Likewise.
372 * gcc-interface/utils.c: Likewise.
373 * gcc-interface/utils2.c: Likewise.
375 2015-07-06 John Marino <gnugcc@marino.st>
377 * s-oscons-tmplt.c: Add support for DragonFly alongside FreeBSD.
379 2015-06-29 Eric Botcazou <ebotcazou@adacore.com>
382 * gcc-interface/utils.c (gnat_write_global_declarations): Always
383 build the dummy global variable if code was generated.
385 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
388 * gcc-interface/misc.c (gnat_post_options): No need to disable
389 warn_unused_parameter anymore.
391 2015-06-26 Eric Botcazou <ebotcazou@adacore.com>
393 * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): When
394 not optimizing the CFG, clear the DECL_DECLARED_INLINE_P flag on the
397 2015-06-26 Eric Botcazou <ebotcazou@adacore.com>
399 * gcc-interface/gigi.h (note_types_used_by_globals): Delete.
400 (gnat_write_global_declarations): New prototype.
401 * gcc-interface/utils.c (type_decls): Rename back to...
402 (global_decls): ...this.
403 (gnat_pushdecls): Revert previous change.
404 (create_var_decl): Do not output global variables.
405 (note_types_used_by_globals): Rename back to...
406 (gnat_write_global_declarations): ...this. Output variables on the
408 * gcc-interface/misc.c (gnat_parse_file): Adjust to above renaming.
410 2015-06-26 Eric Botcazou <ebotcazou@adacore.com>
412 * gcc-interface/gigi.h (create_var_decl_1): Rename into...
413 (create_var_decl): ...this. Add default value for last parameter.
414 (create_type_stub_decl): Adjust.
415 (create_type_decl): Likewise.
416 (create_field_decl): Likewise.
417 (create_param_decl): Likewise.
418 (create_label_decl): Likewise.
419 (create_subprog_decl): Likewise.
420 * gcc-interface/utils.c (create_var_decl_1): Rename into...
421 (create_var_decl): ...this. Rename var_name into name and var_init
422 into init, move const_decl_allowed_p last and adjust accordingly.
423 (create_type_stub_decl): Rename type_name into name and adjust.
424 (create_type_decl): Likewise.
425 (create_field_decl): Likewise for field_name and field_type.
426 (create_param_decl): Likewise for param_name and param_type.
427 (create_label_decl): Likewise for label_name.
428 (create_subprog_decl): Likewise for subprog_name and subprog_type.
429 * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust couple of calls
430 to create_var_decl_1.
432 2015-06-26 Eric Botcazou <ebotcazou@adacore.com>
434 * gcc-interface/trans.c (loop_info_d): Add low_bound, high_bound,
435 artificial, has_checks and warned_aggressive_loop_optimizations.
436 (gigi): Set warn_aggressive_loop_optimizations to 0.
437 (inside_loop_p): New inline predicate.
438 (push_range_check_info): Rename into...
439 (find_loop_for): ...this and do not push range_check_info_d object.
440 (Loop_Statement_to_gnu): Set artificial, low_bound and high_bound
441 fields of gnu_loop_info. Adjust detection of checks enabled by
442 -funswitch-loops and adds one for -faggressive-loop-optimizations.
443 (gnat_to_gnu) <N_Indexed_Component>: If aggressive loop optimizations
444 are enabled, warn for loops overrunning an array of size 1 not at the
447 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
449 * gcc-interface/trans.c: Remove ipa-ref.h and plugin-api.h from include
451 * gcc-interface/utils.c: Likewise.
453 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
455 * gcc-interface/decl.c (value_annotation_hasher): Inherit from
456 ggc_cache_ptr_hash rather than ggc_cache_hasher.
457 * gcc-interface/utils.c (pad_type_hasher): Likewise.
459 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
461 * gcc-interface/decl.c (value_annotation_hasher::handle_cache_entry):
463 (value_annotation_hasher::keep_cache_entry): New function.
464 * gcc-interface/utils.c (pad_type_hasher::handle_cache_entry):
466 (pad_type_hasher::keep_cache_entry): New function.
468 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
470 * gcc-interface/misc.c: Include calls.h not function.h.
472 2015-06-19 Eric Botcazou <ebotcazou@adacore.com>
474 * gcc-interface/gigi.h (record_builtin_type): Adjust comment.
475 (tree create_type_decl): Likewise.
476 (create_var_decl_1): Add artificial_p and debug_info_p parameters.
477 (create_var_decl): Likewise.
478 (create_true_var_decl): Delete.
479 (create_subprog_decl): Add debug_info_p parameter.
480 * gcc-interface/decl.c (gnat_to_gnu_entity): Add artificial_p local
481 variable and use it throughout. Remove DECL_ARTIFICIAL settings.
482 <E_Variable>: Adjust calls to create_var_decl and create_var_decl_1.
483 Remove DECL_IGNORED_P settings.
484 <E_Enumeration_Type>: Likewise.
485 <E_Record_Type>: Likewise.
486 <E_Subprogram_Type>: Likewise. Remove artificial_flag local variable.
487 Adjust call to create_subprog_decl.
488 (get_minimal_subprog_decl): Likewise.
489 (elaborate_expression_1): Adjust call to create_var_decl.
490 * gcc-interface/trans.c (gigi): Adjust calls to create_var_decl and
491 create_subprog_decl. Remove DECL_ARTIFICIAL & DECL_IGNORED_P settings.
492 * gcc-interface/utils.c (maybe_pad_type): Likewise.
493 (record_builtin_type): Adjust comment.
494 (create_type_stub_decl): Remove obsolete comment.
495 (create_var_decl_1): Add artificial_p and debug_info_p parameters.
496 Set DECL_ARTIFICIAL and DECL_IGNORED_P accordingly.
497 (create_subprog_decl): Add debug_info_p parameter. Set DECL_IGNORED_P
500 2015-06-19 Eric Botcazou <ebotcazou@adacore.com>
502 * gcc-interface/misc.c (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): Define.
504 2015-06-19 Eric Botcazou <ebotcazou@adacore.com>
506 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Make sure
507 the size of a padding type built around the return type is positive.
508 * gcc-interface/trans.c (gnat_to_gnu) <N_Simple_Return_Statement>:
509 Use INIT_EXPR instead of MODIFY_EXPR to assign to the return object.
511 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
513 * gcc-interface/cuintp.c: Do not include input.h, line-map.h or is-a.h.
514 * gcc-interface/decl.c: Likewise.
515 * gcc-interface/misc.c: Likewise.
516 * gcc-interface/targtyps.c: Likewise.
517 * gcc-interface/trans.c: Likewise.
518 * gcc-interface/utils.c: Likewise.
519 * gcc-interface/utils2.c: Likewise.
521 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
523 * gcc-interface/utils.c (get_global_context): Register the main
524 translation unit through the new debug hook.
526 2015-06-09 Eric Botcazou <ebotcazou@adacore.com>
528 * gcc-interface/misc.c: Remove duplicate include directives.
529 * gcc-interface/trans.c: Likewise.
530 * gcc-interface/utils.c: Likewise.
532 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
534 * gcc-interface/cuintp.c : Adjust include files.
535 * gcc-interface/decl.c : Likewise.
536 * gcc-interface/misc.c : Likewise.
537 * gcc-interface/targtyps.c : Likewise.
538 * gcc-interface/trans.c : Likewise.
539 * gcc-interface/utils.c : Likewise.
540 * gcc-interface/utils2.c : Likewise.
542 2015-06-08 John Marino <gnugcc@marino.st>
544 * a-intnam-dragonfly.ads: New.
545 * s-osinte-dragonfly.adb: Likewise.
546 * s-osinte-dragonfly.ads: Likewise.
547 * system-dragonfly-x86_64.ads: Likewise.
548 * adaint.c: Add BSD macros.
549 * cstreams.c: Likewise.
550 * gsocket.h: Likewise.
552 * socket.c: Likewise.
553 * env.c: Add __DragonFly__, remove __FreeBSD__ macro.
554 * init.c: Add __DragonFly__, change __gnat_install_handler
555 prototype from empty to void.
556 * initialize.c: Add __DragonFly__.
557 * sysdep.c: Likewise.
558 * s-osinte-freebsd.adb: Use __get_errno instead of __error.
559 * tracebak.c: Set unwinder for i386 BSD.
560 * gcc-interface/Makefile.in: Add x86_64 DragonFly, tweak
561 x86_64 FreeBSD and x86 FreeBSD.
563 2015-06-06 Eric Botcazou <ebotcazou@adacore.com>
565 * gcc-interface/utils.c (note_types_used_by_globals): Tweak comment.
566 * gcc-interface/decl.c (gnat_to_gnu_entity): Likewise.
568 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
570 * gcc-interface/gigi.h (note_types_used_by_globals): Rename from
571 gnat_write_global_declarations.
572 * gcc-interface/misc.c (gnat_parse_file): Call
573 note_types_used_by_globals.
574 Remove LANG_HOOKS_WRITE_GLOBALS.
575 * gcc-interface/utils.c: Rename global_decls to type_decls.
576 (gnat_write_global_declarations): Rename
577 to note_types_used_by_globals.
578 Remove call to finalize_compilation_unit.
579 Remove call to debug_hooks->global_decl for globals.
580 (gnat_pushdecls): Only insert into type_decls if TYPE_DECL.
582 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
584 * gcc-interface/cuintp.c: Adjust includes for restructured coretypes.h.
585 * gcc-interface/decl.c: Likewise.
586 * gcc-interface/misc.c: Likewise.
587 * gcc-interface/targtyps.c: Likewise.
588 * gcc-interface/trans.c: Likewise.
589 * gcc-interface/utils.c: Likewise.
590 * gcc-interface/utils2.c: Likewise.
592 2015-06-04 Pierre-Marie de Rodat <derodat@adacore.com>
594 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: If
595 processing a definition, create definitions for padding types
598 2015-06-03 Eric Botcazou <ebotcazou@adacore.com>
600 * gcc-interface/utils.c (copy_type): Also set TYPE_CANONICAL.
602 2015-06-03 Eric Botcazou <ebotcazou@adacore.com>
604 * gcc-interface/trans.c (gnat_to_gnu) <N_Simple_Return_Statement>: Fix
605 typo in latest change.
607 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
609 * gcc-interface/Makefile.in: Fix ARM/Darwin configuration.
611 2015-06-01 Pierre-Marie de Rodat <derodat@adacore.com>
613 * gcc-interface/utils.c (scale_by_factor_of): When handling a function
614 call expression, process the corresponding function body. Also handle
617 2015-06-01 Pierre-Marie de Rodat <derodat@adacore.com>
619 * gcc-interface/decl.c (gnat_to_gnu_entity): Replace pointer types with
620 references ones for functions that return references.
622 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
624 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: For a
625 definition of a type coming from a limited_with, get to the full view
626 if it is not in the main code unit.
628 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
630 * gcc-interface/utils.c (create_var_decl_1): If an assembler name is
631 specified, let the target mangle it before settting.
632 (create_subprog_decl): Likewise and move this treatment last.
634 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
636 * gcc-interface/lang-specs.h (TARGET_VXWORKS_RTP): Move substitution to
637 before first -gnatez switch. Simplify and add trailing space.
639 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
641 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: If the
642 record has a parent field and a representation clause, make sure that
643 it is properly aligned.
645 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
647 * gcc-interface/trans.c (lvalue_required_p) <N_Indexed_Component>: Deal
648 with character and enumeration literals as index values.
650 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
652 * gcc-interface/gigi.h (build_simple_component_ref): Declare.
653 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Deal with
654 address clause on aliased object with unconstrained nominal subtype.
655 Mark the aligning variable as artificial, do not convert the address
656 expression immediately but mark it as constant instead.
657 * gcc-interface/utils.c (convert): If the target type contains a
658 template, be prepared for an empty array.
659 (maybe_unconstrained_array): Likewise.
660 * gcc-interface/utils2.c (known_alignment) <POINTER_PLUS_EXPR>: Deal
661 with the pattern built for aligning types.
662 <INTEGER_CST>: Do not cap the value at BIGGEST_ALIGNMENT.
663 (build_simple_component_ref): Make public.
664 If the base object is a constructor that contains a template, fold the
665 result field by field.
667 2015-05-31 Eric Botcazou <ebotcazou@adacore.com>
669 * s-oscons-tmplt.c: Add explicit tests for Android alongside Linux.
671 2015-05-30 Eric Botcazou <ebotcazou@adacore.com>
673 * adaint.c: Test for __linux__ instead of linux and __sun__ instead
674 of sun. Add missing leading underscore to AIX. Remove #elif 0.
675 * adaint.h: Likewise.
677 * cstreams.c: Likewise.
679 * gsocket.h: Likewise.
680 * init.c: Likewise. Test for __i386__ instead of i386.
682 * s-oscons-tmplt.c: Likewise.
683 * sysdep.c: Likewise.
684 * terminals.c: Likewise. Use BSD symbol instead of FREEBSD.
685 * tracebak.c: Likewise. Test for __sparc__ instead of sparc.
687 2015-05-28 Eric Botcazou <ebotcazou@adacore.com>
689 * gcc-interface/utils.c (max_size) <tcc_binary>: Add special code to
690 deal with the subtraction of a "negative" value in an unsigned type.
692 2015-05-28 Eric Botcazou <ebotcazou@adacore.com>
694 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Do
695 not error out on a return type which has a size that overflows if the
696 return is done by invisible reference.
698 2015-05-28 Eric Botcazou <ebotcazou@adacore.com>
700 * gcc-interface/utils.c (gnat_pushdecl): Reunify the handling of array
701 and pointer types wrt DECL_ORIGINAL_TYPE and adjust left and right.
703 2015-05-28 Eric Botcazou <ebotcazou@adacore.com>
705 * gcc-interface/gigi.h (gnat_stabilize_reference): Adjust.
706 (rewrite_fn): Remove third parameter.
707 (type_is_padding_self_referential): New inline predicate.
708 (return_type_with_variable_size_p): Likewise.
709 * gcc-interface/decl.c (allocatable_size_p): More around.
710 (cannot_be_superflat_p): Rename into...
711 (cannot_be_superflat ): ...this.
712 (initial_value_needs_conversion): New predicate.
713 (gnat_to_gnu_entity): Invoke type_is_padding_self_referential,
714 initial_value_needs_conversion and adjust to above renaming.
715 For a renaming, force the materialization if the inner expression
716 is compound. Adjust calls to elaborate_reference and build a
717 compound expression if needed.
718 (struct er_dat): Add N field.
719 (elaborate_reference_1): Remove N parameter and adjust.
720 (elaborate_reference): Add INIT parameter and pass it in the call to
721 gnat_rewrite_reference. Adjust initial expression.
722 * gcc-interface/trans.c (Call_to_gnu): Treat renamings the same way as
723 regular object declarations when it comes to creating a temporary.
724 Adjust call to gnat_stabilize_reference and build a compound expression
725 if needed. Invoke return_type_with_variable_size_p.
726 (gnat_to_gnu): Invoke type_is_padding_self_referential. In case #4,
727 return a call to a function unmodified if it returns with variable size
728 and is also the initial expression in an object declaration.
729 * gcc-interface/utils2.c (build_binary_op) <INIT_EXPR>: Use the RHS'
730 type if it is a call to a function that returns with variable size.
731 (build_unary_op): Invoke type_is_padding_self_referential.
732 (gnat_stabilize_reference_1): Remove N parameter and adjust.
733 (gnat_stabilize_reference): Add INIT parameter and pass it in the call
734 to gnat_rewrite_reference.
735 (gnat_rewrite_reference): Remove N, add INIT parameter and adjust.
736 <COMPOUND_EXPR>: New case.
738 2015-05-28 Ed Schonberg <schonberg@adacore.com>
740 * sem_ch3.adb (Is_Visible_Component): Component is visible
741 in a derived type if inherited through an ancestor that has a
742 partial view of the original type holding the component, if the
743 full view of that original type is in scope.
744 * sem_util.ads (Get_Body_From_Stub): Works for all kinds of stubs.
746 2015-05-28 Bob Duff <duff@adacore.com>
748 * sem_util.adb (Requires_Transient_Scope): For definite untagged
749 subtypes, we should never have to use the secondary stack. This moves
750 toward that goal. But there are still cases that don't work.
751 Here, we move the check for Is_Definite first, but add a
752 special-purpose check for Has_Discrim_Dep_Array.
754 2015-05-28 Bob Duff <duff@adacore.com>
756 * sem_util.adb (Requires_Transient_Scope): Avoid returning
757 function results on the secondary stack in so many cases.
759 2015-05-28 Ed Schonberg <schonberg@adacore.com>
761 * sem_util.adb (Wrong_Type): In any instance, do not emit error
762 if type of expression is the partial view of the expected type.
764 2015-05-28 Ed Schonberg <schonberg@adacore.com>
766 * sem_res.adb (Resolve_Actuals): a) The replacement of formal
767 names in named associations only needs to be done within an
768 instance, on a call to a primitive of a formal derived type,
769 where the actual subprogram may have different formal names than
770 those of the primitive operation of the formal type.
771 b) Defaulted parameters must be taken into account when obtaining
772 the names of the formals of the actual subprogram being called.
774 2015-05-28 Robert Dewar <dewar@adacore.com>
776 * sem_ch13.adb, sem_disp.ads: Minor reformatting.
778 2015-05-28 Ed Schonberg <schonberg@adacore.com>
780 * sem_util.adb (Set_Debug_Info_Needed): For a private type
781 whose full view is itself a derived private type, set flag on
782 underlying full view as well, for proper gdb display.
784 2015-05-28 Bob Duff <duff@adacore.com>
786 * exp_tss.ads: Minor comment fix.
787 * exp_ch3.adb (Build_Array_Init_Proc, Build_Record_Init_Proc):
788 Inline init_procs when the type has controlled parts. Remove
789 obsolete comments about those init_procs -- init_procs for
790 such types are no longer complex. A typical init_proc just
791 initializes the 'Tag field, and calls the parent init_proc
792 (e.g. for Limited_Controlled), which calls the grandparent
793 (for Root_Controlled), which does nothing. This all boils down
794 to one instruction when inlined.
795 * exp_ch7.adb (Create_Finalizer): Inline the finalizer.
797 2015-05-28 Ed Schonberg <schonberg@adacore.com>
799 * sem_ch4.adb (Analyze_Selected_Component): If the type to use
800 is a derived type and is a generic actual, the selected component
801 appears within an instance body, and the check over the type
802 has failed, examine ancestor types for the desired component.
803 (Find_Component_In_Instance): If record type is a derived type,
804 examine all ancestors in order to locate desired component.
806 2015-05-27 H.J. Lu <hongjiu.lu@intel.com>
808 * gcc-interface/Makefile.in (TOOLS_LIBS): Add @NO_PIE_FLAG@.
810 2015-05-27 Eric Botcazou <ebotcazou@adacore.com>
812 * gcc-interface/trans.c (elaborate_all_entities): Do not elaborate an
813 incomplete type coming from a limited_with and whose non-limited view
814 comes from the main unit.
816 2015-05-27 Eric Botcazou <ebotcazou@adacore.com>
818 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Move down
819 code applying atomic checks to the object.
821 2015-05-27 Robert Dewar <dewar@adacore.com>
823 * sem_aux.adb: Minor rewording.
825 2015-05-27 Bob Duff <duff@adacore.com>
827 * exp_prag.adb (Expand_Pragma_Abort_Defer): Make
828 pragma Abort_Defer do nothing if Abort_Allowed is False.
830 2015-05-27 Arnaud Charlet <charlet@adacore.com>
832 * exp_ch9.adb, sem_util.adb, sem_util.ads, s-stposu.adb, s-spsufi.ads,
833 sem_elab.ads, g-comlin.ads, errout.ads, exp_ch6.adb, sem_ch4.adb,
834 opt.ads, s-bignum.adb, output.ads, sem_ch13.adb, erroutc.ads,
835 sem_disp.ads, exp_ch3.adb: Minor fixes of duplicate words in comments.
837 2015-05-27 Doug Rupp <rupp@adacore.com>
839 * adaint.c (__gnat_tmp_name) [vxworks]: Robustify and use for rtp as
842 2015-05-27 Pierre-Marie de Rodat <derodat@adacore.com>
844 * par_sco.adb (Process_Decision): Store sloc to
845 condition/pragmas SCOs associations into a temporary table before
846 moving them to the SCO_Raw_Hash_Table so that we can back them
847 out just like we do for SCO entries that are simple decisions
848 in an expression context.
850 2015-05-27 Ed Schonberg <schonberg@adacore.com>
852 * sem_ch6.adb (Process_Formals): A non-private formal type that
853 is a limited view does not have a list of private dependents.
855 2015-05-27 Ed Schonberg <schonberg@adacore.com>
857 * exp_ch5.adb (Expand_N_Case_Statement): If the expression in
858 the case statement is a compile-time known value, we look for a
859 corresponding alternative to optimize the case statement into a
860 single case. If the type has a static predicate and the expression
861 does not satisfy the predicate, there is no legal alternative and
862 this optimization is not applicable. Excecution is erroneous,
863 or else if assertions are enabled, an exception will be raised
864 earlier, at the point the expression is elaborated.
866 2015-05-27 Robert Dewar <dewar@adacore.com>
868 * sem_elab.adb (Check_Internal_Call_Continue): Suppress
869 warning on Finalize, Adjust, or Initialize if type involved has
872 2015-05-27 Ed Schonberg <schonberg@adacore.com>
874 * sem_aux.adb, sem_aux.ads (First_Discriminant): Return empty when
875 applied to a type with no known discriminants.
877 2015-05-26 Robert Dewar <dewar@adacore.com>
879 * errout.ads, sem_ch4.adb, sem_ch6.adb: Minor reformatting.
881 2015-05-26 Bob Duff <duff@adacore.com>
883 * sem_elab.adb (Check_A_Call): In the case where we're
884 calling something in an instance of a generic package that is
885 within this same unit (as the call), make sure we treat it
886 as a call to an entity within the same unit. That is, call
887 Check_Internal_Call, rather than putting "Elaborate_All(X)"
888 on X, which would necessarily result in an elaboration cycle in
889 static-elaboration mode.
891 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
893 * freeze.ads (Is_Atomic_VFA_Aggregate): Adjust profile.
894 * freeze.adb (Is_Atomic_VFA_Aggregate): Change Entity
895 parameter into Node parameter and remove Type parameter.
896 Look at Is_Atomic_Or_VFA both on the type and on the object.
897 (Freeze_Entity): Adjust call to Is_Atomic_VFA_Aggregate.
898 * exp_aggr.adb (Expand_Record_Aggregate): Likewise.
899 (Process_Atomic_Independent_Shared_Volatile): Remove code
900 propagating Atomic or VFA from object to locally-defined type.
902 2015-05-26 Bob Duff <duff@adacore.com>
904 * exp_ch7.adb: Minor comment fix.
906 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
908 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Min/Attr_Max>: Do not
909 bother about NaN's if Machine_Overflows is true.
911 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
913 * gcc-interface/trans.c (gnat_to_gnu) <N_Object_Declaration>: Really
914 force evaluation of the expression, if any, when the object has its
915 elaboration delayed. Do not create a variable at global level.
917 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
919 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Machine>: Do not apply
920 extra-precision trick to literals. Build SAVE_EXPR manually.
922 * gcc-interface/misc.c (enumerate_modes): Add bypass for x86/x86-64.
924 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
926 * gcc-interface/ada-tree.h (DECL_GLOBAL_NONCONSTANT_RENAMING_P): Delete
927 (DECL_RENAMED_OBJECT): Adjust comment.
928 * gcc-interface/gigi.h (record_global_nonconstant_renaming): Delete.
929 (invalidate_global_nonconstant_renamings): Likewise.
930 (gnat_constant_reference_p): Likewise.
931 (rewrite_fn): New function type.
932 (gnat_rewrite_reference): Declare.
933 (call_is_atomic_load): New inline predicate.
934 * gcc-interface/decl.c (elaborate_reference_1): New function.
935 (elaborate_reference): Likewise.
936 (gnat_to_gnu_entity): Call elaborate_reference to elaborate renamings
937 and simplify associated code. Set const_flag to true consistently in
938 conjunction with used_by_ref.
939 * gcc-interface/trans.c (Identifier_to_gnu): Always replace renaming
940 pointers by renamed objects.
941 (outer_atomic_access_required_p): Deal with renamings.
942 (Compilation_Unit_to_gnu): Do not call
943 invalidate_global_nonconstant_renamings.
944 (gnat_to_gnu) <N_Object_Renaming_Declaration>: Adjust comment.
945 (gnat_gimplify_expr): Deal with atomic loads.
946 * gcc-interface/utils.c (global_nonconstant_renamings): Delete.
947 (destroy_gnat_utils): Do not call
948 invalidate_global_nonconstant_renamings.
949 (record_global_nonconstant_renaming): Delete.
950 (invalidate_global_nonconstant_renamings): Likewise.
951 * gcc-interface/utils2.c (call_is_atomic_load): Move to gigi.h.
952 (build_load_modify_store): Build a copy of the destination.
953 (gnat_stabilize_reference_1): Adjust.
954 (gnat_stabilize_reference): Call gnat_stabilize_reference_1 through
955 gnat_rewrite_reference and move bulk of code to...
956 (gnat_rewrite_reference): ...here. New global function.
957 (gnat_constant_reference_p): Delete.
959 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
961 * gcc-interface/gigi.h (gnat_stabilize_reference): Adjust prototype.
962 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not rely on const_flag
963 to detect constant renamings. Be prepared for specific pattern of
964 renamed object based on function calls. Create a constant object
965 for the renaming of a NULL_EXPR or of a CONSTRUCTOR. Adjust calls
966 to gnat_stabilize_reference and tidy up. Remove redundant tests.
967 (elaborate_expression_1): Remove obsolete test and tidy up.
968 * gcc-interface/trans.c (Call_to_gnu): Do not stabilize In/Out or Out
969 parameters passed by reference.
970 (gnat_to_gnu) <N_Selected_Component>: Remove redundant protection again
972 Use gnat_protect_expr instead of gnat_stabilize_reference for general
973 protection against side-effects.
974 * gcc-interface/utils2.c (gnat_stable_expr_p): New predicate.
975 (gnat_save_expr): Invoke it.
976 (gnat_protect_expr): Likewise.
977 (gnat_stabilize_reference_1): Likewise. Remove useless propagation
979 (gnat_stabilize_reference): Remove parameter and adjust throughout.
980 Delete ADDR_EXDR, COMPOUND_EXPR and CONSTRUCTOR cases.
981 Restrict CALL_EXPR case to atomic loads and tweak ERROR_MARK case.
983 2015-05-26 Ed Schonberg <schonberg@adacore.com>
985 * sinfo.ads: Minor reformatting.
986 * sem_aux.ads: Clarify use of First_Discriminant.
987 * sem_ch4.adb (Analyze_Explicit_Dereference): The use of a limited
988 view is replaced with the non-limited view in an instance body,
989 where the enclosing unit must have a regular with_clause on the
991 * sem_ch12.adb (Install_Body): Freeze instantation after its
992 body. Remove useless freeze nodes for incomplete actuals to
993 prevent multiple generation of internal operations.
994 (Instantiate_Package_Body): Set sloc of body appropriately when
995 there are incomplete actuals and the instance body is placed in
996 the body of the enclosing unit.
997 * errout.ads: Consistent punctuation, better alignment and trivial
999 * err_vars.ads: Fix typo.
1001 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
1003 * sem_ch8.adb (Analyze_Object_Renaming): Lift restriction on
1004 components of Volatile_Full_Access objects.
1006 2015-05-26 Ed Schonberg <schonberg@adacore.com>
1008 * sem_ch6.adb (Is_Non_Overriding_Operation,
1009 Get_Generic_Parent_Type): Handle properly the case of a derived
1010 scalar type by using the first subtype rather than its generated
1011 anonymous base type.
1013 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
1015 * einfo.adb (Write_Field17_Name): Move E_Incomplete_Subtype
1017 (Write_Field19_Name): ...here.
1019 2015-05-26 Ed Schonberg <schonberg@adacore.com>
1021 * sem_ch13.adb: sem_ch13.adb (Add_Predicates): Undo analysis
1022 of original expression in ASIS mode: does not solve the ASIS
1023 problem of a usable type information, and crashes the back-end
1024 when performing type annotations.
1026 2015-05-26 Robert Dewar <dewar@adacore.com>
1028 * sem_disp.adb (Inherited_Subprograms): Add One_Only parameter.
1029 (Is_Overriding_Subprogram): Use One_Only_Parameter.
1030 * sem_disp.ads (Inherited_Subprograms): Add One_Only parameter.
1032 2015-05-26 Robert Dewar <dewar@adacore.com>
1034 * exp_prag.adb, sem_ch3.adb, sem_ch5.adb, exp_ch11.adb, ghost.adb,
1035 exp_ch6.adb, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb, sem_ch13.adb,
1036 exp_ch3.adb: Minor reformatting.
1038 2015-05-26 Bob Duff <duff@adacore.com>
1040 * treepr.adb: Minor improvement to debugging routines (pp, pn)
1041 robustness. Rearrange the code so passing a nonexistent Node_Id
1042 prints "No such node" rather than crashing, and causing gdb to
1043 generate confusing messages.
1045 2015-05-26 Gary Dismukes <dismukes@adacore.com>
1047 * sem_util.adb: Minor typo fix.
1049 2015-05-26 Yannick Moy <moy@adacore.com>
1051 * sem_aux.adb (Subprogram_Body_Entity): Deal with subprogram stubs.
1053 2015-05-26 Hristian Kirtchev <kirtchev@adacore.com>
1055 * exp_ch3.adb (Expand_N_Full_Type_Declaration): Capture, set and
1056 restore the Ghost mode.
1057 (Expand_N_Object_Declaration): Capture, set and restore the Ghost mode.
1058 (Freeze_Type): Update the call to Set_Ghost_Mode.
1059 (Restore_Globals): New routine.
1060 * exp_ch5.adb Add with and use clauses for Ghost.
1061 (Expand_N_Assignment_Statement): Capture, set and restore the
1063 (Restore_Globals): New routine.
1064 * exp_ch6.adb Add with and use clauses for Ghost.
1065 (Expand_N_Procedure_Call_Statement): Capture, set and
1066 restore the Ghost mode.
1067 (Expand_N_Subprogram_Body):
1068 Code cleanup. Capture, set and restore the Ghost mode.
1069 (Expand_N_Subprogram_Declaration): Capture, set and restore the
1071 (Restore_Globals): New routine.
1072 * exp_ch7.adb Add with and use clauses for Ghost.
1073 (Expand_N_Package_Body): Capture, set and restore the Ghost mode.
1074 (Expand_N_Package_Declaration): Capture, set and restore the
1076 (Wrap_HSS_In_Block): Create a proper identifier for the block.
1077 * exp_ch8.adb Add with and use clauses for Ghost.
1078 (Expand_N_Exception_Renaming_Declaration): Code
1079 cleanup. Capture, set and restore the Ghost mode.
1080 (Expand_N_Object_Renaming_Declaration): Capture, set and restore
1082 (Expand_N_Package_Renaming_Declaration): Capture, set and restore the
1084 (Expand_N_Subprogram_Renaming_Declaration): Capture, set and
1085 restore the Ghost mode.
1086 * exp_ch11.adb (Expand_N_Exception_Declaration): Code
1087 cleanup. Capture, set and restore the Ghost mode.
1088 * exp_disp.adb (Make_DT): Update the call to Set_Ghost_Mode. Do
1089 not initialize the dispatch table slot of a Ghost subprogram.
1090 * exp_prag.adb Add with and use clauses for Ghost.
1091 (Expand_Pragma_Check): Capture, set and restore the Ghost mode.
1092 (Expand_Pragma_Contract_Cases): Capture, set and restore the
1094 (Expand_Pragma_Initial_Condition): Capture, set and
1095 restore the Ghost mode.
1096 (Expand_Pragma_Loop_Variant): Capture,
1097 set and restore the Ghost mode.
1098 (Restore_Globals): New routine.
1099 * exp_util.adb Add with and use clauses for Ghost.
1100 (Make_Predicate_Call): Code cleanup. Capture, set and restore
1102 (Restore_Globals): New routine.
1103 * freeze.adb (Freeze_Entity): Code cleanup. Update the call
1105 * ghost.adb Add with and use clause for Sem_Prag.
1106 (Check_Ghost_Completion): Code cleanup.
1107 (Check_Ghost_Overriding): New routine.
1108 (Check_Ghost_Policy): Code cleanup.
1109 (Ghost_Entity): New routine.
1110 (Is_Ghost_Declaration): Removed.
1111 (Is_Ghost_Statement_Or_Pragma): Removed.
1112 (Is_OK_Context): Reimplemented.
1113 (Is_OK_Declaration): New routine.
1114 (Is_OK_Pragma): New routine.
1115 (Is_OK_Statement): New routine.
1116 (Mark_Full_View_As_Ghost): New routine.
1117 (Mark_Pragma_As_Ghost): New routine.
1118 (Mark_Renaming_As_Ghost): New routine.
1119 (Propagate_Ignored_Ghost_Code): Update the comment on usage.
1120 (Set_From_Entity): New routine.
1121 (Set_From_Policy): New routine.
1122 (Set_Ghost_Mode): This routine now handles pragmas and freeze nodes.
1123 (Set_Ghost_Mode_For_Freeze): Removed.
1124 (Set_Ghost_Mode_From_Entity): New routine.
1125 (Set_Ghost_Mode_From_Policy): Removed.
1126 * ghost.ads (Check_Ghost_Overriding): New routine.
1127 (Mark_Full_View_As_Ghost): New routine.
1128 (Mark_Pragma_As_Ghost): New routine.
1129 (Mark_Renaming_As_Ghost): New routine.
1130 (Set_Ghost_Mode): Update the parameter profile. Update the
1132 (Set_Ghost_Mode_For_Freeze): Removed.
1133 (Set_Ghost_Mode_From_Entity): New routine.
1134 * sem_ch3.adb (Analyze_Full_Type_Declaration):
1135 Capture and restore the Ghost mode. Mark a type
1136 as Ghost regardless of whether it comes from source.
1137 (Analyze_Incomplete_Type_Decl): Capture, set and restore the
1139 (Analyze_Number_Declaration): Capture and restore the Ghost mode.
1140 (Analyze_Object_Declaration): Capture and restore the Ghost mode.
1141 (Analyze_Private_Extension_Declaration): Capture and
1142 restore the Ghost mode.
1143 (Analyze_Subtype_Declaration): Capture and restore the Ghost mode.
1144 (Process_Full_View): The full view inherits all Ghost-related
1145 attributes from the private view.
1146 (Restore_Globals): New routine.
1147 * sem_ch5.adb (Analyze_Assignment): Capture and restore the
1149 (Restore_Globals): New routine.
1150 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration):
1151 Code cleanup. Capture and restore the Ghost mode. Mark a
1152 subprogram as Ghost regarless of whether it comes from source.
1153 (Analyze_Procedure_Call): Capture and restore the Ghost mode.
1154 (Analyze_Subprogram_Body_Helper): Capture and restore the Ghost mode.
1155 (Analyze_Subprogram_Declaration): Capture and restore the Ghost mode.
1156 (New_Overloaded_Entity): Ensure that a
1157 parent subprogram and an overriding subprogram have compatible
1159 * sem_ch7.adb (Analyze_Package_Body_Helper): Capture and restore
1161 (Analyze_Package_Declaration): Capture and
1162 restore the Ghost mode. Mark a package as Ghost when it is
1163 declared in a Ghost region.
1164 (Analyze_Private_Type_Declaration): Capture and restore the Ghost mode.
1165 (Restore_Globals): New routine.
1166 * sem_ch8.adb (Analyze_Exception_Renaming): Code
1167 reformatting. Capture and restore the Ghost mode. A renaming
1168 becomes Ghost when its name references a Ghost entity.
1169 (Analyze_Generic_Renaming): Capture and restore the Ghost mode. A
1170 renaming becomes Ghost when its name references a Ghost entity.
1171 (Analyze_Object_Renaming): Capture and restore the Ghost mode. A
1172 renaming becomes Ghost when its name references a Ghost entity.
1173 (Analyze_Package_Renaming): Capture and restore the Ghost mode. A
1174 renaming becomes Ghost when its name references a Ghost entity.
1175 (Analyze_Subprogram_Renaming): Capture and restore the Ghost
1176 mode. A renaming becomes Ghost when its name references a
1178 * sem_ch11.adb (Analyze_Exception_Declaration): Capture, set
1179 and restore the Ghost mode.
1180 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Capture and
1181 restore the Ghost mode.
1182 (Analyze_Generic_Subprogram_Declaration):
1183 Capture and restore the Ghost mode.
1184 * sem_ch13.adb Add with and use clauses for Ghost.
1185 (Add_Invariant): New routine.
1186 (Add_Invariants): Factor out code.
1187 (Add_Predicate): New routine.
1188 (Add_Predicates): Factor out code.
1189 (Build_Invariant_Procedure_Declaration): Code cleanup. Capture,
1190 set and restore the Ghost mode.
1191 (Build_Invariant_Procedure): Code cleanup.
1192 (Build_Predicate_Functions): Capture, set and
1193 restore the Ghost mode. Mark the generated functions as Ghost.
1194 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
1195 Capture, set and restore the Ghost mode.
1196 (Analyze_External_Property_In_Decl_Part): Capture, set and restore
1198 (Analyze_Initial_Condition_In_Decl_Part):
1199 Capture, set and restore the Ghost mode.
1201 Code cleanup. Capture, set and restore the Ghost mode. Flag
1202 pragmas Linker_Section, No_Return, Unmodified, Unreferenced and
1203 Unreferenced_Objects as illegal when it applies to both Ghost
1204 and living arguments. Pragma Ghost cannot apply to synchronized
1206 (Check_Kind): Moved to the spec of Sem_Prag.
1207 (Process_Inline): Flag the pragma as illegal when it applies to
1208 both Ghost and living arguments.
1209 (Restore_Globals): New routine.
1210 * sem_prag.ads Add pragma Default_Initial_Condition
1211 to table Assertion_Expression_Pragma. Add new table
1212 Is_Aspect_Specifying_Pragma.
1213 (Check_Kind): Moved from body of Sem_Prag.
1214 * sem_util.adb Add with and use clauses for Ghost.
1215 (Build_Default_Init_Cond_Procedure_Body): Capture, set and restore
1217 (Build_Default_Init_Cond_Procedure_Declaration):
1218 Capture, set and restore the Ghost mode. Mark the default
1219 initial condition procedure as Ghost when it is declared
1221 (Is_Renaming_Declaration): New routine.
1222 (Policy_In_List): Account for the single argument version of
1224 * sem_util.ads (Is_Renaming_Declaration): New routine.
1225 * sinfo.adb (Is_Ghost_Pragma): New routine.
1226 (Set_Is_Ghost_Pragma): New routine.
1227 * sinfo.ads New attribute Is_Ghost_Pragma.
1228 (Is_Ghost_Pragma): New routine along with pragma Inline.
1229 (Set_Is_Ghost_Pragma): New routine along with pragma Inline.
1231 2015-05-26 Robert Dewar <dewar@adacore.com>
1233 * sem_ch3.adb, sem_aux.adb, sem_aux.ads, exp_ch6.adb, sprint.adb:
1236 2015-05-26 Gary Dismukes <dismukes@adacore.com>
1238 * gnat1drv.adb, targparm.adb, targparm.ads, restrict.adb: Minor
1239 reformatting and typo fixes in comments.
1241 2015-05-26 Ed Schonberg <schonberg@adacore.com>
1243 * sem_ch7.adb (Swap_Private_Dependets): Set visibility of
1244 the two views of a private dependent in two separate steps,
1245 to ensure proper visibility in parent units analyzed for inlining.
1247 2015-05-26 Yannick Moy <moy@adacore.com>
1249 * sem_aux.adb, sem_aux.ads (Get_Low_Bound): Use Type_Low_Bound.
1250 (Package_Body, Package_Spec): New queries moved
1251 here from GNATprove.
1252 (Package_Specification): Simplify query to remove use of loop.
1253 * sem_util.adb, sem_util.ads (Enclosing_Declaration,
1254 Enclosing_Package_Or_Subprogram, Is_Attribute_Update): New
1255 queries moved here from GNATprove.
1257 2015-05-26 Bob Duff <duff@adacore.com>
1259 * einfo.adb, einfo.ads, sprint.adb, lib-xref.ads: Minor cleanup: Remove
1260 obsolete Entity_Kinds E_String_Type and E_String_Subtype. Update
1261 redundant assertions.
1263 2015-05-26 Gary Dismukes <dismukes@adacore.com>
1265 * sem_util.adb, sem_util.ads, sem_ch13.adb: Minor typo fixes.
1267 2015-05-26 Doug Rupp <rupp@adacore.com>
1269 * init.c [vxworks]: Refine previous checkin.
1271 2015-05-26 Robert Dewar <dewar@adacore.com>
1273 * exp_ch4.adb (Wrap_MA): New function.
1274 (Expand_N_Op_Expon): Use Wrap_MA.
1276 2015-05-26 Bob Duff <duff@adacore.com>
1278 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
1279 Do not use secondary stack to return limited records with
1280 defaulted discriminants. This is an efficiency improvement.
1281 * exp_ch6.adb, exp_dist.adb, sem_attr.adb, sem_aux.adb, sem_aux.ads,
1282 sem_ch12.adb, sem_ch3.adb, sem_ch4.adb, sem_ch6.adb, sem_ch7.adb,
1283 sem_util.adb: Change the sense of Is_Indefinite_Subtype to be
1284 Is_Definite_Subtype. This is an improvement to readability (the double
1285 negative in "not Is_Indefinite_Subtype" was slightly confusing). Also
1286 disallow passing non-[sub]type entities, an unnecessary and slightly
1287 bug-prone flexibility.
1289 2015-05-26 Robert Dewar <dewar@adacore.com>
1291 * sem_aggr.adb (Resolve_Array_Aggregate): Defend against
1293 * debug.adb: Document -gnatd.k.
1294 * erroutc.adb (Set_Msg_Insertion_Line_Number): Implement -gnatd.k.
1296 2015-05-26 Robert Dewar <dewar@adacore.com>
1298 * gnat1drv.adb (Gnat1drv): Provide new arguments for
1299 Get_Target_Parameters.
1300 * restrict.adb (Set_Restriction_No_Specification_Of_Aspect):
1302 (Set_Restriction_No_Use_Of_Attribute): new procedure.
1303 * restrict.ads (Set_Restriction_No_Specification_Of_Aspect):
1305 (Set_Restriction_No_Use_Of_Attribute): new procedure.
1306 * s-rident.ads (Integer_Parameter_Restrictions): New subtype.
1307 * targparm.adb (Get_Target_Parameters): Allow new restriction
1308 pragmas No_Specification_Of_Aspect No_Use_Of_Attribute
1310 * targparm.ads: New parameters for Get_Target_Parameters.
1311 * tbuild.adb (Set_NOD): New name for Set_RND.
1312 (Set_NSA): New procedure.
1313 (Set_NUA): New procedure.
1314 (Set_NUP): New procedure.
1315 * tbuild.ads (Make_SC): Minor reformatting.
1316 (Set_NOD): New name for Set_RND.
1317 (Set_NSA, Set_NUA, Set_NUP): New procedure.
1319 2015-05-26 Ed Schonberg <schonberg@adacore.com>
1321 * a-stwise.adb (Find_Token): If source'first is not positive,
1322 an exception must be raised, as specified by RM 2005 A.4.3
1323 (68/1). This must be checked explicitly, given that run-time
1324 files are normally compiled without constraint checks.
1325 * a-stzsea.adb (Find_Token): Ditto.
1327 2015-05-26 Ed Schonberg <schonberg@adacore.com>
1329 * sem_util.ads sem_util.adb (Is_Current_Instance): New predicate
1330 to fully implement RM 8.6 (17/3). which earlier only applied
1331 to synchronized types. Used to preanalyze aspects that include
1332 current instances of types, such as Predicate and Invariant.
1333 * sem_res.adb (Resolve_Entity_Name): Use Is_Current_Instance.
1334 * sem_ch13.adb (Add_Predicates): In ASIS mode, preserve original
1335 expression of aspect and analyze it to provide proper type
1338 2015-05-26 Robert Dewar <dewar@adacore.com>
1340 * rtsfind.ads: Add entries for RE_Exn[_Long]_Float.
1341 * s-exnllf.adb (Exn_Float): New function.
1342 (Exn_Long_Float): New function.
1343 (Exn_Long_Long_Float): Rewritten interface.
1344 (Exp): New name for what used to be Exn_Long_Long_Float.
1345 * s-exnllf.ads (Exn_Float): New function.
1346 (Exn_Long_Float): New function.
1348 2015-05-26 Ed Schonberg <schonberg@adacore.com>
1350 * sem_ch8.adb (Find_Selected_Component): Do not emit an error
1351 on a selected component when the prefix is a type name that is
1353 * einfo.ads: Minor grammar fix.
1355 2015-05-26 Doug Rupp <rupp@adacore.com>
1357 * init.c [vxworks] (sysLib.h): Only for x86.
1359 2015-05-26 Doug Rupp <rupp@adacore.com>
1361 * init-vxsim.c (CPU): define as __VXSIM_CPU__
1362 * sigtramp-vxworks-vxsim.c (CPU): Likewise.
1363 sigtramp-vxworks-target.inc: Add check for SIMLINUX.
1364 * sigtramp.h: Likewise.
1366 2015-05-26 Robert Dewar <dewar@adacore.com>
1368 * sem_aux.adb, sem_disp.adb, sem_util.ads: Add comment.
1369 * sem_util.adb: Minor reformatting
1371 2015-05-26 Yannick Moy <moy@adacore.com>
1373 * inline.adb (Has_Initialized_Type): Adapt to new names.
1374 * sem_aux.adb, sem_aux.ads (Get_Low_Bound, Number_Components,
1375 Subprogram_Body, Subprogram_Body_Entity, Subprogram_Spec,
1376 Subprogram_Specification): New query functions used in GNATprove.
1377 * sem_disp.adb, sem_disp.ads (Is_Overriding_Subprogram): New
1378 query functions used in GNATprove.
1379 * sem_util.adb, sem_util.adso (Enclosing_Lib_Unit_Node,
1380 Get_Cursor_Type, Get_Return_Object, Get_User_Defined_Eq,
1381 Is_Double_Precision_Floating_Point_Type,
1382 Is_Single_Precision_Floating_Point_Type): New query functions
1385 2015-05-26 Bob Duff <duff@adacore.com>
1387 * s-rpc.ads (Partition_ID): Increase maximum Partition_ID to
1389 * a-except-2005.adb, a-except-2005.ads, a-except.adb,
1390 a-except.ads, a-exexda.adb, a-exstat.adb: Minor comment fixes.
1392 2015-05-26 Robert Dewar <dewar@adacore.com>
1394 * sinfo.adb: Minor comment addition.
1395 * einfo.adb: Minor whitespace and punctuation fix.
1396 * sem_util.adb: Minor editing of comments.
1398 2015-05-26 Ed Schonberg <schonberg@adacore.com>
1400 * sem_ch7.adb (Install_Private_Declarations,
1401 Swap_Private_Dependents): Ensure that both views of the dependent
1402 subtype are immediately visible if we are within their scope. This
1403 may be needed when a procedure body is both the parent of an
1404 instantiated child unit, and is itself used to inline a local
1407 2015-05-26 Gary Dismukes <dismukes@adacore.com>
1409 * exp_prag.adb, gnat1drv.adb: Minor reformatting.
1411 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
1413 * exp_ch4.adb (Expand_N_Indexed_Component): In the circuit
1414 detecting exceptions to the rewriting, deal with implicit
1415 dereferences in the selected component case.
1417 2015-05-26 Bob Duff <duff@adacore.com>
1419 * sem_ch13.adb (Analyze_One_Aspect): Do not
1420 require the expression of the Disable_Controlled aspect to be
1421 static in a generic template, because 'Enabled is not known
1424 2015-05-26 Doug Rupp <rupp@adacore.com>
1426 * init-vxsim.c: New file for vxsim ZCX
1427 * sigtramp-vxworks-vxsim.c: Likewise.
1428 * sigtramp-vxworks.c: Factor out target dependent bits into ...
1429 * sigtramp-vxworks-target.inc: ... here.
1430 * sigtramp.h: Add vxsim zcx protos.
1431 * init.c [vxworks...] (sysLib.h): Include.
1432 (__gnat_map_signal): Make global.
1433 [...i386] (__gnat_error_handler): Call __gnat_vxsim_error_handler if
1435 [...i386] (__gnat_install_handler): Test if on vxsim.
1437 2015-05-26 Ed Schonberg <schonberg@adacore.com>
1439 * sem_ch5.adb (Analyze_Iterator_Specification): For an element
1440 iterator over an array, if the component is aliased, the loop
1441 variable is aliased as well.
1443 2015-05-26 Ed Schonberg <schonberg@adacore.com>
1445 * exp_ch6.adb (Expand_Actuals): For a function call with in-out
1446 parameters that is rewritten as an expression_with_actions,
1447 we preserve the original function call node for further use by
1448 the caller (typically Expand_Call). In the presence of validity
1449 checks, that function call, though it is labelled Analyzed to
1450 prevent an infinite recursion, may be rewritten as a temporary
1451 by Remove_Side_Effects. Ensure that the caller has access to
1452 the original function call to continue expansion.
1453 * atree.ads: Minor typo in comment.
1455 2015-05-26 Javier Miranda <miranda@adacore.com>
1457 * sem_util.adb (Check_Function_Writable_Actuals):
1458 Add missing support to check the violation of writable actuals
1459 in array aggregates that have a nonstatic range.
1461 2015-05-26 Hristian Kirtchev <kirtchev@adacore.com>
1463 * exp_ch6.adb (Process_Contract_Cases_For): Update the call to
1464 Expand_Pragma_Contract_Cases.
1465 * exp_prag.ads, exp_prag.adb (Expand_Contract_Cases): Rename to
1466 Expand_Pragma_Contract_Cases.
1467 * sem_ch13.adb (Add_Invariants): Use the original aspect name
1468 when creating the arguments of pragma Check. This ensures that
1469 'Class is properly recognized and handled.
1471 2015-05-26 Arnaud Charlet <charlet@adacore.com>
1473 * gnat1drv.adb: Minor adjustments.
1474 (Adjust_Global_Switches): Disable some related flags in CodePeer mode.
1475 * sem_ch4.adb (Has_Arbitrary_Evaluation_Order,
1476 Stop_Subtree_Climbind): Code cleanup.
1477 * einfo.ads: Minor comment change.
1479 2015-05-26 Javier Miranda <miranda@adacore.com>
1481 * sem_aggr.adb (Resolve_Aggregate, Resolve_Extension_Aggregate):
1483 * sem_ch3.adb (Build_Derived_Record_Type,
1484 Record_Type_Declaration): Code cleanup.
1485 * sem_ch4.adb (Has_Arbitrary_Evaluation_Order,
1486 Stop_Subtree_Climbind): Tables which speed up the identification
1487 of dangerous calls to Ada 2012 functions with writable actuals
1489 (Analyze_Arithmetic_Op, Analyze_Call, Analyze_Comparison_Op,
1490 Analyze_Equality_Op, Analyze_Logical_Op, Analyze_Membership_Op,
1491 Analyze_Range): Code cleanup.
1492 (Is_Arbitrary_Evaluation_Order_Construct): Removed.
1493 (Check_Writable_Actuals): Code cleanup using the added tables.
1494 * sem_util.adb (Check_Function_Writable_Actuals): Return
1495 immediately if the node does not have the flag Check_Actuals
1498 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
1500 * exp_ch6.adb (Add_Call_By_Copy_Code): Remove restrictive
1501 condition in the detection of the effects of Remove_Side_Effects.
1502 * exp_util.ads (Remove_Side_Effects): Add general and historical note.
1503 * exp_util.adb (Is_Name_Reference): New predicate.
1504 (Remove_Side_Effects): Use it in lieu of Is_Object_Reference
1505 in order to decide whether to use the renaming to capture the
1506 side effects of the subexpression.
1507 (Side_Effect_Free): Remove obsolete test.
1509 2015-05-26 Robert Dewar <dewar@adacore.com>
1511 * aspects.ads, aspects.adb: Add aspect Disable_Controlled.
1512 * einfo.ads, einfo.adb (Disable_Controlled): New flag.
1513 (Is_Controlled_Active): New function.
1514 * exp_ch3.adb (Expand_Freeze_Record_Type): Use
1515 Is_Controlled_Active.
1516 * exp_util.adb (Needs_Finalization): Finalization not needed
1517 if Disable_Controlled set.
1518 * freeze.adb (Freeze_Array_Type): Do not set
1519 Has_Controlled_Component if the component has Disable_Controlled.
1520 (Freeze_Record_Type): ditto.
1521 * sem_ch13.adb (Decorate): Minor reformatting.
1522 (Analyze_Aspect_Specifications): Implement Disable_Controlled.
1523 * sem_ch3.adb (Analyze_Object_Declaration): Handle
1525 (Array_Type_Declaration): ditto.
1526 (Build_Derived_Private_Type): ditto.
1527 (Build_Derived_Type): ditto.
1528 (Record_Type_Definition): ditto.
1529 * snames.ads-tmpl: Add Name_Disable_Controlled.
1531 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
1533 * exp_ch6.adb (Expand_Actuals): Use a constant declaration instead
1534 of a renaming to capture the return value of a function call.
1535 (Expand_Simple_Function_Return): Call Remove_Side_Effects
1536 instead of removing side effects manually before the call to
1539 2015-05-26 Robert Dewar <dewar@adacore.com>
1541 * exp_ch4.adb (Expand_N_Op_Expon): Deal with problem of wrong
1542 order in calling Duplicate_Subexpr.
1543 * einfo.ads: Fix documentation of Object/Value size for scalar types.
1545 2015-05-26 Ed Schonberg <schonberg@adacore.com>
1547 * exp_aggr.adb (Build_Array_Aggr_Code, Gen_Assign):
1548 If a component is default-initialized and its type has an
1549 invariant procedure, insert an invariant test after code for
1550 default-initialization of the component.
1552 2015-05-26 Gary Dismukes <dismukes@adacore.com>
1554 * einfo.ads, sem_util.adb, sem_ch4.adb: Minor reformatting.
1556 2015-05-26 Robert Dewar <dewar@adacore.com>
1558 * exp_unst.adb, exp_unst.ads: Change to using Subps table index for
1559 making AREC entity names unique.
1561 2015-05-26 Ed Schonberg <schonberg@adacore.com>
1563 * sem_cat.adb (Has_Stream_Attribute_Definition): If the type
1564 has aspect specifications, examine the corresponding list of
1565 representation items to determine whether there is a visible
1566 stream operation. The attribute definition clause generated from
1567 the aspect will be inserted at the freeze point of the type,
1568 which may be in the private part and not directly visible,
1569 but the aspect makes the operation available to a client.
1571 2015-05-26 Robert Dewar <dewar@adacore.com>
1573 * sem_util.adb: Minor code reorganization.
1574 * sem_ch6.adb: Minor reformatting.
1576 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
1578 * gcc-interface/utils.c (maybe_pad_type): Do not apply adjustment to
1579 original size for elementary types before issuing the size warning.
1581 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
1583 * get_targ.adb (C_Get_Float_Words_BE): Adjust import name.
1584 (C_Get_Words_BE): Likewise.
1585 (C_Get_Bytes_BE): Likewise.
1586 (C_Get_Bits_BE): Likewise.
1587 (Width_From_Size): Remove superfluous space.
1588 * gcc-interface/targtyps.c (get_float_words_be): Rename into...
1589 (get_target_float_words_be): ...this.
1590 (get_words_be): Rename into...
1591 (get_target_words_be): ...this.
1592 (get_bytes_be): Rename into...
1593 (get_target_bytes_be): ...this.
1594 (get_bits_be): Rename into...
1595 (get_target_bits_be): ...this.
1596 * gcc-interface/gigi.h (standard_datatypes): Remove ADT_ptr_void_type.
1597 (ptr_void_type_node): Delete.
1598 (get_target_float_size): Likewise.
1599 (get_target_double_size): Likewise.
1600 (get_target_long_double_size): Likewise.
1601 (get_float_words_be): Likewise.
1602 (get_words_be): Likewise.
1603 (get_bytes_be): Likewise.
1604 (get_bits_be): Likewise.
1605 (get_target_float_words_be): Declare.
1606 (get_target_words_be): Likewise.
1607 (get_target_bytes_be): Likewise.
1608 (get_target_bits_be): Likewise.
1609 * gcc-interface/decl.c (gnat_to_gnu_entity): Replace ptr_void_type_node
1611 (intrin_return_compatible_p): Likewise.
1612 * gcc-interface/trans.c (gigi): Likewise.
1613 * gcc-interface/utils2.c (maybe_wrap_malloc): Likewise.
1614 (maybe_wrap_free): Likewise.
1615 * gcc-interface/utils.c (maybe_pad_type): Remove superfluous space.
1616 * gcc-interface/misc.c (gnat_init): Do not set ptr_void_type_node.
1618 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
1620 * gcc-interface/decl.c (elaborate_expression): Take a const string
1621 suffix instead of a tree.
1622 (elaborate_expression_1): Likewise.
1623 (elaborate_expression_2): Likewise.
1624 (gnat_to_gnu_entity): Adjust to above changes.
1625 (build_subst_list): Likewise.
1626 (get_entity_char): New static function.
1628 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
1630 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: Move around.
1631 <E_Exception>: Merge with E_Variable case.
1632 <E_Variable>: Remove 'object' label.
1634 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
1636 * gcc-interface/decl.c (gnat_to_gnu_entity): Minor tweak.
1637 * gcc-interface/trans.c (finalize_nrv_unc_r): Use CONSTRUCTOR_ELT.
1638 * gcc-interface/utils.c (convert): Likewise and simplify.
1639 (remove_conversions): Likewise.
1640 * gcc-interface/utils2.c (compare_fat_pointers): Likewise.
1641 (build_unary_op): Likewise and simplify.
1643 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
1645 * gcc-interface/gigi.h (build_atomic_load): Adjust prototype.
1646 (build_atomic_store): Likewise.
1647 (build_load_modify_store): Declare.
1648 (VECTOR_TYPE_P): Delete.
1649 * gcc-interface/decl.c (gnat_to_gnu_entity): Replace Is_Atomic with
1650 Is_Atomic_Or_VFA throughout.
1651 <E_Array_Type>: Build a variant of the XUA type instead of forcing
1652 TYPE_VOLATILE on it.
1653 <E_Array_Subtype>: Use the main variant of the base type.
1654 Do not force TYPE_VOLATILE on the type being built.
1655 <E_Record_Type>: Likewise.
1656 <E_Array_Subtype>: Likewise.
1657 <E_Subprogram_Type>: Rename local variable.
1658 Add Atomic qualifier in conjunction with Volatile on types if needed.
1659 Force BLKmode for by-ref types only at the end of the processing.
1660 Change qualifiers only after changing the mode of the type. Set
1661 TYPE_UNIVERSAL_ALIASING_P on the type directly.
1662 (check_ok_for_atomic_type): Issue specific error message for VFA.
1663 (gnat_to_gnu_component_type): Replace Is_Atomic with
1664 Is_Atomic_Or_VFA throughout.
1665 * gcc-interface/misc.c (gnat_get_alias_set): Test
1666 TYPE_UNIVERSAL_ALIASING_P on the type directly.
1667 * gcc-interface/trans.c (lvalue_required_p): Replace Is_Atomic with
1668 Is_Atomic_Or_VFA throughout. Add missing guard.
1669 (node_is_atomic): New predicate.
1670 (node_has_volatile_full_access): Likewise.
1671 (gnat_strip_type_conversion): New function.
1672 (outer_atomic_access_required_p): New predicate.
1673 (atomic_sync_required_p): Rename into...
1674 (atomic_access_required_p): ...this. Add SYNC parameter, scan the
1675 parent node first and then look for the atomic setting. Add support
1676 for Volatile_Full_Access.
1677 (Call_to_gnu): Add atomic_access and outer_atomic_access parameters
1678 and adjusts calls to above functions. Use load-modify-store sequence
1679 for updates of In/Out and Out parameters if required, as well as for
1680 moving the result to the target if required. Add couple of missing
1682 (gnat_to_gnu): Adjust calls to above functions.
1683 <N_Object_Renaming_Declaration>: If the renamed object has side-effects
1684 evaluate only its address.
1685 <N_Assignment_Statement>: Adjust call to Call_to_gnu. Use load-modify
1686 store sequence if required.
1687 <N_Function_Call>: Adjust call to Call_to_gnu.
1688 (extract_values): Adjust comment.
1689 * gcc-interface/utils2.c (build_atomic_load): Add SYNC parameter and
1690 use relaxed memory model if it is not set.
1691 (build_atomic_store): Likewise.
1692 (call_is_atomic_load): New predicate.
1693 (build_load_modify_store): New function.
1694 (build_binary_op) <MODIFY_EXPR>: Accept SAVE_EXPR on the LHS.
1695 (gnat_stabilize_reference) <CALL_EXPR>: Deal with atomic loads.
1697 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
1699 * gcc-interface/ada-tree.h (DECL_RENAMING_GLOBAL_P): Rename into...
1700 (DECL_GLOBAL_NONCONSTANT_RENAMING_P): ...this.
1701 * gcc-interface/gigi.h (record_global_renaming_pointer): Delete.
1702 (invalidate_global_renaming_pointers): Likewise.
1703 (record_global_nonconstant_renaming): New.
1704 (invalidate_global_nonconstant_renamings): Likewise.
1705 (get_inner_constant_reference): Likewise.
1706 (gnat_constant_reference_p): Likewise.
1707 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Adjust to above
1708 and register the renaming pointer only if the object is non-constant.
1709 (elaborate_expression_1): Call get_inner_constant_reference instead
1710 of get_inner_reference.
1711 * gcc-interface/trans.c (fold_constant_decl_in_expr): Minor tweak.
1712 (Identifier_to_gnu): Adjust to above and do not recheck the renamed
1713 object before substituting it.
1714 (Compilation_Unit_to_gnu): Adjust to above renaming. Minor tweaks.
1715 (gnat_to_gnu) <N_Object_Renaming_Declaration>: Do not return the
1716 result at the global level.
1717 (N_Exception_Renaming_Declaration): Likewise.
1718 * gcc-interface/utils.c (global_renaming_pointers): Rename into...
1719 (global_nonconstant_renamings): ...this.
1720 (destroy_gnat_utils): Adjust to above renaming.
1721 (record_global_renaming_pointer): Rename into...
1722 (record_global_nonconstant_renaming): ...this.
1723 (invalidate_global_renaming_pointers): Rename into...
1724 (invalidate_global_nonconstant_renamings): ...this and do not recheck
1725 the renamed object before invalidating.
1726 * gcc-interface/utils2.c (gnat_stabilize_reference): Minor tweak.
1727 (get_inner_constant_reference): New public function.
1728 (gnat_constant_reference_p): New predicate.
1730 2015-05-25 Javier Miranda <miranda@adacore.com>
1732 * einfo.ads, einfo.adb (Has_Out_Or_In_Out_Parameter): This attribute
1733 is now present in subprograms, generic subprograms, entries and
1735 * sem_ch6.adb (Set_Formal_Mode): Set As_Out_Or_In_Out_Parameter
1736 on entries, entry families, subprograms and generic subprograms.
1737 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration):
1738 Minor code reorganization to ensure that the Ekind attribute
1739 of the subprogram entity is set before its formals are
1740 processed. Required to allow the use of the attribute
1741 Has_Out_Or_In_Out_Parameter on the subprogram entity.
1742 * sem_aggr.adb (Resolve_Aggregate, Resolve_Extension_Aggregate):
1743 Perform the check on writable actuals only if the value of some
1744 component of the aggregate involves calling a function with
1745 out-mode parameters.
1746 (Resolve_Record_Aggregate): Propagate the Check_Actuals flag to the
1747 internally built aggregate.
1748 * sem_ch3.adb (Build_Derived_Record_Type, Record_Type_Declaration):
1749 Perform the check on writable actuals only if the initialization of
1750 some component involves calling a function with out-mode parameters.
1751 * sem_ch4.adb (Analyze_Arithmetic_Op, Analyze_Comparison_Op,
1752 Analyze_Equality_Op, Analyze_Logical_Op, Analyze_Membership_Op,
1753 Analyze_Range): Check writable actuals only if the
1754 subtrees have a call to a function with out-mode parameters
1755 (Analyze_Call.Check_Writable_Actuals): New subprogram. If the call
1756 has out or in-out parameters then mark its outermost enclosing
1757 construct as a node on which the writable actuals check must
1759 (Analyze_Call): Check if the flag must be set and if the outermost
1760 enclosing construct.
1761 * sem_util.adb (Check_Function_Writable_Actuals): Code cleanup
1762 and reorganization. We skip processing aggregate discriminants
1763 since their precise analysis involves two phases traversal.
1764 * sem_res.adb (Resolve_Actuals, Resolve_Arithmetic_Op,
1765 Resolve_Logical_Op, Resolve_Membership_Op): Remove call to
1766 check_writable_actuals.
1768 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1770 * sem_ch3.adb (Constrain_Concurrent): If the context is a
1771 type declaration, generate an Itype_Reference for the anonymous
1772 subtype, to force elaboration at this point in gigi.
1774 2015-05-22 Gary Dismukes <dismukes@adacore.com>
1776 * layout.adb, einfo.ads, sem_ch12.adb, freeze.adb, sem_util.ads,
1777 exp_ch4.adb, sem_ch6.adb: Minor reformatting and typo fixes.
1779 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1781 * sem_res.adb (Resolve_Actuals): If the call is to an overridden
1782 operation, replace the names of the actuals in named associations
1783 with the names of the actuals of the subprogram that is eventually
1784 executed. The names of the formals and the defaults can differ
1785 between the two operations when they are operations of a formal
1788 2015-05-22 Bob Duff <duff@adacore.com>
1790 * a-convec.ads, a-convec.adb (Append): Check for fast path. Split
1791 out slow path into separate procedure. Inline Append. Fast path
1792 now avoids calling Insert.
1793 (Finalize): Do the busy checking last, so the container gets emptied.
1794 (Insert, Insert_Space): Remove redundancy.
1796 2015-05-22 Robert Dewar <dewar@adacore.com>
1798 * switch-c.adb (Scan_Front_End_Switches): Insist on -gnatc
1801 2015-05-22 Arnaud Charlet <charlet@adacore.com>
1803 * gnatvsn.ads: Minor code reorg to remember more easily to update
1806 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1808 * sem_ch10.adb (Analyze_With_Clause): In ASIS_Mode, a
1809 limited_with clause on a predefined unit is not transformed into
1810 a regular with_clause, to preserve the original tree structure.
1811 * sinfo.ads (N_With_Clause): Add comment on handling of
1813 * sem_ch10.adb: Minor reformatting.
1815 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1817 * sem_ch8.adb (Freeze_Profile): A limited view of a type in
1818 the profile of a subprogram renaming does not require freezing,
1819 because it is declared in a different unit.
1821 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1823 * exp_aggr.adb (Get_Constraint_Association): If type (of ancestor
1824 composite type) is private, go to full view. This was previously
1825 done only in an instance context, but is happen whenever a chain
1826 of private extensions includes one inherited discriminant.
1828 2015-05-22 Robert Dewar <dewar@adacore.com>
1830 * einfo.ads: Minor comment updates.
1831 * exp_unst.adb: Move Subps table to spec Don't remove old entries
1832 from table Add Last field to record last entry used.
1833 * exp_unst.ads: Move Subps table here from body So that Cprint
1834 can access saved values.
1836 2015-05-22 Bob Duff <duff@adacore.com>
1838 * a-cdlili.adb, a-cdlili.ads, a-cohama.adb, a-cohama.ads,
1839 * a-cohase.adb, a-cohase.ads, a-convec.adb, a-convec.ads,
1840 * a-coorma.adb, a-coorma.ads, a-coorse.adb, a-coorse.ads:
1841 (Pseudo_Reference, Element_Access, Get_Element_Access): New
1842 declarations added for use by performance improvements in exp_ch5.adb.
1843 * snames.ads-tmpl: New names referenced by exp_ch5.adb.
1844 * exp_ch5.adb: Speed up "for ... of" loops for predefined containers.
1845 Instead of doing literally what the RM calls for, we do something
1846 equivalent that avoids expensive operations inside the loop. If the
1847 container package has appropriate Next, Pseudo_Reference,
1848 Element_Access, Get_Element_Access declarations, we invoke the
1850 * snames.ads-tmpl: Note speed improvement.
1852 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
1854 * einfo.ads (Is_Atomic_Or_VFA): Move to XEINFO INLINES section.
1855 * xeinfo.adb: Replace a-einfo.h with einfo.h throughout.
1856 Add pattern to translate "or else" into "||".
1858 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
1860 * einfo.ads (Has_Volatile_Full_Access): Rename into...
1861 (Is_Volatile_Full_Access): ...this.
1862 (Set_Has_Volatile_Full_Access): Rename into...
1863 (Set_Is_Volatile_Full_Access): ...this.
1864 * einfo.adb (Has_Volatile_Full_Access): Rename into...
1865 (Is_Volatile_Full_Access): ...this.
1866 (Set_Has_Volatile_Full_Access): Rename into...
1867 (Set_Is_Volatile_Full_Access): ...this.
1868 (Is_Atomic_Or_VFA): Adjust to above renaming.
1869 * errout.adb (Special_Msg_Delete): Likewise.
1870 * exp_pakd.adb (Install_PAT): Likewise.
1871 * freeze.adb (Freeze_Array_Type): Likewise.
1872 * sem_ch8.adb (Analyze_Object_Renaming): Likewise.
1873 * sem_ch13.adb (Inherit_Delayed_Rep_Aspects): Likewise.
1874 (Inherit_Aspects_At_Freeze_Point): Likewise.
1875 * sem_prag.adb (Set_Atomic_VFA): Likewise.
1876 (Process_Atomic_Independent_Shared_Volatile): Likewise.
1877 * sem_util.adb (Is_Atomic_Or_VFA_Object): Likewise.
1879 2015-05-22 Robert Dewar <dewar@adacore.com>
1881 * exp_ch5.adb, layout.adb, einfo.adb, einfo.ads, sem_prag.adb,
1882 freeze.adb, freeze.ads, sem_util.adb, sem_util.ads, exp_ch2.adb,
1883 exp_ch4.adb, errout.adb, exp_aggr.adb, sem_ch13.adb: This is a general
1884 change that deals with the fact that most of the special coding for
1885 Atomic should also apply to the case of Volatile_Full_Access.
1886 A new attribute Is_Atomic_Or_VFA is introduced, and many of the
1887 references to Is_Atomic now use this new attribute.
1889 2015-05-22 Robert Dewar <dewar@adacore.com>
1891 * exp_ch4.adb (Expand_N_Op_Eq): Introduce 'Machine for 'Result
1894 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
1896 * sprint.adb (Source_Dump): When generating debug files, deal
1897 with the case of a stand-alone package instantiation by dumping
1898 together the spec and the body in the common debug file.
1900 2015-05-22 Robert Dewar <dewar@adacore.com>
1902 * sem_ch13.adb (Minimum_Size): Size is zero for null range
1905 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1907 * einfo.adb (Anonymous_Master): This attribute now applies
1908 to package and subprogram bodies.
1909 (Set_Anonymous_Master): This attribute now applies to package and
1911 (Write_Field36_Name): Add output for package and subprogram bodies.
1912 * einfo.ads Update the documentation on attribute Anonymous_Master
1913 along with occurrences in entities.
1914 * exp_ch4.adb (Create_Anonymous_Master): Reimplemented to
1915 handle spec and body anonymous masters of the same unit.
1916 (Current_Anonymous_Master): Reimplemented. Handle a
1917 package instantiation that acts as a compilation unit.
1918 (Insert_And_Analyze): Reimplemented.
1920 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1922 * sem_ch10.adb (Analyze_With_Clause): A limited_with_clause on a
1923 predefined unit is treated as a regular with_clause.
1925 2015-05-22 Robert Dewar <dewar@adacore.com>
1927 * sem_ch12.adb, prj.ads, makeutl.ads, sem_ch6.adb, prj-nmsc.adb,
1928 prj-conf.adb, sem_disp.adb: Minor reformatting.
1930 2015-05-22 Vincent Celier <celier@adacore.com>
1932 * clean.adb (Parse_Cmd_Line): For native gnatclean, check
1933 for switch -P and, if found and gprclean is available, invoke
1935 * make.adb (Initialize): For native gnatmake, check for switch -P
1936 and, if found and gprbuild is available, invoke silently gprbuild.
1938 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
1940 * sem_ch13.adb (Validate_Unchecked_Conversions): Also issue
1941 specific warning for discrete types when the source is larger
1944 2015-05-22 Ed Schonberg <schonberg@adacore.com>
1946 * einfo.ads, einfo.adb (Incomplete_Actuals): New attribute of
1947 package instantiations. Holds the list of actuals in the instance
1948 that are incomplete types, to determine where the corresponding
1949 instance body must be placed.
1950 * sem_ch6.adb (Conforming_Types): An incomplete type used as an
1951 actual in an instance matches an incomplete formal.
1952 * sem_disp.adb (Check_Dispatching_Call): Handle missing case of
1953 explicit dereference.
1954 (Inherited_Subprograms): In the presence of a limited view there
1955 are no subprograms to inherit.
1956 * sem_ch12.adb (Preanalyze_Actuals): Build list of incomplete
1957 actuals of instance, for later placement of instance body and
1958 freeze nodes for actuals.
1959 (Install_Body): In the presence of actuals that incomplete types
1960 from a limited view, the instance body cannot be placed after
1961 the declaration because full views have not been seen yet. Any
1962 use of the non-limited views in the instance body requires
1963 the presence of a regular with_clause in the enclosing unit,
1964 and will fail if this with_clause is missing. We place the
1965 instance body at the beginning of the enclosing body, which is
1966 the unit being compiled, and ensure that freeze nodes for the
1967 full views of the incomplete types appear before the instance.
1969 2015-05-22 Pascal Obry <obry@adacore.com>
1971 * makeutl.ads, prj-conf.adb, prj-nmsc.adb, prj.ads
1972 (In_Place_Option): Removed.
1973 (Relocate_Build_Tree_Option): New constant.
1974 (Root_Dir_Option): New constant.
1975 (Obj_Root_Dir): Removed.
1976 (Build_Tree_Dir): New variable.
1977 (Root_Src_Tree): Removed.
1978 (Root_Dir): New variable.
1979 * prj-conf.adb (Get_Or_Create_Configuration_File): Add check
1980 for improper relocation.
1981 * prj-nmsc.adb (Locate_Directory): Add check for improper
1984 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1986 * einfo.adb (Default_Init_Cond_Procedure): Code cleanup. The
1987 attribute now applies to the base type.
1988 (Has_Default_Init_Cond): Now applies to the base type.
1989 (Has_Inherited_Default_Init_Cond): Now applies to the base type.
1990 (Set_Default_Init_Cond_Procedure): Code cleanup. The attribute now
1991 applies to the base type.
1992 (Set_Has_Default_Init_Cond): Now applies to the base type.
1993 (Set_Has_Inherited_Default_Init_Cond): Now applies to the base type.
1994 * exp_ch3.adb (Expand_N_Object_Declaration): No need to use the
1995 base type when adding a call to the Default_Initial_Condition.
1997 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
1999 * einfo.adb: Node36 is now used as Anonymous_Master. Flag253
2001 (Anonymous_Master): New routine.
2002 (Has_Anonymous_Master): Removed.
2003 (Set_Anonymous_Master): New routine.
2004 (Set_Has_Anonymous_Master): Removed.
2005 (Write_Entity_Flags): Remove the output for Has_Anonymous_Maser.
2006 (Write_Field36_Name): Add output for Anonymous_Master.
2007 * einfo.ads Add new attribute Anonymous_Master along with
2008 occurrences in nodes. Remove attribute Has_Anonymous_Master along
2009 with occurrences in nodes.
2010 (Anonymous_Master): New routine along with pragma Inline.
2011 (Has_Anonymous_Master): Removed along with pragma Inline.
2012 (Set_Anonymous_Master): New routine along with pragma Inline.
2013 (Set_Has_Anonymous_Master): Removed along with pragma Inline.
2014 * exp_ch4.adb (Create_Anonymous_Master): New routine.
2015 (Current_Anonymous_Master): Reimplemented.
2017 2015-05-22 Bob Duff <duff@adacore.com>
2019 * freeze.adb (Freeze_Profile): Suppress warning if imported
2020 subprogram is not at library level.
2022 2015-05-22 Robert Dewar <dewar@adacore.com>
2024 * sem_ch8.adb (Analyze_Object_Renaming): Check for renaming
2025 component of an object to which Volatile_Full_Access applies.
2027 2015-05-22 Jerome Guitton <guitton@adacore.com>
2029 * exp_dbug.ads: Add note about non bit-packed arrays.
2031 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
2033 * sem_prag.adb: Fix typo.
2034 * einfo.ads: Grammar fixes in comments.
2036 2015-05-22 Bob Duff <duff@adacore.com>
2038 * a-cborma.ads, a-cidlli.ads, a-cimutr.ads, a-ciormu.ads,
2039 * a-cihase.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
2040 * a-cborse.ads, a-comutr.ads, a-ciorma.ads, a-cobove.ads,
2041 * a-coormu.ads, a-convec.ads, a-cohase.ads, a-coinho.ads,
2042 * a-cbdlli.ads, a-cbmutr.ads, a-cbhase.ads, a-cdlili.ads,
2043 * a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
2044 * a-coinho-shared.ads (Constant_Reference_Type, Reference_Type):
2045 Add an initialization expression "raise Program_Error". See,
2046 for example, RM-A.18.2(148.4).
2048 2015-05-22 Robert Dewar <dewar@adacore.com>
2050 * debug.adb: Update documentation.
2051 * einfo.ads, einfo.adb (Needs_Typedef): New flag
2052 * exp_unst.adb (Unnest_Subprogram): Mark AREC types as needing
2054 * frontend.adb: Update comments.
2055 * gnat1drv.adb (Adjust_Global_Switches): Set all needed flags
2057 * opt.ads (Generate_C_Code): New switch.
2058 * osint-c.adb (Write_C_File_Info): Removed, not used
2059 (Write_H_File_Info): Removed, not used
2060 * osint-c.ads (Write_C_File_Info): Removed, not used
2061 (Write_H_File_Info): Removed, not used
2062 * osint.ads (Write_Info): Minor comment updates.
2063 (Output_FD): Moved from private part to public part of spec.
2064 * sem.adb (Semantics): Force expansion on if in Generate_C_Code
2066 * atree.ads: minor typo in comment.
2067 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
2068 Do not allow VFA on composite object with aliased component.
2070 2015-05-22 Arnaud Charlet <charlet@adacore.com>
2072 * osint-c.adb, osint-c.ads (Set_File_Name): Move back to spec.
2074 2015-05-22 Pascal Obry <obry@adacore.com>
2076 * prj-util.adb: Minor comment editing.
2078 2015-05-22 Pascal Obry <obry@adacore.com>
2080 * makeutl.ads (In_Place_Option): New constant.
2081 * prj.ads (Obj_Root_Dir): New variable (absolute path to relocate
2083 (Root_Src_Tree): New variable (absolute path of root source tree).
2084 * prj-conf.adb (Do_Autoconf): Take into account the object root
2085 directory (if defined) to generate configuration project.
2086 * prj-nmsc.adb (Get_Directories): Handle case where Obj_Root_Dir
2088 (Locate_Directory): Likewise.
2090 2015-05-22 Pascal Obry <obry@adacore.com>
2092 * prj-util.ads, prj-util.adb (Relative_Path): New routine.
2094 2015-05-22 Bob Duff <duff@adacore.com>
2096 * exp_utils.ads, exp_utils.adb (Find_Optional_Prim_Op): New
2097 interface to return Empty when not found, so we can avoid handling
2098 Program_Error in that case.
2099 (Find_Prim_Op): Fix latent bug: raise Program_Error when there are no
2101 * exp_ch7.adb, sem_util.adb: Use Find_Optional_Prim_Op when the
2102 code is expecting Empty.
2103 * sem_ch8.adb: Use Find_Optional_Prim_Op to avoid handling
2106 2015-05-22 Robert Dewar <dewar@adacore.com>
2108 * sem_ch3.adb, sem_intr.adb, exp_ch4.adb, s-rannum.adb,
2109 sem_eval.adb, s-fatgen.adb, s-expmod.ads: Remove incorrect hyphen in
2111 * exp_util.adb: Add comment.
2112 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move from spec to
2114 (Set_File_Name): New name for the above.
2115 (Create_C_File, Create_H_File, Write_C_File_Info, Write_H_File_Info,
2116 Close_C_File, Close_H_File): New procedure.
2117 * osint.adb: Minor reformatting.
2118 * osint.ads: Minor comment updates.
2120 2015-05-22 Robert Dewar <dewar@adacore.com>
2122 * exp_ch4.adb: Minor rewording.
2123 * exp_util.ads: Clarify that Find_Prim_Op is only for
2126 2015-05-22 Robert Dewar <dewar@adacore.com>
2128 * atree.adb, atree.ads, treepr.adb: Change name Needs_Actuals_Check to
2130 * exp_ch4.adb (Expand_N_Op_Expon): Optimize 2**x in modular
2133 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
2135 * exp_pakd.adb (Install_PAT): Propagate representation aspects
2136 from the original array type to the PAT.
2138 2015-05-22 Robert Dewar <dewar@adacore.com>
2140 * treepr.adb (Print_Node_Header): Add output of Needs_Actuals_Check.
2142 2015-05-22 Robert Dewar <dewar@adacore.com>
2144 * atree.adb, atree.ads (Needs_Actuals_Check): New flag.
2146 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
2148 * sem_prag.adb (Analyze_Pragma): Remove the detection
2149 of a useless Part_Of indicator when the related item is a constant.
2150 (Check_Matching_Constituent): Do not emit an error on a constant.
2151 (Check_Missing_Part_Of): Do not check for a missing Part_Of indicator
2152 when the related item is a constant.
2153 (Collect_Body_States): Code cleanup.
2154 (Collect_Visible_States): Code cleanup.
2155 (Report_Unused_States): Do not emit an error on a constant.
2156 * sem_util.ads, sem_util.adb (Has_Variable_Input): Removed.
2158 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
2160 * sem_ch8.adb (Analyze_Object_Renaming): Copy
2161 Has_Volatile_Full_Access from renamed to renaming entities.
2162 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
2163 Tidy up and remove redundant setting of Has_Volatile_Full_Access.
2165 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
2167 * ghost.adb (Check_Ghost_Completion): Update references to SPARK
2169 (Check_Ghost_Policy): Update references to SPARK RM 6.9 rules.
2170 * sem_ch3.adb (Analyze_Object_Declaration): Update references
2171 to SPARK RM 6.9 rules.
2172 (Check_Completion): Ghost entities do not require a special form of
2174 * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Update references
2175 to SPARK RM 6.9 rules.
2176 (Analyze_Subprogram_Body_Helper): Update references to SPARK RM 6.9
2178 * sem_ch7.adb (Analyze_Package_Body_Helper): Update references
2179 to SPARK RM 6.9 rules.
2180 (Requires_Completion_In_Body): Ghost entities do not require a special
2183 2015-05-22 Robert Dewar <dewar@adacore.com>
2185 * a-csquin.ads: Use Ada 2012 notation.
2186 * sem_ch8.adb: Minor reformatting.
2188 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
2190 * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect Import
2191 acts as a completion.
2193 2015-05-22 Ed Schonberg <schonberg@adacore.com>
2195 * sem_ch13.adb: Minor reformatting.
2197 2015-05-22 Jose Ruiz <ruiz@adacore.com>
2199 * a-reatim.adb: Minor change, fix typo.
2201 2015-05-22 Robert Dewar <dewar@adacore.com>
2203 * sem_util.ads: Minor addition of ??? comment.
2204 * sem_prag.adb, sem_util.adb: Minor reformatting.
2205 * sem_ch13.adb: minor reformatting.
2207 2015-05-22 Robert Dewar <dewar@adacore.com>
2209 * a-reatim.ads: Add Compile_Time_Error to ensure Duration
2211 * sem_ch13.adb: Improve error message.
2212 * exp_ch4.adb: Minor reformatting.
2214 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
2216 * sem_prag.adb (Analyze_Pragma): Constants without variable
2217 input do not require indicator Part_Of.
2218 (Check_Missing_Part_Of): Constants without variable input do not
2219 requrie indicator Part_Of.
2220 (Collect_Visible_States): Constants without variable input are
2221 not part of the hidden state of a package.
2222 * sem_util.ads, sem_util.adb (Has_Variable_Input): New routine.
2224 2015-05-22 Robert Dewar <dewar@adacore.com>
2226 * exp_util.adb (Activate_Atomic_Synchronization): Do not set
2227 Atomic_Sync_Required for an object renaming declaration.
2228 * sem_ch8.adb (Analyze_Object_Renaming): Copy Is_Atomic and
2229 Is_Independent to renaming object.
2231 2015-05-22 Ed Schonberg <schonberg@adacore.com>
2233 * sem_ch5.adb (Analyze_Iterator_Specification): Diagnose
2234 various illegalities in iterators over arrays and containers:
2235 a) New function Get_Cursor_Type, to verify that the cursor is
2236 not a limited type at the point of iteration.
2237 b) If the container is a constant, an element_iterator is illegal
2238 if the container type does not have a Constant_Indexing aspect.
2239 c) If the iterate function has an in-out controlling parameter,
2240 the container cannot be a constant object.
2241 d) Reject additional cases of iterators over a
2242 discriminant-dependent component of a mutable object.
2244 2015-05-21 Hristian Kirtchev <kirtchev@adacore.com>
2246 * einfo.adb (Contract): This attribute now applies to constants.
2247 (Set_Contract): This attribute now applies to constants.
2248 (Write_Field34_Name): Add output for constants.
2249 * einfo.ads Attribute Contract now applies to constants.
2250 * sem_ch3.adb (Analyze_Object_Contract): Constants now have
2251 their Part_Of indicator verified.
2252 * sem_prag.adb (Analyze_Constituent): A constant is now a valid
2254 (Analyze_Global_Item): A constant cannot act as an output.
2255 (Analyze_Initialization_Item): Constants are now a valid
2256 initialization item.
2257 (Analyze_Initializes_In_Decl_Part): Rename
2258 global variable States_And_Vars to States_And_Objs and update
2259 all its occurrences.
2260 (Analyze_Input_Item): Constants are now a
2261 valid initialization item. Remove SPARM RM references from error
2263 (Analyze_Pragma): Indicator Part_Of can now apply to a constant.
2264 (Collect_Body_States): Collect both source constants
2266 (Collect_States_And_Objects): Collect both source constants and
2268 (Collect_States_And_Variables): Rename
2269 to Collect_States_And_Objects and update all its occurrences.
2270 (Collect_Visible_States): Do not collect constants and variables
2271 used to map generic formals to actuals.
2272 (Find_Role): The role of a constant is that of an input. Separate the
2273 role of a variable from that of a constant.
2274 (Report_Unused_Constituents): Add specialized wording for constants.
2275 (Report_Unused_States): Add specialized wording for constants.
2276 * sem_util.adb (Add_Contract_Item): Add processing for constants.
2277 * sem_util.ads (Add_Contract_Item): Update the comment on usage.
2278 (Find_Placement_In_State_Space): Update the comment on usage.
2280 2015-05-21 Ed Schonberg <schonberg@adacore.com>
2282 * sem_ch5.adb: minor reformatting.
2284 2015-05-21 Robert Dewar <dewar@adacore.com>
2286 * freeze.adb (Freeze_Entity): Properly tag -gnatw.z messages.
2288 2015-05-21 Robert Dewar <dewar@adacore.com>
2290 * freeze.adb: Minor reformatting.
2291 * cstand.adb (Print_Standard): Fix bad printing of Duration
2293 * a-reatim.adb (Time_Of): Complete rewrite to properly detect
2296 2015-05-21 Ed Schonberg <schonberg@adacore.com>
2298 * sem_ch5.adb: add (useless) initial value.
2299 * sem_ch3.adb (Replace_Anonymous_Access_To_Protected_Subprogram):
2300 Check whether the procedure has parameters before processing
2301 formals in ASIS mode.
2303 2015-05-21 Ed Schonberg <schonberg@adacore.com>
2305 * sem_ch13.adb (Check_Iterator_Functions): Emit error on Iterator
2306 aspect as well when indexing function is illegal.
2307 (Valid_Default_Iterator): Handle properly somme illegal cases
2308 to prevent compilation abandoned messages.
2309 (Check_Primitive_Function): Verify that type and indexing function
2310 are in the same scope.
2311 * freeze.adb (Freeze_Record): Extend patch on the presence of
2312 indexing aspects to aspect Default_Iterator.
2314 2015-05-19 David Malcolm <dmalcolm@redhat.com>
2316 * gcc-interface/trans.c (Sloc_to_locus1): Strenghthen local "map"
2317 from line_map * to line_map_ordinary *.
2319 2015-05-12 Jason Merrill <jason@redhat.com>
2321 * sigtramp-vxworks.c: Add space between string literal and macro
2324 2015-05-12 Arnaud Charlet <charlet@adacore.com>
2326 * gnat_rm.texi, gnat_ugn.texi, doc: Documentation updates and clean ups
2328 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2330 * sem_ch5.adb (Analyze_Iterator_Specifications): Additional
2331 legality checks for array and container iterators:
2332 a) The domain of iteration cannot be a component that depends
2333 on discriminants of a mutable object. The check was recently
2334 added for element iterators.
2335 b) The cursor type cannot be a limited type at the point of the
2336 iteration, because the cursor will be assigned to in the body
2339 2015-05-12 Robert Dewar <dewar@adacore.com>
2341 * freeze.adb (Freeze_Record_Type): Make sure that if we have
2342 aspect Iterator_Element, then we have either Constant_Indexing
2343 or Variable_Indexing.
2345 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2347 * a-coormu.ads, a-coormu.adb: Add Indexing aspect, Reference_Type,
2348 and Reference_Control_Type to support element iterators over
2350 * a-ciormu.ads, a-ciormu.adb: Ditto for
2351 indefinite_ordered_multisets.
2353 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
2355 * exp_ch4.adb (Expand_N_Expression_With_Actions): Force
2356 the evaluation of the EWA expression. Code cleanup.
2357 (Process_Transient_Object): Code cleanup.
2358 * exp_util.adb (Is_Aliased): Controlled transient objects found
2359 within EWA nodes are not aliased.
2360 (Is_Finalizable_Transient): Iterators are not finalizable transients.
2362 2015-05-12 Robert Dewar <dewar@adacore.com>
2364 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
2365 Don't allow Atomic and Volatile_Full_Access for the same entity.
2367 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2369 * sem_ch5.adb (Analyze_Iterator_Specification): Implement new
2370 semantics and safety checks specified in AI12-0151.
2372 2015-05-12 Pierre-Marie de Rodat <derodat@adacore.com>
2374 * sem_ch10.adb (Sem_Ch10.Analyze_Proper_Body): Generate SCOs
2375 for subunit in generic units.
2377 2015-05-12 Robert Dewar <dewar@adacore.com>
2379 * sem_elab.adb (Check_A_Call): Avoid checking internal call
2382 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2384 * sem_ch6.adb (Process_Formals): An untagged incomplete type
2385 is legal in the profile of a null procedure.
2387 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2389 * sem_ch12.adb (Validate_Derived_Type_Instance): Handle properly
2390 the checks on a derived formal whose parent type is a previous
2391 formal that is not a derived type.
2393 2015-05-12 Robert Dewar <dewar@adacore.com>
2395 * aspects.ads, aspects.adb: Add entries for aspect Volatile_Full_Access
2396 * einfo.adb (Has_Volatile_Full_Access): New flag.
2397 (Has_Volatile_Full_Access): New flag.
2398 * einfo.ads (Has_Volatile_Full_Access): New flag.
2399 * par-prag.adb: Add dummy entry for Volatile_Full_Access.
2400 * sem_prag.adb (Analyze_Pragma, case Volatile_Full_Access):
2401 Implement new pragma.
2402 * snames.ads-tmpl: Add entries for pragma Volatile_Full_Access.
2404 2015-05-12 Robert Dewar <dewar@adacore.com>
2406 * targparm.ads: Minor reformatting.
2408 2015-05-12 Robert Dewar <dewar@adacore.com>
2410 * a-reatim.adb (Time_Of): Properly detect overflow when TS = 0.0.
2411 * a-reatim.ads: Minor reformatting.
2413 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
2415 * einfo.ads: Update the documentation of flags
2416 Has_Inherited_Default_Init_Cond and Has_Default_Init_Cond.
2418 2015-05-12 Robert Dewar <dewar@adacore.com>
2420 * impunit.adb: Add entry for a-dhfina.ads
2421 * a-dhfina.ads: New file.
2423 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2425 * exp_ch5.adb (Expand_Iterator_Loop_Over_Array): if the array
2426 type has convention Fortran, a multidimensional iterator varies
2427 the first dimension fastest.
2429 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
2431 * einfo.adb: Node32 is now used as Encapsulating_State.
2432 Node37 is now used as Associated_Entity.
2433 (Associated_Entity): New routine.
2434 (Encapsulating_State): Update the assertion guard to include constants.
2435 (Set_Associated_Entity): New routine.
2436 (Set_Encapsulating_State): Update the assertion guard to
2438 (Write_Field10_Name): Remove the output for Encapsulating_State.
2439 (Write_Field32_Name): Add output for Encapsulating_State.
2440 (Write_Field37_Name): Add output for Associated_Entity.
2441 * einfo.ads New attribute Associated_Entity along with placement
2442 in entities. Attribute Encapsulating_State now uses Node32.
2443 (Associated_Entity): New routine along with pragma Inline.
2444 (Set_Associated_Entity): New routine along with pragma Inline.
2445 * inline.ads Code reformatting.
2446 * sem_attr.adb (Analyze_Attribute): Correct the prefix of
2447 attribute 'Result when the context is a generic instantiation.
2448 (Analyze_Attribute_Old_Result): Pragmas Depends and
2449 Refined_Depends are a valid context for attribute 'Result.
2450 (Denote_Same_Function): Allow attribute 'Result to denote
2452 * sem_ch3.adb Add with and use clauses for Sem_Ch12.
2453 (Analyze_Declarations): Capture global references within the
2454 contracts of packages, subprograms and their respective bodies.
2455 * sem_ch6.adb (Analyze_Aspects_On_Body_Or_Stub): Removed.
2456 (Analyze_Completion_Contract): Removed.
2457 (Analyze_Generic_Subprogram_Body): Enchange the aspects after
2458 creating the generic copy. Create a generic contract for the
2459 template. Analyze the aspects of the generic body. Analyze the
2460 contract of the generic body when it is a compilation unit and
2461 capture global references.
2462 (Analyze_Subprogram_Body_Contract): Code cleanup.
2463 (Analyze_Subprogram_Contract): Do not save global references here.
2464 (Save_Global_References_In_List): Removed.
2465 * sem_ch7.adb (Analyze_Package_Body_Contract): Code cleanup.
2466 (Analyze_Package_Body_Helper): Create a generic contract for
2468 (Analyze_Package_Contract): Code cleanup.
2469 * sem_ch10.adb Add with and use clauses for Sem_Ch12.
2470 (Analyze_Compilation_Unit): Capture global references in a
2471 generic subprogram declaration that acts as a compilation unit.
2472 * sem_ch12.adb Add with and use clauses for Sem_Prag. Illustrate
2473 the implementation of generic contracts. Alphabetize various
2475 (Analyze_Generic_Package_Declaration):
2476 Create a generic contract for the template.
2477 (Analyze_Generic_Subprogram_Declaration): Create a generic
2478 contract for the template.
2479 (Analyze_Subprogram_Instantiation): Instantiate the contract of the
2481 (Copy_Generic_Node): Link defining entities of the generic template
2482 with the corresponding defining entities of the generic copy. Update
2483 the processing of pragmas.
2484 (Instantiate_Contract): Removed.
2485 (Instantiate_Subprogram_Contract): New routine.
2486 (Requires_Delayed_Save): New routine.
2487 (Save_Global_References): Rename formal parameter N to Templ. Various
2489 (Save_Global_References_In_Aspects): Moved from the spec.
2490 (Save_Global_References_In_Contract): New routine.
2491 (Save_References_In_Aggregate): New routine.
2492 (Save_References_In_Char_Lit_Or_Op_Symbol): New routine.
2493 (Save_References_In_Descendants): New routine.
2494 (Save_References_In_Identifier): New routine.
2495 (Save_References_In_Operator): New routine.
2496 (Save_References_In_Pragma): New routine.
2497 * sem_ch12.ads (Save_Global_References): Rename formal
2498 parameter N to Templ. Update the comment on usage.
2499 (Save_Global_References_In_Aspects): Moved to the body.
2500 (Save_Global_References_In_Contract): New routine.
2501 * sem_ch13.adb (Analyze_Aspect_Specifications_On_Body_Or_Stub):
2503 * sem_ch13.ads (Analyze_Aspect_Specifications_On_Body_Or_Stub):
2505 * sem_prag.adb (Add_Item_To_Name_Buffer): Add support for
2507 (Analyze_Contract_Cases_In_Decl_Part): Code cleanup.
2508 (Analyze_Depends_Global): New routine.
2509 (Analyze_Depends_In_Decl_Part): Code cleanup.
2510 (Analyze_Global_In_Decl_Part): Code cleanup.
2511 (Analyze_Global_Item): Constants are now valid global items. Do
2512 not perform state-related checks in an instance. Change the way
2513 renamings are handled. (Analyze_Initial_Condition_In_Decl_Part):
2515 (Analyze_Initializes_In_Decl_Part): Code cleanup.
2516 (Analyze_Input_Output): The analysis of attribute 'Result in
2517 the context of pragmas Depends or Refined_Depends now reuses
2518 the existing attribute analysis machinery. Constants and
2519 generic parameters are now valid dependency items. Do not
2520 perform state-related checks in an instance. Change the way
2521 renamings are handled. (Analyze_Pragma): Add a "characteristics"
2522 section for pragmas Abstract_State, Contract_Cases, Depends,
2523 Extensions_Visible, Global, Initial_Condition, Initializes,
2524 Post, Post_Class, Postcondition, Pre, Pre_Class, Precondition,
2525 Refined_Depends, Refined_Global, Refined_Post, Refined_State, Test_Case.
2526 (Analyze_Pre_Post_Condition): Do not create a generic
2528 (Analyze_Pre_Post_Condition_In_Decl_Part): Code cleanup.
2529 (Analyze_Refined_Depends_Global_Post): New routine.
2530 (Analyze_Refined_Depends_In_Decl_Part): Code cleanup.
2531 (Analyze_Refined_Global_In_Decl_Part): Code cleanup.
2532 (Analyze_Refined_Pragma): Removed.
2533 (Analyze_Refined_State_In_Decl_Part): Code cleanup.
2534 (Analyze_Test_Case_In_Decl_Part): Code cleanup.
2535 (Check_Dependency_Clause): Do not perform this check in an instance.
2536 (Check_Function_Return): Add support for generic functions.
2537 (Check_In_Out_States): Do not perform this check in an instance.
2538 (Check_Input_States): Do not perform this check in an instance.
2539 (Check_Mode_Restriction_In_Function): Add support for generic functions.
2540 (Check_Output_States): Do not perform this check in an instance.
2541 (Check_Postcondition_Use_In_Inlined_Subprogram): Rename
2542 parameter Subp_Id to Spec_Id and update comment on usage.
2543 (Check_Proof_In_States): Do not perform this check in an instance.
2544 (Check_Refined_Global_Item): Add support for constants.
2545 (Check_Refined_Global_List): Do not perform this check in an instance.
2546 (Collect_Global_Items): Reimplemented.
2547 (Collect_Subprogram_Inputs_Outputs): Add support for generic parameters.
2548 (Create_Generic_Template): Removed.
2549 (Find_Related_Package_Or_Body): Moved to spec.
2550 (Find_Role): Add support for generic parameters and constants.
2551 (Get_Argument): Moved to spec. Rename parameter Spec_Id to Context_Id.
2552 (Match_Item): Add support for constants.
2553 (Preanalyze_Test_Case_Arg): Reimplemented.
2554 (Report_Extra_Clauses): Do not perform this check in an instance.
2555 (Report_Extra_Constituents): Do not perform this check in an instance.
2556 * sem_prag.ads (Collect_Subprogram_Inputs_Outputs): Update
2557 the comment on usage.
2558 (Find_Related_Package_Or_Body): Moved from body.
2559 (Get_Argument): Moved from body.
2560 * sem_util.adb Add with and use clauses for Sem_Ch12.
2561 (Corresponding_Spec_Of): Add support for packages and package bodies.
2562 (Create_Generic_Contract): New routine.
2563 (Is_Contract_Annotation): Reimplemented.
2564 (Is_Generic_Declaration_Or_Body): New routine.
2565 (Is_Package_Contract_Annotation): New routine.
2566 (Is_Subprogram_Contract_Annotation): New routine.
2567 * sem_util.ads (Corresponding_Spec_Of): Update the comment on usage.
2568 (Create_Generic_Contract): New routine.
2569 (Is_Generic_Declaration_Or_Body): New routine.
2570 (Is_Package_Contract_Annotation): New routine.
2571 (Is_Subprogram_Contract_Annotation): New routine.
2572 * sinfo.adb (Is_Generic_Contract_Pragma): New routine.
2573 (Set_Is_Generic_Contract_Pragma): New routine.
2574 * sinfo.ads Add new attribute Is_Generic_Contract_Pragma along
2575 with occurrences in nodes.
2576 (Is_Generic_Contract_Pragma): New routine along with pragma Inline.
2577 (Set_Is_Generic_Contract_Pragma): New routine along with pragma Inline.
2578 * treepr.adb (Print_Entity_Info): Output fields 36 to 41.
2580 2015-05-12 Robert Dewar <dewar@adacore.com>
2582 * a-taster.ads: Minor comment fix: fix bad header, this is a
2585 2015-05-12 Robert Dewar <dewar@adacore.com>
2587 * sem_intr.adb: (Check_Shift): Diagnose bad modulus value.
2589 2015-05-12 Robert Dewar <dewar@adacore.com>
2591 * gnat1drv.adb (Adjust_Global_Switches): Default to suppressing
2592 Alignment_Checks on non-strict alignment machine.
2593 * sem_ch13.adb (Validate_Address_Clauses): Don't give
2594 compile-time alignment warnings if run time Alignment_Check
2597 2015-05-12 Thomas Quinot <quinot@adacore.com>
2599 * g-sercom.ads, g-sercom-linux.adb (GNAT.Serial_Communications.
2600 Data_Rate): New literals B75, B110, B150, B300, B600.
2602 2015-05-12 Doug Rupp <rupp@adacore.com>
2604 * init.c (__gnat_init_float) [vxworks]: For e500v2,
2605 do nothing and leave the responsibility to install the handler
2606 and enable the exceptions to the BSP.
2608 2015-05-12 Robert Dewar <dewar@adacore.com>
2610 * sem_ch9.adb, einfo.ads, exp_intr.adb: Minor reformatting.
2611 * sem_disp.adb: Minor code reorganization (remove junk redundant
2613 * exp_unst.adb (Unnest_Subprogram.Uplev_Refs): Ignore uplevel
2614 references to bounds of types coming from original type reference.
2615 * checks.ads: Minor reformatting.
2616 * checks.adb: Minor reformatting.
2617 * sem_prag.adb (Analyze_Pragma, case Check): If in ignored
2618 assertion, then make sure we do not drag in bignum stuff.
2620 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2622 * sem_ch9.adb (Collect_Interfaces): Initialize
2623 Direct_Primitive_Operations for a tagged synchronized type,
2624 so it can used in ASIS mode.
2625 * sem_disp.adb (Check_Dispatching_Operation): If expansion is
2626 disabled, attach subprogram to list of Direct_Primitive_Operations
2627 of synchronized type itself, for ASIS use, because in this case
2628 Corresponding_Record_Type is not built.
2629 * einfo.ads: Indicate use of Direct_Primitive_Operations on
2632 2015-05-12 Pierre-Marie de Rodat <derodat@adacore.com>
2634 * exp_pakd.adb: Make clearer the comment in exp_pakd.adb about
2637 2015-05-12 Robert Dewar <dewar@adacore.com>
2639 * sem_ch3.adb, sem_util.adb, sem_ch6.adb: Minor reformatting.
2641 2015-05-12 Robert Dewar <dewar@adacore.com>
2643 * exp_unst.adb (Visit_Node): Deal with subprogram and package stubs.
2645 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2647 * exp_intr.adb (Expand_Dispatching_Constructor_Call): The
2648 tag to be retrieved for the generated call is the first entry
2649 in the dispatch table for the return type of the instantiated
2652 2015-05-12 Bob Duff <duff@adacore.com>
2654 * exp_ch7.adb, exp_ch7.ads, exp_intr.adb, exp_util.adb,
2655 exp_util.ads: Update comments.
2657 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2659 * sem_ch3.adb (Add_Internal_Interface_Entities): Do no generate
2660 freeze nodes for these in ASIS mode, because they lead to
2661 elaoration order issues in gigi.
2663 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
2665 * sem_ch6.adb (Analyze_Expression_Function): Code
2666 cleanup. Use Copy_Subprogram_Spec to create a proper spec.
2667 (Analyze_Subprogram_Body_Helper): Code cleanup. Do not
2668 prepare a stand alone body for inlining in GNATprove mode
2669 when inside a generic. (Body_Has_Contract): Reimplemented.
2670 (Build_Subprogram_Declaration): New routine.
2671 * sem_ch10.adb (Analyze_Compilation_Unit): Capture global
2672 references within generic bodies by loading them.
2673 * sem_util.adb (Copy_Parameter_List): Code cleanup.
2674 (Copy_Subprogram_Spec): New routine.
2675 (Is_Contract_Annotation): New routine.
2676 * sem_util.ads (Copy_Subprogram_Spec): New routine.
2677 (Is_Contract_Annotation): New routine.
2679 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
2681 * sem_attr.adb (Resolve_Attribute): Do not analyze the generated
2682 body of an expression function when the prefix of attribute
2683 'Access is the body.
2685 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2687 * sem_ch3.adb (Build_Derived_Enumeration_Type): The anonymous base
2688 created for a derived enumeration type is not a first subtype,
2689 even though it is defined through a full type declaration.
2690 * sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): Do not process
2691 aspects for the anonymous base type constructed for a derived
2692 scalar type, because they will be set when the first subtype
2694 (Inherit_Aspects_At_Freeze_Point): Fix typos on handling of
2695 Default_Value and Default_Component_Value, that prevented the
2696 proper inheritance of these aspects.
2698 2015-05-12 Gary Dismukes <dismukes@adacore.com>
2700 * exp_ch6.adb, exp_unst.adb: Minor typo fixes.
2702 2015-05-12 Robert Dewar <dewar@adacore.com>
2704 * sem_ch3.adb: Minor reformatting.
2706 2015-05-12 Vincent Celier <celier@adacore.com>
2708 * gnatcmd.adb: If we want to invoke gnatmake (gnatclean) with
2709 -P, then check if gprbuild (gprclean) is available; if it is,
2710 use gprbuild (gprclean) instead of gnatmake (gnatclean).
2712 2015-05-12 Robert Dewar <dewar@adacore.com>
2714 * debug.adb: Add flag -gnatd.3 to output diagnostic info from
2716 * einfo.ad, einfo.adb: Reorganize (and remove most of) flags used by
2718 * exp_ch6.adb (Unest_Bodies): Table for delayed calls to
2719 Unnest_Subprogram (Expand_N_Subprogram_Body): Add entry to table
2720 for later call instead of calling Unnest_Subprogram directly
2721 (Initialize): New procedure (Unnest_Subprograms): New procedure
2722 * exp_ch6.ads (Add_Extra_Actual_To_Call): Move into proper
2724 (Initialize): New procedure.
2725 (Unnest_Subprograms): New procedure.
2726 * exp_unst.adb (Unnest_Subprogram): Major rewrite, moving
2727 all processing to this routine which is now called late
2728 after instantiating bodies. Fully handles the case of generic
2730 * exp_unst.ads: Major rewrite, moving all processing to
2732 * frontend.adb (Frontend): Add call to Exp_Ch6.Initialize.
2733 (Frontend): Add call to Unnest_Subprograms.
2734 * sem_ch8.adb (Find_Direct_Name): Back to old calling sequence
2735 for Check_Nested_Access.
2736 * sem_util.adb (Build_Default_Subtype): Minor reformatting
2737 (Check_Nested_Access): Back to original VM-only form (we
2738 now do all the processing for Unnest_Subprogram at the time
2740 (Denotes_Same_Object): Minor reformatting
2741 (Note_Possible_Modification): Old calling sequence for
2742 Check_Nested_Access.
2743 * sem_util.ads (Check_Nested_Access): Back to original VM-only
2744 form (we now do all the processing for Unnest_Subprogram at the
2747 2015-05-12 Robert Dewar <dewar@adacore.com>
2749 * sem_ch3.adb, freeze.adb, sem_ch6.adb: Minor reformatting.
2751 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2753 * sem_ch3.adb (Analyze_Object_Declaration): New function
2754 Has_Delayed_Aspect, used to defer resolution of an aggregate
2755 expression when the object declaration carries aspects Address
2757 * freeze.adb (Freeze_Object_Declaration): New subsidiary procedure
2758 to Freeze_Entity. In addition to the previous processing steps
2759 at the freeze point of an object, this procedure also handles
2760 aggregates in object declarations, when the declaration carries
2761 delayed aspects that require that the initialization of the
2762 object be attached to its freeze actions.
2764 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2766 * sem_ch6.adb (Analyze_Subprogram_Declaration): Following
2767 AI12-0147, null procedures and expression functions are allowed
2768 in protected bodies.
2770 2015-05-12 Tristan Gingold <gingold@adacore.com>
2772 * i-cpoint.adb (Copy_Terminated_Array): Copy nothing if Length is 0.
2774 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2776 * sem_ch3.adb (Complete_Private_Subtype): Propagate
2777 Has_Delayed_Aspects flag from private to full view, to ensure
2778 that predicate functions are constructed.
2780 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2782 * sem_ch6.adb (Process_Formals): If a tagged formal is an
2783 incomplete class-wide type, the subprogram must have a delayed
2784 freeze even though the opertation is not a primitive of the
2785 type. THis ensures that the backend can recover the full view
2786 when elaborating the subprogram declaration.
2788 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2790 * exp_util.adb (Get_Current_Value_Condition): Nothing to be
2791 done if an elsif part has been rewritten so that it is not part
2792 of an enclosing if_statement.
2794 2015-05-12 Robert Dewar <dewar@adacore.com>
2796 * sem_type.adb, sem_ch10.adb, freeze.adb, sem_ch6.adb, exp_disp.adb:
2799 2015-05-12 Bob Duff <duff@adacore.com>
2801 * exp_attr.adb (Size): Remove unnecessary check for types with
2802 unknown discriminants. That was causing the compiler to build
2803 a function call _size(T), where T is a type, not an object.
2805 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2807 * sem_ch4.adb (Extended_Primitive_Ops): Exclude overriding
2808 primitive operations of a type extension declared in the package
2809 body, to prevent duplicates in extended list.
2811 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2813 * sem_ch3.adb (Analyze_Component_Declaration): If the component is
2814 an unconstrained synchronized type with discriminants, create a
2815 constrained default subtype for it, so that the enclosing record
2816 can be given the proper size.
2817 * sem_util.adb (Build_Default_Subtype): If the subtype is created
2818 for a record discriminant, do not analyze the declarztion at
2819 once because it is added to the freezing actions of the enclosing
2822 2015-05-12 Robert Dewar <dewar@adacore.com>
2824 * exp_prag.adb (Expand_N_Pragma): Rewrite ignored pragma as
2826 * namet.ads (Boolean3): Document this flag used for Ignore_Pragma.
2827 * par-prag.adb (Prag): Implement Ignore_Pragma.
2828 * sem_prag.adb: Implement Ignore_Pragma.
2829 * snames.ads-tmpl: Add entries for pragma Ignore_Pragma.
2831 2015-05-12 Javier Miranda <miranda@adacore.com>
2833 * sem_ch10.adb (Build_Shadow_Entity): Link the class-wide shadow
2834 entity with its corresponding real entity.
2835 (Decorate_Type): Unconditionally build the class-wide shadow entity of
2837 * einfo.ads, einfo.adb (Has_Non_Limited_View): New synthesized
2839 (Non_Limited_View): Moved from field 17 to field 19 be available
2840 in class-wide entities.
2841 * exp_attr.adb (Access_Cases): Code cleanup.
2842 * exp_disp.adb (Expand_Interface_Actuals): Ditto.
2843 * exp_util.adb (Non_Limited_Designated_Type): Ditto.
2844 * freeze.adb (Build_Renamed_Bdody): Ditto.
2845 * sem_aux.adb (Available_View): Ditto.
2846 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
2847 (Try_One_Prefix_Interpretation): Ditto.
2848 * sem_ch5.adb (Analyze_Assignment): Ditto.
2849 * sem_ch6.adb (Detect_And_Exchange): Ditto.
2850 * sem_ch8.adb (Find_Expanded_Name): Ditto.
2851 * sem_disp.adb (Check_Controlling_Type): Ditto.
2852 * sem_res.adb (Resolve_Type_Conversion): Ditto.
2853 (Full_Designated_Type): Ditto.
2854 * sem_type.adb (Covers): Ditto.
2855 * sem_util.adb: Fix typo in comment.
2857 2015-05-12 Robert Dewar <dewar@adacore.com>
2859 * exp_unst.adb (Get_Real_Subp): New subprogram.
2860 (Unnest_Subprogram): Use Get_Real_Subp.
2861 (Uplev_Refs_For_One_Subp): Skip if no ARECnU entity.
2862 (Uplev_Refs_For_One_Subp): Use actual subtype in unconstrained case.
2864 2015-05-12 Robert Dewar <dewar@adacore.com>
2866 * a-reatim.adb ("/"): Add explicit check for Time_Span_First / -1.
2868 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2870 * sem_ch4.adb (Extended_Primitive_Ops): New subprogram,
2871 auxiliary to Try_Primitive_Operation to handle properly prefixed
2872 calls where the operation is not a primitive of the type, but
2873 is declared in the package body that is in the immediate scope
2876 2015-05-12 Robert Dewar <dewar@adacore.com>
2878 * sem_util.adb (Is_Variable): Allow X'Deref(Y) as a variable.
2880 2015-05-12 Ed Schonberg <schonberg@adacore.com>
2882 * sem_ch8.adb (Find_Expanded_Name): Handle properly a fully
2883 qualified name for an instance of a generic grand-child unit in
2884 the body its parent.
2886 2015-05-12 Robert Dewar <dewar@adacore.com>
2888 * exp_unst.adb (Upref_Name): New subprogram.
2889 (Unnest_Subprogram): Use Upref_Name.
2890 (Unnest_Subprogram): Use new Deref attribute.
2891 * exp_unst.ads: Doc updates.
2893 2015-05-12 Thomas Quinot <quinot@adacore.com>
2895 * adaint.c: Enable Large File Support in adaint so that __gnat_readdir
2896 can access files on filesystems mounted from servers that use large
2899 2015-05-09 Eric Botcazou <ebotcazou@adacore.com>
2901 * gcc-interface/utils.c (gnat_write_global_declarations): Use type_decl
2902 method instead of global_decl for TYPE_DECLs.
2904 2015-04-27 Jim Wilson <jim.wilson@linaro.org>
2906 * gcc-interface/Makefile-lan.in (ada.mostlyclean): Remove gnatbind
2909 2015-04-13 Eric Botcazou <ebotcazou@adacore.com>
2911 * gnatvsn.ads (Library_Version): Bump to 6.
2913 2015-04-09 Iain Sandoe <iain@codesourcery.com>
2915 * gcc-interface/Makefile.in (darwin, powerpc): Enable atomics.
2917 2015-04-08 Eric Botcazou <ebotcazou@adacore.com>
2919 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Do not make
2920 a function returning an unconstrained type 'const' for the middle-end.
2922 * gcc-interface/trans.c (Pragma_to_gnu) <case Pragma_Warning>: Use
2923 exact condition to detect Reason => "..." pattern.
2925 2015-03-31 Tom de Vries <tom@codesourcery.com>
2928 * terminals.c (child_setup_tty): Fix warning 'argument to sizeof in
2929 bzero call is the same expression as the destination'.
2931 2015-03-26 Eric Botcazou <ebotcazou@adacore.com>
2933 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Deref>: New case.
2935 2015-03-24 Gary Dismukes <dismukes@adacore.com>
2937 * sem_ch3.adb: Minor typo fix (missing paren).
2939 2015-03-24 Robert Dewar <dewar@adacore.com>
2941 * sinfo.ads: Update comment.
2943 2015-03-24 Robert Dewar <dewar@adacore.com>
2945 * exp_attr.adb: Add entry for typ'Deref.
2946 * sem_attr.adb (Deref): New GNAT attribute.
2947 * sem_attr.ads: Add entry for new GNAT attribute Deref.
2948 * snames.ads-tmpl: Add entries for new attribute Deref.
2950 2015-03-24 Ed Schonberg <schonberg@adacore.com>
2952 * sem_ch13.adb (Rep_Item_Too_Early): allow pragma Convention
2955 2015-03-24 Gary Dismukes <dismukes@adacore.com>
2957 * inline.adb: Minor typo fix.
2959 2015-03-24 Arnaud Charlet <charlet@adacore.com>
2961 * doc/gnat_ugn/building_executable_programs_with_gnat.rst,
2962 doc/gnat_ugn/gnat_utility_programs.rst
2963 doc/gnat_rm/implementation_defined_attributes.rst
2964 doc/gnat_rm/implementation_defined_pragmas.rst
2965 doc/gnat_rm/representation_clauses_and_pragmas.rst
2966 doc/gnat_rm/about_this_guide.rst
2967 doc/gnat_rm/implementation_of_ada_2012_features.rst: Doc improvements.
2968 * gnat_rm.texi, gnat_ugn.texi: Regenerate.
2970 2015-03-23 Jakub Jelinek <jakub@redhat.com>
2973 * adadecode.c (ada_demangle): Guard with IN_RTS instead of IN_GCC.
2975 2015-03-20 Eric Botcazou <ebotcazou@adacore.com>
2978 * gcc-interface/utils.c (gnat_pushdecl): Tidy up and improve comment.
2979 Make sure to chain only main variants through TYPE_NEXT_PTR_TO.
2981 * gcc-interface/trans.c (Attribute_to_gnu): Revert latest change.
2983 2015-03-16 Eric Botcazou <ebotcazou@adacore.com>
2985 * gcc-interface/utils2.c (gnat_invariant_expr): Return null if the type
2986 of the expression ends up being composite.
2988 2015-03-16 Eric Botcazou <ebotcazou@adacore.com>
2990 * gcc-interface/decl.c (is_from_limited_with_of_main): New predicate.
2991 (gnat_to_gnu_entity) <E_Subprogram_Type>: Invoke it on return and
2992 parameter types to detect circularities in ASIS mode.
2993 * gcc-interface/trans.c (Attribute_to_gnu): Mention AI05-0151.
2995 2015-03-16 Eric Botcazou <ebotcazou@adacore.com>
2997 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Abstract_State>: Do not
2998 short-circuit the regular handling.
3000 2015-03-13 Robert Dewar <dewar@adacore.com>
3002 * exp_unst.adb (Note_Uplevel_Reference): Eliminate duplicate
3004 (Actual_Ref): New function.
3005 (AREC_String): Minor reformatting.
3006 (Unnest_Subprogram): Use Actual_Ref.
3007 * frontend.adb (Frontend): Turn off Unnest_Subprogram_Mode
3008 before call to Instantiate_Bodies.
3010 2015-03-13 Ed Schonberg <schonberg@adacore.com>
3012 * freeze.adb (Freeze_Profile): If the return type of a function
3013 being frozen is an untagged limited view and the function is
3014 abstract, mark the type as frozen because there is no later
3015 point at which the profile of the subprogram will be elaborated.
3017 2015-03-13 Robert Dewar <dewar@adacore.com>
3019 * einfo.adb, einfo.ads, atree.adb, atree.ads, atree.h: Add seventh
3020 component to entities. Add new fields Field36-41 and Node36-41.
3022 2015-03-13 Claire Dross <dross@adacore.com>
3024 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Rewrite after review.
3026 2015-03-13 Robert Dewar <dewar@adacore.com>
3028 * exp_util.adb (Is_Volatile_Reference): Compile time known
3029 value is never considered to be a volatile reference.
3031 2015-03-13 Robert Dewar <dewar@adacore.com>
3033 * sem_ch3.adb (Analyze_Object_Contract): Suppress "constant
3034 cannot be volatile" for internally generated object (such as
3035 FIRST and LAST constants).
3037 2015-03-13 Ed Schonberg <schonberg@adacore.com>
3039 * sem_ch12.adb (Validate_Access_Subprogram_Instance): If a
3040 convention is specified for the formal parameter, verify that
3041 the actual has the same convention.
3042 * sem_prag.adb (Set_Convention_From_Pragma): Allow convention
3043 pragma to be set on a generic formal type.
3044 * sem_util.adb (Set_Convention): Ignore within an instance,
3045 as it has already been verified in the generic unit.
3047 2015-03-13 Claire Dross <dross@adacore.com>
3049 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do not inline
3050 subprograms with unconstrained record parameters containing
3052 * sinfo.ads Document GNATprove assumption that type should match
3054 * sem_ch6.adb (Analyze_Subprogram_Body_Contract):
3055 Do not check for Refined_Depends and Refined_Globals contracts
3056 as they are optional.
3058 2015-03-13 Ed Schonberg <schonberg@adacore.com>
3060 * sem_ch12.adb (Instantiate_Type): For a floating-point type,
3061 capture dimension info if any, because the generated subtype
3062 declaration does not come from source and will not process dimensions.
3063 * sem_dim,adb (Analyze_Dimension_Extension_Or_Record_Aggregate):
3064 Do not analyze expressions with an initialization procedure
3065 because aggregates will have been checked at the point of record
3068 2015-03-13 Robert Dewar <dewar@adacore.com>
3070 * aspects.ads, aspects.adb: Add entries for aspect Unimplemented.
3071 * einfo.ads, einfo.adb (Is_Unimplemented): New flag.
3072 * sem_ch13.adb: Add dummy entry for aspect Unimplemented.
3073 * snames.ads-tmpl: Add entry for Name_Unimplemented.
3075 2015-03-13 Gary Dismukes <dismukes@adacore.com>
3077 * style.adb (Missing_Overriding): Apply the
3078 Comes_From_Source test to the Original_Node of the subprogram
3079 node, to handle the case of a null procedure declaration that
3080 has been rewritten as an empty procedure body.
3082 2015-03-13 Robert Dewar <dewar@adacore.com>
3084 * exp_util.ads: Minor fix to comment.
3085 * sem_ch3.adb (Constrain_Index): Correct pasto from previous
3088 2015-03-13 Robert Dewar <dewar@adacore.com>
3090 * exp_util.ads, exp_util.adb (Force_Evaluation): Add Related_Id and
3091 Is_Low/High_Bound params.
3092 * sem_ch3.adb (Constrain_Index): Use new Force_Evaluation calling
3093 sequence to simplify generation of FIRST/LAST temps for bounds.
3095 2015-03-12 Olivier Hainque <hainque@adacore.com>
3097 * gcc-interface/trans.c (Attribute_to_gnu) <Code_Address case>:
3098 On targets where a function symbol designates a function descriptor,
3099 fetch the function code address from the descriptor.
3100 (USE_RUNTIME_DESCRIPTORS): Provide a default definition.
3102 2015-03-04 Robert Dewar <dewar@adacore.com>
3104 * sem_warn.adb: Minor reformatting.
3105 * init.c: Minor tweaks.
3107 2015-03-04 Dmitriy Anisimko <anisimko@adacore.com>
3109 * a-coinho-shared.adb: Fix clear of already empty holder.
3111 2015-03-04 Robert Dewar <dewar@adacore.com>
3113 * exp_unst.adb (Check_Dynamic_Type): Ignore library level types.
3114 (Check_Uplevel_Reference_To_Type): Ignore call inside generic.
3115 (Note_Uplevel_Reference): Ignore call inside generic.
3116 (Note_Uplevel_Reference): Fix check for no entity field.
3117 (Unnest_Subprogram): Ignore call inside generic.
3118 (Find_Current_Subprogram): Use Defining_Entity, not Defining_Unit_Name.
3119 (Visit_Node): Ignore calls to Imported subprograms.
3120 (Visit_Node): Fix problem in finding subprogram body in some cases.
3121 (Add_Form_To_Spec): Use Defining_Entity, not Defining_Unit_Name.
3123 2015-03-04 Robert Dewar <dewar@adacore.com>
3125 * einfo.adb (Is_ARECnF_Entity): Removed.
3126 (Last_Formal): Remove special handling of Is_ARECnF_Entity.
3127 (Next_Formal): Remove special handling of Is_ARECnF_Entity.
3128 (Next_Formal_With_Extras): Remove special handling of Is_ARECnF_Entity.
3129 (Number_Entries): Minor reformatting.
3130 * einfo.ads (Is_ARECnF_Entity): Removed.
3131 * exp_unst.adb (Unnest_Subprogram): Remove setting of
3133 (Add_Extra_Formal): Use normal Extra_Formal circuit.
3134 * sprint.adb (Write_Param_Specs): Properly handle case where
3135 there are no source formals, but we have at least one Extra_Formal
3138 2015-03-04 Ed Schonberg <schonberg@adacore.com>
3140 * sem_aggr.adb (Resolve_Record_Aggregate,
3141 Add_Discriminant_Values): If the value is a reference to the
3142 current instance of an enclosing type, use its base type to check
3143 against prefix of attribute reference, because the target type
3144 may be otherwise constrained.
3146 2015-03-04 Robert Dewar <dewar@adacore.com>
3148 * atree.h: Add entries for Flag287-Flag309.
3149 * einfo.adb: Add (unused) flags Flag287-Flag309.
3151 2015-03-04 Ed Schonberg <schonberg@adacore.com>
3153 * sem_util.adb (Collect_Interfaces, Collect): When gathering
3154 interfaces of ancestors, handle properly a subtype of a private
3157 2015-03-04 Robert Dewar <dewar@adacore.com>
3159 * einfo.adb (Is_ARECnF_Entity): New flag (ARECnF is an extra formal).
3160 (Next_Formal): Don't return ARECnF formal.
3161 (Last_Formal): Don't consider ARECnF formal.
3162 (Next_Formal_With_Extras): Do consider ARECnF formal.
3163 * einfo.ads (Is_ARECnF_Entity): New flag (ARECnF is an extra formal).
3164 * exp_unst.adb (Create_Entities): Set Is_ARECnF_Entity flag.
3166 2015-03-04 Javier Miranda <miranda@adacore.com>
3168 * exp_ch6.adb (Expand_Simple_Function_Return): When the returned
3169 object is a class-wide interface object and we generate the
3170 accessibility described in RM 6.5(8/3) then displace the pointer
3171 to the object to reference the base of the object (to get access
3172 to the TSD of the object).
3174 2015-03-04 Hristian Kirtchev <kirtchev@adacore.com>
3176 * sem_prag.adb (Analyze_Abstract_State): Use routine
3177 Malformed_State_Error to issue general errors.
3178 (Analyze_Pragma): Diagnose a syntax error related to a state
3179 declaration with a simple option.
3180 (Malformed_State_Error): New routine.
3182 2015-03-04 Robert Dewar <dewar@adacore.com>
3184 * a-strsup.adb (Super_Slice): Deal with super flat case.
3185 * einfo.ads: Minor reformatting.
3186 * s-imgdec.adb (Set_Decimal_Digits): Add comment about possibly
3189 2015-03-04 Claire Dross <dross@adacore.com>
3191 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
3192 a-cforse.ads, a-cofove.ads: Use Default_Initial_Condition on formal
3195 2015-03-04 Ed Schonberg <schonberg@adacore.com>
3197 * sem_warn.adb (Check_References): When checking for an unused
3198 in-out parameter of a class- wide type, use its type to determine
3199 whether it is private, in order to avoid a spurious warning when
3200 subprogram spec and body are in different units.
3202 2015-03-04 Yannick Moy <moy@adacore.com>
3204 * sem_attr.adb: Improve warning messages.
3206 2015-03-04 Robert Dewar <dewar@adacore.com>
3208 * exp_ch6.adb (Expand_N_Subprogram_Body): Avoid trying to unnest
3209 generic subprograms.
3210 * exp_unst.adb (Check_Dynamic_Type): Handle record types properly
3211 (Note_Uplevel_Reference): Ignore uplevel references to non-types
3212 (Get_Level): Consider only subprograms, not blocks.
3213 (Visit_Node): Set proper condition for generating ARECnF entity.
3214 Ignore indirect calls. Ignore calls to subprograms
3216 (Unnest_Subprogram): Minor changes in dealing with ARECnF entity.
3217 (Add_Form_To_Spec): Properly set Last_Entity field.
3218 (Unnest_Subprogram): Set current subprogram scope for analyze calls.
3219 Handle case of no uplevel refs in outer subprogram
3220 Don't mark uplevel entities as aliased.
3221 Don't deal with calls with no ARECnF requirement.
3223 2015-03-04 Robert Dewar <dewar@adacore.com>
3225 * s-valrea.adb (Scan_Real): Remove redundant tests from scaling loops.
3226 * s-imgdec.adb (Set_Decimal_Digits): Remove redundant Max
3227 operation in computing LZ.
3228 * sem_attr.adb: Minor typo fix
3230 2015-03-04 Robert Dewar <dewar@adacore.com>
3232 * exp_ch7.adb: Minor reformatting.
3233 * exp_unst.adb (Build_Tables): Fix minor glitch for no separate
3235 * erroutc.adb (Delete_Msg): add missing decrement of info msg counter.
3237 2015-03-04 Hristian Kirtchev <kirtchev@adacore.com>
3239 * exp_ch6.adb (Build_Pragma_Check_Equivalent): Suppress
3240 references to formal parameters subject to pragma Unreferenced.
3241 (Suppress_Reference): New routine.
3242 * sem_attr.adb (Analyze_Attribute): Reimplement the analysis
3243 of attribute 'Old. Attributes 'Old and 'Result now share
3245 (Analyze_Old_Result_Attribute): New routine.
3246 (Check_Placement_In_Check): Removed.
3247 (Check_Placement_In_Contract_Cases): Removed.
3248 (Check_Placement_In_Test_Case): Removed.
3249 (Check_Use_In_Contract_Cases): Removed.
3250 (Check_Use_In_Test_Case): Removed.
3251 (In_Refined_Post): Removed.
3252 (Is_Within): Removed.
3253 * sem_warn.adb (Check_Low_Bound_Tested): Code cleanup.
3254 (Check_Low_Bound_Tested_For): New routine.
3256 2015-03-04 Hristian Kirtchev <kirtchev@adacore.com>
3258 * exp_ch3.adb (Expand_N_Object_Declaration):
3259 Generate a runtime check to test the expression of pragma
3260 Default_Initial_Condition when the object is default initialized.
3262 2015-03-02 Robert Dewar <dewar@adacore.com>
3264 * scng.adb (Scan): Ignore illegal character in relaxed
3267 2015-03-02 Ed Schonberg <schonberg@adacore.com>
3269 * sem_ch4.adb (Analyze_Set_Membership); Retain Overloaded flag
3270 on left operand, so it can be properly resolved with type of
3271 alternatives of right operand.
3272 * sem_res.adb (Resolve_Set_Membership): Handle properly an
3273 overloaded left-hand side when the alternatives on the right
3274 hand side are literals of some universal type. Use first
3275 non-overloaded alternative to find expected type.
3277 2015-03-02 Ed Schonberg <schonberg@adacore.com>
3279 * exp_ch7.adb (Make_Set_Finalize_Address_Call): Use underlying
3280 type to retrieve designated type, because the purported access
3281 type may be a partial (private) view, when it is declared in
3282 the private part of a nested package, and finalization actions
3283 are generated when completing compilation of enclosing unit.
3285 2015-03-02 Robert Dewar <dewar@adacore.com>
3287 * back_end.adb (Call_Back_End): Remove previous patch,
3288 the back end now gets to see the result of -gnatd.1
3289 (Unnest_Subprogram_Mode) processing.
3290 * elists.ads, elists.adb (List_Length): New function.
3291 * exp_unst.ads, exp_unst.adb: Major changes, first complete version.
3292 * sem_util.adb (Check_Nested_Access): Handle formals in
3293 Unnest_Subprogram_Mode.
3294 (Adjust_Named_Associations): Minor reformatting.
3295 * sprint.adb (Sprint_Node_Actual): Fix failure to print aliased
3298 2015-03-02 Robert Dewar <dewar@adacore.com>
3300 * atree.ads, atree.adb (Uint24): New function
3301 (Set_Uint24): New procedure.
3302 * atree.h (Uint24): New macro for field access.
3303 * back_end.adb (Call_Back_End): For now, don't call back end
3304 if unnesting subprogs.
3305 * einfo.adb (Activation_Record_Component): New field
3306 (Subps_Index): New field.
3307 * einfo.ads (Activation_Record_Component): New field
3308 (Subps_Index): New field Minor reordering of comments into alpha order.
3309 * exp_unst.ads, exp_unst.adb: Continued development.
3311 2015-03-02 Gary Dismukes <dismukes@adacore.com>
3313 * exp_disp.ads: Minor reformatting.
3315 2015-03-02 Ed Schonberg <schonberg@adacore.com>
3317 * sem_ch8.adb (Chain_Use_Clause): Do not chain use clause from
3318 ancestor to list of use clauses active in descendant unit if we
3319 are within the private part of an intervening parent, to prevent
3320 circularities in use clause list.
3322 2015-03-02 Javier Miranda <miranda@adacore.com>
3324 * exp_ch9.adb (Build_Corresponding_Record): Propagate type
3325 invariants to the corresponding record type.
3326 * exp_disp.ad[sb] (Set_DT_Position_Value): New subprogram
3327 which sets the value of the DTC_Entity associated with a given
3328 primitive of a tagged type and propagates the value to the
3330 (Set_DTC_Entity_Value): Propagate the DTC
3331 value to the wrapped entity.
3332 * sem_ch13.adb (Build_Invariant_Procedure): Append the code
3333 associated with invariants of progenitors.
3334 * sem_ch3.adb (Build_Derived_Record_Type): Inherit type invariants
3335 of parents and progenitors.
3336 (Process_Full_View): Check hidden inheritance of class-wide type
3338 * sem_ch7.adb (Analyze_Package_Specification): Do not generate
3339 the invariant procedure for interface types; build the invariant
3340 procedure for tagged types inheriting invariants from their
3342 * sem_prag.adb (Pragma_Invariant) Allow invariants in interface
3343 types but do not build their invariant procedure since their
3344 invariants will be propagated to the invariant procedure of
3345 types covering the interface.
3346 * exp_ch6.adb, exp_disp.adb, sem_ch3.adb, sem_ch7.adb,
3347 sem_ch8.adb, sem_disp.adb: Replace all calls to Set_DT_Position
3348 by calls to Set_DT_Position_Value.
3350 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
3352 * sem_attr.adb (Analyze_Attribute): Factor out heavily indented
3353 code in Denote_Same_Function. Do not analyze attribute 'Result
3354 when it is inside procedure _Postconditions. Remove a misplaced
3355 warning diagnostic. Code cleanup.
3356 (Denote_Same_Function): New routine.
3357 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Code
3358 cleanup. Warn on pre/postconditions on an inlined subprogram.
3359 (Analyze_Pragma, Refined_Post case): Warn on pre/postconditions on
3360 an inlined subprogram.
3361 (Analyze_Pre_Post_Condition_In_Decl_Part): Code cleanup. Warn on
3362 pre/post condition on an inlined subprogram.
3363 (Analyze_Test_Case_In_Decl_Part): Code cleanup. Warn on
3364 pre/postconditions on an inlined subprogram.
3365 (Check_Postcondition_Use_In_Inlined_Subprogram): New routine.
3367 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
3369 * sem_prag.adb (Ensure_Aggregate_Form):
3370 Ensure that the name denoted by the Chars of a pragma argument
3371 association has the proper Sloc when converted into an aggregate.
3373 2015-03-02 Bob Duff <duff@adacore.com>
3375 * sem_ch6.adb (Check_Private_Overriding): Capture
3376 Incomplete_Or_Partial_View in a constant. This is cleaner and
3379 2015-03-02 Gary Dismukes <dismukes@adacore.com>
3381 * einfo.ads, exp_unst.ads: Minor reformatting.
3383 2015-03-02 Ed Schonberg <schonberg@adacore.com>
3385 * a-strsea.adb (Find_Token): Ensure that the range of iteration
3386 does not perform any improper character access. This prevents
3387 erroneous access in the unusual case of an empty string target
3388 and a From parameter less than Source'First.
3390 2015-03-02 Robert Dewar <dewar@adacore.com>
3392 * elists.adb (List_Length): Fix incorrect result.
3394 2015-03-02 Bob Duff <duff@adacore.com>
3396 * sem_ch6.adb (Check_Private_Overriding): Refine the legality
3397 checks here. It used to check that the function is merely
3398 overriding SOMEthing. Now it checks that the function is
3399 overriding a corresponding public operation. This is a correction
3400 to the implementation of the rule in RM-3.9.3(10).
3402 2015-03-02 Robert Dewar <dewar@adacore.com>
3404 * debug.adb: Document new debug flag -gnatd.1.
3405 * einfo.ads, einfo.adb (Has_Nested_Subprogram): New flag.
3406 (Has_Uplevel_Reference): New flag (Is_Static_Type): New flag.
3407 (Uplevel_Reference_Noted):New flag (Uplevel_References): New field.
3408 * elists.ads elists.adb (List_Length): New function.
3409 * exp_ch6.adb (Expand_N_Subprogram_Body): Call Unnest_Subprogram
3410 when appropriate (Process_Preconditions): Minor code
3411 reorganization and reformatting
3412 * exp_unst.ads, exp_unst.adb: New files.
3413 * gnat1drv.adb (Adjust_Global_Switches): Set
3414 Unnest_Subprogram_Mode if -gnatd.1
3415 * namet.ads, namet.adb (Name_Find_Str): New version of Name_Find with
3417 * opt.ads (Unnest_Subprogram_Mode): New flag.
3418 * par-ch3.adb (P_Identifier_Declarations): Fixes to -gnatd.2 handling.
3419 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set
3420 Has_Nested_Subprogram flag.
3421 * sem_ch8.adb (Find_Direct_Name): New calling sequence for
3422 Check_Nested_Access.
3423 (Find_Selected_Component): Minor comment addition.
3424 * sem_util.adb (Check_Nested_Access): New version for use with Exp_Unst.
3425 (Note_Possible_Modification): New calling sequence for
3426 Check_Nested_Access.
3427 * sem_util.ads (Check_Nested_Access): New version for use with Exp_Unst.
3428 * gcc-interface/Make-lang.in (GNAT1_OBJS): Add exp_unst.o
3430 2015-03-02 Pierre-Marie de Rodat <derodat@adacore.com>
3432 * gcc-interface/utils.c (gnat_pushdecl): For non-artificial pointer
3433 types, preserve the original type and create copies just like the C
3434 front-end does. For artificial ones, do not define a name for
3436 (create_type_decl): When gnat_pushdecl made the input type the
3437 original type for the new declaration, do not define a stub
3439 * gcc-interface/utils2.c (build_binary_op): Accept two different
3440 pointer types when they point to the same type.
3442 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
3444 * exp_util.adb (Possible_Bit_Aligned_Component): Do not process
3446 * sem_util.adb (Kill_Current_Values): Do not invalidate and
3449 2015-03-02 Robert Dewar <dewar@adacore.com>
3451 * sem_ch3.adb, exp_attr.adb, checks.adb, exp_aggr.adb: Minor
3454 2015-03-02 Ed Schonberg <schonberg@adacore.com>
3456 * sem_ch8.adb: extend use of Available_Subtype.
3458 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
3460 * sem_prag.adb (Duplication_Error): Remove the special handling
3461 of 'Class or _Class in the context of pre/postconditions.
3462 (Process_Class_Wide_Condition): Remove the special handling of
3463 'Class or _Class in the context of pre/postconditions.
3464 * sem_util.adb (Original_Aspect_Pragma_Name): Names Pre_Class
3465 and Post_Class no longer need to be converted to _Pre and _Post.
3466 * sem_util.ads (Original_Aspect_Pragma_Name): Update the comment
3469 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
3471 * exp_ch6.adb (Process_Preconditions): Modify the
3472 mechanism that find the first source declaration to correct exit
3473 the loop once it has been found.
3475 2015-03-02 Gary Dismukes <dismukes@adacore.com>
3477 * a-strsea.adb: Minor typo fix.
3479 2015-03-02 Bob Duff <duff@adacore.com>
3481 * einfo.ads: Minor comment fixes.
3483 2015-03-02 Gary Dismukes <dismukes@adacore.com>
3485 * einfo.adb, checks.adb: Minor reformatting and typo fixes.
3487 2015-03-02 Ed Schonberg <schonberg@adacore.com>
3489 * exp_aggr.adb (Get_Assoc_Expr): If the Default_Component_Value
3490 is defined for the array type, use it instead of a Default_Value
3491 specified for the component type itself.
3493 2015-03-02 Thomas Quinot <quinot@adacore.com>
3495 * exp_attr.adb (Expand_N_Attribute_Reference, case Input): When
3496 expanding a 'Input attribute reference for a class-wide type,
3497 do not generate a separate object declaration for the controlling
3498 tag dummy object; instead, generate the expression inline in the
3499 dispatching call. Otherwise, the declaration (which involves a
3500 call to String'Input, returning a dynamically sized value on the
3501 secondary stack) will be expanded outside of proper secondary
3502 stack mark/release operations, and will thus cause a secondary
3505 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
3507 * checks.adb (Add_Validity_Check): Change the names of all
3508 formal parameters to better illustrate their purpose. Update
3509 the subprogram documentation. Update all occurrences of the
3510 formal parameters. Generate a pre/postcondition pragma by
3511 calling Build_Pre_Post_Condition.
3512 (Build_PPC_Pragma): Removed.
3513 (Build_Pre_Post_Condition): New routine.
3514 * einfo.adb Node8 is no longer used as Postcondition_Proc. Node14
3515 is now used as Postconditions_Proc. Flag240 is now renamed to
3516 Has_Expanded_Contract. (First_Formal): The routine can now
3517 operate on generic subprograms.
3518 (First_Formal_With_Extras): The routine can now operate on generic
3520 (Has_Expanded_Contract): New routine.
3521 (Has_Postconditions): Removed.
3522 (Postcondition_Proc): Removed.
3523 (Postconditions_Proc): New routine.
3524 (Set_Has_Expanded_Contract): New routine.
3525 (Set_Has_Postconditions): Removed.
3526 (Set_Postcondition_Proc): Removed.
3527 (Set_Postconditions_Proc): New routine.
3528 (Write_Entity_Flags): Remove the output of Has_Postconditions. Add
3529 the output of Has_Expanded_Contract.
3530 (Write_Field8_Name): Remove the output of Postcondition_Proc.
3531 (Write_Field14_Name): Add the output of Postconditions_Proc.
3532 * einfo.ads New attributes Has_Expanded_Contract and
3533 Postconditions_Proc along with occurrences in entities.
3534 Remove attributes Has_Postconditions and Postcondition_Proc
3535 along with occurrences in entities.
3536 (Has_Expanded_Contract): New routine along with pragma Inline.
3537 (Has_Postconditions): Removed along with pragma Inline.
3538 (Postcondition_Proc): Removed along with pragma Inline.
3539 (Postconditions_Proc): New routine along with pragma Inline.
3540 (Set_Has_Expanded_Contract): New routine along with pragma Inline.
3541 (Set_Has_Postconditions): Removed along with pragma Inline.
3542 (Set_Postcondition_Proc): Removed along with pragma Inline.
3543 (Set_Postconditions_Proc): New routine along with pragma Inline.
3544 * exp_ch6.adb (Add_Return): Code cleanup. Update the
3545 generation of the call to the _Postconditions routine of
3546 the procedure. (Expand_Non_Function_Return): Reformat the
3547 comment on usage. Code cleanup. Update the generation of
3548 the call to the _Postconditions routine of the procedure or
3550 (Expand_Simple_Function_Return): Update the
3551 generation of the _Postconditions routine of the function.
3552 (Expand_Subprogram_Contract): Reimplemented.
3553 * exp_ch6.ads (Expand_Subprogram_Contract): Update the parameter
3554 profile along the comment on usage.
3555 * exp_ch9.adb (Build_PPC_Wrapper): Code cleanup.
3556 (Expand_N_Task_Type_Declaration): Generate pre/postconditions
3557 wrapper when the entry [family] has a contract with
3559 * exp_prag.adb (Expand_Attributes_In_Consequence): New routine.
3560 (Expand_Contract_Cases): This routine and its subsidiaries now
3561 analyze all generated code.
3562 (Expand_Old_In_Consequence): Removed.
3563 * sem_attr.adb Add with and use clause for Sem_Prag.
3564 (Analyze_Attribute): Reimplment the analysis of attribute 'Result.
3565 (Check_Use_In_Test_Case): Use routine Test_Case_Arg to obtain
3567 * sem_ch3.adb (Analyze_Declarations): Analyze the contract of
3568 a generic subprogram.
3569 (Analyze_Object_Declaration): Do not create a contract node.
3570 (Derive_Subprogram): Do not create a contract node.
3571 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Do
3572 not create a contract node.
3573 (Analyze_Completion_Contract): New routine.
3574 (Analyze_Function_Return): Alphabetize.
3575 (Analyze_Generic_Subprogram_Body): Alphabetize. Do not create a
3576 contract node. Do not copy pre/postconditions to the original
3578 (Analyze_Null_Procedure): Do not create a contract node.
3579 (Analyze_Subprogram_Body_Contract): Reimplemented.
3580 (Analyze_Subprogram_Body_Helper): Do not mark the enclosing scope
3581 as having postconditions. Do not create a contract node. Analyze
3582 the subprogram body contract of a body that acts as a compilation
3583 unit. Expand the subprogram contract after the declarations have
3585 (Analyze_Subprogram_Contract): Reimplemented.
3586 (Analyze_Subprogram_Specification): Do not create a contract node.
3587 (List_Inherited_Pre_Post_Aspects): Code cleanup.
3588 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Update the
3590 (Analyze_Subprogram_Contract): Update the
3591 parameter profile and the comment on usage.
3592 * sem_ch7.adb (Analyze_Package_Body_Helper): Do not create a
3594 (Analyze_Package_Declaration): Do not create a
3596 (Is_Subp_Or_Const_Ref): Ensure that the prefix has an entity.
3597 * sem_ch8.adb (Analyze_Subprogram_Renaming): Do not create a
3599 * sem_ch9.adb (Analyze_Entry_Declaration): Do not create a
3601 * sem_ch10.adb (Analyze_Compilation_Unit): Move local variables to
3602 their proper section and alphabetize them. Analyze the contract of
3603 a [generic] subprogram after all Pragmas_After have been analyzed.
3604 (Analyze_Subprogram_Body_Stub_Contract): Alphabetize.
3605 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Do not
3606 create a contract node.
3607 (Analyze_Generic_Subprogram_Declaration):
3608 Alphabetize local variables. Do not create a contract
3609 node. Do not generate aspects out of pragmas for ASIS.
3610 (Analyze_Subprogram_Instantiation): Instantiate
3611 the contract of the subprogram. Do not create a
3612 contract node. (Instantiate_Contract): New routine.
3613 (Instantiate_Subprogram_Body): Alphabetize local variables.
3614 (Save_Global_References_In_Aspects): New routine.
3615 (Save_References): Do not save the global references found within
3616 the aspects of a generic subprogram.
3617 * sem_ch12.ads (Save_Global_References_In_Aspects): New routine.
3618 * sem_ch13.adb (Analyze_Aspect_Specifications): Do not use
3619 Original_Node for establishing linkages.
3620 (Insert_Pragma): Insertion in a subprogram body takes precedence over
3621 the case where the subprogram body is also a compilation unit.
3622 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Use
3623 Get_Argument to obtain the proper expression. Install the generic
3624 formals when the related context is a generic subprogram.
3625 (Analyze_Depends_In_Decl_Part): Use Get_Argument to obtain
3626 the proper expression. Use Corresponding_Spec_Of to obtain
3627 the spec. Install the generic formal when the related context
3628 is a generic subprogram.
3629 (Analyze_Global_In_Decl_Part): Use Get_Argument to obtain the proper
3630 expression. Use Corresponding_Spec_Of to obtain the spec. Install the
3631 generic formal when the related context is a generic subprogram.
3632 (Analyze_Initial_Condition_In_Decl_Part): Use Get_Argument
3633 to obtain the proper expression. Remove the call to
3634 Check_SPARK_Aspect_For_ASIS as the analysis is now done
3636 (Analyze_Pragma): Update all occurrences
3637 to Original_Aspect_Name. Pragmas Contract_Cases, Depends,
3638 Extensions_Visible, Global, Postcondition, Precondition and
3639 Test_Case now carry generic templates when the related context
3640 is a generic subprogram. The same pragmas are no longer
3641 forcefully fully analyzed when the context is a subprogram
3642 that acts as a compilation unit. Pragmas Abstract_State,
3643 Initial_Condition, Initializes and Refined_State have been clean
3644 up. Pragmas Post, Post_Class, Postcondition, Pre, Pre_Class
3645 and Precondition now use the same routine for analysis. Pragma
3646 Refined_Post does not need to check the use of 'Result or
3647 the lack of a post-state in its expression. Reimplement the
3648 analysis of pragma Test_Case.
3649 (Analyze_Pre_Post_Condition): New routine.
3650 (Analyze_Pre_Post_Condition_In_Decl_Part):
3652 (Analyze_Refined_Depends_In_Decl_Part): Use Get_Argument to obtain the
3654 (Analyze_Refined_Global_In_Decl_Part): Use Get_Argument to obtain
3655 the proper expression.
3656 (Analyze_Test_Case_In_Decl_Part): Reimplemented.
3657 (Check_Pre_Post): Removed.
3658 (Check_Precondition_Postcondition): Removed.
3659 (Check_SPARK_Aspect_For_ASIS): Removed.
3660 (Check_Test_Case): Removed.
3661 (Collect_Subprogram_Inputs_Outputs): Use Get_Argument
3662 to obtain the proper expression. Use Corresponding_Spec_Of to
3663 find the proper spec.
3664 (Create_Generic_Template): New routine.
3665 (Duplication_Error): New routine.
3666 (Expression_Function_Error): New routine.
3667 (Find_Related_Subprogram_Or_Body): Moved to the spec
3668 of Sem_Prag. Emit precise error messages. Account for cases of
3669 rewritten expression functions, generic instantiations, handled
3670 sequence of statements and pragmas from aspects.
3671 (Get_Argument): New routine.
3672 (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Removed.
3673 (Preanalyze_CTC_Args): Removed.
3674 (Process_Class_Wide_Condition): New routine.
3675 * sem_prag.ads (Analyze_Test_Case_In_Decl_Part): Update
3676 the parameter profile along with the comment on usage.
3677 (Find_Related_Subprogram_Or_Body): Moved from the body of Sem_Prag.
3678 (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Removed.
3679 (Test_Case_Arg): New routine.
3680 * sem_util.adb Add with and use clauses for Sem_Ch6.
3681 (Add_Contract_Item): This routine now creates a contract
3682 node the first time an item is added. Remove the duplicate
3683 aspect/pragma checks.
3684 (Check_Result_And_Post_State): Reimplemented.
3685 (Corresponding_Spec_Of): New routine.
3686 (Get_Ensures_From_CTC_Pragma): Removed.
3687 (Get_Requires_From_CTC_Pragma): Removed.
3688 (Has_Significant_Contract): New routine.
3689 (Inherit_Subprogram_Contract): Inherit only if the source
3691 (Install_Generic_Formals): New routine.
3692 (Original_Aspect_Name): Removed.
3693 (Original_Aspect_Pragma_Name): New routine.
3694 * sem_util.ads (Check_Result_And_Post_State): Reimplemented.
3695 (Corresponding_Spec_Of): New routine.
3696 (Get_Ensures_From_CTC_Pragma): Removed.
3697 (Get_Requires_From_CTC_Pragma): Removed.
3698 (Has_Significant_Contract): New routine.
3699 (Install_Generic_Formals): New routine.
3700 (Original_Aspect_Name): Removed.
3701 (Original_Aspect_Pragma_Name): New routine.
3702 * sem_warn.adb Add with and use clauses for Sem_Prag.
3703 (Within_Postcondition): Use Test_Case_Arg to extract "Ensures".
3705 2015-03-02 Ed Schonberg <schonberg@adacore.com>
3707 * sem_ch8.adb (Available_Subtype): Optimization in
3708 Find_Selected_Component: when safe, use existing subtype of
3709 array component, possibly discriminant-dependent, rather than
3710 creating new subtype declaration for it. In this fashion different
3711 occurrences of the component have the same subtype, rather than
3712 just equivalent ones. Simplifies value tracing in GNATProve.
3714 2015-03-01 Arnaud Charlet <charlet@adacore.com>
3718 * doc/gnat_ugn/gnat_project_manager.rst,
3719 doc/gnat_ugn/platform_specific_information.rst: Remove reference to
3720 image, too troublesome with texi format.
3721 * gnat_ugn.texi: Regenerate.
3723 2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
3726 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8): Remove.
3727 (DEF_FUNCTION_TYPE_VAR_12): Likewise.
3728 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
3730 2015-02-23 Thomas Schwinge <thomas@codesourcery.com>
3732 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8): Fix number of
3733 arguments parameter.
3734 (DEF_FUNCTION_TYPE_VAR_12): Likewise.
3736 2015-02-22 Arnaud Charlet <charlet@adacore.com>
3738 * doc/Makefile: postprocess texinfo files to update @dircategory
3739 and update texi files under gcc/ada.
3740 * gnat_ugn.texi, gnat_rm.texi: Regenerated.
3742 2015-02-22 Arnaud Charlet <charlet@adacore.com>
3744 * doc/gnat_ugn/project-manager-figure.png,
3745 doc/gnat_ugn/rtlibrary-structure.png: New.
3747 2015-02-22 Tom de Vries <tom@codesourcery.com>
3750 * gnat-style.texi (@subsection Loop Statements): Replace @noindent by
3751 @item, and fix warning '@itemize has text but no @item'.
3753 2015-02-20 Ed Schonberg <schonberg@adacore.com>
3755 * sem_prag.adb (Analyze_Pragma, case Obsolescent): Pragma
3756 legally applies to an abstract subprogram declaration.
3757 * freeze.adb: Minor comment addition.
3759 2015-02-20 Robert Dewar <dewar@adacore.com>
3761 * errout.ads: Document replacement of Name_uPre/Post/Type_Invariant.
3762 * erroutc.adb (Set_Msg_Str): Replace _xxx.
3763 (Pre/Post/Type_Invariant) by xxx'Class.
3764 * erroutc.ads (Set_Msg_Str): Replace _xxx.
3765 (Pre/Post/Type_Invariant) by xxx'Class.
3766 * sem_prag.adb (Fix_Error): Remove special casing of
3767 Name_uType_Invariant.
3768 (Analyze_Pre_Post_Condition_In_Decl_Part): Remove special casing of
3769 Name_uPre and Name_uPost in aspect case (done in Errout now).
3771 2015-02-20 Robert Dewar <dewar@adacore.com>
3773 * g-alveop.adb: Minor style fixes.
3775 2015-02-20 Robert Dewar <dewar@adacore.com>
3777 * freeze.adb (Warn_Overlay): Guard against blow up with address
3780 2015-02-20 Bob Duff <duff@adacore.com>
3782 * exp_attr.adb (May_Be_External_Call): Remove this. There is no need
3783 for the compiler to guess whether the call is internal or external --
3784 it is always external.
3785 (Expand_Access_To_Protected_Op): For P'Access, where P
3786 is a protected subprogram, always create a pointer to the
3787 External_Subprogram.
3789 2015-02-20 Robert Dewar <dewar@adacore.com>
3791 * a-dispat.adb, a-stcoed.ads: Minor reformatting.
3793 2015-02-20 Robert Dewar <dewar@adacore.com>
3795 * sem_ch13.adb (Build_Discrete_Static_Predicate): Allow static
3796 predicate for non-static subtype.
3797 (Build_Predicate_Functions): Do not assume subtype associated with a
3798 static predicate must be static.
3800 2015-02-20 Robert Dewar <dewar@adacore.com>
3802 * errout.adb (Set_Msg_Node): Better handling of internal names
3803 (Set_Msg_Node): Kill message when we cannot eliminate internal name.
3804 * errout.ads: Document additional case of message deletion.
3805 * namet.adb (Is_Internal_Name): Refined to consider wide
3806 strings in brackets notation and character literals not to be
3808 * sem_ch8.adb (Find_Selected_Component): Give additional error
3809 when selector name is a subprogram whose first parameter has
3810 the same type as the prefix, but that type is untagged.
3812 2015-02-20 Robert Dewar <dewar@adacore.com>
3814 * g-allein.ads, g-alveop.adb, g-alveop.ads, opt.ads: Minor reformatting
3816 2015-02-20 Tristan Gingold <gingold@adacore.com>
3818 * opt.ads (GNAT_Mode_Config): New variable.
3819 * opt.adb (Set_Opt_Config_Switches): Consider GNAT_Mode_Config
3820 to set Assertions_Enabled.
3821 * switch-c.adb (Scan_Front_End_Switches): Set GNAT_Mode_Config
3824 2015-02-20 Robert Dewar <dewar@adacore.com>
3826 * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Add an additional
3827 comment regarding the handling of unterminated fixed-point
3829 * s-valuns.ads (Scan_Raw_Unsigned): Add comments
3830 corresponding to those previously added for
3831 System.Val_LLU.Scan_Raw_Long_Long_Unsigned.
3833 2015-02-20 Olivier Hainque <hainque@adacore.com>
3835 * g-allein.ads, g-alveop.ads, g-alveop.adb: Code clean ups.
3837 2015-02-20 Robert Dewar <dewar@adacore.com>
3839 * sem_prag.adb: Minor comment clarification.
3841 2015-02-20 Olivier Hainque <hainque@adacore.com>
3843 * g-allein.ads (vec_ctf, vec_vcsfx, vec_vcfux): Remove.
3844 * g-alleve.ads, g-alleva.adb (vcfux): Likewise.
3845 * g-alveop.ads (vec_vcfsx, vec_vcfux): Just rename the ll versions.
3846 (vec_ctf): Now renamings as well.
3848 2015-02-20 Robert Dewar <dewar@adacore.com>
3850 * switch-c.adb, bindgen.adb: Minor reformatting.
3852 2015-02-20 Ed Schonberg <schonberg@adacore.com>
3854 * sem_prag.adb (Analyze_Pragma, case Type_Invariant):
3855 Invariant'class is allowed on an abstract type.
3857 2015-02-20 Ed Schonberg <schonberg@adacore.com>
3859 * sem_ch3.adb (Access_Definition): If the access definition is
3860 for a protected component and defines an access to protected
3861 subprogram, do not create an itype reference for it because a
3862 full type declaration will be built in order to generate the
3863 proper equivalent type.
3864 (Analyze_Subtype_Declaration): Add information of incomplete
3865 subtypes, for Ada 2012 extended uses of incomplete types.
3867 2015-02-20 Gary Dismukes <dismukes@adacore.com>
3869 * sem_res.adb: Minor reformatting.
3871 2015-02-20 Vincent Celier <celier@adacore.com>
3873 * switch-c.adb (Scan_Front_End_Switches): When comparing runtime
3874 path name for several switches --RTS, use the normalized path
3877 2015-02-20 Vincent Celier <celier@adacore.com>
3879 * bindgen.adb: Minor reformatting and code reorganization.
3881 2015-02-20 Jose Ruiz <ruiz@adacore.com>
3883 * a-stcoed.ads: Add spec for this package (Unimplemented_Unit).
3884 * impunit.adb (Non_Imp_File_Names_12): Mark unit a-stcoed.ads as
3885 defined by Ada 2012.
3887 2015-02-20 Arnaud Charlet <charlet@adacore.com>
3889 * sysdep.c, expect.c, s-oscons-tmplt.c, gsocket.h, adaint.c: Remove
3890 obsolete references to RTX, nucleus, VMS.
3892 2015-02-20 Ed Schonberg <schonberg@adacore.com>
3894 * sem_prag.adb (Fix_Error): For an illegal Type_Invariant'Class
3895 aspect, use name that mentions Class explicitly, rather than
3896 compiler-internal name.
3898 2015-02-20 Robert Dewar <dewar@adacore.com>
3900 * debug.adb: Add documentation for -gnatd.2 (allow statements
3902 * par-ch3.adb (P_Identifier_Declarations): Handle
3903 statement appearing where declaration expected more cleanly.
3904 (Statement_When_Declaration_Expected): Implement debug flag
3907 2015-02-20 Jose Ruiz <ruiz@adacore.com>
3909 * a-dinopr.ads: Add spec for this package (Unimplemented_Unit).
3910 * a-dispat.ads (Yield): Include procedure added in Ada 2012.
3911 * a-dispat.adb (Yield): Implement procedure added in Ada 2012.
3912 * impunit.adb (Non_Imp_File_Names_05): Mark unit a-dinopr.ads as
3913 defined by Ada 2005.
3914 * snames.ads-tmpl (Name_Non_Preemptive_FIFO_Within_Priorities):
3915 This is the correct name for the dispatching policy (FIFO was
3918 2015-02-20 Javier Miranda <miranda@adacore.com>
3920 * sem_res.adb (Resolve_Type_Conversion): If the type of the
3921 operand is the limited-view of a class-wide type then recover
3922 the class-wide type of the non-limited view.
3924 2015-02-20 Arnaud Charlet <charlet@adacore.com>
3926 * gcc-interface/Makefile.in: Remove references to nucleus.
3927 * gcc-interface/decl.c (gnat_to_gnu_entity, case E_Procedure): Set
3928 extern_flag to true for Inline_Always subprograms with
3929 Intrinsic convention.
3931 2015-02-20 Yannick Moy <moy@adacore.com>
3933 * sem_prag.ads: Minor typo in comment.
3935 2015-02-20 Pascal Obry <obry@adacore.com>
3937 * s-osprim-mingw.adb: Fix Get_Base_Time parameter mode.
3939 2015-02-20 Vincent Celier <celier@adacore.com>
3941 * makeutl.adb (Get_Directories.Add_Dir): Add a directory only
3944 2015-02-20 Robert Dewar <dewar@adacore.com>
3946 * sem_eval.ads: Minor reformatting.
3948 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
3950 * freeze.adb (Size_Known): Do not set the packed size for
3951 independent type or component.
3952 (Freeze_Array_Type): Check for Independent[_Components] with packing
3953 or explicit component size clause.
3954 * gnat1drv.adb (Post_Compilation_Validation_Checks): Do the validation
3955 of independence pragmas only for non-GCC back-ends.
3956 * sem_ch13.adb (Initialize): Likewise for the initialization.
3957 * sem_prag.adb (Record_Independence_Check): New procedure to record an
3958 independence check in the table.
3959 (Analyze_Pragma): Use it throughout instead of doing it manually.
3960 * gcc-interface/decl.c (gnat_to_gnu_field): Add support for
3961 independent type or component.
3963 2015-02-20 Thomas Quinot <quinot@adacore.com>
3965 * adaint.c (__gnat_readdir): For Solaris, use 64 bit variants of
3966 struct direct and readdir. This is required for NFS filesystems
3967 mounted from servers that use 64-bit cookies.
3969 2015-02-20 Ed Schonberg <schonberg@adacore.com>
3971 * sem_ch12.adb (Analyze_Subprogram_Instantiaion): New subprogram
3972 Build_Subprogram_Renaming, to create renaming of subprogram
3973 instance in the the declaration of the wrapper package rather
3974 than in its body, so that it is available for analysis of aspects
3975 propagated from generic to instantiation.
3976 (Check_Mismatch): An actual for a formal package that is an
3977 incomplete type matches a formal type that is incomplete.
3978 (Instantiate_Package_Body): Move code that builds subprogram
3979 renaming to Analyze_Subprogram_Instantiation.
3980 (Instantiate_Type): The generated subtype is a limited view if
3981 the actual is a limited view.
3982 (Load_Parent_Of_Generic): Retrieve instance declaration from
3983 its new position within wrapper package.
3985 2015-02-20 Arnaud Charlet <charlet@adacore.com>
3987 * s-parame-vxworks.adb, s-os_lib.ads: Update comments.
3989 2015-02-20 Robert Dewar <dewar@adacore.com>
3991 * s-osinte-vxworks.ads (To_Timespec): Add comment about the
3992 issue of negative arguments.
3994 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
3996 * gnat1drv.adb: Minor consistency fix.
3998 2015-02-20 Pascal Obry <obry@adacore.com>
4000 * s-osprim-mingw.adb (Get_Base_Time): Properly release lock in all
4003 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
4005 * inline.adb (Expand_Inlined_Call): Skip again calls to subprogram
4007 * exp_ch6.adb (Expand_Call): Use back-end inlining
4008 instead of expansion for simple subprogram renamings.
4010 2015-02-20 Robert Dewar <dewar@adacore.com>
4012 * exp_util.adb: Minor reformatting.
4014 2015-02-20 Vincent Celier <celier@adacore.com>
4016 * switch-c.adb (Scan_Front_End_Switches): Do not fail when --RTS=
4017 is specified several times with different values that indicates
4018 the same runtime directory.
4020 2015-02-20 Ed Schonberg <schonberg@adacore.com>
4022 * sem_attr.adb (Check_Not_Incomplete_Type): Clean up code to
4023 handle properly illegal uses of attributes on prefixes on an
4024 incomplete type, both when the type of the prefix is locally
4025 incomplete, and when it is a limited view of a type whose
4026 non-limited view is not available.
4027 (Analyze_Attribute): Add calls to Check_Not_Incomplete_Type for
4028 'Address and others.
4030 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
4032 * exp_ch6.adb: Fix minor typo in comment.
4034 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
4036 * sinfo.ads: Add comment.
4038 2015-02-20 Olivier Hainque <hainque@adacore.com>
4040 * opt.ads: Replace Opt.Suppress_All_Inlining by two separate
4041 flags controlling the actual FE inlining out of pragma Inline
4042 and pragma Inline_Always.
4043 * adabkend.adb (Scan_Compiler_Arguments): Set both flags to True
4044 on -fno-inline, which disables all inlining in compilers with
4045 an Ada back-end and without back-end inlining support.
4046 * back_end.adb (Scan_Back_End_Switches): Set the Inline related
4047 flag to True on -fno-inline and leave Inline_Always alone for
4049 * back_end.ads (Scan_Compiler_Arguments): Adjust spec wrt the
4050 names of the Opt flags it sets.
4051 * gnat1drv.adb (Adjust_Global_Switches): Remove test on
4052 Opt.Suppress_All_Inlining in the Back_End_Inlining computation.
4053 * sem_prag.adb (Make_Inline): Remove early return conditioned
4054 on Opt.Suppress_All_Inlining.
4055 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Use the flags to
4056 disable the calls to Build_Body_To_Inline otherwise triggered
4057 by pragma Inline or Inline_Always. This will prevent actual
4058 front-end inlining of the subprogram on calls.
4060 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
4062 * exp_ch3.adb (Default_Initialize_Object): Call Add_Inlined_Body on the
4063 Abort_Undefer_Direct function.
4064 * exp_ch5.adb (Expand_N_Assignment_Statement): Likewise.
4065 * exp_intr.adb (Expand_Unc_Deallocation): Likewise.
4066 * exp_prag.adb (Expand_Pragma_Abort_Defer): Likewise.
4067 * exp_ch4.adb (Expand_N_Selected_Component): Adjust call to
4069 * exp_ch6.adb (Expand_Call): Adjust calls to Add_Inlined_Body.
4070 Remove call to Register_Backend_Call and move code resetting
4071 Needs_Debug_Info on inlined subprograms to...
4072 * inline.ads (Add_Inlined_Body): Add N parameter.
4073 (Register_Backend_Call): Delete.
4074 * inline.adb (Add_Inlined_Body): ...here and simplify.
4075 Register the call with Backend_Calls directly.
4076 (Register_Backend_Call): Delete.
4077 * s-stalib.ads (Abort_Undefer_Direct): Restore pragma Inline.
4079 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
4081 * s-stalib.ads: Fix typo.
4083 2015-02-20 Ed Schonberg <schonberg@adacore.com>
4085 * exp_ch3.adb (Default_Initialize_Object): If the object has a
4086 delayed freeze, the actions associated with default initialization
4087 must be part of the freeze actions, rather that being inserted
4088 directly after the object declaration.
4090 2015-02-20 Robert Dewar <dewar@adacore.com>
4092 * lib-load.adb: Minor comment update.
4094 2015-02-20 Vincent Celier <celier@adacore.com>
4096 * prj-proc.adb (Process_Case_Construction): When there are
4097 incomplete withed projects and the case variable is unknown,
4098 skip the case construction.
4100 2015-02-20 Ed Schonberg <schonberg@adacore.com>
4102 * exp_ch6.adb (Expand_Actuals): Add caller-side invariant checks
4103 when an actual is a view conversion, either because the call is
4104 to an inherited operation, or because the actual is an explicit
4105 type conversion to an ancestor type. Fixes ACATS 4.0D: C732001
4107 2015-02-20 Robert Dewar <dewar@adacore.com>
4109 * einfo.ads: Minor comment updates Fix missing pragma Inline
4110 for Set_Partial_View_Has_Unknown_Discr.
4111 * einfo.adb (Write_Entity_Flags): Add missing entry for
4112 Partial_View_Has_Unknown_Discr.
4113 * sem_ch3.adb: Minor reformatting.
4115 2015-02-20 Vincent Celier <celier@adacore.com>
4117 * opt.ads: Minor cleanup: remove mention of gprmake.
4118 * s-stalib.ads (Abort_Undefer_Direct): Do not inline.
4119 * s-tataat.adb: Do not call System.Tasking.Self but directly
4120 System.Task_Primitives.Operations.Self.
4122 2015-02-20 Arnaud Charlet <charlet@adacore.com>
4124 * gnat_rm.texi, gnat_ugn.texi: Now automatically generated from
4125 sphinx in the doc directory.
4126 * doc: New directory containing sphinx versions of gnat_rm and gnat_ugn
4128 2015-02-20 Robert Dewar <dewar@adacore.com>
4130 * sem_res.adb: Minor reformatting.
4131 * exp_ch9.adb (Build_Protected_Spec): Copy Aliased setting when
4133 * sem_ch13.adb (Analyze_Aspect_Specifications): Exclude Boolean
4134 aspects from circuitry setting delay required to false if the
4135 argument is an integer literal.
4137 2015-02-20 Ed Schonberg <schonberg@adacore.com>
4139 * einfo.ads. einfo.adb (Partial_View_Has_Unknown_Discr): New flag
4140 on type entities, to enforce AI12-0133: default initialization
4141 of types whose partial view has unknown discriminants does not
4142 get an invariant check, because clients of the unit can never
4143 declare objects of such types.
4144 * sem_ch3.adb (Find_Type_Name); Set new flag
4145 Partial_View_Has_Unknown_Discr when needed.
4146 * exp_ch3.adb (Expand_N_Object_Declaration): Use flag to suppress
4147 generation of invariant call on default-initialized object.
4149 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
4151 * gcc-interface/decl.c (gnat_to_gnu_param): Do not strip the padding
4152 if the parameter either is passed by reference or if the alignment
4155 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
4157 * gcc-interface/decl.c (is_cplusplus_method): Use Is_Primitive flag to
4158 detect primitive operations of tagged and untagged types.
4160 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
4162 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not bother about alias
4163 sets in presence of derivation for subprogram types.
4165 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
4167 * gcc-interface/utils.c (begin_subprog_body): Assert that the body is
4168 present in the same context as the declaration.
4170 2015-02-07 Jakub Jelinek <jakub@redhat.com>
4173 * gcc-interface/trans.c (gigi): Recreate optimization_default_node
4174 and optimization_current_node after tweaking global_options.
4176 2015-02-05 Robert Dewar <dewar@adacore.com>
4178 * prj-proc.adb, sem_aux.adb, exp_ch9.adb, errout.adb, prj-dect.adb,
4179 prj-nmsc.adb: Minor reformatting.
4181 2015-02-05 Ed Schonberg <schonberg@adacore.com>
4183 * sem_type.adb (Covers): In ASIS_Mode the Corresponding_Record
4184 of a protected type may not be available, so to check conformance
4185 with an interface type, examine the interface list in the type
4186 declaration directly.
4187 (Write_Overloads): Improve information for indirect calls,
4190 2015-02-05 Ed Schonberg <schonberg@adacore.com>
4192 * exp_ch3.adb (Make_Tag_Assignment): Do not perform this
4193 expansion activity in ASIS mode.
4195 2015-02-05 Javier Miranda <miranda@adacore.com>
4197 * errout.adb (Error_Msg_PT): Add missing error.
4198 * sem_ch6.adb (Check_Synchronized_Overriding): Check the missing
4199 RM rule. Code cleanup.
4200 * exp_ch9.adb (Build_Wrapper_Spec): Propagate "constant" in
4201 anonymous access types. Found working on the tests. Code cleanup.
4203 2015-02-05 Vincent Celier <celier@adacore.com>
4205 * prj-dect.adb (Parse_Attribute_Declaration): Continue scanning
4206 when there are incomplete withs.
4207 * prj-nmsc.adb (Process_Naming): Do not try to get the value
4208 of an element when it is nil.
4209 (Check_Naming): Do not check a nil suffix for illegality
4210 * prj-proc.adb (Expression): Do not process an empty term.
4211 * prj-strt.adb (Attribute_Reference): If attribute cannot be
4212 found, parse a possible index to avoid cascading errors.
4214 2015-02-05 Ed Schonberg <schonberg@adacore.com>
4216 * sem_aux.adb (Is_Derived_Type): A subprogram_type generated
4217 for an access_to_subprogram declaration is not a derived type.
4219 2015-02-05 Robert Dewar <dewar@adacore.com>
4221 * errout.adb (Error_Msg_Internal): For non-serious error set
4222 Fatal_Error to Ignored.
4223 * lib-load.adb (Load_Unit): Minor comment updates.
4224 * sem_ch10.adb (Analyze_With_Clause): Propagate Fatal_Error
4225 setting from with'ed unit to with'ing unit.
4226 * sem_prag.adb (Analyze_Pragma, case Warnings): Document handling
4229 2015-02-05 Yannick Moy <moy@adacore.com>
4231 * sem_prag.adb, par-prag.adb: Minor code clean up.
4233 2015-02-05 Yannick Moy <moy@adacore.com>
4235 * par-prag.adb (Pragma_Warnings): Update for extended form
4236 of pragma Warnings. The "one" argument case may now have 2 or
4238 * sem_prag.adb (Analyze_Pragma/Pragma_Warnings): Update for
4239 extended form of pragma Warnings. Pragma with tool name is either
4240 rewritten as null or as an equivalent form without tool name,
4242 * snames.ads-tmpl (Name_Gnatprove): New name.
4244 2015-02-05 Robert Dewar <dewar@adacore.com>
4246 * sem_ch13.adb (Add_Invariants): Don't assume invariant is
4248 * sem_prag.adb (Analyze_Pragma, case Check): Don't assume
4249 condition is standard Boolean, it can be non-standard derived
4252 2015-02-05 Robert Dewar <dewar@adacore.com>
4254 * checks.adb (Enable_Range_Check): Disconnect attempted
4255 optimization for the case of range check for subscript of
4256 unconstrained array.
4258 2015-02-05 Robert Dewar <dewar@adacore.com>
4260 * par-ch13.adb (With_Present): New function
4261 (Aspect_Specifications_Present): Handle WHEN in place of WITH
4262 (Get_Aspect_Specifications): Comment update.
4263 * par.adb: Comment updates.
4265 2015-02-05 Robert Dewar <dewar@adacore.com>
4267 * errout.adb (Handle_Serious_Error): New setting of Fatal_Error.
4268 * frontend.adb (Frontend): New setting of Fatal_Error.
4269 * lib-load.adb (Create_Dummy_Package_Unit): New setting of
4271 (Load_Main_Source): New setting of Fatal_Error
4272 (Load_Unit): New setting of Fatal_Error.
4273 * lib-writ.adb (Add_Preprocessing_Dependency): New setting of
4275 (Ensure_System_Dependency): New setting of Fatal_Error.
4276 * lib.adb (Fatal_Error): New setting of Fatal_Error
4277 (Set_Fatal_Error): New setting of Fatal_Error.
4278 * lib.ads: New definition of Fatal_Error and associated routines.
4279 * par-ch10.adb (P_Compilation_Unit): New setting of Fatal_Error.
4280 * par-load.adb (Load): New setting of Fatal_Error.
4281 * rtsfind.adb (Load_RTU): New setting of Fatal_Error.
4282 * sem_ch10.adb (Analyze_Compilation_Unit): New setting of
4284 (Optional_Subunit): New setting of Fatal_Error.
4285 (Analyze_Proper_Body): New setting of Fatal_Error.
4286 (Load_Needed_Body): New setting of Fatal_Error.
4288 2015-02-05 Ed Schonberg <schonberg@adacore.com>
4290 * sem_res.adb (Resolve_Call): If the function being called has
4291 out parameters do not check for language version if the function
4292 comes from a predefined unit, as those are always compiled in
4295 2015-02-05 Ed Schonberg <schonberg@adacore.com>
4297 * sem_ch3.adb (Process_Full_View): Verify that the full view
4298 of a type extension must carry an explicit limited keyword if
4299 the partial view does (RM 7.3 (10.1)).
4301 2015-02-05 Robert Dewar <dewar@adacore.com>
4303 * g-rannum.adb, g-rannum.ads, s-rannum.adb, s-rannum.ads,
4304 sem_warn.ads: Minor reformatting.
4305 * exp_ch13.adb (Expand_N_Freeze_Entity): Add guard for aspect
4307 * sem_prag.adb (Analyze_Pragma, case Type_Invariant): Give
4308 error for abstract type.
4310 2015-02-05 Yannick Moy <moy@adacore.com>
4312 * opt.ads (Warn_On_Suspicious_Contract): Update comment
4314 * sem_attr.adb (Analyze_Attribute/Attribute_Update): Warn on
4315 suspicious uses of 'Update.
4316 * sem_warn.adb, sem_warn.ads (Warn_On_Suspicious_Update): New
4317 function issues warning on suspicious uses of 'Update.
4318 * g-rannum.adb, g-rannum.ads, s-rannum.adb, s-rannum.ads: Mark
4319 package spec and body as SPARK_Mode Off.
4321 2015-02-05 Robert Dewar <dewar@adacore.com>
4323 * sem_prag.adb (Set_Elab_Unit_Name): New name for Set_Unit_Name
4324 (Analyze_Pragma): Change Set_Unit_Name to Set_Elab_Unit_Name
4325 (Set_Elab_Unit_Name): Generate reference for Elaborate[_All]
4326 * sem_warn.adb (Warn_On_Unreferenced_Entity): Suppress warning
4327 for exported entity.
4329 2015-02-05 Hristian Kirtchev <kirtchev@adacore.com>
4331 * sem_prag.adb (Check_Pragma_Conformance): Add
4332 local variable Arg. Ensure that all errors are associated with
4333 the pragma if it appears without an argument. Add comments on
4336 2015-02-05 Robert Dewar <dewar@adacore.com>
4338 * lib-xref.adb: Minor reformatting.
4340 2015-02-05 Tristan Gingold <gingold@adacore.com>
4343 * env.c: Fix thinko: handle Darwin case before default one.
4345 2015-01-30 Robert Dewar <dewar@adacore.com>
4347 * a-assert.adb: Minor reformatting.
4348 * sem_ch13.adb: Minor comment clarification.
4349 * types.ads: Minor comment update.
4350 * sem_eval.adb (Real_Or_String_Static_Predicate_Matches): Avoid blow up
4351 when we have a predicate that is nothing but an inherited dynamic
4354 2015-01-30 Jerome Guitton <guitton@adacore.com>
4356 * gcc-interface/Makefile.in (x86-vxworks): Update GCC_SPEC_FILES to
4357 include cert link spec.
4359 2015-01-30 Robert Dewar <dewar@adacore.com>
4361 * einfo.ads: Minor comment fix.
4362 * freeze.adb (Freeze_Profile): Add test for suspicious import
4364 * sem_prag.adb (Process_Import_Or_Interface): Test for suspicious
4365 use in Pure unit is now moved to Freeze (to properly catch
4366 Pure_Function exemption).
4368 2015-01-30 Bob Duff <duff@adacore.com>
4370 * sem_res.ads: Minor comment fix.
4371 * sem_type.adb: sem_type.adb (Remove_Conversions): Need to
4372 check both operands of an operator.
4374 2015-01-30 Yannick Moy <moy@adacore.com>
4376 * a-assert.ads, a-assert.adb: Mark package spec in SPARK. Set assertion
4377 policy for Pre to Ignore.
4378 (Assert): Add precondition.
4380 2015-01-30 Robert Dewar <dewar@adacore.com>
4382 * sem_prag.adb (Process_Import_Or_Interface): Warn if used in
4384 * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Clarify
4385 documentation for some special cases of invalid attempts at
4388 2015-01-30 Gary Dismukes <dismukes@adacore.com>
4390 * errout.ads: Minor reformatting.
4392 2015-01-30 Yannick Moy <moy@adacore.com>
4394 * inline.adb (Process_Formals): Use the sloc of
4395 the inlined node instead of the sloc of the actual parameter,
4396 when replacing formal parameters by the actual one.
4398 2015-01-30 Arnaud Charlet <charlet@adacore.com>
4400 * g-expect.adb (Get_Command_Output): Use infinite timeout when
4403 2015-01-30 Ed Schonberg <schonberg@adacore.com>
4405 * sem_ch12.adb (Analyze_Associations): If an in-parameter is
4406 defaulted in an instantiation, add an entry in the list of actuals
4407 to indicate the default value of the formal (as is already done
4408 for defaulted subprograms).
4410 2015-01-30 Javier Miranda <miranda@adacore.com>
4412 * errout.adb (Error_Msg_PT): Minor error phrasing update.
4414 2015-01-30 Robert Dewar <dewar@adacore.com>
4416 * sem_warn.adb (Warn_On_Known_Condition): Improve error message
4419 2015-01-30 Pierre-Marie de Rodat <derodat@adacore.com>
4421 * exp_dbug.adb (Get_Encoded_Name): When
4422 -fgnat-encodings=minimal, do not generate names for biased types.
4424 2015-01-30 Tristan Gingold <gingold@adacore.com>
4427 * env.c: Move vxworks and darwin includes out of #ifdef IN_RTS.
4429 2015-01-30 Gary Dismukes <dismukes@adacore.com>
4431 * freeze.adb: Minor reformatting.
4433 2015-01-30 Javier Miranda <miranda@adacore.com>
4435 * errout.ads (Error_Msg_PT): Replace Node_Id by Entity_Id and
4436 improve its documentation.
4437 * errout.adb (Error_Msg_PT): Improve the error message.
4438 * sem_ch6.adb (Check_Conformance): Update call to Error_Msg_PT.
4439 (Check_Synchronized_Overriding): Update call to Error_Msg_PT.
4440 * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup.
4442 2015-01-30 Robert Dewar <dewar@adacore.com>
4444 * sem_warn.adb (Warn_On_Known_Condition): Do special casing of
4445 message for False case.
4447 2015-01-30 Doug Rupp <rupp@adacore.com>
4449 * s-vxwext-kernel.ads (Task_Cont): Remove imported subprogram body.
4450 * s-vxwext-kernel.adb (Task_Cont): New subpprogram body specialized for
4453 2015-01-30 Gary Dismukes <dismukes@adacore.com>
4455 * sem_attr.adb (Declared_Within_Generic_Unit):
4456 New function to test whether an entity is declared within the
4457 declarative region of a given generic unit.
4458 (Resolve_Attribute): For checking legality of subprogram'Access within
4459 a generic unit, call new Boolean function Declared_Within_Generic_Unit
4460 instead of simply comparing the results of Enclosing_Generic_Unit on
4461 the prefix and access type. Correct minor comment typos.
4463 2015-01-30 Robert Dewar <dewar@adacore.com>
4465 * freeze.adb, exp_util.ads: Update comment.
4466 * exp_util.adb, exp_ch3.adb: Minor code reorganization and reformatting.
4467 * sem_util.adb: Minor: fix typo.
4469 2015-01-30 Hristian Kirtchev <kirtchev@adacore.com>
4471 * sem_attr.adb (Analyze_Attribute): Ensure that
4472 the check concerning Refined_Post takes precedence over the
4475 2015-01-30 Gary Dismukes <dismukes@adacore.com>
4477 * sem_prag.adb: Minor typo fixes and reformatting.
4479 2015-01-30 Yannick Moy <moy@adacore.com>
4481 * sem_attr.adb: Code clean up.
4483 2015-01-30 Robert Dewar <dewar@adacore.com>
4485 * ali.adb (Scan_ALI): Set Serious_Errors flag in Unit record.
4486 * ali.ads (Unit_Record): Add new field Serious_Errors.
4487 * lib-writ.adb (Write_Unit_Information): Set SE (serious errors)
4488 attribute in U line.
4489 * lib-writ.ads: New attribute SE (serious erors) in unit line.
4491 2015-01-30 Hristian Kirtchev <kirtchev@adacore.com>
4493 * einfo.adb Update the usage of attributes Entry_Bodies_Array,
4494 Lit_Indexes, Scale_Value, Storage_Size_Variable,
4495 String_Literal_Low_Bound along associated routines and
4497 (Pending_Access_Types): New routine.
4498 (Set_Pending_Access_Types): New routine.
4499 (Write_Field15_Name): Add an entry for Pending_Access_Types.
4500 * einfo.ads Add new attribute Pending_Access_Types along
4501 with usage in nodes. Update the usage of attributes
4502 Entry_Bodies_Array, Lit_Indexes, Scale_Value,
4503 Storage_Size_Variable, String_Literal_Low_Bound.
4504 (Pending_Access_Types): New routine along with pragma Inline.
4505 (Set_Pending_Access_Types): New routine along with pragma Inline.
4506 * exp_ch3.adb (Expand_Freeze_Array_Type): Add new local variable
4507 Ins_Node. Determine the insertion node for anonynous access type
4508 that acts as a component type of an array. Update the call to
4509 Build_Finalization_Master.
4510 (Expand_Freeze_Record_Type): Update
4511 the calls to Build_Finalization_Master.
4512 (Freeze_Type): Remove
4513 local variable RACW_Seen. Factor out the code that deals with
4514 remote access-to-class-wide types. Create a finalization master
4515 when the designated type contains a private component. Fully
4516 initialize all pending access types.
4517 (Process_RACW_Types): New routine.
4518 (Process_Pending_Access_Types): New routine.
4519 * exp_ch4.adb (Expand_Allocator_Expression): Allocation no longer
4520 needs to set primitive Finalize_Address.
4521 (Expand_N_Allocator): Allocation no longer sets primitive
4523 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
4524 Update the call to Build_Finalization_Master.
4525 (Make_Build_In_Place_Call_In_Allocator): Allocation no longer
4526 needs to set primitive Finalize_Address.
4527 * exp_ch7.adb (Add_Pending_Access_Type): New routine.
4528 (Build_Finalization_Master): New parameter profile. Associate
4529 primitive Finalize_Address with the finalization master if the
4530 designated type has been frozen, otherwise treat the access
4531 type as pending. Simplify the insertion of the master and
4532 related initialization code.
4533 (Make_Finalize_Address_Body): Allow Finalize_Address for class-wide
4535 (Make_Set_Finalize_Address_Call): Remove forlam parameter Typ.
4536 Simplify the implementation.
4537 * exp_ch7.ads (Build_Finalization_Master): New parameter profile
4538 along with comment on usage.
4539 (Make_Set_Finalize_Address_Call): Remove formal parameter Typ. Update
4540 the comment on usage.
4541 * exp_util.adb (Build_Allocate_Deallocate_Proc): Use routine
4542 Finalize_Address to retrieve the primitive.
4543 (Finalize_Address): New routine.
4544 (Find_Finalize_Address): Removed.
4545 * exp_util.ads (Finalize_Address): New routine.
4546 * freeze.adb (Freeze_All): Remove the generation of finalization
4548 * sem_ch3.adb (Analyze_Full_Type_Declaration): Propagate any
4549 pending access types from the partial to the full view.
4551 2015-01-30 Robert Dewar <dewar@adacore.com>
4553 * sem_disp.adb: Minor reformatting.
4554 * sem_disp.ads: Documentation update.
4556 2015-01-30 Ed Schonberg <schonberg@adacore.com>
4558 * sem_disp.adb (Is_Dynamically_Tagged): when applied to an entity
4559 or a function call, return True if type is class-wide.
4560 * sem_res.adb (Resolve_Case_Expression, Resolve_If_Expression);
4561 Apply RM 4.5.7 (17/3): all or none of the dependent expression
4562 of a conditional expression must be dynamically tagged.
4564 2015-01-30 Ed Schonberg <schonberg@adacore.com>
4566 * sem_ch6.adb (Analyze_Function_Return): In an extended return
4567 statement, apply accessibility check to result object when there
4568 is no initializing expression (Ada 2012 RM 6.5 (5.4/3))
4570 2015-01-30 Robert Dewar <dewar@adacore.com>
4572 * sem_ch4.adb (Analyze_If_Expression): Allow for non-standard
4573 Boolean for case where ELSE is omitted.
4574 * sem_res.adb: Minor reformatting.
4576 2015-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
4578 Fix build under cygwin/64.
4579 * adaint.h: Add check for __CYGWIN__.
4580 * mingw32.h: Prevent windows.h from including x86intrin.h in GCC.
4582 2015-01-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
4585 * adaint.c: Handle __CYGWIN__ like __MINGW32__ here.
4586 * mingw32.h: Don't include <tchar.h> under cygwin.
4587 (_O_U8TEXT, _O_U16TEXT, _O_WTEXT): Set to _O_TEXT if not yet defined.
4589 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
4591 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8)
4592 (DEF_FUNCTION_TYPE_VAR_12): New macros.
4594 2015-01-09 Michael Collison <michael.collison@linaro.org>
4596 * gcc-interface/cuintp.c: Include hash-set.h, machmode.h,
4597 vec.h, double-int.h, input.h, alias.h, symtab.h,
4598 fold-const.h, wide-int.h, and inchash.h due to
4599 flattening of tree.h.
4600 * gcc-interface/decl.c: Ditto.
4601 * gcc-interface/misc.c: Ditto.
4602 * gcc-interface/targtyps.c: Include hash-set.h, machmode.h,
4603 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h,
4604 fold-const.h, wide-int.h, and inchash.h due to
4605 flattening of tree.h.
4606 * gcc-interface/trans.c: Include hash-set.h, machmode.h,
4607 vec.h, double-int.h, input.h, alias.h, symtab.h, real.h,
4608 fold-const.h, wide-int.h, inchash.h due to
4609 flattening of tree.h.
4610 * gcc-interface/utils.c: Include hash-set.h, machmode.h,
4611 vec.h, double-int.h, input.h, alias.h, symtab.h,
4612 fold-const.h, wide-int.h, and inchash.h due to
4613 flattening of tree.h.
4614 * gcc-interface/utils2.c: Ditto.
4616 2015-01-07 Robert Dewar <dewar@adacore.com>
4618 * sem_warn.adb (Check_One_Unit): Don't give unused entities
4619 warning for a package which is used as a generic parameter.
4621 2015-01-07 Bob Duff <duff@adacore.com>
4623 * usage.adb (Usage): Correct documentation of
4626 2015-01-07 Robert Dewar <dewar@adacore.com>
4628 * s-fileio.adb: Minor reformatting.
4630 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4632 * sem_ch12.adb (Instantiate_Object): If formal is an anonymous
4633 access to subprogram, replace its formals with new entities when
4634 building the object declaration, both if actual is present and
4635 when it is defaulted.
4637 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4639 * sem_ch5.adb (Analyze_Assignment): If left-hand side is a view
4640 conversion and type of expression has invariant, apply invariant
4641 check on expression.
4643 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4645 * sem_ch3.adb (Create_Constrained_Components): A call to
4646 Gather_Components may detect an error if an inherited discriminant
4647 that controls a variant is non-static.
4648 * sem_aggr.adb (Resolve_Record_Aggregate, Step 5): The call to
4649 Gather_Components may report an error if an inherited discriminant
4650 in a variant in non-static.
4651 * sem_util.adb (Gather_Components): If a non-static discriminant
4652 is inherited do not report error here, but let caller handle it.
4653 (Find_Actual): Small optimization.
4655 2015-01-07 Bob Duff <duff@adacore.com>
4657 * usage.adb (Usage): Document -gnatw.f switch.
4659 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4661 * sem_ch12.adb: Code clean up and minor reformatting.
4663 2015-01-07 Robert Dewar <dewar@adacore.com>
4665 * exp_ch4.adb (Expand_N_Type_Conversion): Add guard for
4666 Raise_Accessibility_Error call.
4667 * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Add documentation
4668 on handling of invalid digits in based constants.
4669 * s-fatgen.ads: Minor reformatting.
4670 * sem_attr.adb (Analyze_Attribute, case Unrestricted_Access):
4671 Avoid noting bogus modification for Valid test.
4672 * snames.ads-tmpl (Name_Attr_Long_Float): New Name.
4673 * einfo.ads: Minor reformatting.
4674 * sem_warn.adb: Minor comment clarification.
4675 * sem_ch12.adb: Minor reformatting.
4677 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4679 * exp_ch5.adb (Expand_Predicated_Loop): Handle properly loops
4680 over static predicates when the loop parameter specification
4681 carries a Reverse indicator.
4683 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4685 * sem_ch12.adb (Instantiate_Object): If formal has a default,
4686 actual is missing and formal has an anonymous access type, copy
4687 access definition in full so that tree for instance is properly
4688 formatted for ASIS use.
4690 2015-01-07 Bob Duff <duff@adacore.com>
4692 * sem_elab.adb (Check_Internal_Call_Continue): Give a warning
4693 for P'Access, where P is a subprogram in the same package as
4694 the P'Access, and the P'Access is evaluated at elaboration
4695 time, and occurs before the body of P. For example, "X : T :=
4696 P'Access;" would allow a subsequent call to X.all to be an
4697 access-before-elaboration error; hence the warning. This warning
4698 is enabled by the -gnatw.f switch.
4699 * opt.ads (Warn_On_Elab_Access): New flag for warning switch.
4700 * warnsw.adb (Set_Dot_Warning_Switch): Set Warn_On_Elab_Access.
4701 * gnat_ugn.texi: Document the new warning.
4703 2015-01-07 Johannes Kanig <kanig@adacore.com>
4705 * lib-xref-spark_specific.adb (Collect_SPARK_Xrefs): Skip unneeded
4708 2015-01-07 Robert Dewar <dewar@adacore.com>
4710 * s-taprop-linux.adb, clean.adb: Minor reformatting.
4712 2015-01-07 Arnaud Charlet <charlet@adacore.com>
4714 * s-tassta.adb: Relax some overzealous assertions.
4716 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4718 * sem_ch6.adb (Analyze_Return_Type): An call that returns a limited
4719 view of a type is legal when context is a thunk generated for
4720 operation inherited from an interface.
4721 * exp_ch6.adb (Expand_Simple_Function_Return): If context is
4722 a thunk and return type is an incomplete type do not continue
4723 expansion; thunk will be fully elaborated when generating code.
4725 2015-01-07 Doug Rupp <rupp@adacore.com>
4727 * s-osinte-mingw.ads (LARGE_INTEGR): New subtype.
4728 (QueryPerformanceFrequency): New imported procedure.
4729 * s-taprop-mingw.adb (RT_Resolution): Call above and return
4730 resolution vice a hardcoded value.
4731 * s-taprop-solaris.adb (RT_Resolution): Call clock_getres and return
4732 resolution vice a hardcoded value.
4733 * s-linux-android.ads (clockid_t): New subtype.
4734 * s-osinte-aix.ads (clock_getres): New imported subprogram.
4735 * s-osinte-android.ads (clock_getres): Likewise.
4736 * s-osinte-freebsd.ads (clock_getres): Likewise.
4737 * s-osinte-solaris-posix.ads (clock_getres): Likewise.
4738 * s-osinte-darwin.ads (clock_getres): New subprogram.
4739 * s-osinte-darwin.adb (clock_getres): New subprogram.
4740 * thread.c (__gnat_clock_get_res) [__APPLE__]: New function.
4741 * s-taprop-posix.adb (RT_Resolution): Call clock_getres to
4742 calculate resolution vice hard coded value.
4744 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4746 * exp_util.adb (Make_CW_Equivalent_Type): If root type is a
4747 limited view, use non-limited view when available to create
4748 equivalent record type.
4750 2015-01-07 Vincent Celier <celier@adacore.com>
4752 * gnatcmd.adb: Remove command Sync and any data and processing
4753 related to this command. Remove project processing for gnatstack.
4754 * prj-attr.adb: Remove package Synchonize and its attributes.
4756 2015-01-07 Vincent Celier <celier@adacore.com>
4758 * clean.adb: Minor error message change.
4760 2015-01-07 Tristan Gingold <gingold@adacore.com>
4763 * env.c (__gnat_environ): Adjust for darwin9/darwin10.
4765 2015-01-07 Javier Miranda <miranda@adacore.com>
4767 * sem_ch10.adb (Analyze_With_Clause): Compiling under -gnatq
4768 protect the frontend against never ending recursion caused by
4769 circularities in the sources.
4771 2015-01-07 Robert Dewar <dewar@adacore.com>
4773 * a-reatim.adb, make.adb, exp_pakd.adb, i-cpoint.adb, sem_ch8.adb,
4774 exp_ch3.adb: Minor reformatting.
4776 2015-01-07 Doug Rupp <rupp@adacore.com>
4778 * s-linux.ads (clockid_t): New subtype.
4779 * s-osinte-linux.ads (pragma Linker Options): Add -lrt.
4780 (clockid_t): New subtype.
4781 (clock_getres): Import system call.
4782 * s-taprop-linux.adb (System.OS_Constants): With and rename.
4783 (RT_Resolution): Remove
4784 hardcoded value and call clock_getres.
4785 * s-linux-sparc.ads, s-linux-mipsel.ads, s-linux-hppa.ads,
4786 s-linux-alpha.ads, s-linux-x32.ads (clockid_t): Add new subtype.
4788 2015-01-07 Robert Dewar <dewar@adacore.com>
4790 * sem_warn.adb (Check_One_Unit): Guard against context item
4791 with no Entity field.
4793 2015-01-07 Vincent Celier <celier@adacore.com>
4795 * clean.adb (Gnatclean): Warn that 'gnatclean -P' is obsolete.
4796 * make.adb (Initialize): Warn that 'gnatmake -P' is obsolete.
4798 2015-01-07 Vincent Celier <celier@adacore.com>
4800 * prj-conf.adb (Parse_Project_And_Apply_Config): Always finalize
4801 errors/warnings in the first parsing of the project files,
4802 to display the warnings when there is no errors.
4804 2015-01-07 Tristan Gingold <gingold@adacore.com>
4806 * i-cpoint.adb (Copy_Terminated_Array): Nicely handle null target.
4808 2015-01-07 Doug Rupp <rupp@adacore.com>
4810 * s-taprop-vxworks.adb (Stop_All_Tasks): Pass return
4811 value from Int_Lock as parameter to Int_Unlock.
4812 * s-osinte-vxworks.ads (Int_Unlock): Add parameter.
4813 * s-vxwext.ads (Int_Unlock): Likewise.
4814 * s-vxwext-kernel.adb (intUnlock, Int_Unlock): Likewise.
4815 * s-vxwext-kernel.ads (Int_Unlock): Likewise.
4816 * s-vxwext-rtp.adb (Int_Unlock): Likewise.
4817 * s-vxwext-rtp.ads (Int_Unlock): Likewise.
4819 2015-01-07 Pierre-Marie de Rodat <derodat@adacore.com>
4821 * exp_pakd.adb: Add a comment in exp_pakd.adb to explain why we
4824 2015-01-07 Tristan Gingold <gingold@adacore.com>
4826 * i-cpoint.adb (Copy_Terminated_Array): Use Copy_Array to
4829 2015-01-07 Eric Botcazou <ebotcazou@adacore.com>
4831 * sem_ch3.adb (Analyze_Full_Type_Declaration): Do not
4832 automatically set No_Strict_Aliasing on access types.
4833 * fe.h (No_Strict_Aliasing_CP): Declare.
4834 * gcc-interface/trans.c (gigi): Force flag_strict_aliasing to 0 if
4835 No_Strict_Aliasing_CP is set.
4837 2015-01-07 Johannes Kanig <kanig@adacore.com>
4839 * sem_ch8.adb (Analyze_Subprogram_Renaming) do
4840 not build function wrapper in gnatprove mode when the package
4841 is externally axiomatized.
4843 2015-01-07 Jose Ruiz <ruiz@adacore.com>
4845 * a-reatim.adb (Time_Of): Reduce the number of spurious overflows in
4846 intermediate computations when the parameters have different signs.
4848 2015-01-07 Javier Miranda <miranda@adacore.com>
4850 * exp_ch3.adb (Build_Init_Procedure): For derived types,
4851 improve the code which takes care of identifying and moving to
4852 the beginning of the init-proc the call to the init-proc of the
4855 2015-01-07 Olivier Hainque <hainque@adacore.com>
4857 * gcc-interface/trans.c (gnat_to_gnu, <N_Expression_With_Action>):
4858 Elaborate the expression as part of the same stmt group as the actions.
4860 2015-01-07 Robert Dewar <dewar@adacore.com>
4862 * sem_ch3.adb: Minor error message change.
4864 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4866 * sem_prag.adb (Analyze_Pragma, case Preelaborable_Initialization):
4867 Following AI05-028, the pragam applies legally to any composite type.
4869 2015-01-07 Arnaud Charlet <charlet@adacore.com>
4871 * s-osinte-vxworks.adb, s-osinte-vxworks.ads
4872 (sigwait, sigwaitinfo): Removed, not needed after all on any
4873 VxWorks configurations.
4875 2015-01-07 Robert Dewar <dewar@adacore.com>
4877 * sem_ch3.adb, freeze.adb, exp_disp.adb: Minor reformatting.
4879 2015-01-07 Javier Miranda <miranda@adacore.com>
4881 * exp_disp.adb (Expand_Interface_Conversion): Adding missing
4882 generation of accessibility check.
4884 2015-01-07 Ed Schonberg <schonberg@adacore.com>
4886 * sem_ch3.adb (Derived_Type_Declaration): In the case of an
4887 illegal completion from a class- wide type, set etype of the
4888 derived type properly to prevent cascaded errors.
4890 2015-01-07 Robert Dewar <dewar@adacore.com>
4892 * prj.ads, i-cpoint.adb, freeze.adb, ghost.adb, prj-err.adb: Minor
4895 2015-01-07 Robert Dewar <dewar@adacore.com>
4897 * restrict.adb (Check_Restriction_No_Use_Of_Attribute):
4899 (OK_No_Use_Of_Entity_Name): New function.
4900 (Set_Restriction_No_Use_Of_Entity): New procedure.
4901 * restrict.ads (Check_Restriction_No_Use_Of_Attribute):
4903 (OK_No_Use_Of_Entity_Name): New function.
4904 (Set_Restriction_No_Use_Of_Entity): New procedure.
4905 * sem_ch8.adb (Find_Direct_Name): Add check for violation of
4907 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
4908 Add processing for new restriction No_Use_Of_Entity.
4910 2015-01-07 Eric Botcazou <ebotcazou@adacore.com>
4912 * freeze.adb (Freeze_Array_Type): Apply same handling to Is_Atomic
4913 component type as to Has_Atomic_Components type. Remove useless
4914 test on Is_Aliased component type.
4916 2015-01-07 Hristian Kirtchev <kirtchev@adacore.com>
4918 * alloc.ads Alphabetize several declarations. Add constants
4919 Ignored_Ghost_Units_Initial and Ignored_Ghost_Units_Increment.
4920 * atree.adb Add with and use clauses for Opt.
4921 (Allocate_Initialize_Node): Mark a node as ignored Ghost
4922 if it is created in an ignored Ghost region.
4923 (Ekind_In): New variant.
4924 (Is_Ignored_Ghost_Node): New routine.
4925 (Set_Is_Ignored_Ghost_Node): New routine.
4926 * atree.adb Aplhabetize several subprograms declarations. Flag
4927 Spare0 is now known as Is_Ignored_Ghost_Node.
4928 (Ekind_In): New variant.
4929 (Is_Ignored_Ghost_Node): New routine.
4930 (Set_Is_Ignored_Ghost_Node): New routine.
4931 * einfo.adb: Flag 279 is now known as Contains_Ignored_Ghost_Code.
4932 (Contains_Ignored_Ghost_Code): New routine.
4933 (Set_Contains_Ignored_Ghost_Code): New routine.
4934 (Set_Is_Checked_Ghost_Entity, Set_Is_Ignored_Ghost_Entity):
4935 It is now possible to set this property on an unanalyzed entity.
4936 (Write_Entity_Flags): Output the status of flag
4937 Contains_Ignored_Ghost_Code.
4938 * einfo.ads New attribute Contains_Ignored_Ghost_Code along with
4940 (Contains_Ignored_Ghost_Code): New routine
4941 along with pragma Inline.
4942 (Set_Contains_Ignored_Ghost_Code): New routine along with pragma Inline.
4943 * exp_ch3.adb Add with and use clauses for Ghost.
4944 (Freeze_Type): Capture/restore the value of Ghost_Mode on entry/exit.
4945 Set the Ghost_Mode in effect.
4946 (Restore_Globals): New routine.
4947 * exp_ch7.adb (Process_Declarations): Do not process a context
4948 that invoves an ignored Ghost entity.
4949 * exp_dbug.adb (Qualify_All_Entity_Names): Skip an ignored Ghost
4950 construct that has been rewritten as a null statement.
4951 * exp_disp.adb Add with and use clauses for Ghost.
4952 (Make_DT): Capture/restore the value of Ghost_Mode on entry/exit. Set
4953 the Ghost_Mode in effect.
4954 (Restore_Globals): New routine.
4955 * exp_util.adb (Requires_Cleanup_Actions): An ignored Ghost entity
4956 does not require any clean up. Add two missing cases that deal
4957 with block statements.
4958 * freeze.adb Add with and use clauses for Ghost.
4959 (Freeze_Entity): Capture/restore the value of Ghost_Mode on entry/exit.
4960 Set the Ghost_Mode in effect.
4961 (Restore_Globals): New routine.
4962 * frontend.adb Add with and use clauses for Ghost. Remove any
4963 ignored Ghost code from all units that qualify.
4964 * ghost.adb New unit.
4965 * ghost.ads New unit.
4966 * gnat1drv.adb Add with clause for Ghost. Initialize and lock
4967 the table in package Ghost.
4968 * lib.ads: Alphabetize several subprogram declarations.
4969 * lib-xref.adb (Output_References): Do not generate reference
4970 information for ignored Ghost entities.
4971 * opt.ads Add new type Ghost_Mode_Type and new global variable
4973 * rtsfind.adb (Load_RTU): Provide a clean environment when
4974 loading a runtime unit.
4975 * sem.adb (Analyze): Capture/restore the value of Ghost_Mode on
4976 entry/exit as the node may set a different mode.
4978 Capture/restore the value of Ghost_Mode on entry/exit as the
4979 unit may be withed from a unit with a different Ghost mode.
4980 * sem_ch3.adb Add with and use clauses for Ghost.
4981 (Analyze_Full_Type_Declaration, Analyze_Incomplete_Type_Decl,
4982 Analyze_Number_Declaration, Analyze_Private_Extension_Declaration,
4983 Analyze_Subtype_Declaration): Set the Ghost_Mode in effect. Mark
4984 the entity as Ghost when there is a Ghost_Mode in effect.
4985 (Array_Type_Declaration): The implicit base type inherits the
4986 "ghostness" from the array type.
4987 (Derive_Subprogram): The
4988 alias inherits the "ghostness" from the parent subprogram.
4989 (Make_Implicit_Base): The implicit base type inherits the
4990 "ghostness" from the parent type.
4991 * sem_ch5.adb Add with and use clauses for Ghost.
4992 (Analyze_Assignment): Set the Ghost_Mode in effect.
4993 * sem_ch6.adb Add with and use clauses for Ghost.
4994 (Analyze_Abstract_Subprogram_Declaration, Analyze_Procedure_Call,
4995 Analyze_Subprogram_Body_Helper, Analyze_Subprogram_Declaration):
4996 Set the Ghost_Mode in effect. Mark the entity as Ghost when
4997 there is a Ghost_Mode in effect.
4998 * sem_ch7.adb Add with and use clauses for Ghost.
4999 (Analyze_Package_Body_Helper, Analyze_Package_Declaration,
5000 Analyze_Private_Type_Declaration): Set the Ghost_Mode in
5001 effect. Mark the entity as Ghost when there is a Ghost_Mode
5003 * sem_ch8.adb Add with and use clauses for Ghost.
5004 (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
5005 Analyze_Object_Renaming, Analyze_Package_Renaming,
5006 Analyze_Subprogram_Renaming): Set the Ghost_Mode in effect. Mark
5007 the entity as Ghost when there is a Ghost_Mode in effect.
5008 (Find_Type): Check the Ghost context of a type.
5009 * sem_ch11.adb Add with and use clauses for Ghost.
5010 (Analyze_Exception_Declaration): Set the Ghost_Mode in
5011 effect. Mark the entity as Ghost when there is a Ghost_Mode
5013 * sem_ch12.adb Add with and use clauses for Ghost.
5014 (Analyze_Generic_Package_Declaration,
5015 Analyze_Generic_Subprogram_Declaration): Set the Ghost_Mode in effect.
5016 Mark the entity as Ghost when there is a Ghost_Mode in effect.
5017 * sem_prag.adb Add with and use clauses for Ghost.
5018 (Analyze_Pragma): Ghost-related checks are triggered when there
5019 is a Ghost mode in effect.
5020 (Create_Abstract_State): Mark the
5021 entity as Ghost when there is a Ghost_Mode in effect.
5022 * sem_res.adb Add with and use clauses for Ghost.
5023 (Check_Ghost_Context): Removed.
5024 * sem_util.adb (Check_Ghost_Completion): Removed.
5025 (Check_Ghost_Derivation): Removed.
5026 (Incomplete_Or_Partial_View):
5027 Add a guard in case the entity has not been analyzed yet
5028 and does carry a scope.
5029 (Is_Declaration): New routine.
5030 (Is_Ghost_Entity): Removed.
5031 (Is_Ghost_Statement_Or_Pragma):
5033 (Is_Subject_To_Ghost): Removed.
5034 (Set_Is_Ghost_Entity):
5036 (Within_Ghost_Scope): Removed.
5037 * sem_util.adb (Check_Ghost_Completion): Removed.
5038 (Check_Ghost_Derivation): Removed.
5039 (Is_Declaration): New routine.
5040 (Is_Ghost_Entity): Removed.
5041 (Is_Ghost_Statement_Or_Pragma): Removed.
5042 (Is_Subject_To_Ghost): Removed.
5043 (Set_Is_Ghost_Entity): Removed.
5044 (Within_Ghost_Scope): Removed.
5045 * sinfo.ads Add a section on Ghost mode.
5046 * treepr.adb (Print_Header_Flag): New routine.
5047 (Print_Node_Header): Factor out code. Output flag
5048 Is_Ignored_Ghost_Node.
5049 * gcc-interface/Make-lang.in: Add dependency for unit Ghost.
5051 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
5053 * freeze.adb (Freeze_Array_Type) <Complain_CS>: Remove always
5054 true test and unreachable 'else' arm.
5056 2015-01-06 Vincent Celier <celier@adacore.com>
5058 * prj-conf.adb (Check_Target): Improve error message when
5059 there are mismatched targets between the on in the configuration
5060 project file and the specified one, either in the main project
5061 file or in the --target= switch.
5063 2015-01-06 Pascal Obry <obry@adacore.com>
5065 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Mode and
5066 Install_Name attribute definitions.
5068 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5070 * freeze.adb (Wrap_Imported_Subprogram): Indicate that the
5071 generated Import pragma for the internal imported procedure does
5072 not come from an aspect, so that Is_Imported can be properly
5075 2015-01-06 Gary Dismukes <dismukes@adacore.com>
5077 * sem_ch12.adb (Might_Inline_Subp): Record whether
5078 any subprograms in the generic package are marked with
5079 pragma Inline_Always (setting flag Has_Inline_Always).
5080 (Analyze_Package_Instantiation): Add test of Has_Inline_Always
5081 alongside existing test of Front_End_Inlining as alternative
5082 conditions for setting Inline_Now. Also add test of
5083 Has_Inline_Always along with Front_End_Inlining test as an
5084 alternative condition for setting Needs_Body to False.
5086 2015-01-06 Tristan Gingold <gingold@adacore.com>
5088 * i-cpoint.adb (Copy_Array): Handle overlap.
5090 2015-01-06 Pascal Obry <obry@adacore.com>
5092 * bindgen.adb: Minor style fix.
5094 2015-01-06 Robert Dewar <dewar@adacore.com>
5096 * sem_util.ads, sem_util.adb: Minor reformatting.
5098 2015-01-06 Vincent Celier <celier@adacore.com>
5100 * prj-conf.adb (Parse_Project_And_Apply_Config): Reset incomplete
5101 with flags before parsing the projects.
5102 * prj-err.adb (Error_Msg): Do nothing if there are incomplete withs.
5103 * prj-part.adb (Post_Parse_Context_Clause): Set Incomplete_Withs
5104 to True in the flags, when Ignore_Missing_With is True and an
5105 imported project cannot be found.
5106 * prj-proc.adb (Expression): When there are incomplete withs and
5107 a variable or attribute is not found, set the variable/attribute
5109 * prj.ads (Processing_Flags): New flag Incomplete_Withs,
5112 2015-01-06 Vasiliy Fofanov <fofanov@adacore.com>
5114 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-conf.adb,
5115 prj-err.adb: Add new switch --no-command-line.
5117 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5119 * sem_ch12.adb: Sloc of wrapper is that of instantiation.
5121 2015-01-06 Robert Dewar <dewar@adacore.com>
5123 * sem_ch11.adb: Minor reformatting.
5125 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5127 * exp_aggr.adb (Get_Assoc_Expr): New routine internal to
5128 Build_Array_Aggr_Code, used to initialized components covered
5129 by a box association. If the component type is scalar and has
5130 a default aspect, use it to initialize such components.
5132 2015-01-06 Pascal Obry <obry@adacore.com>
5134 * rtinit.c (__gnat_runtime_initialize): Add a parameter to
5135 control the setup of the exception handler.
5136 * initialize.c: Remove unused declaration.
5137 * bindgen.adb: Always call __gnat_runtime_initialize and pass
5138 whether the exeception handler must be set or not.
5140 2015-01-06 Thomas Quinot <quinot@adacore.com>
5142 * freeze.adb (Set_SSO_From_Defaults): When setting scalar storage
5143 order to native from default, make sure to also adjust bit order.
5144 * exp_aggr.adb: Minor reformatting.
5146 2015-01-06 Robert Dewar <dewar@adacore.com>
5148 * s-valllu.adb, s-valllu.ads, s-valuti.ads, s-valuns.adb, s-valuns.ads,
5149 s-valrea.adb, s-valrea.ads: Add some additional guards for
5150 Str'Last = Positive'Last.
5152 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5154 * sem_ch12.adb, sem_ch8.adb: Ongoing work for wrappers for actual
5157 2015-01-06 Javier Miranda <miranda@adacore.com>
5159 * exp_disp.adb (Expand_Interface_Conversion): Reapply patch.
5161 2015-01-06 Thomas Quinot <quinot@adacore.com>
5163 * sem_util.ads: Minor reformatting.
5164 * sem_cat.adb (In_RCI_Visible_Declarations): Change back to...
5165 (In_RCI_Declaration) Return to old name, as proper checking of
5166 entity being in the visible part depends on entity kind and must
5167 be done by the caller.
5169 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5171 * sem_ch12.adb, sem_ch12.ads, sem_ch8.adb: Ongoing work for wrappers
5172 for operators in SPARK.
5174 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5176 * sem_aggr.adb (Get_Value): In ASIS mode, preanalyze the
5177 expression in an others association before making copies for
5178 separate resolution and accessibility checks. This ensures that
5179 the type of the expression is available to ASIS in all cases,
5180 in particular if the expression is itself an aggregate.
5182 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
5184 * einfo.ads (Has_Independent_Components): Document extended
5186 * einfo.adb (Has_Independent_Components): Remove obsolete assertion.
5187 (Set_Has_Independent_Components): Adjust assertion.
5188 * sem_prag.adb (Analyze_Pragma): Also set Has_Independent_Components
5189 for pragma Atomic_Components. Set Has_Independent_Components
5190 on the object instead of the type for an object declaration with
5191 pragma Independent_Components.
5193 2015-01-06 Olivier Hainque <hainque@adacore.com>
5195 * set_targ.adb (Read_Target_Dependent_Values): Set
5196 Long_Double_Index when "long double" is read.
5197 (elaboration code): Register_Back_End_Types only when not reading from
5198 config files. Doing otherwise is pointless and error prone.
5200 2015-01-06 Robert Dewar <dewar@adacore.com>
5202 * s-valrea.adb (Value_Real): Check for Str'Last = Positive'Last
5204 2015-01-06 Robert Dewar <dewar@adacore.com>
5206 * a-wtgeau.adb, a-ztgeau.adb, a-tigeau.adb (String_Skip): Raise PE if
5207 Str'Last = Positive'Last.
5209 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5211 * sem_ch6.adb (Matches_Limited_View): Handle properly the case
5212 where the non-limited type is a generic actual and appears as
5213 a subtype of the non-limited view of the other.
5214 * freeze.adb (Build_Renamed_Body): If the return type of the
5215 declaration that is being completed is a limited view and the
5216 non-limited view is available, use it in the specification of
5219 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5221 * sem_ch3.adb (Find_Type_Name): If there is a previous tagged
5222 incomplete view, the type of the classwide type common to both
5223 views is the type being declared.
5225 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
5227 * einfo.ads (Is_Independent): Further document extended usage.
5229 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
5231 * einfo.ads (Is_Independent): Document extended usage.
5232 * einfo.adb (Is_Independent): Remove obsolete assertion.
5233 (Set_Is_Independent): Likewise.
5234 * sem_prag.adb (Process_Atomic_Shared_Volatile): Rename into...
5235 (Process_Atomic_Independent_Shared_Volatile): ...this.
5236 Deal with pragma Independent here.
5237 (Analyze_Pragma): Adjust
5238 to above renaming and also invoke it for pragma Independent.
5239 Adjust comment for Independent_Components.
5241 2015-01-06 Robert Dewar <dewar@adacore.com>
5243 * snames.ads-tmpl: Remove entries for attribute Enum_Image.
5244 * exp_attr.adb: Remove reference to Attribute_Enum_Image.
5246 2015-01-06 Robert Dewar <dewar@adacore.com>
5248 * s-vallli.adb (Value_Long_Long_Integer): Handle case of Str'Last
5250 * s-valllu.adb (Value_Long_Long_Unsigned): Handle case of
5251 Str'Last = Positive'Last.
5253 2015-01-06 Robert Dewar <dewar@adacore.com>
5255 * sem_prag.adb (Process_Inline): Remove redundant construct
5256 warning (-gnatw.r) for an ineffective pragma Inline.
5258 2015-01-06 Robert Dewar <dewar@adacore.com>
5260 * s-valint.adb: Fix typo in last checkin.
5261 * s-valuns.adb (Value_Unsigned): More efficient fix for
5263 * sem_attr.adb (Analyze_Attribute): Minor reformatting
5264 (Eval_Attribute): Static ervaluation of 'Img for enumeration types.
5266 2015-01-06 Robert Dewar <dewar@adacore.com>
5268 * s-valint.adb, s-valuns.adb (Value_Integer): Deal with case where
5269 Str'Last = Positive'Last
5271 2015-01-06 Thomas Quinot <quinot@adacore.com>
5273 * xoscons.adb: Display exception information and return non-zero
5274 exit status in top level exception handler.
5276 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5278 * sem_ch8.adb: Code clean up.
5280 2015-01-06 Tristan Gingold <gingold@adacore.com>
5282 * targparm.ads: Remove obsolete comment.
5284 2015-01-06 Olivier Hainque <hainque@adacore.com>
5286 * gcc-interface/decl.c (gnat_to_gnu_entity, case E_Variable): When
5287 constructing a ref to variable, update inner_const_flag from the
5288 variable TREE_READONLY attribute.
5289 * gcc-interface/targtyps.c (WIDEST_HARDWARE_FP_SIZE): Remove default
5291 (get_target_float_size): Remove.
5292 (get_target_double_size): Remove.
5293 (get_target_long_double_size): Remove.
5295 2015-01-06 Pascal Obry <obry@adacore.com>
5297 * adaint.c (ProcListEvt): Set to NULL.
5298 * rtinit.c: New file.
5299 (__gnat_rt_init_count): New reference counter set to 0.
5300 (__gnat_runtime_initialize): Move code here from __gnat_initialize when
5301 this code is actually needed for the runtime initialization. This
5302 routine returns immediately if the initialization has already been done.
5303 * final.c: Revert previous change.
5304 * rtfinal.c: New file.
5305 (__gnat_runtime_finalize)[Win32]: Add finalization of the critical
5306 section and event. The default version of this routine is empty (except
5307 for the reference counting code). This routine returns immediately if
5308 some others libraries are referencing the runtime.
5309 * bindgen.adb (Gen_Adainit): Generate call to Runtime_Initialize
5310 remove circuitry to initialize the signal handler as this is
5311 now done by the runtime initialization routine.
5312 (Gen_Adafinal): Generate call to Runtime_Finalize.
5313 * gnat_ugn.texi: Update documentation about concurrency and
5314 initialization/finalization of the run-time.
5315 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Add
5316 references to rtfinal.o and rtinit.o
5318 2015-01-06 Robert Dewar <dewar@adacore.com>
5320 * exp_attr.adb (Expand_N_Attribute_Reference): Add dummy entry
5322 * sem_attr.adb: Implement Enum_Image attribute.
5323 * snames.ads-tmpl: Add entries for Enum_Image attribute.
5325 2015-01-06 Robert Dewar <dewar@adacore.com>
5327 * namet.ads: Document use of Boolean2 for No_Use_Of_Entity.
5328 * restrict.ads (No_Use_Of_Entity): New table.
5329 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
5330 Ignore No_Use_Of_Entity (will be processed in parser).
5331 * snames.ads-tmpl: Add entry for Name_No_Use_Of_Entity.
5333 2015-01-06 Vincent Celier <celier@adacore.com>
5335 * prj-tree.adb (Imported_Or_Extended_Project_Of): Do not try
5336 to check for an extended project, if a project does not have
5337 yet a project declaration.
5339 2015-01-06 Pierre-Marie Derodat <derodat@adacore.com>
5341 * scos.ads: Update documentation about the SCO table build
5342 process and about table records format.
5343 * par_sco.ads (SCO_Record): Rename to SCO_Record_Raw.
5344 (SCO_Record_Filtered): New procedure.
5345 (Set_SCO_Logical_Operator): New procedure.
5346 (dsco): Update documentation.
5347 * par_sco.adb: Update library-level comments.
5348 (SCO_Generation_State_Type): New type.
5349 (SCO_Generation_State): New variable.
5350 (SCO_Raw_Table): New package instanciation.
5351 (Condition_Pragma_Hash_Table): Rename to SCO_Raw_Hash_Table.
5353 (Tristate): New type.
5354 (Is_Logical_Operator): Return Tristate and update documentation.
5355 (Has_Decision): Update call to Is_Logical_Operator and complete
5357 (Set_Table_Entry): Rename to Set_Raw_Table_Entry, update
5358 comment, add an assertion for state checking and change
5359 references to SCO_Table into SCO_Raw_Table.
5360 (dsco): Refactor to dump the raw and the filtered tables.
5361 (Process_Decisions.Output_Decision_Operand): Handle putative
5362 short-circuit operators.
5363 (Process_Decisions.Output_Element): Update references
5364 to Set_Table_Entry and to Condition_Pragma_Hash_Table.
5365 (Process_Decisions.Process_Decision_Operand): Update call
5366 to Is_Logical_Operator.
5367 (Process_Decisions.Process_Node): Handle putative short-circuit
5368 operators and change references to
5369 SCO_Table into SCO_Raw_Table.
5370 (SCO_Output): Add an assertion
5371 for state checking and remove code that used to stamp out SCO entries.
5372 (SCO_Pragma_Disabled): Change reference to SCO_Table
5374 (SCO_Record): Rename to SCO_Record_Raw,
5375 add an assertion for state checking and change references
5376 to SCO_Table into SCO_Raw_Table.
5377 (Set_SCO_Condition): Add an assertion for state checking, update
5378 references to Condition_Pragma_Hash_Table and change references to
5379 SCO_Table into SCO_Raw_Table.
5380 (Set_SCO_Pragma_Enabled): Add an assertion for state checking and
5381 change references to SCO_Table into SCO_Raw_Table.
5382 (Set_SCO_Logical_Operator): New procedure.
5383 (Traverse_Declarations_Or_Statements.Set_Statement_Entry): Update
5384 references to Set_Table_Entry and to Condition_Pragma_Hash_Table.
5385 (SCO_Record_Fildered): New procedure.
5386 * gnat1drv.adb (Gnat1drv): Invoke the SCO filtering pass.
5387 * lib-writ.adb (Write_ALI): Invoke the SCO filtering pass and
5389 * par-load.adb (Load): Update reference to SCO_Record.
5390 * par.adb (Par): Update reference to SCO_Record.
5391 * put_scos.adb (Put_SCOs): Add an assertion to check that no
5392 putative SCO condition reaches this end.
5393 * sem_ch10.adb (Analyze_Proper_Body): Update reference to SCO_Record.
5394 * sem_res.adb (Resolve_Logical_Op): Validate putative SCOs
5395 when corresponding to an "and"/"or" operator affected by the
5396 Short_Circuit_And_Or pragma.
5398 2015-01-06 Robert Dewar <dewar@adacore.com>
5400 * sem_ch8.adb (Analyze_Use_Package): Give more specific error
5401 msg for attempted USE of generic subprogram or subprogram.
5403 2015-01-06 Robert Dewar <dewar@adacore.com>
5405 * s-valllu.adb, a-tiinau.adb, a-timoau.adb, a-ztinau.adb, a-ztmoau.adb,
5406 s-valuns.adb, s-valrea.adb, a-wtflau.adb, a-tiflau.adb, a-ztflau.adb,
5407 a-wtinau.adb, a-wtmoau.adb: Document recognition of : in place of #.
5409 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5411 * sem_ch13.adb (Analyze_Aspect_Specifications): For aspects
5412 that specify stream subprograms, if the prefix is a class-wide
5413 type then the generated attribute definition clause must apply
5414 to the same class-wide type.
5415 (Default_Iterator): An iterator defined by an aspect of some
5416 container type T must have a first parameter of type T, T'class,
5417 or an access to such (from code reading RM 5.5.1 (2/3)).
5419 2015-01-06 Arnaud Charlet <charlet@adacore.com>
5421 * gnat1drv.adb: Minor: complete previous change.
5423 2015-01-06 Olivier Hainque <hainque@adacore.com>
5425 * set_targ.ads (C_Type_For): New function. Return the name of
5426 a C type supported by the back-end and suitable as a basis to
5427 construct the standard Ada floating point type identified by
5428 the T parameter. This is used as a common ground to feed both
5429 ttypes values and the GNAT tree nodes for the standard floating
5431 * set_targ.adb (Long_Double_Index): The index at which "long
5432 double" gets registered in the FPT_Mode_Table. This is useful to
5433 know whether we have a "long double" available at all and get at
5434 it's characteristics without having to search the FPT_Mode_Table
5435 when we need to decide which C type should be used as the
5436 basis for Long_Long_Float in Ada.
5437 (Register_Float_Type): Fill Long_Double_Index.
5438 (FPT_Mode_Index_For): New function. Return the index in
5439 FPT_Mode_Table that designates the entry corresponding to the
5440 provided C type name.
5441 (FPT_Mode_Index_For): New function. Return the index in
5442 FPT_Mode_Table that designates the entry for a back-end type
5443 suitable as a basis to construct the standard Ada floating point
5444 type identified by the input T parameter.
5445 (elaboration code): Register_Back_End_Types unconditionally,
5446 so C_Type_For can operate regardless of -gnateT. Do it
5447 early so we can query it for the floating point sizes, via
5448 FPT_Mode_Index_For. Initialize Float_Size, Double_Size and
5449 Long_Double_Size from the FPT_Mode_Table, as cstand will do.
5450 * cstand.adb (Create_Float_Types): Use C_Type_For to determine
5451 which C type should be used as the basis for the construction
5452 of the Standard Ada floating point types.
5453 * get_targ.ads (Get_Float_Size, Get_Double_Size,
5454 Get_Long_Double_Size): Remove.
5455 * get_targ.adb: Likewise.
5457 2015-01-06 Thomas Quinot <quinot@adacore.com>
5459 * sem_cat.adb (In_RCI_Declaration): Remove unnecessary
5460 parameter and rename to...
5461 (In_RCI_Visible_Declarations): Fix handling of private part of nested
5463 (Validate_RCI_Subprogram_Declaration): Reject illegal function
5464 returning anonymous access in RCI unit.
5466 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5468 * sem_ch6.adb (New_Overloaded_Entity): In GNATprove mode, a
5469 function wrapper may be a homonym of another local declaration.
5470 * sem_ch8.adb (Analyze_Subprogram_Renaming): In GNATprove mode,
5471 build function and operator wrappers after the actual subprogram
5472 has been resolved, and replace the standard renaming declaration
5473 with the declaration of wrapper.
5474 * sem_ch12.ads (Build_Function_Wrapper, Build_Operator_Wraooer):
5475 make public for use elsewhere.
5476 * sem_ch12.adb (Build_Function_Wrapper, Build_Operator_Wraooer):
5477 rewrite, now that actual is fully resolved when wrapper is
5480 2015-01-06 Javier Miranda <miranda@adacore.com>
5482 * exp_disp.adb: Revert previous change.
5484 2015-01-06 Robert Dewar <dewar@adacore.com>
5486 * exp_util.adb: Change name Name_Table_Boolean to
5487 Name_Table_Boolean1.
5488 * namet.adb: Change name Name_Table_Boolean to Name_Table_Boolean1
5489 Introduce Name_Table_Boolean2/3.
5490 * namet.ads: Change name Name_Table_Boolean to Name_Table_Boolean1
5491 Introduce Name_Table_Boolean2/3.
5492 * par-ch13.adb: Change name Name_Table_Boolean to
5493 Name_Table_Boolean1.
5495 2015-01-06 Bob Duff <duff@adacore.com>
5497 * gnat_rm.texi: Improve documentation regarding No_Task_Termination.
5499 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5501 * sem_aggr.adb (Resolve_Record_Aggregte, Get_Value): For an
5502 others choice that covers multiple components, analyze each
5503 copy with the type of the component even in compile-only mode,
5504 to detect potential accessibility errors.
5506 2015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
5508 * sem_res.adb (Is_Assignment_Or_Object_Expression): New routine.
5509 (Resolve_Actuals): An effectively volatile out
5510 parameter cannot act as an in or in out actual in a call.
5511 (Resolve_Entity_Name): An effectively volatile out parameter
5514 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5516 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If the body is
5517 the expansion of an expression function it may be pre-analyzed
5518 if a 'access attribute is applied to the function, in which case
5519 last_entity may have been assigned already.
5521 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5523 * sem_ch4.adb (Analyze_One_Call): If formal has an incomplete
5524 type and actual has the corresponding full view, there is no
5525 error, but a case of use of incomplete type in a predicate or
5526 invariant expression.
5528 2015-01-06 Vincent Celier <celier@adacore.com>
5530 * makeutl.adb (Insert_No_Roots): Make sure that the same source
5531 in two different project tree is checked in both trees, if they
5532 are sources of two different projects, extended or not.
5534 2015-01-06 Arnaud Charlet <charlet@adacore.com>
5536 * gnat1drv.adb: Minor code clean up.
5537 (Adjust_Global_Switches): Ignore gnatprove_mode in codepeer_mode.
5539 2015-01-06 Bob Duff <duff@adacore.com>
5541 * osint.adb (Read_Source_File): Don't print out
5542 file name unless T = Source.
5544 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5546 * sem_util.adb (Is_Variable, Is_OK_Variable_For_Out_Formal):
5547 recognize improper uses of constant_reference types as actuals
5548 for in-out parameters.
5549 (Check_Function_Call): Do not collect identifiers if function
5550 name is missing because of previous error.
5552 2015-01-06 Robert Dewar <dewar@adacore.com>
5554 * ali-util.adb, sem_prag.adb, rtsfind.adb, sem_util.adb, sem_res.adb,
5555 ali.adb, binde.adb, namet.adb, namet.ads, gnatls.adb, bcheck.adb:
5556 Minor change of name Name_Table_Info => Name_Table_Int.
5558 2015-01-06 Robert Dewar <dewar@adacore.com>
5560 * exp_strm.adb (Build_Elementary_Input_Call): Clarify comments
5561 in previous checkin.
5562 * freeze.adb (Freeze_Fixed_Point_Type): Add warning for shaving
5564 * sem_prag.adb, sem_ch10.adb, sem_ch6.adb: Minor reformatting.
5566 2015-01-06 Vincent Celier <celier@adacore.com>
5568 * a-strsup.adb (Times (Natural;String;Positive)): Raise
5569 Length_Error, not Index_Error, when the result is too long.
5571 2015-01-06 Thomas Quinot <quinot@adacore.com>
5573 * a-direct.adb (Create_Path): Minor error handling and
5574 performance improvement.
5576 2015-01-06 Robert Dewar <dewar@adacore.com>
5578 * checks.ads, sem_ch12.adb: Minor reformatting.
5579 * exp_ch4.adb (Expand_N_Op_Divide): Generate explicit divide by
5580 zero check for fixed-point case if Backend_Divide_Checks_On_Target
5583 2015-01-06 Robert Dewar <dewar@adacore.com>
5585 * sem_prag.adb (Analyze_Pragma, case No_Elaboration_Code_All):
5586 Do not set restriction No_Elaboration_Code unless the pragma
5587 appears in the main unit).
5589 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5591 * sem_ch10.adb (Is_Regular_With_Clause): Add guard to verify
5592 that with clause has already been analyzed before checking kind
5595 2015-01-06 Robert Dewar <dewar@adacore.com>
5597 * exp_strm.adb (Build_Elementary_Input_Call): Return base type
5598 (as required by RM).
5600 2015-01-06 Arnaud Charlet <charlet@adacore.com>
5602 * a-reatim.adb ("/"): Add explicit pragma Unsuppress (Division_Check).
5604 2015-01-06 Robert Dewar <dewar@adacore.com>
5606 * sem_prag.adb (Process_Suppress_Unsuppress): Add extra warning
5607 for ignoring pragma Suppress (Elaboration_Check) in SPARK mode.
5609 2015-01-06 Javier Miranda <miranda@adacore.com>
5611 * exp_disp.adb (Expand_Interface_Conversion): No displacement
5612 of the pointer to the object needed when the type of the operand
5613 is not an interface type and the interface is one of its parent
5614 types (since they share the primary dispatch table).
5616 2015-01-06 Vincent Celier <celier@adacore.com>
5618 * prj-env.adb: Minor comment update.
5620 2015-01-06 Javier Miranda <miranda@adacore.com>
5622 * sem_res.adb (Valid_Conversion): Restrict the checks on anonymous
5623 access types whose target type is an interface type to operands
5624 that are access types; required to report an error when the
5625 operand is not an access type.
5627 2015-01-06 Bob Duff <duff@adacore.com>
5629 * a-cfinve.adb (Copy): Set the discriminant to the Length when
5631 * a-cofove.ads (Capacity): Add a postcondition.
5632 * a-cfinve.ads (Capacity): Add a postcondition.
5633 (Reserve_Capacity): Correct the postcondition in the case where
5634 Capacity = 0; that means "Capacity => Length (Container)".
5635 * a-cofove.adb (Elems[c]): Add a comment
5636 explaining the dangers and how to avoid them.
5638 2015-01-06 Ed Schonberg <schonberg@adacore.com>
5640 * sem_ch12.adb: Code clean up.
5642 2015-01-06 Arnaud Charlet <charlet@adacore.com>
5644 * gnatvsn.ads: Bump copyright year.
5646 2015-01-06 Robert Dewar <dewar@adacore.com>
5648 * s-taskin.ads, s-traces.ads: Minor reformatting.
5649 * exp_util.adb: Minor typo fix.
5651 2015-01-06 Vincent Celier <celier@adacore.com>
5653 * gnatls.adb (Search_RTS): Invoke Initialize_Default_Project_Path
5654 with the runtime name.
5655 * prj-env.adb (Initialize_Default_Project_Path): When both
5656 Target_Name and Runtime_Name are not empty string, add to the
5657 project path the two directories .../lib/gnat and .../share/gpr
5658 related to the runtime.
5659 * prj-env.ads (Initialize_Default_Project_Path): New String
5660 parameter Runtime_Name, defaulted to the empty string.
5662 2015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
5664 * frontend.adb: Guard against the case where a configuration
5665 pragma may be split into multiple pragmas and the original
5666 rewritten as a null statement.
5667 * sem_prag.adb (Analyze_Pragma): Insert a brand new Check_Policy
5668 pragma using Insert_Before rather than Insert_Action. This
5669 takes care of the configuration pragma case where Insert_Action
5672 2015-01-06 Bob Duff <duff@adacore.com>
5674 * a-coboho.ads (Element_Access): Add "pragma
5675 No_Strict_Aliasing (Element_Access);". This is needed because
5676 we are unchecked-converting from Address to Element_Access.
5677 * a-cofove.ads, a-cofove.adb (Elems,Elemsc): Fix bounds of the
5680 2015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
5682 * sem_res.adb (Resolve_Actuals): Remove the
5683 restriction which prohibits volatile actual parameters with
5684 enabled external propery Async_Writers to act appear in procedure
5685 calls where the corresponding formal is of mode OUT.
5687 2015-01-05 Jakub Jelinek <jakub@redhat.com>
5689 * gnat_ugn.texi: Bump @copying's copyright year.
5691 2015-01-05 Eric Botcazou <ebotcazou@adacore.com>
5694 * gcc-interface/Makefile.in (../stamp-tools): Reinstate dropped code.
5696 2015-01-04 Uros Bizjak <ubizjak@gmail.com>
5698 * gcc-interface/misc.c (internal_error_function): Use xasprintf instead
5699 of unchecked asprintf.
5702 Copyright (C) 2015 Free Software Foundation, Inc.
5704 Copying and distribution of this file, with or without modification,
5705 are permitted in any medium without royalty provided the copyright
5706 notice and this notice are preserved.