1 2015-11-28 Matthias Klose <doko@ubuntu.com>
4 * gcc-interface/Makefile.in: Fix sparc/sparc64 bitness detection.
6 2015-11-25 Arnaud Charlet <charlet@adacore.com>
8 * lib-xref-spark_specific.adb
9 (Add_SPARK_Scope): Take entry families into account.
10 * a-exetim.ads, a-exetim-default.ads, a-exetim-mingw.ads (Clock,
11 Clock_For_Interrupts): preconditions added.
12 * a-extiin.ads (Clock): preconditions added.
13 * par-ch3.adb (P_Declarative_Items): In case of misplaced
14 aspect specifications, ensure that flag Done is properly set to
17 2015-11-25 Arnaud Charlet <charlet@adacore.com>
19 * exp_util.adb (Remove_Side_Effects): Minimize extra temporaries
20 and use of 'Reference when needed.
22 2015-11-25 Doug Rupp <rupp@adacore.com>
24 * sigtramp-vxworks-target.inc (__x86_64__): Restore context for the
26 * init.c (__gnat_inum_to_ivec): Add some casting to avoid
27 warnings when sizeof(long) != sizeof(int)
29 2015-11-25 Yannick Moy <moy@adacore.com>
31 * lib-xref-spark_specific.adb (SPARK_Entities): Add entries for
33 (Add_SPARK_Scope): Take tasks into account.
34 (Detect_And_Add_SPARK_Scope): Take tasks into account.
35 (Enclosing_Subprogram_Or_Library_Package): Take tasks into account.
37 2015-11-25 Bob Duff <duff@adacore.com>
39 * sem_elab.adb (Check_Internal_Call_Continue): Code clean ups.
41 2015-11-25 Eric Botcazou <ebotcazou@adacore.com>
43 * sem_util.ads (Has_Compatible_Alignment): Add Layout_Done
45 * sem_util.adb (Has_Compatible_Alignment): Likewise.
46 (Has_Compatible_Alignment_Internal): Likewise. Do not set the
47 result to Unknown for packed types if Layout_Done is true.
48 * checks.adb (Apply_Address_Clause_Check): Adjust call and
49 pass False to Has_Compatible_Alignment.
50 * sem_ch13.adb (Validate_Address_Clauses): Likewise but pass True.
52 2015-11-25 Vincent Celier <celier@adacore.com>
54 * gnatcmd.adb: When <target>-gnat is called with switch -P
55 and a GPR tool is invoked, invoke the GPR tool with switch
58 2015-11-25 Hristian Kirtchev <kirtchev@adacore.com>
60 * opt.adb, bcheck.adb: Minor reformatting.
62 2015-11-25 Jerome Lambourg <lambourg@adacore.com>
64 * init.c: Enable the signal trampoline on x86_64-vx7
65 * sigtramp-vxworks-target.inc: Implement the signal trampoline
67 * tracebak.c: Remove the hook to use the generic
68 unwinder on x86_64-vx7.
70 2015-11-25 Vincent Celier <celier@adacore.com>
72 * gnatcmd.adb: When "gnat name -P" is called, invoke gprname
73 directly if available.
75 2015-11-25 Tristan Gingold <gingold@adacore.com>
77 * init.c (__gnat_is_stack_guard): Do not use mach calls for
80 2015-11-24 Pierre-Marie de Rodat <derodat@adacore.com>
82 * gcc-interface/utils.c (gnat_write_global_declarations): Output
83 debugging information for top-level imported declarations.
85 2015-11-24 Gary Dismukes <dismukes@adacore.com>
87 * sem_ch3.adb, sem_type.adb, sem_ch7.adb, sem_ch9.adb, checks.adb,
88 sem_prag.adb, contracts.adb, g-strhas.ads, sem_ch6.adb: Minor
89 reformatting, rewording, and typo corrections.
91 2015-11-24 Eric Botcazou <ebotcazou@adacore.com>
93 * gcc-interface/decl.c (gnat_to_gnu_entity) <Concurrent types>: In
94 ASIS mode, do a minimal translation for root types with discriminants.
95 * gcc-interface/trans.c (gnat_to_gnu) <N_Subunit>: Move around.
96 <N_Entry_Body, N_Protected_Body, N_Task_Body>: Likewise. In ASIS mode,
97 process the declarations attached to the body.
99 2015-11-24 Eric Botcazou <ebotcazou@adacore.com>
101 * gcc-interface/trans.c (gnat_to_gnu): In type_annotate_only mode, do
102 not build a NULL_EXPR for an N_Expanded_Name.
104 2015-11-24 Eric Botcazou <ebotcazou@adacore.com>
106 * gcc-interface/decl.c (is_cplusplus_method): Check that the type of
107 the first parameter (indirectly) has C++ convention too.
109 2015-11-23 Olivier Hainque <hainque@adacore.com>
111 * system-aix.ads: Add Frontend_Exceptions flag.
112 * system-aix64.ads: Likewise.
113 * system-darwin-ppc.ads: Likewise.
114 * system-darwin-ppc64.ads: Likewise.
115 * system-darwin-x86.ads: Likewise.
116 * system-darwin-x86_64.ads: Likewise.
117 * system-dragonfly-x86_64.ads: Likewise.
118 * system-freebsd-x86.ads: Likewise.
119 * system-freebsd-x86_64.ads: Likewise.
120 * system-hpux-ia64.ads: Likewise.
121 * system-hpux.ads: Likewise.
122 * system-linux-alpha.ads: Likewise.
123 * system-linux-armeb.ads: Likewise.
124 * system-linux-armel.ads: Likewise.
125 * system-linux-hppa.ads: Likewise.
126 * system-linux-ia64.ads: Likewise.
127 * system-linux-mips.ads: Likewise.
128 * system-linux-mips64el.ads: Likewise.
129 * system-linux-mipsel.ads: Likewise.
130 * system-linux-ppc.ads: Likewise.
131 * system-linux-ppc64.ads: Likewise.
132 * system-linux-s390.ads: Likewise.
133 * system-linux-s390x.ads: Likewise.
134 * system-linux-sh4.ads: Likewise.
135 * system-linux-sparc.ads: Likewise.
136 * system-linux-sparcv9.ads: Likewise.
137 * system-linux-x86.ads: Likewise.
138 * system-linux-x86_64.ads: Likewise.
139 * system-mingw-x86_64.ads: Likewise.
140 * system-mingw.ads: Likewise.
141 * system-rtems.ads: Likewise.
142 * system-solaris-sparc.ads: Likewise.
143 * system-solaris-sparcv9.ads: Likewise.
144 * system-solaris-x86.ads: Likewise.
145 * system-solaris-x86_64.ads: Likewise.
146 * system-vxworks-arm.ads: Likewise.
147 * system-vxworks-m68k.ads: Likewise.
148 * system-vxworks-mips.ads: Likewise.
149 * system-vxworks-ppc.ads: Likewise.
150 * system-vxworks-sparcv9.ads: Likewise.
151 * system-vxworks-x86.ads: Likewise.
152 * system.ads: Likewise.
154 2015-11-23 Olivier Hainque <hainque@adacore.com>
155 Eric Botcazou <botcazou@adacore.com>
157 * opt.ads (Exception_Mechanism): Now three values: Front_End_SJLJ,
158 Back_End_SJLJ and Back_End_ZCX.
159 (Back_End_Exceptions, Front_End_Exceptions, ZCX_Exceptions,
160 SJLJ_Exceptions): New functions, reflecting properties of the current
162 * opt.adb: Implement the new functions.
163 * fe.h: Bind the new Exception_Mechanism and helper functions for gigi.
165 * exp_ch11.adb (Expand_At_End_Handler): Replace test on mechanism by
166 use of property helper and update comments.
167 (Expand_Exception_Handlers): Replace tests on mechanism by use of
168 helper. Restrict Abort_Defer to ZCX specifically.
169 * exp_ch9.adb (Expand_N_Asynchronous_Select): Replace tests on
170 mechanism by calls to helper functions. Abort_Undefer for ZCX only,
171 paired with Expand_Exception_Handlers.
172 * exp_sel.adb (Build_Abort_Block_Handler): Replace tests on mechanism
173 by calls to helper functions. Abort_Undefer for ZCX only, paired with
174 Expand_Exception_Handlers.
176 * lib-writ.ads (P line documentation): Add entry for "FX",
177 representative of unit compiled with Frontend_Exceptions True.
178 * lib-writ.adb (Output_Main_Program_Line): Add "FX" on P line if
179 compiled with Frontend_Exceptions True.
181 * ali.ads (ALIs_Record): Ada a Frontend_Exceptions component, to reflect
182 whether the ALI file contained an "FX" indication on the P line.
183 (Frontend_Exceptions_Specified): New boolean, to keep track of whether
184 at least an FX ALI file is in the closure.
185 * ali.adb (Scan_ALI): Handle "FX" on the P line.
186 (Initialize_ALI): Initialize Frontend_Exceptions_Specified to False.
188 * targparm.ads: Update desription of exception schemes.
189 (Frontend_Exceptions_On_Target): New flag, reflect Frontend_Exceptions
190 set to True in system.ads, or not set at all.
191 * targparm.adb (Targparm_Tags): Add FEX to convey Frontend_Exceptions.
192 Rename ZCD to ZCX for consistency.
193 (FEX_Str, Targparm_Str, Get_Target_Parameters): Adjust accordingly.
195 * gnat1drv.adb (Adjust_Global_Switches): Adjust Exception_Mechanism
196 setting, now from combination of Frontend_Exceptions and ZCX_By_Default.
198 * bcheck.adb (Check_Consistent_Zero_Cost_Exception_Handling): Rename
200 (Check_Consistent_Exception_Handling): Check consistency of both
201 ZCX_By_Default and Frontend_Exceptions.
202 (Check_Configuration_Consistency): Check_Consistent_Exception_Handling
203 if either flag was set at least once.
205 * make.adb (Check): Remove processing of a possible -fsjlj coming from
207 * gnatlink.adb (Gnatlin): Likewise.
209 * gcc-interface/Makefile.in (gnatlib-sjlj/zcx): Now set
210 both ZCX_By_Default and Frontend_Exceptions.
211 * gcc-interface/decl.c (gnat_to_gnu_entity, case E_Variable):
212 Use eh property helper to test for back-end exceptions. Adjust
213 mechanism name when testing for front-end sjlj.
214 (case E_Procedure): Likewise.
215 * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu):
216 Likewise, and rename local variables.
217 (Exception_Handler_to_gnu_sjlj): Rename as
218 Exception_Handler_to_gnu_fe_sjlj.
219 (Exception_Handler_to_gnu_zcx): Rename as
220 Exception_Handler_to_gnu_gcc and adjust tests on eh mechanisms
221 to use property helpers or correct mechanism name.
223 2015-11-19 Bob Duff <duff@adacore.com>
225 * sem_elab.adb (Check_Internal_Call_Continue): Correction to previous
226 change: correctly handle generic formals/actuals that look like
229 2015-11-18 Eric Botcazou <ebotcazou@adacore.com>
231 * gcc-interface/trans.c (elaborate_all_entities_for_package): New
232 function extracted from... Recurse on packages.
233 (elaborate_all_entities): ...here. Call it on packages.
235 2015-11-18 Eric Botcazou <ebotcazou@adacore.com>
237 * gcc-interface/ada-tree.h (DECL_INVARIANT_P): New macro.
238 * gcc-interface/gigi.h (enum standard_datatypes): Remove
239 ADT_longjmp_decl and add ADT_not_handled_by_others_decl.
240 (longjmp_decl): Delete.
241 (not_handled_by_others_decl): New macro.
242 (build_simple_component_ref): Delete.
243 (build_component_ref): Adjust prototype.
244 * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust calls to
246 (gnat_to_gnu_field): Set DECL_INVARIANT_P on discriminants
247 without default value.
248 * gcc-interface/trans.c (gigi): Reorder initialization sequence
249 and add not_handled_by_others_decl.
250 (Attribute_to_gnu): Adjust calls to build_component_ref.
251 (Subprogram_Body_to_gnu): Likewise.
252 (Call_to_gnu): Likewise.
253 (Exception_Handler_to_gnu_sjlj): Likewise.
254 (gnat_to_gnu): Likewise.
255 (range_check_info_d): Add inserted_cond field.
256 (Loop_Statement_to_gnu): Make two passes on the recorded range checks.
257 (build_noreturn_cond): New static function.
258 (Raise_Error_to_gnu): Record range checks in loops at -O1 and above.
259 (make_invariant): New static function.
260 (Loop_Statement_to_gnu): Use it to compute invariant expressions for
261 the loop bounds if possible, but do not require it if loop unswitching
263 * gcc-interface/utils.c (convert_to_fat_pointer): Likewise.
265 (maybe_unconstrained_array): Likewise. Call it instead of
266 build_simple_component_ref and add guard for CONSTRUCTORs.
267 (unchecked_convert): Likewise.
268 * gcc-interface/utils2.c (compare_fat_pointers): Likewise.
269 (build_simple_component_ref): Remove COMPONENT parameter, unify
270 code dealing with VIEW_CONVERT_EXPR and make it more general,
271 remove special treatment for CONSTRUCTORs of template types.
272 (build_component_ref): Remove COMPONENT parameter and adjust call
273 to build_simple_component_ref.
274 (maybe_wrap_malloc): Likewise.
275 (build_allocator): Likewise.
276 (gnat_invariant_expr): Look through overflow checks, deal with
277 addition and subtraction of constants and take into account
278 DECL_INVARIANT_P for the COMPONENT_REF case.
280 2015-11-18 Eric Botcazou <ebotcazou@adacore.com>
282 * gcc-interface/misc.c: Move global variables to the top of the file.
283 (gnat_handle_option): Remove obsolete ATTRIBUTE_UNUSED markers.
284 (gnat_init_options): Minor tweak.
285 (gnat_post_options): Set -fstrict-overflow if not done by the user.
286 (internal_error_function): Minor reformatting.
288 2015-11-18 Eric Botcazou <ebotcazou@adacore.com>
290 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Use case #1
291 for the renaming of an address.
293 2015-11-18 Eric Botcazou <ebotcazou@adacore.com>
295 * gcc-interface/trans.c (fold_constant_decl_in_expr) <ARRAY_REF>: If
296 the index is not itself constant then bail out.
298 2015-11-18 Ed Schonberg <schonberg@adacore.com>
300 * sem_ch4.adb (Try_Container_Indexing): When constructing the
301 parameter list for the potentially overloaded calls to indexing
302 functions, do not propagate overloadings if the actual is a named
303 association: overloadings appear directly on the expression in
306 2015-11-18 Ed Schonberg <schonberg@adacore.com>
308 * sem_type.adb (Interface_Present_In_Ancestor): If the type is
309 incomplete, the list of ancestors is found either on the full
310 view or the non-limited view of the type.
312 2015-11-18 Nicolas Roche <roche@adacore.com>
314 * sysdep.c (__gnat_localtime_tzoff): On Windows platform
315 GetTimeZoneInformation function is thread-safe. Thus there
316 is no need to lock the runtime in the implementation of
317 __gnat_localtime_tzoff on that platform.
319 2015-11-18 Eric Botcazou <ebotcazou@adacore.com>
321 * s-arit64.adb (To_Neg_Int): Add a special case for 2**63 input.
323 2015-11-18 Hristian Kirtchev <kirtchev@adacore.com>
325 * contracts.adb (Analyze_Contracts): New routine.
326 (Analyze_Enclosing_Package_Body_Contract): Removed.
327 (Analyze_Entry_Or_Subprogram_Contract): Add formal parameter
328 Freeze_Id. Propagate the entity of the freezing body to vaious
330 (Analyze_Initial_Declaration_Contract): Removed.
331 (Analyze_Object_Contract): Add formal parameter
332 Freeze_Id. Propagate the entity of the freezing body to vaious
334 (Analyze_Previous_Contracts): New routine.
335 * contracts.ads (Analyze_Enclosing_Package_Body_Contract): Removed.
336 (Analyze_Contracts): New routine.
337 (Analyze_Entry_Or_Subprogram_Contract): Add formal
338 parameter Freeze_Id and update the comment on usage.
339 (Analyze_Initial_Declaration_Contract): Removed.
340 (Analyze_Object_Contract): Add formal parameter Freeze_Id and
341 update the comment on usage.
342 (Analyze_Previous_Contracts): New routine.
343 * sem_ch3.adb (Analyze_Declarations): Use Analyze_Contracts to
344 analyze all contracts of eligible constructs.
345 * sem_ch6.adb (Analyze_Generic_Subprogram_Body):
346 A body no longer freezes the contract of its initial
347 declaration. This effect is achieved through different means.
348 (Analyze_Subprogram_Body_Helper): A body now freezes the contracts
349 of all eligible constructs that precede it. A body no longer
350 freezes the contract of its initial declaration. This effect is
351 achieved through different means.
352 * sem_ch7.adb (Analyze_Package_Body_Helper): A body now freezes
353 the contracts of all eligible constructs that precede it. A body
354 no longer freezes the contract of its initial declaration. This
355 effect is achieved through different means.
356 * sem_ch9.adb (Analyze_Entry_Body): A body now freezes
357 the contracts of all eligible constructs that precede
358 it. A body no longer freezes the contract of its initial
359 declaration. This effect is achieved through different means.
360 (Analyze_Protected_Body): A body now freezes the contracts
361 of all eligible constructs that precede it. A body no longer
362 freezes the contract of its initial declaration. This effect
363 is achieved through different means.
364 (Analyze_Task_Body): A
365 body now freezes the contracts of all eligible constructs that
366 precede it. A body no longer freezes the contract of its initial
367 declaration. This effect is achieved through different means.
368 * sem_prag.adb (Add_Item_To_Name_Buffer): Single protected/task
369 objects now output their respective current instance of xxx
370 type messages. (Analyze_Contract_Cases_In_Decl_Part): Add
371 formal parameter Freeze_Id. Emit a clarification message
372 when an undefined entity may the byproduct of contract
374 (Analyze_Part_Of_In_Decl_Part): Add formal
375 parameter Freeze_Id. Emit a clarification message when an
376 undefined entity may the byproduct of contract freezing.
377 (Analyze_Pre_Post_Condition_In_Decl_Part): Add formal
378 parameter Freeze_Id. Emit a clarification message when an
379 undefined entity may the byproduct of contract freezing.
380 (Analyze_Refined_State_In_Decl_Part): Do not report unused body
381 states as constituents of single protected/task types may not
382 bave been identified yet.
383 (Collect_Subprogram_Inputs_Outputs):
384 Reimplemented. (Contract_Freeze_Error): New routine.
385 (Process_Overloadable): Use predicate Is_Single_Task_Object.
386 * sem_prag.ads (Analyze_Contract_Cases_In_Decl_Part):
387 Add formal parameter Freeze_Id and update the comment
389 (Analyze_Part_Of_In_Decl_Part): Add formal
390 parameter Freeze_Id and update the comment on usage.
391 (Analyze_Pre_Post_Condition_In_Decl_Part): Add formal parameter
392 Freeze_Id and update the comment on usage.
393 * sem_util.adb (Check_Unused_Body_States): Remove global
394 variable Legal_Constits. The routine now reports unused
395 body states regardless of whether constituents are
397 (Collect_Body_States): A constituent of a
398 single protected/task type is not a visible state of a
400 (Collect_Visible_States): A constituent
401 of a single protected/task type is not a visible
402 state of a package body.
403 (Has_Undefined_Reference): New routine.
404 (Is_Single_Concurrent_Object): Reimplemented.
405 (Is_Single_Protected_Object): New routine.
406 (Is_Single_Task_Object): New routine.
407 (Is_Visible_Object): New routine.
408 (Report_Unused_Body_States): Moved to Check_Unused_Body_States.
409 * sem_util.ads (Check_Unused_Body_States): Update the comment on usage.
410 (Has_Undefined_Reference): New routine.
411 (Is_Single_Protected_Object): New routine.
412 (Is_Single_Task_Object): New routine.
413 (Report_Unused_Body_States): Moved to Check_Unused_Body_States.
415 2015-11-18 Pierre-Marie de Rodat <derodat@adacore.com>
417 * Makefile.rtl, impunit.adb: Add g-strhas.ads.
418 * g-strhas.ads: New file.
419 * s-strhas.ads: Add a comment to redirect users to g-strhas.ads.
421 2015-11-18 Bob Duff <duff@adacore.com>
423 * sem_elab.adb (Check_Internal_Call_Continue): Fix the case
424 where the call in question is to a renaming of a subprogram that
425 can be safely called without ABE.
426 * checks.adb: Minor edits.
428 2015-11-18 Hristian Kirtchev <kirtchev@adacore.com>
430 * atree.adb (Elist11): New routine.
431 (Set_Elist11): New routine.
432 * atree.ads (Elist11): New routine.
433 (Set_Elist11): New routine.
434 * atree.h: Define Elist11.
435 * contracts.adb (Analyze_Object_Contract): Verify the legality
436 of all references to a variable given that the variable is a
437 constituent of a single protected/task type.
438 * einfo.adb: Part_Of_References now utilizes Elist11.
439 (Part_Of_References): New routine.
440 (Set_Part_Of_References): New routine.
441 (Write_Field11_Name): Add output for Part_Of_References.
442 * einfo.ads New attribute Part_Of_References along with usage
444 (Part_Of_References): New routine along with
446 (Set_Part_Of_References): New routine along with pragma Inline.
447 * sem_prag.adb (Analyze_Constituent): Record a possible
448 reference to a concurrent constituent.
449 (Analyze_Global_Item): Record a possible reference to a concurrent
451 (Analyze_Input_Output): Record a possible reference to a
452 concurrent constituent.
453 * sem_res.adb (Resolve_Entity_Name): Record a possible reference
454 to a concurrent constituent.
455 * sem_util.adb (Check_Part_Of_Reference): New routine.
456 (Record_Possible_Part_Of_Reference): New routine.
457 * sem_util.ads (Check_Part_Of_Reference): New routine.
458 (Record_Possible_Part_Of_Reference): New routine.
460 2015-11-18 Ed Schonberg <schonberg@adacore.com>
462 * checks.adb (Apply_Arithmetic_Overflow_Minimized_Eliminated):
463 An if_expression is the proper place to apply the overflow
464 minimization procedure if its context is not an enclosing
465 arithmetic expression.
467 2015-11-18 Arnaud Charlet <charlet@adacore.com>
469 * gnat_ugn/gnat_project_manager.rst,
470 gnat_ugn/building_executable_programs_with_gnat.rst,
471 gnat_ugn/gnat_and_program_execution.rst,
472 gnat_ugn/the_gnat_compilation_model.rst,
473 gnat_rm/implementation_defined_pragmas.rst,
474 gnat_rm/standard_and_implementation_defined_restrictions.rst,
475 gnat_ugn.texi, gnat_rm.texi: Update doc.
477 2015-11-18 Hristian Kirtchev <kirtchev@adacore.com>
479 * contracts.adb (Add_Contract_Item): Chain pragmas Attach_Handler
480 and Interrupt_Handler on the classifications list of a [generic]
481 procedure N_Contract node.
482 * contracts.ads (Add_Contract_Item): Update the comment on usage.
483 * einfo.adb (Get_Pragma): Pragmas Attach_Handler and
484 Interrupt_Handler are found on the classifications list of
486 * einfo.ads (Get_Pragma): Update the comment on usage.
487 * sem_prag.adb (Process_Interrupt_Or_Attach_Handler): Code
488 reformatting. Store the pragma as a contract item.
490 2015-11-18 Ed Schonberg <schonberg@adacore.com>
492 * sem_ch8.adb (Available_Subtype): Use only in GNATprove
493 mode. When generating code it may be necessary to create itypes
494 at the point of use of a selected component, for example in the
495 expansion of a record equality operation.
497 2015-11-18 Vincent Celier <celier@adacore.com>
499 * s-os_lib.adb (Normalize_Pathname.Get_Directory): When
500 invoking Normalize_Pathname, use the same values for parameters
501 Resolve_Links and Case_Sensitive as the parent Normalize_Pathname.
503 2015-11-18 Vincent Celier <celier@adacore.com>
505 * a-direct.adb (Containing_Directory): Return "." when the result
506 is the current directory, not specified as an absolute path name.
508 2015-11-18 Hristian Kirtchev <kirtchev@adacore.com>
510 * exp_aggr.adb (Is_Completely_Hidden_Discriminant): New routine.
511 (Init_Hidden_Discriminants): Code reformatting. Do not initialize
512 a completely hidden discriminant.
513 * a-interr.ads (Get_CPU): Added SPARK_Mode, Volatile_Function
514 and Global aspects on the function.
516 2015-11-18 Ed Schonberg <schonberg@adacore.com>
518 * exp_intr.adb (Expand_Unc_Deallocation): If the designated
519 type is a concurrent type, the deallocation applies to the
520 corresponding record type, or to its class-wide type if the type
523 2015-11-18 Doug Rupp <rupp@adacore.com>
525 * s-parame-vxworks.adb: Reduce default stack size for stack
526 limit check to a reasonable value
527 * s-tpopsp-vxworks.adb: Make Stack_Limit a task variable for vx5 and
530 2015-11-18 Ed Schonberg <schonberg@adacore.com>
532 * sem_ch5.adb (Analyze_Assignment): Diagnose assignment where
533 left-hand side has a limited view of a class-wide type.
534 * sem_ch6.adb (Detected_And_Exchange): Do not install a non-limited
535 view if the scope of the type of the formal is visible through
536 a limited_with_clause, even if the non-limited view is available.
538 2015-11-18 Emmanuel Briot <briot@adacore.com>
540 * s-pooglo.ads: Make Global_Pool_Object aliased.
542 2015-11-18 Ed Schonberg <schonberg@adacore.com>
544 * sem_attr.adb (Analyze_Attribute, case 'Access): If the prefix
545 is an expression function, do not analyze the generated body if
546 the current scope is not the scope of the expression function,
547 as may happen if the attribute is an actual in an instantiation.
548 * sem_ch10.adb, sem_ch12.adb, a-stzmap.adb, s-soflin.adb,
549 a-stwima.adb: Fix typos.
551 2015-11-18 Arnaud Charlet <charlet@adacore.com>
553 * exp_ch11.adb (Expand_N_Exception_Declaration): No-op when
556 2015-11-18 Hristian Kirtchev <kirtchev@adacore.com>
559 * exp_ch3.adb (Default_Initialize_Object): Reimplemented. Abort
560 defer / undefer pairs are now encapsulated in a block with
561 an AT END handler. Partial finalization now takes restriction
562 No_Exception_Propagation into account when generating blocks.
563 * exp_ch7.adb Various reformattings.
564 (Create_Finalizer): Change
565 the generation of abort defer / undefer pairs and explain the
566 lack of an AT END handler.
567 (Process_Transient_Objects): Add generation of abort defer/undefer
569 * exp_ch9.adb Various reformattings.
570 (Build_Protected_Subprogram_Body): Use
571 Build_Runtime_Call to construct a call to Abort_Defer.
572 (Build_Protected_Subprogram_Call_Cleanup): Use
573 Build_Runtime_Call to construct a call to Abort_Undefer.
574 (Expand_N_Asynchronous_Select): Use Build_Runtime_Call to
575 construct a call to Abort_Defer.
576 * exp_intr.adb (Expand_Unc_Deallocation): Abort defer
577 / undefer pairs are now encapsulated in a block with
578 an AT END handler. Finalization now takes restriction
579 No_Exception_Propagation into account when generating blocks.
580 * exp_util.ads, exp_util.adb (Wrap_Cleanup_Procedure): Removed.
582 2015-11-18 Vincent Celier <celier@adacore.com>
584 * g-comlin.adb (Find_Longest_Matching_Switch): Do not take into
585 account a switch ending with '=' when the actual command line
586 switch is not followed with a space or '='.
588 2015-11-18 Ed Schonberg <schonberg@adacore.com>
590 * sem_res.adb (Resolve_Explicit_Dereference): Do not add an access
591 check if the type of the prefix is known to exclude null.
592 * a-coinve.adb (Get_Element_Access): The function returns an
593 access type that excludes null, so add an explicit check for
594 a null element pointer, which is created when Insert_Spaces is
595 called on an indefinite vector container.
597 2015-11-18 Arnaud Charlet <charlet@adacore.com>
599 * switch-c.adb (Scan_Front_End_Switches): Add a check requiring
602 2015-11-18 Ed Schonberg <schonberg@adacore.com>
604 * sem_ch7.adb (Uninstall_Declarations): Before swapping private
605 and full views, ensure that the potential use visbility of the
606 two views is consistent.
608 2015-11-18 Doug Rupp <rupp@adacore.com>
610 * s-parame-vxworks.adb: Increase default stack size for targets
611 using stack limit checking.
613 2015-11-18 Jose Ruiz <ruiz@adacore.com>
615 * a-interr.adb, a-interr.ads (Ada.Interrupts.Get_CPU): Add this
616 function that was added to Ada 2005 returning the processor where
617 interrupt handlers execute.
619 2015-11-18 Tristan Gingold <gingold@adacore.com>
621 * exp_ch9.adb (Is_Pure_Barrier): Handle expanded component
622 declaration of a protected definition.
624 2015-11-18 Ed Falis <falis@adacore.com>
626 * s-soflin.adb, s-stchop-vxworks.adb: Code clean ups.
628 2015-11-18 Gary Dismukes <dismukes@adacore.com>
630 * bcheck.adb: Minor editorial changes.
632 2015-11-18 Arnaud Charlet <charlet@adacore.com>
634 * interfac.ads (Unsigned_24): New type.
635 * sem_ch13.adb (Validate_Unchecked_Conversion): Disable error on
636 unconstrained arrays in Relaxed_RM_Semantics mode.
638 2015-11-18 Vincent Celier <celier@adacore.com>
640 * bcheck.adb (Check_Consistent_Dynamic_Elaboration_Checking): No
641 warning is withed unit is the interface of a Stand-Alone Library.
643 2015-11-18 Thomas Quinot <quinot@adacore.com>
645 * s-os_lib.ads, s-os_lib.adb(Normalize_Pathname): Support the case of
646 an unresolved Directory argument, by recursively resolving it
647 against the current dir.
649 2015-11-18 Ed Schonberg <schonberg@adacore.com>
651 * sem_ch6.adb (Process_Formals): A function declaration that
652 returns a class-wide type must have freeing deferred, so that it
653 is not frozen before the class-wide type and its root type are
654 frozen. This is significant when there may be a limited view of
655 the class_wide type in another package.
657 2015-11-18 Hristian Kirtchev <kirtchev@adacore.com>
659 * einfo.adb (Has_Non_Null_Refinement): Rename to
660 Has_Non_Null_Visible_Refinement.
661 (Has_Null_Refinement): Rename to Has_Null_Visible_Refinement.
662 * einfo.ads Update the documentation of
663 attribute Has_Non_Null_Refinement and attribute Has_Null_Refinement.
664 (Has_Non_Null_Refinement): Rename to Has_Non_Null_Visible_Refinement
665 and update occurrences in entities.
666 (Has_Null_Refinement): Rename to Has_Null_Visible_Refinement and update
667 occurrences in entities.
668 * sem_prag.adb (Check_In_Out_States): Update the calls to
669 Has_[Non_]Null_Refinement.
670 (Check_Input_States): Update the
671 calls to Has_[Non_]Null_Refinement.
672 (Check_Output_States): Update the calls to Has_[Non_]Null_Refinement.
673 (Check_Proof_In_States): Update the calls to Has_[Non_]Null_Refinement.
674 (Collect_Global_Item): Update the calls to Has_[Non_]Null_Refinement.
675 (Is_Null_Refined_State): Update the calls to Has_[Non_]Null_Refinement.
676 (Match_Item): Update the calls to Has_[Non_]Null_Refinement.
677 * sem_util.adb (Has_Non_Null_Refinement): New routine.
678 (Has_Null_Refinement): New routine.
679 * sem_util.ads (Has_Non_Null_Refinement): New routine.
680 (Has_Null_Refinement): New routine.
682 2015-11-18 Gary Dismukes <dismukes@adacore.com>
684 * exp_util.adb: Minor reformatting and typo fixes.
686 2015-11-18 Hristian Kirtchev <kirtchev@adacore.com>
688 * sem_ch4.adb: Minor reformatting.
690 2015-11-18 Hristian Kirtchev <kirtchev@adacore.com>
692 * exp_util.adb (Expand_Subtype_From_Expr): Add new formal
693 parameter Related_Id and propagate it to Make_Subtype_From_Expr.
694 (Make_Subtype_From_Expr): Add new formal parameter
695 Related_Id. Create external entities when requested by the caller.
696 * exp_util.ads (Expand_Subtype_From_Expr): Add new formal
697 parameter Related_Id. Update the comment on usage.
698 (Make_Subtype_From_Expr): Add new formal parameter
699 Related_Id. Update the comment on usage.
700 * sem_ch3.adb (Analyze_Object_Declaration): Add local variable
701 Related_Id. Generate an external constrained subtype when the
702 object is a public symbol.
704 2015-11-18 Hristian Kirtchev <kirtchev@adacore.com>
706 * sem_prag.adb (Analyze_Pragma): Update the grammars of pragmas
707 Abstract_State, Depends, Global, Initializes, Refined_Depends,
708 Refined_Global and Refined_State.
710 2015-11-18 Hristian Kirtchev <kirtchev@adacore.com>
712 * sem_util.adb (Has_Full_Default_Initialization):
713 Perform the test for the presence of pragma
714 Default_Initial_Condition prior to the specialized type
715 checks. Add a missing case where the lack of a pragma argument
716 yields full default initialization.
718 2015-11-18 Hristian Kirtchev <kirtchev@adacore.com>
720 * sem_res.adb (Resolve_Entity_Name): Do not check
721 for elaboration issues when a variable appears as the name of
722 an object renaming declaration as this constitutes an aliasing,
725 2015-11-18 Ed Schonberg <schonberg@adacore.com>
727 * checks.adb (Overlap_Check): An actual that is an aggregate
728 cannot overlap with another actual, and no check should be
730 * targparm.ads: Fix typos.
732 2015-11-18 Pascal Obry <obry@adacore.com>
734 * adaint.c: Routine __gnat_killprocesstree only implemented on
737 2015-11-18 Pascal Obry <obry@adacore.com>
739 * g-ctrl_c.adb: Minor style fixes.
741 2015-11-18 Pascal Obry <obry@adacore.com>
743 * adaint.c, s-os_lib.adb, s-os_lib.ads (Kill_Process_Tree): New.
745 2015-11-18 Hristian Kirtchev <kirtchev@adacore.com>
747 * sem_util.adb (Check_Nonvolatile_Function_Profile): Place the error
748 message concerning the return type on the result definition.
749 (Is_Volatile_Function): A function with a parameter of a protected
750 type is a protected function if it is defined within a protected
753 2015-11-18 Ed Schonberg <schonberg@adacore.com>
755 * sem_ch4.adb (Try_Container_Indexing): When building the
756 parameter list for the function call on indexing functions,
757 preserve overloading of the parameters, which may themselves be
758 generalized indexing operations.
760 2015-11-13 Arnaud Charlet <charlet@adacore.com>
763 * s-osinte-dragonfly.ads (Get_Page_Size): C function returns an int.
765 2015-11-13 David Malcolm <dmalcolm@redhat.com>
767 * gcc-interface/trans.c (Sloc_to_locus): Add line_table param when
768 calling linemap_position_for_line_and_column.
770 2015-11-13 Hristian Kirtchev <kirtchev@adacore.com>
772 * exp_attr.adb: Minor reformatting.
774 2015-11-13 Pascal Obry <obry@adacore.com>
776 * adaint.c: Ensure that it is possible to get killed process
779 2015-11-13 Arnaud Charlet <charlet@adacore.com>
781 * gnat_rm.texi, gnat_ugn.texi, doc/gnat_ugn/gnat_project_manager.rst
782 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
783 doc/gnat_ugn/platform_specific_information.rst,
784 doc/gnat_ugn/gnat_and_program_execution.rst,
785 doc/gnat_ugn/gnat_utility_programs.rst,
786 doc/gnat_ugn/the_gnat_compilation_model.rst,
787 doc/gnat_rm/compatibility_and_porting_guide.rst,
788 doc/gnat_rm/implementation_defined_pragmas.rst,
789 doc/gnat_rm/representation_clauses_and_pragmas.rst,
790 doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
791 Update documentation.
793 2015-11-13 Eric Botcazou <ebotcazou@adacore.com>
795 * sigtramp-ios.c, init.c: Minor cosmetic tweaks.
797 2015-11-13 Hristian Kirtchev <kirtchev@adacore.com>
799 * s-gloloc.adb, g-debpoo.adb: Minor reformatting.
801 2015-11-13 Ed Schonberg <schonberg@adacore.com>
803 * sem_ch5.adb (Analyze_Iterator_Specification): Improve error
804 message for the case the iterable name (array or container)
805 is a component that depends on a discriminant.
807 2015-11-13 Ed Schonberg <schonberg@adacore.com>
809 * sem_ch4.adb (Indicate_Name_And_Type): If the analysis of
810 one interpretation succeeds, set type of name in call, for
812 (Try_Container_Indexing): If there are multiple indexing
813 functions, collect possible interpretations that are compatible
814 with given parameters, and add implicit dereference types when
816 * sem_util.adb (Build_Explicit_Dereference): If the expression
817 is an overloaded function call use the given discriminant to
818 resolve the call, and set properly the type of the call and of
819 the resulting dereference.
821 2015-11-13 Hristian Kirtchev <kirtchev@adacore.com>
823 * sem_prag.adb (Analyze_Pragma): Pragma Constant_After_Elaboration can
824 now apply to a variable without an initialization expression.
826 2015-11-13 Hristian Kirtchev <kirtchev@adacore.com>
828 * exp_ch9.adb (Add_Matching_Formals): Parameter Actuals is now of mode
829 IN OUT. Create a new list when list Actuals is not present.
830 (Build_Contract_Wrapper): Create the wrapper
831 only when the entry has at least on checked contract case or
832 pre/postcondition. Ensure that the call to the original entry
833 lacks an actual parameter list when the entry appears without
835 (Expand_Entry_Declaration): Code cleanup.
837 2015-11-13 Hristian Kirtchev <kirtchev@adacore.com>
839 * sem_ch13.adb (Analyze_Aspect_Specifications): Continue the analysis
840 after encountering an illegal aspect Part_Of.
842 2015-11-13 Ed Schonberg <schonberg@adacore.com>
844 * exp_attr.adb (Expand_N_Attribute_Reference, case
845 Overlaps_Storage): Add copies for nodes that represent the integer
846 addresses of the two actuals, to prevent identical nodes in the
847 tree, which the backend cannot handle properly.
849 2015-11-13 Bob Duff <duff@adacore.com>
851 * sem_ch6.adb (Check_Private_Overriding): Change
852 name of Parent_Is_Private to be Overrides_Private_Part_Op,
853 and use Unit_Declaration_Node.
855 2015-11-13 Bob Duff <duff@adacore.com>
857 * sinfo.ads: Minor comment fix.
858 * sem_ch6.adb: Minor reformatting.
860 2015-11-13 Jerome Lambourg <lambourg@adacore.com>
862 * tracebak.c: Do not use the GCC Unwinder to retrieve traceback
865 2015-11-13 Eric Botcazou <ebotcazou@adacore.com>
867 * init.c [Darwin/arm64]: Fix typo.
868 * sigtramp-armios.c: Remove.
869 * sigtramp-ios.c: New file.
871 2015-11-13 Doug Rupp <rupp@adacore.com>
873 * s-stchop-vxworks.adb (Set_Stack_Limit_For_Current_Task): Set stack
874 limit to 12000 decimal vice 12000 hexadecimal.
876 2015-11-13 Hristian Kirtchev <kirtchev@adacore.com>
878 * exp_ch9.adb, exp_fixd.adb, exp_util.adb, g-debpoo.adb,
879 impunit.adb, scos.ads, sem_ch4.adb, sem_prag.adb,
880 s-stchop-vxworks.adb: Minor reformatting.
882 2015-11-13 Tristan Gingold <gingold@adacore.com>
884 * s-rident.ads (Profile_Info): Enable Pure_Barriers for
885 GNAT_Extended_Ravenscar.
887 2015-11-13 Bob Duff <duff@adacore.com>
889 * sem_ch6.adb (Check_Private_Overriding): Detect the special
890 case where the overriding subprogram is overriding a subprogram
891 that was declared in the same private part.
893 2015-11-13 Gary Dismukes <dismukes@adacore.com>
895 * exp_ch9.adb: Minor reformatting and typo fixes.
897 2015-11-13 Eric Botcazou <ebotcazou@adacore.com>
899 * init.c [Darwin/arm64]: Move __gnat_sigtramp implementation to...
900 (__gnat_map_signal): New function.
901 (__gnat_error_handler):
902 Adjust the context and call above function.
903 * sigtramp-armios.c: ...here. New file.
905 2015-11-13 Arnaud Charlet <charlet@adacore.com>
907 * bcheck.adb (Check_Consistent_Restrictions): Do not check
908 consistency of No_Dependence for runtime units.
910 2015-11-13 Tristan Gingold <gingold@adacore.com>
912 * s-rident.ads (Restriction_Id): Add Pure_Barriers.
913 * restrict.ads (Implementation_Restriction): Add Pure_Barriers.
914 * exp_ch9.adb (Expand_Entry_Barrier): Create
915 Is_Simple_Barrier_Name function, add Is_Pure_Barrier and
918 2015-11-13 Ed Schonberg <schonberg@adacore.com>
920 * sem_util.adb (Get_Cursor_Type): To determine whether a function
921 First is the proper Iterable primitive, use the base type of the
922 first formal rather than the type. This is needed in the unusual
923 case where the Iterable aspect is specified for an integer type.
925 2015-11-13 Ed Schonberg <schonberg@adacore.com>
927 * sem_ch4.adb (Constant_Indexing_OK): If the indexing is the
928 prefix of a procedure call assume that constant indexing is
931 2015-11-13 Eric Botcazou <ebotcazou@adacore.com>
933 * sigtramp.h: Fix formatting throughout, do not include other
934 headers, add missing preprocessor condition and 'extern' keywords.
935 * sigtramp-armdroid.c: Include <sys/ucontext.h>.
936 * init.c [Android]: Likewise.
938 2015-11-13 Eric Botcazou <ebotcazou@adacore.com>
940 * init.c [Darwin/arm64] (__gnat_sigtramp): Do not increment PC,
941 fix CFI and add return sequence.
943 2015-11-13 Ed Schonberg <schonberg@adacore.com>
945 * exp_fixd.adb (Expand_Convert_Float_To_Fixed): If the conversion
946 comes from an attribute reference 'Round, the operation must
947 round and not truncate.
948 * sem_res.adb, sem_ch6.adb: Minor editing.
950 2015-11-12 Philippe Gil <gil@adacore.com>
952 * g-debpoo.adb (Print_Address): print address in hexadecimal as
953 in previous GNAT version (without secondary stack use)
954 (Deallocate): Deallocate calling once Unlock_Task.all when it
957 2015-11-12 Ed Schonberg <schonberg@adacore.com>
959 * sem_ch3.adb (Analyze_Subtype_Declaration): Remove redundant
960 copying of dimensions from parent type to subtype. This is
961 properly done in Analyze_Dimension.
962 * sem_dim.adb (Analyze_Dimension_Subtype_Declaration): Add entity
963 to error message, so that reference to entity can be formatted
967 2015-11-12 Bob Duff <duff@adacore.com>
969 * impunit.adb, lib-xref.ads, restrict.ads, scos.ads, sem_attr.ads,
970 types.ads: Get rid of some global variables.
971 * output.adb, output.ads: Move some global variables to the body.
973 2015-11-12 Yannick Moy <moy@adacore.com>
975 * lib-xref-spark_specific.adb
976 (Is_Constant_Object_Without_Variable_Input): Add special case
977 for imported constants.
979 2015-11-12 Philippe Gil <gil@adacore.com>
981 * g-debpoo.adb (Allocate): Avoid having allocations not handled.
983 2015-11-12 Ed Schonberg <schonberg@adacore.com>
985 * checks.adb (Apply_Scalar_Range_Check): If the expression is
986 a real literal and the context type has static bounds, remove
987 range check when possible.
989 2015-11-12 Ed Schonberg <schonberg@adacore.com>
991 * sem_util.adb (Collect_Primitive_Operations): If the type is
992 derived from a type declared elsewhere that has an incomplete
993 type declaration, the primitives are found in the scope of the
994 type nat that of its ancestor.
996 2015-11-12 Arnaud Charlet <charlet@adacore.com>
998 * switch-c.adb, debug.adb, osint-c.adb, gnat1drv.adb: Remove -gnatd.V
1000 * exp_aggr.adb, exp_util.adb: Fix typos.
1002 2015-11-12 Jerome Lambourg <lambourg@adacore.com>
1004 * init.c: Properly adjust PC values in case of signals.
1006 2015-11-12 Bob Duff <duff@adacore.com>
1008 * sem_prag.adb (Check_Arg_Is_Library_Level_Local_Name): A
1009 pragma that comes from an aspect does not "come from source",
1010 so we need to test whether it comes from an aspect.
1012 2015-11-12 Arnaud Charlet <charlet@adacore.com>
1014 * switch-c.adb, gnat1drv.adb, opt.ads: Reserve -gnateg for generation
1017 2015-11-12 Arnaud Charlet <charlet@adacore.com>
1019 * back_end.adb, opt.ads (Debugger_Level): Update comment.
1020 (Scan_Back_End_Switches): Set Debugger_Level.
1022 2015-11-12 Bob Duff <duff@adacore.com>
1024 * fmap.adb, debug.ads, checks.adb, exp_ch11.adb: Minor edits.
1026 2015-11-12 Doug Rupp <rupp@adacore.com>
1028 * s-stchop-vxworks.adb (Stack_Limit): Export vice Import.
1030 2015-11-12 Gary Dismukes <dismukes@adacore.com>
1032 * sem_dim.adb: Minor reformatting.
1034 2015-11-12 Gary Dismukes <dismukes@adacore.com>
1036 * gnat1drv.adb, opt.ads: Minor reformatting.
1038 2015-11-12 Ed Schonberg <schonberg@adacore.com>
1040 * sem_ch3.adb (Analyze_Number_Declaration): Call Analyze_Dimension,
1041 to propagate dimension information from expression to named
1043 * sem_dim.ads: Documentation: number declaration and explicit
1044 dereference can carry dimension information.
1045 * sem_dim.adb (Analyze_Dimension_Number_Declaration): New
1046 procedure, to propagate dimension information from expression
1047 of declaration to named number, whose type becomes one of the
1048 dimensioned base types rather than universal real.
1049 (Analyze_Dimension_Binary_Op):
1050 a) If one operand is a literal that is the value of a declared
1051 constant after constant-foloding, use the dimensions of the
1053 b) If an operand is a literal that is a contant-folded expression,
1054 and expander is active, do not report a dimension mismatch if
1055 literal does not carry them, because dimension matching will
1056 have been checked previously.
1058 2015-11-12 Ed Schonberg <schonberg@adacore.com>
1060 * sem_ch8.adb (Find_Selected_Component): In a synchronized
1061 body, a reference to an operation of an object of the same
1062 synchronized type was always interpreted as a reference to the
1063 current instance. This is not always the case, as the prefix of
1064 the reference may designate an object of the same type declared
1065 in the enclosing context prior to the body.
1067 2015-11-12 Arnaud Charlet <charlet@adacore.com>
1069 * impunit.ads, impunit.adb (Get_Kind_Of_File): New. Cleaned up
1070 implementation from previous Get_Kind_Of_Unit.
1071 (Get_Kind_Of_Unit): Reimplemented using Get_Kind_Of_File.
1072 * debug.adb: Remove d.4 switch, no longer used.
1073 * opt.ads: Update doc on Debugger_Level.
1074 * gnat1drv.adb: Code clean ups.
1075 * sinput.ads: minor fix in comment
1077 2015-11-12 Bob Duff <duff@adacore.com>
1079 * sinfo.adb, sinfo.ads, sem_ch6.adb, atree.ads: Add
1080 Was_Expression_Function flag, which is set in sem_ch6.adb when
1081 converting an Expression_Function into a Subprogram_Body.
1083 2015-11-12 Pascal Obry <obry@adacore.com>
1085 * usage.adb: Update overflow checking documentation.
1087 2015-11-12 Tristan Gingold <gingold@adacore.com>
1089 * snames.ads-tmpl: Name_Gnat_Extended_Ravenscar: New identifier.
1090 * s-rident.ads (Profile_Name): Add GNAT_Extended_Ravenscar.
1091 (Profile_Info): Add new entry for GNAT_Extended_Ravenscar.
1092 * sem_prag.adb (Set_Ravenscar_Profile): Add Profile parameter
1093 to handle various ravenscar profiles. Adjust error messages.
1094 (Analyze_Pragma): Handle GNAT_Extended_Ravenscar profile.
1095 * targparm.adb (Get_Target_Parameters): Handle
1096 GNAT_Extended_Ravenscar profile.
1098 2015-11-12 Ed Schonberg <schonberg@adacore.com>
1100 * sem_warn.adb (Warn_On_Unreferenced_Entity): If the entity is an
1101 Out_Parameter the front-end does not emit any warning on it, so
1102 do not suppress warnings on the entity because the backend might
1103 be able to determine an uninitialized path and warn accordingly.
1105 2015-11-12 Ed Schonberg <schonberg@adacore.com>
1107 * sem_ch4.adb (Analyze_Selected_Component): Diagnose an attempt
1108 to reference an internal entity from a synchronized type from
1109 within the body of that type, when the prefix of the selected
1110 component is not the current instance.
1112 2015-11-12 Ed Falis <falis@adacore.com>
1114 * s-stchop-vxworks.adb: Clean up in stack checking code.
1116 2015-11-12 Gary Dismukes <dismukes@adacore.com>
1118 * exp_ch6.adb (Is_Build_In_Place_Function_Call):
1119 Test Expression (N) in N_Type_Conversion cases as well,
1120 since conversions can occur in actual parameter contexts.
1121 (Make_Build_In_Place_Call_In_Anonymous_Context): Retrieve
1122 function call from Expression (Func_Call) when Nkind (Func_Call)
1123 is N_Type_Conversion, since conversions are allowed in "anonymous"
1124 contexts (specifically, as actual parameters).
1126 2015-11-12 Thomas Quinot <quinot@adacore.com>
1128 * sem_ch4.adb (analyze_If_Expression): Reject IF-expression where
1129 THEN-expression is overloaded and none of its interpretation is
1130 compatible with the ELSE-expression.
1132 2015-11-12 Jerome Lambourg <lambourg@adacore.com>
1134 * init.c: Do not try to mess with the MSR values in RTP mode:
1135 not needed and forbidden.
1137 2015-11-12 Ed Schonberg <schonberg@adacore.com>
1139 * exp_attr.adb (Compile_Stream_Body_In_Scope): Do not install
1140 full view of a type that has pragma Stream_Convert, because
1141 this indicates special processing for the stream operations of
1144 2015-11-12 Jerome Lambourg <lambourg@adacore.com>
1146 * init.c: Do not try to mess with the MSR values in RTP mode:
1147 not needed and forbidden.
1149 2015-11-12 Ed Schonberg <schonberg@adacore.com>
1151 * exp_attr.adb (Compile_Stream_Body_In_Scope): Do not install
1152 full view of a type that has pragma Stream_Convert, because
1153 this indicates special processing for the stream operations of
1156 2015-11-12 Gary Dismukes <dismukes@adacore.com>
1158 * exp_ch5.adb, sem_ch3.adb, exp_util.ads, inline.adb, freeze.adb,
1159 sem_util.adb, sem_util.ads, par-ch6.adb, sem_elab.adb: Minor
1160 reformatting and a typo fix.
1162 2015-11-12 Ed Schonberg <schonberg@adacore.com>
1164 * sem_ch12.adb (Preanalyze_Actuals): Add guard on use of
1165 Incomplete_Actuals, which are only stored for a package
1166 instantiation, in order to place the instance in the body of
1169 2015-11-12 Ed Schonberg <schonberg@adacore.com>
1171 * exp_intr.adb: Add legality checks on calls to a
1172 Generic_Dispatching_Constructor: the given tag must be defined,
1173 it cannot be the tag of an abstract type, and its accessibility
1174 level must not be greater than that of the constructor.
1176 2015-11-12 Ed Schonberg <schonberg@adacore.com>
1178 * sem_ch4.adb (Try_Container_Indexing, Constant_Indexing_OK): If
1179 the context is an overloaded call, assume that Constant_Indexing
1180 is not OK if an interpretation has an assignable parameter
1181 corresponding to the indexing expression.
1183 2015-11-12 Jerome Lambourg <lambourg@adacore.com>
1185 * init.c (__gnat_error_handler): Force the SPE bit of the MSR
1186 when executing on e500v2 CPU.
1188 2015-11-12 Hristian Kirtchev <kirtchev@adacore.com>
1190 * sem_prag.adb (Analyze_Constituent): Stop the
1191 analysis after detecting a misplaced constituent as this is a
1194 2015-11-12 Hristian Kirtchev <kirtchev@adacore.com>
1196 * sem_ch10.adb, atree.adb: Minor reformatting.
1198 2015-11-12 Hristian Kirtchev <kirtchev@adacore.com>
1200 * sem_elab.adb (Check_A_Call): Add new variable
1201 Is_DIC_Proc. Report elaboration issue in SPARK concerning calls
1202 to source subprograms or nontrivial Default_Initial_Condition
1203 procedures. Add specialized error message to avoid outputting
1204 the internal name of the Default_Initial_Condition procedure.
1205 * sem_util.ads, sem_util.adb
1206 (Is_Non_Trivial_Default_Init_Cond_Procedure): New routine.
1208 2015-11-12 Hristian Kirtchev <kirtchev@adacore.com>
1210 * contracts.adb (Analyze_Entry_Or_Subprogram_Body_Contract):
1211 Remove the guard concerning entry bodies as it is spurious.
1212 (Analyze_Entry_Or_Subprogram_Contract): Skip the analysis of
1213 Contract_Cases when not annotating the tree.
1214 * einfo.adb: Node25 is now used as Contract_Wrapper.
1215 (Contract_Wrapper): New routine.
1216 (PPC_Wrapper): Removed.
1217 (Set_Contract_Wrapper): New routine.
1218 (Set_PPC_Wrapper): Removed.
1219 (Write_Field25_Name): Add output for Contract_Wrapper. Remove
1220 output for PPC_Wrapper.
1221 * einfo.ads: New attribute Contract_Wrapper along with usage
1222 in entities. Remove attribute PPC_Wrapper along with usage in nodes.
1223 (Contract_Wrapper): New routine along with pragma Inline.
1224 (PPC_Wrapper): Removed along with pragma Inline.
1225 (Set_Contract_Wrapper): New routine along with pragma Inline.
1226 (Set_PPC_Wrapper): Removed along with pragma Inline.
1227 * exp_ch9.adb (Build_Contract_Wrapper): New routine.
1228 (Build_PPC_Wrapper): Removed.
1229 (Build_Protected_Entry): Code cleanup.
1230 (Expand_Entry_Declaration): Create a contract wrapper
1231 which now verifies Contract_Cases along with pre/postconditions.
1232 (Expand_N_Task_Type_Declaration): There is no need to check
1233 whether an entry has pre/postconditions as this is now done
1234 in Build_Contract_Wrapper.
1235 * sem_ch13.adb (Analyze_Aspect_Specifications): Pragma
1236 Refined_Post is now properly inserted in entry bodies.
1237 (Insert_Pragma): Add circuitry to insert in an entry body. Redo
1238 the instance "header" circuitry. Remove the now obsolete special
1239 case of inserting pre- conditions.
1240 * sem_prag.adb (Analyze_Pragma): Pragma Contract_Cases now
1242 * sem_res.adb (Resolve_Entry_Call): Update the calls to
1245 2015-11-12 Hristian Kirtchev <kirtchev@adacore.com>
1247 * exp_attr.adb, freeze.adb, sem_util.adb, sem_ch13.adb: Minor
1250 2015-11-12 Ed Schonberg <schonberg@adacore.com>
1252 * exp_attr.adb (Compile_Stream_Body_In_Scope): When compiling
1253 a stream operation for an array type, install the scope of the
1254 component type if it is private and not in scope, to prevent
1255 spurious errors if the full view of the component type has
1256 defaulted discriminants.
1258 2015-11-12 Eric Botcazou <ebotcazou@adacore.com>
1260 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): For a
1261 variable, if this is not an overlay, set on Treat_As_Volatile on it.
1262 * gcc-interface/decl.c (E_Variable): Do not force the type to volatile
1263 for address clauses. Tweak and adjust various RM references.
1265 2015-11-12 Eric Botcazou <ebotcazou@adacore.com>
1267 * checks.ads: Minor comment fix.
1269 2015-11-12 Arnaud Charlet <charlet@adacore.com>
1271 * gnat_rm.texi, gnat_ugn.texi,
1272 doc/gnat_ugn/platform_specific_information.rst,
1273 doc/gnat_ugn/gnat_and_program_execution.rst,
1274 doc/gnat_ugn/the_gnat_compilation_model.rst,
1275 doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
1276 doc/gnat_rm/implementation_defined_pragmas.rst: Update documentation.
1278 2015-11-12 Eric Botcazou <ebotcazou@adacore.com>
1280 * einfo.ads (Overlays_Constant): Document usage for E_Constant.
1281 * freeze.adb (Warn_Overlay): Small reformatting.
1282 (Check_Address_Clause): Deal specifically with deferred
1283 constants. For a variable or a non-imported constant
1284 overlaying a constant object and with initialization value,
1285 either remove the initialization or issue a warning. Fix a
1287 * sem_util.adb (Note_Possible_Modification): Overhaul the condition for
1288 the warning on modified constants and use Find_Overlaid_Entity instead
1289 of doing it manually.
1290 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Compute and
1291 set Overlays_Constant once on entry. Do not treat the overlaid
1292 entity as volatile. Do not issue the warning on modified
1294 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: Remove
1295 over-restrictive condition for the special treatment of deferred
1297 <E_Variable>: Remove obsolete associated code.
1299 2015-11-12 Eric Botcazou <ebotcazou@adacore.com>
1301 * gcc-interface/trans.c (gnat_to_gnu) <N_Subprogram_Renaming_Decl>: Do
1302 not materialize renamed subprograms if only annotating types.
1304 2015-11-12 Pierre-Marie de Rodat <derodat@adacore.com>
1306 * gcc-interface/decl.c (gnat_to_gnu_entity): Create
1307 IMPORTED_DECL nodes to describe the subprogram renamings which
1308 are relevant at debug time.
1309 * gcc-interface/gigi.h (get_debug_scope): Add declaration.
1310 * gcc-interface/trans.c (Identifier_to_gnu): Consider
1311 N_Defining_Operator_Symbol as valid entities.
1312 (gnat_to_gnu): Handle N_Defining_Operator_Symbol the same way as
1313 other entities. Introduce a specific handling for
1314 N_Subprogram_Renaming_Declaration: call gnat_to_gnu_entity on
1315 the entity defined for relevant ones.
1316 (process_decls): Process subprogram renaming declarations during
1317 the second pass only.
1318 * gcc-interface/utils.c (get_debug_scope): Make it external.
1319 Consider N_Defining_Operator_Symbol as valid entities.
1320 (gnat_write_global_declarations): Output debugging information
1321 for top-level imported declarations.
1323 2015-11-12 Emmanuel Briot <briot@adacore.com>
1325 * s-os_lib.ads: Documentation update.
1327 2015-11-12 Arnaud Charlet <charlet@adacore.com>
1329 * s-taprop-vxworks.adb, s-osinte-vxworks.ads: Use a single import of
1330 taskDelay to avoid confusion.
1332 2015-11-12 Ed Schonberg <schonberg@adacore.com>
1334 * exp_ch6.adb (Expand_Simple_Function_Return): If the return
1335 type is class-wide and the expression is a view conversion,
1336 remove the conversion to prevent overriding of the tag, which
1337 must be that of the object being returned.
1339 2015-11-12 Tristan Gingold <gingold@adacore.com>
1341 * bindgen.adb (Gen_Adainit): Code cleanup.
1343 2015-11-12 Hristian Kirtchev <kirtchev@adacore.com>
1345 * s-stalib.ads: Code cleanup.
1347 2015-11-12 Ed Schonberg <schonberg@adacore.com>
1349 * sem_ch3.adb (Analyze_Incomplete_Type_Decl): small optimization.
1350 (Analyze_Subtype_Declaration): For floating point types,
1352 (OK_For_Limited_Init_In_05): Handle properly a conditional
1353 expression whose condition is static, and is rewritten as the
1354 branch that will be executed.
1356 2015-11-12 Ed Schonberg <schonberg@adacore.com>
1358 * sem_attr.adb (Resolve_Attribute, case 'Access): If the context
1359 type is an access constant type, do not mark the attribute
1360 reference as a possible modification of the prefix.
1362 2015-11-12 Steve Baird <baird@adacore.com>
1364 * sem_ch6.adb (Analyze_Procedure_Call) If CodePeer_Mode is True,
1365 do not analyze the expression of a machine code insertion.
1366 * sem_ch13.adb (Analyze_Code_Statement) If CodePeer_Mode is True,
1367 mark the N_Code_Statement node as analyzed and do nothing else.
1369 2015-11-12 Ed Schonberg <schonberg@adacore.com>
1371 * sem_ch6.adb (Check_Limited_Return): Make global to package
1373 (Analyze_Expression_Function): Remove duplicated code, pre-analyze
1374 expression to capture names and call Check_Limited_Return so
1375 that semantic checks are identical to those for regular functions
1376 returning limited types.
1378 2015-11-12 Gary Dismukes <dismukes@adacore.com>
1380 * bindgen.adb: Fix typo.
1381 * sem_ch6.adb: Minor reformatting.
1383 2015-11-12 Emmanuel Briot <briot@adacore.com>
1385 * s-os_lib.adb (Argument_String_To_List): fix handling of
1388 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
1390 * gcc-interface/decl.c: Remove unused header files.
1391 * gcc-interface/misc.c: Likewise.
1392 * gcc-interface/targtyps.c: Likewise.
1393 * gcc-interface/trans.c: Likewise.
1394 * gcc-interface/utils.c: Likewise.
1396 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
1398 * gcc-interface/gigi.h (set_reverse_storage_order_on_pad_type):
1400 * gcc-interface/decl.c (gnat_to_gnu_entity) <discrete_type>: Set the
1401 storage order on the enclosing record for a packed array type.
1402 <E_Array_Type>: Set the storage order.
1403 <E_Array_Subtype>: Likewise.
1404 <E_Record_Type>: Likewise.
1405 <E_Record_Subtype>: Likewise.
1406 (gnat_to_gnu_component_type): Set the reverse storage order on a
1407 padded type built for a non-bit-packed array.
1408 (gnat_to_gnu_field): Likewise.
1409 (components_to_record): Deal with TYPE_REVERSE_STORAGE_ORDER.
1410 * gcc-interface/utils.c (make_packable_type): Likewise.
1411 (pad_type_hasher::equal): Likewise.
1412 (gnat_types_compatible_p): Likewise.
1413 (unchecked_convert): Likewise.
1414 (set_reverse_storage_order_on_pad_type): New public function.
1415 * gcc-interface/trans.c (Attribute_to_gnu): Adjust call to
1416 get_inner_reference.
1417 * gcc-interface/utils2.c (build_unary_op): Likewise.
1418 (gnat_build_constructor): Deal with TYPE_REVERSE_STORAGE_ORDER.
1419 (gnat_rewrite_reference): Propagate REF_REVERSE_STORAGE_ORDER.
1421 2015-11-07 Richard Sandiford <richard.sandiford@arm.com>
1423 * gcc-interface/utils.c: Don't undef DEF_BUILTIN.
1425 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
1427 * gcc-interface/decl.c: Reorder #include's and remove duplicates.
1428 * gcc-interface/misc.c: Likewise.
1429 * gcc-interface/targtyps.c: Likewise.
1430 * gcc-interface/trans.c: Likewise.
1431 * gcc-interface/utils.c: Likewise.
1433 2015-10-27 Tristan Gingold <gingold@adacore.com>
1435 * bindgen.adb (System_BB_CPU_Primitives_Multiprocessors_Used):
1437 (Gen_Adainit): Call Start_All_CPUs if the above
1438 variable is set to true.
1440 2015-10-27 Emmanuel Briot <briot@adacore.com>
1442 * adaint.c, s-os_lib.adb, s-os_lib.ads (Copy_File_Attributes): New
1445 2015-10-27 Hristian Kirtchev <kirtchev@adacore.com>
1447 * namet.adb, namet.ads: Minor reformatting.
1449 2015-10-27 Ed Schonberg <schonberg@adacore.com>
1451 * sem_ch4.adb (Analyze_Allocator): Do not perform legality check
1452 on allocators for limited objects in a qualified expression,
1453 because expression has not been resolved.
1454 * sem_res.adb (Resolve_Allocator): Perform check on legality of
1455 limited objects after resolution. Add sem_ch3.adb to context.
1457 2015-10-27 Hristian Kirtchev <kirtchev@adacore.com>
1459 * sem_prag.adb (Analyze_Refined_Global_In_Decl_Part): Add variable
1461 (Check_Refined_Global_Item): An object or state acts as a
1462 constituent only when the corresponding encapsulating state
1463 appears in pragma Global.
1464 (Collect_Global_Item): Add a state with non-null visible refinement to
1467 2015-10-27 Gary Dismukes <dismukes@adacore.com>
1469 * sem_util.ads, par.adb, sem_ch6.adb: Minor reformatting and a few
1472 2015-10-27 Pierre-Marie de Rodat <derodat@adacore.com>
1474 * namet.ads, namet.adb (Name_Equals): New function.
1475 * namet.h (Name_Equals): New macro.
1477 2015-10-27 Arnaud Charlet <charlet@adacore.com>
1479 * exp_ch6.adb (Build_Procedure_Form): Use 'RESULT' for the extra
1480 parameter, to avoid ambiguity when generating tmps using _xxx which
1481 might end up reusing _result.
1483 2015-10-27 Javier Miranda <miranda@adacore.com>
1485 * sem_util.ads, sem_util.adb (Defining_Identifier): Adding a formal to
1486 indicate the needed behavior in case of nodes with errors.
1488 2015-10-27 Ed Schonberg <schonberg@adacore.com>
1490 * sem_attr.adb (Eval_Attribute): If the prefix of attribute
1491 Enum_Rep is an object that is a generated loop variable for an
1492 element iterator, no folding is possible.
1493 * sem_res.adb (Resolve_Entity_Name): Do not check for a missing
1494 initialization in the case of a constant that is an object
1496 * exp_attr.adb (Expand_N_Attribute_Reference, case Enum_Rep):
1497 If the prefix is a constant that renames an expression there is
1498 nothing to evaluate statically.
1500 2015-10-27 Vincent Celier <celier@adacore.com>
1502 * gnatlink.adb: Always delete the response file, even when the
1503 invocation of gcc to link failed.
1505 2015-10-27 Hristian Kirtchev <kirtchev@adacore.com>
1507 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
1508 Do not inherit the SPARK_Mode from the context if it has been
1510 (Build_Subprogram_Declaration): Relocate relevant
1511 pragmas from the subprogram body to the generated corresponding
1512 spec. Do not copy aspect SPARK_Mode as this leads to circularity
1513 in Copy_Separate_Tree. Inherit the attributes that describe
1514 pragmas Ghost and SPARK_Mode.
1515 (Move_Pragmas): New routine.
1517 2015-10-27 Hristian Kirtchev <kirtchev@adacore.com>
1519 * inline.adb (Is_Expression_Function): Removed.
1520 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): An internally
1521 generated subprogram body that completes an expression function
1522 inherits the SPARK_Mode from the spec.
1523 * sem_res.adb (Resolve_Call): Update all calls to
1524 Is_Expression_Function.
1525 * sem_util.ads, sem_util.adb (Is_Expression_Function): Reimplemented.
1526 (Is_Expression_Function_Or_Completion): New routine.
1528 2015-10-27 Hristian Kirtchev <kirtchev@adacore.com>
1530 * lib-xref-spark_specific.adb, a-dirval-mingw.adb, exp_ch6.adb,
1531 sem_ch8.adb, s-os_lib.adb: Minor reformatting.
1533 2015-10-27 Yannick Moy <moy@adacore.com>
1535 * lib-xref-spark_specific.adb
1536 (Enclosing_Subprogram_Or_Library_Package): detect library-level
1537 subprograms and handle entries as subprograms, i.e. now both
1538 library-level subprograms and entry bodies act as enclosing
1540 (Traverse_Declarations_Or_Statements): process entry bodies just
1541 like subprogram bodies.
1542 * lib-xref.ads (Enclosing_Subprogram_Or_Library_Package): comment
1543 simplified while keeping its the meaning and minor typo fixed
1545 * spark_xrefs.ads (Xref Section): fix in description of the ALI
1546 line for subprogram calls; such lines start with captial "F"
1547 followed by a space.
1549 2015-10-27 Ed Schonberg <schonberg@adacore.com>
1551 * sem_ch8.adb (Find_Direct_Name): A parameter association is
1552 a legal context for applying an implicit dereference.
1553 (Analyze_Expanded_Name): Minor code cleanup.
1555 2015-10-27 Arnaud Charlet <charlet@adacore.com>
1557 * sinput.ads, spark_xrefs.ads, lib-xref.adb: Fix typos.
1559 2015-10-27 Pascal Obry <obry@adacore.com>
1561 * a-dirval-mingw.adb: Remove some characters from Invalid_Character set.
1563 2015-10-27 Ed Schonberg <schonberg@adacore.com>
1565 * exp_ch6.adb (Rewrite_Function_Call_For_C): Use a named
1566 associaion for the added actual in the call because previous
1567 actuals may also have been given by explicit associations.
1568 * lib-xref.adb: Minor style fixes.
1570 2015-10-27 Arnaud Charlet <charlet@adacore.com>
1572 * gnat1drv.adb: Remove hard coded restrictions.
1574 2015-10-27 Pascal Obry <obry@adacore.com>
1576 * a-dirval-mingw.adb: Minor reformatting.
1578 2015-10-27 Javier Miranda <miranda@adacore.com>
1580 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Improve previous patch.
1582 2015-10-27 Hristian Kirtchev <kirtchev@adacore.com>
1584 * sem_ch12.adb (Analyze_Formal_Package_Declaration): Code cleanup. Set
1585 and restore the value of global flag Ignore_Pragma_SPARK_Mode. A
1586 formal package declaration acts as a package instantation with
1587 respect to SPARK_Mode legality.
1589 2015-10-27 Hristian Kirtchev <kirtchev@adacore.com>
1591 * sem_prag.adb (Check_Constituent_Usage): Use
1592 logical operators rather than short circuit operators. Emit an
1593 error when a state with visible refinement is not refined.
1594 * snames.ads-tmpl: Add names for detecting
1595 predefined potentially blocking subprograms.
1597 2015-10-27 Arnaud Charlet <charlet@adacore.com>
1599 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Revert previous
1601 (Expand_Array_Aggregate): Rewrite previous change here
1602 as done for other non GCC back-ends.
1603 (Build_Record_Aggr_Code): Add special case.
1605 2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
1607 * sem_prag.adb (Add_Item_To_Name_Buffer): Update the comment on usage.
1608 Add an output string for loop parameters.
1609 (Analyze_Global_Items): Loop parameters are now a
1610 valid global item. The share the legality checks of constants.
1611 (Analyze_Input_Output): Loop parameters are now a valid dependency item.
1612 (Find_Role): Loop parameters share the role of constants.
1614 2015-10-26 Ed Schonberg <schonberg@adacore.com>
1616 * sem_res.adb (Resolve_Generalized_Indexing): In ASIS mode,
1617 preserve the Generalized_ indexing link if the context is not
1618 a spec expression that will be analyzed anew.
1620 2015-10-26 Javier Miranda <miranda@adacore.com>
1622 * exp_ch6.ads, exp_ch6.adb (Build_Procedure_Body_Form): Promote it to
1623 library level (to invoke this routine from the semantic analyzer).
1624 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): When generating
1625 C code, invoke Build_Procedure_Body_Form to transform a function
1626 that returns a constrained array type into a procedure with an
1627 out parameter that carries the return value.
1629 2015-10-26 Arnaud Charlet <charlet@adacore.com>
1631 * a-reatim.ads: Add "Clock_Time with Synchronous" contract in package
1633 * a-taside.ads: Add "Tasking_State with Synchronous" contract in
1634 package Ada.Task_Identification.
1635 * sem_ch12.adb: minor typo in comment
1637 2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
1639 * contracts.adb (Analyze_Object_Contract): Set and restore
1640 the SPARK_Mode for both constants and objects. Factor out the
1641 semantic checks concerning Ghost objects.
1642 * freeze.adb (Freeze_Array_Type): A Ghost array type cannot have a
1643 concurrent component type.
1644 (Freeze_Entity): A Ghost type cannot also be concurrent.
1645 (Freeze_Record_Type): A Ghost record type cannot have a concurrent
1647 * sem_prag.adb (Analyze_Abstract_State): A Ghost abstract
1648 state cannot also be synchronized.
1649 (Check_Ghost_Synchronous): New routine.
1650 * sem_util.adb (Yields_Synchronized_Object): Correct the case
1651 of record components to account for the case where the type has
1654 2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
1656 * expander.adb (Expand): Expand a single protected declaration.
1657 * exp_ch9.ads, exp_ch9.adb (Expand_N_Single_Protected_Declaration): New
1660 2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
1662 * sem_res.adb (Is_OK_Volatile_Context): A volatile object may appear
1663 in an object declaration as long as it denotes the name.
1665 2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
1667 * sem_ch9.adb (Analyze_Single_Protected_Declaration): The anonymous
1668 object no longer comes from source.
1669 (Analyze_Single_Task_Declaration): The anonymous object no longer
1671 * sem_prag.adb (Analyze_Pragma): The analysis of pragma SPARK_Mode
1672 now recognizes the internal anonymous object created for a single
1673 concurren type as a valid context.
1674 (Find_Related_Context): The internal anonymous object created for a
1675 single concurrent type is now a valid context.
1676 (Find_Related_Declaration_Or_Body): The internal anonymous object
1677 created for a single concurrent type is now a valid context.
1679 2015-10-26 Ed Schonberg <schonberg@adacore.com>
1681 * sem_util.adb (Inherit_Rep_Item_Chain): Another another guard
1682 to prevent circularities in the rep_item_chain of the full view
1683 of a type extension in a child unit that extends a private type
1686 2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
1688 * atree.ads, atree.adb (Ekind_In): New 10 and 11 parameter versions.
1689 * contracts.ads, contracts.adb (Analyze_Initial_Declaration_Contract):
1691 * sem_ch6.adb (Analyze_Generic_Subprogram_Body):
1692 Analyze the contract of the initial declaration.
1693 (Analyze_Subprogram_Body_Helper): Analyze the contract of the
1694 initial declaration.
1695 * sem_ch7.adb (Analyze_Package_Body_Helper): Analyze the contract
1696 of the initial declaration.
1697 * sem_ch9.adb (Analyze_Entry_Body): Analyze the contract of
1698 the initial declaration.
1699 (Analyze_Protected_Body): Analyze
1700 the contract of the initial declaration.
1701 (Analyze_Task_Body): Analyze the contract of the initial declaration.
1702 * sem_prag.adb (Add_Entity_To_Name_Buffer): Use "type" rather
1703 than "unit" as it makes the error messages sound better.
1704 (Add_Item_To_Name_Buffer): Update comment on usage. The routine
1705 now supports discriminants and current instances of concurrent
1707 (Analyze_Depends_In_Decl_Part): Install the discriminants
1709 (Analyze_Global_In_Decl_Part): Install the discriminants of a task type.
1710 (Analyze_Global_Item): Add processing for current instances of
1711 concurrent types and include discriminants as valid global items.
1712 (Analyze_Input_Output): Discriminants and current instances of
1713 concurrent types are now valid items. Update various error messages.
1714 (Check_Usage): Current instances of protected and task types behaves
1715 as formal parameters.
1716 (Collect_Subprogram_Inputs_Outputs): There is
1717 no longer need to manually analyze [Refined_]Global thanks to
1718 freezing of initial declaration contracts. Add processing for
1719 the current instance of a concurrent type.
1720 (Find_Role): Add categorizations for discriminants, protected and task
1722 (Is_CCT_Instance): New routine.
1723 (Match_Items): Update the comment on usage. Update internal comments.
1724 * sem_prag.ads (Collect_Subprogram_Inputs_Outputs): Update the
1726 * sem_util.adb (Entity_Of): Ensure that the entity is an object
1727 when traversing a potential renaming chain.
1728 (Fix_Msg): Use "type" rather than "unit" as it makes the error messages
1730 * sem_util.ads (Fix_Msg): Update the comment on usage.
1732 2015-10-26 Arnaud Charlet <charlet@adacore.com>
1734 * par.adb (Par): Do not generate an error when generating
1735 SCIL for predefined units or new children of system and co.
1737 2015-10-26 Ed Schonberg <schonberg@adacore.com>
1739 * einfo.adb: Access_Disp_Table applies to a private
1742 2015-10-26 Ed Schonberg <schonberg@adacore.com>
1744 * sem_res.adb (Resolve_Generalized_Indexing): In ASIS mode, when
1745 restoring original node, remove Generalized_Indexing operation
1746 so that it is recreated during re- analysis.
1748 2015-10-26 Javier Miranda <miranda@adacore.com>
1750 * exp_unst.adb: (Unnest_Subprogram):
1751 Replace absolute references to 1 and 0 by their counterpart
1752 relative references through Subps_First.
1754 2015-10-26 Ed Schonberg <schonberg@adacore.com>
1756 * par-ch3.adb (P_Declarative_Items): In case of misplaced
1757 aspect specifications, ensure that flag Done is properly set to
1759 * sem_prag.adb, sem_prag.ads: Remove Build_Generic_Class_Condition,
1762 2015-10-26 Emmanuel Briot <briot@adacore.com>
1764 * s-os_lib.adb (Argument_String_To_List): Remove backslashes in
1767 2015-10-26 Javier Miranda <miranda@adacore.com>
1769 * exp_unst.ads, exp_unst.adb (Is_Uplevel_Referenced): Removed.
1771 2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
1773 * exp_util.adb, sem_aux.adb, exp_attr.adb, sem_eval.adb: Minor
1775 * sem_util.adb, sem_ch5.adb: Minor reformatting.
1777 2015-10-26 Ed Schonberg <schonberg@adacore.com>
1779 * exp_unst.adb (Unnest_Subprogram): Add guard to prevent compiler
1780 abort when handling a reference to a formal in an aspect of a
1781 nested subprogram declaration as an uplevel reference.
1783 2015-10-26 Bob Duff <duff@adacore.com>
1785 * snames.ads-tmpl, aspects.adb, aspects.ads: Add the aspect and
1786 pragma names and enter into relevant tables.
1787 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze aspect
1789 * sem_prag.adb (Predicate_Failure): Analyze pragma Predicate_Failure.
1790 * exp_util.adb (Make_Predicate_Check): When building the Check
1791 pragma, if Predicate_Failure has been specified, add the relevant
1792 String argument to the pragma.
1793 * par-prag.adb (Prag): Add Predicate_Failure to list of pragmas
1794 handled during semantic analysis.
1796 2015-10-26 Ed Schonberg <schonberg@adacore.com>
1798 * sem_ch5.adb (Analyze_Assignment): If the left-hand side
1799 is an indexed component with generalized indexing, discard
1800 interpretation that yields a reference type, which is not
1801 assignable. This prevent spurious ambiguities when the right-hand
1802 side is an aggregate which does not provide a target type.
1804 2015-10-26 Bob Duff <duff@adacore.com>
1806 * exp_ch7.adb, exp_ch6.adb: Minor comment fix.
1808 2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
1810 * aspects.adb (Move_Or_Merge_Aspects): Move all aspects related
1811 to a single concurrent type declaration to the declaration
1812 of the anonymous object if they qualify.
1813 (Relocate_Aspect): Update comment on usage.
1814 * aspects.ads Add new sectioon on aspect specifications on single
1815 concurrent types. Add new table Aspect_On_Anonymous_Object_OK.
1816 (Move_Or_Merge_Aspects): Udate the comment on usage.
1817 * atree.adb (Elist36): New routine.
1818 (Set_Elist36): New routine.
1819 * atree.ads (Elist36): New routine along with pragma Inline.
1820 (Set_Elist36): New routine along with pragma Inline.
1821 * atree.h: Elist36 is now an alias for Field36.
1822 * contracts.adb (Add_Contract_Item): Add processing
1823 for protected units and extra processing for variables.
1824 (Analyze_Object_Contract): Code cleanup. The processing of
1825 Part_Of now depends on wherer the object is a constant or
1826 a variable. Add processing for pragmas Depends and Global
1827 when they apply to a single concurrent object. Verify that a
1828 variable which is part of a single concurrent type has full
1829 default initialization. Set/restore the SPARK_Mode of a single
1831 (Analyze_Protected_Contract): New routine.
1832 * contracts.ads (Add_Contract_Item): Update the comment on usage.
1833 (Analyze_Object_Contract): Update the comment on usage.
1834 (Analyze_Protected_Contract): New routine.
1835 (Analyze_Task_Contract): Update the comment on usage.
1836 * einfo.adb Part_Of_Constituents now uses Elist10.
1837 (Anonymous_Object): New routine.
1838 (Contract): Code cleanup.
1839 (Has_Option): Remove the assumption that the only simple
1841 (Is_Synchronized_State): New routine.
1842 (Part_Of_Constituents): This attribute applies to
1843 variables and uses Elist10.
1844 (Set_Anonymous_Object): New routine.
1845 (Set_Contract): Code cleanup.
1846 (Set_Part_Of_Constituents): This attribute applies to variables and
1848 (Set_SPARK_Aux_Pragma): Code cleanup.
1849 (Set_SPARK_Aux_Pragma_Inherited): Code cleanup.
1850 (Set_SPARK_Pragma): Code cleanup. This attribute applies to
1852 (Set_SPARK_Pragma_Inherited): Code cleanup. This
1853 attribute applies to variables.
1854 (SPARK_Aux_Pragma): Code cleanup.
1855 (SPARK_Aux_Pragma_Inherited): Code cleanup.
1856 (SPARK_Pragma): Code cleanup. This attribute applies to variables.
1857 (SPARK_Pragma_Inherited): Code cleanup. This attribute applies
1859 (Write_Field9_Name): Remove the output for Part_Of_Constituents.
1860 (Write_Field10_Name): Add output for Part_Of_Constituents.
1861 (Write_Field30_Name): Add output for Anonymous_Object.
1862 (Write_Field34_Name): Output SPARK_Pragma
1863 for protected types and variables.
1864 * einfo.ads: New attributes Anonymous_Object and
1865 Is_Synchronized_State along with usage in entities. Update
1866 the documentation of attributes Contract Encapsulating_State
1867 Part_Of_Constituents SPARK_Aux_Pragma SPARK_Aux_Pragma_Inherited
1868 SPARK_Pragma SPARK_Pragma_Inherited (Anonymous_Object): New
1869 routine along with pragma Inline.
1870 (Is_Synchronized_State): New routine.
1871 (Set_Anonymous_Object): New routine along with pragma Inline.
1872 * freeze.adb (Freeze_Record_Type): Ensure that a non-synchronized
1873 record does not have synchronized components.
1874 * sem_ch3.adb (Analyze_Declarations): Code cleanup. Analyze the
1875 contract of protected units.
1876 * sem_ch9.adb Add with and use clauses for Sem_Prag. Code cleanup.
1877 (Analyze_Single_Protected_Declaration): Reimplemented.
1878 (Analyze_Single_Task_Declaration): Reimplemented.
1879 * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect Part_Of
1880 can now apply to a single concurrent type declaration. Rely on
1881 Insert_Pragma to place the pragma. Update the error message on
1882 usage to reflect the new context.
1883 (Insert_Pragma): When inserting
1884 pragmas for a protected or task type, create a definition if
1886 * sem_elab.adb (Check_A_Call): Code cleanup. Issue error message
1887 related to elaboration issues for SPARK when SPARK_Mode is "on"
1888 and the offending entity comes from source.
1889 * sem_prag.adb (Analyze_Abstract_State): Add new flag
1890 Synchronous_Seen. Update the analysis of simple options Externa,
1891 Ghost and Synchronous. Update various error messages to reflect
1892 the use of single concurrent types.
1893 (Analyze_Depends_Global): Pragmas Depends and Global can now apply to
1894 a single task type or a single concurrent object created for a task
1896 (Analyze_Depends_In_Decl_Part): Do not push a scope when the
1897 context is a single concurrent object. (Analyze_Part_Of):
1898 Moved out of Analyze_Pragma. The routine has a new profile
1899 and comment on usage.
1900 (Analyze_Part_Of_In_Decl_Part): New routine.
1901 (Analyze_Part_Of_Option): Update the call to Analyze_Part_Of.
1902 (Analyze_Pragma): Pragma Abstract_State can
1903 now carry simple option Synchronous. Pragma Part_Of can now
1904 apply to a single concurrent type declaration. The analysis
1905 of pragma Part_Of is delayed when the context is a single
1907 (Analyze_Refined_Depends_In_Decl_Part): Use the anonymous object when
1908 the context is a single concurren type.
1909 (Analyze_Refined_Global_In_Decl_Part): Use the
1910 anonymous object when the context is a single concurren type.
1911 (Check_Ghost_Constituent): Removed.
1912 (Check_Matching_Constituent): Renamed to Match_Constituent.
1913 (Check_Matching_State): Renamed to Match_State.
1914 (Collect_Constituent): Update the comment
1915 on usage. Verify various legality rules related to ghost and
1916 synchronized entities.
1917 (Find_Related_Declaration_Or_Body): A single task declaration is no
1918 longer a valid context for a pragma.
1919 (Fix_Msg): Moved to Sem_Util.
1920 (Process_Overloadable): Add processing for single task objects.
1921 (Process_Visible_Part): Add processing for single concurrent
1923 (Relocate_Pragmas_To_Anonymous_Object): New routine.
1924 * sem_prag.ads Add new table Pragma_On_Anonymous_Object_OK.
1925 (Analyze_Part_Of_In_Decl_Part): New routine.
1926 (Relocate_Pragmas_To_Anonymous_Object): New routine.
1927 * sem_util.adb (Defining_Entity): Code cleanup.
1928 (Fix_Msg): Moved from Sem_Prag and augmented to handle
1930 (Has_Full_Default_Initialization): New routine.
1931 (Is_Descendant_Of_Suspension_Object): Moved out of
1932 Is_Effectively_Volatile.
1933 (Is_Single_Concurrent_Object): New routine.
1934 (Is_Single_Concurrent_Type): New routine.
1935 (Is_Single_Concurrent_Type_Declaration): New routine.
1936 (Is_Synchronized_Object): New routine.
1937 (Yields_Synchronized_Object): New routine.
1938 * sem_util.ads (Fix_Msg): Moved form Sem_Prag. Update the
1940 (Has_Full_Default_Initialization): New routine.
1941 (Is_Single_Concurrent_Object): New routine.
1942 (Is_Single_Concurrent_Type): New routine.
1943 (Is_Single_Concurrent_Type_Declaration): New routine.
1944 (Is_Synchronized_Object): New routine.
1945 (Yields_Synchronized_Object): New routine.
1946 * snames.ads-tmpl: Add name Synchronous.
1948 2015-10-26 Jerome Lambourg <lambourg@adacore.com>
1950 * sysdep.c (__gnat_get_task_options): Refine the workaround for
1951 the VX_USR_TASK_OPTION bug in VxWorks 7, as we cannot check the
1952 value of VX_DEALLOC_TCB in RTP mode, the macro value not being
1953 defined in the headers.
1954 * g-arrspl.ads: Fix typo.
1956 2015-10-26 Jerome Lambourg <lambourg@adacore.com>
1958 * sysdep.c (__gnat_get_task_options): Workaround a VxWorks
1959 bug where VX_DEALLOC_TCB task option is forbidden when calling
1960 taskCreate but allowed in VX_USR_TASK_OPTIONS.
1962 2015-10-26 Javier Miranda <miranda@adacore.com>
1964 * exp_unst.ads, exp_unst.adb (Is_Uplevel_Referenced): New subprogram.
1966 2015-10-26 Ed Schonberg <schonberg@adacore.com>
1968 * sem_ch4.adb (Constant_Indexing_OK): New predicate, subsidiary
1969 of Try_Container_Indexing, that implements the name resolution
1970 rules given in RM 4.1.6 (13-15).
1972 2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
1974 * sem_ch3.adb, sem_util.adb: Minor reformatting.
1976 2015-10-26 Javier Miranda <miranda@adacore.com>
1978 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Return False when
1980 * sem_ch3.adb: Fix typos.
1982 2015-10-26 Bob Duff <duff@adacore.com>
1984 * sem_ch13.adb (Build_Predicate_Functions): Change the
1985 structure of the predicate functions to reflect the requirements
1987 (Add_Condition): New procedure to do the "and-then-ing" in Add_Call
1989 * einfo.ads (Static_Real_Or_String_Predicate): Change the
1990 documentation to reflect the new structure.
1991 * sem_eval.adb (Real_Or_String_Static_Predicate_Matches):
1992 Change the walking of the predicate expression to reflect the
1994 * exp_util.adb: Minor comment fix.
1996 2015-10-26 Bob Duff <duff@adacore.com>
1998 * s-rident.ads (No_Dynamic_Sized_Objects): New restriction name.
1999 * sem_util.ads, sem_util.adb (All_Composite_Constraints_Static):
2000 New function to check that all relevant constraints are static.
2001 * sem_aggr.adb (Resolve_Array_Aggregate): Call
2002 All_Composite_Constraints_Static on the bounds of named array
2004 * sem_ch3.adb (Analyze_Subtype_Declaration): Call
2005 All_Composite_Constraints_Static if the type is composite and
2006 the subtype is constrained.
2008 2015-10-26 Javier Miranda <miranda@adacore.com>
2010 * exp_ch6.adb (Expand_N_Subprogram_Declaration): Skip the frontend
2011 transformation of functions that return a constrained array into
2012 a procedure when they are unchecked_conversion instances.
2014 2015-10-26 Gary Dismukes <dismukes@adacore.com>
2016 * s-os_lib.ads: Minor reformatting/rewording.
2018 2015-10-26 Arnaud Charlet <charlet@adacore.com>
2020 * debug.adb: Introduce debug flag -gnatd.5.
2022 2015-10-26 Pascal Obry <obry@adacore.com>
2024 * s-os_lib.ads, s-os_lib.adb (Kill): New routine. This routine
2025 makes visible support for killing processes in expect.c.
2026 * expect.c (__gnat_kill): Removed from here.
2027 * adaint.c (__gnat_kill): Added here to be usable in the compiler
2029 * make.adb (Sigint_Intercepted): Use the Kill routine from
2032 2015-10-26 Arnaud Charlet <charlet@adacore.com>
2034 * einfo.ads, einfo.adb, exp_unst.adb (Needs_Typedef,
2035 Set_Needs_Typedef): Removed, no longer used.
2037 2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
2039 * einfo.adb (First_Component): Update the assertion to allow
2040 for concurrent types.
2041 (First_Component_Or_Discriminant): Update the assertion to allow for
2043 * einfo.ads: Update the documentation of attributes First_Component
2044 and First_Component_Or_Discriminant along with uses in entities.
2046 2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
2048 * sem_res.adb (Resolve_Actuals): An effectively
2049 volatile object may act as an actual when the corresponding
2050 formal is of a non-scalar effectively volatile type, not just
2051 a non-scalar volatile type.
2053 2015-10-26 Bob Duff <duff@adacore.com>
2055 * sinfo.ads, sem_util.ads: Update comments.
2057 2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
2059 * sem_prag.adb (Analyze_Refined_Depends_Global_Post): When dealing with
2060 protected entries or protected subprograms, use the enclosing protected
2061 type to ensure that the protected type declaration is declared
2062 in a package spec. Remove an obsolete attempt to ensure the
2063 aggregate for of pragma Refined_State as this routine is never
2064 called in that case.
2066 2015-10-26 Ed Schonberg <schonberg@adacore.com>
2068 * exp_ch5.adb (Expand_Iterator_Loop_Over_Container): For
2069 an element iterator loop, the element is a constant if the
2070 container object is a constant, even if the container type has
2071 a Variable_Indexing aspect.
2073 2015-10-26 Bob Duff <duff@adacore.com>
2075 * s-fileio.adb (Fopen_Mode): Use "r+" for Out_File/Stream_IO,
2076 so the file won't be truncated on 'fopen', as required by
2079 2015-10-26 Bob Duff <duff@adacore.com>
2081 * gnat1drv.adb, prj.adb, sem_ch6.adb, s-regpat.adb,
2082 sem_prag.adb: Fix typos.
2083 * einfo.ads, restrict.ads: Minor comment fixes.
2084 * err_vars.ads, sem_util.adb, errout.ads: Code clean up.
2086 2015-10-26 Ed Schonberg <schonberg@adacore.com>
2088 * sem_ch5.adb (Analyze_Assignment): Do not check that the
2089 Left-hand side is legal in an inlined body, check is done on
2090 the original template.
2092 2015-10-26 Ed Schonberg <schonberg@adacore.com>
2094 * exp_util.ads, exp_util.adb (Find_Primitive_Operations): New
2095 subprogram to retrieve by name the possibly overloaded set of
2096 primitive operations of a type.
2097 * sem_ch4.adb (Try_Container_Indexing): Use
2098 Find_Primitive_Operations to handle overloaded indexing operations
2101 2015-10-26 Arnaud Charlet <charlet@adacore.com>
2103 * osint-c.ads: Minor comment update.
2105 2015-10-26 Arnaud Charlet <charlet@adacore.com>
2107 * s-osinte-hpux.ads, s-osinte-aix.ads, s-osinte-solaris-posix.ads,
2108 s-osinte-darwin.ads, s-osinte-android.ads, s-osinte-freebsd.ads,
2109 s-taprop-posix.adb (Get_Page_Size): C function returns an int. Adjust
2110 callers accordingly.
2112 2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
2114 * exp_ch4.adb (Is_OK_Object_Reference): New routine.
2115 (Substitute_Valid_Check): Perform the 'Valid subsitution but do
2116 not suggest the use of the attribute if the left hand operand
2117 does not denote an object as it leads to illegal code.
2119 2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
2121 * exp_unst.adb: Minor reformatting.
2123 2015-10-26 Ed Schonberg <schonberg@adacore.com>
2125 * sem_ch6.adb: Improve error msg.
2127 2015-10-26 Ed Schonberg <schonberg@adacore.com>
2129 * sem_disp.adb (Check_Controlling_Type): Handle properly the
2130 case of an incomplete type whose full view is tagged, when a
2131 primitive operation of the type is declared between the two views.
2133 2015-10-26 Bob Duff <duff@adacore.com>
2135 * adaint.c (__gnat_locate_exec_on_path): If the PATH environment
2136 variable is not set, do not return NULL, because we can still find
2137 the executable if it includes a directory name.
2139 2015-10-26 Ed Schonberg <schonberg@adacore.com>
2141 * sem_elab.adb (Elab_Warning): Under dynamic elaboration, when
2142 elaboration warnings are enabled, emit proper warning header
2143 when triggered by an access attribute.
2145 2015-10-26 Steve Baird <baird@adacore.com>
2147 * exp_ch11.adb: If CodePeer_Mode is true, generate simplified
2148 SCIL for exception declarations.
2149 * exp_ch11.adb (Expand_N_Exception_Declaration) If CodePeer_Mode
2150 is True, initialize the Full_Name component of the exception
2151 record to null instead of to the result of an unchecked
2154 2015-10-26 Ed Schonberg <schonberg@adacore.com>
2156 * exp_unst.adb (Note_Uplevel_Ref) : Handle properly a reference
2157 that denotes a function returning a constrained array, that has
2158 been rewritten as a procedure.
2159 * makeutl.ads: Minor edit.
2161 2015-10-26 Yannick Moy <moy@adacore.com>
2163 * lib-xref-spark_specific.adb (Traverse_Protected_Declaration): New
2164 procedure for traversal.
2165 (Add_SPARK_Xrefs): Remove debugging code.
2166 (Traverse_Declaration_Or_Statement): Call the new traversal
2169 2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
2171 * sem_prag.adb (Analyze_Pragma): Pragma
2172 Extensions_Visible can now appear on an abstract subprogram
2175 2015-10-26 Yannick Moy <moy@adacore.com>
2177 * lib-xref-spark_specific.adb (Add_SPARK_Xrefs): Use character 'r' to
2178 denote a reference to a constant which may have variable input, and
2179 thus may be treated as a variable in GNATprove, instead of the
2180 character 'c' used for constants.
2182 2015-10-26 Ed Schonberg <schonberg@adacore.com>
2184 * sem_util.adb (Object_Access_Level): Only aliased formals of
2185 functions have the accessibility level of the point of call;
2186 aliased formals of procedures have the same level as unaliased
2188 (New_Copy_Tree): Add guard on copying itypes. From code reading.
2190 2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
2192 * inline.adb: Minor reformatting.
2194 2015-10-26 Yannick Moy <moy@adacore.com>
2196 * get_spark_xrefs.adb (get_SPARK_Xrefs): Remove obsolete
2198 * lib-xref-spark_specific.adb (Traverse_Declaration_Or_Statement):
2199 New procedure to factor duplicated code and add
2200 treatment of protected entries.
2201 (Add_SPARK_Scope, Traverse_Declarations_Or_Statements): Call the new
2202 procedure Traverse_Declaration_Or_Statement. Use same character used in
2203 normal xrefs for SPARK xrefs, for a given entity used as scope.
2204 * spark_xrefs.ads Document character used for entries.
2205 * sem_prag.adb (Check_Loop_Pragma_Placement): Account for possible
2206 introduction of declarations and statements by the expansion, between
2207 two otherwise consecutive loop pragmas.
2208 * sem_util.ads, sem_util.adb (Is_Suspension_Object): Lifted from nested
2210 (Is_Descendant_Of_Suspension_Object): nested function lifted.
2212 2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
2214 * sem_attr.adb (Eval_Attribute): Attribute 'Enum_Rep can be folded
2215 when its prefix denotes a constant, an enumeration literal or
2216 an enumeration type. Use the expression of the attribute in the
2217 enumeration type form, otherwise use the prefix to fold.
2219 2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
2221 * aspects.adb Add an entry for entry bodies in table
2222 Has_Aspect_Specifications_Flag.
2223 (Aspects_On_Body_Or_Stub_OK): Entry bodies now allow for certain
2225 * contracts.adb (Add_Contract_Items): Code cleanup. Add
2226 processing for entry bodies, entry declarations and task units.
2227 (Analyze_Subprogram_Body_Contract): Renamed
2228 to Analyze_Entry_Or_Subprogram_Body_Contract. Do not
2229 analyze the contract of an entry body unless annotating the
2231 (Analyze_Subprogram_Contract): Renamed to
2232 Analyze_Entry_Or_Subprogram_Contract. Do not analyze the contract
2233 of an entry declaration unless annotating the original tree.
2234 (Analyze_Task_Contract): New routine.
2235 * contracts.ads (Add_Contract_Item): Update the comment on usage.
2236 (Analyze_Package_Body_Contract): Update comment on usage.
2237 (Analyze_Package_Contract): Update the comment on usage.
2238 (Analyze_Subprogram_Body_Contract): Renamed to
2239 Analyze_Entry_Or_Subprogram_Body_Contract.
2240 (Analyze_Subprogram_Body_Stub_Contract): Update the comment on usage.
2241 (Analyze_Subprogram_Contract): Renamed to
2242 Analyze_Entry_Or_Subprogram_Contract.
2243 (Analyze_Task_Contract): New routine.
2244 * einfo.adb (Contract): Restructure the assertion to include
2245 entries and task units.
2246 (SPARK_Pragma): This attribute now applies to operators.
2247 (SPARK_Pragma_Inherited): This flag now applies to operators.
2248 (Set_Contract): Restructure the assertion to include entries and task
2250 (Set_SPARK_Pragma): This attribute now applies to operators.
2251 (Set_SPARK_Pragma_Inherited): This flag now applies to operators.
2252 (Write_Field34_Name): Write out all Ekinds that have a contract.
2253 (Write_Field40_Name): SPARK_Pragma now applies to operators.
2254 * einfo.ads: Update the documentation of attribute Contract along
2255 with usage in nodes. Update the documentation of attributes
2256 SPARK_Pragma and SPARK_Pragma_Inherited.
2257 * exp_ch6.adb (Freeze_Subprogram): Update the call to
2258 Analyze_Subprogram_Contract.
2259 * par-ch9.adb (P_Entry_Barrier): Do not parse keyword "is" as it
2260 is not part of the entry barrier production.
2261 (P_Entry_Body): Parse the optional aspect specifications. Diagnose
2263 * sem_attr.adb (Analyze_Attribute_Old_Result): Update the call
2264 to Find_Related_Subprogram_Or_Body.
2265 * sem_aux.adb (Unit_Declaration_Node) Add an entry for entry
2266 declarations and bodies.
2267 * sem_ch3.adb (Analyze_Declarations): Analyze the contracts of
2268 entry declarations, entry bodies and task units.
2269 * sem_ch6.adb (Analyze_Generic_Subprogram_Body):
2270 Update the call to Analyze_Subprogram_Body_Contract.
2271 (Analyze_Subprogram_Body_Helper): Update the call to
2272 Analyze_Subprogram_Body_Contract.
2273 * sem_ch9.adb (Analyze_Entry_Body): Analyze the aspect
2274 specifications and the contract.
2275 * sem_ch10.adb (Analyze_Compilation_Unit): Update the call to
2276 Analyze_Subprogram_Contract.
2277 * sem_ch12.adb (Save_References_In_Pragma): Update the call to
2278 Find_Related_Subprogram_Or_Body.
2279 * sem_ch13.adb (Analyze_Aspects_On_Body_Or_Stub): Use
2280 Unique_Defining_Entity rather than rummaging around in nodes.
2281 (Diagnose_Misplaced_Aspects): Update comment on usage. Update the
2282 error messages to accomondate the increasing number of contexts.
2283 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
2284 Update the call to Find_Related_Subprogram_Or_Body.
2285 (Analyze_Depends_Global): Update the call to
2286 Find_Related_Subprogram_Or_Body. Add processing for entry
2288 (Analyze_Depends_In_Decl_Part): Update the call
2289 to Find_Related_Subprogram_Or_Body. Task units have no formal
2290 parameters to install. (Analyze_Global_In_Decl_Part): Update
2291 the call to Find_Related_Subprogram_Or_Body. Task units have no
2292 formal parameters to install.
2293 (Analyze_Global_Item): Use Fix_Msg to handle the increasing number of
2295 (Analyze_Pragma): Update the call to Find_Related_Subprogram_Or_Body.
2296 Perform full analysis when various pragmas appear in an entry body.
2297 (Analyze_Pre_Post_Condition): Update the call to
2298 Find_Related_Subprogram_Or_Body. Perform full analysis when the pragma
2299 appears in an entry body.
2300 (Analyze_Pre_Post_Condition_In_Decl_Part): Update the call to
2301 Find_Related_Subprogram_Or_Body.
2302 (Analyze_Refined_Depends_Global_Post): Update
2303 the call to Find_Related_Subprogram_Or_Body. Use
2304 Fix_Msg to handle the increasing number of contexts.
2305 (Analyze_Refined_Depends_In_Decl_Part): Update
2306 the call to Find_Related_Subprogram_Or_Body. Use
2307 Unique_Defining_Entity to obtain the entity of the
2308 spec. Use Fix_Msg to handle the increasing number of contexts.
2309 (Analyze_Refined_Global_In_Decl_Part): Update the call to
2310 Find_Related_Subprogram_Or_Body. Use Unique_Defining_Entity to obtain
2311 the entity of the spec. Use Fix_Msg to handle the increasing number of
2313 (Analyze_Test_Case_In_Decl_Part): Update the call to
2314 Find_Related_Subprogram_Or_Body.
2315 (Check_Dependency_Clause): Use Fix_Msg to handle the increasing number
2317 (Check_Mode_Restriction_In_Enclosing_Context): Use
2318 Fix_Msg to handle the increasing number of contexts.
2319 (Collect_Subprogram_Inputs_Outputs): Use the refined
2320 versions of the pragmas when the context is an entry body or
2322 (Find_Related_Subprogram_Or_Body): Renamed to
2323 Find_Related_Declaration_Or_Body. Add processing for entries
2325 (Fix_Msg): New routine.
2326 (Role_Error): Use Fix_Msg to handle the increasing number of contexts.
2327 * sem_prag.ads (Find_Related_Subprogram_Or_Body): Renamed to
2328 Find_Related_Declaration_Or_Body. Update the comment on usage.
2329 * sem_util.adb (Is_Entry_Body): New routine.
2330 (Is_Entry_Declaration): New routine.
2331 * sem_util.ads (Is_Entry_Body): New routine.
2332 (Is_Entry_Declaration): New routine.
2334 2015-10-26 Ed Schonberg <schonberg@adacore.com>
2336 * inline.adb (Has_Excluded_Declaration): A subtype declaration
2337 with a predicate aspect generates a subprogram, and therefore
2338 prevents the inlining of the enclosing subprogram.
2339 * osint.ads: Fix typo.
2342 2015-10-26 Ed Schonberg <schonberg@adacore.com>
2344 * sem_case.adb (Check_Choice_Set): Choose initial choice range
2345 below low bound of type, to prevent spurious errors on case
2346 statements whose expressions have an integer subtype with a
2348 * sem_util.ads: Fix typo.
2350 2015-10-26 Ed Schonberg <schonberg@adacore.com>
2352 * exp_ch4.adb (Expand_N_Case_Expression): In the scope of a
2353 predicate function, delay the expansion of the expression only
2354 if the target type has a specified Static_ Predicate aspect,
2355 because the expression is processed later. A dynamic predicate
2356 must be expanded in standard fashion.
2358 2015-10-26 Claire Dross <dross@adacore.com>
2360 * a-nudira.ads: Remove SPARK_Mode as it currently causes an error.
2362 2015-10-26 Arnaud Charlet <charlet@adacore.com>
2364 * sem_aggr.adb, sem_type.adb, sem_ch12.adb, sem_res.adb, sem_ch4.adb,
2365 sem_ch8.adb, exp_aggr.adb, sem_eval.adb, s-fatgen.adb, a-tienio.adb:
2368 2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
2370 * sem_ch13.adb (Analyze_Aspect_Specifications): The processing
2371 for aspects Abstract_State, Ghost, Initial_Condition, Initializes
2372 and Refined_State no longer have to take SPARK_Mode into account.
2373 (Insert_After_SPARK_Mode): Removed.
2374 (Insert_Pragma): Update profile and comment on usage. The routine can
2375 now insert a pragma after the "header" of an instance.
2376 * sem_prag.adb (Analyze_If_Available): New routine.
2377 (Analyze_Pragma): Do not reset the Analyzed flag of various
2378 SPARK pragmas as they use the Is_Analyzed_Pragma attribute to
2379 avoid reanalysis. Various pragmas now trigger the analysis
2380 of related pragmas that depend on or are dependent on the
2381 current pragma. Remove the declaration order checks related
2382 to pragmas Abstract_State, Initial_Condition and Initializes.
2383 (Analyze_Pre_Post_Condition): Analyze pragmas SPARK_Mode and
2384 Volatile_Function prior to analyzing the pre/postcondition.
2385 (Check_Declaration_Order): Removed.
2386 (Check_Distinct_Name): Ensure that a potentially duplicated pragma
2387 Test_Case is not the pragma being analyzed.
2388 (Is_Followed_By_Pragma): Removed.
2390 2015-10-26 Ed Schonberg <schonberg@adacore.com>
2392 * sem_ch6.adb: Handle subprogram bodies without previous specs.
2394 2015-10-26 Claire Dross <dross@adacore.com>
2396 * a-nudira.ads: Specify appropriate SPARK_Mode so that the unit
2397 can be used in SPARK code.
2399 2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
2401 * contracts.adb (Analyze_Subprogram_Body_Contract): Do not analyze
2402 pragmas Refined_Global and Refined_Depends because these pragmas
2403 are now fully analyzed when encountered.
2404 (Inherit_Pragma): Update the call to attribute Is_Inherited.
2405 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Add a guard
2406 to prevent reanalysis. Mark the pragma as analyzed at the end of
2408 (Analyze_Depends_Global): New parameter profile
2409 and comment on usage. Do not fully analyze the pragma, this is
2410 now done at the outer level.
2411 (Analyze_Depends_In_Decl_Part): Add a guard to prevent reanalysis.
2412 Mark the pragma as analyzed at the end of the processing.
2413 (Analyze_External_Property_In_Decl_Part): Add a guard to prevent
2414 reanalysis. Mark the pragma as analyzed at the end of the processing.
2415 (Analyze_Global_In_Decl_Part): Add a guard to prevent reanalysis. Mark
2416 the pragma as analyzed at the end of the processing.
2417 (Analyze_Initial_Condition_In_Decl_Part): Add a guard to prevent
2418 reanalysis. Mark the pragma as analyzed at the end of the processing.
2419 (Analyze_Initializes_In_Decl_Part): Add a guard to prevent reanalysis.
2420 Mark the pragma as analyzed at the end of the processing.
2421 (Analyze_Pragma): Reset the Analyzed flag on various pragmas that
2422 require delayed full analysis. Contract_Cases is now analyzed
2423 immediately when it applies to a subprogram body stub. Pragmas Depends,
2424 Global, Refined_Depends and Refined_Global are now analyzed
2425 in pairs when they appear in a subprogram body [stub].
2426 (Analyze_Pre_Post_Condition_In_Decl_Part): Add a guard to
2427 prevent reanalysis. Mark the pragma as analyzed at the end of
2429 (Analyze_Refined_Depends_Global_Post): Update the comment on usage.
2430 (Analyze_Refined_Depends_In_Decl_Part): Add a guard to prevent
2431 reanalysis. Mark the pragma as analyzed at the end of the processing.
2432 (Analyze_Refined_Global_In_Decl_Part): Add a guard to prevent
2433 reanalysis. Mark the pragma as analyzed at the end of the processing.
2434 (Analyze_Refined_State_In_Decl_Part): Add a guard to prevent
2435 reanalysis. Mark the pragma as analyzed at the end of the processing.
2436 (Analyze_Test_Case_In_Decl_Part): Add a guard to prevent reanalysis.
2437 Mark the pragma as analyzed at the end of the processing.
2438 (Is_Followed_By_Pragma): New routine.
2439 * sinfo.adb (Is_Analyzed_Pragma): New routine.
2440 (Is_Inherited): Renamed to Is_Inherited_Pragma.
2441 (Set_Is_Analyzed_Pragma): New routine.
2442 (Set_Is_Inherited): Renamed to Set_Is_Inherited_Pragma.
2443 * sinfo.ads Rename attribute Is_Inherited to Is_Inherited_Pragma
2444 and update occurrences in nodes.
2445 (Is_Analyzed_Pragma): New routine along with pragma Inline.
2446 (Is_Inherited): Renamed to Is_Inherited_Pragma along with pragma Inline.
2447 (Set_Is_Analyzed_Pragma): New routine along with pragma Inline.
2448 (Set_Is_Inherited): Renamed to Set_Is_Inherited_Pragma along
2451 2015-10-26 Ed Schonberg <schonberg@adacore.com>
2453 * par-ch3.adb (P_Component_Items): When style checks are enabled,
2454 apply them to component declarations in a record type declaration
2457 2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
2459 * sem_util.adb (Is_Suspension_Object): Ensure that the scope of "Ada"
2460 is Standard_Standard.
2462 2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
2464 * sem_res.adb (Is_OK_Volatile_Context): A subprogram call is an OK
2465 context for a reference to an effectively volatile object.
2466 (Resolve_Actuals): Add references to SPARK RM.
2467 (Within_Procedure_Call): Removed.
2468 (Within_Subprogram_Call): New routine.
2470 2015-10-26 Ed Schonberg <schonberg@adacore.com>
2472 * sem_ch6.adb (Check_Aggregate_Accessibility): A reference to a
2473 formal parameter in an aggregate does not need an accesibility
2474 check only if the formal is aliased.
2476 2015-10-26 Claire Dross <dross@adacore.com>
2478 * sem_aux.ads (Number_Components): Can return 0 when called on
2481 2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
2483 * contracts.adb (Analyze_Subprogram_Body_Contract): Use
2484 Unique_Defining_Entity instead of Corresponding_Spec_Of.
2485 * einfo.adb SPARK_Pragma and SPARK_Aux_Pragma are now Node40 and
2486 Node41 respectively.
2487 (SPARK_Aux_Pragma): Update the assertion and node querry.
2488 (SPARK_Aux_Pragma_Inherited): Update the assertion and node query.
2489 (SPARK_Pragma): Update the assertion and node query.
2490 (SPARK_Pragma_Inherited): Update the assertion and node query.
2491 (Set_SPARK_Aux_Pragma): Update the assertion and node setting.
2492 (Set_SPARK_Aux_Pragma_Inherited): Update the assertion and node setting.
2493 (Set_SPARK_Pragma): Update the assertion and node setting.
2494 (Set_SPARK_Pragma_Inherited): Update the assertion and node setting.
2495 (Write_Field32_Name): Remove the output for SPARK_Pragma.
2496 (Write_Field33_Name): Remove the output for SPARK_Aux_Pragma.
2497 (Write_Field40_Name): Add output for SPARK_Pragma.
2498 (Write_Field41_Name): Add output for SPARK_Aux_Pragma.
2499 * einfo.ads Rewrite the documentation on attributes
2500 SPARK_Pragma, SPARK_Aux_Pragma, SPARK_Pragma_Inherited and
2501 SPARK_Aux_Pragma_Inherited. Update their uses in nodes.
2502 * exp_ch4.adb (Create_Anonymous_Master): Use
2503 Unique_Defining_Entity instead of Corresponding_Spec_Of.
2504 * exp_ch9.adb (Expand_Entry_Declaration): Mark the barrier
2506 (Expand_N_Task_Body): Mark the task body as such.
2507 (Expand_N_Task_Type_Declaration): Mark the task body as such.
2508 * exp_unst.adb (Visit_Node): Use Unique_Defining_Entity instead
2509 of Corresponding_Spec_Of.
2510 * sem_attr.adb (Analyze_Attribute_Old_Result): Use
2511 Unique_Defining_Entity instead of Corresponding_Spec_Of.
2512 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Entry barrier
2513 functions do not inherit the SPARK_Mode from the context.
2514 (Build_Subprogram_Declaration): The matching spec is now marked
2515 as a source construct to mimic the original stand alone body.
2516 * sem_ch7.adb (Analyze_Package_Body_Helper): Code cleanup.
2517 * sem_ch9.adb Add with and use clauses for Contracts.
2518 (Analyze_Entry_Body): An entry body freezes the contract of
2519 the nearest enclosing package body. The entry body now inherits
2520 the SPARK_Mode from the context.
2521 (Analyze_Entry_Declaration): A protected entry declaration now inherits
2522 the SPARK_Mode from the context.
2523 (Analyze_Protected_Body): A protected body freezes
2524 the contract of the nearest enclosing package body. Set the
2525 Etype of a protected body as this is neede for proper aspect
2526 analysis. Protected bodies can now carry meaningful aspects and
2527 those are now analyzed.
2528 (Analyze_Protected_Type_Declaration): A protected type now inherits the
2529 SPARK_Mode from the context.
2530 (Analyze_Task_Body): A task body freezes the contract of the
2531 nearest enclosing package body. Set the Etype of a task body
2532 as this is needed for proper aspect analysis. A task body
2533 now inherits the SPARK_Mode from the context. Task bodies
2534 can now carry meaningful aspects and those are now analyzed.
2535 (Analyze_Task_Type_Declaration): A task type declaration now
2536 inherits the SPARK_Mode of from the context.
2537 * sem_ch10.adb (Analyze_Protected_Body_Stub): Protected body
2538 stubs can now carry meaningful aspects.
2539 (Analyze_Task_Body_Stub): Task body stubs can now carry meaningful
2541 * sem_ch13.adb (Analyze_Aspect_Specifications): Aspects SPARK_Mode
2542 Warnings now use routine Insert_Pragma as means of insertion into
2544 (Insert_After_SPARK_Mode): Clean up documentation.
2545 (Insert_Pragma): Clean up documentation. The routine is now
2546 capable of operating on synchronized units.
2547 * sem_prag.adb (Add_Entity_To_Name_Buffer): New routine.
2548 (Analyze_Contract_Cases_In_Decl_Part): Use
2549 Unique_Defining_Entity instead of Corresponding_Spec_Of.
2550 (Analyze_Depends_Global): Use Unique_Defining_Entity instead
2551 of Corresponding_Spec_Of.
2552 (Analyze_Depends_In_Decl_Part): Use Unique_Defining_Entity instead of
2553 Corresponding_Spec_Of.
2554 (Analyze_Global_In_Decl_Part): Use Unique_Defining_Entity instead of
2555 Corresponding_Spec_Of.
2556 (Analyze_Pragma): Use Unique_Defining_Entity instead of
2557 Corresponding_Spec_Of.
2558 Update the detection of an illegal pragma Ghost when it applies
2559 to a task or protected unit. Reimplement the handling of
2561 (Analyze_Pre_Post_Condition_In_Decl_Part): Use Unique_Defining_Entity
2562 instead of Corresponding_Spec_Of.
2563 (Analyze_Test_Case_In_Decl_Part): Use Unique_Defining_Entity instead of
2564 Corresponding_Spec_Of.
2565 (Check_Library_Level_Entity): Update the comment on usage.
2566 Reimplemented to offer a more specialized errror context.
2567 (Check_Pragma_Conformance): Update profile and comment on usage.
2568 Handle error message output on single protected or task units.
2569 (Collect_Subprogram_Inputs_Outputs): Use Unique_Defining_Entity
2570 instead of Corresponding_Spec_Of.
2571 (Process_Body): New routine.
2572 (Process_Overloadable): New routine.
2573 (Process_Private_Part): New routine.
2574 (Process_Statement_Part): New routine.
2575 (Process_Visible_Part): New routine.
2576 (Set_SPARK_Context): New routine.
2577 (Set_SPARK_Flags): Removed.
2578 * sem_util.adb (Corresponding_Spec_Of): Removed.
2579 (Unique_Entity): Reimplemented to handle many more cases.
2580 * sem_util.ads (Corresponding_Spec_Of): Removed.
2581 (Unique_Defining_Entity): Update the comment on usage.
2582 * sinfo.ads (Is_Entry_Barrier_Function): Update the assertion.
2583 (Is_Task_Body_Procedure): New routine.
2584 (Set_Is_Entry_Barrier_Function): Update the assertion.
2585 (Set_Is_Task_Body_Procedure): New routine.
2586 * sinfo.adb Update the documentation of attribute
2587 Is_Entry_Barrier_Function along with use in nodes. Add new
2588 attribute Is_Task_Body_Procedure along with use in nodes.
2589 (Is_Task_Body_Procedure): New routine along with pragma Inline.
2590 (Set_Is_Task_Body_Procedure): New routine along with pragma Inline.
2592 2015-10-26 Gary Dismukes <dismukes@adacore.com>
2594 * sem_ch13.adb: Minor reformatting.
2596 2015-10-26 Steve Baird <baird@adacore.com>
2598 * exp_disp.adb: Omit most dispatch table initialization code
2599 if Generate_SCIL is true.
2601 2015-10-26 Arnaud Charlet <charlet@adacore.com>
2603 * sinfo.ads, exp_ch3.adb: Revert previous change.
2604 (Build_Record_Init_Proc): Do not build an aggregate if
2607 2015-10-26 Ed Schonberg <schonberg@adacore.com>
2609 * sem_ch6.adb (Find_Corresponding_Spec): Reject a subprogram
2610 body whose signature is type conformant with a previous expression
2613 2015-10-26 Bob Duff <duff@adacore.com>
2615 * treepr.adb: Code clean up.
2617 2015-10-26 Eric Botcazou <ebotcazou@adacore.com>
2619 * freeze.adb (Check_Component_Storage_Order): Skip a record
2620 component if it has Complex_Representation.
2621 (Freeze_Record_Type): If the type has Complex_Representation, skip the
2622 regular treatment of Scalar_Storage_Order attribute and instead issue
2623 a warning if it is present.
2625 2015-10-26 Bob Duff <duff@adacore.com>
2627 * sem_ch13.adb (Check_Iterator_Functions): For a Default_Iterator
2628 aspect, make sure an implicitly declared interpretation is
2629 overridden by an explicit one.
2630 * sem_util.ads: Update comment.
2632 2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
2634 * sem_ch7.adb, sem_ch6.adb (Analyze_Subprogram_Body_Helper): Only source
2635 bodies should "freeze" the contract of the nearest enclosing
2638 2015-10-26 Joel Brobecker <brobecker@adacore.com brobecker>
2640 * adaint.c (__gnat_lwp_self): Replace current implementation re-using
2641 the Linux one, which uses an __NR_gettid syscall rather than
2644 2015-10-26 Arnaud Charlet <charlet@adacore.com>
2646 * sinfo.ads, exp_ch3.adb (Build_Array_Init_Proc,
2647 Build_Record_Init_Proc): Do not inline init procs when
2648 Modify_Tree_For_C is True.
2650 2015-10-26 Bob Duff <duff@adacore.com>
2652 * errout.ads: Minor comment fix.
2653 * einfo.ads: Minor style fix.
2655 2015-10-26 Bob Duff <duff@adacore.com>
2657 * sem_ch3.adb (Derive_Interface_Subprogram): Fix
2658 Is_Abstract_Subprogram, which might have been calculated
2659 incorrectly, because we're passing Ultimate_Alias (Subp) (and
2660 its dispatching type) to Derive_Subprogram, instead of the true
2661 parent subprogram and type.
2663 2015-10-26 Bob Duff <duff@adacore.com>
2665 * sem_ch13.adb (Check_Iterator_Functions): When
2666 printing the "default iterator must be unique" error message,
2667 also print references to the places where the duplicates are
2668 declared. This makes the message clearer.
2670 2015-10-26 Ed Schonberg <schonberg@adacore.com>
2672 * sem_ch12.adb (Analyze_Formal_Package_Declaration): Do not set
2673 Box_Present when the formal part is (others => <>) even though
2674 it is equivalent to a formal part (<>), because ASIS tools depend
2675 on the syntactic setting of this flag.
2677 2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
2679 * sem_ch13.adb: Minor reformatting.
2680 * einfo.ads: Minor typo.
2682 2015-10-26 Joel Brobecker <brobecker@adacore.com brobecker>
2684 * adaint.c (__gnat_open_new_temp): Use mkstemp on Android.
2686 2015-10-26 Ed Schonberg <schonberg@adacore.com>
2688 * sem_ch12.adb (Analyze_Formal_Package_Declaration): Code clean up.
2689 * sem_ch13.adb (Check_Inherited_Indexing): New inner procedure
2690 of Check_Indexing_Functions, to verify that a derived type with an
2691 Indexing aspect is not inheriting such an aspect from an ancestor.
2692 (Check_Indexing_Functions): Call Check_Inherited_Indexing within
2695 2015-10-26 Gary Dismukes <dismukes@adacore.com>
2697 * a-reatim.adb, contracts.adb, contracts.ads: Minor reformatting and
2700 2015-10-26 Ed Schonberg <schonberg@adacore.com>
2702 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Do not
2703 recheck the consistency betwen the freeze point and the end of
2704 declarations for the expression in an aspect specification,
2705 because it was done already in the analysis of the generic.
2706 Furthermore, the delayed analysis of an aspect of the instance
2707 may produce spurious errors when the generic is a child unit
2708 that references entities in the parent (which might not be in
2709 scope at the freeze point of the instance).
2711 2015-10-26 Yannick Moy <moy@adacore.com>
2713 * sem_res.adb (Resolve_Call): Issue info message
2714 instead of warning when call cannot be inlined in GNATprove mode.
2716 2015-10-26 Arnaud Charlet <charlet@adacore.com>
2718 * exp_ch6.adb (Build_Procedure_Form): Use _result as the
2719 name of the extra parameter, cleaner than a random temp name.
2720 * gnat1drv.adb (Gnat1drv): Code clean up.
2722 2015-10-24 Eric Botcazou <ebotcazou@adacore.com>
2724 * gcc-interface/utils2.c (build_binary_op): Tweak formatting.
2725 (build_unary_op): Likewise.
2727 2015-10-23 Arnaud Charlet <charlet@adacore.com>
2729 * gnat_rm.texi, gnat_ugn.texi: Regenerate.
2730 * doc/share/ada_pygments.py, doc/gnat_ugn/gnat_project_manager.rst,
2731 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
2732 doc/gnat_ugn/gnat_and_program_execution.rst,
2733 doc/gnat_rm/implementation_defined_attributes.rst,
2734 doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
2735 doc/gnat_rm/representation_clauses_and_pragmas.rst,
2736 doc/gnat_rm/implementation_defined_pragmas.rst,
2737 doc/gnat_rm/about_this_guide.rst,
2738 doc/gnat_rm/implementation_of_ada_2012_features.rst,
2739 doc/gnat_rm/implementation_of_specific_ada_features.rst,
2740 doc/gnat_rm/implementation_defined_aspects.rst,
2741 doc/gnat_rm/implementation_advice.rst: Update documentation.
2743 2015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
2745 * contracts.ads, contracts.adb: New unit.
2746 * exp_ch6.adb Add with and use clauses for Contracts.
2747 (Expand_Subprogram_Contract): Moved to Contracts.
2748 * exp_ch6.ads (Expand_Subprogram_Contract): Moved to Contracts.
2749 * sem_ch3.adb Add with and use clauses for Contracts.
2750 (Analyze_Object_Contract): Moved to Contracts.
2751 (Analyze_Declarations): Remove local variable Pack_Decl. Do not
2752 capture global references in contracts. Check the hidden states
2754 * sem_ch6.adb Add with and use clauses in Contracts.
2755 (Analyze_Generic_Subprogram_Body): Do not capture global
2756 references in contracts.
2757 (Analyze_Subprogram_Body_Contract):
2759 (Analyze_Subprogram_Body_Helper): Freeze the
2760 contract of the nearest enclosing package body. Always analyze
2761 the subprogram body contract. Do not expand the subprogram
2763 (Analyze_Subprogram_Contract): Moved to Contracts.
2764 * sem_ch6.ads (Analyze_Subprogram_Body_Contract): Moved to Contracts.
2765 (Analyze_Subprogram_Contract): Moved to Contracts.
2766 * sem_ch7.adb Add with and use clauses for Contracts.
2767 (Analyze_Package_Body_Contract): Moved to Contracts.
2768 (Analyze_Package_Body_Helper): Freeze the contract of the
2769 nearest enclosing package body.
2770 (Analyze_Package_Contract): Moved to Contracts.
2771 * sem_ch7.ads (Analyze_Package_Body_Contract): Moved to Contracts.
2772 (Analyze_Package_Contract): Moved to Contracts.
2773 * sem_ch10.adb Add with and use clauses for Contracts.
2774 (Analyze_Compilation_Unit): Do not capture global references
2776 (Analyze_Subprogram_Body_Stub_Contract): Moved to Contracts.
2777 * sem_ch10.ads (Analyze_Subprogram_Body_Stub_Contract): Moved
2779 * sem_ch12.adb Add with and use clauses for Contracts.
2780 (Analyze_Subprogram_Instantiation): Update the call to
2781 Instantiate_Subprogram_Contract.
2782 (Instantiate_Package_Body):
2783 Do not copy the entity of the spec when creating an entity
2784 for the body. Construct a brand new defining identifier for
2785 the body and inherit the Comes_From_Source flag from the spec.
2786 (Instantiate_Subprogram_Body): Remove Anon_Id to Act_Decl_Id
2787 and update all occurrences. Construct a brand new defining
2788 identifier for the body and inherit the Comes_From_Source
2790 (Instantiate_Subprogram_Contract): Moved
2792 (Save_Global_References_In_Aspects): Moved to
2793 the spec of Sem_Ch12.
2794 (Save_Global_References_In_Contract):
2796 * sem_ch12.ads (Save_Global_References_In_Aspects): Moved from
2797 the body of Sem_Ch12.
2798 (Save_Global_References_In_Contract):
2800 * sem_prag.adb Add with and use clauses for Contracts.
2801 (Add_Item): Removed. All references to this routine have been
2802 replaced with calls to Append_New_Elmt.
2803 (Analyze_Constituent):
2804 Add special diagnostics for errors caused by freezing of
2806 (Analyze_Refined_State_In_Decl_Part): Add formal
2807 parameter Freeze_Id. Add new global variable Freeze_Posted.
2808 (Collect_Body_States): Removed.
2809 (Report_Unused_States): Removed.
2810 * sem_prag.ads (Analyze_Defined_State_In_Decl_Part): Add formal
2811 parameter Freeze_Id and update comment on usage.
2812 * sem_util.adb Remove with and use clauses for
2814 (Add_Contract_Item): Moved to Contracts.
2815 (Check_Unused_Body_States): New routine.
2816 (Collect_Body_States):
2818 (Create_Generic_Contract): Moved to Contracts.
2819 (Inherit_Subprogram_Contract): Moved to Contracts.
2820 (Report_Unused_Body_States): New routine.
2821 * sem_util.ads (Add_Contract_Item): Moved to Contracts.
2822 (Check_Unused_Body_States): New routine.
2823 (Collect_Body_States): New routine.
2824 (Create_Generic_Contract): Moved to Contracts.
2825 (Inherit_Subprogram_Contract): Moved to Contracts.
2826 (Report_Unused_Body_States): New routine.
2827 * sinfo.adb (Is_Expanded_Contract): New routine.
2828 (Set_Is_Expanded_Contract): New routine.
2829 * sinfo.ads New attribute Is_Expanded_Contract along with
2831 (Is_Expanded_Contract): New routine along
2833 (Set_Is_Expanded_Contract): New routine
2834 along with pragma Inline.
2835 * gcc-interface/Make-lang.in: Add entry for contracts.o
2837 2015-10-23 Bob Duff <duff@adacore.com>
2839 * bindgen.adb, init.c, opt.ads, switch-b.adb: Implement new -Ea and
2841 * switch-b.ads: Minor comment fix.
2842 * bindusg.adb: Document new -Ea and -Es switches.
2843 * s-exctra.ads: Use -Es instead of -E.
2845 2015-10-23 Tristan Gingold <gingold@adacore.com>
2847 * gcc-interface/utils2.c (build_call_alloc_dealloc): Check no implicit
2848 task and protected object restrictions.
2850 2015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
2852 * sem_ch12.adb, exp_ch6.adb: Minor reformatting.
2854 2015-10-23 Gary Dismukes <dismukes@adacore.com>
2856 * exp_ch6.adb: Minor reformatting.
2858 2015-10-23 Ed Schonberg <schonberg@adacore.com>
2860 * sem_ch12.adb (Check_Formal_Packages): A formal package whose
2861 actual part is (others => <>) os identical to a formal package
2862 with an actual part written as (<>).
2864 2015-10-23 Arnaud Charlet <charlet@adacore.com>
2866 * a-reatim.adb ("/"): For Time_Span division convert the operands
2867 to integers and then use integer division, which conforms to
2868 the rounding required by Ada RM.
2870 2015-10-23 Ed Schonberg <schonberg@adacore.com>
2872 * sem_ch6.adb (Check_Missing_Return): Do not report a missing
2873 return statement on a function body constructed to complete a
2874 package body for a premature instantiation.
2876 2015-10-23 Ed Schonberg <schonberg@adacore.com>
2878 * exp_ch6.adb (Build_Procedure_Body_Form): Replace body of
2879 original function with that of generated procedure, to simplify
2880 processing and avoid scoping problems with local declarations.
2881 (Rewrite_Function_Call_For_C): Handle properly the case of a
2882 parameterless function.
2884 2015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
2886 * a-exextr.adb, sem_ch6.adb, sem_ch13.adb: Minor reformatting.
2888 2015-10-23 Arnaud Charlet <charlet@adacore.com>
2890 * s-taskin.ads: Minor code clean up.
2891 (Ada_Task_Control_Block): Move fixed size field before variable sized
2893 * einfo.ads: Minor editing.
2895 2015-10-23 Ed Schonberg <schonberg@adacore.com>
2897 * sem_ch6.adb (Check_Aggregate_Accessibility): Apply rule in RM
2898 6.5 (8.3) to verify that access discriminants in an aggregate
2899 in a return statement have the proper accessibility, i.e. do
2900 not lead to dangling references.
2902 2015-10-23 Eric Botcazou <ebotcazou@adacore.com>
2904 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Add missing
2905 test on Address_Clause_Overlay_Warnings to the "constant overlays
2906 variable" warning. For the reverse case, also issue a warning if
2907 the modification is potentially made through the initialization
2910 2015-10-23 Jose Ruiz <ruiz@adacore.com>
2912 * a-exetim-posix.adb (Clock): Use the pthread_getcpuclockid
2913 function to have access to CPU clocks for tasks other than the
2916 2015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
2918 * debug.adb: Switch -gnatd.5 is no longer in use, remove the
2919 associated documentation.
2920 * exp_dbug.adb (Get_External_Name): Do not add a special prefix
2921 for ignored Ghost entities or when switch -gnatd.5 is enabled.
2922 * exp_dbug.ads Remove the documentation concerning the encoding
2923 of ignored Ghost entities.
2925 2015-10-23 Bob Duff <duff@adacore.com>
2927 * a-exextr.adb (Notify_Exception): For Unhandled_Raise_In_Main,
2928 mimic the output from Ada.Exceptions.Last_Chance_Handler; don't
2929 print "Exception raised".
2930 * s-stalib.ads, s-exctra.ads, s-exctra.adb: Add
2931 Unhandled_Raise_In_Main to types Exception_Trace_Kind/Trace_Kind.
2933 2015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
2935 * exp_attr.adb, freeze.adb, sem_attr.adb, exp_aggr.adb,
2936 gnatname.adb: Minor reformatting.
2938 2015-10-23 Steve Baird <baird@adacore.com>
2940 * a-cbdlli.ads, a-cbhama.ads, a-cbhase.ads, a-cbmutr.ads,
2941 a-cborma.ads, a-cborse.ads, a-cbprqu.ads, a-cbsyqu.ads,
2942 a-cdlili.ads, a-cfdlli.ads, a-cfhama.ads, a-cfhase.ads,
2943 a-cfinve.ads, a-cforma.ads, a-cforse.ads, a-cidlli.ads,
2944 a-cihama.ads, a-cihase.ads, a-cimutr.ads, a-ciorma.ads,
2945 a-ciormu.ads, a-ciorse.ads, a-coboho.ads, a-cobove.ads,
2946 a-cofove.ads, a-cohama.ads, a-cohase.ads, a-coinho.ads,
2947 a-coinho-shared.ads, a-coinve.ads, a-comutr.ads, a-conhel.ads,
2948 a-convec.ads, a-coorma.ads, a-coormu.ads, a-coorse.ads,
2949 a-cuprqu.ads, a-cusyqu.ads, a-rbtgbo.ads: Add spec Annotate
2951 * a-cbdlli.adb, a-cbhama.adb, a-cbhase.adb, a-cbmutr.adb,
2952 a-cborma.adb, a-cborse.adb, a-cbprqu.adb, a-cbsyqu.adb,
2953 a-cdlili.adb, a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb,
2954 a-cfinve.adb, a-cforma.adb, a-cforse.adb, a-cidlli.adb,
2955 a-cihama.adb, a-cihase.adb, a-cimutr.adb, a-ciorma.adb,
2956 a-ciormu.adb, a-ciorse.adb, a-coboho.adb, a-cobove.adb,
2957 a-cofove.adb, a-cohama.adb, a-cohase.adb, a-coinho.adb,
2958 a-coinho-shared.adb, a-coinve.adb, a-comutr.adb, a-conhel.adb,
2959 a-convec.adb, a-coorma.adb, a-coormu.adb, a-coorse.adb,
2960 a-cuprqu.adb, a-cusyqu.adb, a-rbtgbo.adb: Remove body Annotate
2963 2015-10-23 Vincent Celier <celier@adacore.com>
2965 * gnatname.adb: When gnatname is invoked with a project file,
2966 specified with switch -P, if gprname is available, gnatname will
2967 invoke gprname, with the target if it is a cross gnatname.
2969 2015-10-23 Arnaud Charlet <charlet@adacore.com>
2971 * exp_ch4.adb: Fix typo.
2972 * exp_ch6.adb: Update comment.
2973 * exp_attr.adb (Expand_Min_Max_Attribute): Simplify expansion.
2974 * exp_aggr.adb (Convert_To_Positional): Only convert to
2975 positional when generating C in case of an object declaration.
2976 (In_Object_Declaration): New.
2977 (Late_Expansion): Adapt to trees generated by Modify_Tree_For_C.
2978 * sinfo.ads: Update documentation.
2980 2015-10-23 Joel Brobecker <brobecker@adacore.com brobecker>
2982 * sigtramp.h (struct sigcontext, struct ucontext): Remove declarations,
2983 and replace them by include of corresponding header file.
2985 2015-10-23 Bob Duff <duff@adacore.com>
2987 * a-convec.adb (Copy): Make sure C is initialized
2988 on all paths, including when Checks is False.
2990 2015-10-23 Eric Botcazou <ebotcazou@adacore.com>
2992 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Remove
2993 error as unreachable.
2995 2015-10-23 Arnaud Charlet <charlet@adacore.com>
2997 * gnat1drv.adb (Adjust_Global_Switches): Adjust.
2999 2015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
3001 * exp_dbug.ads, exp_dbug.adb (Get_External_Name): The special prefix for
3002 ignored Ghost entities is now ___ghost_.
3004 2015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
3006 * ghost.adb (Is_Subject_To_Ghost): Check the
3007 original node when searching for pragma Ghost to catch cases
3008 where a source construct has been rewritten into something else.
3010 2015-10-23 Ed Schonberg <schonberg@adacore.com>
3012 * einfo.ads, einfo.adb (Rewritten_For_C): New flag on functions
3013 that return a constrained array type. When generating C these
3014 functions are rewritten as procedures with an out parameter,
3015 and calls to such functions are rewritten accordingly.
3016 * exp_ch6.adb (Expand_N_Subprogram_Declaration): When
3017 Modify_Tree_For_C is set and the function returns a constrained
3018 array type, generate a procedure declaration with an additional
3019 out parameter. Mark original function as Rewritten_For_C.
3020 The new declaration is inserted in tree immediately after
3021 current declaration.
3022 (Expand_Subprogram_Body): If entity is marked Rewritten_For_C,
3023 generate body of corresponding procedure using declarations
3024 and statements for function body. Replace return statements
3025 with assignments to the out parameter, followed by a simple
3027 (Rewrite_Function_Call_For_C): New procedure to replace a function
3028 call that returns an array by a procedure call.
3030 2015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
3032 * sem_util.adb (Denotes_Iterator): New routine.
3033 (Is_Iterator): Code cleanup. Factor out the detection of a
3034 predefined iterator. As a result this fixes a missing case
3035 where a tagged type implements interface Reversible_Iterator.
3037 2015-10-23 Ed Schonberg <schonberg@adacore.com>
3039 * sem_attr.adb (Eval_Attribute): Constant-fold 'Enabled if
3040 not within a generic unit, even if expander is not active, so
3041 that instances of container packages remain preelaborable in
3044 2015-10-23 Tristan Gingold <gingold@adacore.com>
3046 * init.c (__gnat_sigtramp): New assembly function for arm64-darwin.
3047 (__gnat_error_handler): Use trampoline for arm64.
3049 2015-10-23 Ed Schonberg <schonberg@adacore.com>
3051 * exp_ch3.adb (Expand_N_Object_Declaration): if the type of the
3052 object is a class-wide limited interface type, the expression
3053 is not restricted to the forms specified for limited types.
3055 2015-10-23 Vincent Celier <celier@adacore.com>
3057 * gnatname.adb: Code clean up.
3058 * s-taasde.ads: Fix comment.
3060 2015-10-23 Ed Schonberg <schonberg@adacore.com>
3062 * sem_util.adb (Is_Iterator, Is_Reversible_iterator): Use
3063 root type to determine whether the type is a descendant of the
3064 corresponding interface type, so take into account multiple
3065 levels of subtypes and derivations.
3067 2015-10-23 Olivier Hainque <hainque@adacore.com>
3069 * tracebak.c: Refine selection of GCC/GENERIC_UNWINDER for
3070 tracebacks on x86 & x86_64.
3071 (x86 & x86_64): If !SJLJ, always pick the
3072 GCC_UNWINDER for x86_64 (not only on linux).
3073 * sem_util.ads: Minor fix in comment.
3075 2015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
3077 * sem_prag.adb (Analyze_Pragma): Pragma Volatile_Function should
3078 not apply to a function instantiation.
3079 * sem_util.adb (Has_Effectively_Volatile_Profile): New routine.
3080 (Is_Volatile_Function): An instance of Ada.Unchecked_Conversion
3081 is a volatile function when its profile contains an effectively
3083 * sem_util.ads (Has_Effectively_Volatile_Profile): New routine.
3085 2015-10-23 Arnaud Charlet <charlet@adacore.com>
3087 * exp_unst.adb (Unnest_Subprogram): Complete previous
3088 change and update comments.
3090 2015-10-23 Ed Schonberg <schonberg@adacore.com>
3092 * sem_util.ads, sem_util.adb (Check_Function_With_Address_Parameter):
3093 A subprogram that has an Address parameter and is declared in a Pure
3094 package is not considered Pure, because the parameter may be used as a
3095 pointer and the referenced data may change even if the address value
3097 * freeze.adb (Freeze_Subprogram): use it.
3098 * exp_ch6.adb (Expand_N_Subprogram_Body): Use it.
3100 2015-10-23 Olivier Hainque <hainque@adacore.com>
3102 * tracebak.c: Fallback to generic unwinder for gcc-sjlj on x86 &
3104 * tracebak.c: Rework x86 & x86_64 sections to resort to the
3105 generic unwinder if __USING_SJLJ_EXCEPTIONS__.
3107 2015-10-23 Javier Miranda <miranda@adacore.com>
3109 * sem_util.adb (Check_Function_Writable_Actuals): For function
3110 calls restrict the check to elementary types, as requested by
3113 2015-10-23 Arnaud Charlet <charlet@adacore.com>
3115 * exp_unst.adb (Unnest_Subprogram): Suppress initialization on
3116 Decl_ARECnT since we are taking care of all initializations in
3119 2015-10-23 Ed Schonberg <schonberg@adacore.com>
3121 * sem_dim.adb (Analyze_Dimension_Extension_Or_Record_Aggregate):
3122 Handle properly a box-initialized aggregate component.
3124 2015-10-23 Yannick Moy <moy@adacore.com>
3126 * sem_prag.adb (Analyze_Pragma): Reject Volatile_Function not placed
3129 2015-10-23 Yannick Moy <moy@adacore.com>
3131 * a-extiin.ads, a-reatim.ads, a-interr.ads, a-exetim-mingw.ads,
3132 a-exetim-default.ads, a-exetim.ads, a-taside.ads: Add "Global => null"
3133 contract on subprograms.
3134 * lib-xref-spark_specific.adb: collect scopes for stubs of
3137 2015-10-23 Arnaud Charlet <charlet@adacore.com>
3139 * gnat1drv.adb (Adjust_Global_Switches): Enable
3140 Back_Annotate_Rep_Info to get size information from gigi.
3141 (Gnat1drv): Code clean ups.
3142 * frontend.adb (Frontend): Ditto.
3144 2015-10-23 Arnaud Charlet <charlet@adacore.com>
3146 * gnat1drv.adb (Adjust_Global_Switches): Adjust settings.
3147 * sem.adb (Semantics): Remove special case.
3149 2015-10-23 Gary Dismukes <dismukes@adacore.com>
3151 * bindgen.adb, restrict.adb: Minor spelling/grammar fixes.
3153 2015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
3155 * sem_res.adb (Resolve_Entity_Name): Code cleanup. Check for possible
3156 elaboration issues in SPARK when the name denotes a source variable.
3158 2015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
3160 * exp_ch7.adb (Process_Transient_Objects): Reimplement to properly
3161 handle restriction No_Exception_Propagation.
3162 * exp_ch11.adb (Expand_At_End_Handler): Update the parameter
3163 profile and all references to Block.
3164 * exp_ch11.ads (Expand_At_End_Handler): Update the parameter
3165 profile and comment on usage.
3166 * exp_intr.adb (Expand_Unc_Deallocation): Reimplement to properly
3167 handle restriction No_Exception_Propagation.
3168 * gnat1drv.adb, restrict.adb: Update comment.
3170 2015-10-23 Bob Duff <duff@adacore.com>
3172 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Do not call
3173 SS_Release for a block statement enclosing the return statement in the
3174 case where a build-in-place function return is returning
3175 the result on the secondary stack. This is accomplished by
3176 setting the Sec_Stack_Needed_For_Return flag on such blocks.
3177 It was already being set for the function itself, and it was
3178 already set correctly for blocks in the non-build-in-place case
3179 (in Expand_Simple_Function_Return).
3180 (Set_Enclosing_Sec_Stack_Return): New procedure to perform
3181 the Set_Sec_Stack_Needed_For_Return calls. Called in the
3182 build-in-place and non-build-in-place cases.
3183 (Expand_Simple_Function_Return): Call
3184 Set_Enclosing_Sec_Stack_Return instead of performing the loop
3187 2015-10-23 Bob Duff <duff@adacore.com>
3189 * scng.adb (Char_Literal_Case): If an apostrophe
3190 follows a reserved word, treat it as a lone apostrophe, rather
3191 than the start of a character literal. This was already done for
3192 "all", but it needs to be done also for (e.g.) "Delta".
3194 2015-10-23 Bob Duff <duff@adacore.com>
3196 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function): Use
3197 Underlying_Type for B_Typ, in case the Typ is a subtype of a type with
3198 unknown discriminants.
3199 * g-awk.ads: Minor style fix in comment
3201 2015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
3203 * debug.adb: Document the use of debug switch -gnatd.5.
3204 * einfo.adb: Code reformatting. (Is_Ghost_Entity): Moved from ghost.adb.
3205 * einfo.ads New synthesized attribute Is_Ghost_Enity along
3206 with usage in nodes and pragma Inline.
3207 (Is_Ghost_Entity: Moved from ghost.ads.
3208 * exp_ch3.adb Code reformatting.
3209 (Expand_Freeze_Array_Type): Capture, set and restore the Ghost mode.
3210 (Expand_Freeze_Class_Wide_Type): Capture, set and restore the
3212 (Expand_Freeze_Enumeration_Type): Capture, set and
3213 restore the Ghost mode.
3214 (Expand_Freeze_Record_Type): Capture, set and restore the Ghost mode.
3215 * exp_ch6.adb (Expand_Subprogram_Contract): Do not expand the
3216 contract of an ignored Ghost subprogram.
3217 * exp_ch13.adb Add with and use clauses for Ghost.
3218 (Expand_N_Freeze_Entity): Capture, set and restore the Ghost mode.
3219 * exp_dbug.adb (Get_External_Name): Code reformatting. Add a
3220 special prefix for ignored Ghost entities or when requested by
3221 -gnatd.5 for any Ghost entity.
3222 * exp_dbug.ads Document the use of prefix "_ghost_" for ignored
3224 * exp_prag.adb (Expand_Pragma_Check): Capture, set and restore the
3226 (Expand_Pragma_Loop_Variant): Use In_Assertion_Expr
3227 to signal the original context.
3228 * ghost.adb (Check_Ghost_Overriding): Code cleanup.
3229 (Is_Ghost_Entity): Moved to einfo.adb. (Is_OK_Declaration):
3230 Move the assertion expression check to the outer level.
3231 (Is_OK_Ghost_Context): An assertion expression is a valid Ghost
3233 * ghost.ads (Is_Ghost_Entity): Moved to einfo.ads.
3234 * sem_ch3.adb (Analyze_Object_Contract): A source Ghost object
3235 cannot be imported or exported. Mark internally generated objects
3236 as Ghost when applicable.
3237 (Make_Class_Wide_Type): Inherit the ghostness of the root tagged type.
3238 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Mark
3239 a stand alone subprogram body as Ghost when applicable.
3240 (Analyze_Subprogram_Declaration): Mark internally generated
3241 subprograms as Ghost when applicable.
3242 * sem_ch7.adb: Code cleanup.
3243 * sem_ch13.adb (Add_Invariants): Add various formal
3244 parameters to break dependency on global variables.
3245 (Build_Invariant_Procedure): Code cleanup. Capture, set and
3246 restore the Ghost mode.
3247 * sem_res.adb (Resolve_Actuals): The actual parameter of a source
3248 Ghost subprogram whose formal is of mode IN OUT or OUT must be
3251 2015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
3253 * sem_ch8.adb Code cleanup.
3254 (Find_Expanded_Name): Replace
3255 the call to In_Pragmas_Depends_Or_Global with a call to
3256 In_Abstract_View_Pragma.
3257 (In_Abstract_View_Pragma): New routine.
3258 (In_Pragmas_Depends_Or_Global): Removed.
3259 * sem_prag.adb (Analyze_Part_Of): Catch a case where indicator
3260 Part_Of denotes the abstract view of a variable.
3262 2015-10-23 Arnaud Charlet <charlet@adacore.com>
3264 * sem_util.ads (Unique_Defining_Entity): Document the result
3265 for tasks and entries.
3266 * sem_util.adb (Unique_Entity): Return declaration entity for task and
3269 2015-10-22 Mikhail Maltsev <maltsevm@gmail.com>
3271 * gcc-interface/decl.c (gnat_to_gnu_entity): Use gcc_checking_assert.
3272 * gcc-interface/trans.c (assoc_to_constructor): Use flag_checking.
3273 * gcc-interface/utils.c (relate_alias_sets): Likewise.
3274 * gcc-interface/utils2.c (build_binary_op, build_unary_op): Use
3277 2015-10-21 Martin Sebor <msebor@redhat.com>
3280 * gcc-interface/lang.opt: End each sentence that describes
3281 an option with a period.
3283 2015-10-20 Yannick Moy <moy@adacore.com>
3285 * fmap.adb, a-cihama.adb, sem_ch5.adb, make.adb, inline.adb,
3286 a-cfhase.adb, scng.adb, sem_ch12.adb, freeze.adb, tempdir.adb,
3287 sem_util.adb, sem_res.adb, s-regexp.adb, a-clrefi.adb: Fix coding
3288 style for marking start of processing of subprograms.
3290 2015-10-20 Yannick Moy <moy@adacore.com>
3292 * lib-xref-spark_specific.adb (Add_SPARK_File): Start traversal
3293 by requesting info from stubs. (Traverse_All_Compilation_Units):
3294 Remove unused procedure.
3295 (Traverse_Declarations_Or_Statements): Handle protected and task units.
3296 * lib-xref.ads (Traverse_All_Compilation_Units): Remove unused
3298 * restrict.adb (Check_Restriction): Do not ignore
3299 restrictions in GNATprove_Mode.
3301 2015-10-20 Arnaud Charlet <charlet@adacore.com>
3303 * s-valllu.adb, sem_ch3.adb, layout.adb, a-crbtgo.adb, exp_ch9.adb,
3304 make.adb, g-diopit.adb, s-valuns.adb, sem_ch9.adb, sem_ch10.adb,
3305 sem_ch12.adb, a-tifiio.adb, g-dynhta.adb, uintp.adb,
3306 sem_util.adb, sem_res.adb, s-htable.adb, exp_tss.adb, s-soflin.ads,
3307 exp_ch6.adb, sem_ch6.adb, a-rbtgbo.adb, par-ch12.adb, sem_ch8.adb,
3308 sem_eval.adb, mdll.adb, par-ch5.adb, s-poosiz.adb, sem_ch4.adb,
3309 a-ngelfu.adb, s-taspri-solaris.ads, a-cforse.adb: Fix typos.
3311 2015-10-20 Arnaud Charlet <charlet@adacore.com>
3313 * sem_aggr.adb, mlib-prj.adb, prep.adb, eval_fat.adb, rtsfind.adb,
3314 freeze.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnatlink.adb,
3315 par-ch6.adb, exp_tss.adb, exp_ch4.adb, s-shasto.adb, exp_fixd.adb,
3316 sem_ch6.adb, clean.adb, sem_ch8.adb, sem_eval.adb, sem_ch9.adb: Fix
3319 2015-10-20 Ed Schonberg <schonberg@adacore.com>
3321 * sem_ch11.adb (Analyze_Handled_Statements): If the scope is a
3322 postcondition subprogram, do not check for useless assignments
3323 because there are no source references in such a body, and the
3324 call will lose deferred references from the enclosing subprogram.
3326 2015-10-20 Ed Schonberg <schonberg@adacore.com>
3328 * sem_ch13.adb: nalyze_Attribute_Definition_Clause, case
3329 'Address): If either object is controlled the overlay is
3330 erroneous, but analysis must be completed so that back-end sees
3331 address clause and completes code generation. Improve text
3334 2015-10-20 Thomas Quinot <quinot@adacore.com>
3336 * exp_ch4.adb: Minor reformatting.
3338 2015-10-20 Bob Duff <duff@adacore.com>
3340 * s-mudido-affinity.adb (Create): Correct subranges of slices of CPU
3343 2015-10-20 Arnaud Charlet <charlet@adacore.com>
3345 * sinfo.ads, g-pehage.adb, par-ch12.adb,
3346 layout.adb, exp_util.adb, sem_aux.adb, make.adb, checks.adb,
3347 sem_ch12.adb, sem_res.adb, sem_attr.adb, a-ngelfu.adb, sem_ch4.adb,
3348 switch-b.adb, sem_ch6.adb, prj-dect.adb, gnatxref.adb, sem_ch13.adb,
3349 lib-xref.adb: Fix typos.
3351 2015-10-20 Tristan Gingold <gingold@adacore.com>
3353 * exp_ch4.adb (Expand_Array_Comparison): Use
3354 generic code if runtime routine is not available.
3356 2015-10-20 Yannick Moy <moy@adacore.com>
3358 * a-sytaco.ads (Ada.Synchronous_Task_Control): Package
3359 now withs System.Task_Identification. The visible part
3360 of the spec has SPARK_Mode. The private part has pragma
3362 (Set_True): Added Global and Depends aspects
3363 (Set_False): Added Global and Depends aspects (Current_State):
3364 Added Volatile_Function aspect and added external state
3365 Ada.Task_Identification.Tasking_State as a Global input.
3366 (Suspend_Until_True): Added Global and Depends aspects
3367 * a-sytaco.adb (Ada.Synchronous_Task_Control):
3368 Package body has SPARK_Mode => Off
3369 * a-extiin.ads (Ada.Execution_Time.Interrupts):
3370 Package now withs Ada.Real_Time and has SPARK_Mode.
3371 (Clock): Added Volatile_Function aspect and added external state
3372 Ada.Real_Time.Clock_Time as a Global input.
3373 * a-reatim.ads (Ada.Real_Time): The visible part of the spec has
3374 SPARK_Mode. The private part has pragma SPARK_Mode (Off). The package
3375 declares external state Clock_Time with properties Async_Readers and
3377 (Clock): Added Volatile_Function aspect and
3378 added external state Clock_Time as a Global input.
3379 * a-reatim.adb (Ada.Real_Time): Package body has SPARK_Mode => Off
3380 * a-exetim-default.ads, a-exetim-mingw.ads (Ada.Execution_Time):
3381 The visible part of the spec has SPARK_Mode. The private part
3382 has pragma SPARK_Mode (Off).
3383 (Clock): Added Volatile_Function
3384 aspect and added external state Clock_Time as a Global input.
3385 (Clock_For_Interrupts): Added Volatile_Function aspect and added
3386 external state Ada.Real_Time.Clock_Time as a Global input.
3387 * a-exetim-mingw.adb (Ada.Execution_Time): Package body has
3389 * a-interr.ads (Ada.Interrupts): Package now
3390 withs Ada.Task_Identification (Is_Reserved): Added
3391 SPARK_Mode, Volatile_Function and external state
3392 Ada.Task_Identification.Tasking_State as a Global input.
3393 (Is_Attached): Added SPARK_Mode, Volatile_Function and external
3394 state Ada.Task_Identification.Tasking_State as a Global input.
3395 (Attach_Handler): Added SPARK_Mode => Off (Exchange_Handler):
3396 Added SPARK_Mode => Off (Detach_Handler): Added SPARK_Mode
3397 and external state Ada.Task_Identification.Tasking_State as a
3398 Global In_Out. (Reference): Added SPARK_Mode => Off
3399 * a-disedf.ads (Get_Deadline): Added SPARK_Mode, Volatile_Function
3400 and external state Ada.Task_Identification.Tasking_State as a
3402 * a-taside.ads (Ada.Task_Identification): The visible part of
3403 the spec has SPARK_Mode. The private part has pragma SPARK_Mode
3404 (Off). The package declares external state Tasking_State with
3405 properties Async_Readers and Async_Writers.
3406 (Current_Task): Added
3407 Volatile_Function aspect and added external state Tasking_State
3409 (Environment_Task): Added SPARK_Mode => Off
3410 (Is_Terminated): Added Volatile_Function aspect and added external
3411 state Tasking_State as a Global input. (Is_Callable): Added
3412 Volatile_Function aspect and added external state Tasking_State as
3414 (Activation_Is_Complete): Added Volatile_Function
3415 aspect and added external state Tasking_State as a Global input.
3416 * a-taside.adb (Ada.Task_Identification): Package body has
3419 2015-10-20 Ed Schonberg <schonberg@adacore.com>
3421 * atree.ads, atree.adb: Enable List38 and List39 on entities.
3422 * einfo.ads, einfo.adb (Class_Wide_Preconds) new attribute defined
3423 on subprograms. Holds the list of class-wide precondition
3424 functions inherited from ancestors. Each such function is an
3425 instantiation of the generic function generated from an explicit
3426 aspect specification for a class-wide precondition. A type is
3427 an ancestor of itself, and therefore a root type has such an
3428 instance on its own list.
3429 (Class_Wide_Postconds): ditto for postconditions.
3431 2015-10-20 Vincent Celier <celier@adacore.com>
3433 * prj-attr.adb: Add packages Prove and GnatTest.
3435 2015-10-20 Steve Baird <baird@adacore.com>
3437 * a-conhel.adb: Add an Annotate pragma to help suppress CodePeer's
3438 analysis of internals of container generic instances. This pragma
3439 has no other effect.
3440 * a-conhel.adb (Generic_Implementation) Add "pragma Annotate
3441 (CodePeer, Skip_Analysis);".
3443 2015-10-20 Steve Baird <baird@adacore.com>
3445 * pprint.adb: Code clean up.
3447 2015-10-20 Bob Duff <duff@adacore.com>
3449 * a-cfinve.ads, a-coboho.ads: Improve comments.
3450 * a-coboho.adb (Size_In_Storage_Elements): Improve error message
3451 in case of "Size is too big" exception.
3453 2015-10-20 Bob Duff <duff@adacore.com>
3455 * a-contai.ads: Remove check names (moved to snames.ads-tmpl).
3456 * snames.ads-tmpl: Add check names that were previously in
3457 a-contai.ads, so they are now visible in configuration files.
3458 * types.ads: Add checks corresponding to snames.ads-tmpl.
3460 2015-10-20 Ed Schonberg <schonberg@adacore.com>
3462 * sem_ch5.adb (Analyze_Loop_Statement): Attach generated loop
3463 identifier to the tree, because it may be the root of a tree
3464 traversal in Pop_Scope when freeze actions are pending.
3466 2015-10-20 Steve Baird <baird@adacore.com>
3468 * pprint.ads (Expression_Image) Add new generic formal flag
3469 Hide_Parameter_Blocks.
3470 * pprint.adb (Expression_Image) If new flag is set, then display
3471 dereferences of parameter block components accordingly.
3473 2015-10-20 Ed Schonberg <schonberg@adacore.com>
3475 * sem_prag.adb: Code clean up.
3477 2015-10-20 Hristian Kirtchev <kirtchev@adacore.com>
3479 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Code cleanup.
3480 (Make_Build_In_Place_Call_In_Object_Declaration): Update the
3481 parameter profile. Code cleanup. Request debug info for the
3482 object renaming declaration.
3483 (Move_Activation_Chain): Add new formal parameter and update the
3485 * exp_ch6.ads (Make_Build_In_Place_Call_In_Object_Declaration):
3486 Update the parameter profile and comment on usage.
3487 * sem_util.ads, sem_util.adb (Remove_Overloaded_Entity): New routine,
3490 2015-10-20 Ed Schonberg <schonberg@adacore.com>
3492 * sem_ch13.adb (Analyze_One_Aspect, case
3493 Aspect_Disable_Controlled): If expander is not active, pre-analyze
3494 expression anyway for ASIS and other tools use.
3495 * sem_prag.adb (Build_Generic_Class_Condition): Handle properly
3496 anonymous access types in parameter specifications. Make the
3497 formal type a formal derived type of the controlling type of
3500 2015-10-20 Tristan Gingold <gingold@adacore.com>
3502 * s-rident.ads: No_Task_At_Interrupt_Priority: New restriction.
3503 * sem_prag.adb (Analyze_Pragma): Check the restriction.
3504 * sem_ch13.adb (Analyze_Attribute_Definition_Clause):
3505 Check the restriction (for aspects).
3507 2015-10-20 Gary Dismukes <dismukes@adacore.com>
3509 * sem_prag.adb: Minor reformatting.
3511 2015-10-20 Tristan Gingold <gingold@adacore.com>
3513 * sem_util.adb (Is_Protected_Self_Reference): Remove reference to
3514 UET_Address in comment.
3515 * sem_attr.adb (Check_Unit_Name): Adjust comment.
3516 (Analyze_Attribute): Remove handling of UET_Address.
3517 * sem_attr.ads (Attribute_Impl_Def): Remove Attribute_UET_Address.
3518 * snames.ads-tmpl Remove Name_UET_Address, Attribute_UET_Address.
3519 * exp_attr.adb (Expand_N_Attribute_Reference): Remove
3520 Attribute_UET_Address.
3522 2015-10-20 Bob Duff <duff@adacore.com>
3524 * a-cbdlli.adb, a-cdlili.adb, a-chtgop.adb, a-cidlli.adb,
3525 * a-cobove.adb, a-coinve.adb, a-convec.adb, a-crbtgo.adb ("="): Avoid
3526 modifying the tampering counts unnecessarily.
3527 (Adjust): Zero tampering counts unconditionally.
3529 2015-10-20 Jerome Lambourg <lambourg@adacore.com>
3531 * init.c: Fix build issue on arm-vx6 when building the RTP
3534 2015-10-20 Ed Schonberg <schonberg@adacore.com>
3536 * sem_ch3.adb (Analyze_Object_Declaration): If the expression
3537 is an aggregate and compilation is in -gnatI mode (ignore rep
3538 clauses) do not delay resolution of aggregate, to prevent freeze
3539 actions out of order in the backend.
3541 2015-10-20 Ed Schonberg <schonberg@adacore.com>
3543 * sem_prag.ads, sem_prag.adb (Build_Generic_Class_Condition):
3544 New procedure to construct a generic function for a class-wide
3545 precondition, to implement AI12-0113 concerning the new semantics
3546 of class-wide preconditions for overriding uperations.
3548 2015-10-20 Hristian Kirtchev <kirtchev@adacore.com>
3550 * sem_util.adb (Find_Actual): The routine is
3551 now capable of operating on entry calls.
3553 2015-10-20 Ed Schonberg <schonberg@adacore.com>
3555 * sem_res.adb: Remove redundant check.
3557 2015-10-20 Jerome Lambourg <lambourg@adacore.com>
3559 * init.c (__gnat_vxsim_error_handler): Completely disable on
3560 VxWorks-7 as the VSBs used to build gcc do not support vxsim
3563 2015-10-20 Claire Dross <dross@adacore.com>
3565 * a-cfdlli.ads, a-cfinve.ads, a-cofove.ads (Generic_Sorting): Explicit
3567 * a-cfhase.ads, a-cforse.ads (Generic_Keys): Explicit SPARK_Mode.
3569 2015-10-20 Tristan Gingold <gingold@adacore.com>
3571 * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
3572 Check for No_Implicit_Protected_Object_Allocations.
3573 * fe.h (Check_No_Implicit_Task_Alloc,
3574 Check_No_Implicit_Protected_Alloc): Define and declare.
3575 * restrict.ads, restrict.adb (Check_No_Implicit_Task_Alloc,
3576 Check_No_Implicit_Protected_Alloc): New procedures to check the
3578 * s-rident.ads (No_Implicit_Task_Allocations)
3579 (No_Implicit_Protected_Object_Allocations): Declare new
3582 2015-10-20 Yannick Moy <moy@adacore.com>
3584 * sem_res.adb (Resolve_Selected_Component): Only set flag
3585 when component is defined in a variant part.
3587 * sem_util.ads (Is_Declared_Within_Variant): Promote local query
3588 as publicy visible one for use in Resolve_Selected_Component.
3590 2015-10-20 Philippe Gil <gil@adacore.com>
3592 * g-debpoo.adb: allow instrumented System.Memory to use Debug_Pool
3593 from foreign threads.
3594 * g-debpoo.adb (Print_Traceback): NEW print traceback if available
3595 added to support Stack_Trace_Depth = 0.
3596 (Print_Address): NEW print System.Address without no secondary
3597 stack use (Address_Image uses secondary stack)
3599 2015-10-20 Yannick Moy <moy@adacore.com>
3601 * exp_ch9.adb (Expand_Entry_Barrier): Default initialize local variable
3604 2015-10-20 Jerome Lambourg <lambourg@adacore.com>
3606 * init.c (__gnat_error_handler for vxworks): Force
3607 SPE bit in the MSR when handling signals
3609 2015-10-20 Arnaud Charlet <charlet@adacore.com>
3611 * einfo.ads, sem_ch12.adb, sem_ch6.adb, table.ads, s-stposu.ads,
3612 g-table.ads, g-dyntab.ads, makeutl.ads, a-crdlli.ads: Fix typos.
3614 2015-10-20 Ed Schonberg <schonberg@adacore.com>
3616 * sem_ch5.adb (Analyze_Loop_Statement): Element iterators
3617 over multidimensional arrays create additional loops during
3618 expansion. For such loops we create a label as a scope
3619 name. Attach this label properly to tree, for use in GNATProve
3620 over such element iterators.
3621 * sem_attr.adb (Analyze_Attribute, case Loop_Entry): The loop to
3622 which the attribute applies comes from source, not from expansion
3623 of an element iterator or a quantified expression.
3624 * exp_attr.adb (Expand_N_Attribute_Reference): Ditto.
3626 2015-10-20 Ed Schonberg <schonberg@adacore.com>
3628 * exp_ch6.adb (Expand_Call): Check for a call to a function
3629 declared in a Dimension I/O package, to handle the new Image
3632 2015-10-20 Eric Botcazou <ebotcazou@adacore.com>
3634 * inline.ads: Minor comment fixes.
3636 2015-10-20 Bob Duff <duff@adacore.com>
3638 * a-comutr.ads (Tree_Node_Access): Add No_Strict_Aliasing, because
3639 we're doing unchecked conversions with this pointer.
3641 2015-10-20 Ed Schonberg <schonberg@adacore.com>
3643 * exp_ch9.adb (Next_Protected_Operation): An expression function
3644 used as a completion can be the next protected operation in a
3647 2015-10-20 Hristian Kirtchev <kirtchev@adacore.com>
3649 * sem_res.adb (Is_OK_Volatile_Context): Add a guard when checking a
3650 possible call to an instance of Ada.Unchecked_Conversion to avoid
3651 testing protected function calls. Allow references to protected objects
3652 in prefixed protected calls.
3653 (Is_Protected_Operation_Call): New routine.
3655 2015-10-20 Yannick Moy <moy@adacore.com>
3657 * exp_ch5.adb, exp_ch5.ads (Expand_Iterator_Loop_Over_Array): Make
3658 query public. Remove code handling with iterator loop over array
3659 of the 'in' form, which is not allowed in Ada. * exp_spark.adb
3660 (Expand_SPARK): Expand loop statements that take the form of an
3661 iterator over an array.
3662 * sem_ch5.adb (Analyze_Loop_Statement): Do not analyze loop statements
3663 that take the form of an iterator over an array, so that the rewritten
3664 form gets analyzed instead.
3665 * sem_util.adb, sem_util.ads (Is_Iterator_Over_Array): New query
3666 to recognize iterators over arrays.
3668 2015-10-20 Arnaud Charlet <charlet@adacore.com>
3670 * s-excdeb.ads, s-excdeb.adb (Debug_Raise_Exception): Add
3672 * a-except.adb (Raise_Current_Excep): Update call to
3673 Debug_Raise_Exception.
3674 * a-except-2005.adb (Complete_Occurrence): Ditto.
3675 * sem_ch12.adb: Whitespace fix.
3677 2015-10-20 Yannick Moy <moy@adacore.com>
3679 * sem_warn.adb (Is_OK_Fully_Initialized): Consider types with DIC as
3680 fully default initialized.
3681 * sem_ch6.adb: minor style fix in comment
3683 2015-10-20 Ed Schonberg <schonberg@adacore.com>
3685 * s-diflio.ads, s-diflio.adb (Image): New function for dimensioned
3686 quantities, to produce a string that includes the dimension
3687 synbol for the quantity, or the vector of dimensions in standard
3689 * sem_dim.adb (Expand_Put_Call_With_Symbol): Process new function
3690 Image, to include dimension information in the generated string,
3691 identical to the string produced by the Put procedure on a string
3692 for a dimensioned quantity.
3694 2015-10-20 Hristian Kirtchev <kirtchev@adacore.com>
3696 * exp_ch7.adb (Process_Declarations): A loop
3697 parameter does not require finalization actions.
3699 2015-10-20 Eric Botcazou <ebotcazou@adacore.com>
3701 * exp_ch6.adb (Expand_Simple_Function_Return): Do not create an
3702 actual subtype for a mutable record return type if the expression
3703 is itself a function call.
3705 2015-10-20 Dmitriy Anisimkov <anisimko@adacore.com>
3707 * s-atocou.adb, s-atocou-builtin.adb: Fix implementation description
3708 related to new type support.
3710 2015-10-20 Ed Schonberg <schonberg@adacore.com>
3712 * sem_res.adb (Resolve_Explicit_Dererence): Call Analyze_Dimension
3713 to propagate dimension information from prefix.
3714 * sem_dim.adb (Analyze_Dimension): Handle Explicit_Dereference.
3715 * inline.ads: minor whitespace fix in comment
3716 * sem_ch6.adb: minor gramar fix in comment
3718 2015-10-20 Hristian Kirtchev <kirtchev@adacore.com>
3720 * sem_ch3.adb (Analyze_Object_Contract):
3721 A protected type or a protected object is allowed to have a
3724 2015-10-20 Bob Duff <duff@adacore.com>
3726 * sem_util.adb (Requires_Transient_Scope):
3727 Return true for mutable records if the maximum size is very large.
3729 2015-10-20 Eric Botcazou <ebotcazou@adacore.com>
3731 * a-except-2005.adb (To_Stderr): Import Put_Char_Stderr with
3732 the same signature as in System.IO.Put.
3734 2015-10-20 Bob Duff <duff@adacore.com>
3736 * a-cobove.adb (Set_Length): Restore previous logic, but with "Checks
3737 and then" on the check.
3739 2015-10-20 Ed Schonberg <schonberg@adacore.com>
3741 * par-ch3.adb (P_Known_Discriminant_Part_Opt): Handle properly
3742 a misplaced "constant" keyword in a discriminant specification.
3744 2015-10-20 Steve Baird <baird@adacore.com>
3746 * einfo.ads (Is_Param_Block_Component_Type): New function decl
3747 for querying the flag.
3748 (Set_Is_Param_Block_Component_Type): New procedure decl for setting
3750 * einfo.adb (Is_Param_Block_Component_Type): New function body.
3751 (Set_Is_Param_Block_Component_Type): New procedure body.
3752 (Write_Entity_Flags): Display the new flag.
3753 * exp_ch9.adb (Build_Parameter_Block): Set flag on parameter
3754 block component types.
3755 (Expand_N_Entry_Declaration): Set flag on parameter block component
3758 2015-10-20 Steve Baird <baird@adacore.com>
3760 * sem_elab.adb: Do not pass an N_Attribute_Reference node to
3761 Sinfo.Set_No_Elaboration_Check.
3762 * sem_elab.adb (Check_Elab_Call) Do not pass a non-call
3763 node (specifically, an N_Attribute_Reference node) to
3764 Sinfo.Set_No_Elaboration_Check.
3766 2015-10-20 Tristan Gingold <gingold@adacore.com>
3768 * adaint.c: File names are case sensitive on aarch64-ios.
3770 2015-10-20 Bob Duff <duff@adacore.com>
3772 * a-cbdlli.ads, a-cbhase.ads, a-cbmutr.ads, a-cborse.ads,
3773 * a-cdlili.ads, a-cidlli.ads, a-cihase.ads, a-cimutr.ads,
3774 * a-ciorse.ads, a-cobove.ads, a-cohase.ads, a-coinve.ads,
3775 * a-comutr.ads, a-convec.ads, a-coorse.ads: Use non-private with clause.
3777 2015-10-20 Hristian Kirtchev <kirtchev@adacore.com>
3779 * exp_util.adb (Requires_Cleanup_Actions): A loop parameter does not
3780 require finalization actions.
3782 2015-10-20 Ed Schonberg <schonberg@adacore.com>
3784 * par-ch3.adb (P_Declarative_Items): In case of misplaced
3785 aspect specifications, ensure that flag Done is properly set to
3788 2015-10-20 Hristian Kirtchev <kirtchev@adacore.com>
3790 * rtsfind.ads Remove the entries for Ada.Synchronous_Task_Control
3791 and Suspension_Object from tables RE_Id, RE_Unit_Table and RTU_Id.
3792 * sem_util.adb (Is_Descendant_Of_Suspension_Object): Update
3793 the comment on usage. Use routine Is_Suspension_Object to detect
3794 whether a type matches Suspension_Object.
3795 (Is_Suspension_Object): New routine.
3796 * snames.ads-tmpl: Add predefined names for Suspension_Object
3797 and Synchronous_Task_Control.
3799 2015-10-20 Ed Schonberg <schonberg@adacore.com>
3801 * sem_smem.adb (Check_Shared_Var): Clean up code that handles
3802 type declarations with discriminants, remove obsolete check.
3804 2015-10-20 Arnaud Charlet <charlet@adacore.com>
3806 * par_sco.adb: Minor style fixes.
3808 2015-10-20 Vincent Celier <celier@adacore.com>
3810 * debug.adb: Update documentation of -gnatdu.
3812 2015-10-20 Hristian Kirtchev <kirtchev@adacore.com>
3814 * aspects.adb Add aspect Volatile_Function to table
3816 * aspect.ads Add aspect Volatile_Function to tables
3817 Aspect_Argument, Aspect_Delay, Aspect_Id, Aspect_Names
3818 and Implementation_Defined_Aspect. Aspects Async_Readers,
3819 Async_Writers, Effective_Reads and Effective_Writes are no
3821 * einfo.adb (Get_Pragma): Add an entry for pragma
3823 * par-prag.adb (Prag): Pragma Volatile_Function does not need
3824 special processing by the parser.
3825 * rtsfind.ads Add an entry for Ada.Synchronous_Task_Control in
3826 table RTU_Id. Add an entry for Suspension_Object in table RE_Id.
3827 * sem_ch3.adb Fix SPARK RM references.
3828 (Analyze_Object_Contract): Update the error guard.
3829 * sem_ch5.adb Fix SPARK RM references.
3830 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Ensure
3831 that a non-volatile function does not contain an effectively
3833 (Analyze_Subprogram_Contract): Ensure
3834 that a non-volatile function does not contain an effectively
3836 * sem_ch12.adb (Instantiate_Object): Remove the reference to
3837 the SPARK RM from the error message.
3838 * sem_ch13.adb (Analyze_Aspect_Specifications): Add
3839 processing for aspects Async_Readers, Async_Writers,
3840 Effective_Reads, Effective_Writes and Volatile_Function.
3841 (Check_Aspect_At_Freeze_Point): Aspects Async_Readers,
3842 Async_Writers, Effective_Reads, Effective_Writes and
3843 Volatile_Function do not need special processing at the freeze
3845 * sem_prag.adb Add an entry for pragma Volatile_Function in
3847 (Analyze_External_Property_In_Decl_Part):
3848 Reimplemented as Async_Readers, Async_Writers, Effective_Reads
3849 and Effective_Writes are no longer Boolean pragmas.
3850 (Analyze_Global_Item): An external state or effectively
3851 volatile object cannot appear as an item in pragma
3853 (Analyze_Pragma): Change the implementation
3854 of Async_Readers, Async_Writers, Effective_Reads and
3855 Effective_Writes as these are no longer Boolean pragmas.
3856 Use routine Check_Static_Boolean_Expression to verify the
3857 optional Boolean expression of Async_Readers, Async_Writers,
3858 Constant_After_Elaboration, Effective_Reads, Effective_Writes,
3859 Extensions_Visible and Volatile_Function. Add processing for
3860 pragma Volatile_Function.
3861 (Check_Static_Boolean_Expression): New routine.
3862 (Find_Related_Context): Update the comment on usage.
3863 (Is_Enabled_Pragma): New routine.
3864 * sem_prag.ads (Is_Enabled_Pragma): New routine.
3865 * sem_res.adb Fix SPARK RM references.
3866 (Is_OK_Volatile_Context): Add detection for return statements.
3867 (Resolve_Actuals): Remove the check concerning an effectively volatile
3868 OUT actual parameter as this is now done by the SPARK flow analyzer.
3869 (Resolve_Entity_Name): Remove the check concerning an effectively
3870 volatile OUT formal parameter as this is now done by the SPARK
3871 flow analyzer. (Within_Volatile_Function): New routine.
3872 * sem_util.adb (Add_Contract_Item): Add processing for pragma
3874 (Check_Nonvolatile_Function_Profile): New routine.
3875 (Is_Descendant_Of_Suspension_Object): New routine.
3876 (Is_Effectively_Volatile): Protected types and descendants of
3877 Suspension_Object are now treated as effectively volatile.
3878 (Is_Enabled): The optional Boolean expression of pragmas
3879 Async_Readers, Async_Writers, Effective_Reads and Effective_Writes
3880 now appears as the first argument.
3881 (Is_Volatile_Function): New routine.
3882 * sem_util.ads Add SPARK RM references.
3883 (Add_Contract_Item): Update the comment on usage.
3884 (Check_Nonvolatile_Function_Profile): New routine.
3885 (Is_Effectively_Volatile): Update the comment on usage.
3886 (Is_Volatile_Function): New routine.
3887 * snames.ads-tmpl Add a predefined name and pragma id for
3890 2015-10-20 Arnaud Charlet <charlet@adacore.com>
3892 * gnat_ugn.texi, gnat_rm.texi: Regenerate.
3893 * doc/gnat_ugn/gnat_project_manager.rst,
3894 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
3895 doc/gnat_ugn/the_gnat_compilation_model.rst,
3896 doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
3897 doc/gnat_rm/implementation_defined_pragmas.rst,
3898 doc/gnat_rm/the_gnat_library.rst,
3899 doc/gnat_rm/implementation_defined_characteristics.rst: Update doc.
3901 2015-10-20 Arnaud Charlet <charlet@adacore.com>
3903 * gcc-interface/Makefile.in: Update targets.
3905 2015-10-20 Bob Duff <duff@adacore.com>
3907 * sem_ch13.adb (Analyze_One_Aspect): Avoid
3908 analyzing the expression in a 'Disable_Controlled attribute when
3909 Expander_Active is False, because otherwise, we get errors about
3910 nonstatic expressions in pragma-Preelaborate generic packages.
3911 * restrict.ads: minor whitespace cleanup in comment
3913 2015-10-20 Bob Duff <duff@adacore.com>
3915 * a-conhel.adb: Remove "use SAC;", because otherwise the compiler
3916 complains about use clauses in run-time units. Use "use type"
3918 * a-btgbso.adb, a-btgbso.ads, a-cbdlli.adb, a-cbdlli.ads,
3919 * a-cbhama.adb, a-cbhama.ads, a-cbhase.adb, a-cbhase.ads,
3920 * a-cbmutr.adb, a-cbmutr.ads, a-cborma.adb, a-cborma.ads,
3921 * a-cborse.adb, a-cborse.ads, a-cdlili.adb, a-cdlili.ads,
3922 * a-chtgbk.adb, a-chtgbk.ads, a-chtgbo.adb, a-chtgbo.ads,
3923 * a-chtgke.adb, a-chtgke.ads, a-chtgop.adb, a-chtgop.ads,
3924 * a-cidlli.adb, a-cidlli.ads, a-cihama.adb, a-cihama.ads,
3925 * a-cihase.adb, a-cihase.ads, a-cimutr.adb, a-cimutr.ads,
3926 * a-ciorma.adb, a-ciorma.ads, a-ciormu.adb, a-ciormu.ads,
3927 * a-ciorse.adb, a-ciorse.ads, a-cobove.adb, a-cobove.ads,
3928 * a-cohama.adb, a-cohama.ads, a-cohase.adb, a-cohase.ads,
3929 * a-cohata.ads, a-coinve.adb, a-comutr.adb, a-comutr.ads,
3930 * a-convec.adb, a-coorma.adb, a-coorma.ads, a-coormu.adb,
3931 * a-coormu.ads, a-coorse.adb, a-coorse.ads, a-crbltr.ads,
3932 * a-crbtgk.adb, a-crbtgk.ads, a-crbtgo.adb, a-crbtgo.ads,
3933 * a-rbtgbk.adb, a-rbtgbk.ads, a-rbtgbo.adb, a-rbtgbo.ads,
3934 * a-rbtgso.adb, a-rbtgso.ads: Change all the predefined containers
3935 to share the tampering machinery in Ada.Containers.Helpers. This
3936 reduces the amount of duplicated code, and takes advantage of
3937 efficiency improvements in Helpers.
3938 Protect all run-time checks and supporting machinery with "if
3939 Checks" or "if T_Check", so this code can be suppressed with
3940 pragma Suppress or -gnatp.
3941 Add Pseudo_Reference and Get_Element_Access to remaining
3942 containers, so that the compiler can optimize "for ... of" loops.
3944 2015-10-20 Bob Duff <duff@adacore.com>
3946 * a-contai.adb, a-coinve.ads, a-contai.ads, a-conhel.adb, a-conhel.ads,
3947 Makefile.rtl, a-convec.ads: Move helper code from Ada.Containers to a
3948 new package Ada.Containers.Helpers, because otherwise it's not
3949 visible everywhere it needs to be (e.g. in the package
3950 Ada.Containers.Red_Black_Trees, Generic_Tree_Types wants to have
3951 a component of type Tamper_Counts).
3953 2015-10-20 Ed Schonberg <schonberg@adacore.com>
3955 * sem_type.adb (Intersect_Types): Specialize error message when
3956 one operand is a limited view which is a priori incompatible
3957 with all other named types.
3958 * sem_prag.adb: minor fix in comment
3959 * sem_ch13.adb: Code clean up.
3961 2015-10-20 Eric Botcazou <ebotcazou@adacore.com>
3963 * sem_ch12.adb (Need_Subprogram_Instance_Body): Also return true
3964 for a subprogram nested in an inlined subprogram.
3966 2015-10-20 Bob Duff <duff@adacore.com>
3968 * a-coinve.adb, a-contai.adb: Update comments.
3969 * pprint.ads: Minor reformatting.
3971 2015-10-20 Tristan Gingold <gingold@adacore.com>
3973 * env.c, init.c: Handle arm64-darwin like arm-darwin.
3974 * tracebak.c: Handle arm64-darwin.
3976 2015-10-20 Bob Duff <duff@adacore.com>
3978 * s-trasym.adb (Symbolic_Traceback): When giving the traceback
3979 as hexadecimal code addresses, separate by blanks instead of LF.
3981 2015-10-20 Ed Schonberg <schonberg@adacore.com>
3983 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Generate freeze
3984 node for subprogram in Compile_Only mode.
3986 2015-10-20 Dmitriy Anisimkov <anisimko@adacore.com>
3988 * s-atocou.adb, s-atocou.ads, a-contai.adb, a-contai.ads,
3989 s-atocou-x86.adb, s-atocou-builtin.adb: Task safe over container
3992 2015-10-20 Philippe Gil <gil@adacore.com>
3994 * g-debpoo.ads (Dump): NEW print Debug_Pool statistics & main
3996 (Dump_Stdout): NEW print to stdout Debug_Pool statistics &
3998 (Reset): NEW reset counters to 0.
3999 (Get_Size): NEW return size allocated at parameter.
4000 (High_Water_Mark): NEW.
4001 (Current_Water_Mark): NEW.
4002 (System_Memory_Debug_Pool): NEW tell Debug_Pools that
4003 System.Memory uses it.
4004 * g-debpoo.adb (Traceback_Htable_Elem): add Frees, Total_Frees
4006 (Find_Or_Create_Traceback): don't manage in System.Memory
4007 Debug_Pool Deallocate Traceback's.
4008 (Validity): add optional Handled table when System.Memory asked
4009 for Allow_Unhandled_Memory.
4010 (Allocate): handle Allocate reentrancy occuring when System.Memory
4012 (Deallocate): handle when Allow_Unhandled_Memory
4013 is set deallocation of unhandled memory. Dont't check
4014 Size_In_Storage_Elements if equal to Storage_Count'Last. update
4015 Frees, Total_Frees new components.
4017 2015-10-20 Eric Botcazou <ebotcazou@adacore.com>
4019 * fe.h: Minor tweak.
4021 2015-10-20 Vincent Celier <celier@adacore.com>
4023 * sem_cat.adb (Check_Categorization_Dependencies): Do nothing
4024 when -gnatdu is specified.
4026 2015-10-20 Ed Schonberg <schonberg@adacore.com>
4028 * sem_ch8.adb (analyze_Subprogram_Renaming): The actual for a
4029 formal abstract subprogram must have a controlling type.
4030 * stand.ads: Minor whitespace cleanup.
4032 2015-10-20 Gary Dismukes <dismukes@adacore.com>
4034 * sem_ch13.adb: Minor reference change (RM => AARM).
4036 2015-10-20 Eric Botcazou <ebotcazou@adacore.com>
4038 * make.adb (Check): Skip multilib switches reinstated by the
4039 compiler only when counting the number of switches, since it is
4040 what really matters in the regular operating mode.
4042 2015-10-20 Arnaud Charlet <charlet@adacore.com>
4044 * einfo.adb: Add extra assertion for small clause.
4045 * cstand.adb: Minor style fix in comment.
4046 * debug.adb: Minor reformatting.
4047 * exp_util.adb: Fix minor typo.
4049 2015-10-20 Ed Schonberg <schonberg@adacore.com>
4051 * sem_ch12.adb (Same_Instantiated_Function): New predicate in
4052 Check_Formal_Package_Instance, used to verify that the formal
4053 and the actual of an actual package match when both are functions
4054 given as attribute references.
4056 2015-10-20 Bob Duff <duff@adacore.com>
4058 * a-coinve.ads, a-coinve.adb: Do the same efficiency
4059 improvements that were already done in the definite case
4060 (Ada.Containers.Vectors, i.e. a-convec). This includes the
4061 ability to suppress checks, the fast path for Append, inlining
4062 as appropriate, and special-casing of "for ... of" loops. Reuse
4063 the tampering machinery that is now in Ada.Containers. Simplify
4065 * a-convec.ads, a-convec.adb: Change the code to be more similar
4067 * a-finali.ads, a-finali.adb: Expose the "null"-ness of the
4068 operations. This may enable optimizations in the future, and
4069 seems cleaner anyway.
4071 2015-10-20 Ed Schonberg <schonberg@adacore.com>
4073 * sem_ch13.adb (Is_Operational_Item): Attributes related to
4074 Ada 2012 iterators are operational items, and can be specified
4077 2015-10-20 Hristian Kirtchev <kirtchev@adacore.com>
4079 * sem_prag.adb (Check_Usage): Update the calls to Usage_Error.
4080 (Usage_Error): Remove formal parameter Item. Emit a clearer message
4081 concerning a missing dependency item and place it on the related pragma.
4083 2015-10-20 Bob Duff <duff@adacore.com>
4085 * debug.adb, expander.adb: Implement -gnatd.B switch, which
4086 triggers a bug box when an abort_statement is seen. This is
4087 useful for testing Comperr.Compiler_Abort.
4088 * gnat1drv.adb: Trigger bug box on all exceptions other than
4089 Unrecoverable_Error.
4091 2015-10-20 Thomas Quinot <quinot@adacore.com>
4093 * Makefile.rtl: add the following...
4094 * g-binenv.ads, g-binenv.adb: New unit providing runtime access
4095 to bind time captured values ("bind environment")
4096 * init.c: declare new global variable __gl_bind_env_addr.
4097 * bindgen.ads, bindgen.adb (Set_Bind_Env): record a bind
4098 environment key=value pair.
4099 (Gen_Bind_Env_String): helper to produce the bind environment data
4100 called in the binder generated file.
4101 (Gen_Output_File_Ada): Call the above (Gen_Adainit): Set
4102 __gl_bind_env_addr accordingly.
4103 * switch-b.adb: Support for command line switch -V (user interface
4104 to set a build environment key=value pair)
4105 * bindusg.adb: Document the above
4107 2015-10-20 Vincent Celier <celier@adacore.com>
4109 * sem_prag.adb (Analyse_Pragma: Pragma Pure): Do not set the
4110 entity as Pure if Debug_Flag_U is set.
4112 2015-10-20 Bob Duff <duff@adacore.com>
4114 * output.adb (Write_Int): Work with negative numbers in order to avoid
4115 negating Int'First and thereby causing overflow.
4116 * sem_util.adb: Minor comment fix.
4118 2015-10-20 Eric Botcazou <ebotcazou@adacore.com>
4120 * make.adb (Check): Skip multilib switches reinstated by the
4121 compiler when doing the comparison with switches passed to
4124 2015-10-20 Yannick Moy <moy@adacore.com>
4126 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Return
4127 False for procedures marked No_Return.
4128 * sem_util.ads (Enclosing_Declaration): Improve comment.
4129 * einfo.adb (Is_Completely_Hidden): Remove spurious assertion.
4131 2015-10-20 Thomas Quinot <quinot@adacore.com>
4133 * types.ads: Minor reformatting.
4135 2015-10-20 Hristian Kirtchev <kirtchev@adacore.com>
4137 * einfo.adb (Get_Pragma): Minor reformatting. Rename local constant
4138 Is_CDG to Is_CLS. Add pragma Constant_After_Elaboration to the list of
4139 classification pragmas.
4141 2015-10-20 Ed Schonberg <schonberg@adacore.com>
4143 * sem_ch3.adb (Analyze_Declarations); At the of the visible part,
4144 perform name resolution on the expressions in aspects of visible
4146 * sem_ch13.ads, sem_ch13.adb (Resolve_Aspect_Expressions): Resolve
4147 expressions in aspects independently of whether corresponding
4148 entity is frozen. Used to complete name resolution of aspect
4149 expressions for entities declared in the visible part of a
4150 package or generic package declaration.
4152 2015-10-20 Vincent Celier <celier@adacore.com>
4154 * prj-attr.adb: Add package Codepeer and its attributes.
4156 2015-10-20 Thomas Quinot <quinot@adacore.com>
4158 * sem_ch3.adb, sem_ch13.adb: Minor reformatting.
4160 2015-10-20 Eric Botcazou <ebotcazou@adacore.com>
4162 * gnatlink.adb (Gnatlink): Do not translate --RTS switch
4163 for the linker and instead pass the switches that were
4164 reinstated by the compiler.
4166 2015-10-20 Bob Duff <duff@adacore.com>
4168 * a-contai.ads, a-convec.ads: Move Count_Type_Last from
4169 a-convec.ads to a-contai.ads, so other containers can refer to it.
4171 2015-10-20 Ed Schonberg <schonberg@adacore.com>
4173 * sem_ch3.adb (Check_Nonoverridable_Aspects): New procedure within
4174 Analyze_Full_Type_ Declaration, used to apply legality rules in
4175 13,1,1 (18.3.3) concerning aspects that cannot be overridden in
4177 (Check_Duplicate_Aspects): It is not legal to specify the
4178 Implicit_Dereference aspect on a full view if partial view has
4179 known discriminants.
4180 * sem_ch13.adb (Analyze_Aspect_Implicit_Dereference): Verify that
4181 the specification of the aspect on a derived type confirms the
4182 value of the inherited one.
4183 * sem_util.adb (Reference_Discriminant): Return empty if none
4186 2015-10-20 Thomas Quinot <quinot@adacore.com>
4188 * exp_ch5.adb, sem_ch3.adb: Minor reformatting.
4190 2015-10-20 Vincent Celier <celier@adacore.com>
4192 * a-strsup.adb (Super_Trim): Remove statements that put NUL
4193 characters in unused portion of the Data string.
4195 2015-10-16 Hristian Kirtchev <kirtchev@adacore.com>
4197 * aspects.adb Add an entry for Constant_After_Elaboration in
4198 table Canonical_Aspect.
4199 * aspects.ads Add entries for Constant_After_Elaboration in
4200 tables Aspect_Argument, Aspect_Delay, Aspect_Id, Aspect_Names
4201 and Implementation_Defined_Aspect.
4202 * par-prag.adb Pragma Constant_After_Elaboration does not require
4203 special processing by the parser.
4204 * sem_ch13.adb Add an entry for Constant_After_Elaboration
4206 (Analyze_Aspect_Specifications):
4207 Add processing for aspect Constant_After_Elaboration.
4208 (Check_Aspect_At_Freeze_Point): Aspect Constant_After_Elaboration
4209 does not require special processing at freeze time.
4210 * sem_prag.adb (Analyze_Pragma): Add processing for pragma
4211 Constant_After_Elaboration. Use routine Find_Related_Context to
4212 retrieve the context of pragma Part_Of.
4213 (Duplication_Error): Update comment on usage.
4214 (Find_Related_Context): New routine.
4215 * sem_prag.ads Add an entry for Constant_After_Elaboration
4216 in table Aspect_Specifying_Pragma.
4217 (Analyze_Contract_Cases_In_Decl_Part): Update the comment on usage.
4218 * sem_util.adb (Add_Contract_Item): Add processing for pragma
4219 Constant_After_Elaboration.
4220 * sem_util.ads (Add_Contract_Item): Update the comment on usage.
4221 * snames.ads-tmpl Add new predefined name and aspect id for
4222 Constant_After_Elaboration.
4224 2015-10-16 Vincent Celier <celier@adacore.com>
4226 * prj-pp.adb (Pretty_Print.Print): Correctly display extending
4227 packages, instead of making them renamed packages.
4229 2015-10-16 Hristian Kirtchev <kirtchev@adacore.com>
4231 * sem_ch12.adb (Analyze_Package_Instantiation):
4232 Treat a missing SPARK_Mode annotation as having mode "Off".
4233 (Analyze_Subprogram_Instantiation): Treat a missing SPARK_Mode
4234 annotation as having mode "Off".
4235 (Instantiate_Package_Body): Code
4236 reformatting. Treat a missing SPARK_Mode annotation as having mode
4238 (Instantiate_Subprogram_Body): Code reformatting. Treat
4239 a missing SPARK_Mode annotation as having mode "Off".
4241 2015-10-16 Ed Schonberg <schonberg@adacore.com>
4243 * exp_ch5.adb: Code clean up.
4244 * sem_ch13.adb: Minor fix in comment.
4246 2015-10-16 Bob Duff <duff@adacore.com>
4248 * a-exexda.adb: Change format of Exception_Information to be
4249 more like what we print for unhandled exceptions.
4250 * a-exstat.adb: Parse new format.
4251 * a-except-2005.adb, a-except.adb: Document new format.
4253 2015-10-16 Javier Miranda <miranda@adacore.com>
4255 * sem_ch5.adb (Analyze_Iterator_Specification): Associate a
4256 transient scope with the renaming object declararation.
4257 * exp_util.adb (Insert_Actions): if the enclosing interator
4258 loop is marked as requiring the secondary stack then attach the
4259 actions to the transient scope.
4261 2015-10-16 Bob Duff <duff@adacore.com>
4263 * exp_ch7.adb: Minor spelling fixes.
4265 2015-10-16 Ed Schonberg <schonberg@adacore.com>
4267 * sem_ch3.adb (Replace_Anonymous_Access_To_Protected_Subprogram):
4268 If anonymous type is component type of array type declaration,
4269 analyze its declaration in the current scope, not the enclosing
4272 2015-10-16 Gary Dismukes <dismukes@adacore.com>
4274 * prj.adb, sem_util.adb, exp_ch6.adb: Minor reformatting.
4276 2015-10-16 Ed Schonberg <schonberg@adacore.com>
4278 * exp_ch5.adb (Expand_Formal_Container_Element_Loop): Modify
4279 expansion to allow element iteration over formal containers
4280 whose elements are indefinite types.
4282 2015-10-16 Doug Rupp <rupp@adacore.com>
4284 * s-taprop-linux.adb (Monotonic_Clock): Call clock_gettime
4285 instead of gettimeofday.
4286 * s-osinte-android.ads, s-osinte-android.adb, s-osinte-linux.ads
4287 (clock_gettime): New imported subprogram.
4289 2015-10-16 Hristian Kirtchev <kirtchev@adacore.com>
4291 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
4292 Indefinite or limited library level objects are now returned on
4294 * exp_ch7.adb (Build_Finalization_Master): Add formal
4295 parameter For_Lib_Level. Add context specific insertion for a
4296 finalization master created for an access result type related
4297 to a build-in-place function call used to initialize a library
4299 * exp_ch7.ads (Build_Finalization_Master): Add formal parameter
4300 For_Lib_Level. Update the comment on usage.
4301 * sem_util.adb (Mark_Coextensions): Code cleanup.
4303 2015-10-16 Emmanuel Briot <briot@adacore.com>
4305 * prj.adb (For_Every_Project_Imported_Context): Fix handling
4306 of aggregated projects with duplicate names.
4307 * a-ngelfu.ads: Minor whitespace fix.
4309 2015-10-16 Ed Schonberg <schonberg@adacore.com>
4311 * sem_ch13.adb (Build_Predicate_Functions): The expression for
4312 the predicate is side-effect free if it does not contain any
4313 variable references.
4315 2015-10-16 Bob Duff <duff@adacore.com>
4317 * a-convec.adb ("="): Previous version depended
4318 on "=" composing, but that doesn't quite work -- we want the "="
4319 operator passed in to the generic. So we need a loop after all.
4321 2015-10-16 Yannick Moy <moy@adacore.com>
4323 * sem_util.adb (Is_Object_Reference): Attribute 'Loop_Entry produces
4325 * sem_ch6.adb: Minor fix in comment.
4327 2015-10-16 Bob Duff <duff@adacore.com>
4329 * a-contai.ads: Add two check names: Container_Checks and
4330 Tampering_Check. Move the tampering check machinery from
4331 Ada.Containers.Vectors to Ada.Containers. Later we can share it
4332 with other containers.
4333 Disable the tampering machinery in the presence of
4334 Suppress(Tampering_Check).
4335 Simplify the implementation of tampering checks. E.g. use RAII
4336 to make incrementing/decrementing of the counts more concise.
4337 * a-contai.adb: New package body, implementing the above.
4338 * a-convec.ads, a-convec.adb: Use tampering check machinery
4340 Disable all checking code when checks are suppressed.
4341 Simplify many of the operations. Implement "&" in terms of Append,
4342 rather than "by hand".
4343 Remove: function "=" (L, R : Elements_Array) return Boolean is
4344 abstract; so we can call the predefined "=" on Elements_Array.
4345 For "=" on Vectors: Previously, we returned True immediately if
4346 Left'Address = Right'Address. That seems like a non-optimization
4347 ("if X = X" is unusual), so removed that. Simplify by using
4348 slice comparison ("=" on Element_Array will automatically call
4349 "=" on the components, even if user defined).
4351 2015-10-16 Ed Schonberg <schonberg@adacore.com>
4353 * sem_ch13.adb (Chek_Record_Representation_Clause): When
4354 iterating over components, skip anonymous subtypes created for
4355 constrained array components.
4357 2015-10-16 Eric Botcazou <ebotcazou@adacore.com>
4359 * a-tags.ads (Parent_Size): Remove obsolete pragma Export.
4360 * s-finmas.ads (Header_Offset): Delete.
4361 * s-finmas.adb (Header_Offset): Likewise.
4362 (Finalize): Call Header_Size instead of Header_Offset.
4363 * s-stposu.adb (Allocate_Any_Controlled): Likewise.
4364 (Deallocate_Any_Controlled): Likewise.
4366 2015-10-16 Arnaud Charlet <charlet@adacore.com>
4368 * a-exetim.ads, a-exetim-mingw.ads, a-exetim-default.ads: Whitespace
4370 * s-osprim-mingw.adb, einfo.ads, sem_util.adb, sem_util.ads,
4371 sem_ch4.adb, sem_ch13.adb, s-trasym.adb, s-trasym.ads,
4372 s-taprop-posix.adb: Minor reformatting.
4374 2015-10-16 Bob Duff <duff@adacore.com>
4376 * adadecode.h, adadecode.c (ada_demangle): Remove
4377 ada_demangle, no longer used.
4378 * a-except-2005.adb: Bring System.Traceback.Symbolic into the
4381 2015-10-16 Ed Schonberg <schonberg@adacore.com>
4383 * sem_util.adb, sem_util.ads (Get_Reference_Discriminant): Utility to
4384 locate the access discriminant that supports implicit dereference on a
4386 (Is_OK_Variable_For_Out_Parameter): Reject other illegal uses
4387 of Implicit_Dereference on an access_to_constant when actual
4388 parameter is a rewritten variable or function call.
4390 2015-10-16 Bob Duff <duff@adacore.com>
4392 * a-tags.adb, s-trasym.adb, s-trasym.ads: Make sure we don't get
4393 elaboration circularities when polling is turned on.
4395 2015-10-16 Ed Schonberg <schonberg@adacore.com>
4397 * sem_ch3.adb (Replace_Anonymous_Access_To_Protected_Subprogram):
4398 When creating a full declaration for a formal parameter, the
4399 entity is labelled as an Itype, so set Associated_Node_For_Itype
4401 * einfo.ads: Clarify use of Associated_Node_For_Itype.
4403 2015-10-16 Bob Duff <duff@adacore.com>
4405 * bindgen: Move pragmas Warnings earlier, otherwise
4406 we can get warnings on with_clauses.
4408 2015-10-16 Arnaud Charlet <charlet@adacore.com>
4410 * s-osprim-mingw.adb, s-osprim-x32.adb, s-taprop-mingw.adb,
4411 s-taprop-posix.adb (Monotonic_Clock): Removed, not used.
4412 Remove remaining references to OS_Primitives.Monotonic_Clock.
4413 Keep it only on windows which is a special case.
4415 2015-10-16 Javier Miranda <miranda@adacore.com>
4417 * a-textio.adb (Get_Line): Fix documentation.
4418 * einfo.ads (Interface_Name): Fix documentation.
4419 * exp_aggr.adb (Backend_Processing_Possible): Fix documentation.
4420 * exp_ch4.adb (Expand_N_In): Fix documentation.
4422 2015-10-16 Eric Botcazou <ebotcazou@adacore.com>
4424 * inline.adb (Subp_Info): Remove Listed component.
4425 (Add_Inlined_Subprogram): Take an entity instead of an index.
4426 Do not set Listed component to True.
4427 (New_Entry): Do not initialize Listed component to False.
4428 (Analyze_Inlined_Bodies): Do not test Listed component
4429 (Must_Inline): Add calls not in the main unit only
4430 if they are in a subprogram that can be inlined outside its unit.
4431 (Add_Inlined_Body): Move test around and add comment.
4433 2015-10-16 Arnaud Charlet <charlet@adacore.com>
4435 * sinfo.ads, einfo.ads: monir clean ups.
4437 2015-10-16 Arnaud Charlet <charlet@adacore.com>
4439 * usage.adb, debug.adb, a-except.adb, a-except.ads, a-except-2005.adb,
4440 a-except-2005.ads, s-imgrea.adb: Minor code clean ups related to
4441 jgnat/dotnet removal.
4443 2015-10-16 Arnaud Charlet <charlet@adacore.com>
4445 * s-osprim-vxworks.adb, s-osprim-darwin.adb, s-tadeca.adb,
4446 s-osprim-unix.adb, s-osprim-solaris.adb, s-osprim-posix.adb,
4447 s-osprim.ads (Monotonic_Clock): Removed, unused.
4449 2015-10-16 Ed Schonberg <schonberg@adacore.com>
4451 * sem_ch4.adb (Try_Object_Operation, Try_One_Interpretation):
4452 Do not reset the Obj_Type of the prefix if an interpretation
4453 involves an untagged type, to prevent a crash when analyzing an
4454 illegal program in All_Errors mode.
4456 2015-10-16 Hristian Kirtchev <kirtchev@adacore.com>
4458 * exp_ch4.adb (Expand_N_Expression_With_Actions):
4459 Force the evaluation of the expression when its type is Boolean.
4460 (Force_Boolean_Evaluation): New routine.
4462 2015-10-16 Bob Duff <duff@adacore.com>
4464 * sem_util.adb (Has_Discrim_Dep_Array): Remove
4465 this function, and the call. No longer needed now that the back
4466 end can handle such things. Should result in further speedups
4469 2015-10-16 Ed Schonberg <schonberg@adacore.com>
4471 * sem_ch13.adb (Build_Predicate_Functions): If expression for
4472 predicate is side-effect free, indicate that the predicate
4473 function is pure, to allow for optimization of redundant
4476 2015-10-16 Arnaud Charlet <charlet@adacore.com>
4478 * checks.adb: Fix typo.
4479 * s-osinte-linux.ads: Add header.
4480 * projects.texi: Removed, no longer used.
4481 * gcc-interface/Make-lang.in: Update dependencies
4482 * s-multip.adb: Minor: fix header.
4483 * sem_ch3.adb, exp_ch7.adb, g-dirope.ads, sinfo.ads, types.ads,
4484 a-textio.adb, s-exctra.adb, ali.adb, back_end.ads, exp_intr.adb,
4485 a-tigeli.adb, exp_ch3.adb, s-os_lib.ads: Remove further references to
4487 * gnatlink.adb, opt.ads, exp_aggr.adb, s-solita.adb: Minor comment
4490 2015-10-16 Gary Dismukes <dismukes@adacore.com>
4492 * exp_ch9.adb (Build_Simple_Entry_Call): Set_Is_Internal on
4493 the temporary object used for a by-copy entry parameter, to
4494 ensure that the object doesn't get its No_Initialization flag
4495 reset later in Default_Initialize_Object. Also, generate the
4496 assignment of the actual to the temporary in the additional case
4497 of a scalar out parameter whose type has a Default_Value aspect.
4498 * exp_ch3.adb: Fix minor typo in comment.
4500 2015-10-16 Hristian Kirtchev <kirtchev@adacore.com>
4502 * exp_util.adb, sem_util.ads, sem_ch6.adb, sem_ch7.adb, sem_ch8.adb:
4504 * sem_ch12.adb (Analyze_Formal_Package_Declaration): Set the
4505 SPARK_Mode from the context.
4507 2015-10-16 Bob Duff <duff@adacore.com>
4509 * sem_util.adb (Requires_Transient_Scope):
4510 If Typ is a generic formal incomplete type, look at the actual
4511 type. Otherwise, we don't notice that the actual type is tagged,
4512 has a variant part, etc, causing a mismatch of calling conventions
4513 between caller and callee.
4515 2015-10-16 Hristian Kirtchev <kirtchev@adacore.com>
4517 * einfo.ads: Move the declaration of enumeration
4518 literal E_Abstract_State above E_Entry. Update the upper bound
4519 of subtype Overloadable_Kind.
4521 2015-10-16 Gary Dismukes <dismukes@adacore.com>
4523 * exp_attr.adb: Minor editorial changes.
4525 2015-10-16 Arnaud Charlet <charlet@adacore.com>
4527 * exp_ch5.adb, sem_ch3.adb, frontend.adb, exp_ch7.adb, exp_ch7.ads,
4528 sem_ch5.adb, sem_type.adb, exp_util.adb, exp_util.ads, comperr.adb,
4529 exp_attr.adb, sinfo.ads, exp_ch9.adb, make.adb, usage.adb,
4530 lib-writ.adb, sem_ch9.adb, bindgen.adb, debug.adb, einfo.adb,
4531 einfo.ads, types.ads, checks.adb, sem_prag.adb, s-tasini.adb,
4532 rtsfind.ads, freeze.adb, sem_util.adb, sem_util.ads, exp_dbug.adb,
4533 gnatlink.adb, gnat1drv.adb, targparm.adb, targparm.ads, exp_ch4.adb,
4534 exp_ch11.adb, repinfo.adb, s-soflin.adb, s-soflin.ads, exp_ch6.adb,
4535 exp_ch13.adb, sem_mech.adb, sem_ch6.adb, par-prag.adb, exp_disp.adb,
4536 sem_ch8.adb, exp_disp.ads, snames.adb-tmpl, exp_aggr.adb, sem_eval.adb,
4537 exp_intr.adb, sem_ch13.adb, snames.ads-tmpl, sem_disp.adb, exp_ch3.adb:
4538 Code clean up: remove special handling for .NET and JVM.
4540 2015-10-16 Arnaud Charlet <charlet@adacore.com>
4542 * sem_ch12.adb: Minor punctuation fix in comment
4543 * s-rident.ads: Minor consistency fix in comment
4544 * exp_attr.adb, g-spipat.ads: punctuation fixes in comments.
4545 * restrict.ads: Style fix in comments.
4546 * sem_prag.adb: Minor grammar fix in comment
4548 2015-10-16 Gary Dismukes <dismukes@adacore.com>
4550 * sem_ch12.adb: Minor reformatting/rewording.
4552 2015-10-16 Arnaud Charlet <charlet@adacore.com>
4554 * einfo.ads: Minor fix of duplicate words
4555 * rident.ads: Minor style fix in comment
4557 2015-10-16 Hristian Kirtchev <kirtchev@adacore.com>
4559 * exp_ch3.adb (Expand_N_Full_Type_Declaration): Do not capture,
4560 set and restore the Ghost mode.
4561 (Expand_N_Object_Declaration): Do not capture, set and restore the
4563 (Freeze_Type): Redo the capture and restore of the Ghost mode.
4564 (Restore_Globals): Removed.
4565 * exp_ch5.adb (Expand_N_Assignment_Statement): Redo the capture
4566 and restore of the Ghost mode.
4567 (Restore_Globals): Removed.
4568 * exp_ch6.adb (Expand_N_Procedure_Call_Statement):
4569 Redo the capture and restore of the Ghost mode.
4570 (Expand_N_Subprogram_Body): Redo the capture, set and restore
4572 (Expand_N_Subprogram_Declaration): Do not
4573 capture, set and restore the Ghost mode.
4574 (Restore_Globals): Removed.
4575 * exp_ch7.adb (Expand_N_Package_Body): Redo the capture, set
4576 and restore of the Ghost mode.
4577 (Expand_N_Package_Declaration): Do not capture, set and restore the
4579 * exp_ch8.adb (Expand_N_Exception_Renaming_Declaration):
4580 Redo the capture and restore of the Ghost mode.
4581 (Expand_N_Object_Renaming_Declaration): Redo
4582 the capture and restore of the Ghost mode.
4583 (Expand_N_Package_Renaming_Declaration):
4584 Redo the capture and restore of the Ghost mode.
4585 (Expand_N_Subprogram_Renaming_Declaration): Redo the capture
4586 and restore of the Ghost mode.
4587 * exp_ch11.adb Remove with and use clauses for Ghost.
4588 (Expand_N_Exception_Declaration): Do not capture, set and restore
4590 * exp_disp.adb (Make_DT): Redo the capture and restore of the
4592 (Restore_Globals): Removed.
4593 * exp_prag.adb (Expand_Pragma_Check): Do not capture, set
4594 and restore the Ghost mode.
4595 (Expand_Pragma_Contract_Cases):
4596 Redo the capture and restore of the Ghost mode. Preserve the
4597 original context of contract cases by setting / resetting the
4598 In_Assertion_Expr counter.
4599 (Expand_Pragma_Initial_Condition):
4600 Redo the capture and restore of the Ghost mode.
4601 (Expand_Pragma_Loop_Variant): Redo the capture and restore of
4603 (Restore_Globals): Removed.
4604 * exp_util.adb (Make_Predicate_Call): Redo the capture and
4605 restore of the Ghost mode.
4606 (Restore_Globals): Removed.
4607 * freeze.adb (Freeze_Entity): Redo the capture and restore of
4609 (Restore_Globals): Removed.
4610 * ghost.adb (Check_Ghost_Context): Remove the RM reference from
4612 (Is_OK_Statement): Account for statements
4613 that appear in assertion expressions.
4614 (Is_Subject_To_Ghost):
4616 * ghost.ads (Is_Subject_To_Ghost): Moved to body.
4617 * rtsfind.ads (Load_RTU): Redo the capture and restore of the
4619 * sem.adb Add with and use clauses for Ghost.
4621 the capture and restore of the Ghost mode. Set the Ghost mode
4622 when analyzing a declaration.
4623 (Do_Analyze): Redo the capture
4624 and restore of the Ghost mode.
4625 * sem_ch3.adb (Analyze_Full_Type_Declaration): Do not capture, set
4626 and restore the Ghost mode.
4627 (Analyze_Incomplete_Type_Decl):
4628 Do not capture, set and restore the Ghost mode.
4629 (Analyze_Number_Declaration): Do not capture, set and restore the
4631 (Analyze_Object_Declaration): Do not capture, set and
4632 restore the Ghost mode.
4633 (Analyze_Private_Extension_Declaration):
4634 Do not capture, set and restore the Ghost mode.
4635 (Analyze_Subtype_Declaration): Do not capture, set and restore
4637 (Restore_Globals): Removed.
4638 * sem_ch5.adb (Analyze_Assignment): Redo the capture and restore
4640 (Restore_Globals): Removed.
4641 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration):
4642 Do not capture, set and restore the Ghost mode.
4643 (Analyze_Procedure_Call): Redo the capture and restore of the
4645 (Analyze_Subprogram_Body_Helper): Redo the capture
4646 and restore of the Ghost mode. (Analyze_Subprogram_Declaration):
4647 Do not capture, set and restore the Ghost mode.
4648 (Restore_Globals): Removed.
4649 * sem_ch7.adb (Analyze_Package_Body_Helper): Redo the capture and
4650 restore of the Ghost mode.
4651 (Analyze_Package_Declaration):
4652 Do not capture, set and restore the Ghost mode.
4653 (Analyze_Private_Type_Declaration): Do not capture, set and
4654 restore the Ghost mode.
4655 (Restore_Globals): Removed.
4656 * sem_ch8.adb (Analyze_Exception_Renaming): Do not capture,
4657 set and restore the Ghost mode.
4658 (Analyze_Generic_Renaming): Do not capture, set and restore the Ghost
4660 (Analyze_Object_Renaming): Do not capture, set and restore the
4662 (Analyze_Package_Renaming): Do not capture, set and restore the Ghost
4664 (Analyze_Subprogram_Renaming): Do not capture, set and restore the
4666 (Restore_Globals): Removed.
4667 * sem_ch11.adb (Analyze_Exception_Declaration): Do not capture,
4668 set and restore the Ghost mode.
4669 * sem_ch12.adb (Analyze_Generic_Package_Declaration):
4670 Do not capture, set and restore the Ghost mode.
4671 (Analyze_Generic_Subprogram_Declaration): Do not capture, set
4672 and restore the Ghost mode.
4673 * sem_ch13.adb (Build_Invariant_Procedure_Declaration): Redo
4674 the capture and restore of the Ghost mode.
4675 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
4676 Redo the capture and restore of the Ghost mode.
4677 (Analyze_External_Property_In_Decl_Part):
4678 Redo the capture and restore of the Ghost mode.
4679 (Analyze_Initial_Condition_In_Decl_Part): Redo the
4680 capture and restore of the Ghost mode. (Analyze_Pragma):
4681 Do not capture, set and restore the Ghost mode for Assert.
4682 Redo the capture and restore of the Ghost mode for Check. Do
4683 not capture and restore the Ghost mode for Invariant.
4684 (Analyze_Pre_Post_Condition_In_Decl_Part): Redo the capture and
4685 restore of the Ghost mode.
4686 * sem_res.adb (Resolve): Capture, set and restore the Ghost mode
4687 when resolving a declaration.
4688 * sem_util.adb (Build_Default_Init_Cond_Procedure_Body):
4689 Redo the capture and restore of the Ghost mode.
4690 (Build_Default_Init_Cond_Procedure_Declaration): Redo the capture
4691 and restore of the Ghost mode.
4693 2015-10-16 Bob Duff <duff@adacore.com>
4695 * debug.adb: Document -gnatdQ switch.
4697 2015-10-16 Ed Schonberg <schonberg@adacore.com>
4699 * sem_ch12.adb (Analyze_Formal_Subprogram): Implement rule that
4700 a formal abstract subprogram cannot have a null default: RM 12.6
4703 2015-10-16 Bob Duff <duff@adacore.com>
4705 * sem_util.ads, sinput.ads, bcheck.adb: Minor comment fixes.
4707 2015-10-16 Javier Miranda <miranda@adacore.com>
4709 * inline.adb (Add_Inlined_Body): Ensure that
4710 Analyze_Inlined_Bodies will be invoked after completing the
4711 analysis of the current unit.
4713 2015-10-16 Arnaud Charlet <charlet@adacore.com>
4715 * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order): Fix error
4716 message for bad last bit position.
4717 * sem_ch3.adb, sem_util.adb, sem_util.ads: Minor reformatting.
4719 2015-10-16 Ed Schonberg <schonberg@adacore.com>
4721 * exp_ch5.adb (Expand_N_Case_Statement): If expression is
4722 compile-time known but does not obey a static predicate on
4723 its type, replace the case statement with a raise statement,
4724 as with other statically detected constraint violations.
4726 2015-10-16 Bob Duff <duff@adacore.com>
4728 * s-traceb.adb, s-traceb.ads, s-traceb-hpux.adb, s-traceb-mastop.adb:
4730 * opt.ads: Minor typo.
4732 2015-10-16 Ed Schonberg <schonberg@adacore.com>
4734 * sem_util.adb (Gather_Components): When gathering components
4735 of a nested variant, the record type used in legality checks is
4736 the enclosing record type.
4738 2015-10-13 Jakub Jelinek <jakub@redhat.com>
4740 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10,
4741 DEF_FUNCTION_TYPE_11): Define.
4743 2015-10-09 Eric Botcazou <ebotcazou@adacore.com>
4745 * gcc-interface/Make-lang.in: Make sure that GNAT1_OBJS and not just
4746 GNAT1_ADA_OBJS are compiled only after generated files are created.
4748 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
4750 * gcc-interface/trans.c (convert_with_check): Use real_arithmetic
4751 instead of REAL_ARITHMETIC.
4753 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
4755 * gcc-interface/trans.c (convert_with_check): Use real_less instead
4756 of REAL_VALUES_LESS.
4758 2015-10-02 Doug Rupp <rupp@adacore.com>
4759 Olivier Hainque <hainque@adacore.com>
4761 * gcc-interface/lang.opt (fbuiltin-printf): Accept.
4762 * gcc-interface/misc.c (gnat_handle_option): Ignore it.
4763 * gcc-interface/lang-specs.h (@ada, @adawhy, @adascil): Propagate -f*
4764 flags as -g* and -m* flags past -gnatez.
4766 2015-10-02 Eric Botcazou <ebotcazou@adacore.com>
4768 * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Warnings>: Replace
4769 linear search with call to find_opt and issue warnings if the -W
4770 switch is not appropriate.
4772 2015-10-02 Eric Botcazou <ebotcazou@adacore.com>
4774 * gcc-interface/ada-tree.h (DECL_RESTRICTED_ALIASING_P): New flag.
4775 * gcc-interface/decl.c (gnat_to_gnu_param): For parameters passed by
4776 reference but whose type isn't by-ref and whose mechanism hasn't been
4777 forced to by-ref, set the DECL_RESTRICTED_ALIASING_P flag directly on
4778 them instead of changing their type.
4779 * gcc-interface/trans.c (scan_rhs_r): New helper function.
4780 (independent_iterations_p): New predicate.
4781 (Loop_Statement_to_gnu): For a loop with an iteration scheme, set an
4782 ivdep pragma if the iterations are independent.
4784 2015-10-02 Eric Botcazou <ebotcazou@adacore.com>
4786 * gcc-interface/trans.c (find_loop_for): Use FOR_EACH_VEC_ELT_REVERSE.
4787 (Loop_Statement_to_gnu): Use FOR_EACH_VEC_ELT.
4788 (finalize_nrv): Use FOR_EACH_VEC_SAFE_ELT and initialize field.
4789 (build_stmt_group): Add blank lines.
4791 2015-09-30 Thomas Schwinge <thomas@codesourcery.com>
4793 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_11): Don't define.
4795 2015-09-28 Tom de Vries <tom@codesourcery.com>
4797 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_6): Define.
4799 2015-09-17 Eric Botcazou <ebotcazou@adacore.com>
4801 * gcc-interface/trans.c (emit_check): Do not touch TREE_SIDE_EFFECTS.
4803 2015-09-14 Pierre-Marie de Rodat <derodat@adacore.com>
4805 * gcc-interface/misc.c (gnat_post_options): Issue a warning if
4806 generating STABS debugging information when not the default.
4808 2015-09-14 Eric Botcazou <ebotcazou@adacore.com>
4810 * gcc-interface/gigi.h (ref_filename): Delete.
4811 (Sloc_to_locus): Add clean_column parameter defaulting to false.
4812 (build_call_raise): Adjust comment.
4813 (build_call_raise_range): Move around.
4814 * gcc-interface/trans.c (ref_filename): Delete.
4815 (gigi): Fix formatting.
4816 (block_end_locus_sink): Delete.
4817 (Sloc_to_locus1): Tidy up and reformat. Rename into...
4818 (Sloc_to_locus): ...this. Add default for clean_colmun parameter.
4819 (set_expr_location_from_node1): Rename into...
4820 (set_expr_location_from_node): ...this.
4821 (set_end_locus_from_node): Move around. Adjust for renaming.
4822 (Handled_Sequence_Of_Statements_to_gnu): Likewise.
4823 (add_cleanup): Likewise.
4824 * gcc-interface/utils2.c (expand_sloc): New static function.
4825 (build_call_raise): Call it.
4826 (build_call_raise_column): Likewise.
4827 (build_call_raise_range): Likewise. Move around.
4829 2015-09-14 Eric Botcazou <ebotcazou@adacore.com>
4831 * gcc-interface/utils2.c (gnat_rewrite_reference) <COMPOUND_EXPR>: Add
4832 another acceptable pattern for the RHS.
4834 2015-07-24 Micahel Darling <darlingm@gmail.com>
4837 * prj-nmsc.adb: Reflects renaming of configure.in to configure.ac
4838 * gcc-interface/Makefile.in: Likewise
4840 2015-07-12 Aldy Hernandez <aldyh@redhat.com>
4842 * gcc-interface/utils.c: Fix double word typos.
4843 * gnat_ugn.texi: Same.
4846 * projects.texi: Same.
4847 * sem_ch4.adb: Same.
4848 * sem_ch6.adb: Same.
4849 * sem_dim.adb: Same.
4850 * sem_eval.adb: Same.
4851 * sem_prag.adb: Same.
4852 * sem_warn.adb: Same.
4854 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
4856 * gcc-interface/cuintp.c: Adjust includes.
4857 * gcc-interface/decl.c: Likewise.
4858 * gcc-interface/misc.c: Likewise.
4859 * gcc-interface/targtyps.c: Likewise.
4860 * gcc-interface/trans.c: Likewise.
4861 * gcc-interface/utils.c: Likewise.
4862 * gcc-interface/utils2.c: Likewise.
4864 2015-07-06 John Marino <gnugcc@marino.st>
4866 * s-oscons-tmplt.c: Add support for DragonFly alongside FreeBSD.
4868 2015-06-29 Eric Botcazou <ebotcazou@adacore.com>
4871 * gcc-interface/utils.c (gnat_write_global_declarations): Always
4872 build the dummy global variable if code was generated.
4874 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4877 * gcc-interface/misc.c (gnat_post_options): No need to disable
4878 warn_unused_parameter anymore.
4880 2015-06-26 Eric Botcazou <ebotcazou@adacore.com>
4882 * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): When
4883 not optimizing the CFG, clear the DECL_DECLARED_INLINE_P flag on the
4886 2015-06-26 Eric Botcazou <ebotcazou@adacore.com>
4888 * gcc-interface/gigi.h (note_types_used_by_globals): Delete.
4889 (gnat_write_global_declarations): New prototype.
4890 * gcc-interface/utils.c (type_decls): Rename back to...
4891 (global_decls): ...this.
4892 (gnat_pushdecls): Revert previous change.
4893 (create_var_decl): Do not output global variables.
4894 (note_types_used_by_globals): Rename back to...
4895 (gnat_write_global_declarations): ...this. Output variables on the
4896 global_decls vector.
4897 * gcc-interface/misc.c (gnat_parse_file): Adjust to above renaming.
4899 2015-06-26 Eric Botcazou <ebotcazou@adacore.com>
4901 * gcc-interface/gigi.h (create_var_decl_1): Rename into...
4902 (create_var_decl): ...this. Add default value for last parameter.
4903 (create_type_stub_decl): Adjust.
4904 (create_type_decl): Likewise.
4905 (create_field_decl): Likewise.
4906 (create_param_decl): Likewise.
4907 (create_label_decl): Likewise.
4908 (create_subprog_decl): Likewise.
4909 * gcc-interface/utils.c (create_var_decl_1): Rename into...
4910 (create_var_decl): ...this. Rename var_name into name and var_init
4911 into init, move const_decl_allowed_p last and adjust accordingly.
4912 (create_type_stub_decl): Rename type_name into name and adjust.
4913 (create_type_decl): Likewise.
4914 (create_field_decl): Likewise for field_name and field_type.
4915 (create_param_decl): Likewise for param_name and param_type.
4916 (create_label_decl): Likewise for label_name.
4917 (create_subprog_decl): Likewise for subprog_name and subprog_type.
4918 * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust couple of calls
4919 to create_var_decl_1.
4921 2015-06-26 Eric Botcazou <ebotcazou@adacore.com>
4923 * gcc-interface/trans.c (loop_info_d): Add low_bound, high_bound,
4924 artificial, has_checks and warned_aggressive_loop_optimizations.
4925 (gigi): Set warn_aggressive_loop_optimizations to 0.
4926 (inside_loop_p): New inline predicate.
4927 (push_range_check_info): Rename into...
4928 (find_loop_for): ...this and do not push range_check_info_d object.
4929 (Loop_Statement_to_gnu): Set artificial, low_bound and high_bound
4930 fields of gnu_loop_info. Adjust detection of checks enabled by
4931 -funswitch-loops and adds one for -faggressive-loop-optimizations.
4932 (gnat_to_gnu) <N_Indexed_Component>: If aggressive loop optimizations
4933 are enabled, warn for loops overrunning an array of size 1 not at the
4936 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
4938 * gcc-interface/trans.c: Remove ipa-ref.h and plugin-api.h from include
4940 * gcc-interface/utils.c: Likewise.
4942 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
4944 * gcc-interface/decl.c (value_annotation_hasher): Inherit from
4945 ggc_cache_ptr_hash rather than ggc_cache_hasher.
4946 * gcc-interface/utils.c (pad_type_hasher): Likewise.
4948 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
4950 * gcc-interface/decl.c (value_annotation_hasher::handle_cache_entry):
4952 (value_annotation_hasher::keep_cache_entry): New function.
4953 * gcc-interface/utils.c (pad_type_hasher::handle_cache_entry):
4955 (pad_type_hasher::keep_cache_entry): New function.
4957 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
4959 * gcc-interface/misc.c: Include calls.h not function.h.
4961 2015-06-19 Eric Botcazou <ebotcazou@adacore.com>
4963 * gcc-interface/gigi.h (record_builtin_type): Adjust comment.
4964 (tree create_type_decl): Likewise.
4965 (create_var_decl_1): Add artificial_p and debug_info_p parameters.
4966 (create_var_decl): Likewise.
4967 (create_true_var_decl): Delete.
4968 (create_subprog_decl): Add debug_info_p parameter.
4969 * gcc-interface/decl.c (gnat_to_gnu_entity): Add artificial_p local
4970 variable and use it throughout. Remove DECL_ARTIFICIAL settings.
4971 <E_Variable>: Adjust calls to create_var_decl and create_var_decl_1.
4972 Remove DECL_IGNORED_P settings.
4973 <E_Enumeration_Type>: Likewise.
4974 <E_Record_Type>: Likewise.
4975 <E_Subprogram_Type>: Likewise. Remove artificial_flag local variable.
4976 Adjust call to create_subprog_decl.
4977 (get_minimal_subprog_decl): Likewise.
4978 (elaborate_expression_1): Adjust call to create_var_decl.
4979 * gcc-interface/trans.c (gigi): Adjust calls to create_var_decl and
4980 create_subprog_decl. Remove DECL_ARTIFICIAL & DECL_IGNORED_P settings.
4981 * gcc-interface/utils.c (maybe_pad_type): Likewise.
4982 (record_builtin_type): Adjust comment.
4983 (create_type_stub_decl): Remove obsolete comment.
4984 (create_var_decl_1): Add artificial_p and debug_info_p parameters.
4985 Set DECL_ARTIFICIAL and DECL_IGNORED_P accordingly.
4986 (create_subprog_decl): Add debug_info_p parameter. Set DECL_IGNORED_P
4989 2015-06-19 Eric Botcazou <ebotcazou@adacore.com>
4991 * gcc-interface/misc.c (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): Define.
4993 2015-06-19 Eric Botcazou <ebotcazou@adacore.com>
4995 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Make sure
4996 the size of a padding type built around the return type is positive.
4997 * gcc-interface/trans.c (gnat_to_gnu) <N_Simple_Return_Statement>:
4998 Use INIT_EXPR instead of MODIFY_EXPR to assign to the return object.
5000 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
5002 * gcc-interface/cuintp.c: Do not include input.h, line-map.h or is-a.h.
5003 * gcc-interface/decl.c: Likewise.
5004 * gcc-interface/misc.c: Likewise.
5005 * gcc-interface/targtyps.c: Likewise.
5006 * gcc-interface/trans.c: Likewise.
5007 * gcc-interface/utils.c: Likewise.
5008 * gcc-interface/utils2.c: Likewise.
5010 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
5012 * gcc-interface/utils.c (get_global_context): Register the main
5013 translation unit through the new debug hook.
5015 2015-06-09 Eric Botcazou <ebotcazou@adacore.com>
5017 * gcc-interface/misc.c: Remove duplicate include directives.
5018 * gcc-interface/trans.c: Likewise.
5019 * gcc-interface/utils.c: Likewise.
5021 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
5023 * gcc-interface/cuintp.c : Adjust include files.
5024 * gcc-interface/decl.c : Likewise.
5025 * gcc-interface/misc.c : Likewise.
5026 * gcc-interface/targtyps.c : Likewise.
5027 * gcc-interface/trans.c : Likewise.
5028 * gcc-interface/utils.c : Likewise.
5029 * gcc-interface/utils2.c : Likewise.
5031 2015-06-08 John Marino <gnugcc@marino.st>
5033 * a-intnam-dragonfly.ads: New.
5034 * s-osinte-dragonfly.adb: Likewise.
5035 * s-osinte-dragonfly.ads: Likewise.
5036 * system-dragonfly-x86_64.ads: Likewise.
5037 * adaint.c: Add BSD macros.
5038 * cstreams.c: Likewise.
5039 * gsocket.h: Likewise.
5041 * socket.c: Likewise.
5042 * env.c: Add __DragonFly__, remove __FreeBSD__ macro.
5043 * init.c: Add __DragonFly__, change __gnat_install_handler
5044 prototype from empty to void.
5045 * initialize.c: Add __DragonFly__.
5046 * sysdep.c: Likewise.
5047 * s-osinte-freebsd.adb: Use __get_errno instead of __error.
5048 * tracebak.c: Set unwinder for i386 BSD.
5049 * gcc-interface/Makefile.in: Add x86_64 DragonFly, tweak
5050 x86_64 FreeBSD and x86 FreeBSD.
5052 2015-06-06 Eric Botcazou <ebotcazou@adacore.com>
5054 * gcc-interface/utils.c (note_types_used_by_globals): Tweak comment.
5055 * gcc-interface/decl.c (gnat_to_gnu_entity): Likewise.
5057 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
5059 * gcc-interface/gigi.h (note_types_used_by_globals): Rename from
5060 gnat_write_global_declarations.
5061 * gcc-interface/misc.c (gnat_parse_file): Call
5062 note_types_used_by_globals.
5063 Remove LANG_HOOKS_WRITE_GLOBALS.
5064 * gcc-interface/utils.c: Rename global_decls to type_decls.
5065 (gnat_write_global_declarations): Rename
5066 to note_types_used_by_globals.
5067 Remove call to finalize_compilation_unit.
5068 Remove call to debug_hooks->global_decl for globals.
5069 (gnat_pushdecls): Only insert into type_decls if TYPE_DECL.
5071 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
5073 * gcc-interface/cuintp.c: Adjust includes for restructured coretypes.h.
5074 * gcc-interface/decl.c: Likewise.
5075 * gcc-interface/misc.c: Likewise.
5076 * gcc-interface/targtyps.c: Likewise.
5077 * gcc-interface/trans.c: Likewise.
5078 * gcc-interface/utils.c: Likewise.
5079 * gcc-interface/utils2.c: Likewise.
5081 2015-06-04 Pierre-Marie de Rodat <derodat@adacore.com>
5083 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: If
5084 processing a definition, create definitions for padding types
5085 around return types.
5087 2015-06-03 Eric Botcazou <ebotcazou@adacore.com>
5089 * gcc-interface/utils.c (copy_type): Also set TYPE_CANONICAL.
5091 2015-06-03 Eric Botcazou <ebotcazou@adacore.com>
5093 * gcc-interface/trans.c (gnat_to_gnu) <N_Simple_Return_Statement>: Fix
5094 typo in latest change.
5096 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
5098 * gcc-interface/Makefile.in: Fix ARM/Darwin configuration.
5100 2015-06-01 Pierre-Marie de Rodat <derodat@adacore.com>
5102 * gcc-interface/utils.c (scale_by_factor_of): When handling a function
5103 call expression, process the corresponding function body. Also handle
5106 2015-06-01 Pierre-Marie de Rodat <derodat@adacore.com>
5108 * gcc-interface/decl.c (gnat_to_gnu_entity): Replace pointer types with
5109 references ones for functions that return references.
5111 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
5113 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: For a
5114 definition of a type coming from a limited_with, get to the full view
5115 if it is not in the main code unit.
5117 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
5119 * gcc-interface/utils.c (create_var_decl_1): If an assembler name is
5120 specified, let the target mangle it before settting.
5121 (create_subprog_decl): Likewise and move this treatment last.
5123 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
5125 * gcc-interface/lang-specs.h (TARGET_VXWORKS_RTP): Move substitution to
5126 before first -gnatez switch. Simplify and add trailing space.
5128 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
5130 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: If the
5131 record has a parent field and a representation clause, make sure that
5132 it is properly aligned.
5134 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
5136 * gcc-interface/trans.c (lvalue_required_p) <N_Indexed_Component>: Deal
5137 with character and enumeration literals as index values.
5139 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
5141 * gcc-interface/gigi.h (build_simple_component_ref): Declare.
5142 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Deal with
5143 address clause on aliased object with unconstrained nominal subtype.
5144 Mark the aligning variable as artificial, do not convert the address
5145 expression immediately but mark it as constant instead.
5146 * gcc-interface/utils.c (convert): If the target type contains a
5147 template, be prepared for an empty array.
5148 (maybe_unconstrained_array): Likewise.
5149 * gcc-interface/utils2.c (known_alignment) <POINTER_PLUS_EXPR>: Deal
5150 with the pattern built for aligning types.
5151 <INTEGER_CST>: Do not cap the value at BIGGEST_ALIGNMENT.
5152 (build_simple_component_ref): Make public.
5153 If the base object is a constructor that contains a template, fold the
5154 result field by field.
5156 2015-05-31 Eric Botcazou <ebotcazou@adacore.com>
5158 * s-oscons-tmplt.c: Add explicit tests for Android alongside Linux.
5160 2015-05-30 Eric Botcazou <ebotcazou@adacore.com>
5162 * adaint.c: Test for __linux__ instead of linux and __sun__ instead
5163 of sun. Add missing leading underscore to AIX. Remove #elif 0.
5164 * adaint.h: Likewise.
5166 * cstreams.c: Likewise.
5168 * gsocket.h: Likewise.
5169 * init.c: Likewise. Test for __i386__ instead of i386.
5171 * s-oscons-tmplt.c: Likewise.
5172 * sysdep.c: Likewise.
5173 * terminals.c: Likewise. Use BSD symbol instead of FREEBSD.
5174 * tracebak.c: Likewise. Test for __sparc__ instead of sparc.
5176 2015-05-28 Eric Botcazou <ebotcazou@adacore.com>
5178 * gcc-interface/utils.c (max_size) <tcc_binary>: Add special code to
5179 deal with the subtraction of a "negative" value in an unsigned type.
5181 2015-05-28 Eric Botcazou <ebotcazou@adacore.com>
5183 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Do
5184 not error out on a return type which has a size that overflows if the
5185 return is done by invisible reference.
5187 2015-05-28 Eric Botcazou <ebotcazou@adacore.com>
5189 * gcc-interface/utils.c (gnat_pushdecl): Reunify the handling of array
5190 and pointer types wrt DECL_ORIGINAL_TYPE and adjust left and right.
5192 2015-05-28 Eric Botcazou <ebotcazou@adacore.com>
5194 * gcc-interface/gigi.h (gnat_stabilize_reference): Adjust.
5195 (rewrite_fn): Remove third parameter.
5196 (type_is_padding_self_referential): New inline predicate.
5197 (return_type_with_variable_size_p): Likewise.
5198 * gcc-interface/decl.c (allocatable_size_p): More around.
5199 (cannot_be_superflat_p): Rename into...
5200 (cannot_be_superflat ): ...this.
5201 (initial_value_needs_conversion): New predicate.
5202 (gnat_to_gnu_entity): Invoke type_is_padding_self_referential,
5203 initial_value_needs_conversion and adjust to above renaming.
5204 For a renaming, force the materialization if the inner expression
5205 is compound. Adjust calls to elaborate_reference and build a
5206 compound expression if needed.
5207 (struct er_dat): Add N field.
5208 (elaborate_reference_1): Remove N parameter and adjust.
5209 (elaborate_reference): Add INIT parameter and pass it in the call to
5210 gnat_rewrite_reference. Adjust initial expression.
5211 * gcc-interface/trans.c (Call_to_gnu): Treat renamings the same way as
5212 regular object declarations when it comes to creating a temporary.
5213 Adjust call to gnat_stabilize_reference and build a compound expression
5214 if needed. Invoke return_type_with_variable_size_p.
5215 (gnat_to_gnu): Invoke type_is_padding_self_referential. In case #4,
5216 return a call to a function unmodified if it returns with variable size
5217 and is also the initial expression in an object declaration.
5218 * gcc-interface/utils2.c (build_binary_op) <INIT_EXPR>: Use the RHS'
5219 type if it is a call to a function that returns with variable size.
5220 (build_unary_op): Invoke type_is_padding_self_referential.
5221 (gnat_stabilize_reference_1): Remove N parameter and adjust.
5222 (gnat_stabilize_reference): Add INIT parameter and pass it in the call
5223 to gnat_rewrite_reference.
5224 (gnat_rewrite_reference): Remove N, add INIT parameter and adjust.
5225 <COMPOUND_EXPR>: New case.
5227 2015-05-28 Ed Schonberg <schonberg@adacore.com>
5229 * sem_ch3.adb (Is_Visible_Component): Component is visible
5230 in a derived type if inherited through an ancestor that has a
5231 partial view of the original type holding the component, if the
5232 full view of that original type is in scope.
5233 * sem_util.ads (Get_Body_From_Stub): Works for all kinds of stubs.
5235 2015-05-28 Bob Duff <duff@adacore.com>
5237 * sem_util.adb (Requires_Transient_Scope): For definite untagged
5238 subtypes, we should never have to use the secondary stack. This moves
5239 toward that goal. But there are still cases that don't work.
5240 Here, we move the check for Is_Definite first, but add a
5241 special-purpose check for Has_Discrim_Dep_Array.
5243 2015-05-28 Bob Duff <duff@adacore.com>
5245 * sem_util.adb (Requires_Transient_Scope): Avoid returning
5246 function results on the secondary stack in so many cases.
5248 2015-05-28 Ed Schonberg <schonberg@adacore.com>
5250 * sem_util.adb (Wrong_Type): In any instance, do not emit error
5251 if type of expression is the partial view of the expected type.
5253 2015-05-28 Ed Schonberg <schonberg@adacore.com>
5255 * sem_res.adb (Resolve_Actuals): a) The replacement of formal
5256 names in named associations only needs to be done within an
5257 instance, on a call to a primitive of a formal derived type,
5258 where the actual subprogram may have different formal names than
5259 those of the primitive operation of the formal type.
5260 b) Defaulted parameters must be taken into account when obtaining
5261 the names of the formals of the actual subprogram being called.
5263 2015-05-28 Robert Dewar <dewar@adacore.com>
5265 * sem_ch13.adb, sem_disp.ads: Minor reformatting.
5267 2015-05-28 Ed Schonberg <schonberg@adacore.com>
5269 * sem_util.adb (Set_Debug_Info_Needed): For a private type
5270 whose full view is itself a derived private type, set flag on
5271 underlying full view as well, for proper gdb display.
5273 2015-05-28 Bob Duff <duff@adacore.com>
5275 * exp_tss.ads: Minor comment fix.
5276 * exp_ch3.adb (Build_Array_Init_Proc, Build_Record_Init_Proc):
5277 Inline init_procs when the type has controlled parts. Remove
5278 obsolete comments about those init_procs -- init_procs for
5279 such types are no longer complex. A typical init_proc just
5280 initializes the 'Tag field, and calls the parent init_proc
5281 (e.g. for Limited_Controlled), which calls the grandparent
5282 (for Root_Controlled), which does nothing. This all boils down
5283 to one instruction when inlined.
5284 * exp_ch7.adb (Create_Finalizer): Inline the finalizer.
5286 2015-05-28 Ed Schonberg <schonberg@adacore.com>
5288 * sem_ch4.adb (Analyze_Selected_Component): If the type to use
5289 is a derived type and is a generic actual, the selected component
5290 appears within an instance body, and the check over the type
5291 has failed, examine ancestor types for the desired component.
5292 (Find_Component_In_Instance): If record type is a derived type,
5293 examine all ancestors in order to locate desired component.
5295 2015-05-27 H.J. Lu <hongjiu.lu@intel.com>
5297 * gcc-interface/Makefile.in (TOOLS_LIBS): Add @NO_PIE_FLAG@.
5299 2015-05-27 Eric Botcazou <ebotcazou@adacore.com>
5301 * gcc-interface/trans.c (elaborate_all_entities): Do not elaborate an
5302 incomplete type coming from a limited_with and whose non-limited view
5303 comes from the main unit.
5305 2015-05-27 Eric Botcazou <ebotcazou@adacore.com>
5307 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Move down
5308 code applying atomic checks to the object.
5310 2015-05-27 Robert Dewar <dewar@adacore.com>
5312 * sem_aux.adb: Minor rewording.
5314 2015-05-27 Bob Duff <duff@adacore.com>
5316 * exp_prag.adb (Expand_Pragma_Abort_Defer): Make
5317 pragma Abort_Defer do nothing if Abort_Allowed is False.
5319 2015-05-27 Arnaud Charlet <charlet@adacore.com>
5321 * exp_ch9.adb, sem_util.adb, sem_util.ads, s-stposu.adb, s-spsufi.ads,
5322 sem_elab.ads, g-comlin.ads, errout.ads, exp_ch6.adb, sem_ch4.adb,
5323 opt.ads, s-bignum.adb, output.ads, sem_ch13.adb, erroutc.ads,
5324 sem_disp.ads, exp_ch3.adb: Minor fixes of duplicate words in comments.
5326 2015-05-27 Doug Rupp <rupp@adacore.com>
5328 * adaint.c (__gnat_tmp_name) [vxworks]: Robustify and use for rtp as
5331 2015-05-27 Pierre-Marie de Rodat <derodat@adacore.com>
5333 * par_sco.adb (Process_Decision): Store sloc to
5334 condition/pragmas SCOs associations into a temporary table before
5335 moving them to the SCO_Raw_Hash_Table so that we can back them
5336 out just like we do for SCO entries that are simple decisions
5337 in an expression context.
5339 2015-05-27 Ed Schonberg <schonberg@adacore.com>
5341 * sem_ch6.adb (Process_Formals): A non-private formal type that
5342 is a limited view does not have a list of private dependents.
5344 2015-05-27 Ed Schonberg <schonberg@adacore.com>
5346 * exp_ch5.adb (Expand_N_Case_Statement): If the expression in
5347 the case statement is a compile-time known value, we look for a
5348 corresponding alternative to optimize the case statement into a
5349 single case. If the type has a static predicate and the expression
5350 does not satisfy the predicate, there is no legal alternative and
5351 this optimization is not applicable. Excecution is erroneous,
5352 or else if assertions are enabled, an exception will be raised
5353 earlier, at the point the expression is elaborated.
5355 2015-05-27 Robert Dewar <dewar@adacore.com>
5357 * sem_elab.adb (Check_Internal_Call_Continue): Suppress
5358 warning on Finalize, Adjust, or Initialize if type involved has
5361 2015-05-27 Ed Schonberg <schonberg@adacore.com>
5363 * sem_aux.adb, sem_aux.ads (First_Discriminant): Return empty when
5364 applied to a type with no known discriminants.
5366 2015-05-26 Robert Dewar <dewar@adacore.com>
5368 * errout.ads, sem_ch4.adb, sem_ch6.adb: Minor reformatting.
5370 2015-05-26 Bob Duff <duff@adacore.com>
5372 * sem_elab.adb (Check_A_Call): In the case where we're
5373 calling something in an instance of a generic package that is
5374 within this same unit (as the call), make sure we treat it
5375 as a call to an entity within the same unit. That is, call
5376 Check_Internal_Call, rather than putting "Elaborate_All(X)"
5377 on X, which would necessarily result in an elaboration cycle in
5378 static-elaboration mode.
5380 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
5382 * freeze.ads (Is_Atomic_VFA_Aggregate): Adjust profile.
5383 * freeze.adb (Is_Atomic_VFA_Aggregate): Change Entity
5384 parameter into Node parameter and remove Type parameter.
5385 Look at Is_Atomic_Or_VFA both on the type and on the object.
5386 (Freeze_Entity): Adjust call to Is_Atomic_VFA_Aggregate.
5387 * exp_aggr.adb (Expand_Record_Aggregate): Likewise.
5388 (Process_Atomic_Independent_Shared_Volatile): Remove code
5389 propagating Atomic or VFA from object to locally-defined type.
5391 2015-05-26 Bob Duff <duff@adacore.com>
5393 * exp_ch7.adb: Minor comment fix.
5395 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
5397 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Min/Attr_Max>: Do not
5398 bother about NaN's if Machine_Overflows is true.
5400 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
5402 * gcc-interface/trans.c (gnat_to_gnu) <N_Object_Declaration>: Really
5403 force evaluation of the expression, if any, when the object has its
5404 elaboration delayed. Do not create a variable at global level.
5406 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
5408 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Machine>: Do not apply
5409 extra-precision trick to literals. Build SAVE_EXPR manually.
5411 * gcc-interface/misc.c (enumerate_modes): Add bypass for x86/x86-64.
5413 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
5415 * gcc-interface/ada-tree.h (DECL_GLOBAL_NONCONSTANT_RENAMING_P): Delete
5416 (DECL_RENAMED_OBJECT): Adjust comment.
5417 * gcc-interface/gigi.h (record_global_nonconstant_renaming): Delete.
5418 (invalidate_global_nonconstant_renamings): Likewise.
5419 (gnat_constant_reference_p): Likewise.
5420 (rewrite_fn): New function type.
5421 (gnat_rewrite_reference): Declare.
5422 (call_is_atomic_load): New inline predicate.
5423 * gcc-interface/decl.c (elaborate_reference_1): New function.
5424 (elaborate_reference): Likewise.
5425 (gnat_to_gnu_entity): Call elaborate_reference to elaborate renamings
5426 and simplify associated code. Set const_flag to true consistently in
5427 conjunction with used_by_ref.
5428 * gcc-interface/trans.c (Identifier_to_gnu): Always replace renaming
5429 pointers by renamed objects.
5430 (outer_atomic_access_required_p): Deal with renamings.
5431 (Compilation_Unit_to_gnu): Do not call
5432 invalidate_global_nonconstant_renamings.
5433 (gnat_to_gnu) <N_Object_Renaming_Declaration>: Adjust comment.
5434 (gnat_gimplify_expr): Deal with atomic loads.
5435 * gcc-interface/utils.c (global_nonconstant_renamings): Delete.
5436 (destroy_gnat_utils): Do not call
5437 invalidate_global_nonconstant_renamings.
5438 (record_global_nonconstant_renaming): Delete.
5439 (invalidate_global_nonconstant_renamings): Likewise.
5440 * gcc-interface/utils2.c (call_is_atomic_load): Move to gigi.h.
5441 (build_load_modify_store): Build a copy of the destination.
5442 (gnat_stabilize_reference_1): Adjust.
5443 (gnat_stabilize_reference): Call gnat_stabilize_reference_1 through
5444 gnat_rewrite_reference and move bulk of code to...
5445 (gnat_rewrite_reference): ...here. New global function.
5446 (gnat_constant_reference_p): Delete.
5448 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
5450 * gcc-interface/gigi.h (gnat_stabilize_reference): Adjust prototype.
5451 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not rely on const_flag
5452 to detect constant renamings. Be prepared for specific pattern of
5453 renamed object based on function calls. Create a constant object
5454 for the renaming of a NULL_EXPR or of a CONSTRUCTOR. Adjust calls
5455 to gnat_stabilize_reference and tidy up. Remove redundant tests.
5456 (elaborate_expression_1): Remove obsolete test and tidy up.
5457 * gcc-interface/trans.c (Call_to_gnu): Do not stabilize In/Out or Out
5458 parameters passed by reference.
5459 (gnat_to_gnu) <N_Selected_Component>: Remove redundant protection again
5461 Use gnat_protect_expr instead of gnat_stabilize_reference for general
5462 protection against side-effects.
5463 * gcc-interface/utils2.c (gnat_stable_expr_p): New predicate.
5464 (gnat_save_expr): Invoke it.
5465 (gnat_protect_expr): Likewise.
5466 (gnat_stabilize_reference_1): Likewise. Remove useless propagation
5467 of TREE_THIS_NOTRAP.
5468 (gnat_stabilize_reference): Remove parameter and adjust throughout.
5469 Delete ADDR_EXDR, COMPOUND_EXPR and CONSTRUCTOR cases.
5470 Restrict CALL_EXPR case to atomic loads and tweak ERROR_MARK case.
5472 2015-05-26 Ed Schonberg <schonberg@adacore.com>
5474 * sinfo.ads: Minor reformatting.
5475 * sem_aux.ads: Clarify use of First_Discriminant.
5476 * sem_ch4.adb (Analyze_Explicit_Dereference): The use of a limited
5477 view is replaced with the non-limited view in an instance body,
5478 where the enclosing unit must have a regular with_clause on the
5480 * sem_ch12.adb (Install_Body): Freeze instantation after its
5481 body. Remove useless freeze nodes for incomplete actuals to
5482 prevent multiple generation of internal operations.
5483 (Instantiate_Package_Body): Set sloc of body appropriately when
5484 there are incomplete actuals and the instance body is placed in
5485 the body of the enclosing unit.
5486 * errout.ads: Consistent punctuation, better alignment and trivial
5488 * err_vars.ads: Fix typo.
5490 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
5492 * sem_ch8.adb (Analyze_Object_Renaming): Lift restriction on
5493 components of Volatile_Full_Access objects.
5495 2015-05-26 Ed Schonberg <schonberg@adacore.com>
5497 * sem_ch6.adb (Is_Non_Overriding_Operation,
5498 Get_Generic_Parent_Type): Handle properly the case of a derived
5499 scalar type by using the first subtype rather than its generated
5500 anonymous base type.
5502 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
5504 * einfo.adb (Write_Field17_Name): Move E_Incomplete_Subtype
5506 (Write_Field19_Name): ...here.
5508 2015-05-26 Ed Schonberg <schonberg@adacore.com>
5510 * sem_ch13.adb: sem_ch13.adb (Add_Predicates): Undo analysis
5511 of original expression in ASIS mode: does not solve the ASIS
5512 problem of a usable type information, and crashes the back-end
5513 when performing type annotations.
5515 2015-05-26 Robert Dewar <dewar@adacore.com>
5517 * sem_disp.adb (Inherited_Subprograms): Add One_Only parameter.
5518 (Is_Overriding_Subprogram): Use One_Only_Parameter.
5519 * sem_disp.ads (Inherited_Subprograms): Add One_Only parameter.
5521 2015-05-26 Robert Dewar <dewar@adacore.com>
5523 * exp_prag.adb, sem_ch3.adb, sem_ch5.adb, exp_ch11.adb, ghost.adb,
5524 exp_ch6.adb, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb, sem_ch13.adb,
5525 exp_ch3.adb: Minor reformatting.
5527 2015-05-26 Bob Duff <duff@adacore.com>
5529 * treepr.adb: Minor improvement to debugging routines (pp, pn)
5530 robustness. Rearrange the code so passing a nonexistent Node_Id
5531 prints "No such node" rather than crashing, and causing gdb to
5532 generate confusing messages.
5534 2015-05-26 Gary Dismukes <dismukes@adacore.com>
5536 * sem_util.adb: Minor typo fix.
5538 2015-05-26 Yannick Moy <moy@adacore.com>
5540 * sem_aux.adb (Subprogram_Body_Entity): Deal with subprogram stubs.
5542 2015-05-26 Hristian Kirtchev <kirtchev@adacore.com>
5544 * exp_ch3.adb (Expand_N_Full_Type_Declaration): Capture, set and
5545 restore the Ghost mode.
5546 (Expand_N_Object_Declaration): Capture, set and restore the Ghost mode.
5547 (Freeze_Type): Update the call to Set_Ghost_Mode.
5548 (Restore_Globals): New routine.
5549 * exp_ch5.adb Add with and use clauses for Ghost.
5550 (Expand_N_Assignment_Statement): Capture, set and restore the
5552 (Restore_Globals): New routine.
5553 * exp_ch6.adb Add with and use clauses for Ghost.
5554 (Expand_N_Procedure_Call_Statement): Capture, set and
5555 restore the Ghost mode.
5556 (Expand_N_Subprogram_Body):
5557 Code cleanup. Capture, set and restore the Ghost mode.
5558 (Expand_N_Subprogram_Declaration): Capture, set and restore the
5560 (Restore_Globals): New routine.
5561 * exp_ch7.adb Add with and use clauses for Ghost.
5562 (Expand_N_Package_Body): Capture, set and restore the Ghost mode.
5563 (Expand_N_Package_Declaration): Capture, set and restore the
5565 (Wrap_HSS_In_Block): Create a proper identifier for the block.
5566 * exp_ch8.adb Add with and use clauses for Ghost.
5567 (Expand_N_Exception_Renaming_Declaration): Code
5568 cleanup. Capture, set and restore the Ghost mode.
5569 (Expand_N_Object_Renaming_Declaration): Capture, set and restore
5571 (Expand_N_Package_Renaming_Declaration): Capture, set and restore the
5573 (Expand_N_Subprogram_Renaming_Declaration): Capture, set and
5574 restore the Ghost mode.
5575 * exp_ch11.adb (Expand_N_Exception_Declaration): Code
5576 cleanup. Capture, set and restore the Ghost mode.
5577 * exp_disp.adb (Make_DT): Update the call to Set_Ghost_Mode. Do
5578 not initialize the dispatch table slot of a Ghost subprogram.
5579 * exp_prag.adb Add with and use clauses for Ghost.
5580 (Expand_Pragma_Check): Capture, set and restore the Ghost mode.
5581 (Expand_Pragma_Contract_Cases): Capture, set and restore the
5583 (Expand_Pragma_Initial_Condition): Capture, set and
5584 restore the Ghost mode.
5585 (Expand_Pragma_Loop_Variant): Capture,
5586 set and restore the Ghost mode.
5587 (Restore_Globals): New routine.
5588 * exp_util.adb Add with and use clauses for Ghost.
5589 (Make_Predicate_Call): Code cleanup. Capture, set and restore
5591 (Restore_Globals): New routine.
5592 * freeze.adb (Freeze_Entity): Code cleanup. Update the call
5594 * ghost.adb Add with and use clause for Sem_Prag.
5595 (Check_Ghost_Completion): Code cleanup.
5596 (Check_Ghost_Overriding): New routine.
5597 (Check_Ghost_Policy): Code cleanup.
5598 (Ghost_Entity): New routine.
5599 (Is_Ghost_Declaration): Removed.
5600 (Is_Ghost_Statement_Or_Pragma): Removed.
5601 (Is_OK_Context): Reimplemented.
5602 (Is_OK_Declaration): New routine.
5603 (Is_OK_Pragma): New routine.
5604 (Is_OK_Statement): New routine.
5605 (Mark_Full_View_As_Ghost): New routine.
5606 (Mark_Pragma_As_Ghost): New routine.
5607 (Mark_Renaming_As_Ghost): New routine.
5608 (Propagate_Ignored_Ghost_Code): Update the comment on usage.
5609 (Set_From_Entity): New routine.
5610 (Set_From_Policy): New routine.
5611 (Set_Ghost_Mode): This routine now handles pragmas and freeze nodes.
5612 (Set_Ghost_Mode_For_Freeze): Removed.
5613 (Set_Ghost_Mode_From_Entity): New routine.
5614 (Set_Ghost_Mode_From_Policy): Removed.
5615 * ghost.ads (Check_Ghost_Overriding): New routine.
5616 (Mark_Full_View_As_Ghost): New routine.
5617 (Mark_Pragma_As_Ghost): New routine.
5618 (Mark_Renaming_As_Ghost): New routine.
5619 (Set_Ghost_Mode): Update the parameter profile. Update the
5621 (Set_Ghost_Mode_For_Freeze): Removed.
5622 (Set_Ghost_Mode_From_Entity): New routine.
5623 * sem_ch3.adb (Analyze_Full_Type_Declaration):
5624 Capture and restore the Ghost mode. Mark a type
5625 as Ghost regardless of whether it comes from source.
5626 (Analyze_Incomplete_Type_Decl): Capture, set and restore the
5628 (Analyze_Number_Declaration): Capture and restore the Ghost mode.
5629 (Analyze_Object_Declaration): Capture and restore the Ghost mode.
5630 (Analyze_Private_Extension_Declaration): Capture and
5631 restore the Ghost mode.
5632 (Analyze_Subtype_Declaration): Capture and restore the Ghost mode.
5633 (Process_Full_View): The full view inherits all Ghost-related
5634 attributes from the private view.
5635 (Restore_Globals): New routine.
5636 * sem_ch5.adb (Analyze_Assignment): Capture and restore the
5638 (Restore_Globals): New routine.
5639 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration):
5640 Code cleanup. Capture and restore the Ghost mode. Mark a
5641 subprogram as Ghost regarless of whether it comes from source.
5642 (Analyze_Procedure_Call): Capture and restore the Ghost mode.
5643 (Analyze_Subprogram_Body_Helper): Capture and restore the Ghost mode.
5644 (Analyze_Subprogram_Declaration): Capture and restore the Ghost mode.
5645 (New_Overloaded_Entity): Ensure that a
5646 parent subprogram and an overriding subprogram have compatible
5648 * sem_ch7.adb (Analyze_Package_Body_Helper): Capture and restore
5650 (Analyze_Package_Declaration): Capture and
5651 restore the Ghost mode. Mark a package as Ghost when it is
5652 declared in a Ghost region.
5653 (Analyze_Private_Type_Declaration): Capture and restore the Ghost mode.
5654 (Restore_Globals): New routine.
5655 * sem_ch8.adb (Analyze_Exception_Renaming): Code
5656 reformatting. Capture and restore the Ghost mode. A renaming
5657 becomes Ghost when its name references a Ghost entity.
5658 (Analyze_Generic_Renaming): Capture and restore the Ghost mode. A
5659 renaming becomes Ghost when its name references a Ghost entity.
5660 (Analyze_Object_Renaming): Capture and restore the Ghost mode. A
5661 renaming becomes Ghost when its name references a Ghost entity.
5662 (Analyze_Package_Renaming): Capture and restore the Ghost mode. A
5663 renaming becomes Ghost when its name references a Ghost entity.
5664 (Analyze_Subprogram_Renaming): Capture and restore the Ghost
5665 mode. A renaming becomes Ghost when its name references a
5667 * sem_ch11.adb (Analyze_Exception_Declaration): Capture, set
5668 and restore the Ghost mode.
5669 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Capture and
5670 restore the Ghost mode.
5671 (Analyze_Generic_Subprogram_Declaration):
5672 Capture and restore the Ghost mode.
5673 * sem_ch13.adb Add with and use clauses for Ghost.
5674 (Add_Invariant): New routine.
5675 (Add_Invariants): Factor out code.
5676 (Add_Predicate): New routine.
5677 (Add_Predicates): Factor out code.
5678 (Build_Invariant_Procedure_Declaration): Code cleanup. Capture,
5679 set and restore the Ghost mode.
5680 (Build_Invariant_Procedure): Code cleanup.
5681 (Build_Predicate_Functions): Capture, set and
5682 restore the Ghost mode. Mark the generated functions as Ghost.
5683 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
5684 Capture, set and restore the Ghost mode.
5685 (Analyze_External_Property_In_Decl_Part): Capture, set and restore
5687 (Analyze_Initial_Condition_In_Decl_Part):
5688 Capture, set and restore the Ghost mode.
5690 Code cleanup. Capture, set and restore the Ghost mode. Flag
5691 pragmas Linker_Section, No_Return, Unmodified, Unreferenced and
5692 Unreferenced_Objects as illegal when it applies to both Ghost
5693 and living arguments. Pragma Ghost cannot apply to synchronized
5695 (Check_Kind): Moved to the spec of Sem_Prag.
5696 (Process_Inline): Flag the pragma as illegal when it applies to
5697 both Ghost and living arguments.
5698 (Restore_Globals): New routine.
5699 * sem_prag.ads Add pragma Default_Initial_Condition
5700 to table Assertion_Expression_Pragma. Add new table
5701 Is_Aspect_Specifying_Pragma.
5702 (Check_Kind): Moved from body of Sem_Prag.
5703 * sem_util.adb Add with and use clauses for Ghost.
5704 (Build_Default_Init_Cond_Procedure_Body): Capture, set and restore
5706 (Build_Default_Init_Cond_Procedure_Declaration):
5707 Capture, set and restore the Ghost mode. Mark the default
5708 initial condition procedure as Ghost when it is declared
5710 (Is_Renaming_Declaration): New routine.
5711 (Policy_In_List): Account for the single argument version of
5713 * sem_util.ads (Is_Renaming_Declaration): New routine.
5714 * sinfo.adb (Is_Ghost_Pragma): New routine.
5715 (Set_Is_Ghost_Pragma): New routine.
5716 * sinfo.ads New attribute Is_Ghost_Pragma.
5717 (Is_Ghost_Pragma): New routine along with pragma Inline.
5718 (Set_Is_Ghost_Pragma): New routine along with pragma Inline.
5720 2015-05-26 Robert Dewar <dewar@adacore.com>
5722 * sem_ch3.adb, sem_aux.adb, sem_aux.ads, exp_ch6.adb, sprint.adb:
5725 2015-05-26 Gary Dismukes <dismukes@adacore.com>
5727 * gnat1drv.adb, targparm.adb, targparm.ads, restrict.adb: Minor
5728 reformatting and typo fixes in comments.
5730 2015-05-26 Ed Schonberg <schonberg@adacore.com>
5732 * sem_ch7.adb (Swap_Private_Dependets): Set visibility of
5733 the two views of a private dependent in two separate steps,
5734 to ensure proper visibility in parent units analyzed for inlining.
5736 2015-05-26 Yannick Moy <moy@adacore.com>
5738 * sem_aux.adb, sem_aux.ads (Get_Low_Bound): Use Type_Low_Bound.
5739 (Package_Body, Package_Spec): New queries moved
5740 here from GNATprove.
5741 (Package_Specification): Simplify query to remove use of loop.
5742 * sem_util.adb, sem_util.ads (Enclosing_Declaration,
5743 Enclosing_Package_Or_Subprogram, Is_Attribute_Update): New
5744 queries moved here from GNATprove.
5746 2015-05-26 Bob Duff <duff@adacore.com>
5748 * einfo.adb, einfo.ads, sprint.adb, lib-xref.ads: Minor cleanup: Remove
5749 obsolete Entity_Kinds E_String_Type and E_String_Subtype. Update
5750 redundant assertions.
5752 2015-05-26 Gary Dismukes <dismukes@adacore.com>
5754 * sem_util.adb, sem_util.ads, sem_ch13.adb: Minor typo fixes.
5756 2015-05-26 Doug Rupp <rupp@adacore.com>
5758 * init.c [vxworks]: Refine previous checkin.
5760 2015-05-26 Robert Dewar <dewar@adacore.com>
5762 * exp_ch4.adb (Wrap_MA): New function.
5763 (Expand_N_Op_Expon): Use Wrap_MA.
5765 2015-05-26 Bob Duff <duff@adacore.com>
5767 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
5768 Do not use secondary stack to return limited records with
5769 defaulted discriminants. This is an efficiency improvement.
5770 * exp_ch6.adb, exp_dist.adb, sem_attr.adb, sem_aux.adb, sem_aux.ads,
5771 sem_ch12.adb, sem_ch3.adb, sem_ch4.adb, sem_ch6.adb, sem_ch7.adb,
5772 sem_util.adb: Change the sense of Is_Indefinite_Subtype to be
5773 Is_Definite_Subtype. This is an improvement to readability (the double
5774 negative in "not Is_Indefinite_Subtype" was slightly confusing). Also
5775 disallow passing non-[sub]type entities, an unnecessary and slightly
5776 bug-prone flexibility.
5778 2015-05-26 Robert Dewar <dewar@adacore.com>
5780 * sem_aggr.adb (Resolve_Array_Aggregate): Defend against
5782 * debug.adb: Document -gnatd.k.
5783 * erroutc.adb (Set_Msg_Insertion_Line_Number): Implement -gnatd.k.
5785 2015-05-26 Robert Dewar <dewar@adacore.com>
5787 * gnat1drv.adb (Gnat1drv): Provide new arguments for
5788 Get_Target_Parameters.
5789 * restrict.adb (Set_Restriction_No_Specification_Of_Aspect):
5791 (Set_Restriction_No_Use_Of_Attribute): new procedure.
5792 * restrict.ads (Set_Restriction_No_Specification_Of_Aspect):
5794 (Set_Restriction_No_Use_Of_Attribute): new procedure.
5795 * s-rident.ads (Integer_Parameter_Restrictions): New subtype.
5796 * targparm.adb (Get_Target_Parameters): Allow new restriction
5797 pragmas No_Specification_Of_Aspect No_Use_Of_Attribute
5799 * targparm.ads: New parameters for Get_Target_Parameters.
5800 * tbuild.adb (Set_NOD): New name for Set_RND.
5801 (Set_NSA): New procedure.
5802 (Set_NUA): New procedure.
5803 (Set_NUP): New procedure.
5804 * tbuild.ads (Make_SC): Minor reformatting.
5805 (Set_NOD): New name for Set_RND.
5806 (Set_NSA, Set_NUA, Set_NUP): New procedure.
5808 2015-05-26 Ed Schonberg <schonberg@adacore.com>
5810 * a-stwise.adb (Find_Token): If source'first is not positive,
5811 an exception must be raised, as specified by RM 2005 A.4.3
5812 (68/1). This must be checked explicitly, given that run-time
5813 files are normally compiled without constraint checks.
5814 * a-stzsea.adb (Find_Token): Ditto.
5816 2015-05-26 Ed Schonberg <schonberg@adacore.com>
5818 * sem_util.ads sem_util.adb (Is_Current_Instance): New predicate
5819 to fully implement RM 8.6 (17/3). which earlier only applied
5820 to synchronized types. Used to preanalyze aspects that include
5821 current instances of types, such as Predicate and Invariant.
5822 * sem_res.adb (Resolve_Entity_Name): Use Is_Current_Instance.
5823 * sem_ch13.adb (Add_Predicates): In ASIS mode, preserve original
5824 expression of aspect and analyze it to provide proper type
5827 2015-05-26 Robert Dewar <dewar@adacore.com>
5829 * rtsfind.ads: Add entries for RE_Exn[_Long]_Float.
5830 * s-exnllf.adb (Exn_Float): New function.
5831 (Exn_Long_Float): New function.
5832 (Exn_Long_Long_Float): Rewritten interface.
5833 (Exp): New name for what used to be Exn_Long_Long_Float.
5834 * s-exnllf.ads (Exn_Float): New function.
5835 (Exn_Long_Float): New function.
5837 2015-05-26 Ed Schonberg <schonberg@adacore.com>
5839 * sem_ch8.adb (Find_Selected_Component): Do not emit an error
5840 on a selected component when the prefix is a type name that is
5842 * einfo.ads: Minor grammar fix.
5844 2015-05-26 Doug Rupp <rupp@adacore.com>
5846 * init.c [vxworks] (sysLib.h): Only for x86.
5848 2015-05-26 Doug Rupp <rupp@adacore.com>
5850 * init-vxsim.c (CPU): define as __VXSIM_CPU__
5851 * sigtramp-vxworks-vxsim.c (CPU): Likewise.
5852 sigtramp-vxworks-target.inc: Add check for SIMLINUX.
5853 * sigtramp.h: Likewise.
5855 2015-05-26 Robert Dewar <dewar@adacore.com>
5857 * sem_aux.adb, sem_disp.adb, sem_util.ads: Add comment.
5858 * sem_util.adb: Minor reformatting
5860 2015-05-26 Yannick Moy <moy@adacore.com>
5862 * inline.adb (Has_Initialized_Type): Adapt to new names.
5863 * sem_aux.adb, sem_aux.ads (Get_Low_Bound, Number_Components,
5864 Subprogram_Body, Subprogram_Body_Entity, Subprogram_Spec,
5865 Subprogram_Specification): New query functions used in GNATprove.
5866 * sem_disp.adb, sem_disp.ads (Is_Overriding_Subprogram): New
5867 query functions used in GNATprove.
5868 * sem_util.adb, sem_util.adso (Enclosing_Lib_Unit_Node,
5869 Get_Cursor_Type, Get_Return_Object, Get_User_Defined_Eq,
5870 Is_Double_Precision_Floating_Point_Type,
5871 Is_Single_Precision_Floating_Point_Type): New query functions
5874 2015-05-26 Bob Duff <duff@adacore.com>
5876 * s-rpc.ads (Partition_ID): Increase maximum Partition_ID to
5878 * a-except-2005.adb, a-except-2005.ads, a-except.adb,
5879 a-except.ads, a-exexda.adb, a-exstat.adb: Minor comment fixes.
5881 2015-05-26 Robert Dewar <dewar@adacore.com>
5883 * sinfo.adb: Minor comment addition.
5884 * einfo.adb: Minor whitespace and punctuation fix.
5885 * sem_util.adb: Minor editing of comments.
5887 2015-05-26 Ed Schonberg <schonberg@adacore.com>
5889 * sem_ch7.adb (Install_Private_Declarations,
5890 Swap_Private_Dependents): Ensure that both views of the dependent
5891 subtype are immediately visible if we are within their scope. This
5892 may be needed when a procedure body is both the parent of an
5893 instantiated child unit, and is itself used to inline a local
5896 2015-05-26 Gary Dismukes <dismukes@adacore.com>
5898 * exp_prag.adb, gnat1drv.adb: Minor reformatting.
5900 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
5902 * exp_ch4.adb (Expand_N_Indexed_Component): In the circuit
5903 detecting exceptions to the rewriting, deal with implicit
5904 dereferences in the selected component case.
5906 2015-05-26 Bob Duff <duff@adacore.com>
5908 * sem_ch13.adb (Analyze_One_Aspect): Do not
5909 require the expression of the Disable_Controlled aspect to be
5910 static in a generic template, because 'Enabled is not known
5913 2015-05-26 Doug Rupp <rupp@adacore.com>
5915 * init-vxsim.c: New file for vxsim ZCX
5916 * sigtramp-vxworks-vxsim.c: Likewise.
5917 * sigtramp-vxworks.c: Factor out target dependent bits into ...
5918 * sigtramp-vxworks-target.inc: ... here.
5919 * sigtramp.h: Add vxsim zcx protos.
5920 * init.c [vxworks...] (sysLib.h): Include.
5921 (__gnat_map_signal): Make global.
5922 [...i386] (__gnat_error_handler): Call __gnat_vxsim_error_handler if
5924 [...i386] (__gnat_install_handler): Test if on vxsim.
5926 2015-05-26 Ed Schonberg <schonberg@adacore.com>
5928 * sem_ch5.adb (Analyze_Iterator_Specification): For an element
5929 iterator over an array, if the component is aliased, the loop
5930 variable is aliased as well.
5932 2015-05-26 Ed Schonberg <schonberg@adacore.com>
5934 * exp_ch6.adb (Expand_Actuals): For a function call with in-out
5935 parameters that is rewritten as an expression_with_actions,
5936 we preserve the original function call node for further use by
5937 the caller (typically Expand_Call). In the presence of validity
5938 checks, that function call, though it is labelled Analyzed to
5939 prevent an infinite recursion, may be rewritten as a temporary
5940 by Remove_Side_Effects. Ensure that the caller has access to
5941 the original function call to continue expansion.
5942 * atree.ads: Minor typo in comment.
5944 2015-05-26 Javier Miranda <miranda@adacore.com>
5946 * sem_util.adb (Check_Function_Writable_Actuals):
5947 Add missing support to check the violation of writable actuals
5948 in array aggregates that have a nonstatic range.
5950 2015-05-26 Hristian Kirtchev <kirtchev@adacore.com>
5952 * exp_ch6.adb (Process_Contract_Cases_For): Update the call to
5953 Expand_Pragma_Contract_Cases.
5954 * exp_prag.ads, exp_prag.adb (Expand_Contract_Cases): Rename to
5955 Expand_Pragma_Contract_Cases.
5956 * sem_ch13.adb (Add_Invariants): Use the original aspect name
5957 when creating the arguments of pragma Check. This ensures that
5958 'Class is properly recognized and handled.
5960 2015-05-26 Arnaud Charlet <charlet@adacore.com>
5962 * gnat1drv.adb: Minor adjustments.
5963 (Adjust_Global_Switches): Disable some related flags in CodePeer mode.
5964 * sem_ch4.adb (Has_Arbitrary_Evaluation_Order,
5965 Stop_Subtree_Climbind): Code cleanup.
5966 * einfo.ads: Minor comment change.
5968 2015-05-26 Javier Miranda <miranda@adacore.com>
5970 * sem_aggr.adb (Resolve_Aggregate, Resolve_Extension_Aggregate):
5972 * sem_ch3.adb (Build_Derived_Record_Type,
5973 Record_Type_Declaration): Code cleanup.
5974 * sem_ch4.adb (Has_Arbitrary_Evaluation_Order,
5975 Stop_Subtree_Climbind): Tables which speed up the identification
5976 of dangerous calls to Ada 2012 functions with writable actuals
5978 (Analyze_Arithmetic_Op, Analyze_Call, Analyze_Comparison_Op,
5979 Analyze_Equality_Op, Analyze_Logical_Op, Analyze_Membership_Op,
5980 Analyze_Range): Code cleanup.
5981 (Is_Arbitrary_Evaluation_Order_Construct): Removed.
5982 (Check_Writable_Actuals): Code cleanup using the added tables.
5983 * sem_util.adb (Check_Function_Writable_Actuals): Return
5984 immediately if the node does not have the flag Check_Actuals
5987 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
5989 * exp_ch6.adb (Add_Call_By_Copy_Code): Remove restrictive
5990 condition in the detection of the effects of Remove_Side_Effects.
5991 * exp_util.ads (Remove_Side_Effects): Add general and historical note.
5992 * exp_util.adb (Is_Name_Reference): New predicate.
5993 (Remove_Side_Effects): Use it in lieu of Is_Object_Reference
5994 in order to decide whether to use the renaming to capture the
5995 side effects of the subexpression.
5996 (Side_Effect_Free): Remove obsolete test.
5998 2015-05-26 Robert Dewar <dewar@adacore.com>
6000 * aspects.ads, aspects.adb: Add aspect Disable_Controlled.
6001 * einfo.ads, einfo.adb (Disable_Controlled): New flag.
6002 (Is_Controlled_Active): New function.
6003 * exp_ch3.adb (Expand_Freeze_Record_Type): Use
6004 Is_Controlled_Active.
6005 * exp_util.adb (Needs_Finalization): Finalization not needed
6006 if Disable_Controlled set.
6007 * freeze.adb (Freeze_Array_Type): Do not set
6008 Has_Controlled_Component if the component has Disable_Controlled.
6009 (Freeze_Record_Type): ditto.
6010 * sem_ch13.adb (Decorate): Minor reformatting.
6011 (Analyze_Aspect_Specifications): Implement Disable_Controlled.
6012 * sem_ch3.adb (Analyze_Object_Declaration): Handle
6014 (Array_Type_Declaration): ditto.
6015 (Build_Derived_Private_Type): ditto.
6016 (Build_Derived_Type): ditto.
6017 (Record_Type_Definition): ditto.
6018 * snames.ads-tmpl: Add Name_Disable_Controlled.
6020 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
6022 * exp_ch6.adb (Expand_Actuals): Use a constant declaration instead
6023 of a renaming to capture the return value of a function call.
6024 (Expand_Simple_Function_Return): Call Remove_Side_Effects
6025 instead of removing side effects manually before the call to
6028 2015-05-26 Robert Dewar <dewar@adacore.com>
6030 * exp_ch4.adb (Expand_N_Op_Expon): Deal with problem of wrong
6031 order in calling Duplicate_Subexpr.
6032 * einfo.ads: Fix documentation of Object/Value size for scalar types.
6034 2015-05-26 Ed Schonberg <schonberg@adacore.com>
6036 * exp_aggr.adb (Build_Array_Aggr_Code, Gen_Assign):
6037 If a component is default-initialized and its type has an
6038 invariant procedure, insert an invariant test after code for
6039 default-initialization of the component.
6041 2015-05-26 Gary Dismukes <dismukes@adacore.com>
6043 * einfo.ads, sem_util.adb, sem_ch4.adb: Minor reformatting.
6045 2015-05-26 Robert Dewar <dewar@adacore.com>
6047 * exp_unst.adb, exp_unst.ads: Change to using Subps table index for
6048 making AREC entity names unique.
6050 2015-05-26 Ed Schonberg <schonberg@adacore.com>
6052 * sem_cat.adb (Has_Stream_Attribute_Definition): If the type
6053 has aspect specifications, examine the corresponding list of
6054 representation items to determine whether there is a visible
6055 stream operation. The attribute definition clause generated from
6056 the aspect will be inserted at the freeze point of the type,
6057 which may be in the private part and not directly visible,
6058 but the aspect makes the operation available to a client.
6060 2015-05-26 Robert Dewar <dewar@adacore.com>
6062 * sem_util.adb: Minor code reorganization.
6063 * sem_ch6.adb: Minor reformatting.
6065 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
6067 * gcc-interface/utils.c (maybe_pad_type): Do not apply adjustment to
6068 original size for elementary types before issuing the size warning.
6070 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
6072 * get_targ.adb (C_Get_Float_Words_BE): Adjust import name.
6073 (C_Get_Words_BE): Likewise.
6074 (C_Get_Bytes_BE): Likewise.
6075 (C_Get_Bits_BE): Likewise.
6076 (Width_From_Size): Remove superfluous space.
6077 * gcc-interface/targtyps.c (get_float_words_be): Rename into...
6078 (get_target_float_words_be): ...this.
6079 (get_words_be): Rename into...
6080 (get_target_words_be): ...this.
6081 (get_bytes_be): Rename into...
6082 (get_target_bytes_be): ...this.
6083 (get_bits_be): Rename into...
6084 (get_target_bits_be): ...this.
6085 * gcc-interface/gigi.h (standard_datatypes): Remove ADT_ptr_void_type.
6086 (ptr_void_type_node): Delete.
6087 (get_target_float_size): Likewise.
6088 (get_target_double_size): Likewise.
6089 (get_target_long_double_size): Likewise.
6090 (get_float_words_be): Likewise.
6091 (get_words_be): Likewise.
6092 (get_bytes_be): Likewise.
6093 (get_bits_be): Likewise.
6094 (get_target_float_words_be): Declare.
6095 (get_target_words_be): Likewise.
6096 (get_target_bytes_be): Likewise.
6097 (get_target_bits_be): Likewise.
6098 * gcc-interface/decl.c (gnat_to_gnu_entity): Replace ptr_void_type_node
6100 (intrin_return_compatible_p): Likewise.
6101 * gcc-interface/trans.c (gigi): Likewise.
6102 * gcc-interface/utils2.c (maybe_wrap_malloc): Likewise.
6103 (maybe_wrap_free): Likewise.
6104 * gcc-interface/utils.c (maybe_pad_type): Remove superfluous space.
6105 * gcc-interface/misc.c (gnat_init): Do not set ptr_void_type_node.
6107 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
6109 * gcc-interface/decl.c (elaborate_expression): Take a const string
6110 suffix instead of a tree.
6111 (elaborate_expression_1): Likewise.
6112 (elaborate_expression_2): Likewise.
6113 (gnat_to_gnu_entity): Adjust to above changes.
6114 (build_subst_list): Likewise.
6115 (get_entity_char): New static function.
6117 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
6119 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: Move around.
6120 <E_Exception>: Merge with E_Variable case.
6121 <E_Variable>: Remove 'object' label.
6123 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
6125 * gcc-interface/decl.c (gnat_to_gnu_entity): Minor tweak.
6126 * gcc-interface/trans.c (finalize_nrv_unc_r): Use CONSTRUCTOR_ELT.
6127 * gcc-interface/utils.c (convert): Likewise and simplify.
6128 (remove_conversions): Likewise.
6129 * gcc-interface/utils2.c (compare_fat_pointers): Likewise.
6130 (build_unary_op): Likewise and simplify.
6132 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
6134 * gcc-interface/gigi.h (build_atomic_load): Adjust prototype.
6135 (build_atomic_store): Likewise.
6136 (build_load_modify_store): Declare.
6137 (VECTOR_TYPE_P): Delete.
6138 * gcc-interface/decl.c (gnat_to_gnu_entity): Replace Is_Atomic with
6139 Is_Atomic_Or_VFA throughout.
6140 <E_Array_Type>: Build a variant of the XUA type instead of forcing
6141 TYPE_VOLATILE on it.
6142 <E_Array_Subtype>: Use the main variant of the base type.
6143 Do not force TYPE_VOLATILE on the type being built.
6144 <E_Record_Type>: Likewise.
6145 <E_Array_Subtype>: Likewise.
6146 <E_Subprogram_Type>: Rename local variable.
6147 Add Atomic qualifier in conjunction with Volatile on types if needed.
6148 Force BLKmode for by-ref types only at the end of the processing.
6149 Change qualifiers only after changing the mode of the type. Set
6150 TYPE_UNIVERSAL_ALIASING_P on the type directly.
6151 (check_ok_for_atomic_type): Issue specific error message for VFA.
6152 (gnat_to_gnu_component_type): Replace Is_Atomic with
6153 Is_Atomic_Or_VFA throughout.
6154 * gcc-interface/misc.c (gnat_get_alias_set): Test
6155 TYPE_UNIVERSAL_ALIASING_P on the type directly.
6156 * gcc-interface/trans.c (lvalue_required_p): Replace Is_Atomic with
6157 Is_Atomic_Or_VFA throughout. Add missing guard.
6158 (node_is_atomic): New predicate.
6159 (node_has_volatile_full_access): Likewise.
6160 (gnat_strip_type_conversion): New function.
6161 (outer_atomic_access_required_p): New predicate.
6162 (atomic_sync_required_p): Rename into...
6163 (atomic_access_required_p): ...this. Add SYNC parameter, scan the
6164 parent node first and then look for the atomic setting. Add support
6165 for Volatile_Full_Access.
6166 (Call_to_gnu): Add atomic_access and outer_atomic_access parameters
6167 and adjusts calls to above functions. Use load-modify-store sequence
6168 for updates of In/Out and Out parameters if required, as well as for
6169 moving the result to the target if required. Add couple of missing
6171 (gnat_to_gnu): Adjust calls to above functions.
6172 <N_Object_Renaming_Declaration>: If the renamed object has side-effects
6173 evaluate only its address.
6174 <N_Assignment_Statement>: Adjust call to Call_to_gnu. Use load-modify
6175 store sequence if required.
6176 <N_Function_Call>: Adjust call to Call_to_gnu.
6177 (extract_values): Adjust comment.
6178 * gcc-interface/utils2.c (build_atomic_load): Add SYNC parameter and
6179 use relaxed memory model if it is not set.
6180 (build_atomic_store): Likewise.
6181 (call_is_atomic_load): New predicate.
6182 (build_load_modify_store): New function.
6183 (build_binary_op) <MODIFY_EXPR>: Accept SAVE_EXPR on the LHS.
6184 (gnat_stabilize_reference) <CALL_EXPR>: Deal with atomic loads.
6186 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
6188 * gcc-interface/ada-tree.h (DECL_RENAMING_GLOBAL_P): Rename into...
6189 (DECL_GLOBAL_NONCONSTANT_RENAMING_P): ...this.
6190 * gcc-interface/gigi.h (record_global_renaming_pointer): Delete.
6191 (invalidate_global_renaming_pointers): Likewise.
6192 (record_global_nonconstant_renaming): New.
6193 (invalidate_global_nonconstant_renamings): Likewise.
6194 (get_inner_constant_reference): Likewise.
6195 (gnat_constant_reference_p): Likewise.
6196 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Adjust to above
6197 and register the renaming pointer only if the object is non-constant.
6198 (elaborate_expression_1): Call get_inner_constant_reference instead
6199 of get_inner_reference.
6200 * gcc-interface/trans.c (fold_constant_decl_in_expr): Minor tweak.
6201 (Identifier_to_gnu): Adjust to above and do not recheck the renamed
6202 object before substituting it.
6203 (Compilation_Unit_to_gnu): Adjust to above renaming. Minor tweaks.
6204 (gnat_to_gnu) <N_Object_Renaming_Declaration>: Do not return the
6205 result at the global level.
6206 (N_Exception_Renaming_Declaration): Likewise.
6207 * gcc-interface/utils.c (global_renaming_pointers): Rename into...
6208 (global_nonconstant_renamings): ...this.
6209 (destroy_gnat_utils): Adjust to above renaming.
6210 (record_global_renaming_pointer): Rename into...
6211 (record_global_nonconstant_renaming): ...this.
6212 (invalidate_global_renaming_pointers): Rename into...
6213 (invalidate_global_nonconstant_renamings): ...this and do not recheck
6214 the renamed object before invalidating.
6215 * gcc-interface/utils2.c (gnat_stabilize_reference): Minor tweak.
6216 (get_inner_constant_reference): New public function.
6217 (gnat_constant_reference_p): New predicate.
6219 2015-05-25 Javier Miranda <miranda@adacore.com>
6221 * einfo.ads, einfo.adb (Has_Out_Or_In_Out_Parameter): This attribute
6222 is now present in subprograms, generic subprograms, entries and
6224 * sem_ch6.adb (Set_Formal_Mode): Set As_Out_Or_In_Out_Parameter
6225 on entries, entry families, subprograms and generic subprograms.
6226 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration):
6227 Minor code reorganization to ensure that the Ekind attribute
6228 of the subprogram entity is set before its formals are
6229 processed. Required to allow the use of the attribute
6230 Has_Out_Or_In_Out_Parameter on the subprogram entity.
6231 * sem_aggr.adb (Resolve_Aggregate, Resolve_Extension_Aggregate):
6232 Perform the check on writable actuals only if the value of some
6233 component of the aggregate involves calling a function with
6234 out-mode parameters.
6235 (Resolve_Record_Aggregate): Propagate the Check_Actuals flag to the
6236 internally built aggregate.
6237 * sem_ch3.adb (Build_Derived_Record_Type, Record_Type_Declaration):
6238 Perform the check on writable actuals only if the initialization of
6239 some component involves calling a function with out-mode parameters.
6240 * sem_ch4.adb (Analyze_Arithmetic_Op, Analyze_Comparison_Op,
6241 Analyze_Equality_Op, Analyze_Logical_Op, Analyze_Membership_Op,
6242 Analyze_Range): Check writable actuals only if the
6243 subtrees have a call to a function with out-mode parameters
6244 (Analyze_Call.Check_Writable_Actuals): New subprogram. If the call
6245 has out or in-out parameters then mark its outermost enclosing
6246 construct as a node on which the writable actuals check must
6248 (Analyze_Call): Check if the flag must be set and if the outermost
6249 enclosing construct.
6250 * sem_util.adb (Check_Function_Writable_Actuals): Code cleanup
6251 and reorganization. We skip processing aggregate discriminants
6252 since their precise analysis involves two phases traversal.
6253 * sem_res.adb (Resolve_Actuals, Resolve_Arithmetic_Op,
6254 Resolve_Logical_Op, Resolve_Membership_Op): Remove call to
6255 check_writable_actuals.
6257 2015-05-22 Ed Schonberg <schonberg@adacore.com>
6259 * sem_ch3.adb (Constrain_Concurrent): If the context is a
6260 type declaration, generate an Itype_Reference for the anonymous
6261 subtype, to force elaboration at this point in gigi.
6263 2015-05-22 Gary Dismukes <dismukes@adacore.com>
6265 * layout.adb, einfo.ads, sem_ch12.adb, freeze.adb, sem_util.ads,
6266 exp_ch4.adb, sem_ch6.adb: Minor reformatting and typo fixes.
6268 2015-05-22 Ed Schonberg <schonberg@adacore.com>
6270 * sem_res.adb (Resolve_Actuals): If the call is to an overridden
6271 operation, replace the names of the actuals in named associations
6272 with the names of the actuals of the subprogram that is eventually
6273 executed. The names of the formals and the defaults can differ
6274 between the two operations when they are operations of a formal
6277 2015-05-22 Bob Duff <duff@adacore.com>
6279 * a-convec.ads, a-convec.adb (Append): Check for fast path. Split
6280 out slow path into separate procedure. Inline Append. Fast path
6281 now avoids calling Insert.
6282 (Finalize): Do the busy checking last, so the container gets emptied.
6283 (Insert, Insert_Space): Remove redundancy.
6285 2015-05-22 Robert Dewar <dewar@adacore.com>
6287 * switch-c.adb (Scan_Front_End_Switches): Insist on -gnatc
6290 2015-05-22 Arnaud Charlet <charlet@adacore.com>
6292 * gnatvsn.ads: Minor code reorg to remember more easily to update
6295 2015-05-22 Ed Schonberg <schonberg@adacore.com>
6297 * sem_ch10.adb (Analyze_With_Clause): In ASIS_Mode, a
6298 limited_with clause on a predefined unit is not transformed into
6299 a regular with_clause, to preserve the original tree structure.
6300 * sinfo.ads (N_With_Clause): Add comment on handling of
6302 * sem_ch10.adb: Minor reformatting.
6304 2015-05-22 Ed Schonberg <schonberg@adacore.com>
6306 * sem_ch8.adb (Freeze_Profile): A limited view of a type in
6307 the profile of a subprogram renaming does not require freezing,
6308 because it is declared in a different unit.
6310 2015-05-22 Ed Schonberg <schonberg@adacore.com>
6312 * exp_aggr.adb (Get_Constraint_Association): If type (of ancestor
6313 composite type) is private, go to full view. This was previously
6314 done only in an instance context, but is happen whenever a chain
6315 of private extensions includes one inherited discriminant.
6317 2015-05-22 Robert Dewar <dewar@adacore.com>
6319 * einfo.ads: Minor comment updates.
6320 * exp_unst.adb: Move Subps table to spec Don't remove old entries
6321 from table Add Last field to record last entry used.
6322 * exp_unst.ads: Move Subps table here from body So that Cprint
6323 can access saved values.
6325 2015-05-22 Bob Duff <duff@adacore.com>
6327 * a-cdlili.adb, a-cdlili.ads, a-cohama.adb, a-cohama.ads,
6328 * a-cohase.adb, a-cohase.ads, a-convec.adb, a-convec.ads,
6329 * a-coorma.adb, a-coorma.ads, a-coorse.adb, a-coorse.ads:
6330 (Pseudo_Reference, Element_Access, Get_Element_Access): New
6331 declarations added for use by performance improvements in exp_ch5.adb.
6332 * snames.ads-tmpl: New names referenced by exp_ch5.adb.
6333 * exp_ch5.adb: Speed up "for ... of" loops for predefined containers.
6334 Instead of doing literally what the RM calls for, we do something
6335 equivalent that avoids expensive operations inside the loop. If the
6336 container package has appropriate Next, Pseudo_Reference,
6337 Element_Access, Get_Element_Access declarations, we invoke the
6339 * snames.ads-tmpl: Note speed improvement.
6341 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
6343 * einfo.ads (Is_Atomic_Or_VFA): Move to XEINFO INLINES section.
6344 * xeinfo.adb: Replace a-einfo.h with einfo.h throughout.
6345 Add pattern to translate "or else" into "||".
6347 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
6349 * einfo.ads (Has_Volatile_Full_Access): Rename into...
6350 (Is_Volatile_Full_Access): ...this.
6351 (Set_Has_Volatile_Full_Access): Rename into...
6352 (Set_Is_Volatile_Full_Access): ...this.
6353 * einfo.adb (Has_Volatile_Full_Access): Rename into...
6354 (Is_Volatile_Full_Access): ...this.
6355 (Set_Has_Volatile_Full_Access): Rename into...
6356 (Set_Is_Volatile_Full_Access): ...this.
6357 (Is_Atomic_Or_VFA): Adjust to above renaming.
6358 * errout.adb (Special_Msg_Delete): Likewise.
6359 * exp_pakd.adb (Install_PAT): Likewise.
6360 * freeze.adb (Freeze_Array_Type): Likewise.
6361 * sem_ch8.adb (Analyze_Object_Renaming): Likewise.
6362 * sem_ch13.adb (Inherit_Delayed_Rep_Aspects): Likewise.
6363 (Inherit_Aspects_At_Freeze_Point): Likewise.
6364 * sem_prag.adb (Set_Atomic_VFA): Likewise.
6365 (Process_Atomic_Independent_Shared_Volatile): Likewise.
6366 * sem_util.adb (Is_Atomic_Or_VFA_Object): Likewise.
6368 2015-05-22 Robert Dewar <dewar@adacore.com>
6370 * exp_ch5.adb, layout.adb, einfo.adb, einfo.ads, sem_prag.adb,
6371 freeze.adb, freeze.ads, sem_util.adb, sem_util.ads, exp_ch2.adb,
6372 exp_ch4.adb, errout.adb, exp_aggr.adb, sem_ch13.adb: This is a general
6373 change that deals with the fact that most of the special coding for
6374 Atomic should also apply to the case of Volatile_Full_Access.
6375 A new attribute Is_Atomic_Or_VFA is introduced, and many of the
6376 references to Is_Atomic now use this new attribute.
6378 2015-05-22 Robert Dewar <dewar@adacore.com>
6380 * exp_ch4.adb (Expand_N_Op_Eq): Introduce 'Machine for 'Result
6383 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
6385 * sprint.adb (Source_Dump): When generating debug files, deal
6386 with the case of a stand-alone package instantiation by dumping
6387 together the spec and the body in the common debug file.
6389 2015-05-22 Robert Dewar <dewar@adacore.com>
6391 * sem_ch13.adb (Minimum_Size): Size is zero for null range
6394 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
6396 * einfo.adb (Anonymous_Master): This attribute now applies
6397 to package and subprogram bodies.
6398 (Set_Anonymous_Master): This attribute now applies to package and
6400 (Write_Field36_Name): Add output for package and subprogram bodies.
6401 * einfo.ads Update the documentation on attribute Anonymous_Master
6402 along with occurrences in entities.
6403 * exp_ch4.adb (Create_Anonymous_Master): Reimplemented to
6404 handle spec and body anonymous masters of the same unit.
6405 (Current_Anonymous_Master): Reimplemented. Handle a
6406 package instantiation that acts as a compilation unit.
6407 (Insert_And_Analyze): Reimplemented.
6409 2015-05-22 Ed Schonberg <schonberg@adacore.com>
6411 * sem_ch10.adb (Analyze_With_Clause): A limited_with_clause on a
6412 predefined unit is treated as a regular with_clause.
6414 2015-05-22 Robert Dewar <dewar@adacore.com>
6416 * sem_ch12.adb, prj.ads, makeutl.ads, sem_ch6.adb, prj-nmsc.adb,
6417 prj-conf.adb, sem_disp.adb: Minor reformatting.
6419 2015-05-22 Vincent Celier <celier@adacore.com>
6421 * clean.adb (Parse_Cmd_Line): For native gnatclean, check
6422 for switch -P and, if found and gprclean is available, invoke
6424 * make.adb (Initialize): For native gnatmake, check for switch -P
6425 and, if found and gprbuild is available, invoke silently gprbuild.
6427 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
6429 * sem_ch13.adb (Validate_Unchecked_Conversions): Also issue
6430 specific warning for discrete types when the source is larger
6433 2015-05-22 Ed Schonberg <schonberg@adacore.com>
6435 * einfo.ads, einfo.adb (Incomplete_Actuals): New attribute of
6436 package instantiations. Holds the list of actuals in the instance
6437 that are incomplete types, to determine where the corresponding
6438 instance body must be placed.
6439 * sem_ch6.adb (Conforming_Types): An incomplete type used as an
6440 actual in an instance matches an incomplete formal.
6441 * sem_disp.adb (Check_Dispatching_Call): Handle missing case of
6442 explicit dereference.
6443 (Inherited_Subprograms): In the presence of a limited view there
6444 are no subprograms to inherit.
6445 * sem_ch12.adb (Preanalyze_Actuals): Build list of incomplete
6446 actuals of instance, for later placement of instance body and
6447 freeze nodes for actuals.
6448 (Install_Body): In the presence of actuals that incomplete types
6449 from a limited view, the instance body cannot be placed after
6450 the declaration because full views have not been seen yet. Any
6451 use of the non-limited views in the instance body requires
6452 the presence of a regular with_clause in the enclosing unit,
6453 and will fail if this with_clause is missing. We place the
6454 instance body at the beginning of the enclosing body, which is
6455 the unit being compiled, and ensure that freeze nodes for the
6456 full views of the incomplete types appear before the instance.
6458 2015-05-22 Pascal Obry <obry@adacore.com>
6460 * makeutl.ads, prj-conf.adb, prj-nmsc.adb, prj.ads
6461 (In_Place_Option): Removed.
6462 (Relocate_Build_Tree_Option): New constant.
6463 (Root_Dir_Option): New constant.
6464 (Obj_Root_Dir): Removed.
6465 (Build_Tree_Dir): New variable.
6466 (Root_Src_Tree): Removed.
6467 (Root_Dir): New variable.
6468 * prj-conf.adb (Get_Or_Create_Configuration_File): Add check
6469 for improper relocation.
6470 * prj-nmsc.adb (Locate_Directory): Add check for improper
6473 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
6475 * einfo.adb (Default_Init_Cond_Procedure): Code cleanup. The
6476 attribute now applies to the base type.
6477 (Has_Default_Init_Cond): Now applies to the base type.
6478 (Has_Inherited_Default_Init_Cond): Now applies to the base type.
6479 (Set_Default_Init_Cond_Procedure): Code cleanup. The attribute now
6480 applies to the base type.
6481 (Set_Has_Default_Init_Cond): Now applies to the base type.
6482 (Set_Has_Inherited_Default_Init_Cond): Now applies to the base type.
6483 * exp_ch3.adb (Expand_N_Object_Declaration): No need to use the
6484 base type when adding a call to the Default_Initial_Condition.
6486 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
6488 * einfo.adb: Node36 is now used as Anonymous_Master. Flag253
6490 (Anonymous_Master): New routine.
6491 (Has_Anonymous_Master): Removed.
6492 (Set_Anonymous_Master): New routine.
6493 (Set_Has_Anonymous_Master): Removed.
6494 (Write_Entity_Flags): Remove the output for Has_Anonymous_Maser.
6495 (Write_Field36_Name): Add output for Anonymous_Master.
6496 * einfo.ads Add new attribute Anonymous_Master along with
6497 occurrences in nodes. Remove attribute Has_Anonymous_Master along
6498 with occurrences in nodes.
6499 (Anonymous_Master): New routine along with pragma Inline.
6500 (Has_Anonymous_Master): Removed along with pragma Inline.
6501 (Set_Anonymous_Master): New routine along with pragma Inline.
6502 (Set_Has_Anonymous_Master): Removed along with pragma Inline.
6503 * exp_ch4.adb (Create_Anonymous_Master): New routine.
6504 (Current_Anonymous_Master): Reimplemented.
6506 2015-05-22 Bob Duff <duff@adacore.com>
6508 * freeze.adb (Freeze_Profile): Suppress warning if imported
6509 subprogram is not at library level.
6511 2015-05-22 Robert Dewar <dewar@adacore.com>
6513 * sem_ch8.adb (Analyze_Object_Renaming): Check for renaming
6514 component of an object to which Volatile_Full_Access applies.
6516 2015-05-22 Jerome Guitton <guitton@adacore.com>
6518 * exp_dbug.ads: Add note about non bit-packed arrays.
6520 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
6522 * sem_prag.adb: Fix typo.
6523 * einfo.ads: Grammar fixes in comments.
6525 2015-05-22 Bob Duff <duff@adacore.com>
6527 * a-cborma.ads, a-cidlli.ads, a-cimutr.ads, a-ciormu.ads,
6528 * a-cihase.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
6529 * a-cborse.ads, a-comutr.ads, a-ciorma.ads, a-cobove.ads,
6530 * a-coormu.ads, a-convec.ads, a-cohase.ads, a-coinho.ads,
6531 * a-cbdlli.ads, a-cbmutr.ads, a-cbhase.ads, a-cdlili.ads,
6532 * a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
6533 * a-coinho-shared.ads (Constant_Reference_Type, Reference_Type):
6534 Add an initialization expression "raise Program_Error". See,
6535 for example, RM-A.18.2(148.4).
6537 2015-05-22 Robert Dewar <dewar@adacore.com>
6539 * debug.adb: Update documentation.
6540 * einfo.ads, einfo.adb (Needs_Typedef): New flag
6541 * exp_unst.adb (Unnest_Subprogram): Mark AREC types as needing
6543 * frontend.adb: Update comments.
6544 * gnat1drv.adb (Adjust_Global_Switches): Set all needed flags
6546 * opt.ads (Generate_C_Code): New switch.
6547 * osint-c.adb (Write_C_File_Info): Removed, not used
6548 (Write_H_File_Info): Removed, not used
6549 * osint-c.ads (Write_C_File_Info): Removed, not used
6550 (Write_H_File_Info): Removed, not used
6551 * osint.ads (Write_Info): Minor comment updates.
6552 (Output_FD): Moved from private part to public part of spec.
6553 * sem.adb (Semantics): Force expansion on if in Generate_C_Code
6555 * atree.ads: minor typo in comment.
6556 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
6557 Do not allow VFA on composite object with aliased component.
6559 2015-05-22 Arnaud Charlet <charlet@adacore.com>
6561 * osint-c.adb, osint-c.ads (Set_File_Name): Move back to spec.
6563 2015-05-22 Pascal Obry <obry@adacore.com>
6565 * prj-util.adb: Minor comment editing.
6567 2015-05-22 Pascal Obry <obry@adacore.com>
6569 * makeutl.ads (In_Place_Option): New constant.
6570 * prj.ads (Obj_Root_Dir): New variable (absolute path to relocate
6572 (Root_Src_Tree): New variable (absolute path of root source tree).
6573 * prj-conf.adb (Do_Autoconf): Take into account the object root
6574 directory (if defined) to generate configuration project.
6575 * prj-nmsc.adb (Get_Directories): Handle case where Obj_Root_Dir
6577 (Locate_Directory): Likewise.
6579 2015-05-22 Pascal Obry <obry@adacore.com>
6581 * prj-util.ads, prj-util.adb (Relative_Path): New routine.
6583 2015-05-22 Bob Duff <duff@adacore.com>
6585 * exp_utils.ads, exp_utils.adb (Find_Optional_Prim_Op): New
6586 interface to return Empty when not found, so we can avoid handling
6587 Program_Error in that case.
6588 (Find_Prim_Op): Fix latent bug: raise Program_Error when there are no
6590 * exp_ch7.adb, sem_util.adb: Use Find_Optional_Prim_Op when the
6591 code is expecting Empty.
6592 * sem_ch8.adb: Use Find_Optional_Prim_Op to avoid handling
6595 2015-05-22 Robert Dewar <dewar@adacore.com>
6597 * sem_ch3.adb, sem_intr.adb, exp_ch4.adb, s-rannum.adb,
6598 sem_eval.adb, s-fatgen.adb, s-expmod.ads: Remove incorrect hyphen in
6600 * exp_util.adb: Add comment.
6601 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move from spec to
6603 (Set_File_Name): New name for the above.
6604 (Create_C_File, Create_H_File, Write_C_File_Info, Write_H_File_Info,
6605 Close_C_File, Close_H_File): New procedure.
6606 * osint.adb: Minor reformatting.
6607 * osint.ads: Minor comment updates.
6609 2015-05-22 Robert Dewar <dewar@adacore.com>
6611 * exp_ch4.adb: Minor rewording.
6612 * exp_util.ads: Clarify that Find_Prim_Op is only for
6615 2015-05-22 Robert Dewar <dewar@adacore.com>
6617 * atree.adb, atree.ads, treepr.adb: Change name Needs_Actuals_Check to
6619 * exp_ch4.adb (Expand_N_Op_Expon): Optimize 2**x in modular
6622 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
6624 * exp_pakd.adb (Install_PAT): Propagate representation aspects
6625 from the original array type to the PAT.
6627 2015-05-22 Robert Dewar <dewar@adacore.com>
6629 * treepr.adb (Print_Node_Header): Add output of Needs_Actuals_Check.
6631 2015-05-22 Robert Dewar <dewar@adacore.com>
6633 * atree.adb, atree.ads (Needs_Actuals_Check): New flag.
6635 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
6637 * sem_prag.adb (Analyze_Pragma): Remove the detection
6638 of a useless Part_Of indicator when the related item is a constant.
6639 (Check_Matching_Constituent): Do not emit an error on a constant.
6640 (Check_Missing_Part_Of): Do not check for a missing Part_Of indicator
6641 when the related item is a constant.
6642 (Collect_Body_States): Code cleanup.
6643 (Collect_Visible_States): Code cleanup.
6644 (Report_Unused_States): Do not emit an error on a constant.
6645 * sem_util.ads, sem_util.adb (Has_Variable_Input): Removed.
6647 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
6649 * sem_ch8.adb (Analyze_Object_Renaming): Copy
6650 Has_Volatile_Full_Access from renamed to renaming entities.
6651 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
6652 Tidy up and remove redundant setting of Has_Volatile_Full_Access.
6654 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
6656 * ghost.adb (Check_Ghost_Completion): Update references to SPARK
6658 (Check_Ghost_Policy): Update references to SPARK RM 6.9 rules.
6659 * sem_ch3.adb (Analyze_Object_Declaration): Update references
6660 to SPARK RM 6.9 rules.
6661 (Check_Completion): Ghost entities do not require a special form of
6663 * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Update references
6664 to SPARK RM 6.9 rules.
6665 (Analyze_Subprogram_Body_Helper): Update references to SPARK RM 6.9
6667 * sem_ch7.adb (Analyze_Package_Body_Helper): Update references
6668 to SPARK RM 6.9 rules.
6669 (Requires_Completion_In_Body): Ghost entities do not require a special
6672 2015-05-22 Robert Dewar <dewar@adacore.com>
6674 * a-csquin.ads: Use Ada 2012 notation.
6675 * sem_ch8.adb: Minor reformatting.
6677 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
6679 * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect Import
6680 acts as a completion.
6682 2015-05-22 Ed Schonberg <schonberg@adacore.com>
6684 * sem_ch13.adb: Minor reformatting.
6686 2015-05-22 Jose Ruiz <ruiz@adacore.com>
6688 * a-reatim.adb: Minor change, fix typo.
6690 2015-05-22 Robert Dewar <dewar@adacore.com>
6692 * sem_util.ads: Minor addition of ??? comment.
6693 * sem_prag.adb, sem_util.adb: Minor reformatting.
6694 * sem_ch13.adb: minor reformatting.
6696 2015-05-22 Robert Dewar <dewar@adacore.com>
6698 * a-reatim.ads: Add Compile_Time_Error to ensure Duration
6700 * sem_ch13.adb: Improve error message.
6701 * exp_ch4.adb: Minor reformatting.
6703 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
6705 * sem_prag.adb (Analyze_Pragma): Constants without variable
6706 input do not require indicator Part_Of.
6707 (Check_Missing_Part_Of): Constants without variable input do not
6708 requrie indicator Part_Of.
6709 (Collect_Visible_States): Constants without variable input are
6710 not part of the hidden state of a package.
6711 * sem_util.ads, sem_util.adb (Has_Variable_Input): New routine.
6713 2015-05-22 Robert Dewar <dewar@adacore.com>
6715 * exp_util.adb (Activate_Atomic_Synchronization): Do not set
6716 Atomic_Sync_Required for an object renaming declaration.
6717 * sem_ch8.adb (Analyze_Object_Renaming): Copy Is_Atomic and
6718 Is_Independent to renaming object.
6720 2015-05-22 Ed Schonberg <schonberg@adacore.com>
6722 * sem_ch5.adb (Analyze_Iterator_Specification): Diagnose
6723 various illegalities in iterators over arrays and containers:
6724 a) New function Get_Cursor_Type, to verify that the cursor is
6725 not a limited type at the point of iteration.
6726 b) If the container is a constant, an element_iterator is illegal
6727 if the container type does not have a Constant_Indexing aspect.
6728 c) If the iterate function has an in-out controlling parameter,
6729 the container cannot be a constant object.
6730 d) Reject additional cases of iterators over a
6731 discriminant-dependent component of a mutable object.
6733 2015-05-21 Hristian Kirtchev <kirtchev@adacore.com>
6735 * einfo.adb (Contract): This attribute now applies to constants.
6736 (Set_Contract): This attribute now applies to constants.
6737 (Write_Field34_Name): Add output for constants.
6738 * einfo.ads Attribute Contract now applies to constants.
6739 * sem_ch3.adb (Analyze_Object_Contract): Constants now have
6740 their Part_Of indicator verified.
6741 * sem_prag.adb (Analyze_Constituent): A constant is now a valid
6743 (Analyze_Global_Item): A constant cannot act as an output.
6744 (Analyze_Initialization_Item): Constants are now a valid
6745 initialization item.
6746 (Analyze_Initializes_In_Decl_Part): Rename
6747 global variable States_And_Vars to States_And_Objs and update
6748 all its occurrences.
6749 (Analyze_Input_Item): Constants are now a
6750 valid initialization item. Remove SPARM RM references from error
6752 (Analyze_Pragma): Indicator Part_Of can now apply to a constant.
6753 (Collect_Body_States): Collect both source constants
6755 (Collect_States_And_Objects): Collect both source constants and
6757 (Collect_States_And_Variables): Rename
6758 to Collect_States_And_Objects and update all its occurrences.
6759 (Collect_Visible_States): Do not collect constants and variables
6760 used to map generic formals to actuals.
6761 (Find_Role): The role of a constant is that of an input. Separate the
6762 role of a variable from that of a constant.
6763 (Report_Unused_Constituents): Add specialized wording for constants.
6764 (Report_Unused_States): Add specialized wording for constants.
6765 * sem_util.adb (Add_Contract_Item): Add processing for constants.
6766 * sem_util.ads (Add_Contract_Item): Update the comment on usage.
6767 (Find_Placement_In_State_Space): Update the comment on usage.
6769 2015-05-21 Ed Schonberg <schonberg@adacore.com>
6771 * sem_ch5.adb: minor reformatting.
6773 2015-05-21 Robert Dewar <dewar@adacore.com>
6775 * freeze.adb (Freeze_Entity): Properly tag -gnatw.z messages.
6777 2015-05-21 Robert Dewar <dewar@adacore.com>
6779 * freeze.adb: Minor reformatting.
6780 * cstand.adb (Print_Standard): Fix bad printing of Duration
6782 * a-reatim.adb (Time_Of): Complete rewrite to properly detect
6785 2015-05-21 Ed Schonberg <schonberg@adacore.com>
6787 * sem_ch5.adb: add (useless) initial value.
6788 * sem_ch3.adb (Replace_Anonymous_Access_To_Protected_Subprogram):
6789 Check whether the procedure has parameters before processing
6790 formals in ASIS mode.
6792 2015-05-21 Ed Schonberg <schonberg@adacore.com>
6794 * sem_ch13.adb (Check_Iterator_Functions): Emit error on Iterator
6795 aspect as well when indexing function is illegal.
6796 (Valid_Default_Iterator): Handle properly somme illegal cases
6797 to prevent compilation abandoned messages.
6798 (Check_Primitive_Function): Verify that type and indexing function
6799 are in the same scope.
6800 * freeze.adb (Freeze_Record): Extend patch on the presence of
6801 indexing aspects to aspect Default_Iterator.
6803 2015-05-19 David Malcolm <dmalcolm@redhat.com>
6805 * gcc-interface/trans.c (Sloc_to_locus1): Strenghthen local "map"
6806 from line_map * to line_map_ordinary *.
6808 2015-05-12 Jason Merrill <jason@redhat.com>
6810 * sigtramp-vxworks.c: Add space between string literal and macro
6813 2015-05-12 Arnaud Charlet <charlet@adacore.com>
6815 * gnat_rm.texi, gnat_ugn.texi, doc: Documentation updates and clean ups
6817 2015-05-12 Ed Schonberg <schonberg@adacore.com>
6819 * sem_ch5.adb (Analyze_Iterator_Specifications): Additional
6820 legality checks for array and container iterators:
6821 a) The domain of iteration cannot be a component that depends
6822 on discriminants of a mutable object. The check was recently
6823 added for element iterators.
6824 b) The cursor type cannot be a limited type at the point of the
6825 iteration, because the cursor will be assigned to in the body
6828 2015-05-12 Robert Dewar <dewar@adacore.com>
6830 * freeze.adb (Freeze_Record_Type): Make sure that if we have
6831 aspect Iterator_Element, then we have either Constant_Indexing
6832 or Variable_Indexing.
6834 2015-05-12 Ed Schonberg <schonberg@adacore.com>
6836 * a-coormu.ads, a-coormu.adb: Add Indexing aspect, Reference_Type,
6837 and Reference_Control_Type to support element iterators over
6839 * a-ciormu.ads, a-ciormu.adb: Ditto for
6840 indefinite_ordered_multisets.
6842 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
6844 * exp_ch4.adb (Expand_N_Expression_With_Actions): Force
6845 the evaluation of the EWA expression. Code cleanup.
6846 (Process_Transient_Object): Code cleanup.
6847 * exp_util.adb (Is_Aliased): Controlled transient objects found
6848 within EWA nodes are not aliased.
6849 (Is_Finalizable_Transient): Iterators are not finalizable transients.
6851 2015-05-12 Robert Dewar <dewar@adacore.com>
6853 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
6854 Don't allow Atomic and Volatile_Full_Access for the same entity.
6856 2015-05-12 Ed Schonberg <schonberg@adacore.com>
6858 * sem_ch5.adb (Analyze_Iterator_Specification): Implement new
6859 semantics and safety checks specified in AI12-0151.
6861 2015-05-12 Pierre-Marie de Rodat <derodat@adacore.com>
6863 * sem_ch10.adb (Sem_Ch10.Analyze_Proper_Body): Generate SCOs
6864 for subunit in generic units.
6866 2015-05-12 Robert Dewar <dewar@adacore.com>
6868 * sem_elab.adb (Check_A_Call): Avoid checking internal call
6871 2015-05-12 Ed Schonberg <schonberg@adacore.com>
6873 * sem_ch6.adb (Process_Formals): An untagged incomplete type
6874 is legal in the profile of a null procedure.
6876 2015-05-12 Ed Schonberg <schonberg@adacore.com>
6878 * sem_ch12.adb (Validate_Derived_Type_Instance): Handle properly
6879 the checks on a derived formal whose parent type is a previous
6880 formal that is not a derived type.
6882 2015-05-12 Robert Dewar <dewar@adacore.com>
6884 * aspects.ads, aspects.adb: Add entries for aspect Volatile_Full_Access
6885 * einfo.adb (Has_Volatile_Full_Access): New flag.
6886 (Has_Volatile_Full_Access): New flag.
6887 * einfo.ads (Has_Volatile_Full_Access): New flag.
6888 * par-prag.adb: Add dummy entry for Volatile_Full_Access.
6889 * sem_prag.adb (Analyze_Pragma, case Volatile_Full_Access):
6890 Implement new pragma.
6891 * snames.ads-tmpl: Add entries for pragma Volatile_Full_Access.
6893 2015-05-12 Robert Dewar <dewar@adacore.com>
6895 * targparm.ads: Minor reformatting.
6897 2015-05-12 Robert Dewar <dewar@adacore.com>
6899 * a-reatim.adb (Time_Of): Properly detect overflow when TS = 0.0.
6900 * a-reatim.ads: Minor reformatting.
6902 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
6904 * einfo.ads: Update the documentation of flags
6905 Has_Inherited_Default_Init_Cond and Has_Default_Init_Cond.
6907 2015-05-12 Robert Dewar <dewar@adacore.com>
6909 * impunit.adb: Add entry for a-dhfina.ads
6910 * a-dhfina.ads: New file.
6912 2015-05-12 Ed Schonberg <schonberg@adacore.com>
6914 * exp_ch5.adb (Expand_Iterator_Loop_Over_Array): if the array
6915 type has convention Fortran, a multidimensional iterator varies
6916 the first dimension fastest.
6918 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
6920 * einfo.adb: Node32 is now used as Encapsulating_State.
6921 Node37 is now used as Associated_Entity.
6922 (Associated_Entity): New routine.
6923 (Encapsulating_State): Update the assertion guard to include constants.
6924 (Set_Associated_Entity): New routine.
6925 (Set_Encapsulating_State): Update the assertion guard to
6927 (Write_Field10_Name): Remove the output for Encapsulating_State.
6928 (Write_Field32_Name): Add output for Encapsulating_State.
6929 (Write_Field37_Name): Add output for Associated_Entity.
6930 * einfo.ads New attribute Associated_Entity along with placement
6931 in entities. Attribute Encapsulating_State now uses Node32.
6932 (Associated_Entity): New routine along with pragma Inline.
6933 (Set_Associated_Entity): New routine along with pragma Inline.
6934 * inline.ads Code reformatting.
6935 * sem_attr.adb (Analyze_Attribute): Correct the prefix of
6936 attribute 'Result when the context is a generic instantiation.
6937 (Analyze_Attribute_Old_Result): Pragmas Depends and
6938 Refined_Depends are a valid context for attribute 'Result.
6939 (Denote_Same_Function): Allow attribute 'Result to denote
6941 * sem_ch3.adb Add with and use clauses for Sem_Ch12.
6942 (Analyze_Declarations): Capture global references within the
6943 contracts of packages, subprograms and their respective bodies.
6944 * sem_ch6.adb (Analyze_Aspects_On_Body_Or_Stub): Removed.
6945 (Analyze_Completion_Contract): Removed.
6946 (Analyze_Generic_Subprogram_Body): Enchange the aspects after
6947 creating the generic copy. Create a generic contract for the
6948 template. Analyze the aspects of the generic body. Analyze the
6949 contract of the generic body when it is a compilation unit and
6950 capture global references.
6951 (Analyze_Subprogram_Body_Contract): Code cleanup.
6952 (Analyze_Subprogram_Contract): Do not save global references here.
6953 (Save_Global_References_In_List): Removed.
6954 * sem_ch7.adb (Analyze_Package_Body_Contract): Code cleanup.
6955 (Analyze_Package_Body_Helper): Create a generic contract for
6957 (Analyze_Package_Contract): Code cleanup.
6958 * sem_ch10.adb Add with and use clauses for Sem_Ch12.
6959 (Analyze_Compilation_Unit): Capture global references in a
6960 generic subprogram declaration that acts as a compilation unit.
6961 * sem_ch12.adb Add with and use clauses for Sem_Prag. Illustrate
6962 the implementation of generic contracts. Alphabetize various
6964 (Analyze_Generic_Package_Declaration):
6965 Create a generic contract for the template.
6966 (Analyze_Generic_Subprogram_Declaration): Create a generic
6967 contract for the template.
6968 (Analyze_Subprogram_Instantiation): Instantiate the contract of the
6970 (Copy_Generic_Node): Link defining entities of the generic template
6971 with the corresponding defining entities of the generic copy. Update
6972 the processing of pragmas.
6973 (Instantiate_Contract): Removed.
6974 (Instantiate_Subprogram_Contract): New routine.
6975 (Requires_Delayed_Save): New routine.
6976 (Save_Global_References): Rename formal parameter N to Templ. Various
6978 (Save_Global_References_In_Aspects): Moved from the spec.
6979 (Save_Global_References_In_Contract): New routine.
6980 (Save_References_In_Aggregate): New routine.
6981 (Save_References_In_Char_Lit_Or_Op_Symbol): New routine.
6982 (Save_References_In_Descendants): New routine.
6983 (Save_References_In_Identifier): New routine.
6984 (Save_References_In_Operator): New routine.
6985 (Save_References_In_Pragma): New routine.
6986 * sem_ch12.ads (Save_Global_References): Rename formal
6987 parameter N to Templ. Update the comment on usage.
6988 (Save_Global_References_In_Aspects): Moved to the body.
6989 (Save_Global_References_In_Contract): New routine.
6990 * sem_ch13.adb (Analyze_Aspect_Specifications_On_Body_Or_Stub):
6992 * sem_ch13.ads (Analyze_Aspect_Specifications_On_Body_Or_Stub):
6994 * sem_prag.adb (Add_Item_To_Name_Buffer): Add support for
6996 (Analyze_Contract_Cases_In_Decl_Part): Code cleanup.
6997 (Analyze_Depends_Global): New routine.
6998 (Analyze_Depends_In_Decl_Part): Code cleanup.
6999 (Analyze_Global_In_Decl_Part): Code cleanup.
7000 (Analyze_Global_Item): Constants are now valid global items. Do
7001 not perform state-related checks in an instance. Change the way
7002 renamings are handled. (Analyze_Initial_Condition_In_Decl_Part):
7004 (Analyze_Initializes_In_Decl_Part): Code cleanup.
7005 (Analyze_Input_Output): The analysis of attribute 'Result in
7006 the context of pragmas Depends or Refined_Depends now reuses
7007 the existing attribute analysis machinery. Constants and
7008 generic parameters are now valid dependency items. Do not
7009 perform state-related checks in an instance. Change the way
7010 renamings are handled. (Analyze_Pragma): Add a "characteristics"
7011 section for pragmas Abstract_State, Contract_Cases, Depends,
7012 Extensions_Visible, Global, Initial_Condition, Initializes,
7013 Post, Post_Class, Postcondition, Pre, Pre_Class, Precondition,
7014 Refined_Depends, Refined_Global, Refined_Post, Refined_State, Test_Case.
7015 (Analyze_Pre_Post_Condition): Do not create a generic
7017 (Analyze_Pre_Post_Condition_In_Decl_Part): Code cleanup.
7018 (Analyze_Refined_Depends_Global_Post): New routine.
7019 (Analyze_Refined_Depends_In_Decl_Part): Code cleanup.
7020 (Analyze_Refined_Global_In_Decl_Part): Code cleanup.
7021 (Analyze_Refined_Pragma): Removed.
7022 (Analyze_Refined_State_In_Decl_Part): Code cleanup.
7023 (Analyze_Test_Case_In_Decl_Part): Code cleanup.
7024 (Check_Dependency_Clause): Do not perform this check in an instance.
7025 (Check_Function_Return): Add support for generic functions.
7026 (Check_In_Out_States): Do not perform this check in an instance.
7027 (Check_Input_States): Do not perform this check in an instance.
7028 (Check_Mode_Restriction_In_Function): Add support for generic functions.
7029 (Check_Output_States): Do not perform this check in an instance.
7030 (Check_Postcondition_Use_In_Inlined_Subprogram): Rename
7031 parameter Subp_Id to Spec_Id and update comment on usage.
7032 (Check_Proof_In_States): Do not perform this check in an instance.
7033 (Check_Refined_Global_Item): Add support for constants.
7034 (Check_Refined_Global_List): Do not perform this check in an instance.
7035 (Collect_Global_Items): Reimplemented.
7036 (Collect_Subprogram_Inputs_Outputs): Add support for generic parameters.
7037 (Create_Generic_Template): Removed.
7038 (Find_Related_Package_Or_Body): Moved to spec.
7039 (Find_Role): Add support for generic parameters and constants.
7040 (Get_Argument): Moved to spec. Rename parameter Spec_Id to Context_Id.
7041 (Match_Item): Add support for constants.
7042 (Preanalyze_Test_Case_Arg): Reimplemented.
7043 (Report_Extra_Clauses): Do not perform this check in an instance.
7044 (Report_Extra_Constituents): Do not perform this check in an instance.
7045 * sem_prag.ads (Collect_Subprogram_Inputs_Outputs): Update
7046 the comment on usage.
7047 (Find_Related_Package_Or_Body): Moved from body.
7048 (Get_Argument): Moved from body.
7049 * sem_util.adb Add with and use clauses for Sem_Ch12.
7050 (Corresponding_Spec_Of): Add support for packages and package bodies.
7051 (Create_Generic_Contract): New routine.
7052 (Is_Contract_Annotation): Reimplemented.
7053 (Is_Generic_Declaration_Or_Body): New routine.
7054 (Is_Package_Contract_Annotation): New routine.
7055 (Is_Subprogram_Contract_Annotation): New routine.
7056 * sem_util.ads (Corresponding_Spec_Of): Update the comment on usage.
7057 (Create_Generic_Contract): New routine.
7058 (Is_Generic_Declaration_Or_Body): New routine.
7059 (Is_Package_Contract_Annotation): New routine.
7060 (Is_Subprogram_Contract_Annotation): New routine.
7061 * sinfo.adb (Is_Generic_Contract_Pragma): New routine.
7062 (Set_Is_Generic_Contract_Pragma): New routine.
7063 * sinfo.ads Add new attribute Is_Generic_Contract_Pragma along
7064 with occurrences in nodes.
7065 (Is_Generic_Contract_Pragma): New routine along with pragma Inline.
7066 (Set_Is_Generic_Contract_Pragma): New routine along with pragma Inline.
7067 * treepr.adb (Print_Entity_Info): Output fields 36 to 41.
7069 2015-05-12 Robert Dewar <dewar@adacore.com>
7071 * a-taster.ads: Minor comment fix: fix bad header, this is a
7074 2015-05-12 Robert Dewar <dewar@adacore.com>
7076 * sem_intr.adb: (Check_Shift): Diagnose bad modulus value.
7078 2015-05-12 Robert Dewar <dewar@adacore.com>
7080 * gnat1drv.adb (Adjust_Global_Switches): Default to suppressing
7081 Alignment_Checks on non-strict alignment machine.
7082 * sem_ch13.adb (Validate_Address_Clauses): Don't give
7083 compile-time alignment warnings if run time Alignment_Check
7086 2015-05-12 Thomas Quinot <quinot@adacore.com>
7088 * g-sercom.ads, g-sercom-linux.adb (GNAT.Serial_Communications.
7089 Data_Rate): New literals B75, B110, B150, B300, B600.
7091 2015-05-12 Doug Rupp <rupp@adacore.com>
7093 * init.c (__gnat_init_float) [vxworks]: For e500v2,
7094 do nothing and leave the responsibility to install the handler
7095 and enable the exceptions to the BSP.
7097 2015-05-12 Robert Dewar <dewar@adacore.com>
7099 * sem_ch9.adb, einfo.ads, exp_intr.adb: Minor reformatting.
7100 * sem_disp.adb: Minor code reorganization (remove junk redundant
7102 * exp_unst.adb (Unnest_Subprogram.Uplev_Refs): Ignore uplevel
7103 references to bounds of types coming from original type reference.
7104 * checks.ads: Minor reformatting.
7105 * checks.adb: Minor reformatting.
7106 * sem_prag.adb (Analyze_Pragma, case Check): If in ignored
7107 assertion, then make sure we do not drag in bignum stuff.
7109 2015-05-12 Ed Schonberg <schonberg@adacore.com>
7111 * sem_ch9.adb (Collect_Interfaces): Initialize
7112 Direct_Primitive_Operations for a tagged synchronized type,
7113 so it can used in ASIS mode.
7114 * sem_disp.adb (Check_Dispatching_Operation): If expansion is
7115 disabled, attach subprogram to list of Direct_Primitive_Operations
7116 of synchronized type itself, for ASIS use, because in this case
7117 Corresponding_Record_Type is not built.
7118 * einfo.ads: Indicate use of Direct_Primitive_Operations on
7121 2015-05-12 Pierre-Marie de Rodat <derodat@adacore.com>
7123 * exp_pakd.adb: Make clearer the comment in exp_pakd.adb about
7126 2015-05-12 Robert Dewar <dewar@adacore.com>
7128 * sem_ch3.adb, sem_util.adb, sem_ch6.adb: Minor reformatting.
7130 2015-05-12 Robert Dewar <dewar@adacore.com>
7132 * exp_unst.adb (Visit_Node): Deal with subprogram and package stubs.
7134 2015-05-12 Ed Schonberg <schonberg@adacore.com>
7136 * exp_intr.adb (Expand_Dispatching_Constructor_Call): The
7137 tag to be retrieved for the generated call is the first entry
7138 in the dispatch table for the return type of the instantiated
7141 2015-05-12 Bob Duff <duff@adacore.com>
7143 * exp_ch7.adb, exp_ch7.ads, exp_intr.adb, exp_util.adb,
7144 exp_util.ads: Update comments.
7146 2015-05-12 Ed Schonberg <schonberg@adacore.com>
7148 * sem_ch3.adb (Add_Internal_Interface_Entities): Do no generate
7149 freeze nodes for these in ASIS mode, because they lead to
7150 elaoration order issues in gigi.
7152 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
7154 * sem_ch6.adb (Analyze_Expression_Function): Code
7155 cleanup. Use Copy_Subprogram_Spec to create a proper spec.
7156 (Analyze_Subprogram_Body_Helper): Code cleanup. Do not
7157 prepare a stand alone body for inlining in GNATprove mode
7158 when inside a generic. (Body_Has_Contract): Reimplemented.
7159 (Build_Subprogram_Declaration): New routine.
7160 * sem_ch10.adb (Analyze_Compilation_Unit): Capture global
7161 references within generic bodies by loading them.
7162 * sem_util.adb (Copy_Parameter_List): Code cleanup.
7163 (Copy_Subprogram_Spec): New routine.
7164 (Is_Contract_Annotation): New routine.
7165 * sem_util.ads (Copy_Subprogram_Spec): New routine.
7166 (Is_Contract_Annotation): New routine.
7168 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
7170 * sem_attr.adb (Resolve_Attribute): Do not analyze the generated
7171 body of an expression function when the prefix of attribute
7172 'Access is the body.
7174 2015-05-12 Ed Schonberg <schonberg@adacore.com>
7176 * sem_ch3.adb (Build_Derived_Enumeration_Type): The anonymous base
7177 created for a derived enumeration type is not a first subtype,
7178 even though it is defined through a full type declaration.
7179 * sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): Do not process
7180 aspects for the anonymous base type constructed for a derived
7181 scalar type, because they will be set when the first subtype
7183 (Inherit_Aspects_At_Freeze_Point): Fix typos on handling of
7184 Default_Value and Default_Component_Value, that prevented the
7185 proper inheritance of these aspects.
7187 2015-05-12 Gary Dismukes <dismukes@adacore.com>
7189 * exp_ch6.adb, exp_unst.adb: Minor typo fixes.
7191 2015-05-12 Robert Dewar <dewar@adacore.com>
7193 * sem_ch3.adb: Minor reformatting.
7195 2015-05-12 Vincent Celier <celier@adacore.com>
7197 * gnatcmd.adb: If we want to invoke gnatmake (gnatclean) with
7198 -P, then check if gprbuild (gprclean) is available; if it is,
7199 use gprbuild (gprclean) instead of gnatmake (gnatclean).
7201 2015-05-12 Robert Dewar <dewar@adacore.com>
7203 * debug.adb: Add flag -gnatd.3 to output diagnostic info from
7205 * einfo.ad, einfo.adb: Reorganize (and remove most of) flags used by
7207 * exp_ch6.adb (Unest_Bodies): Table for delayed calls to
7208 Unnest_Subprogram (Expand_N_Subprogram_Body): Add entry to table
7209 for later call instead of calling Unnest_Subprogram directly
7210 (Initialize): New procedure (Unnest_Subprograms): New procedure
7211 * exp_ch6.ads (Add_Extra_Actual_To_Call): Move into proper
7213 (Initialize): New procedure.
7214 (Unnest_Subprograms): New procedure.
7215 * exp_unst.adb (Unnest_Subprogram): Major rewrite, moving
7216 all processing to this routine which is now called late
7217 after instantiating bodies. Fully handles the case of generic
7219 * exp_unst.ads: Major rewrite, moving all processing to
7221 * frontend.adb (Frontend): Add call to Exp_Ch6.Initialize.
7222 (Frontend): Add call to Unnest_Subprograms.
7223 * sem_ch8.adb (Find_Direct_Name): Back to old calling sequence
7224 for Check_Nested_Access.
7225 * sem_util.adb (Build_Default_Subtype): Minor reformatting
7226 (Check_Nested_Access): Back to original VM-only form (we
7227 now do all the processing for Unnest_Subprogram at the time
7229 (Denotes_Same_Object): Minor reformatting
7230 (Note_Possible_Modification): Old calling sequence for
7231 Check_Nested_Access.
7232 * sem_util.ads (Check_Nested_Access): Back to original VM-only
7233 form (we now do all the processing for Unnest_Subprogram at the
7236 2015-05-12 Robert Dewar <dewar@adacore.com>
7238 * sem_ch3.adb, freeze.adb, sem_ch6.adb: Minor reformatting.
7240 2015-05-12 Ed Schonberg <schonberg@adacore.com>
7242 * sem_ch3.adb (Analyze_Object_Declaration): New function
7243 Has_Delayed_Aspect, used to defer resolution of an aggregate
7244 expression when the object declaration carries aspects Address
7246 * freeze.adb (Freeze_Object_Declaration): New subsidiary procedure
7247 to Freeze_Entity. In addition to the previous processing steps
7248 at the freeze point of an object, this procedure also handles
7249 aggregates in object declarations, when the declaration carries
7250 delayed aspects that require that the initialization of the
7251 object be attached to its freeze actions.
7253 2015-05-12 Ed Schonberg <schonberg@adacore.com>
7255 * sem_ch6.adb (Analyze_Subprogram_Declaration): Following
7256 AI12-0147, null procedures and expression functions are allowed
7257 in protected bodies.
7259 2015-05-12 Tristan Gingold <gingold@adacore.com>
7261 * i-cpoint.adb (Copy_Terminated_Array): Copy nothing if Length is 0.
7263 2015-05-12 Ed Schonberg <schonberg@adacore.com>
7265 * sem_ch3.adb (Complete_Private_Subtype): Propagate
7266 Has_Delayed_Aspects flag from private to full view, to ensure
7267 that predicate functions are constructed.
7269 2015-05-12 Ed Schonberg <schonberg@adacore.com>
7271 * sem_ch6.adb (Process_Formals): If a tagged formal is an
7272 incomplete class-wide type, the subprogram must have a delayed
7273 freeze even though the opertation is not a primitive of the
7274 type. THis ensures that the backend can recover the full view
7275 when elaborating the subprogram declaration.
7277 2015-05-12 Ed Schonberg <schonberg@adacore.com>
7279 * exp_util.adb (Get_Current_Value_Condition): Nothing to be
7280 done if an elsif part has been rewritten so that it is not part
7281 of an enclosing if_statement.
7283 2015-05-12 Robert Dewar <dewar@adacore.com>
7285 * sem_type.adb, sem_ch10.adb, freeze.adb, sem_ch6.adb, exp_disp.adb:
7288 2015-05-12 Bob Duff <duff@adacore.com>
7290 * exp_attr.adb (Size): Remove unnecessary check for types with
7291 unknown discriminants. That was causing the compiler to build
7292 a function call _size(T), where T is a type, not an object.
7294 2015-05-12 Ed Schonberg <schonberg@adacore.com>
7296 * sem_ch4.adb (Extended_Primitive_Ops): Exclude overriding
7297 primitive operations of a type extension declared in the package
7298 body, to prevent duplicates in extended list.
7300 2015-05-12 Ed Schonberg <schonberg@adacore.com>
7302 * sem_ch3.adb (Analyze_Component_Declaration): If the component is
7303 an unconstrained synchronized type with discriminants, create a
7304 constrained default subtype for it, so that the enclosing record
7305 can be given the proper size.
7306 * sem_util.adb (Build_Default_Subtype): If the subtype is created
7307 for a record discriminant, do not analyze the declarztion at
7308 once because it is added to the freezing actions of the enclosing
7311 2015-05-12 Robert Dewar <dewar@adacore.com>
7313 * exp_prag.adb (Expand_N_Pragma): Rewrite ignored pragma as
7315 * namet.ads (Boolean3): Document this flag used for Ignore_Pragma.
7316 * par-prag.adb (Prag): Implement Ignore_Pragma.
7317 * sem_prag.adb: Implement Ignore_Pragma.
7318 * snames.ads-tmpl: Add entries for pragma Ignore_Pragma.
7320 2015-05-12 Javier Miranda <miranda@adacore.com>
7322 * sem_ch10.adb (Build_Shadow_Entity): Link the class-wide shadow
7323 entity with its corresponding real entity.
7324 (Decorate_Type): Unconditionally build the class-wide shadow entity of
7326 * einfo.ads, einfo.adb (Has_Non_Limited_View): New synthesized
7328 (Non_Limited_View): Moved from field 17 to field 19 be available
7329 in class-wide entities.
7330 * exp_attr.adb (Access_Cases): Code cleanup.
7331 * exp_disp.adb (Expand_Interface_Actuals): Ditto.
7332 * exp_util.adb (Non_Limited_Designated_Type): Ditto.
7333 * freeze.adb (Build_Renamed_Bdody): Ditto.
7334 * sem_aux.adb (Available_View): Ditto.
7335 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
7336 (Try_One_Prefix_Interpretation): Ditto.
7337 * sem_ch5.adb (Analyze_Assignment): Ditto.
7338 * sem_ch6.adb (Detect_And_Exchange): Ditto.
7339 * sem_ch8.adb (Find_Expanded_Name): Ditto.
7340 * sem_disp.adb (Check_Controlling_Type): Ditto.
7341 * sem_res.adb (Resolve_Type_Conversion): Ditto.
7342 (Full_Designated_Type): Ditto.
7343 * sem_type.adb (Covers): Ditto.
7344 * sem_util.adb: Fix typo in comment.
7346 2015-05-12 Robert Dewar <dewar@adacore.com>
7348 * exp_unst.adb (Get_Real_Subp): New subprogram.
7349 (Unnest_Subprogram): Use Get_Real_Subp.
7350 (Uplev_Refs_For_One_Subp): Skip if no ARECnU entity.
7351 (Uplev_Refs_For_One_Subp): Use actual subtype in unconstrained case.
7353 2015-05-12 Robert Dewar <dewar@adacore.com>
7355 * a-reatim.adb ("/"): Add explicit check for Time_Span_First / -1.
7357 2015-05-12 Ed Schonberg <schonberg@adacore.com>
7359 * sem_ch4.adb (Extended_Primitive_Ops): New subprogram,
7360 auxiliary to Try_Primitive_Operation to handle properly prefixed
7361 calls where the operation is not a primitive of the type, but
7362 is declared in the package body that is in the immediate scope
7365 2015-05-12 Robert Dewar <dewar@adacore.com>
7367 * sem_util.adb (Is_Variable): Allow X'Deref(Y) as a variable.
7369 2015-05-12 Ed Schonberg <schonberg@adacore.com>
7371 * sem_ch8.adb (Find_Expanded_Name): Handle properly a fully
7372 qualified name for an instance of a generic grand-child unit in
7373 the body its parent.
7375 2015-05-12 Robert Dewar <dewar@adacore.com>
7377 * exp_unst.adb (Upref_Name): New subprogram.
7378 (Unnest_Subprogram): Use Upref_Name.
7379 (Unnest_Subprogram): Use new Deref attribute.
7380 * exp_unst.ads: Doc updates.
7382 2015-05-12 Thomas Quinot <quinot@adacore.com>
7384 * adaint.c: Enable Large File Support in adaint so that __gnat_readdir
7385 can access files on filesystems mounted from servers that use large
7388 2015-05-09 Eric Botcazou <ebotcazou@adacore.com>
7390 * gcc-interface/utils.c (gnat_write_global_declarations): Use type_decl
7391 method instead of global_decl for TYPE_DECLs.
7393 2015-04-27 Jim Wilson <jim.wilson@linaro.org>
7395 * gcc-interface/Makefile-lan.in (ada.mostlyclean): Remove gnatbind
7398 2015-04-13 Eric Botcazou <ebotcazou@adacore.com>
7400 * gnatvsn.ads (Library_Version): Bump to 6.
7402 2015-04-09 Iain Sandoe <iain@codesourcery.com>
7404 * gcc-interface/Makefile.in (darwin, powerpc): Enable atomics.
7406 2015-04-08 Eric Botcazou <ebotcazou@adacore.com>
7408 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Do not make
7409 a function returning an unconstrained type 'const' for the middle-end.
7411 * gcc-interface/trans.c (Pragma_to_gnu) <case Pragma_Warning>: Use
7412 exact condition to detect Reason => "..." pattern.
7414 2015-03-31 Tom de Vries <tom@codesourcery.com>
7417 * terminals.c (child_setup_tty): Fix warning 'argument to sizeof in
7418 bzero call is the same expression as the destination'.
7420 2015-03-26 Eric Botcazou <ebotcazou@adacore.com>
7422 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Deref>: New case.
7424 2015-03-24 Gary Dismukes <dismukes@adacore.com>
7426 * sem_ch3.adb: Minor typo fix (missing paren).
7428 2015-03-24 Robert Dewar <dewar@adacore.com>
7430 * sinfo.ads: Update comment.
7432 2015-03-24 Robert Dewar <dewar@adacore.com>
7434 * exp_attr.adb: Add entry for typ'Deref.
7435 * sem_attr.adb (Deref): New GNAT attribute.
7436 * sem_attr.ads: Add entry for new GNAT attribute Deref.
7437 * snames.ads-tmpl: Add entries for new attribute Deref.
7439 2015-03-24 Ed Schonberg <schonberg@adacore.com>
7441 * sem_ch13.adb (Rep_Item_Too_Early): allow pragma Convention
7444 2015-03-24 Gary Dismukes <dismukes@adacore.com>
7446 * inline.adb: Minor typo fix.
7448 2015-03-24 Arnaud Charlet <charlet@adacore.com>
7450 * doc/gnat_ugn/building_executable_programs_with_gnat.rst,
7451 doc/gnat_ugn/gnat_utility_programs.rst
7452 doc/gnat_rm/implementation_defined_attributes.rst
7453 doc/gnat_rm/implementation_defined_pragmas.rst
7454 doc/gnat_rm/representation_clauses_and_pragmas.rst
7455 doc/gnat_rm/about_this_guide.rst
7456 doc/gnat_rm/implementation_of_ada_2012_features.rst: Doc improvements.
7457 * gnat_rm.texi, gnat_ugn.texi: Regenerate.
7459 2015-03-23 Jakub Jelinek <jakub@redhat.com>
7462 * adadecode.c (ada_demangle): Guard with IN_RTS instead of IN_GCC.
7464 2015-03-20 Eric Botcazou <ebotcazou@adacore.com>
7467 * gcc-interface/utils.c (gnat_pushdecl): Tidy up and improve comment.
7468 Make sure to chain only main variants through TYPE_NEXT_PTR_TO.
7470 * gcc-interface/trans.c (Attribute_to_gnu): Revert latest change.
7472 2015-03-16 Eric Botcazou <ebotcazou@adacore.com>
7474 * gcc-interface/utils2.c (gnat_invariant_expr): Return null if the type
7475 of the expression ends up being composite.
7477 2015-03-16 Eric Botcazou <ebotcazou@adacore.com>
7479 * gcc-interface/decl.c (is_from_limited_with_of_main): New predicate.
7480 (gnat_to_gnu_entity) <E_Subprogram_Type>: Invoke it on return and
7481 parameter types to detect circularities in ASIS mode.
7482 * gcc-interface/trans.c (Attribute_to_gnu): Mention AI05-0151.
7484 2015-03-16 Eric Botcazou <ebotcazou@adacore.com>
7486 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Abstract_State>: Do not
7487 short-circuit the regular handling.
7489 2015-03-13 Robert Dewar <dewar@adacore.com>
7491 * exp_unst.adb (Note_Uplevel_Reference): Eliminate duplicate
7493 (Actual_Ref): New function.
7494 (AREC_String): Minor reformatting.
7495 (Unnest_Subprogram): Use Actual_Ref.
7496 * frontend.adb (Frontend): Turn off Unnest_Subprogram_Mode
7497 before call to Instantiate_Bodies.
7499 2015-03-13 Ed Schonberg <schonberg@adacore.com>
7501 * freeze.adb (Freeze_Profile): If the return type of a function
7502 being frozen is an untagged limited view and the function is
7503 abstract, mark the type as frozen because there is no later
7504 point at which the profile of the subprogram will be elaborated.
7506 2015-03-13 Robert Dewar <dewar@adacore.com>
7508 * einfo.adb, einfo.ads, atree.adb, atree.ads, atree.h: Add seventh
7509 component to entities. Add new fields Field36-41 and Node36-41.
7511 2015-03-13 Claire Dross <dross@adacore.com>
7513 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Rewrite after review.
7515 2015-03-13 Robert Dewar <dewar@adacore.com>
7517 * exp_util.adb (Is_Volatile_Reference): Compile time known
7518 value is never considered to be a volatile reference.
7520 2015-03-13 Robert Dewar <dewar@adacore.com>
7522 * sem_ch3.adb (Analyze_Object_Contract): Suppress "constant
7523 cannot be volatile" for internally generated object (such as
7524 FIRST and LAST constants).
7526 2015-03-13 Ed Schonberg <schonberg@adacore.com>
7528 * sem_ch12.adb (Validate_Access_Subprogram_Instance): If a
7529 convention is specified for the formal parameter, verify that
7530 the actual has the same convention.
7531 * sem_prag.adb (Set_Convention_From_Pragma): Allow convention
7532 pragma to be set on a generic formal type.
7533 * sem_util.adb (Set_Convention): Ignore within an instance,
7534 as it has already been verified in the generic unit.
7536 2015-03-13 Claire Dross <dross@adacore.com>
7538 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do not inline
7539 subprograms with unconstrained record parameters containing
7541 * sinfo.ads Document GNATprove assumption that type should match
7543 * sem_ch6.adb (Analyze_Subprogram_Body_Contract):
7544 Do not check for Refined_Depends and Refined_Globals contracts
7545 as they are optional.
7547 2015-03-13 Ed Schonberg <schonberg@adacore.com>
7549 * sem_ch12.adb (Instantiate_Type): For a floating-point type,
7550 capture dimension info if any, because the generated subtype
7551 declaration does not come from source and will not process dimensions.
7552 * sem_dim,adb (Analyze_Dimension_Extension_Or_Record_Aggregate):
7553 Do not analyze expressions with an initialization procedure
7554 because aggregates will have been checked at the point of record
7557 2015-03-13 Robert Dewar <dewar@adacore.com>
7559 * aspects.ads, aspects.adb: Add entries for aspect Unimplemented.
7560 * einfo.ads, einfo.adb (Is_Unimplemented): New flag.
7561 * sem_ch13.adb: Add dummy entry for aspect Unimplemented.
7562 * snames.ads-tmpl: Add entry for Name_Unimplemented.
7564 2015-03-13 Gary Dismukes <dismukes@adacore.com>
7566 * style.adb (Missing_Overriding): Apply the
7567 Comes_From_Source test to the Original_Node of the subprogram
7568 node, to handle the case of a null procedure declaration that
7569 has been rewritten as an empty procedure body.
7571 2015-03-13 Robert Dewar <dewar@adacore.com>
7573 * exp_util.ads: Minor fix to comment.
7574 * sem_ch3.adb (Constrain_Index): Correct pasto from previous
7577 2015-03-13 Robert Dewar <dewar@adacore.com>
7579 * exp_util.ads, exp_util.adb (Force_Evaluation): Add Related_Id and
7580 Is_Low/High_Bound params.
7581 * sem_ch3.adb (Constrain_Index): Use new Force_Evaluation calling
7582 sequence to simplify generation of FIRST/LAST temps for bounds.
7584 2015-03-12 Olivier Hainque <hainque@adacore.com>
7586 * gcc-interface/trans.c (Attribute_to_gnu) <Code_Address case>:
7587 On targets where a function symbol designates a function descriptor,
7588 fetch the function code address from the descriptor.
7589 (USE_RUNTIME_DESCRIPTORS): Provide a default definition.
7591 2015-03-04 Robert Dewar <dewar@adacore.com>
7593 * sem_warn.adb: Minor reformatting.
7594 * init.c: Minor tweaks.
7596 2015-03-04 Dmitriy Anisimko <anisimko@adacore.com>
7598 * a-coinho-shared.adb: Fix clear of already empty holder.
7600 2015-03-04 Robert Dewar <dewar@adacore.com>
7602 * exp_unst.adb (Check_Dynamic_Type): Ignore library level types.
7603 (Check_Uplevel_Reference_To_Type): Ignore call inside generic.
7604 (Note_Uplevel_Reference): Ignore call inside generic.
7605 (Note_Uplevel_Reference): Fix check for no entity field.
7606 (Unnest_Subprogram): Ignore call inside generic.
7607 (Find_Current_Subprogram): Use Defining_Entity, not Defining_Unit_Name.
7608 (Visit_Node): Ignore calls to Imported subprograms.
7609 (Visit_Node): Fix problem in finding subprogram body in some cases.
7610 (Add_Form_To_Spec): Use Defining_Entity, not Defining_Unit_Name.
7612 2015-03-04 Robert Dewar <dewar@adacore.com>
7614 * einfo.adb (Is_ARECnF_Entity): Removed.
7615 (Last_Formal): Remove special handling of Is_ARECnF_Entity.
7616 (Next_Formal): Remove special handling of Is_ARECnF_Entity.
7617 (Next_Formal_With_Extras): Remove special handling of Is_ARECnF_Entity.
7618 (Number_Entries): Minor reformatting.
7619 * einfo.ads (Is_ARECnF_Entity): Removed.
7620 * exp_unst.adb (Unnest_Subprogram): Remove setting of
7622 (Add_Extra_Formal): Use normal Extra_Formal circuit.
7623 * sprint.adb (Write_Param_Specs): Properly handle case where
7624 there are no source formals, but we have at least one Extra_Formal
7627 2015-03-04 Ed Schonberg <schonberg@adacore.com>
7629 * sem_aggr.adb (Resolve_Record_Aggregate,
7630 Add_Discriminant_Values): If the value is a reference to the
7631 current instance of an enclosing type, use its base type to check
7632 against prefix of attribute reference, because the target type
7633 may be otherwise constrained.
7635 2015-03-04 Robert Dewar <dewar@adacore.com>
7637 * atree.h: Add entries for Flag287-Flag309.
7638 * einfo.adb: Add (unused) flags Flag287-Flag309.
7640 2015-03-04 Ed Schonberg <schonberg@adacore.com>
7642 * sem_util.adb (Collect_Interfaces, Collect): When gathering
7643 interfaces of ancestors, handle properly a subtype of a private
7646 2015-03-04 Robert Dewar <dewar@adacore.com>
7648 * einfo.adb (Is_ARECnF_Entity): New flag (ARECnF is an extra formal).
7649 (Next_Formal): Don't return ARECnF formal.
7650 (Last_Formal): Don't consider ARECnF formal.
7651 (Next_Formal_With_Extras): Do consider ARECnF formal.
7652 * einfo.ads (Is_ARECnF_Entity): New flag (ARECnF is an extra formal).
7653 * exp_unst.adb (Create_Entities): Set Is_ARECnF_Entity flag.
7655 2015-03-04 Javier Miranda <miranda@adacore.com>
7657 * exp_ch6.adb (Expand_Simple_Function_Return): When the returned
7658 object is a class-wide interface object and we generate the
7659 accessibility described in RM 6.5(8/3) then displace the pointer
7660 to the object to reference the base of the object (to get access
7661 to the TSD of the object).
7663 2015-03-04 Hristian Kirtchev <kirtchev@adacore.com>
7665 * sem_prag.adb (Analyze_Abstract_State): Use routine
7666 Malformed_State_Error to issue general errors.
7667 (Analyze_Pragma): Diagnose a syntax error related to a state
7668 declaration with a simple option.
7669 (Malformed_State_Error): New routine.
7671 2015-03-04 Robert Dewar <dewar@adacore.com>
7673 * a-strsup.adb (Super_Slice): Deal with super flat case.
7674 * einfo.ads: Minor reformatting.
7675 * s-imgdec.adb (Set_Decimal_Digits): Add comment about possibly
7678 2015-03-04 Claire Dross <dross@adacore.com>
7680 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
7681 a-cforse.ads, a-cofove.ads: Use Default_Initial_Condition on formal
7684 2015-03-04 Ed Schonberg <schonberg@adacore.com>
7686 * sem_warn.adb (Check_References): When checking for an unused
7687 in-out parameter of a class- wide type, use its type to determine
7688 whether it is private, in order to avoid a spurious warning when
7689 subprogram spec and body are in different units.
7691 2015-03-04 Yannick Moy <moy@adacore.com>
7693 * sem_attr.adb: Improve warning messages.
7695 2015-03-04 Robert Dewar <dewar@adacore.com>
7697 * exp_ch6.adb (Expand_N_Subprogram_Body): Avoid trying to unnest
7698 generic subprograms.
7699 * exp_unst.adb (Check_Dynamic_Type): Handle record types properly
7700 (Note_Uplevel_Reference): Ignore uplevel references to non-types
7701 (Get_Level): Consider only subprograms, not blocks.
7702 (Visit_Node): Set proper condition for generating ARECnF entity.
7703 Ignore indirect calls. Ignore calls to subprograms
7705 (Unnest_Subprogram): Minor changes in dealing with ARECnF entity.
7706 (Add_Form_To_Spec): Properly set Last_Entity field.
7707 (Unnest_Subprogram): Set current subprogram scope for analyze calls.
7708 Handle case of no uplevel refs in outer subprogram
7709 Don't mark uplevel entities as aliased.
7710 Don't deal with calls with no ARECnF requirement.
7712 2015-03-04 Robert Dewar <dewar@adacore.com>
7714 * s-valrea.adb (Scan_Real): Remove redundant tests from scaling loops.
7715 * s-imgdec.adb (Set_Decimal_Digits): Remove redundant Max
7716 operation in computing LZ.
7717 * sem_attr.adb: Minor typo fix
7719 2015-03-04 Robert Dewar <dewar@adacore.com>
7721 * exp_ch7.adb: Minor reformatting.
7722 * exp_unst.adb (Build_Tables): Fix minor glitch for no separate
7724 * erroutc.adb (Delete_Msg): add missing decrement of info msg counter.
7726 2015-03-04 Hristian Kirtchev <kirtchev@adacore.com>
7728 * exp_ch6.adb (Build_Pragma_Check_Equivalent): Suppress
7729 references to formal parameters subject to pragma Unreferenced.
7730 (Suppress_Reference): New routine.
7731 * sem_attr.adb (Analyze_Attribute): Reimplement the analysis
7732 of attribute 'Old. Attributes 'Old and 'Result now share
7734 (Analyze_Old_Result_Attribute): New routine.
7735 (Check_Placement_In_Check): Removed.
7736 (Check_Placement_In_Contract_Cases): Removed.
7737 (Check_Placement_In_Test_Case): Removed.
7738 (Check_Use_In_Contract_Cases): Removed.
7739 (Check_Use_In_Test_Case): Removed.
7740 (In_Refined_Post): Removed.
7741 (Is_Within): Removed.
7742 * sem_warn.adb (Check_Low_Bound_Tested): Code cleanup.
7743 (Check_Low_Bound_Tested_For): New routine.
7745 2015-03-04 Hristian Kirtchev <kirtchev@adacore.com>
7747 * exp_ch3.adb (Expand_N_Object_Declaration):
7748 Generate a runtime check to test the expression of pragma
7749 Default_Initial_Condition when the object is default initialized.
7751 2015-03-02 Robert Dewar <dewar@adacore.com>
7753 * scng.adb (Scan): Ignore illegal character in relaxed
7756 2015-03-02 Ed Schonberg <schonberg@adacore.com>
7758 * sem_ch4.adb (Analyze_Set_Membership); Retain Overloaded flag
7759 on left operand, so it can be properly resolved with type of
7760 alternatives of right operand.
7761 * sem_res.adb (Resolve_Set_Membership): Handle properly an
7762 overloaded left-hand side when the alternatives on the right
7763 hand side are literals of some universal type. Use first
7764 non-overloaded alternative to find expected type.
7766 2015-03-02 Ed Schonberg <schonberg@adacore.com>
7768 * exp_ch7.adb (Make_Set_Finalize_Address_Call): Use underlying
7769 type to retrieve designated type, because the purported access
7770 type may be a partial (private) view, when it is declared in
7771 the private part of a nested package, and finalization actions
7772 are generated when completing compilation of enclosing unit.
7774 2015-03-02 Robert Dewar <dewar@adacore.com>
7776 * back_end.adb (Call_Back_End): Remove previous patch,
7777 the back end now gets to see the result of -gnatd.1
7778 (Unnest_Subprogram_Mode) processing.
7779 * elists.ads, elists.adb (List_Length): New function.
7780 * exp_unst.ads, exp_unst.adb: Major changes, first complete version.
7781 * sem_util.adb (Check_Nested_Access): Handle formals in
7782 Unnest_Subprogram_Mode.
7783 (Adjust_Named_Associations): Minor reformatting.
7784 * sprint.adb (Sprint_Node_Actual): Fix failure to print aliased
7787 2015-03-02 Robert Dewar <dewar@adacore.com>
7789 * atree.ads, atree.adb (Uint24): New function
7790 (Set_Uint24): New procedure.
7791 * atree.h (Uint24): New macro for field access.
7792 * back_end.adb (Call_Back_End): For now, don't call back end
7793 if unnesting subprogs.
7794 * einfo.adb (Activation_Record_Component): New field
7795 (Subps_Index): New field.
7796 * einfo.ads (Activation_Record_Component): New field
7797 (Subps_Index): New field Minor reordering of comments into alpha order.
7798 * exp_unst.ads, exp_unst.adb: Continued development.
7800 2015-03-02 Gary Dismukes <dismukes@adacore.com>
7802 * exp_disp.ads: Minor reformatting.
7804 2015-03-02 Ed Schonberg <schonberg@adacore.com>
7806 * sem_ch8.adb (Chain_Use_Clause): Do not chain use clause from
7807 ancestor to list of use clauses active in descendant unit if we
7808 are within the private part of an intervening parent, to prevent
7809 circularities in use clause list.
7811 2015-03-02 Javier Miranda <miranda@adacore.com>
7813 * exp_ch9.adb (Build_Corresponding_Record): Propagate type
7814 invariants to the corresponding record type.
7815 * exp_disp.ad[sb] (Set_DT_Position_Value): New subprogram
7816 which sets the value of the DTC_Entity associated with a given
7817 primitive of a tagged type and propagates the value to the
7819 (Set_DTC_Entity_Value): Propagate the DTC
7820 value to the wrapped entity.
7821 * sem_ch13.adb (Build_Invariant_Procedure): Append the code
7822 associated with invariants of progenitors.
7823 * sem_ch3.adb (Build_Derived_Record_Type): Inherit type invariants
7824 of parents and progenitors.
7825 (Process_Full_View): Check hidden inheritance of class-wide type
7827 * sem_ch7.adb (Analyze_Package_Specification): Do not generate
7828 the invariant procedure for interface types; build the invariant
7829 procedure for tagged types inheriting invariants from their
7831 * sem_prag.adb (Pragma_Invariant) Allow invariants in interface
7832 types but do not build their invariant procedure since their
7833 invariants will be propagated to the invariant procedure of
7834 types covering the interface.
7835 * exp_ch6.adb, exp_disp.adb, sem_ch3.adb, sem_ch7.adb,
7836 sem_ch8.adb, sem_disp.adb: Replace all calls to Set_DT_Position
7837 by calls to Set_DT_Position_Value.
7839 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
7841 * sem_attr.adb (Analyze_Attribute): Factor out heavily indented
7842 code in Denote_Same_Function. Do not analyze attribute 'Result
7843 when it is inside procedure _Postconditions. Remove a misplaced
7844 warning diagnostic. Code cleanup.
7845 (Denote_Same_Function): New routine.
7846 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Code
7847 cleanup. Warn on pre/postconditions on an inlined subprogram.
7848 (Analyze_Pragma, Refined_Post case): Warn on pre/postconditions on
7849 an inlined subprogram.
7850 (Analyze_Pre_Post_Condition_In_Decl_Part): Code cleanup. Warn on
7851 pre/post condition on an inlined subprogram.
7852 (Analyze_Test_Case_In_Decl_Part): Code cleanup. Warn on
7853 pre/postconditions on an inlined subprogram.
7854 (Check_Postcondition_Use_In_Inlined_Subprogram): New routine.
7856 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
7858 * sem_prag.adb (Ensure_Aggregate_Form):
7859 Ensure that the name denoted by the Chars of a pragma argument
7860 association has the proper Sloc when converted into an aggregate.
7862 2015-03-02 Bob Duff <duff@adacore.com>
7864 * sem_ch6.adb (Check_Private_Overriding): Capture
7865 Incomplete_Or_Partial_View in a constant. This is cleaner and
7868 2015-03-02 Gary Dismukes <dismukes@adacore.com>
7870 * einfo.ads, exp_unst.ads: Minor reformatting.
7872 2015-03-02 Ed Schonberg <schonberg@adacore.com>
7874 * a-strsea.adb (Find_Token): Ensure that the range of iteration
7875 does not perform any improper character access. This prevents
7876 erroneous access in the unusual case of an empty string target
7877 and a From parameter less than Source'First.
7879 2015-03-02 Robert Dewar <dewar@adacore.com>
7881 * elists.adb (List_Length): Fix incorrect result.
7883 2015-03-02 Bob Duff <duff@adacore.com>
7885 * sem_ch6.adb (Check_Private_Overriding): Refine the legality
7886 checks here. It used to check that the function is merely
7887 overriding SOMEthing. Now it checks that the function is
7888 overriding a corresponding public operation. This is a correction
7889 to the implementation of the rule in RM-3.9.3(10).
7891 2015-03-02 Robert Dewar <dewar@adacore.com>
7893 * debug.adb: Document new debug flag -gnatd.1.
7894 * einfo.ads, einfo.adb (Has_Nested_Subprogram): New flag.
7895 (Has_Uplevel_Reference): New flag (Is_Static_Type): New flag.
7896 (Uplevel_Reference_Noted):New flag (Uplevel_References): New field.
7897 * elists.ads elists.adb (List_Length): New function.
7898 * exp_ch6.adb (Expand_N_Subprogram_Body): Call Unnest_Subprogram
7899 when appropriate (Process_Preconditions): Minor code
7900 reorganization and reformatting
7901 * exp_unst.ads, exp_unst.adb: New files.
7902 * gnat1drv.adb (Adjust_Global_Switches): Set
7903 Unnest_Subprogram_Mode if -gnatd.1
7904 * namet.ads, namet.adb (Name_Find_Str): New version of Name_Find with
7906 * opt.ads (Unnest_Subprogram_Mode): New flag.
7907 * par-ch3.adb (P_Identifier_Declarations): Fixes to -gnatd.2 handling.
7908 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set
7909 Has_Nested_Subprogram flag.
7910 * sem_ch8.adb (Find_Direct_Name): New calling sequence for
7911 Check_Nested_Access.
7912 (Find_Selected_Component): Minor comment addition.
7913 * sem_util.adb (Check_Nested_Access): New version for use with Exp_Unst.
7914 (Note_Possible_Modification): New calling sequence for
7915 Check_Nested_Access.
7916 * sem_util.ads (Check_Nested_Access): New version for use with Exp_Unst.
7917 * gcc-interface/Make-lang.in (GNAT1_OBJS): Add exp_unst.o
7919 2015-03-02 Pierre-Marie de Rodat <derodat@adacore.com>
7921 * gcc-interface/utils.c (gnat_pushdecl): For non-artificial pointer
7922 types, preserve the original type and create copies just like the C
7923 front-end does. For artificial ones, do not define a name for
7925 (create_type_decl): When gnat_pushdecl made the input type the
7926 original type for the new declaration, do not define a stub
7928 * gcc-interface/utils2.c (build_binary_op): Accept two different
7929 pointer types when they point to the same type.
7931 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
7933 * exp_util.adb (Possible_Bit_Aligned_Component): Do not process
7935 * sem_util.adb (Kill_Current_Values): Do not invalidate and
7938 2015-03-02 Robert Dewar <dewar@adacore.com>
7940 * sem_ch3.adb, exp_attr.adb, checks.adb, exp_aggr.adb: Minor
7943 2015-03-02 Ed Schonberg <schonberg@adacore.com>
7945 * sem_ch8.adb: extend use of Available_Subtype.
7947 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
7949 * sem_prag.adb (Duplication_Error): Remove the special handling
7950 of 'Class or _Class in the context of pre/postconditions.
7951 (Process_Class_Wide_Condition): Remove the special handling of
7952 'Class or _Class in the context of pre/postconditions.
7953 * sem_util.adb (Original_Aspect_Pragma_Name): Names Pre_Class
7954 and Post_Class no longer need to be converted to _Pre and _Post.
7955 * sem_util.ads (Original_Aspect_Pragma_Name): Update the comment
7958 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
7960 * exp_ch6.adb (Process_Preconditions): Modify the
7961 mechanism that find the first source declaration to correct exit
7962 the loop once it has been found.
7964 2015-03-02 Gary Dismukes <dismukes@adacore.com>
7966 * a-strsea.adb: Minor typo fix.
7968 2015-03-02 Bob Duff <duff@adacore.com>
7970 * einfo.ads: Minor comment fixes.
7972 2015-03-02 Gary Dismukes <dismukes@adacore.com>
7974 * einfo.adb, checks.adb: Minor reformatting and typo fixes.
7976 2015-03-02 Ed Schonberg <schonberg@adacore.com>
7978 * exp_aggr.adb (Get_Assoc_Expr): If the Default_Component_Value
7979 is defined for the array type, use it instead of a Default_Value
7980 specified for the component type itself.
7982 2015-03-02 Thomas Quinot <quinot@adacore.com>
7984 * exp_attr.adb (Expand_N_Attribute_Reference, case Input): When
7985 expanding a 'Input attribute reference for a class-wide type,
7986 do not generate a separate object declaration for the controlling
7987 tag dummy object; instead, generate the expression inline in the
7988 dispatching call. Otherwise, the declaration (which involves a
7989 call to String'Input, returning a dynamically sized value on the
7990 secondary stack) will be expanded outside of proper secondary
7991 stack mark/release operations, and will thus cause a secondary
7994 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
7996 * checks.adb (Add_Validity_Check): Change the names of all
7997 formal parameters to better illustrate their purpose. Update
7998 the subprogram documentation. Update all occurrences of the
7999 formal parameters. Generate a pre/postcondition pragma by
8000 calling Build_Pre_Post_Condition.
8001 (Build_PPC_Pragma): Removed.
8002 (Build_Pre_Post_Condition): New routine.
8003 * einfo.adb Node8 is no longer used as Postcondition_Proc. Node14
8004 is now used as Postconditions_Proc. Flag240 is now renamed to
8005 Has_Expanded_Contract. (First_Formal): The routine can now
8006 operate on generic subprograms.
8007 (First_Formal_With_Extras): The routine can now operate on generic
8009 (Has_Expanded_Contract): New routine.
8010 (Has_Postconditions): Removed.
8011 (Postcondition_Proc): Removed.
8012 (Postconditions_Proc): New routine.
8013 (Set_Has_Expanded_Contract): New routine.
8014 (Set_Has_Postconditions): Removed.
8015 (Set_Postcondition_Proc): Removed.
8016 (Set_Postconditions_Proc): New routine.
8017 (Write_Entity_Flags): Remove the output of Has_Postconditions. Add
8018 the output of Has_Expanded_Contract.
8019 (Write_Field8_Name): Remove the output of Postcondition_Proc.
8020 (Write_Field14_Name): Add the output of Postconditions_Proc.
8021 * einfo.ads New attributes Has_Expanded_Contract and
8022 Postconditions_Proc along with occurrences in entities.
8023 Remove attributes Has_Postconditions and Postcondition_Proc
8024 along with occurrences in entities.
8025 (Has_Expanded_Contract): New routine along with pragma Inline.
8026 (Has_Postconditions): Removed along with pragma Inline.
8027 (Postcondition_Proc): Removed along with pragma Inline.
8028 (Postconditions_Proc): New routine along with pragma Inline.
8029 (Set_Has_Expanded_Contract): New routine along with pragma Inline.
8030 (Set_Has_Postconditions): Removed along with pragma Inline.
8031 (Set_Postcondition_Proc): Removed along with pragma Inline.
8032 (Set_Postconditions_Proc): New routine along with pragma Inline.
8033 * exp_ch6.adb (Add_Return): Code cleanup. Update the
8034 generation of the call to the _Postconditions routine of
8035 the procedure. (Expand_Non_Function_Return): Reformat the
8036 comment on usage. Code cleanup. Update the generation of
8037 the call to the _Postconditions routine of the procedure or
8039 (Expand_Simple_Function_Return): Update the
8040 generation of the _Postconditions routine of the function.
8041 (Expand_Subprogram_Contract): Reimplemented.
8042 * exp_ch6.ads (Expand_Subprogram_Contract): Update the parameter
8043 profile along the comment on usage.
8044 * exp_ch9.adb (Build_PPC_Wrapper): Code cleanup.
8045 (Expand_N_Task_Type_Declaration): Generate pre/postconditions
8046 wrapper when the entry [family] has a contract with
8048 * exp_prag.adb (Expand_Attributes_In_Consequence): New routine.
8049 (Expand_Contract_Cases): This routine and its subsidiaries now
8050 analyze all generated code.
8051 (Expand_Old_In_Consequence): Removed.
8052 * sem_attr.adb Add with and use clause for Sem_Prag.
8053 (Analyze_Attribute): Reimplment the analysis of attribute 'Result.
8054 (Check_Use_In_Test_Case): Use routine Test_Case_Arg to obtain
8056 * sem_ch3.adb (Analyze_Declarations): Analyze the contract of
8057 a generic subprogram.
8058 (Analyze_Object_Declaration): Do not create a contract node.
8059 (Derive_Subprogram): Do not create a contract node.
8060 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Do
8061 not create a contract node.
8062 (Analyze_Completion_Contract): New routine.
8063 (Analyze_Function_Return): Alphabetize.
8064 (Analyze_Generic_Subprogram_Body): Alphabetize. Do not create a
8065 contract node. Do not copy pre/postconditions to the original
8067 (Analyze_Null_Procedure): Do not create a contract node.
8068 (Analyze_Subprogram_Body_Contract): Reimplemented.
8069 (Analyze_Subprogram_Body_Helper): Do not mark the enclosing scope
8070 as having postconditions. Do not create a contract node. Analyze
8071 the subprogram body contract of a body that acts as a compilation
8072 unit. Expand the subprogram contract after the declarations have
8074 (Analyze_Subprogram_Contract): Reimplemented.
8075 (Analyze_Subprogram_Specification): Do not create a contract node.
8076 (List_Inherited_Pre_Post_Aspects): Code cleanup.
8077 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Update the
8079 (Analyze_Subprogram_Contract): Update the
8080 parameter profile and the comment on usage.
8081 * sem_ch7.adb (Analyze_Package_Body_Helper): Do not create a
8083 (Analyze_Package_Declaration): Do not create a
8085 (Is_Subp_Or_Const_Ref): Ensure that the prefix has an entity.
8086 * sem_ch8.adb (Analyze_Subprogram_Renaming): Do not create a
8088 * sem_ch9.adb (Analyze_Entry_Declaration): Do not create a
8090 * sem_ch10.adb (Analyze_Compilation_Unit): Move local variables to
8091 their proper section and alphabetize them. Analyze the contract of
8092 a [generic] subprogram after all Pragmas_After have been analyzed.
8093 (Analyze_Subprogram_Body_Stub_Contract): Alphabetize.
8094 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Do not
8095 create a contract node.
8096 (Analyze_Generic_Subprogram_Declaration):
8097 Alphabetize local variables. Do not create a contract
8098 node. Do not generate aspects out of pragmas for ASIS.
8099 (Analyze_Subprogram_Instantiation): Instantiate
8100 the contract of the subprogram. Do not create a
8101 contract node. (Instantiate_Contract): New routine.
8102 (Instantiate_Subprogram_Body): Alphabetize local variables.
8103 (Save_Global_References_In_Aspects): New routine.
8104 (Save_References): Do not save the global references found within
8105 the aspects of a generic subprogram.
8106 * sem_ch12.ads (Save_Global_References_In_Aspects): New routine.
8107 * sem_ch13.adb (Analyze_Aspect_Specifications): Do not use
8108 Original_Node for establishing linkages.
8109 (Insert_Pragma): Insertion in a subprogram body takes precedence over
8110 the case where the subprogram body is also a compilation unit.
8111 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Use
8112 Get_Argument to obtain the proper expression. Install the generic
8113 formals when the related context is a generic subprogram.
8114 (Analyze_Depends_In_Decl_Part): Use Get_Argument to obtain
8115 the proper expression. Use Corresponding_Spec_Of to obtain
8116 the spec. Install the generic formal when the related context
8117 is a generic subprogram.
8118 (Analyze_Global_In_Decl_Part): Use Get_Argument to obtain the proper
8119 expression. Use Corresponding_Spec_Of to obtain the spec. Install the
8120 generic formal when the related context is a generic subprogram.
8121 (Analyze_Initial_Condition_In_Decl_Part): Use Get_Argument
8122 to obtain the proper expression. Remove the call to
8123 Check_SPARK_Aspect_For_ASIS as the analysis is now done
8125 (Analyze_Pragma): Update all occurrences
8126 to Original_Aspect_Name. Pragmas Contract_Cases, Depends,
8127 Extensions_Visible, Global, Postcondition, Precondition and
8128 Test_Case now carry generic templates when the related context
8129 is a generic subprogram. The same pragmas are no longer
8130 forcefully fully analyzed when the context is a subprogram
8131 that acts as a compilation unit. Pragmas Abstract_State,
8132 Initial_Condition, Initializes and Refined_State have been clean
8133 up. Pragmas Post, Post_Class, Postcondition, Pre, Pre_Class
8134 and Precondition now use the same routine for analysis. Pragma
8135 Refined_Post does not need to check the use of 'Result or
8136 the lack of a post-state in its expression. Reimplement the
8137 analysis of pragma Test_Case.
8138 (Analyze_Pre_Post_Condition): New routine.
8139 (Analyze_Pre_Post_Condition_In_Decl_Part):
8141 (Analyze_Refined_Depends_In_Decl_Part): Use Get_Argument to obtain the
8143 (Analyze_Refined_Global_In_Decl_Part): Use Get_Argument to obtain
8144 the proper expression.
8145 (Analyze_Test_Case_In_Decl_Part): Reimplemented.
8146 (Check_Pre_Post): Removed.
8147 (Check_Precondition_Postcondition): Removed.
8148 (Check_SPARK_Aspect_For_ASIS): Removed.
8149 (Check_Test_Case): Removed.
8150 (Collect_Subprogram_Inputs_Outputs): Use Get_Argument
8151 to obtain the proper expression. Use Corresponding_Spec_Of to
8152 find the proper spec.
8153 (Create_Generic_Template): New routine.
8154 (Duplication_Error): New routine.
8155 (Expression_Function_Error): New routine.
8156 (Find_Related_Subprogram_Or_Body): Moved to the spec
8157 of Sem_Prag. Emit precise error messages. Account for cases of
8158 rewritten expression functions, generic instantiations, handled
8159 sequence of statements and pragmas from aspects.
8160 (Get_Argument): New routine.
8161 (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Removed.
8162 (Preanalyze_CTC_Args): Removed.
8163 (Process_Class_Wide_Condition): New routine.
8164 * sem_prag.ads (Analyze_Test_Case_In_Decl_Part): Update
8165 the parameter profile along with the comment on usage.
8166 (Find_Related_Subprogram_Or_Body): Moved from the body of Sem_Prag.
8167 (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Removed.
8168 (Test_Case_Arg): New routine.
8169 * sem_util.adb Add with and use clauses for Sem_Ch6.
8170 (Add_Contract_Item): This routine now creates a contract
8171 node the first time an item is added. Remove the duplicate
8172 aspect/pragma checks.
8173 (Check_Result_And_Post_State): Reimplemented.
8174 (Corresponding_Spec_Of): New routine.
8175 (Get_Ensures_From_CTC_Pragma): Removed.
8176 (Get_Requires_From_CTC_Pragma): Removed.
8177 (Has_Significant_Contract): New routine.
8178 (Inherit_Subprogram_Contract): Inherit only if the source
8180 (Install_Generic_Formals): New routine.
8181 (Original_Aspect_Name): Removed.
8182 (Original_Aspect_Pragma_Name): New routine.
8183 * sem_util.ads (Check_Result_And_Post_State): Reimplemented.
8184 (Corresponding_Spec_Of): New routine.
8185 (Get_Ensures_From_CTC_Pragma): Removed.
8186 (Get_Requires_From_CTC_Pragma): Removed.
8187 (Has_Significant_Contract): New routine.
8188 (Install_Generic_Formals): New routine.
8189 (Original_Aspect_Name): Removed.
8190 (Original_Aspect_Pragma_Name): New routine.
8191 * sem_warn.adb Add with and use clauses for Sem_Prag.
8192 (Within_Postcondition): Use Test_Case_Arg to extract "Ensures".
8194 2015-03-02 Ed Schonberg <schonberg@adacore.com>
8196 * sem_ch8.adb (Available_Subtype): Optimization in
8197 Find_Selected_Component: when safe, use existing subtype of
8198 array component, possibly discriminant-dependent, rather than
8199 creating new subtype declaration for it. In this fashion different
8200 occurrences of the component have the same subtype, rather than
8201 just equivalent ones. Simplifies value tracing in GNATProve.
8203 2015-03-01 Arnaud Charlet <charlet@adacore.com>
8206 * doc/gnat_ugn/gnat_project_manager.rst,
8207 doc/gnat_ugn/platform_specific_information.rst: Remove reference to
8208 image, too troublesome with texi format.
8209 * gnat_ugn.texi: Regenerate.
8211 2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
8214 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8): Remove.
8215 (DEF_FUNCTION_TYPE_VAR_12): Likewise.
8216 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
8218 2015-02-23 Thomas Schwinge <thomas@codesourcery.com>
8220 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8): Fix number of
8221 arguments parameter.
8222 (DEF_FUNCTION_TYPE_VAR_12): Likewise.
8224 2015-02-22 Arnaud Charlet <charlet@adacore.com>
8226 * doc/Makefile: postprocess texinfo files to update @dircategory
8227 and update texi files under gcc/ada.
8228 * gnat_ugn.texi, gnat_rm.texi: Regenerated.
8230 2015-02-22 Arnaud Charlet <charlet@adacore.com>
8232 * doc/gnat_ugn/project-manager-figure.png,
8233 doc/gnat_ugn/rtlibrary-structure.png: New.
8235 2015-02-22 Tom de Vries <tom@codesourcery.com>
8238 * gnat-style.texi (@subsection Loop Statements): Replace @noindent by
8239 @item, and fix warning '@itemize has text but no @item'.
8241 2015-02-20 Ed Schonberg <schonberg@adacore.com>
8243 * sem_prag.adb (Analyze_Pragma, case Obsolescent): Pragma
8244 legally applies to an abstract subprogram declaration.
8245 * freeze.adb: Minor comment addition.
8247 2015-02-20 Robert Dewar <dewar@adacore.com>
8249 * errout.ads: Document replacement of Name_uPre/Post/Type_Invariant.
8250 * erroutc.adb (Set_Msg_Str): Replace _xxx.
8251 (Pre/Post/Type_Invariant) by xxx'Class.
8252 * erroutc.ads (Set_Msg_Str): Replace _xxx.
8253 (Pre/Post/Type_Invariant) by xxx'Class.
8254 * sem_prag.adb (Fix_Error): Remove special casing of
8255 Name_uType_Invariant.
8256 (Analyze_Pre_Post_Condition_In_Decl_Part): Remove special casing of
8257 Name_uPre and Name_uPost in aspect case (done in Errout now).
8259 2015-02-20 Robert Dewar <dewar@adacore.com>
8261 * g-alveop.adb: Minor style fixes.
8263 2015-02-20 Robert Dewar <dewar@adacore.com>
8265 * freeze.adb (Warn_Overlay): Guard against blow up with address
8268 2015-02-20 Bob Duff <duff@adacore.com>
8270 * exp_attr.adb (May_Be_External_Call): Remove this. There is no need
8271 for the compiler to guess whether the call is internal or external --
8272 it is always external.
8273 (Expand_Access_To_Protected_Op): For P'Access, where P
8274 is a protected subprogram, always create a pointer to the
8275 External_Subprogram.
8277 2015-02-20 Robert Dewar <dewar@adacore.com>
8279 * a-dispat.adb, a-stcoed.ads: Minor reformatting.
8281 2015-02-20 Robert Dewar <dewar@adacore.com>
8283 * sem_ch13.adb (Build_Discrete_Static_Predicate): Allow static
8284 predicate for non-static subtype.
8285 (Build_Predicate_Functions): Do not assume subtype associated with a
8286 static predicate must be static.
8288 2015-02-20 Robert Dewar <dewar@adacore.com>
8290 * errout.adb (Set_Msg_Node): Better handling of internal names
8291 (Set_Msg_Node): Kill message when we cannot eliminate internal name.
8292 * errout.ads: Document additional case of message deletion.
8293 * namet.adb (Is_Internal_Name): Refined to consider wide
8294 strings in brackets notation and character literals not to be
8296 * sem_ch8.adb (Find_Selected_Component): Give additional error
8297 when selector name is a subprogram whose first parameter has
8298 the same type as the prefix, but that type is untagged.
8300 2015-02-20 Robert Dewar <dewar@adacore.com>
8302 * g-allein.ads, g-alveop.adb, g-alveop.ads, opt.ads: Minor reformatting
8304 2015-02-20 Tristan Gingold <gingold@adacore.com>
8306 * opt.ads (GNAT_Mode_Config): New variable.
8307 * opt.adb (Set_Opt_Config_Switches): Consider GNAT_Mode_Config
8308 to set Assertions_Enabled.
8309 * switch-c.adb (Scan_Front_End_Switches): Set GNAT_Mode_Config
8312 2015-02-20 Robert Dewar <dewar@adacore.com>
8314 * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Add an additional
8315 comment regarding the handling of unterminated fixed-point
8317 * s-valuns.ads (Scan_Raw_Unsigned): Add comments
8318 corresponding to those previously added for
8319 System.Val_LLU.Scan_Raw_Long_Long_Unsigned.
8321 2015-02-20 Olivier Hainque <hainque@adacore.com>
8323 * g-allein.ads, g-alveop.ads, g-alveop.adb: Code clean ups.
8325 2015-02-20 Robert Dewar <dewar@adacore.com>
8327 * sem_prag.adb: Minor comment clarification.
8329 2015-02-20 Olivier Hainque <hainque@adacore.com>
8331 * g-allein.ads (vec_ctf, vec_vcsfx, vec_vcfux): Remove.
8332 * g-alleve.ads, g-alleva.adb (vcfux): Likewise.
8333 * g-alveop.ads (vec_vcfsx, vec_vcfux): Just rename the ll versions.
8334 (vec_ctf): Now renamings as well.
8336 2015-02-20 Robert Dewar <dewar@adacore.com>
8338 * switch-c.adb, bindgen.adb: Minor reformatting.
8340 2015-02-20 Ed Schonberg <schonberg@adacore.com>
8342 * sem_prag.adb (Analyze_Pragma, case Type_Invariant):
8343 Invariant'class is allowed on an abstract type.
8345 2015-02-20 Ed Schonberg <schonberg@adacore.com>
8347 * sem_ch3.adb (Access_Definition): If the access definition is
8348 for a protected component and defines an access to protected
8349 subprogram, do not create an itype reference for it because a
8350 full type declaration will be built in order to generate the
8351 proper equivalent type.
8352 (Analyze_Subtype_Declaration): Add information of incomplete
8353 subtypes, for Ada 2012 extended uses of incomplete types.
8355 2015-02-20 Gary Dismukes <dismukes@adacore.com>
8357 * sem_res.adb: Minor reformatting.
8359 2015-02-20 Vincent Celier <celier@adacore.com>
8361 * switch-c.adb (Scan_Front_End_Switches): When comparing runtime
8362 path name for several switches --RTS, use the normalized path
8365 2015-02-20 Vincent Celier <celier@adacore.com>
8367 * bindgen.adb: Minor reformatting and code reorganization.
8369 2015-02-20 Jose Ruiz <ruiz@adacore.com>
8371 * a-stcoed.ads: Add spec for this package (Unimplemented_Unit).
8372 * impunit.adb (Non_Imp_File_Names_12): Mark unit a-stcoed.ads as
8373 defined by Ada 2012.
8375 2015-02-20 Arnaud Charlet <charlet@adacore.com>
8377 * sysdep.c, expect.c, s-oscons-tmplt.c, gsocket.h, adaint.c: Remove
8378 obsolete references to RTX, nucleus, VMS.
8380 2015-02-20 Ed Schonberg <schonberg@adacore.com>
8382 * sem_prag.adb (Fix_Error): For an illegal Type_Invariant'Class
8383 aspect, use name that mentions Class explicitly, rather than
8384 compiler-internal name.
8386 2015-02-20 Robert Dewar <dewar@adacore.com>
8388 * debug.adb: Add documentation for -gnatd.2 (allow statements
8390 * par-ch3.adb (P_Identifier_Declarations): Handle
8391 statement appearing where declaration expected more cleanly.
8392 (Statement_When_Declaration_Expected): Implement debug flag
8395 2015-02-20 Jose Ruiz <ruiz@adacore.com>
8397 * a-dinopr.ads: Add spec for this package (Unimplemented_Unit).
8398 * a-dispat.ads (Yield): Include procedure added in Ada 2012.
8399 * a-dispat.adb (Yield): Implement procedure added in Ada 2012.
8400 * impunit.adb (Non_Imp_File_Names_05): Mark unit a-dinopr.ads as
8401 defined by Ada 2005.
8402 * snames.ads-tmpl (Name_Non_Preemptive_FIFO_Within_Priorities):
8403 This is the correct name for the dispatching policy (FIFO was
8406 2015-02-20 Javier Miranda <miranda@adacore.com>
8408 * sem_res.adb (Resolve_Type_Conversion): If the type of the
8409 operand is the limited-view of a class-wide type then recover
8410 the class-wide type of the non-limited view.
8412 2015-02-20 Arnaud Charlet <charlet@adacore.com>
8414 * gcc-interface/Makefile.in: Remove references to nucleus.
8415 * gcc-interface/decl.c (gnat_to_gnu_entity, case E_Procedure): Set
8416 extern_flag to true for Inline_Always subprograms with
8417 Intrinsic convention.
8419 2015-02-20 Yannick Moy <moy@adacore.com>
8421 * sem_prag.ads: Minor typo in comment.
8423 2015-02-20 Pascal Obry <obry@adacore.com>
8425 * s-osprim-mingw.adb: Fix Get_Base_Time parameter mode.
8427 2015-02-20 Vincent Celier <celier@adacore.com>
8429 * makeutl.adb (Get_Directories.Add_Dir): Add a directory only
8432 2015-02-20 Robert Dewar <dewar@adacore.com>
8434 * sem_eval.ads: Minor reformatting.
8436 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
8438 * freeze.adb (Size_Known): Do not set the packed size for
8439 independent type or component.
8440 (Freeze_Array_Type): Check for Independent[_Components] with packing
8441 or explicit component size clause.
8442 * gnat1drv.adb (Post_Compilation_Validation_Checks): Do the validation
8443 of independence pragmas only for non-GCC back-ends.
8444 * sem_ch13.adb (Initialize): Likewise for the initialization.
8445 * sem_prag.adb (Record_Independence_Check): New procedure to record an
8446 independence check in the table.
8447 (Analyze_Pragma): Use it throughout instead of doing it manually.
8448 * gcc-interface/decl.c (gnat_to_gnu_field): Add support for
8449 independent type or component.
8451 2015-02-20 Thomas Quinot <quinot@adacore.com>
8453 * adaint.c (__gnat_readdir): For Solaris, use 64 bit variants of
8454 struct direct and readdir. This is required for NFS filesystems
8455 mounted from servers that use 64-bit cookies.
8457 2015-02-20 Ed Schonberg <schonberg@adacore.com>
8459 * sem_ch12.adb (Analyze_Subprogram_Instantiaion): New subprogram
8460 Build_Subprogram_Renaming, to create renaming of subprogram
8461 instance in the the declaration of the wrapper package rather
8462 than in its body, so that it is available for analysis of aspects
8463 propagated from generic to instantiation.
8464 (Check_Mismatch): An actual for a formal package that is an
8465 incomplete type matches a formal type that is incomplete.
8466 (Instantiate_Package_Body): Move code that builds subprogram
8467 renaming to Analyze_Subprogram_Instantiation.
8468 (Instantiate_Type): The generated subtype is a limited view if
8469 the actual is a limited view.
8470 (Load_Parent_Of_Generic): Retrieve instance declaration from
8471 its new position within wrapper package.
8473 2015-02-20 Arnaud Charlet <charlet@adacore.com>
8475 * s-parame-vxworks.adb, s-os_lib.ads: Update comments.
8477 2015-02-20 Robert Dewar <dewar@adacore.com>
8479 * s-osinte-vxworks.ads (To_Timespec): Add comment about the
8480 issue of negative arguments.
8482 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
8484 * gnat1drv.adb: Minor consistency fix.
8486 2015-02-20 Pascal Obry <obry@adacore.com>
8488 * s-osprim-mingw.adb (Get_Base_Time): Properly release lock in all
8491 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
8493 * inline.adb (Expand_Inlined_Call): Skip again calls to subprogram
8495 * exp_ch6.adb (Expand_Call): Use back-end inlining
8496 instead of expansion for simple subprogram renamings.
8498 2015-02-20 Robert Dewar <dewar@adacore.com>
8500 * exp_util.adb: Minor reformatting.
8502 2015-02-20 Vincent Celier <celier@adacore.com>
8504 * switch-c.adb (Scan_Front_End_Switches): Do not fail when --RTS=
8505 is specified several times with different values that indicates
8506 the same runtime directory.
8508 2015-02-20 Ed Schonberg <schonberg@adacore.com>
8510 * sem_attr.adb (Check_Not_Incomplete_Type): Clean up code to
8511 handle properly illegal uses of attributes on prefixes on an
8512 incomplete type, both when the type of the prefix is locally
8513 incomplete, and when it is a limited view of a type whose
8514 non-limited view is not available.
8515 (Analyze_Attribute): Add calls to Check_Not_Incomplete_Type for
8516 'Address and others.
8518 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
8520 * exp_ch6.adb: Fix minor typo in comment.
8522 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
8524 * sinfo.ads: Add comment.
8526 2015-02-20 Olivier Hainque <hainque@adacore.com>
8528 * opt.ads: Replace Opt.Suppress_All_Inlining by two separate
8529 flags controlling the actual FE inlining out of pragma Inline
8530 and pragma Inline_Always.
8531 * adabkend.adb (Scan_Compiler_Arguments): Set both flags to True
8532 on -fno-inline, which disables all inlining in compilers with
8533 an Ada back-end and without back-end inlining support.
8534 * back_end.adb (Scan_Back_End_Switches): Set the Inline related
8535 flag to True on -fno-inline and leave Inline_Always alone for
8537 * back_end.ads (Scan_Compiler_Arguments): Adjust spec wrt the
8538 names of the Opt flags it sets.
8539 * gnat1drv.adb (Adjust_Global_Switches): Remove test on
8540 Opt.Suppress_All_Inlining in the Back_End_Inlining computation.
8541 * sem_prag.adb (Make_Inline): Remove early return conditioned
8542 on Opt.Suppress_All_Inlining.
8543 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Use the flags to
8544 disable the calls to Build_Body_To_Inline otherwise triggered
8545 by pragma Inline or Inline_Always. This will prevent actual
8546 front-end inlining of the subprogram on calls.
8548 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
8550 * exp_ch3.adb (Default_Initialize_Object): Call Add_Inlined_Body on the
8551 Abort_Undefer_Direct function.
8552 * exp_ch5.adb (Expand_N_Assignment_Statement): Likewise.
8553 * exp_intr.adb (Expand_Unc_Deallocation): Likewise.
8554 * exp_prag.adb (Expand_Pragma_Abort_Defer): Likewise.
8555 * exp_ch4.adb (Expand_N_Selected_Component): Adjust call to
8557 * exp_ch6.adb (Expand_Call): Adjust calls to Add_Inlined_Body.
8558 Remove call to Register_Backend_Call and move code resetting
8559 Needs_Debug_Info on inlined subprograms to...
8560 * inline.ads (Add_Inlined_Body): Add N parameter.
8561 (Register_Backend_Call): Delete.
8562 * inline.adb (Add_Inlined_Body): ...here and simplify.
8563 Register the call with Backend_Calls directly.
8564 (Register_Backend_Call): Delete.
8565 * s-stalib.ads (Abort_Undefer_Direct): Restore pragma Inline.
8567 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
8569 * s-stalib.ads: Fix typo.
8571 2015-02-20 Ed Schonberg <schonberg@adacore.com>
8573 * exp_ch3.adb (Default_Initialize_Object): If the object has a
8574 delayed freeze, the actions associated with default initialization
8575 must be part of the freeze actions, rather that being inserted
8576 directly after the object declaration.
8578 2015-02-20 Robert Dewar <dewar@adacore.com>
8580 * lib-load.adb: Minor comment update.
8582 2015-02-20 Vincent Celier <celier@adacore.com>
8584 * prj-proc.adb (Process_Case_Construction): When there are
8585 incomplete withed projects and the case variable is unknown,
8586 skip the case construction.
8588 2015-02-20 Ed Schonberg <schonberg@adacore.com>
8590 * exp_ch6.adb (Expand_Actuals): Add caller-side invariant checks
8591 when an actual is a view conversion, either because the call is
8592 to an inherited operation, or because the actual is an explicit
8593 type conversion to an ancestor type. Fixes ACATS 4.0D: C732001
8595 2015-02-20 Robert Dewar <dewar@adacore.com>
8597 * einfo.ads: Minor comment updates Fix missing pragma Inline
8598 for Set_Partial_View_Has_Unknown_Discr.
8599 * einfo.adb (Write_Entity_Flags): Add missing entry for
8600 Partial_View_Has_Unknown_Discr.
8601 * sem_ch3.adb: Minor reformatting.
8603 2015-02-20 Vincent Celier <celier@adacore.com>
8605 * opt.ads: Minor cleanup: remove mention of gprmake.
8606 * s-stalib.ads (Abort_Undefer_Direct): Do not inline.
8607 * s-tataat.adb: Do not call System.Tasking.Self but directly
8608 System.Task_Primitives.Operations.Self.
8610 2015-02-20 Arnaud Charlet <charlet@adacore.com>
8612 * gnat_rm.texi, gnat_ugn.texi: Now automatically generated from
8613 sphinx in the doc directory.
8614 * doc: New directory containing sphinx versions of gnat_rm and gnat_ugn
8616 2015-02-20 Robert Dewar <dewar@adacore.com>
8618 * sem_res.adb: Minor reformatting.
8619 * exp_ch9.adb (Build_Protected_Spec): Copy Aliased setting when
8621 * sem_ch13.adb (Analyze_Aspect_Specifications): Exclude Boolean
8622 aspects from circuitry setting delay required to false if the
8623 argument is an integer literal.
8625 2015-02-20 Ed Schonberg <schonberg@adacore.com>
8627 * einfo.ads. einfo.adb (Partial_View_Has_Unknown_Discr): New flag
8628 on type entities, to enforce AI12-0133: default initialization
8629 of types whose partial view has unknown discriminants does not
8630 get an invariant check, because clients of the unit can never
8631 declare objects of such types.
8632 * sem_ch3.adb (Find_Type_Name); Set new flag
8633 Partial_View_Has_Unknown_Discr when needed.
8634 * exp_ch3.adb (Expand_N_Object_Declaration): Use flag to suppress
8635 generation of invariant call on default-initialized object.
8637 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
8639 * gcc-interface/decl.c (gnat_to_gnu_param): Do not strip the padding
8640 if the parameter either is passed by reference or if the alignment
8643 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
8645 * gcc-interface/decl.c (is_cplusplus_method): Use Is_Primitive flag to
8646 detect primitive operations of tagged and untagged types.
8648 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
8650 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not bother about alias
8651 sets in presence of derivation for subprogram types.
8653 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
8655 * gcc-interface/utils.c (begin_subprog_body): Assert that the body is
8656 present in the same context as the declaration.
8658 2015-02-07 Jakub Jelinek <jakub@redhat.com>
8661 * gcc-interface/trans.c (gigi): Recreate optimization_default_node
8662 and optimization_current_node after tweaking global_options.
8664 2015-02-05 Robert Dewar <dewar@adacore.com>
8666 * prj-proc.adb, sem_aux.adb, exp_ch9.adb, errout.adb, prj-dect.adb,
8667 prj-nmsc.adb: Minor reformatting.
8669 2015-02-05 Ed Schonberg <schonberg@adacore.com>
8671 * sem_type.adb (Covers): In ASIS_Mode the Corresponding_Record
8672 of a protected type may not be available, so to check conformance
8673 with an interface type, examine the interface list in the type
8674 declaration directly.
8675 (Write_Overloads): Improve information for indirect calls,
8678 2015-02-05 Ed Schonberg <schonberg@adacore.com>
8680 * exp_ch3.adb (Make_Tag_Assignment): Do not perform this
8681 expansion activity in ASIS mode.
8683 2015-02-05 Javier Miranda <miranda@adacore.com>
8685 * errout.adb (Error_Msg_PT): Add missing error.
8686 * sem_ch6.adb (Check_Synchronized_Overriding): Check the missing
8687 RM rule. Code cleanup.
8688 * exp_ch9.adb (Build_Wrapper_Spec): Propagate "constant" in
8689 anonymous access types. Found working on the tests. Code cleanup.
8691 2015-02-05 Vincent Celier <celier@adacore.com>
8693 * prj-dect.adb (Parse_Attribute_Declaration): Continue scanning
8694 when there are incomplete withs.
8695 * prj-nmsc.adb (Process_Naming): Do not try to get the value
8696 of an element when it is nil.
8697 (Check_Naming): Do not check a nil suffix for illegality
8698 * prj-proc.adb (Expression): Do not process an empty term.
8699 * prj-strt.adb (Attribute_Reference): If attribute cannot be
8700 found, parse a possible index to avoid cascading errors.
8702 2015-02-05 Ed Schonberg <schonberg@adacore.com>
8704 * sem_aux.adb (Is_Derived_Type): A subprogram_type generated
8705 for an access_to_subprogram declaration is not a derived type.
8707 2015-02-05 Robert Dewar <dewar@adacore.com>
8709 * errout.adb (Error_Msg_Internal): For non-serious error set
8710 Fatal_Error to Ignored.
8711 * lib-load.adb (Load_Unit): Minor comment updates.
8712 * sem_ch10.adb (Analyze_With_Clause): Propagate Fatal_Error
8713 setting from with'ed unit to with'ing unit.
8714 * sem_prag.adb (Analyze_Pragma, case Warnings): Document handling
8717 2015-02-05 Yannick Moy <moy@adacore.com>
8719 * sem_prag.adb, par-prag.adb: Minor code clean up.
8721 2015-02-05 Yannick Moy <moy@adacore.com>
8723 * par-prag.adb (Pragma_Warnings): Update for extended form
8724 of pragma Warnings. The "one" argument case may now have 2 or
8726 * sem_prag.adb (Analyze_Pragma/Pragma_Warnings): Update for
8727 extended form of pragma Warnings. Pragma with tool name is either
8728 rewritten as null or as an equivalent form without tool name,
8730 * snames.ads-tmpl (Name_Gnatprove): New name.
8732 2015-02-05 Robert Dewar <dewar@adacore.com>
8734 * sem_ch13.adb (Add_Invariants): Don't assume invariant is
8736 * sem_prag.adb (Analyze_Pragma, case Check): Don't assume
8737 condition is standard Boolean, it can be non-standard derived
8740 2015-02-05 Robert Dewar <dewar@adacore.com>
8742 * checks.adb (Enable_Range_Check): Disconnect attempted
8743 optimization for the case of range check for subscript of
8744 unconstrained array.
8746 2015-02-05 Robert Dewar <dewar@adacore.com>
8748 * par-ch13.adb (With_Present): New function
8749 (Aspect_Specifications_Present): Handle WHEN in place of WITH
8750 (Get_Aspect_Specifications): Comment update.
8751 * par.adb: Comment updates.
8753 2015-02-05 Robert Dewar <dewar@adacore.com>
8755 * errout.adb (Handle_Serious_Error): New setting of Fatal_Error.
8756 * frontend.adb (Frontend): New setting of Fatal_Error.
8757 * lib-load.adb (Create_Dummy_Package_Unit): New setting of
8759 (Load_Main_Source): New setting of Fatal_Error
8760 (Load_Unit): New setting of Fatal_Error.
8761 * lib-writ.adb (Add_Preprocessing_Dependency): New setting of
8763 (Ensure_System_Dependency): New setting of Fatal_Error.
8764 * lib.adb (Fatal_Error): New setting of Fatal_Error
8765 (Set_Fatal_Error): New setting of Fatal_Error.
8766 * lib.ads: New definition of Fatal_Error and associated routines.
8767 * par-ch10.adb (P_Compilation_Unit): New setting of Fatal_Error.
8768 * par-load.adb (Load): New setting of Fatal_Error.
8769 * rtsfind.adb (Load_RTU): New setting of Fatal_Error.
8770 * sem_ch10.adb (Analyze_Compilation_Unit): New setting of
8772 (Optional_Subunit): New setting of Fatal_Error.
8773 (Analyze_Proper_Body): New setting of Fatal_Error.
8774 (Load_Needed_Body): New setting of Fatal_Error.
8776 2015-02-05 Ed Schonberg <schonberg@adacore.com>
8778 * sem_res.adb (Resolve_Call): If the function being called has
8779 out parameters do not check for language version if the function
8780 comes from a predefined unit, as those are always compiled in
8783 2015-02-05 Ed Schonberg <schonberg@adacore.com>
8785 * sem_ch3.adb (Process_Full_View): Verify that the full view
8786 of a type extension must carry an explicit limited keyword if
8787 the partial view does (RM 7.3 (10.1)).
8789 2015-02-05 Robert Dewar <dewar@adacore.com>
8791 * g-rannum.adb, g-rannum.ads, s-rannum.adb, s-rannum.ads,
8792 sem_warn.ads: Minor reformatting.
8793 * exp_ch13.adb (Expand_N_Freeze_Entity): Add guard for aspect
8795 * sem_prag.adb (Analyze_Pragma, case Type_Invariant): Give
8796 error for abstract type.
8798 2015-02-05 Yannick Moy <moy@adacore.com>
8800 * opt.ads (Warn_On_Suspicious_Contract): Update comment
8802 * sem_attr.adb (Analyze_Attribute/Attribute_Update): Warn on
8803 suspicious uses of 'Update.
8804 * sem_warn.adb, sem_warn.ads (Warn_On_Suspicious_Update): New
8805 function issues warning on suspicious uses of 'Update.
8806 * g-rannum.adb, g-rannum.ads, s-rannum.adb, s-rannum.ads: Mark
8807 package spec and body as SPARK_Mode Off.
8809 2015-02-05 Robert Dewar <dewar@adacore.com>
8811 * sem_prag.adb (Set_Elab_Unit_Name): New name for Set_Unit_Name
8812 (Analyze_Pragma): Change Set_Unit_Name to Set_Elab_Unit_Name
8813 (Set_Elab_Unit_Name): Generate reference for Elaborate[_All]
8814 * sem_warn.adb (Warn_On_Unreferenced_Entity): Suppress warning
8815 for exported entity.
8817 2015-02-05 Hristian Kirtchev <kirtchev@adacore.com>
8819 * sem_prag.adb (Check_Pragma_Conformance): Add
8820 local variable Arg. Ensure that all errors are associated with
8821 the pragma if it appears without an argument. Add comments on
8824 2015-02-05 Robert Dewar <dewar@adacore.com>
8826 * lib-xref.adb: Minor reformatting.
8828 2015-02-05 Tristan Gingold <gingold@adacore.com>
8831 * env.c: Fix thinko: handle Darwin case before default one.
8833 2015-01-30 Robert Dewar <dewar@adacore.com>
8835 * a-assert.adb: Minor reformatting.
8836 * sem_ch13.adb: Minor comment clarification.
8837 * types.ads: Minor comment update.
8838 * sem_eval.adb (Real_Or_String_Static_Predicate_Matches): Avoid blow up
8839 when we have a predicate that is nothing but an inherited dynamic
8842 2015-01-30 Jerome Guitton <guitton@adacore.com>
8844 * gcc-interface/Makefile.in (x86-vxworks): Update GCC_SPEC_FILES to
8845 include cert link spec.
8847 2015-01-30 Robert Dewar <dewar@adacore.com>
8849 * einfo.ads: Minor comment fix.
8850 * freeze.adb (Freeze_Profile): Add test for suspicious import
8852 * sem_prag.adb (Process_Import_Or_Interface): Test for suspicious
8853 use in Pure unit is now moved to Freeze (to properly catch
8854 Pure_Function exemption).
8856 2015-01-30 Bob Duff <duff@adacore.com>
8858 * sem_res.ads: Minor comment fix.
8859 * sem_type.adb: sem_type.adb (Remove_Conversions): Need to
8860 check both operands of an operator.
8862 2015-01-30 Yannick Moy <moy@adacore.com>
8864 * a-assert.ads, a-assert.adb: Mark package spec in SPARK. Set assertion
8865 policy for Pre to Ignore.
8866 (Assert): Add precondition.
8868 2015-01-30 Robert Dewar <dewar@adacore.com>
8870 * sem_prag.adb (Process_Import_Or_Interface): Warn if used in
8872 * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Clarify
8873 documentation for some special cases of invalid attempts at
8876 2015-01-30 Gary Dismukes <dismukes@adacore.com>
8878 * errout.ads: Minor reformatting.
8880 2015-01-30 Yannick Moy <moy@adacore.com>
8882 * inline.adb (Process_Formals): Use the sloc of
8883 the inlined node instead of the sloc of the actual parameter,
8884 when replacing formal parameters by the actual one.
8886 2015-01-30 Arnaud Charlet <charlet@adacore.com>
8888 * g-expect.adb (Get_Command_Output): Use infinite timeout when
8891 2015-01-30 Ed Schonberg <schonberg@adacore.com>
8893 * sem_ch12.adb (Analyze_Associations): If an in-parameter is
8894 defaulted in an instantiation, add an entry in the list of actuals
8895 to indicate the default value of the formal (as is already done
8896 for defaulted subprograms).
8898 2015-01-30 Javier Miranda <miranda@adacore.com>
8900 * errout.adb (Error_Msg_PT): Minor error phrasing update.
8902 2015-01-30 Robert Dewar <dewar@adacore.com>
8904 * sem_warn.adb (Warn_On_Known_Condition): Improve error message
8907 2015-01-30 Pierre-Marie de Rodat <derodat@adacore.com>
8909 * exp_dbug.adb (Get_Encoded_Name): When
8910 -fgnat-encodings=minimal, do not generate names for biased types.
8912 2015-01-30 Tristan Gingold <gingold@adacore.com>
8915 * env.c: Move vxworks and darwin includes out of #ifdef IN_RTS.
8917 2015-01-30 Gary Dismukes <dismukes@adacore.com>
8919 * freeze.adb: Minor reformatting.
8921 2015-01-30 Javier Miranda <miranda@adacore.com>
8923 * errout.ads (Error_Msg_PT): Replace Node_Id by Entity_Id and
8924 improve its documentation.
8925 * errout.adb (Error_Msg_PT): Improve the error message.
8926 * sem_ch6.adb (Check_Conformance): Update call to Error_Msg_PT.
8927 (Check_Synchronized_Overriding): Update call to Error_Msg_PT.
8928 * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup.
8930 2015-01-30 Robert Dewar <dewar@adacore.com>
8932 * sem_warn.adb (Warn_On_Known_Condition): Do special casing of
8933 message for False case.
8935 2015-01-30 Doug Rupp <rupp@adacore.com>
8937 * s-vxwext-kernel.ads (Task_Cont): Remove imported subprogram body.
8938 * s-vxwext-kernel.adb (Task_Cont): New subpprogram body specialized for
8941 2015-01-30 Gary Dismukes <dismukes@adacore.com>
8943 * sem_attr.adb (Declared_Within_Generic_Unit):
8944 New function to test whether an entity is declared within the
8945 declarative region of a given generic unit.
8946 (Resolve_Attribute): For checking legality of subprogram'Access within
8947 a generic unit, call new Boolean function Declared_Within_Generic_Unit
8948 instead of simply comparing the results of Enclosing_Generic_Unit on
8949 the prefix and access type. Correct minor comment typos.
8951 2015-01-30 Robert Dewar <dewar@adacore.com>
8953 * freeze.adb, exp_util.ads: Update comment.
8954 * exp_util.adb, exp_ch3.adb: Minor code reorganization and reformatting.
8955 * sem_util.adb: Minor: fix typo.
8957 2015-01-30 Hristian Kirtchev <kirtchev@adacore.com>
8959 * sem_attr.adb (Analyze_Attribute): Ensure that
8960 the check concerning Refined_Post takes precedence over the
8963 2015-01-30 Gary Dismukes <dismukes@adacore.com>
8965 * sem_prag.adb: Minor typo fixes and reformatting.
8967 2015-01-30 Yannick Moy <moy@adacore.com>
8969 * sem_attr.adb: Code clean up.
8971 2015-01-30 Robert Dewar <dewar@adacore.com>
8973 * ali.adb (Scan_ALI): Set Serious_Errors flag in Unit record.
8974 * ali.ads (Unit_Record): Add new field Serious_Errors.
8975 * lib-writ.adb (Write_Unit_Information): Set SE (serious errors)
8976 attribute in U line.
8977 * lib-writ.ads: New attribute SE (serious erors) in unit line.
8979 2015-01-30 Hristian Kirtchev <kirtchev@adacore.com>
8981 * einfo.adb Update the usage of attributes Entry_Bodies_Array,
8982 Lit_Indexes, Scale_Value, Storage_Size_Variable,
8983 String_Literal_Low_Bound along associated routines and
8985 (Pending_Access_Types): New routine.
8986 (Set_Pending_Access_Types): New routine.
8987 (Write_Field15_Name): Add an entry for Pending_Access_Types.
8988 * einfo.ads Add new attribute Pending_Access_Types along
8989 with usage in nodes. Update the usage of attributes
8990 Entry_Bodies_Array, Lit_Indexes, Scale_Value,
8991 Storage_Size_Variable, String_Literal_Low_Bound.
8992 (Pending_Access_Types): New routine along with pragma Inline.
8993 (Set_Pending_Access_Types): New routine along with pragma Inline.
8994 * exp_ch3.adb (Expand_Freeze_Array_Type): Add new local variable
8995 Ins_Node. Determine the insertion node for anonynous access type
8996 that acts as a component type of an array. Update the call to
8997 Build_Finalization_Master.
8998 (Expand_Freeze_Record_Type): Update
8999 the calls to Build_Finalization_Master.
9000 (Freeze_Type): Remove
9001 local variable RACW_Seen. Factor out the code that deals with
9002 remote access-to-class-wide types. Create a finalization master
9003 when the designated type contains a private component. Fully
9004 initialize all pending access types.
9005 (Process_RACW_Types): New routine.
9006 (Process_Pending_Access_Types): New routine.
9007 * exp_ch4.adb (Expand_Allocator_Expression): Allocation no longer
9008 needs to set primitive Finalize_Address.
9009 (Expand_N_Allocator): Allocation no longer sets primitive
9011 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
9012 Update the call to Build_Finalization_Master.
9013 (Make_Build_In_Place_Call_In_Allocator): Allocation no longer
9014 needs to set primitive Finalize_Address.
9015 * exp_ch7.adb (Add_Pending_Access_Type): New routine.
9016 (Build_Finalization_Master): New parameter profile. Associate
9017 primitive Finalize_Address with the finalization master if the
9018 designated type has been frozen, otherwise treat the access
9019 type as pending. Simplify the insertion of the master and
9020 related initialization code.
9021 (Make_Finalize_Address_Body): Allow Finalize_Address for class-wide
9023 (Make_Set_Finalize_Address_Call): Remove forlam parameter Typ.
9024 Simplify the implementation.
9025 * exp_ch7.ads (Build_Finalization_Master): New parameter profile
9026 along with comment on usage.
9027 (Make_Set_Finalize_Address_Call): Remove formal parameter Typ. Update
9028 the comment on usage.
9029 * exp_util.adb (Build_Allocate_Deallocate_Proc): Use routine
9030 Finalize_Address to retrieve the primitive.
9031 (Finalize_Address): New routine.
9032 (Find_Finalize_Address): Removed.
9033 * exp_util.ads (Finalize_Address): New routine.
9034 * freeze.adb (Freeze_All): Remove the generation of finalization
9036 * sem_ch3.adb (Analyze_Full_Type_Declaration): Propagate any
9037 pending access types from the partial to the full view.
9039 2015-01-30 Robert Dewar <dewar@adacore.com>
9041 * sem_disp.adb: Minor reformatting.
9042 * sem_disp.ads: Documentation update.
9044 2015-01-30 Ed Schonberg <schonberg@adacore.com>
9046 * sem_disp.adb (Is_Dynamically_Tagged): when applied to an entity
9047 or a function call, return True if type is class-wide.
9048 * sem_res.adb (Resolve_Case_Expression, Resolve_If_Expression);
9049 Apply RM 4.5.7 (17/3): all or none of the dependent expression
9050 of a conditional expression must be dynamically tagged.
9052 2015-01-30 Ed Schonberg <schonberg@adacore.com>
9054 * sem_ch6.adb (Analyze_Function_Return): In an extended return
9055 statement, apply accessibility check to result object when there
9056 is no initializing expression (Ada 2012 RM 6.5 (5.4/3))
9058 2015-01-30 Robert Dewar <dewar@adacore.com>
9060 * sem_ch4.adb (Analyze_If_Expression): Allow for non-standard
9061 Boolean for case where ELSE is omitted.
9062 * sem_res.adb: Minor reformatting.
9064 2015-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
9066 Fix build under cygwin/64.
9067 * adaint.h: Add check for __CYGWIN__.
9068 * mingw32.h: Prevent windows.h from including x86intrin.h in GCC.
9070 2015-01-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
9073 * adaint.c: Handle __CYGWIN__ like __MINGW32__ here.
9074 * mingw32.h: Don't include <tchar.h> under cygwin.
9075 (_O_U8TEXT, _O_U16TEXT, _O_WTEXT): Set to _O_TEXT if not yet defined.
9077 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
9079 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8)
9080 (DEF_FUNCTION_TYPE_VAR_12): New macros.
9082 2015-01-09 Michael Collison <michael.collison@linaro.org>
9084 * gcc-interface/cuintp.c: Include hash-set.h, machmode.h,
9085 vec.h, double-int.h, input.h, alias.h, symtab.h,
9086 fold-const.h, wide-int.h, and inchash.h due to
9087 flattening of tree.h.
9088 * gcc-interface/decl.c: Ditto.
9089 * gcc-interface/misc.c: Ditto.
9090 * gcc-interface/targtyps.c: Include hash-set.h, machmode.h,
9091 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h,
9092 fold-const.h, wide-int.h, and inchash.h due to
9093 flattening of tree.h.
9094 * gcc-interface/trans.c: Include hash-set.h, machmode.h,
9095 vec.h, double-int.h, input.h, alias.h, symtab.h, real.h,
9096 fold-const.h, wide-int.h, inchash.h due to
9097 flattening of tree.h.
9098 * gcc-interface/utils.c: Include hash-set.h, machmode.h,
9099 vec.h, double-int.h, input.h, alias.h, symtab.h,
9100 fold-const.h, wide-int.h, and inchash.h due to
9101 flattening of tree.h.
9102 * gcc-interface/utils2.c: Ditto.
9104 2015-01-07 Robert Dewar <dewar@adacore.com>
9106 * sem_warn.adb (Check_One_Unit): Don't give unused entities
9107 warning for a package which is used as a generic parameter.
9109 2015-01-07 Bob Duff <duff@adacore.com>
9111 * usage.adb (Usage): Correct documentation of
9114 2015-01-07 Robert Dewar <dewar@adacore.com>
9116 * s-fileio.adb: Minor reformatting.
9118 2015-01-07 Ed Schonberg <schonberg@adacore.com>
9120 * sem_ch12.adb (Instantiate_Object): If formal is an anonymous
9121 access to subprogram, replace its formals with new entities when
9122 building the object declaration, both if actual is present and
9123 when it is defaulted.
9125 2015-01-07 Ed Schonberg <schonberg@adacore.com>
9127 * sem_ch5.adb (Analyze_Assignment): If left-hand side is a view
9128 conversion and type of expression has invariant, apply invariant
9129 check on expression.
9131 2015-01-07 Ed Schonberg <schonberg@adacore.com>
9133 * sem_ch3.adb (Create_Constrained_Components): A call to
9134 Gather_Components may detect an error if an inherited discriminant
9135 that controls a variant is non-static.
9136 * sem_aggr.adb (Resolve_Record_Aggregate, Step 5): The call to
9137 Gather_Components may report an error if an inherited discriminant
9138 in a variant in non-static.
9139 * sem_util.adb (Gather_Components): If a non-static discriminant
9140 is inherited do not report error here, but let caller handle it.
9141 (Find_Actual): Small optimization.
9143 2015-01-07 Bob Duff <duff@adacore.com>
9145 * usage.adb (Usage): Document -gnatw.f switch.
9147 2015-01-07 Ed Schonberg <schonberg@adacore.com>
9149 * sem_ch12.adb: Code clean up and minor reformatting.
9151 2015-01-07 Robert Dewar <dewar@adacore.com>
9153 * exp_ch4.adb (Expand_N_Type_Conversion): Add guard for
9154 Raise_Accessibility_Error call.
9155 * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Add documentation
9156 on handling of invalid digits in based constants.
9157 * s-fatgen.ads: Minor reformatting.
9158 * sem_attr.adb (Analyze_Attribute, case Unrestricted_Access):
9159 Avoid noting bogus modification for Valid test.
9160 * snames.ads-tmpl (Name_Attr_Long_Float): New Name.
9161 * einfo.ads: Minor reformatting.
9162 * sem_warn.adb: Minor comment clarification.
9163 * sem_ch12.adb: Minor reformatting.
9165 2015-01-07 Ed Schonberg <schonberg@adacore.com>
9167 * exp_ch5.adb (Expand_Predicated_Loop): Handle properly loops
9168 over static predicates when the loop parameter specification
9169 carries a Reverse indicator.
9171 2015-01-07 Ed Schonberg <schonberg@adacore.com>
9173 * sem_ch12.adb (Instantiate_Object): If formal has a default,
9174 actual is missing and formal has an anonymous access type, copy
9175 access definition in full so that tree for instance is properly
9176 formatted for ASIS use.
9178 2015-01-07 Bob Duff <duff@adacore.com>
9180 * sem_elab.adb (Check_Internal_Call_Continue): Give a warning
9181 for P'Access, where P is a subprogram in the same package as
9182 the P'Access, and the P'Access is evaluated at elaboration
9183 time, and occurs before the body of P. For example, "X : T :=
9184 P'Access;" would allow a subsequent call to X.all to be an
9185 access-before-elaboration error; hence the warning. This warning
9186 is enabled by the -gnatw.f switch.
9187 * opt.ads (Warn_On_Elab_Access): New flag for warning switch.
9188 * warnsw.adb (Set_Dot_Warning_Switch): Set Warn_On_Elab_Access.
9189 * gnat_ugn.texi: Document the new warning.
9191 2015-01-07 Johannes Kanig <kanig@adacore.com>
9193 * lib-xref-spark_specific.adb (Collect_SPARK_Xrefs): Skip unneeded
9196 2015-01-07 Robert Dewar <dewar@adacore.com>
9198 * s-taprop-linux.adb, clean.adb: Minor reformatting.
9200 2015-01-07 Arnaud Charlet <charlet@adacore.com>
9202 * s-tassta.adb: Relax some overzealous assertions.
9204 2015-01-07 Ed Schonberg <schonberg@adacore.com>
9206 * sem_ch6.adb (Analyze_Return_Type): An call that returns a limited
9207 view of a type is legal when context is a thunk generated for
9208 operation inherited from an interface.
9209 * exp_ch6.adb (Expand_Simple_Function_Return): If context is
9210 a thunk and return type is an incomplete type do not continue
9211 expansion; thunk will be fully elaborated when generating code.
9213 2015-01-07 Doug Rupp <rupp@adacore.com>
9215 * s-osinte-mingw.ads (LARGE_INTEGR): New subtype.
9216 (QueryPerformanceFrequency): New imported procedure.
9217 * s-taprop-mingw.adb (RT_Resolution): Call above and return
9218 resolution vice a hardcoded value.
9219 * s-taprop-solaris.adb (RT_Resolution): Call clock_getres and return
9220 resolution vice a hardcoded value.
9221 * s-linux-android.ads (clockid_t): New subtype.
9222 * s-osinte-aix.ads (clock_getres): New imported subprogram.
9223 * s-osinte-android.ads (clock_getres): Likewise.
9224 * s-osinte-freebsd.ads (clock_getres): Likewise.
9225 * s-osinte-solaris-posix.ads (clock_getres): Likewise.
9226 * s-osinte-darwin.ads (clock_getres): New subprogram.
9227 * s-osinte-darwin.adb (clock_getres): New subprogram.
9228 * thread.c (__gnat_clock_get_res) [__APPLE__]: New function.
9229 * s-taprop-posix.adb (RT_Resolution): Call clock_getres to
9230 calculate resolution vice hard coded value.
9232 2015-01-07 Ed Schonberg <schonberg@adacore.com>
9234 * exp_util.adb (Make_CW_Equivalent_Type): If root type is a
9235 limited view, use non-limited view when available to create
9236 equivalent record type.
9238 2015-01-07 Vincent Celier <celier@adacore.com>
9240 * gnatcmd.adb: Remove command Sync and any data and processing
9241 related to this command. Remove project processing for gnatstack.
9242 * prj-attr.adb: Remove package Synchonize and its attributes.
9244 2015-01-07 Vincent Celier <celier@adacore.com>
9246 * clean.adb: Minor error message change.
9248 2015-01-07 Tristan Gingold <gingold@adacore.com>
9251 * env.c (__gnat_environ): Adjust for darwin9/darwin10.
9253 2015-01-07 Javier Miranda <miranda@adacore.com>
9255 * sem_ch10.adb (Analyze_With_Clause): Compiling under -gnatq
9256 protect the frontend against never ending recursion caused by
9257 circularities in the sources.
9259 2015-01-07 Robert Dewar <dewar@adacore.com>
9261 * a-reatim.adb, make.adb, exp_pakd.adb, i-cpoint.adb, sem_ch8.adb,
9262 exp_ch3.adb: Minor reformatting.
9264 2015-01-07 Doug Rupp <rupp@adacore.com>
9266 * s-linux.ads (clockid_t): New subtype.
9267 * s-osinte-linux.ads (pragma Linker Options): Add -lrt.
9268 (clockid_t): New subtype.
9269 (clock_getres): Import system call.
9270 * s-taprop-linux.adb (System.OS_Constants): With and rename.
9271 (RT_Resolution): Remove
9272 hardcoded value and call clock_getres.
9273 * s-linux-sparc.ads, s-linux-mipsel.ads, s-linux-hppa.ads,
9274 s-linux-alpha.ads, s-linux-x32.ads (clockid_t): Add new subtype.
9276 2015-01-07 Robert Dewar <dewar@adacore.com>
9278 * sem_warn.adb (Check_One_Unit): Guard against context item
9279 with no Entity field.
9281 2015-01-07 Vincent Celier <celier@adacore.com>
9283 * clean.adb (Gnatclean): Warn that 'gnatclean -P' is obsolete.
9284 * make.adb (Initialize): Warn that 'gnatmake -P' is obsolete.
9286 2015-01-07 Vincent Celier <celier@adacore.com>
9288 * prj-conf.adb (Parse_Project_And_Apply_Config): Always finalize
9289 errors/warnings in the first parsing of the project files,
9290 to display the warnings when there is no errors.
9292 2015-01-07 Tristan Gingold <gingold@adacore.com>
9294 * i-cpoint.adb (Copy_Terminated_Array): Nicely handle null target.
9296 2015-01-07 Doug Rupp <rupp@adacore.com>
9298 * s-taprop-vxworks.adb (Stop_All_Tasks): Pass return
9299 value from Int_Lock as parameter to Int_Unlock.
9300 * s-osinte-vxworks.ads (Int_Unlock): Add parameter.
9301 * s-vxwext.ads (Int_Unlock): Likewise.
9302 * s-vxwext-kernel.adb (intUnlock, Int_Unlock): Likewise.
9303 * s-vxwext-kernel.ads (Int_Unlock): Likewise.
9304 * s-vxwext-rtp.adb (Int_Unlock): Likewise.
9305 * s-vxwext-rtp.ads (Int_Unlock): Likewise.
9307 2015-01-07 Pierre-Marie de Rodat <derodat@adacore.com>
9309 * exp_pakd.adb: Add a comment in exp_pakd.adb to explain why we
9312 2015-01-07 Tristan Gingold <gingold@adacore.com>
9314 * i-cpoint.adb (Copy_Terminated_Array): Use Copy_Array to
9317 2015-01-07 Eric Botcazou <ebotcazou@adacore.com>
9319 * sem_ch3.adb (Analyze_Full_Type_Declaration): Do not
9320 automatically set No_Strict_Aliasing on access types.
9321 * fe.h (No_Strict_Aliasing_CP): Declare.
9322 * gcc-interface/trans.c (gigi): Force flag_strict_aliasing to 0 if
9323 No_Strict_Aliasing_CP is set.
9325 2015-01-07 Johannes Kanig <kanig@adacore.com>
9327 * sem_ch8.adb (Analyze_Subprogram_Renaming) do
9328 not build function wrapper in gnatprove mode when the package
9329 is externally axiomatized.
9331 2015-01-07 Jose Ruiz <ruiz@adacore.com>
9333 * a-reatim.adb (Time_Of): Reduce the number of spurious overflows in
9334 intermediate computations when the parameters have different signs.
9336 2015-01-07 Javier Miranda <miranda@adacore.com>
9338 * exp_ch3.adb (Build_Init_Procedure): For derived types,
9339 improve the code which takes care of identifying and moving to
9340 the beginning of the init-proc the call to the init-proc of the
9343 2015-01-07 Olivier Hainque <hainque@adacore.com>
9345 * gcc-interface/trans.c (gnat_to_gnu, <N_Expression_With_Action>):
9346 Elaborate the expression as part of the same stmt group as the actions.
9348 2015-01-07 Robert Dewar <dewar@adacore.com>
9350 * sem_ch3.adb: Minor error message change.
9352 2015-01-07 Ed Schonberg <schonberg@adacore.com>
9354 * sem_prag.adb (Analyze_Pragma, case Preelaborable_Initialization):
9355 Following AI05-028, the pragam applies legally to any composite type.
9357 2015-01-07 Arnaud Charlet <charlet@adacore.com>
9359 * s-osinte-vxworks.adb, s-osinte-vxworks.ads
9360 (sigwait, sigwaitinfo): Removed, not needed after all on any
9361 VxWorks configurations.
9363 2015-01-07 Robert Dewar <dewar@adacore.com>
9365 * sem_ch3.adb, freeze.adb, exp_disp.adb: Minor reformatting.
9367 2015-01-07 Javier Miranda <miranda@adacore.com>
9369 * exp_disp.adb (Expand_Interface_Conversion): Adding missing
9370 generation of accessibility check.
9372 2015-01-07 Ed Schonberg <schonberg@adacore.com>
9374 * sem_ch3.adb (Derived_Type_Declaration): In the case of an
9375 illegal completion from a class- wide type, set etype of the
9376 derived type properly to prevent cascaded errors.
9378 2015-01-07 Robert Dewar <dewar@adacore.com>
9380 * prj.ads, i-cpoint.adb, freeze.adb, ghost.adb, prj-err.adb: Minor
9383 2015-01-07 Robert Dewar <dewar@adacore.com>
9385 * restrict.adb (Check_Restriction_No_Use_Of_Attribute):
9387 (OK_No_Use_Of_Entity_Name): New function.
9388 (Set_Restriction_No_Use_Of_Entity): New procedure.
9389 * restrict.ads (Check_Restriction_No_Use_Of_Attribute):
9391 (OK_No_Use_Of_Entity_Name): New function.
9392 (Set_Restriction_No_Use_Of_Entity): New procedure.
9393 * sem_ch8.adb (Find_Direct_Name): Add check for violation of
9395 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
9396 Add processing for new restriction No_Use_Of_Entity.
9398 2015-01-07 Eric Botcazou <ebotcazou@adacore.com>
9400 * freeze.adb (Freeze_Array_Type): Apply same handling to Is_Atomic
9401 component type as to Has_Atomic_Components type. Remove useless
9402 test on Is_Aliased component type.
9404 2015-01-07 Hristian Kirtchev <kirtchev@adacore.com>
9406 * alloc.ads Alphabetize several declarations. Add constants
9407 Ignored_Ghost_Units_Initial and Ignored_Ghost_Units_Increment.
9408 * atree.adb Add with and use clauses for Opt.
9409 (Allocate_Initialize_Node): Mark a node as ignored Ghost
9410 if it is created in an ignored Ghost region.
9411 (Ekind_In): New variant.
9412 (Is_Ignored_Ghost_Node): New routine.
9413 (Set_Is_Ignored_Ghost_Node): New routine.
9414 * atree.adb Aplhabetize several subprograms declarations. Flag
9415 Spare0 is now known as Is_Ignored_Ghost_Node.
9416 (Ekind_In): New variant.
9417 (Is_Ignored_Ghost_Node): New routine.
9418 (Set_Is_Ignored_Ghost_Node): New routine.
9419 * einfo.adb: Flag 279 is now known as Contains_Ignored_Ghost_Code.
9420 (Contains_Ignored_Ghost_Code): New routine.
9421 (Set_Contains_Ignored_Ghost_Code): New routine.
9422 (Set_Is_Checked_Ghost_Entity, Set_Is_Ignored_Ghost_Entity):
9423 It is now possible to set this property on an unanalyzed entity.
9424 (Write_Entity_Flags): Output the status of flag
9425 Contains_Ignored_Ghost_Code.
9426 * einfo.ads New attribute Contains_Ignored_Ghost_Code along with
9428 (Contains_Ignored_Ghost_Code): New routine
9429 along with pragma Inline.
9430 (Set_Contains_Ignored_Ghost_Code): New routine along with pragma Inline.
9431 * exp_ch3.adb Add with and use clauses for Ghost.
9432 (Freeze_Type): Capture/restore the value of Ghost_Mode on entry/exit.
9433 Set the Ghost_Mode in effect.
9434 (Restore_Globals): New routine.
9435 * exp_ch7.adb (Process_Declarations): Do not process a context
9436 that invoves an ignored Ghost entity.
9437 * exp_dbug.adb (Qualify_All_Entity_Names): Skip an ignored Ghost
9438 construct that has been rewritten as a null statement.
9439 * exp_disp.adb Add with and use clauses for Ghost.
9440 (Make_DT): Capture/restore the value of Ghost_Mode on entry/exit. Set
9441 the Ghost_Mode in effect.
9442 (Restore_Globals): New routine.
9443 * exp_util.adb (Requires_Cleanup_Actions): An ignored Ghost entity
9444 does not require any clean up. Add two missing cases that deal
9445 with block statements.
9446 * freeze.adb Add with and use clauses for Ghost.
9447 (Freeze_Entity): Capture/restore the value of Ghost_Mode on entry/exit.
9448 Set the Ghost_Mode in effect.
9449 (Restore_Globals): New routine.
9450 * frontend.adb Add with and use clauses for Ghost. Remove any
9451 ignored Ghost code from all units that qualify.
9452 * ghost.adb New unit.
9453 * ghost.ads New unit.
9454 * gnat1drv.adb Add with clause for Ghost. Initialize and lock
9455 the table in package Ghost.
9456 * lib.ads: Alphabetize several subprogram declarations.
9457 * lib-xref.adb (Output_References): Do not generate reference
9458 information for ignored Ghost entities.
9459 * opt.ads Add new type Ghost_Mode_Type and new global variable
9461 * rtsfind.adb (Load_RTU): Provide a clean environment when
9462 loading a runtime unit.
9463 * sem.adb (Analyze): Capture/restore the value of Ghost_Mode on
9464 entry/exit as the node may set a different mode.
9466 Capture/restore the value of Ghost_Mode on entry/exit as the
9467 unit may be withed from a unit with a different Ghost mode.
9468 * sem_ch3.adb Add with and use clauses for Ghost.
9469 (Analyze_Full_Type_Declaration, Analyze_Incomplete_Type_Decl,
9470 Analyze_Number_Declaration, Analyze_Private_Extension_Declaration,
9471 Analyze_Subtype_Declaration): Set the Ghost_Mode in effect. Mark
9472 the entity as Ghost when there is a Ghost_Mode in effect.
9473 (Array_Type_Declaration): The implicit base type inherits the
9474 "ghostness" from the array type.
9475 (Derive_Subprogram): The
9476 alias inherits the "ghostness" from the parent subprogram.
9477 (Make_Implicit_Base): The implicit base type inherits the
9478 "ghostness" from the parent type.
9479 * sem_ch5.adb Add with and use clauses for Ghost.
9480 (Analyze_Assignment): Set the Ghost_Mode in effect.
9481 * sem_ch6.adb Add with and use clauses for Ghost.
9482 (Analyze_Abstract_Subprogram_Declaration, Analyze_Procedure_Call,
9483 Analyze_Subprogram_Body_Helper, Analyze_Subprogram_Declaration):
9484 Set the Ghost_Mode in effect. Mark the entity as Ghost when
9485 there is a Ghost_Mode in effect.
9486 * sem_ch7.adb Add with and use clauses for Ghost.
9487 (Analyze_Package_Body_Helper, Analyze_Package_Declaration,
9488 Analyze_Private_Type_Declaration): Set the Ghost_Mode in
9489 effect. Mark the entity as Ghost when there is a Ghost_Mode
9491 * sem_ch8.adb Add with and use clauses for Ghost.
9492 (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
9493 Analyze_Object_Renaming, Analyze_Package_Renaming,
9494 Analyze_Subprogram_Renaming): Set the Ghost_Mode in effect. Mark
9495 the entity as Ghost when there is a Ghost_Mode in effect.
9496 (Find_Type): Check the Ghost context of a type.
9497 * sem_ch11.adb Add with and use clauses for Ghost.
9498 (Analyze_Exception_Declaration): Set the Ghost_Mode in
9499 effect. Mark the entity as Ghost when there is a Ghost_Mode
9501 * sem_ch12.adb Add with and use clauses for Ghost.
9502 (Analyze_Generic_Package_Declaration,
9503 Analyze_Generic_Subprogram_Declaration): Set the Ghost_Mode in effect.
9504 Mark the entity as Ghost when there is a Ghost_Mode in effect.
9505 * sem_prag.adb Add with and use clauses for Ghost.
9506 (Analyze_Pragma): Ghost-related checks are triggered when there
9507 is a Ghost mode in effect.
9508 (Create_Abstract_State): Mark the
9509 entity as Ghost when there is a Ghost_Mode in effect.
9510 * sem_res.adb Add with and use clauses for Ghost.
9511 (Check_Ghost_Context): Removed.
9512 * sem_util.adb (Check_Ghost_Completion): Removed.
9513 (Check_Ghost_Derivation): Removed.
9514 (Incomplete_Or_Partial_View):
9515 Add a guard in case the entity has not been analyzed yet
9516 and does carry a scope.
9517 (Is_Declaration): New routine.
9518 (Is_Ghost_Entity): Removed.
9519 (Is_Ghost_Statement_Or_Pragma):
9521 (Is_Subject_To_Ghost): Removed.
9522 (Set_Is_Ghost_Entity):
9524 (Within_Ghost_Scope): Removed.
9525 * sem_util.adb (Check_Ghost_Completion): Removed.
9526 (Check_Ghost_Derivation): Removed.
9527 (Is_Declaration): New routine.
9528 (Is_Ghost_Entity): Removed.
9529 (Is_Ghost_Statement_Or_Pragma): Removed.
9530 (Is_Subject_To_Ghost): Removed.
9531 (Set_Is_Ghost_Entity): Removed.
9532 (Within_Ghost_Scope): Removed.
9533 * sinfo.ads Add a section on Ghost mode.
9534 * treepr.adb (Print_Header_Flag): New routine.
9535 (Print_Node_Header): Factor out code. Output flag
9536 Is_Ignored_Ghost_Node.
9537 * gcc-interface/Make-lang.in: Add dependency for unit Ghost.
9539 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
9541 * freeze.adb (Freeze_Array_Type) <Complain_CS>: Remove always
9542 true test and unreachable 'else' arm.
9544 2015-01-06 Vincent Celier <celier@adacore.com>
9546 * prj-conf.adb (Check_Target): Improve error message when
9547 there are mismatched targets between the on in the configuration
9548 project file and the specified one, either in the main project
9549 file or in the --target= switch.
9551 2015-01-06 Pascal Obry <obry@adacore.com>
9553 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Mode and
9554 Install_Name attribute definitions.
9556 2015-01-06 Ed Schonberg <schonberg@adacore.com>
9558 * freeze.adb (Wrap_Imported_Subprogram): Indicate that the
9559 generated Import pragma for the internal imported procedure does
9560 not come from an aspect, so that Is_Imported can be properly
9563 2015-01-06 Gary Dismukes <dismukes@adacore.com>
9565 * sem_ch12.adb (Might_Inline_Subp): Record whether
9566 any subprograms in the generic package are marked with
9567 pragma Inline_Always (setting flag Has_Inline_Always).
9568 (Analyze_Package_Instantiation): Add test of Has_Inline_Always
9569 alongside existing test of Front_End_Inlining as alternative
9570 conditions for setting Inline_Now. Also add test of
9571 Has_Inline_Always along with Front_End_Inlining test as an
9572 alternative condition for setting Needs_Body to False.
9574 2015-01-06 Tristan Gingold <gingold@adacore.com>
9576 * i-cpoint.adb (Copy_Array): Handle overlap.
9578 2015-01-06 Pascal Obry <obry@adacore.com>
9580 * bindgen.adb: Minor style fix.
9582 2015-01-06 Robert Dewar <dewar@adacore.com>
9584 * sem_util.ads, sem_util.adb: Minor reformatting.
9586 2015-01-06 Vincent Celier <celier@adacore.com>
9588 * prj-conf.adb (Parse_Project_And_Apply_Config): Reset incomplete
9589 with flags before parsing the projects.
9590 * prj-err.adb (Error_Msg): Do nothing if there are incomplete withs.
9591 * prj-part.adb (Post_Parse_Context_Clause): Set Incomplete_Withs
9592 to True in the flags, when Ignore_Missing_With is True and an
9593 imported project cannot be found.
9594 * prj-proc.adb (Expression): When there are incomplete withs and
9595 a variable or attribute is not found, set the variable/attribute
9597 * prj.ads (Processing_Flags): New flag Incomplete_Withs,
9600 2015-01-06 Vasiliy Fofanov <fofanov@adacore.com>
9602 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-conf.adb,
9603 prj-err.adb: Add new switch --no-command-line.
9605 2015-01-06 Ed Schonberg <schonberg@adacore.com>
9607 * sem_ch12.adb: Sloc of wrapper is that of instantiation.
9609 2015-01-06 Robert Dewar <dewar@adacore.com>
9611 * sem_ch11.adb: Minor reformatting.
9613 2015-01-06 Ed Schonberg <schonberg@adacore.com>
9615 * exp_aggr.adb (Get_Assoc_Expr): New routine internal to
9616 Build_Array_Aggr_Code, used to initialized components covered
9617 by a box association. If the component type is scalar and has
9618 a default aspect, use it to initialize such components.
9620 2015-01-06 Pascal Obry <obry@adacore.com>
9622 * rtinit.c (__gnat_runtime_initialize): Add a parameter to
9623 control the setup of the exception handler.
9624 * initialize.c: Remove unused declaration.
9625 * bindgen.adb: Always call __gnat_runtime_initialize and pass
9626 whether the exeception handler must be set or not.
9628 2015-01-06 Thomas Quinot <quinot@adacore.com>
9630 * freeze.adb (Set_SSO_From_Defaults): When setting scalar storage
9631 order to native from default, make sure to also adjust bit order.
9632 * exp_aggr.adb: Minor reformatting.
9634 2015-01-06 Robert Dewar <dewar@adacore.com>
9636 * s-valllu.adb, s-valllu.ads, s-valuti.ads, s-valuns.adb, s-valuns.ads,
9637 s-valrea.adb, s-valrea.ads: Add some additional guards for
9638 Str'Last = Positive'Last.
9640 2015-01-06 Ed Schonberg <schonberg@adacore.com>
9642 * sem_ch12.adb, sem_ch8.adb: Ongoing work for wrappers for actual
9645 2015-01-06 Javier Miranda <miranda@adacore.com>
9647 * exp_disp.adb (Expand_Interface_Conversion): Reapply patch.
9649 2015-01-06 Thomas Quinot <quinot@adacore.com>
9651 * sem_util.ads: Minor reformatting.
9652 * sem_cat.adb (In_RCI_Visible_Declarations): Change back to...
9653 (In_RCI_Declaration) Return to old name, as proper checking of
9654 entity being in the visible part depends on entity kind and must
9655 be done by the caller.
9657 2015-01-06 Ed Schonberg <schonberg@adacore.com>
9659 * sem_ch12.adb, sem_ch12.ads, sem_ch8.adb: Ongoing work for wrappers
9660 for operators in SPARK.
9662 2015-01-06 Ed Schonberg <schonberg@adacore.com>
9664 * sem_aggr.adb (Get_Value): In ASIS mode, preanalyze the
9665 expression in an others association before making copies for
9666 separate resolution and accessibility checks. This ensures that
9667 the type of the expression is available to ASIS in all cases,
9668 in particular if the expression is itself an aggregate.
9670 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
9672 * einfo.ads (Has_Independent_Components): Document extended
9674 * einfo.adb (Has_Independent_Components): Remove obsolete assertion.
9675 (Set_Has_Independent_Components): Adjust assertion.
9676 * sem_prag.adb (Analyze_Pragma): Also set Has_Independent_Components
9677 for pragma Atomic_Components. Set Has_Independent_Components
9678 on the object instead of the type for an object declaration with
9679 pragma Independent_Components.
9681 2015-01-06 Olivier Hainque <hainque@adacore.com>
9683 * set_targ.adb (Read_Target_Dependent_Values): Set
9684 Long_Double_Index when "long double" is read.
9685 (elaboration code): Register_Back_End_Types only when not reading from
9686 config files. Doing otherwise is pointless and error prone.
9688 2015-01-06 Robert Dewar <dewar@adacore.com>
9690 * s-valrea.adb (Value_Real): Check for Str'Last = Positive'Last
9692 2015-01-06 Robert Dewar <dewar@adacore.com>
9694 * a-wtgeau.adb, a-ztgeau.adb, a-tigeau.adb (String_Skip): Raise PE if
9695 Str'Last = Positive'Last.
9697 2015-01-06 Ed Schonberg <schonberg@adacore.com>
9699 * sem_ch6.adb (Matches_Limited_View): Handle properly the case
9700 where the non-limited type is a generic actual and appears as
9701 a subtype of the non-limited view of the other.
9702 * freeze.adb (Build_Renamed_Body): If the return type of the
9703 declaration that is being completed is a limited view and the
9704 non-limited view is available, use it in the specification of
9707 2015-01-06 Ed Schonberg <schonberg@adacore.com>
9709 * sem_ch3.adb (Find_Type_Name): If there is a previous tagged
9710 incomplete view, the type of the classwide type common to both
9711 views is the type being declared.
9713 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
9715 * einfo.ads (Is_Independent): Further document extended usage.
9717 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
9719 * einfo.ads (Is_Independent): Document extended usage.
9720 * einfo.adb (Is_Independent): Remove obsolete assertion.
9721 (Set_Is_Independent): Likewise.
9722 * sem_prag.adb (Process_Atomic_Shared_Volatile): Rename into...
9723 (Process_Atomic_Independent_Shared_Volatile): ...this.
9724 Deal with pragma Independent here.
9725 (Analyze_Pragma): Adjust
9726 to above renaming and also invoke it for pragma Independent.
9727 Adjust comment for Independent_Components.
9729 2015-01-06 Robert Dewar <dewar@adacore.com>
9731 * snames.ads-tmpl: Remove entries for attribute Enum_Image.
9732 * exp_attr.adb: Remove reference to Attribute_Enum_Image.
9734 2015-01-06 Robert Dewar <dewar@adacore.com>
9736 * s-vallli.adb (Value_Long_Long_Integer): Handle case of Str'Last
9738 * s-valllu.adb (Value_Long_Long_Unsigned): Handle case of
9739 Str'Last = Positive'Last.
9741 2015-01-06 Robert Dewar <dewar@adacore.com>
9743 * sem_prag.adb (Process_Inline): Remove redundant construct
9744 warning (-gnatw.r) for an ineffective pragma Inline.
9746 2015-01-06 Robert Dewar <dewar@adacore.com>
9748 * s-valint.adb: Fix typo in last checkin.
9749 * s-valuns.adb (Value_Unsigned): More efficient fix for
9751 * sem_attr.adb (Analyze_Attribute): Minor reformatting
9752 (Eval_Attribute): Static ervaluation of 'Img for enumeration types.
9754 2015-01-06 Robert Dewar <dewar@adacore.com>
9756 * s-valint.adb, s-valuns.adb (Value_Integer): Deal with case where
9757 Str'Last = Positive'Last
9759 2015-01-06 Thomas Quinot <quinot@adacore.com>
9761 * xoscons.adb: Display exception information and return non-zero
9762 exit status in top level exception handler.
9764 2015-01-06 Ed Schonberg <schonberg@adacore.com>
9766 * sem_ch8.adb: Code clean up.
9768 2015-01-06 Tristan Gingold <gingold@adacore.com>
9770 * targparm.ads: Remove obsolete comment.
9772 2015-01-06 Olivier Hainque <hainque@adacore.com>
9774 * gcc-interface/decl.c (gnat_to_gnu_entity, case E_Variable): When
9775 constructing a ref to variable, update inner_const_flag from the
9776 variable TREE_READONLY attribute.
9777 * gcc-interface/targtyps.c (WIDEST_HARDWARE_FP_SIZE): Remove default
9779 (get_target_float_size): Remove.
9780 (get_target_double_size): Remove.
9781 (get_target_long_double_size): Remove.
9783 2015-01-06 Pascal Obry <obry@adacore.com>
9785 * adaint.c (ProcListEvt): Set to NULL.
9786 * rtinit.c: New file.
9787 (__gnat_rt_init_count): New reference counter set to 0.
9788 (__gnat_runtime_initialize): Move code here from __gnat_initialize when
9789 this code is actually needed for the runtime initialization. This
9790 routine returns immediately if the initialization has already been done.
9791 * final.c: Revert previous change.
9792 * rtfinal.c: New file.
9793 (__gnat_runtime_finalize)[Win32]: Add finalization of the critical
9794 section and event. The default version of this routine is empty (except
9795 for the reference counting code). This routine returns immediately if
9796 some others libraries are referencing the runtime.
9797 * bindgen.adb (Gen_Adainit): Generate call to Runtime_Initialize
9798 remove circuitry to initialize the signal handler as this is
9799 now done by the runtime initialization routine.
9800 (Gen_Adafinal): Generate call to Runtime_Finalize.
9801 * gnat_ugn.texi: Update documentation about concurrency and
9802 initialization/finalization of the run-time.
9803 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Add
9804 references to rtfinal.o and rtinit.o
9806 2015-01-06 Robert Dewar <dewar@adacore.com>
9808 * exp_attr.adb (Expand_N_Attribute_Reference): Add dummy entry
9810 * sem_attr.adb: Implement Enum_Image attribute.
9811 * snames.ads-tmpl: Add entries for Enum_Image attribute.
9813 2015-01-06 Robert Dewar <dewar@adacore.com>
9815 * namet.ads: Document use of Boolean2 for No_Use_Of_Entity.
9816 * restrict.ads (No_Use_Of_Entity): New table.
9817 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
9818 Ignore No_Use_Of_Entity (will be processed in parser).
9819 * snames.ads-tmpl: Add entry for Name_No_Use_Of_Entity.
9821 2015-01-06 Vincent Celier <celier@adacore.com>
9823 * prj-tree.adb (Imported_Or_Extended_Project_Of): Do not try
9824 to check for an extended project, if a project does not have
9825 yet a project declaration.
9827 2015-01-06 Pierre-Marie Derodat <derodat@adacore.com>
9829 * scos.ads: Update documentation about the SCO table build
9830 process and about table records format.
9831 * par_sco.ads (SCO_Record): Rename to SCO_Record_Raw.
9832 (SCO_Record_Filtered): New procedure.
9833 (Set_SCO_Logical_Operator): New procedure.
9834 (dsco): Update documentation.
9835 * par_sco.adb: Update library-level comments.
9836 (SCO_Generation_State_Type): New type.
9837 (SCO_Generation_State): New variable.
9838 (SCO_Raw_Table): New package instanciation.
9839 (Condition_Pragma_Hash_Table): Rename to SCO_Raw_Hash_Table.
9841 (Tristate): New type.
9842 (Is_Logical_Operator): Return Tristate and update documentation.
9843 (Has_Decision): Update call to Is_Logical_Operator and complete
9845 (Set_Table_Entry): Rename to Set_Raw_Table_Entry, update
9846 comment, add an assertion for state checking and change
9847 references to SCO_Table into SCO_Raw_Table.
9848 (dsco): Refactor to dump the raw and the filtered tables.
9849 (Process_Decisions.Output_Decision_Operand): Handle putative
9850 short-circuit operators.
9851 (Process_Decisions.Output_Element): Update references
9852 to Set_Table_Entry and to Condition_Pragma_Hash_Table.
9853 (Process_Decisions.Process_Decision_Operand): Update call
9854 to Is_Logical_Operator.
9855 (Process_Decisions.Process_Node): Handle putative short-circuit
9856 operators and change references to
9857 SCO_Table into SCO_Raw_Table.
9858 (SCO_Output): Add an assertion
9859 for state checking and remove code that used to stamp out SCO entries.
9860 (SCO_Pragma_Disabled): Change reference to SCO_Table
9862 (SCO_Record): Rename to SCO_Record_Raw,
9863 add an assertion for state checking and change references
9864 to SCO_Table into SCO_Raw_Table.
9865 (Set_SCO_Condition): Add an assertion for state checking, update
9866 references to Condition_Pragma_Hash_Table and change references to
9867 SCO_Table into SCO_Raw_Table.
9868 (Set_SCO_Pragma_Enabled): Add an assertion for state checking and
9869 change references to SCO_Table into SCO_Raw_Table.
9870 (Set_SCO_Logical_Operator): New procedure.
9871 (Traverse_Declarations_Or_Statements.Set_Statement_Entry): Update
9872 references to Set_Table_Entry and to Condition_Pragma_Hash_Table.
9873 (SCO_Record_Fildered): New procedure.
9874 * gnat1drv.adb (Gnat1drv): Invoke the SCO filtering pass.
9875 * lib-writ.adb (Write_ALI): Invoke the SCO filtering pass and
9877 * par-load.adb (Load): Update reference to SCO_Record.
9878 * par.adb (Par): Update reference to SCO_Record.
9879 * put_scos.adb (Put_SCOs): Add an assertion to check that no
9880 putative SCO condition reaches this end.
9881 * sem_ch10.adb (Analyze_Proper_Body): Update reference to SCO_Record.
9882 * sem_res.adb (Resolve_Logical_Op): Validate putative SCOs
9883 when corresponding to an "and"/"or" operator affected by the
9884 Short_Circuit_And_Or pragma.
9886 2015-01-06 Robert Dewar <dewar@adacore.com>
9888 * sem_ch8.adb (Analyze_Use_Package): Give more specific error
9889 msg for attempted USE of generic subprogram or subprogram.
9891 2015-01-06 Robert Dewar <dewar@adacore.com>
9893 * s-valllu.adb, a-tiinau.adb, a-timoau.adb, a-ztinau.adb, a-ztmoau.adb,
9894 s-valuns.adb, s-valrea.adb, a-wtflau.adb, a-tiflau.adb, a-ztflau.adb,
9895 a-wtinau.adb, a-wtmoau.adb: Document recognition of : in place of #.
9897 2015-01-06 Ed Schonberg <schonberg@adacore.com>
9899 * sem_ch13.adb (Analyze_Aspect_Specifications): For aspects
9900 that specify stream subprograms, if the prefix is a class-wide
9901 type then the generated attribute definition clause must apply
9902 to the same class-wide type.
9903 (Default_Iterator): An iterator defined by an aspect of some
9904 container type T must have a first parameter of type T, T'class,
9905 or an access to such (from code reading RM 5.5.1 (2/3)).
9907 2015-01-06 Arnaud Charlet <charlet@adacore.com>
9909 * gnat1drv.adb: Minor: complete previous change.
9911 2015-01-06 Olivier Hainque <hainque@adacore.com>
9913 * set_targ.ads (C_Type_For): New function. Return the name of
9914 a C type supported by the back-end and suitable as a basis to
9915 construct the standard Ada floating point type identified by
9916 the T parameter. This is used as a common ground to feed both
9917 ttypes values and the GNAT tree nodes for the standard floating
9919 * set_targ.adb (Long_Double_Index): The index at which "long
9920 double" gets registered in the FPT_Mode_Table. This is useful to
9921 know whether we have a "long double" available at all and get at
9922 it's characteristics without having to search the FPT_Mode_Table
9923 when we need to decide which C type should be used as the
9924 basis for Long_Long_Float in Ada.
9925 (Register_Float_Type): Fill Long_Double_Index.
9926 (FPT_Mode_Index_For): New function. Return the index in
9927 FPT_Mode_Table that designates the entry corresponding to the
9928 provided C type name.
9929 (FPT_Mode_Index_For): New function. Return the index in
9930 FPT_Mode_Table that designates the entry for a back-end type
9931 suitable as a basis to construct the standard Ada floating point
9932 type identified by the input T parameter.
9933 (elaboration code): Register_Back_End_Types unconditionally,
9934 so C_Type_For can operate regardless of -gnateT. Do it
9935 early so we can query it for the floating point sizes, via
9936 FPT_Mode_Index_For. Initialize Float_Size, Double_Size and
9937 Long_Double_Size from the FPT_Mode_Table, as cstand will do.
9938 * cstand.adb (Create_Float_Types): Use C_Type_For to determine
9939 which C type should be used as the basis for the construction
9940 of the Standard Ada floating point types.
9941 * get_targ.ads (Get_Float_Size, Get_Double_Size,
9942 Get_Long_Double_Size): Remove.
9943 * get_targ.adb: Likewise.
9945 2015-01-06 Thomas Quinot <quinot@adacore.com>
9947 * sem_cat.adb (In_RCI_Declaration): Remove unnecessary
9948 parameter and rename to...
9949 (In_RCI_Visible_Declarations): Fix handling of private part of nested
9951 (Validate_RCI_Subprogram_Declaration): Reject illegal function
9952 returning anonymous access in RCI unit.
9954 2015-01-06 Ed Schonberg <schonberg@adacore.com>
9956 * sem_ch6.adb (New_Overloaded_Entity): In GNATprove mode, a
9957 function wrapper may be a homonym of another local declaration.
9958 * sem_ch8.adb (Analyze_Subprogram_Renaming): In GNATprove mode,
9959 build function and operator wrappers after the actual subprogram
9960 has been resolved, and replace the standard renaming declaration
9961 with the declaration of wrapper.
9962 * sem_ch12.ads (Build_Function_Wrapper, Build_Operator_Wraooer):
9963 make public for use elsewhere.
9964 * sem_ch12.adb (Build_Function_Wrapper, Build_Operator_Wraooer):
9965 rewrite, now that actual is fully resolved when wrapper is
9968 2015-01-06 Javier Miranda <miranda@adacore.com>
9970 * exp_disp.adb: Revert previous change.
9972 2015-01-06 Robert Dewar <dewar@adacore.com>
9974 * exp_util.adb: Change name Name_Table_Boolean to
9975 Name_Table_Boolean1.
9976 * namet.adb: Change name Name_Table_Boolean to Name_Table_Boolean1
9977 Introduce Name_Table_Boolean2/3.
9978 * namet.ads: Change name Name_Table_Boolean to Name_Table_Boolean1
9979 Introduce Name_Table_Boolean2/3.
9980 * par-ch13.adb: Change name Name_Table_Boolean to
9981 Name_Table_Boolean1.
9983 2015-01-06 Bob Duff <duff@adacore.com>
9985 * gnat_rm.texi: Improve documentation regarding No_Task_Termination.
9987 2015-01-06 Ed Schonberg <schonberg@adacore.com>
9989 * sem_aggr.adb (Resolve_Record_Aggregte, Get_Value): For an
9990 others choice that covers multiple components, analyze each
9991 copy with the type of the component even in compile-only mode,
9992 to detect potential accessibility errors.
9994 2015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
9996 * sem_res.adb (Is_Assignment_Or_Object_Expression): New routine.
9997 (Resolve_Actuals): An effectively volatile out
9998 parameter cannot act as an in or in out actual in a call.
9999 (Resolve_Entity_Name): An effectively volatile out parameter
10002 2015-01-06 Ed Schonberg <schonberg@adacore.com>
10004 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If the body is
10005 the expansion of an expression function it may be pre-analyzed
10006 if a 'access attribute is applied to the function, in which case
10007 last_entity may have been assigned already.
10009 2015-01-06 Ed Schonberg <schonberg@adacore.com>
10011 * sem_ch4.adb (Analyze_One_Call): If formal has an incomplete
10012 type and actual has the corresponding full view, there is no
10013 error, but a case of use of incomplete type in a predicate or
10014 invariant expression.
10016 2015-01-06 Vincent Celier <celier@adacore.com>
10018 * makeutl.adb (Insert_No_Roots): Make sure that the same source
10019 in two different project tree is checked in both trees, if they
10020 are sources of two different projects, extended or not.
10022 2015-01-06 Arnaud Charlet <charlet@adacore.com>
10024 * gnat1drv.adb: Minor code clean up.
10025 (Adjust_Global_Switches): Ignore gnatprove_mode in codepeer_mode.
10027 2015-01-06 Bob Duff <duff@adacore.com>
10029 * osint.adb (Read_Source_File): Don't print out
10030 file name unless T = Source.
10032 2015-01-06 Ed Schonberg <schonberg@adacore.com>
10034 * sem_util.adb (Is_Variable, Is_OK_Variable_For_Out_Formal):
10035 recognize improper uses of constant_reference types as actuals
10036 for in-out parameters.
10037 (Check_Function_Call): Do not collect identifiers if function
10038 name is missing because of previous error.
10040 2015-01-06 Robert Dewar <dewar@adacore.com>
10042 * ali-util.adb, sem_prag.adb, rtsfind.adb, sem_util.adb, sem_res.adb,
10043 ali.adb, binde.adb, namet.adb, namet.ads, gnatls.adb, bcheck.adb:
10044 Minor change of name Name_Table_Info => Name_Table_Int.
10046 2015-01-06 Robert Dewar <dewar@adacore.com>
10048 * exp_strm.adb (Build_Elementary_Input_Call): Clarify comments
10049 in previous checkin.
10050 * freeze.adb (Freeze_Fixed_Point_Type): Add warning for shaving
10052 * sem_prag.adb, sem_ch10.adb, sem_ch6.adb: Minor reformatting.
10054 2015-01-06 Vincent Celier <celier@adacore.com>
10056 * a-strsup.adb (Times (Natural;String;Positive)): Raise
10057 Length_Error, not Index_Error, when the result is too long.
10059 2015-01-06 Thomas Quinot <quinot@adacore.com>
10061 * a-direct.adb (Create_Path): Minor error handling and
10062 performance improvement.
10064 2015-01-06 Robert Dewar <dewar@adacore.com>
10066 * checks.ads, sem_ch12.adb: Minor reformatting.
10067 * exp_ch4.adb (Expand_N_Op_Divide): Generate explicit divide by
10068 zero check for fixed-point case if Backend_Divide_Checks_On_Target
10071 2015-01-06 Robert Dewar <dewar@adacore.com>
10073 * sem_prag.adb (Analyze_Pragma, case No_Elaboration_Code_All):
10074 Do not set restriction No_Elaboration_Code unless the pragma
10075 appears in the main unit).
10077 2015-01-06 Ed Schonberg <schonberg@adacore.com>
10079 * sem_ch10.adb (Is_Regular_With_Clause): Add guard to verify
10080 that with clause has already been analyzed before checking kind
10083 2015-01-06 Robert Dewar <dewar@adacore.com>
10085 * exp_strm.adb (Build_Elementary_Input_Call): Return base type
10086 (as required by RM).
10088 2015-01-06 Arnaud Charlet <charlet@adacore.com>
10090 * a-reatim.adb ("/"): Add explicit pragma Unsuppress (Division_Check).
10092 2015-01-06 Robert Dewar <dewar@adacore.com>
10094 * sem_prag.adb (Process_Suppress_Unsuppress): Add extra warning
10095 for ignoring pragma Suppress (Elaboration_Check) in SPARK mode.
10097 2015-01-06 Javier Miranda <miranda@adacore.com>
10099 * exp_disp.adb (Expand_Interface_Conversion): No displacement
10100 of the pointer to the object needed when the type of the operand
10101 is not an interface type and the interface is one of its parent
10102 types (since they share the primary dispatch table).
10104 2015-01-06 Vincent Celier <celier@adacore.com>
10106 * prj-env.adb: Minor comment update.
10108 2015-01-06 Javier Miranda <miranda@adacore.com>
10110 * sem_res.adb (Valid_Conversion): Restrict the checks on anonymous
10111 access types whose target type is an interface type to operands
10112 that are access types; required to report an error when the
10113 operand is not an access type.
10115 2015-01-06 Bob Duff <duff@adacore.com>
10117 * a-cfinve.adb (Copy): Set the discriminant to the Length when
10119 * a-cofove.ads (Capacity): Add a postcondition.
10120 * a-cfinve.ads (Capacity): Add a postcondition.
10121 (Reserve_Capacity): Correct the postcondition in the case where
10122 Capacity = 0; that means "Capacity => Length (Container)".
10123 * a-cofove.adb (Elems[c]): Add a comment
10124 explaining the dangers and how to avoid them.
10126 2015-01-06 Ed Schonberg <schonberg@adacore.com>
10128 * sem_ch12.adb: Code clean up.
10130 2015-01-06 Arnaud Charlet <charlet@adacore.com>
10132 * gnatvsn.ads: Bump copyright year.
10134 2015-01-06 Robert Dewar <dewar@adacore.com>
10136 * s-taskin.ads, s-traces.ads: Minor reformatting.
10137 * exp_util.adb: Minor typo fix.
10139 2015-01-06 Vincent Celier <celier@adacore.com>
10141 * gnatls.adb (Search_RTS): Invoke Initialize_Default_Project_Path
10142 with the runtime name.
10143 * prj-env.adb (Initialize_Default_Project_Path): When both
10144 Target_Name and Runtime_Name are not empty string, add to the
10145 project path the two directories .../lib/gnat and .../share/gpr
10146 related to the runtime.
10147 * prj-env.ads (Initialize_Default_Project_Path): New String
10148 parameter Runtime_Name, defaulted to the empty string.
10150 2015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
10152 * frontend.adb: Guard against the case where a configuration
10153 pragma may be split into multiple pragmas and the original
10154 rewritten as a null statement.
10155 * sem_prag.adb (Analyze_Pragma): Insert a brand new Check_Policy
10156 pragma using Insert_Before rather than Insert_Action. This
10157 takes care of the configuration pragma case where Insert_Action
10160 2015-01-06 Bob Duff <duff@adacore.com>
10162 * a-coboho.ads (Element_Access): Add "pragma
10163 No_Strict_Aliasing (Element_Access);". This is needed because
10164 we are unchecked-converting from Address to Element_Access.
10165 * a-cofove.ads, a-cofove.adb (Elems,Elemsc): Fix bounds of the
10168 2015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
10170 * sem_res.adb (Resolve_Actuals): Remove the
10171 restriction which prohibits volatile actual parameters with
10172 enabled external propery Async_Writers to act appear in procedure
10173 calls where the corresponding formal is of mode OUT.
10175 2015-01-05 Jakub Jelinek <jakub@redhat.com>
10177 * gnat_ugn.texi: Bump @copying's copyright year.
10179 2015-01-05 Eric Botcazou <ebotcazou@adacore.com>
10182 * gcc-interface/Makefile.in (../stamp-tools): Reinstate dropped code.
10184 2015-01-04 Uros Bizjak <ubizjak@gmail.com>
10186 * gcc-interface/misc.c (internal_error_function): Use xasprintf instead
10187 of unchecked asprintf.
10190 Copyright (C) 2015 Free Software Foundation, Inc.
10192 Copying and distribution of this file, with or without modification,
10193 are permitted in any medium without royalty provided the copyright
10194 notice and this notice are preserved.