1 2015-11-24 Eric Botcazou <ebotcazou@adacore.com>
3 * gcc-interface/decl.c (gnat_to_gnu_entity) <Concurrent types>: In
4 ASIS mode, do a minimal translation for root types with discriminants.
5 * gcc-interface/trans.c (gnat_to_gnu) <N_Subunit>: Move around.
6 <N_Entry_Body, N_Protected_Body, N_Task_Body>: Likewise. In ASIS mode,
7 process the declarations attached to the body.
9 2015-11-24 Eric Botcazou <ebotcazou@adacore.com>
11 * gcc-interface/trans.c (gnat_to_gnu): In type_annotate_only mode, do
12 not build a NULL_EXPR for an N_Expanded_Name.
14 2015-11-24 Eric Botcazou <ebotcazou@adacore.com>
16 * gcc-interface/decl.c (is_cplusplus_method): Check that the type of
17 the first parameter (indirectly) has C++ convention too.
19 2015-11-23 Olivier Hainque <hainque@adacore.com>
21 * system-aix.ads: Add Frontend_Exceptions flag.
22 * system-aix64.ads: Likewise.
23 * system-darwin-ppc.ads: Likewise.
24 * system-darwin-ppc64.ads: Likewise.
25 * system-darwin-x86.ads: Likewise.
26 * system-darwin-x86_64.ads: Likewise.
27 * system-dragonfly-x86_64.ads: Likewise.
28 * system-freebsd-x86.ads: Likewise.
29 * system-freebsd-x86_64.ads: Likewise.
30 * system-hpux-ia64.ads: Likewise.
31 * system-hpux.ads: Likewise.
32 * system-linux-alpha.ads: Likewise.
33 * system-linux-armeb.ads: Likewise.
34 * system-linux-armel.ads: Likewise.
35 * system-linux-hppa.ads: Likewise.
36 * system-linux-ia64.ads: Likewise.
37 * system-linux-mips.ads: Likewise.
38 * system-linux-mips64el.ads: Likewise.
39 * system-linux-mipsel.ads: Likewise.
40 * system-linux-ppc.ads: Likewise.
41 * system-linux-ppc64.ads: Likewise.
42 * system-linux-s390.ads: Likewise.
43 * system-linux-s390x.ads: Likewise.
44 * system-linux-sh4.ads: Likewise.
45 * system-linux-sparc.ads: Likewise.
46 * system-linux-sparcv9.ads: Likewise.
47 * system-linux-x86.ads: Likewise.
48 * system-linux-x86_64.ads: Likewise.
49 * system-mingw-x86_64.ads: Likewise.
50 * system-mingw.ads: Likewise.
51 * system-rtems.ads: Likewise.
52 * system-solaris-sparc.ads: Likewise.
53 * system-solaris-sparcv9.ads: Likewise.
54 * system-solaris-x86.ads: Likewise.
55 * system-solaris-x86_64.ads: Likewise.
56 * system-vxworks-arm.ads: Likewise.
57 * system-vxworks-m68k.ads: Likewise.
58 * system-vxworks-mips.ads: Likewise.
59 * system-vxworks-ppc.ads: Likewise.
60 * system-vxworks-sparcv9.ads: Likewise.
61 * system-vxworks-x86.ads: Likewise.
62 * system.ads: Likewise.
64 2015-11-23 Olivier Hainque <hainque@adacore.com>
65 Eric Botcazou <botcazou@adacore.com>
67 * opt.ads (Exception_Mechanism): Now three values: Front_End_SJLJ,
68 Back_End_SJLJ and Back_End_ZCX.
69 (Back_End_Exceptions, Front_End_Exceptions, ZCX_Exceptions,
70 SJLJ_Exceptions): New functions, reflecting properties of the current
72 * opt.adb: Implement the new functions.
73 * fe.h: Bind the new Exception_Mechanism and helper functions for gigi.
75 * exp_ch11.adb (Expand_At_End_Handler): Replace test on mechanism by
76 use of property helper and update comments.
77 (Expand_Exception_Handlers): Replace tests on mechanism by use of
78 helper. Restrict Abort_Defer to ZCX specifically.
79 * exp_ch9.adb (Expand_N_Asynchronous_Select): Replace tests on
80 mechanism by calls to helper functions. Abort_Undefer for ZCX only,
81 paired with Expand_Exception_Handlers.
82 * exp_sel.adb (Build_Abort_Block_Handler): Replace tests on mechanism
83 by calls to helper functions. Abort_Undefer for ZCX only, paired with
84 Expand_Exception_Handlers.
86 * lib-writ.ads (P line documentation): Add entry for "FX",
87 representative of unit compiled with Frontend_Exceptions True.
88 * lib-writ.adb (Output_Main_Program_Line): Add "FX" on P line if
89 compiled with Frontend_Exceptions True.
91 * ali.ads (ALIs_Record): Ada a Frontend_Exceptions component, to reflect
92 whether the ALI file contained an "FX" indication on the P line.
93 (Frontend_Exceptions_Specified): New boolean, to keep track of whether
94 at least an FX ALI file is in the closure.
95 * ali.adb (Scan_ALI): Handle "FX" on the P line.
96 (Initialize_ALI): Initialize Frontend_Exceptions_Specified to False.
98 * targparm.ads: Update desription of exception schemes.
99 (Frontend_Exceptions_On_Target): New flag, reflect Frontend_Exceptions
100 set to True in system.ads, or not set at all.
101 * targparm.adb (Targparm_Tags): Add FEX to convey Frontend_Exceptions.
102 Rename ZCD to ZCX for consistency.
103 (FEX_Str, Targparm_Str, Get_Target_Parameters): Adjust accordingly.
105 * gnat1drv.adb (Adjust_Global_Switches): Adjust Exception_Mechanism
106 setting, now from combination of Frontend_Exceptions and ZCX_By_Default.
108 * bcheck.adb (Check_Consistent_Zero_Cost_Exception_Handling): Rename
110 (Check_Consistent_Exception_Handling): Check consistency of both
111 ZCX_By_Default and Frontend_Exceptions.
112 (Check_Configuration_Consistency): Check_Consistent_Exception_Handling
113 if either flag was set at least once.
115 * make.adb (Check): Remove processing of a possible -fsjlj coming from
117 * gnatlink.adb (Gnatlin): Likewise.
119 * gcc-interface/Makefile.in (gnatlib-sjlj/zcx): Now set
120 both ZCX_By_Default and Frontend_Exceptions.
121 * gcc-interface/decl.c (gnat_to_gnu_entity, case E_Variable):
122 Use eh property helper to test for back-end exceptions. Adjust
123 mechanism name when testing for front-end sjlj.
124 (case E_Procedure): Likewise.
125 * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu):
126 Likewise, and rename local variables.
127 (Exception_Handler_to_gnu_sjlj): Rename as
128 Exception_Handler_to_gnu_fe_sjlj.
129 (Exception_Handler_to_gnu_zcx): Rename as
130 Exception_Handler_to_gnu_gcc and adjust tests on eh mechanisms
131 to use property helpers or correct mechanism name.
133 2015-11-19 Bob Duff <duff@adacore.com>
135 * sem_elab.adb (Check_Internal_Call_Continue): Correction to previous
136 change: correctly handle generic formals/actuals that look like
139 2015-11-18 Eric Botcazou <ebotcazou@adacore.com>
141 * gcc-interface/trans.c (elaborate_all_entities_for_package): New
142 function extracted from... Recurse on packages.
143 (elaborate_all_entities): ...here. Call it on packages.
145 2015-11-18 Eric Botcazou <ebotcazou@adacore.com>
147 * gcc-interface/ada-tree.h (DECL_INVARIANT_P): New macro.
148 * gcc-interface/gigi.h (enum standard_datatypes): Remove
149 ADT_longjmp_decl and add ADT_not_handled_by_others_decl.
150 (longjmp_decl): Delete.
151 (not_handled_by_others_decl): New macro.
152 (build_simple_component_ref): Delete.
153 (build_component_ref): Adjust prototype.
154 * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust calls to
156 (gnat_to_gnu_field): Set DECL_INVARIANT_P on discriminants
157 without default value.
158 * gcc-interface/trans.c (gigi): Reorder initialization sequence
159 and add not_handled_by_others_decl.
160 (Attribute_to_gnu): Adjust calls to build_component_ref.
161 (Subprogram_Body_to_gnu): Likewise.
162 (Call_to_gnu): Likewise.
163 (Exception_Handler_to_gnu_sjlj): Likewise.
164 (gnat_to_gnu): Likewise.
165 (range_check_info_d): Add inserted_cond field.
166 (Loop_Statement_to_gnu): Make two passes on the recorded range checks.
167 (build_noreturn_cond): New static function.
168 (Raise_Error_to_gnu): Record range checks in loops at -O1 and above.
169 (make_invariant): New static function.
170 (Loop_Statement_to_gnu): Use it to compute invariant expressions for
171 the loop bounds if possible, but do not require it if loop unswitching
173 * gcc-interface/utils.c (convert_to_fat_pointer): Likewise.
175 (maybe_unconstrained_array): Likewise. Call it instead of
176 build_simple_component_ref and add guard for CONSTRUCTORs.
177 (unchecked_convert): Likewise.
178 * gcc-interface/utils2.c (compare_fat_pointers): Likewise.
179 (build_simple_component_ref): Remove COMPONENT parameter, unify
180 code dealing with VIEW_CONVERT_EXPR and make it more general,
181 remove special treatment for CONSTRUCTORs of template types.
182 (build_component_ref): Remove COMPONENT parameter and adjust call
183 to build_simple_component_ref.
184 (maybe_wrap_malloc): Likewise.
185 (build_allocator): Likewise.
186 (gnat_invariant_expr): Look through overflow checks, deal with
187 addition and subtraction of constants and take into account
188 DECL_INVARIANT_P for the COMPONENT_REF case.
190 2015-11-18 Eric Botcazou <ebotcazou@adacore.com>
192 * gcc-interface/misc.c: Move global variables to the top of the file.
193 (gnat_handle_option): Remove obsolete ATTRIBUTE_UNUSED markers.
194 (gnat_init_options): Minor tweak.
195 (gnat_post_options): Set -fstrict-overflow if not done by the user.
196 (internal_error_function): Minor reformatting.
198 2015-11-18 Eric Botcazou <ebotcazou@adacore.com>
200 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Use case #1
201 for the renaming of an address.
203 2015-11-18 Eric Botcazou <ebotcazou@adacore.com>
205 * gcc-interface/trans.c (fold_constant_decl_in_expr) <ARRAY_REF>: If
206 the index is not itself constant then bail out.
208 2015-11-18 Ed Schonberg <schonberg@adacore.com>
210 * sem_ch4.adb (Try_Container_Indexing): When constructing the
211 parameter list for the potentially overloaded calls to indexing
212 functions, do not propagate overloadings if the actual is a named
213 association: overloadings appear directly on the expression in
216 2015-11-18 Ed Schonberg <schonberg@adacore.com>
218 * sem_type.adb (Interface_Present_In_Ancestor): If the type is
219 incomplete, the list of ancestors is found either on the full
220 view or the non-limited view of the type.
222 2015-11-18 Nicolas Roche <roche@adacore.com>
224 * sysdep.c (__gnat_localtime_tzoff): On Windows platform
225 GetTimeZoneInformation function is thread-safe. Thus there
226 is no need to lock the runtime in the implementation of
227 __gnat_localtime_tzoff on that platform.
229 2015-11-18 Eric Botcazou <ebotcazou@adacore.com>
231 * s-arit64.adb (To_Neg_Int): Add a special case for 2**63 input.
233 2015-11-18 Hristian Kirtchev <kirtchev@adacore.com>
235 * contracts.adb (Analyze_Contracts): New routine.
236 (Analyze_Enclosing_Package_Body_Contract): Removed.
237 (Analyze_Entry_Or_Subprogram_Contract): Add formal parameter
238 Freeze_Id. Propagate the entity of the freezing body to vaious
240 (Analyze_Initial_Declaration_Contract): Removed.
241 (Analyze_Object_Contract): Add formal parameter
242 Freeze_Id. Propagate the entity of the freezing body to vaious
244 (Analyze_Previous_Contracts): New routine.
245 * contracts.ads (Analyze_Enclosing_Package_Body_Contract): Removed.
246 (Analyze_Contracts): New routine.
247 (Analyze_Entry_Or_Subprogram_Contract): Add formal
248 parameter Freeze_Id and update the comment on usage.
249 (Analyze_Initial_Declaration_Contract): Removed.
250 (Analyze_Object_Contract): Add formal parameter Freeze_Id and
251 update the comment on usage.
252 (Analyze_Previous_Contracts): New routine.
253 * sem_ch3.adb (Analyze_Declarations): Use Analyze_Contracts to
254 analyze all contracts of eligible constructs.
255 * sem_ch6.adb (Analyze_Generic_Subprogram_Body):
256 A body no longer freezes the contract of its initial
257 declaration. This effect is achieved through different means.
258 (Analyze_Subprogram_Body_Helper): A body now freezes the contracts
259 of all eligible constructs that precede it. A body no longer
260 freezes the contract of its initial declaration. This effect is
261 achieved through different means.
262 * sem_ch7.adb (Analyze_Package_Body_Helper): A body now freezes
263 the contracts of all eligible constructs that precede it. A body
264 no longer freezes the contract of its initial declaration. This
265 effect is achieved through different means.
266 * sem_ch9.adb (Analyze_Entry_Body): A body now freezes
267 the contracts of all eligible constructs that precede
268 it. A body no longer freezes the contract of its initial
269 declaration. This effect is achieved through different means.
270 (Analyze_Protected_Body): A body now freezes the contracts
271 of all eligible constructs that precede it. A body no longer
272 freezes the contract of its initial declaration. This effect
273 is achieved through different means.
274 (Analyze_Task_Body): A
275 body now freezes the contracts of all eligible constructs that
276 precede it. A body no longer freezes the contract of its initial
277 declaration. This effect is achieved through different means.
278 * sem_prag.adb (Add_Item_To_Name_Buffer): Single protected/task
279 objects now output their respective current instance of xxx
280 type messages. (Analyze_Contract_Cases_In_Decl_Part): Add
281 formal parameter Freeze_Id. Emit a clarification message
282 when an undefined entity may the byproduct of contract
284 (Analyze_Part_Of_In_Decl_Part): Add formal
285 parameter Freeze_Id. Emit a clarification message when an
286 undefined entity may the byproduct of contract freezing.
287 (Analyze_Pre_Post_Condition_In_Decl_Part): Add formal
288 parameter Freeze_Id. Emit a clarification message when an
289 undefined entity may the byproduct of contract freezing.
290 (Analyze_Refined_State_In_Decl_Part): Do not report unused body
291 states as constituents of single protected/task types may not
292 bave been identified yet.
293 (Collect_Subprogram_Inputs_Outputs):
294 Reimplemented. (Contract_Freeze_Error): New routine.
295 (Process_Overloadable): Use predicate Is_Single_Task_Object.
296 * sem_prag.ads (Analyze_Contract_Cases_In_Decl_Part):
297 Add formal parameter Freeze_Id and update the comment
299 (Analyze_Part_Of_In_Decl_Part): Add formal
300 parameter Freeze_Id and update the comment on usage.
301 (Analyze_Pre_Post_Condition_In_Decl_Part): Add formal parameter
302 Freeze_Id and update the comment on usage.
303 * sem_util.adb (Check_Unused_Body_States): Remove global
304 variable Legal_Constits. The routine now reports unused
305 body states regardless of whether constituents are
307 (Collect_Body_States): A constituent of a
308 single protected/task type is not a visible state of a
310 (Collect_Visible_States): A constituent
311 of a single protected/task type is not a visible
312 state of a package body.
313 (Has_Undefined_Reference): New routine.
314 (Is_Single_Concurrent_Object): Reimplemented.
315 (Is_Single_Protected_Object): New routine.
316 (Is_Single_Task_Object): New routine.
317 (Is_Visible_Object): New routine.
318 (Report_Unused_Body_States): Moved to Check_Unused_Body_States.
319 * sem_util.ads (Check_Unused_Body_States): Update the comment on usage.
320 (Has_Undefined_Reference): New routine.
321 (Is_Single_Protected_Object): New routine.
322 (Is_Single_Task_Object): New routine.
323 (Report_Unused_Body_States): Moved to Check_Unused_Body_States.
325 2015-11-18 Pierre-Marie de Rodat <derodat@adacore.com>
327 * Makefile.rtl, impunit.adb: Add g-strhas.ads.
328 * g-strhas.ads: New file.
329 * s-strhas.ads: Add a comment to redirect users to g-strhas.ads.
331 2015-11-18 Bob Duff <duff@adacore.com>
333 * sem_elab.adb (Check_Internal_Call_Continue): Fix the case
334 where the call in question is to a renaming of a subprogram that
335 can be safely called without ABE.
336 * checks.adb: Minor edits.
338 2015-11-18 Hristian Kirtchev <kirtchev@adacore.com>
340 * atree.adb (Elist11): New routine.
341 (Set_Elist11): New routine.
342 * atree.ads (Elist11): New routine.
343 (Set_Elist11): New routine.
344 * atree.h: Define Elist11.
345 * contracts.adb (Analyze_Object_Contract): Verify the legality
346 of all references to a variable given that the variable is a
347 constituent of a single protected/task type.
348 * einfo.adb: Part_Of_References now utilizes Elist11.
349 (Part_Of_References): New routine.
350 (Set_Part_Of_References): New routine.
351 (Write_Field11_Name): Add output for Part_Of_References.
352 * einfo.ads New attribute Part_Of_References along with usage
354 (Part_Of_References): New routine along with
356 (Set_Part_Of_References): New routine along with pragma Inline.
357 * sem_prag.adb (Analyze_Constituent): Record a possible
358 reference to a concurrent constituent.
359 (Analyze_Global_Item): Record a possible reference to a concurrent
361 (Analyze_Input_Output): Record a possible reference to a
362 concurrent constituent.
363 * sem_res.adb (Resolve_Entity_Name): Record a possible reference
364 to a concurrent constituent.
365 * sem_util.adb (Check_Part_Of_Reference): New routine.
366 (Record_Possible_Part_Of_Reference): New routine.
367 * sem_util.ads (Check_Part_Of_Reference): New routine.
368 (Record_Possible_Part_Of_Reference): New routine.
370 2015-11-18 Ed Schonberg <schonberg@adacore.com>
372 * checks.adb (Apply_Arithmetic_Overflow_Minimized_Eliminated):
373 An if_expression is the proper place to apply the overflow
374 minimization procedure if its context is not an enclosing
375 arithmetic expression.
377 2015-11-18 Arnaud Charlet <charlet@adacore.com>
379 * gnat_ugn/gnat_project_manager.rst,
380 gnat_ugn/building_executable_programs_with_gnat.rst,
381 gnat_ugn/gnat_and_program_execution.rst,
382 gnat_ugn/the_gnat_compilation_model.rst,
383 gnat_rm/implementation_defined_pragmas.rst,
384 gnat_rm/standard_and_implementation_defined_restrictions.rst,
385 gnat_ugn.texi, gnat_rm.texi: Update doc.
387 2015-11-18 Hristian Kirtchev <kirtchev@adacore.com>
389 * contracts.adb (Add_Contract_Item): Chain pragmas Attach_Handler
390 and Interrupt_Handler on the classifications list of a [generic]
391 procedure N_Contract node.
392 * contracts.ads (Add_Contract_Item): Update the comment on usage.
393 * einfo.adb (Get_Pragma): Pragmas Attach_Handler and
394 Interrupt_Handler are found on the classifications list of
396 * einfo.ads (Get_Pragma): Update the comment on usage.
397 * sem_prag.adb (Process_Interrupt_Or_Attach_Handler): Code
398 reformatting. Store the pragma as a contract item.
400 2015-11-18 Ed Schonberg <schonberg@adacore.com>
402 * sem_ch8.adb (Available_Subtype): Use only in GNATprove
403 mode. When generating code it may be necessary to create itypes
404 at the point of use of a selected component, for example in the
405 expansion of a record equality operation.
407 2015-11-18 Vincent Celier <celier@adacore.com>
409 * s-os_lib.adb (Normalize_Pathname.Get_Directory): When
410 invoking Normalize_Pathname, use the same values for parameters
411 Resolve_Links and Case_Sensitive as the parent Normalize_Pathname.
413 2015-11-18 Vincent Celier <celier@adacore.com>
415 * a-direct.adb (Containing_Directory): Return "." when the result
416 is the current directory, not specified as an absolute path name.
418 2015-11-18 Hristian Kirtchev <kirtchev@adacore.com>
420 * exp_aggr.adb (Is_Completely_Hidden_Discriminant): New routine.
421 (Init_Hidden_Discriminants): Code reformatting. Do not initialize
422 a completely hidden discriminant.
423 * a-interr.ads (Get_CPU): Added SPARK_Mode, Volatile_Function
424 and Global aspects on the function.
426 2015-11-18 Ed Schonberg <schonberg@adacore.com>
428 * exp_intr.adb (Expand_Unc_Deallocation): If the designated
429 type is a concurrent type, the deallocation applies to the
430 corresponding record type, or to its class-wide type if the type
433 2015-11-18 Doug Rupp <rupp@adacore.com>
435 * s-parame-vxworks.adb: Reduce default stack size for stack
436 limit check to a reasonable value
437 * s-tpopsp-vxworks.adb: Make Stack_Limit a task variable for vx5 and
440 2015-11-18 Ed Schonberg <schonberg@adacore.com>
442 * sem_ch5.adb (Analyze_Assignment): Diagnose assignment where
443 left-hand side has a limited view of a class-wide type.
444 * sem_ch6.adb (Detected_And_Exchange): Do not install a non-limited
445 view if the scope of the type of the formal is visible through
446 a limited_with_clause, even if the non-limited view is available.
448 2015-11-18 Emmanuel Briot <briot@adacore.com>
450 * s-pooglo.ads: Make Global_Pool_Object aliased.
452 2015-11-18 Ed Schonberg <schonberg@adacore.com>
454 * sem_attr.adb (Analyze_Attribute, case 'Access): If the prefix
455 is an expression function, do not analyze the generated body if
456 the current scope is not the scope of the expression function,
457 as may happen if the attribute is an actual in an instantiation.
458 * sem_ch10.adb, sem_ch12.adb, a-stzmap.adb, s-soflin.adb,
459 a-stwima.adb: Fix typos.
461 2015-11-18 Arnaud Charlet <charlet@adacore.com>
463 * exp_ch11.adb (Expand_N_Exception_Declaration): No-op when
466 2015-11-18 Hristian Kirtchev <kirtchev@adacore.com>
469 * exp_ch3.adb (Default_Initialize_Object): Reimplemented. Abort
470 defer / undefer pairs are now encapsulated in a block with
471 an AT END handler. Partial finalization now takes restriction
472 No_Exception_Propagation into account when generating blocks.
473 * exp_ch7.adb Various reformattings.
474 (Create_Finalizer): Change
475 the generation of abort defer / undefer pairs and explain the
476 lack of an AT END handler.
477 (Process_Transient_Objects): Add generation of abort defer/undefer
479 * exp_ch9.adb Various reformattings.
480 (Build_Protected_Subprogram_Body): Use
481 Build_Runtime_Call to construct a call to Abort_Defer.
482 (Build_Protected_Subprogram_Call_Cleanup): Use
483 Build_Runtime_Call to construct a call to Abort_Undefer.
484 (Expand_N_Asynchronous_Select): Use Build_Runtime_Call to
485 construct a call to Abort_Defer.
486 * exp_intr.adb (Expand_Unc_Deallocation): Abort defer
487 / undefer pairs are now encapsulated in a block with
488 an AT END handler. Finalization now takes restriction
489 No_Exception_Propagation into account when generating blocks.
490 * exp_util.ads, exp_util.adb (Wrap_Cleanup_Procedure): Removed.
492 2015-11-18 Vincent Celier <celier@adacore.com>
494 * g-comlin.adb (Find_Longest_Matching_Switch): Do not take into
495 account a switch ending with '=' when the actual command line
496 switch is not followed with a space or '='.
498 2015-11-18 Ed Schonberg <schonberg@adacore.com>
500 * sem_res.adb (Resolve_Explicit_Dereference): Do not add an access
501 check if the type of the prefix is known to exclude null.
502 * a-coinve.adb (Get_Element_Access): The function returns an
503 access type that excludes null, so add an explicit check for
504 a null element pointer, which is created when Insert_Spaces is
505 called on an indefinite vector container.
507 2015-11-18 Arnaud Charlet <charlet@adacore.com>
509 * switch-c.adb (Scan_Front_End_Switches): Add a check requiring
512 2015-11-18 Ed Schonberg <schonberg@adacore.com>
514 * sem_ch7.adb (Uninstall_Declarations): Before swapping private
515 and full views, ensure that the potential use visbility of the
516 two views is consistent.
518 2015-11-18 Doug Rupp <rupp@adacore.com>
520 * s-parame-vxworks.adb: Increase default stack size for targets
521 using stack limit checking.
523 2015-11-18 Jose Ruiz <ruiz@adacore.com>
525 * a-interr.adb, a-interr.ads (Ada.Interrupts.Get_CPU): Add this
526 function that was added to Ada 2005 returning the processor where
527 interrupt handlers execute.
529 2015-11-18 Tristan Gingold <gingold@adacore.com>
531 * exp_ch9.adb (Is_Pure_Barrier): Handle expanded component
532 declaration of a protected definition.
534 2015-11-18 Ed Falis <falis@adacore.com>
536 * s-soflin.adb, s-stchop-vxworks.adb: Code clean ups.
538 2015-11-18 Gary Dismukes <dismukes@adacore.com>
540 * bcheck.adb: Minor editorial changes.
542 2015-11-18 Arnaud Charlet <charlet@adacore.com>
544 * interfac.ads (Unsigned_24): New type.
545 * sem_ch13.adb (Validate_Unchecked_Conversion): Disable error on
546 unconstrained arrays in Relaxed_RM_Semantics mode.
548 2015-11-18 Vincent Celier <celier@adacore.com>
550 * bcheck.adb (Check_Consistent_Dynamic_Elaboration_Checking): No
551 warning is withed unit is the interface of a Stand-Alone Library.
553 2015-11-18 Thomas Quinot <quinot@adacore.com>
555 * s-os_lib.ads, s-os_lib.adb(Normalize_Pathname): Support the case of
556 an unresolved Directory argument, by recursively resolving it
557 against the current dir.
559 2015-11-18 Ed Schonberg <schonberg@adacore.com>
561 * sem_ch6.adb (Process_Formals): A function declaration that
562 returns a class-wide type must have freeing deferred, so that it
563 is not frozen before the class-wide type and its root type are
564 frozen. This is significant when there may be a limited view of
565 the class_wide type in another package.
567 2015-11-18 Hristian Kirtchev <kirtchev@adacore.com>
569 * einfo.adb (Has_Non_Null_Refinement): Rename to
570 Has_Non_Null_Visible_Refinement.
571 (Has_Null_Refinement): Rename to Has_Null_Visible_Refinement.
572 * einfo.ads Update the documentation of
573 attribute Has_Non_Null_Refinement and attribute Has_Null_Refinement.
574 (Has_Non_Null_Refinement): Rename to Has_Non_Null_Visible_Refinement
575 and update occurrences in entities.
576 (Has_Null_Refinement): Rename to Has_Null_Visible_Refinement and update
577 occurrences in entities.
578 * sem_prag.adb (Check_In_Out_States): Update the calls to
579 Has_[Non_]Null_Refinement.
580 (Check_Input_States): Update the
581 calls to Has_[Non_]Null_Refinement.
582 (Check_Output_States): Update the calls to Has_[Non_]Null_Refinement.
583 (Check_Proof_In_States): Update the calls to Has_[Non_]Null_Refinement.
584 (Collect_Global_Item): Update the calls to Has_[Non_]Null_Refinement.
585 (Is_Null_Refined_State): Update the calls to Has_[Non_]Null_Refinement.
586 (Match_Item): Update the calls to Has_[Non_]Null_Refinement.
587 * sem_util.adb (Has_Non_Null_Refinement): New routine.
588 (Has_Null_Refinement): New routine.
589 * sem_util.ads (Has_Non_Null_Refinement): New routine.
590 (Has_Null_Refinement): New routine.
592 2015-11-18 Gary Dismukes <dismukes@adacore.com>
594 * exp_util.adb: Minor reformatting and typo fixes.
596 2015-11-18 Hristian Kirtchev <kirtchev@adacore.com>
598 * sem_ch4.adb: Minor reformatting.
600 2015-11-18 Hristian Kirtchev <kirtchev@adacore.com>
602 * exp_util.adb (Expand_Subtype_From_Expr): Add new formal
603 parameter Related_Id and propagate it to Make_Subtype_From_Expr.
604 (Make_Subtype_From_Expr): Add new formal parameter
605 Related_Id. Create external entities when requested by the caller.
606 * exp_util.ads (Expand_Subtype_From_Expr): Add new formal
607 parameter Related_Id. Update the comment on usage.
608 (Make_Subtype_From_Expr): Add new formal parameter
609 Related_Id. Update the comment on usage.
610 * sem_ch3.adb (Analyze_Object_Declaration): Add local variable
611 Related_Id. Generate an external constrained subtype when the
612 object is a public symbol.
614 2015-11-18 Hristian Kirtchev <kirtchev@adacore.com>
616 * sem_prag.adb (Analyze_Pragma): Update the grammars of pragmas
617 Abstract_State, Depends, Global, Initializes, Refined_Depends,
618 Refined_Global and Refined_State.
620 2015-11-18 Hristian Kirtchev <kirtchev@adacore.com>
622 * sem_util.adb (Has_Full_Default_Initialization):
623 Perform the test for the presence of pragma
624 Default_Initial_Condition prior to the specialized type
625 checks. Add a missing case where the lack of a pragma argument
626 yields full default initialization.
628 2015-11-18 Hristian Kirtchev <kirtchev@adacore.com>
630 * sem_res.adb (Resolve_Entity_Name): Do not check
631 for elaboration issues when a variable appears as the name of
632 an object renaming declaration as this constitutes an aliasing,
635 2015-11-18 Ed Schonberg <schonberg@adacore.com>
637 * checks.adb (Overlap_Check): An actual that is an aggregate
638 cannot overlap with another actual, and no check should be
640 * targparm.ads: Fix typos.
642 2015-11-18 Pascal Obry <obry@adacore.com>
644 * adaint.c: Routine __gnat_killprocesstree only implemented on
647 2015-11-18 Pascal Obry <obry@adacore.com>
649 * g-ctrl_c.adb: Minor style fixes.
651 2015-11-18 Pascal Obry <obry@adacore.com>
653 * adaint.c, s-os_lib.adb, s-os_lib.ads (Kill_Process_Tree): New.
655 2015-11-18 Hristian Kirtchev <kirtchev@adacore.com>
657 * sem_util.adb (Check_Nonvolatile_Function_Profile): Place the error
658 message concerning the return type on the result definition.
659 (Is_Volatile_Function): A function with a parameter of a protected
660 type is a protected function if it is defined within a protected
663 2015-11-18 Ed Schonberg <schonberg@adacore.com>
665 * sem_ch4.adb (Try_Container_Indexing): When building the
666 parameter list for the function call on indexing functions,
667 preserve overloading of the parameters, which may themselves be
668 generalized indexing operations.
670 2015-11-13 Arnaud Charlet <charlet@adacore.com>
673 * s-osinte-dragonfly.ads (Get_Page_Size): C function returns an int.
675 2015-11-13 David Malcolm <dmalcolm@redhat.com>
677 * gcc-interface/trans.c (Sloc_to_locus): Add line_table param when
678 calling linemap_position_for_line_and_column.
680 2015-11-13 Hristian Kirtchev <kirtchev@adacore.com>
682 * exp_attr.adb: Minor reformatting.
684 2015-11-13 Pascal Obry <obry@adacore.com>
686 * adaint.c: Ensure that it is possible to get killed process
689 2015-11-13 Arnaud Charlet <charlet@adacore.com>
691 * gnat_rm.texi, gnat_ugn.texi, doc/gnat_ugn/gnat_project_manager.rst
692 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
693 doc/gnat_ugn/platform_specific_information.rst,
694 doc/gnat_ugn/gnat_and_program_execution.rst,
695 doc/gnat_ugn/gnat_utility_programs.rst,
696 doc/gnat_ugn/the_gnat_compilation_model.rst,
697 doc/gnat_rm/compatibility_and_porting_guide.rst,
698 doc/gnat_rm/implementation_defined_pragmas.rst,
699 doc/gnat_rm/representation_clauses_and_pragmas.rst,
700 doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
701 Update documentation.
703 2015-11-13 Eric Botcazou <ebotcazou@adacore.com>
705 * sigtramp-ios.c, init.c: Minor cosmetic tweaks.
707 2015-11-13 Hristian Kirtchev <kirtchev@adacore.com>
709 * s-gloloc.adb, g-debpoo.adb: Minor reformatting.
711 2015-11-13 Ed Schonberg <schonberg@adacore.com>
713 * sem_ch5.adb (Analyze_Iterator_Specification): Improve error
714 message for the case the iterable name (array or container)
715 is a component that depends on a discriminant.
717 2015-11-13 Ed Schonberg <schonberg@adacore.com>
719 * sem_ch4.adb (Indicate_Name_And_Type): If the analysis of
720 one interpretation succeeds, set type of name in call, for
722 (Try_Container_Indexing): If there are multiple indexing
723 functions, collect possible interpretations that are compatible
724 with given parameters, and add implicit dereference types when
726 * sem_util.adb (Build_Explicit_Dereference): If the expression
727 is an overloaded function call use the given discriminant to
728 resolve the call, and set properly the type of the call and of
729 the resulting dereference.
731 2015-11-13 Hristian Kirtchev <kirtchev@adacore.com>
733 * sem_prag.adb (Analyze_Pragma): Pragma Constant_After_Elaboration can
734 now apply to a variable without an initialization expression.
736 2015-11-13 Hristian Kirtchev <kirtchev@adacore.com>
738 * exp_ch9.adb (Add_Matching_Formals): Parameter Actuals is now of mode
739 IN OUT. Create a new list when list Actuals is not present.
740 (Build_Contract_Wrapper): Create the wrapper
741 only when the entry has at least on checked contract case or
742 pre/postcondition. Ensure that the call to the original entry
743 lacks an actual parameter list when the entry appears without
745 (Expand_Entry_Declaration): Code cleanup.
747 2015-11-13 Hristian Kirtchev <kirtchev@adacore.com>
749 * sem_ch13.adb (Analyze_Aspect_Specifications): Continue the analysis
750 after encountering an illegal aspect Part_Of.
752 2015-11-13 Ed Schonberg <schonberg@adacore.com>
754 * exp_attr.adb (Expand_N_Attribute_Reference, case
755 Overlaps_Storage): Add copies for nodes that represent the integer
756 addresses of the two actuals, to prevent identical nodes in the
757 tree, which the backend cannot handle properly.
759 2015-11-13 Bob Duff <duff@adacore.com>
761 * sem_ch6.adb (Check_Private_Overriding): Change
762 name of Parent_Is_Private to be Overrides_Private_Part_Op,
763 and use Unit_Declaration_Node.
765 2015-11-13 Bob Duff <duff@adacore.com>
767 * sinfo.ads: Minor comment fix.
768 * sem_ch6.adb: Minor reformatting.
770 2015-11-13 Jerome Lambourg <lambourg@adacore.com>
772 * tracebak.c: Do not use the GCC Unwinder to retrieve traceback
775 2015-11-13 Eric Botcazou <ebotcazou@adacore.com>
777 * init.c [Darwin/arm64]: Fix typo.
778 * sigtramp-armios.c: Remove.
779 * sigtramp-ios.c: New file.
781 2015-11-13 Doug Rupp <rupp@adacore.com>
783 * s-stchop-vxworks.adb (Set_Stack_Limit_For_Current_Task): Set stack
784 limit to 12000 decimal vice 12000 hexadecimal.
786 2015-11-13 Hristian Kirtchev <kirtchev@adacore.com>
788 * exp_ch9.adb, exp_fixd.adb, exp_util.adb, g-debpoo.adb,
789 impunit.adb, scos.ads, sem_ch4.adb, sem_prag.adb,
790 s-stchop-vxworks.adb: Minor reformatting.
792 2015-11-13 Tristan Gingold <gingold@adacore.com>
794 * s-rident.ads (Profile_Info): Enable Pure_Barriers for
795 GNAT_Extended_Ravenscar.
797 2015-11-13 Bob Duff <duff@adacore.com>
799 * sem_ch6.adb (Check_Private_Overriding): Detect the special
800 case where the overriding subprogram is overriding a subprogram
801 that was declared in the same private part.
803 2015-11-13 Gary Dismukes <dismukes@adacore.com>
805 * exp_ch9.adb: Minor reformatting and typo fixes.
807 2015-11-13 Eric Botcazou <ebotcazou@adacore.com>
809 * init.c [Darwin/arm64]: Move __gnat_sigtramp implementation to...
810 (__gnat_map_signal): New function.
811 (__gnat_error_handler):
812 Adjust the context and call above function.
813 * sigtramp-armios.c: ...here. New file.
815 2015-11-13 Arnaud Charlet <charlet@adacore.com>
817 * bcheck.adb (Check_Consistent_Restrictions): Do not check
818 consistency of No_Dependence for runtime units.
820 2015-11-13 Tristan Gingold <gingold@adacore.com>
822 * s-rident.ads (Restriction_Id): Add Pure_Barriers.
823 * restrict.ads (Implementation_Restriction): Add Pure_Barriers.
824 * exp_ch9.adb (Expand_Entry_Barrier): Create
825 Is_Simple_Barrier_Name function, add Is_Pure_Barrier and
828 2015-11-13 Ed Schonberg <schonberg@adacore.com>
830 * sem_util.adb (Get_Cursor_Type): To determine whether a function
831 First is the proper Iterable primitive, use the base type of the
832 first formal rather than the type. This is needed in the unusual
833 case where the Iterable aspect is specified for an integer type.
835 2015-11-13 Ed Schonberg <schonberg@adacore.com>
837 * sem_ch4.adb (Constant_Indexing_OK): If the indexing is the
838 prefix of a procedure call assume that constant indexing is
841 2015-11-13 Eric Botcazou <ebotcazou@adacore.com>
843 * sigtramp.h: Fix formatting throughout, do not include other
844 headers, add missing preprocessor condition and 'extern' keywords.
845 * sigtramp-armdroid.c: Include <sys/ucontext.h>.
846 * init.c [Android]: Likewise.
848 2015-11-13 Eric Botcazou <ebotcazou@adacore.com>
850 * init.c [Darwin/arm64] (__gnat_sigtramp): Do not increment PC,
851 fix CFI and add return sequence.
853 2015-11-13 Ed Schonberg <schonberg@adacore.com>
855 * exp_fixd.adb (Expand_Convert_Float_To_Fixed): If the conversion
856 comes from an attribute reference 'Round, the operation must
857 round and not truncate.
858 * sem_res.adb, sem_ch6.adb: Minor editing.
860 2015-11-12 Philippe Gil <gil@adacore.com>
862 * g-debpoo.adb (Print_Address): print address in hexadecimal as
863 in previous GNAT version (without secondary stack use)
864 (Deallocate): Deallocate calling once Unlock_Task.all when it
867 2015-11-12 Ed Schonberg <schonberg@adacore.com>
869 * sem_ch3.adb (Analyze_Subtype_Declaration): Remove redundant
870 copying of dimensions from parent type to subtype. This is
871 properly done in Analyze_Dimension.
872 * sem_dim.adb (Analyze_Dimension_Subtype_Declaration): Add entity
873 to error message, so that reference to entity can be formatted
877 2015-11-12 Bob Duff <duff@adacore.com>
879 * impunit.adb, lib-xref.ads, restrict.ads, scos.ads, sem_attr.ads,
880 types.ads: Get rid of some global variables.
881 * output.adb, output.ads: Move some global variables to the body.
883 2015-11-12 Yannick Moy <moy@adacore.com>
885 * lib-xref-spark_specific.adb
886 (Is_Constant_Object_Without_Variable_Input): Add special case
887 for imported constants.
889 2015-11-12 Philippe Gil <gil@adacore.com>
891 * g-debpoo.adb (Allocate): Avoid having allocations not handled.
893 2015-11-12 Ed Schonberg <schonberg@adacore.com>
895 * checks.adb (Apply_Scalar_Range_Check): If the expression is
896 a real literal and the context type has static bounds, remove
897 range check when possible.
899 2015-11-12 Ed Schonberg <schonberg@adacore.com>
901 * sem_util.adb (Collect_Primitive_Operations): If the type is
902 derived from a type declared elsewhere that has an incomplete
903 type declaration, the primitives are found in the scope of the
904 type nat that of its ancestor.
906 2015-11-12 Arnaud Charlet <charlet@adacore.com>
908 * switch-c.adb, debug.adb, osint-c.adb, gnat1drv.adb: Remove -gnatd.V
910 * exp_aggr.adb, exp_util.adb: Fix typos.
912 2015-11-12 Jerome Lambourg <lambourg@adacore.com>
914 * init.c: Properly adjust PC values in case of signals.
916 2015-11-12 Bob Duff <duff@adacore.com>
918 * sem_prag.adb (Check_Arg_Is_Library_Level_Local_Name): A
919 pragma that comes from an aspect does not "come from source",
920 so we need to test whether it comes from an aspect.
922 2015-11-12 Arnaud Charlet <charlet@adacore.com>
924 * switch-c.adb, gnat1drv.adb, opt.ads: Reserve -gnateg for generation
927 2015-11-12 Arnaud Charlet <charlet@adacore.com>
929 * back_end.adb, opt.ads (Debugger_Level): Update comment.
930 (Scan_Back_End_Switches): Set Debugger_Level.
932 2015-11-12 Bob Duff <duff@adacore.com>
934 * fmap.adb, debug.ads, checks.adb, exp_ch11.adb: Minor edits.
936 2015-11-12 Doug Rupp <rupp@adacore.com>
938 * s-stchop-vxworks.adb (Stack_Limit): Export vice Import.
940 2015-11-12 Gary Dismukes <dismukes@adacore.com>
942 * sem_dim.adb: Minor reformatting.
944 2015-11-12 Gary Dismukes <dismukes@adacore.com>
946 * gnat1drv.adb, opt.ads: Minor reformatting.
948 2015-11-12 Ed Schonberg <schonberg@adacore.com>
950 * sem_ch3.adb (Analyze_Number_Declaration): Call Analyze_Dimension,
951 to propagate dimension information from expression to named
953 * sem_dim.ads: Documentation: number declaration and explicit
954 dereference can carry dimension information.
955 * sem_dim.adb (Analyze_Dimension_Number_Declaration): New
956 procedure, to propagate dimension information from expression
957 of declaration to named number, whose type becomes one of the
958 dimensioned base types rather than universal real.
959 (Analyze_Dimension_Binary_Op):
960 a) If one operand is a literal that is the value of a declared
961 constant after constant-foloding, use the dimensions of the
963 b) If an operand is a literal that is a contant-folded expression,
964 and expander is active, do not report a dimension mismatch if
965 literal does not carry them, because dimension matching will
966 have been checked previously.
968 2015-11-12 Ed Schonberg <schonberg@adacore.com>
970 * sem_ch8.adb (Find_Selected_Component): In a synchronized
971 body, a reference to an operation of an object of the same
972 synchronized type was always interpreted as a reference to the
973 current instance. This is not always the case, as the prefix of
974 the reference may designate an object of the same type declared
975 in the enclosing context prior to the body.
977 2015-11-12 Arnaud Charlet <charlet@adacore.com>
979 * impunit.ads, impunit.adb (Get_Kind_Of_File): New. Cleaned up
980 implementation from previous Get_Kind_Of_Unit.
981 (Get_Kind_Of_Unit): Reimplemented using Get_Kind_Of_File.
982 * debug.adb: Remove d.4 switch, no longer used.
983 * opt.ads: Update doc on Debugger_Level.
984 * gnat1drv.adb: Code clean ups.
985 * sinput.ads: minor fix in comment
987 2015-11-12 Bob Duff <duff@adacore.com>
989 * sinfo.adb, sinfo.ads, sem_ch6.adb, atree.ads: Add
990 Was_Expression_Function flag, which is set in sem_ch6.adb when
991 converting an Expression_Function into a Subprogram_Body.
993 2015-11-12 Pascal Obry <obry@adacore.com>
995 * usage.adb: Update overflow checking documentation.
997 2015-11-12 Tristan Gingold <gingold@adacore.com>
999 * snames.ads-tmpl: Name_Gnat_Extended_Ravenscar: New identifier.
1000 * s-rident.ads (Profile_Name): Add GNAT_Extended_Ravenscar.
1001 (Profile_Info): Add new entry for GNAT_Extended_Ravenscar.
1002 * sem_prag.adb (Set_Ravenscar_Profile): Add Profile parameter
1003 to handle various ravenscar profiles. Adjust error messages.
1004 (Analyze_Pragma): Handle GNAT_Extended_Ravenscar profile.
1005 * targparm.adb (Get_Target_Parameters): Handle
1006 GNAT_Extended_Ravenscar profile.
1008 2015-11-12 Ed Schonberg <schonberg@adacore.com>
1010 * sem_warn.adb (Warn_On_Unreferenced_Entity): If the entity is an
1011 Out_Parameter the front-end does not emit any warning on it, so
1012 do not suppress warnings on the entity because the backend might
1013 be able to determine an uninitialized path and warn accordingly.
1015 2015-11-12 Ed Schonberg <schonberg@adacore.com>
1017 * sem_ch4.adb (Analyze_Selected_Component): Diagnose an attempt
1018 to reference an internal entity from a synchronized type from
1019 within the body of that type, when the prefix of the selected
1020 component is not the current instance.
1022 2015-11-12 Ed Falis <falis@adacore.com>
1024 * s-stchop-vxworks.adb: Clean up in stack checking code.
1026 2015-11-12 Gary Dismukes <dismukes@adacore.com>
1028 * exp_ch6.adb (Is_Build_In_Place_Function_Call):
1029 Test Expression (N) in N_Type_Conversion cases as well,
1030 since conversions can occur in actual parameter contexts.
1031 (Make_Build_In_Place_Call_In_Anonymous_Context): Retrieve
1032 function call from Expression (Func_Call) when Nkind (Func_Call)
1033 is N_Type_Conversion, since conversions are allowed in "anonymous"
1034 contexts (specifically, as actual parameters).
1036 2015-11-12 Thomas Quinot <quinot@adacore.com>
1038 * sem_ch4.adb (analyze_If_Expression): Reject IF-expression where
1039 THEN-expression is overloaded and none of its interpretation is
1040 compatible with the ELSE-expression.
1042 2015-11-12 Jerome Lambourg <lambourg@adacore.com>
1044 * init.c: Do not try to mess with the MSR values in RTP mode:
1045 not needed and forbidden.
1047 2015-11-12 Ed Schonberg <schonberg@adacore.com>
1049 * exp_attr.adb (Compile_Stream_Body_In_Scope): Do not install
1050 full view of a type that has pragma Stream_Convert, because
1051 this indicates special processing for the stream operations of
1054 2015-11-12 Jerome Lambourg <lambourg@adacore.com>
1056 * init.c: Do not try to mess with the MSR values in RTP mode:
1057 not needed and forbidden.
1059 2015-11-12 Ed Schonberg <schonberg@adacore.com>
1061 * exp_attr.adb (Compile_Stream_Body_In_Scope): Do not install
1062 full view of a type that has pragma Stream_Convert, because
1063 this indicates special processing for the stream operations of
1066 2015-11-12 Gary Dismukes <dismukes@adacore.com>
1068 * exp_ch5.adb, sem_ch3.adb, exp_util.ads, inline.adb, freeze.adb,
1069 sem_util.adb, sem_util.ads, par-ch6.adb, sem_elab.adb: Minor
1070 reformatting and a typo fix.
1072 2015-11-12 Ed Schonberg <schonberg@adacore.com>
1074 * sem_ch12.adb (Preanalyze_Actuals): Add guard on use of
1075 Incomplete_Actuals, which are only stored for a package
1076 instantiation, in order to place the instance in the body of
1079 2015-11-12 Ed Schonberg <schonberg@adacore.com>
1081 * exp_intr.adb: Add legality checks on calls to a
1082 Generic_Dispatching_Constructor: the given tag must be defined,
1083 it cannot be the tag of an abstract type, and its accessibility
1084 level must not be greater than that of the constructor.
1086 2015-11-12 Ed Schonberg <schonberg@adacore.com>
1088 * sem_ch4.adb (Try_Container_Indexing, Constant_Indexing_OK): If
1089 the context is an overloaded call, assume that Constant_Indexing
1090 is not OK if an interpretation has an assignable parameter
1091 corresponding to the indexing expression.
1093 2015-11-12 Jerome Lambourg <lambourg@adacore.com>
1095 * init.c (__gnat_error_handler): Force the SPE bit of the MSR
1096 when executing on e500v2 CPU.
1098 2015-11-12 Hristian Kirtchev <kirtchev@adacore.com>
1100 * sem_prag.adb (Analyze_Constituent): Stop the
1101 analysis after detecting a misplaced constituent as this is a
1104 2015-11-12 Hristian Kirtchev <kirtchev@adacore.com>
1106 * sem_ch10.adb, atree.adb: Minor reformatting.
1108 2015-11-12 Hristian Kirtchev <kirtchev@adacore.com>
1110 * sem_elab.adb (Check_A_Call): Add new variable
1111 Is_DIC_Proc. Report elaboration issue in SPARK concerning calls
1112 to source subprograms or nontrivial Default_Initial_Condition
1113 procedures. Add specialized error message to avoid outputting
1114 the internal name of the Default_Initial_Condition procedure.
1115 * sem_util.ads, sem_util.adb
1116 (Is_Non_Trivial_Default_Init_Cond_Procedure): New routine.
1118 2015-11-12 Hristian Kirtchev <kirtchev@adacore.com>
1120 * contracts.adb (Analyze_Entry_Or_Subprogram_Body_Contract):
1121 Remove the guard concerning entry bodies as it is spurious.
1122 (Analyze_Entry_Or_Subprogram_Contract): Skip the analysis of
1123 Contract_Cases when not annotating the tree.
1124 * einfo.adb: Node25 is now used as Contract_Wrapper.
1125 (Contract_Wrapper): New routine.
1126 (PPC_Wrapper): Removed.
1127 (Set_Contract_Wrapper): New routine.
1128 (Set_PPC_Wrapper): Removed.
1129 (Write_Field25_Name): Add output for Contract_Wrapper. Remove
1130 output for PPC_Wrapper.
1131 * einfo.ads: New attribute Contract_Wrapper along with usage
1132 in entities. Remove attribute PPC_Wrapper along with usage in nodes.
1133 (Contract_Wrapper): New routine along with pragma Inline.
1134 (PPC_Wrapper): Removed along with pragma Inline.
1135 (Set_Contract_Wrapper): New routine along with pragma Inline.
1136 (Set_PPC_Wrapper): Removed along with pragma Inline.
1137 * exp_ch9.adb (Build_Contract_Wrapper): New routine.
1138 (Build_PPC_Wrapper): Removed.
1139 (Build_Protected_Entry): Code cleanup.
1140 (Expand_Entry_Declaration): Create a contract wrapper
1141 which now verifies Contract_Cases along with pre/postconditions.
1142 (Expand_N_Task_Type_Declaration): There is no need to check
1143 whether an entry has pre/postconditions as this is now done
1144 in Build_Contract_Wrapper.
1145 * sem_ch13.adb (Analyze_Aspect_Specifications): Pragma
1146 Refined_Post is now properly inserted in entry bodies.
1147 (Insert_Pragma): Add circuitry to insert in an entry body. Redo
1148 the instance "header" circuitry. Remove the now obsolete special
1149 case of inserting pre- conditions.
1150 * sem_prag.adb (Analyze_Pragma): Pragma Contract_Cases now
1152 * sem_res.adb (Resolve_Entry_Call): Update the calls to
1155 2015-11-12 Hristian Kirtchev <kirtchev@adacore.com>
1157 * exp_attr.adb, freeze.adb, sem_util.adb, sem_ch13.adb: Minor
1160 2015-11-12 Ed Schonberg <schonberg@adacore.com>
1162 * exp_attr.adb (Compile_Stream_Body_In_Scope): When compiling
1163 a stream operation for an array type, install the scope of the
1164 component type if it is private and not in scope, to prevent
1165 spurious errors if the full view of the component type has
1166 defaulted discriminants.
1168 2015-11-12 Eric Botcazou <ebotcazou@adacore.com>
1170 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): For a
1171 variable, if this is not an overlay, set on Treat_As_Volatile on it.
1172 * gcc-interface/decl.c (E_Variable): Do not force the type to volatile
1173 for address clauses. Tweak and adjust various RM references.
1175 2015-11-12 Eric Botcazou <ebotcazou@adacore.com>
1177 * checks.ads: Minor comment fix.
1179 2015-11-12 Arnaud Charlet <charlet@adacore.com>
1181 * gnat_rm.texi, gnat_ugn.texi,
1182 doc/gnat_ugn/platform_specific_information.rst,
1183 doc/gnat_ugn/gnat_and_program_execution.rst,
1184 doc/gnat_ugn/the_gnat_compilation_model.rst,
1185 doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
1186 doc/gnat_rm/implementation_defined_pragmas.rst: Update documentation.
1188 2015-11-12 Eric Botcazou <ebotcazou@adacore.com>
1190 * einfo.ads (Overlays_Constant): Document usage for E_Constant.
1191 * freeze.adb (Warn_Overlay): Small reformatting.
1192 (Check_Address_Clause): Deal specifically with deferred
1193 constants. For a variable or a non-imported constant
1194 overlaying a constant object and with initialization value,
1195 either remove the initialization or issue a warning. Fix a
1197 * sem_util.adb (Note_Possible_Modification): Overhaul the condition for
1198 the warning on modified constants and use Find_Overlaid_Entity instead
1199 of doing it manually.
1200 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Compute and
1201 set Overlays_Constant once on entry. Do not treat the overlaid
1202 entity as volatile. Do not issue the warning on modified
1204 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: Remove
1205 over-restrictive condition for the special treatment of deferred
1207 <E_Variable>: Remove obsolete associated code.
1209 2015-11-12 Eric Botcazou <ebotcazou@adacore.com>
1211 * gcc-interface/trans.c (gnat_to_gnu) <N_Subprogram_Renaming_Decl>: Do
1212 not materialize renamed subprograms if only annotating types.
1214 2015-11-12 Pierre-Marie de Rodat <derodat@adacore.com>
1216 * gcc-interface/decl.c (gnat_to_gnu_entity): Create
1217 IMPORTED_DECL nodes to describe the subprogram renamings which
1218 are relevant at debug time.
1219 * gcc-interface/gigi.h (get_debug_scope): Add declaration.
1220 * gcc-interface/trans.c (Identifier_to_gnu): Consider
1221 N_Defining_Operator_Symbol as valid entities.
1222 (gnat_to_gnu): Handle N_Defining_Operator_Symbol the same way as
1223 other entities. Introduce a specific handling for
1224 N_Subprogram_Renaming_Declaration: call gnat_to_gnu_entity on
1225 the entity defined for relevant ones.
1226 (process_decls): Process subprogram renaming declarations during
1227 the second pass only.
1228 * gcc-interface/utils.c (get_debug_scope): Make it external.
1229 Consider N_Defining_Operator_Symbol as valid entities.
1230 (gnat_write_global_declarations): Output debugging information
1231 for top-level imported declarations.
1233 2015-11-12 Emmanuel Briot <briot@adacore.com>
1235 2015-11-12 Emmanuel Briot <briot@adacore.com>
1237 * s-os_lib.ads: Documentation update.
1239 2015-11-12 Arnaud Charlet <charlet@adacore.com>
1241 * s-taprop-vxworks.adb, s-osinte-vxworks.ads: Use a single import of
1242 taskDelay to avoid confusion.
1244 2015-11-12 Ed Schonberg <schonberg@adacore.com>
1246 * exp_ch6.adb (Expand_Simple_Function_Return): If the return
1247 type is class-wide and the expression is a view conversion,
1248 remove the conversion to prevent overriding of the tag, which
1249 must be that of the object being returned.
1251 2015-11-12 Tristan Gingold <gingold@adacore.com>
1253 * bindgen.adb (Gen_Adainit): Code cleanup.
1255 2015-11-12 Hristian Kirtchev <kirtchev@adacore.com>
1257 * s-stalib.ads: Code cleanup.
1259 2015-11-12 Ed Schonberg <schonberg@adacore.com>
1261 * sem_ch3.adb (Analyze_Incomplete_Type_Decl): small optimization.
1262 (Analyze_Subtype_Declaration): For floating point types,
1264 (OK_For_Limited_Init_In_05): Handle properly a conditional
1265 expression whose condition is static, and is rewritten as the
1266 branch that will be executed.
1268 2015-11-12 Ed Schonberg <schonberg@adacore.com>
1270 * sem_attr.adb (Resolve_Attribute, case 'Access): If the context
1271 type is an access constant type, do not mark the attribute
1272 reference as a possible modification of the prefix.
1274 2015-11-12 Steve Baird <baird@adacore.com>
1276 * sem_ch6.adb (Analyze_Procedure_Call) If CodePeer_Mode is True,
1277 do not analyze the expression of a machine code insertion.
1278 * sem_ch13.adb (Analyze_Code_Statement) If CodePeer_Mode is True,
1279 mark the N_Code_Statement node as analyzed and do nothing else.
1281 2015-11-12 Ed Schonberg <schonberg@adacore.com>
1283 * sem_ch6.adb (Check_Limited_Return): Make global to package
1285 (Analyze_Expression_Function): Remove duplicated code, pre-analyze
1286 expression to capture names and call Check_Limited_Return so
1287 that semantic checks are identical to those for regular functions
1288 returning limited types.
1290 2015-11-12 Gary Dismukes <dismukes@adacore.com>
1292 * bindgen.adb: Fix typo.
1293 * sem_ch6.adb: Minor reformatting.
1295 2015-11-12 Emmanuel Briot <briot@adacore.com>
1297 * s-os_lib.adb (Argument_String_To_List): fix handling of
1300 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
1302 * gcc-interface/decl.c: Remove unused header files.
1303 * gcc-interface/misc.c: Likewise.
1304 * gcc-interface/targtyps.c: Likewise.
1305 * gcc-interface/trans.c: Likewise.
1306 * gcc-interface/utils.c: Likewise.
1308 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
1310 * gcc-interface/gigi.h (set_reverse_storage_order_on_pad_type):
1312 * gcc-interface/decl.c (gnat_to_gnu_entity) <discrete_type>: Set the
1313 storage order on the enclosing record for a packed array type.
1314 <E_Array_Type>: Set the storage order.
1315 <E_Array_Subtype>: Likewise.
1316 <E_Record_Type>: Likewise.
1317 <E_Record_Subtype>: Likewise.
1318 (gnat_to_gnu_component_type): Set the reverse storage order on a
1319 padded type built for a non-bit-packed array.
1320 (gnat_to_gnu_field): Likewise.
1321 (components_to_record): Deal with TYPE_REVERSE_STORAGE_ORDER.
1322 * gcc-interface/utils.c (make_packable_type): Likewise.
1323 (pad_type_hasher::equal): Likewise.
1324 (gnat_types_compatible_p): Likewise.
1325 (unchecked_convert): Likewise.
1326 (set_reverse_storage_order_on_pad_type): New public function.
1327 * gcc-interface/trans.c (Attribute_to_gnu): Adjust call to
1328 get_inner_reference.
1329 * gcc-interface/utils2.c (build_unary_op): Likewise.
1330 (gnat_build_constructor): Deal with TYPE_REVERSE_STORAGE_ORDER.
1331 (gnat_rewrite_reference): Propagate REF_REVERSE_STORAGE_ORDER.
1333 2015-11-07 Richard Sandiford <richard.sandiford@arm.com>
1335 * gcc-interface/utils.c: Don't undef DEF_BUILTIN.
1337 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
1339 * gcc-interface/decl.c: Reorder #include's and remove duplicates.
1340 * gcc-interface/misc.c: Likewise.
1341 * gcc-interface/targtyps.c: Likewise.
1342 * gcc-interface/trans.c: Likewise.
1343 * gcc-interface/utils.c: Likewise.
1345 2015-10-27 Tristan Gingold <gingold@adacore.com>
1347 * bindgen.adb (System_BB_CPU_Primitives_Multiprocessors_Used):
1349 (Gen_Adainit): Call Start_All_CPUs if the above
1350 variable is set to true.
1352 2015-10-27 Emmanuel Briot <briot@adacore.com>
1354 * adaint.c, s-os_lib.adb, s-os_lib.ads (Copy_File_Attributes): New
1357 2015-10-27 Hristian Kirtchev <kirtchev@adacore.com>
1359 * namet.adb, namet.ads: Minor reformatting.
1361 2015-10-27 Ed Schonberg <schonberg@adacore.com>
1363 * sem_ch4.adb (Analyze_Allocator): Do not perform legality check
1364 on allocators for limited objects in a qualified expression,
1365 because expression has not been resolved.
1366 * sem_res.adb (Resolve_Allocator): Perform check on legality of
1367 limited objects after resolution. Add sem_ch3.adb to context.
1369 2015-10-27 Hristian Kirtchev <kirtchev@adacore.com>
1371 * sem_prag.adb (Analyze_Refined_Global_In_Decl_Part): Add variable
1373 (Check_Refined_Global_Item): An object or state acts as a
1374 constituent only when the corresponding encapsulating state
1375 appears in pragma Global.
1376 (Collect_Global_Item): Add a state with non-null visible refinement to
1379 2015-10-27 Gary Dismukes <dismukes@adacore.com>
1381 * sem_util.ads, par.adb, sem_ch6.adb: Minor reformatting and a few
1384 2015-10-27 Pierre-Marie de Rodat <derodat@adacore.com>
1386 * namet.ads, namet.adb (Name_Equals): New function.
1387 * namet.h (Name_Equals): New macro.
1389 2015-10-27 Arnaud Charlet <charlet@adacore.com>
1391 * exp_ch6.adb (Build_Procedure_Form): Use 'RESULT' for the extra
1392 parameter, to avoid ambiguity when generating tmps using _xxx which
1393 might end up reusing _result.
1395 2015-10-27 Javier Miranda <miranda@adacore.com>
1397 * sem_util.ads, sem_util.adb (Defining_Identifier): Adding a formal to
1398 indicate the needed behavior in case of nodes with errors.
1400 2015-10-27 Ed Schonberg <schonberg@adacore.com>
1402 * sem_attr.adb (Eval_Attribute): If the prefix of attribute
1403 Enum_Rep is an object that is a generated loop variable for an
1404 element iterator, no folding is possible.
1405 * sem_res.adb (Resolve_Entity_Name): Do not check for a missing
1406 initialization in the case of a constant that is an object
1408 * exp_attr.adb (Expand_N_Attribute_Reference, case Enum_Rep):
1409 If the prefix is a constant that renames an expression there is
1410 nothing to evaluate statically.
1412 2015-10-27 Vincent Celier <celier@adacore.com>
1414 * gnatlink.adb: Always delete the response file, even when the
1415 invocation of gcc to link failed.
1417 2015-10-27 Hristian Kirtchev <kirtchev@adacore.com>
1419 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
1420 Do not inherit the SPARK_Mode from the context if it has been
1422 (Build_Subprogram_Declaration): Relocate relevant
1423 pragmas from the subprogram body to the generated corresponding
1424 spec. Do not copy aspect SPARK_Mode as this leads to circularity
1425 in Copy_Separate_Tree. Inherit the attributes that describe
1426 pragmas Ghost and SPARK_Mode.
1427 (Move_Pragmas): New routine.
1429 2015-10-27 Hristian Kirtchev <kirtchev@adacore.com>
1431 * inline.adb (Is_Expression_Function): Removed.
1432 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): An internally
1433 generated subprogram body that completes an expression function
1434 inherits the SPARK_Mode from the spec.
1435 * sem_res.adb (Resolve_Call): Update all calls to
1436 Is_Expression_Function.
1437 * sem_util.ads, sem_util.adb (Is_Expression_Function): Reimplemented.
1438 (Is_Expression_Function_Or_Completion): New routine.
1440 2015-10-27 Hristian Kirtchev <kirtchev@adacore.com>
1442 * lib-xref-spark_specific.adb, a-dirval-mingw.adb, exp_ch6.adb,
1443 sem_ch8.adb, s-os_lib.adb: Minor reformatting.
1445 2015-10-27 Yannick Moy <moy@adacore.com>
1447 * lib-xref-spark_specific.adb
1448 (Enclosing_Subprogram_Or_Library_Package): detect library-level
1449 subprograms and handle entries as subprograms, i.e. now both
1450 library-level subprograms and entry bodies act as enclosing
1452 (Traverse_Declarations_Or_Statements): process entry bodies just
1453 like subprogram bodies.
1454 * lib-xref.ads (Enclosing_Subprogram_Or_Library_Package): comment
1455 simplified while keeping its the meaning and minor typo fixed
1457 * spark_xrefs.ads (Xref Section): fix in description of the ALI
1458 line for subprogram calls; such lines start with captial "F"
1459 followed by a space.
1461 2015-10-27 Ed Schonberg <schonberg@adacore.com>
1463 * sem_ch8.adb (Find_Direct_Name): A parameter association is
1464 a legal context for applying an implicit dereference.
1465 (Analyze_Expanded_Name): Minor code cleanup.
1467 2015-10-27 Arnaud Charlet <charlet@adacore.com>
1469 * sinput.ads, spark_xrefs.ads, lib-xref.adb: Fix typos.
1471 2015-10-27 Pascal Obry <obry@adacore.com>
1473 * a-dirval-mingw.adb: Remove some characters from Invalid_Character set.
1475 2015-10-27 Ed Schonberg <schonberg@adacore.com>
1477 * exp_ch6.adb (Rewrite_Function_Call_For_C): Use a named
1478 associaion for the added actual in the call because previous
1479 actuals may also have been given by explicit associations.
1480 * lib-xref.adb: Minor style fixes.
1482 2015-10-27 Arnaud Charlet <charlet@adacore.com>
1484 * gnat1drv.adb: Remove hard coded restrictions.
1486 2015-10-27 Pascal Obry <obry@adacore.com>
1488 * a-dirval-mingw.adb: Minor reformatting.
1490 2015-10-27 Javier Miranda <miranda@adacore.com>
1492 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Improve previous patch.
1494 2015-10-27 Hristian Kirtchev <kirtchev@adacore.com>
1496 * sem_ch12.adb (Analyze_Formal_Package_Declaration): Code cleanup. Set
1497 and restore the value of global flag Ignore_Pragma_SPARK_Mode. A
1498 formal package declaration acts as a package instantation with
1499 respect to SPARK_Mode legality.
1501 2015-10-27 Hristian Kirtchev <kirtchev@adacore.com>
1503 * sem_prag.adb (Check_Constituent_Usage): Use
1504 logical operators rather than short circuit operators. Emit an
1505 error when a state with visible refinement is not refined.
1506 * snames.ads-tmpl: Add names for detecting
1507 predefined potentially blocking subprograms.
1509 2015-10-27 Arnaud Charlet <charlet@adacore.com>
1511 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Revert previous
1513 (Expand_Array_Aggregate): Rewrite previous change here
1514 as done for other non GCC back-ends.
1515 (Build_Record_Aggr_Code): Add special case.
1517 2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
1519 * sem_prag.adb (Add_Item_To_Name_Buffer): Update the comment on usage.
1520 Add an output string for loop parameters.
1521 (Analyze_Global_Items): Loop parameters are now a
1522 valid global item. The share the legality checks of constants.
1523 (Analyze_Input_Output): Loop parameters are now a valid dependency item.
1524 (Find_Role): Loop parameters share the role of constants.
1526 2015-10-26 Ed Schonberg <schonberg@adacore.com>
1528 * sem_res.adb (Resolve_Generalized_Indexing): In ASIS mode,
1529 preserve the Generalized_ indexing link if the context is not
1530 a spec expression that will be analyzed anew.
1532 2015-10-26 Javier Miranda <miranda@adacore.com>
1534 * exp_ch6.ads, exp_ch6.adb (Build_Procedure_Body_Form): Promote it to
1535 library level (to invoke this routine from the semantic analyzer).
1536 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): When generating
1537 C code, invoke Build_Procedure_Body_Form to transform a function
1538 that returns a constrained array type into a procedure with an
1539 out parameter that carries the return value.
1541 2015-10-26 Arnaud Charlet <charlet@adacore.com>
1543 * a-reatim.ads: Add "Clock_Time with Synchronous" contract in package
1545 * a-taside.ads: Add "Tasking_State with Synchronous" contract in
1546 package Ada.Task_Identification.
1547 * sem_ch12.adb: minor typo in comment
1549 2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
1551 * contracts.adb (Analyze_Object_Contract): Set and restore
1552 the SPARK_Mode for both constants and objects. Factor out the
1553 semantic checks concerning Ghost objects.
1554 * freeze.adb (Freeze_Array_Type): A Ghost array type cannot have a
1555 concurrent component type.
1556 (Freeze_Entity): A Ghost type cannot also be concurrent.
1557 (Freeze_Record_Type): A Ghost record type cannot have a concurrent
1559 * sem_prag.adb (Analyze_Abstract_State): A Ghost abstract
1560 state cannot also be synchronized.
1561 (Check_Ghost_Synchronous): New routine.
1562 * sem_util.adb (Yields_Synchronized_Object): Correct the case
1563 of record components to account for the case where the type has
1566 2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
1568 * expander.adb (Expand): Expand a single protected declaration.
1569 * exp_ch9.ads, exp_ch9.adb (Expand_N_Single_Protected_Declaration): New
1572 2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
1574 * sem_res.adb (Is_OK_Volatile_Context): A volatile object may appear
1575 in an object declaration as long as it denotes the name.
1577 2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
1579 * sem_ch9.adb (Analyze_Single_Protected_Declaration): The anonymous
1580 object no longer comes from source.
1581 (Analyze_Single_Task_Declaration): The anonymous object no longer
1583 * sem_prag.adb (Analyze_Pragma): The analysis of pragma SPARK_Mode
1584 now recognizes the internal anonymous object created for a single
1585 concurren type as a valid context.
1586 (Find_Related_Context): The internal anonymous object created for a
1587 single concurrent type is now a valid context.
1588 (Find_Related_Declaration_Or_Body): The internal anonymous object
1589 created for a single concurrent type is now a valid context.
1591 2015-10-26 Ed Schonberg <schonberg@adacore.com>
1593 * sem_util.adb (Inherit_Rep_Item_Chain): Another another guard
1594 to prevent circularities in the rep_item_chain of the full view
1595 of a type extension in a child unit that extends a private type
1598 2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
1600 * atree.ads, atree.adb (Ekind_In): New 10 and 11 parameter versions.
1601 * contracts.ads, contracts.adb (Analyze_Initial_Declaration_Contract):
1603 * sem_ch6.adb (Analyze_Generic_Subprogram_Body):
1604 Analyze the contract of the initial declaration.
1605 (Analyze_Subprogram_Body_Helper): Analyze the contract of the
1606 initial declaration.
1607 * sem_ch7.adb (Analyze_Package_Body_Helper): Analyze the contract
1608 of the initial declaration.
1609 * sem_ch9.adb (Analyze_Entry_Body): Analyze the contract of
1610 the initial declaration.
1611 (Analyze_Protected_Body): Analyze
1612 the contract of the initial declaration.
1613 (Analyze_Task_Body): Analyze the contract of the initial declaration.
1614 * sem_prag.adb (Add_Entity_To_Name_Buffer): Use "type" rather
1615 than "unit" as it makes the error messages sound better.
1616 (Add_Item_To_Name_Buffer): Update comment on usage. The routine
1617 now supports discriminants and current instances of concurrent
1619 (Analyze_Depends_In_Decl_Part): Install the discriminants
1621 (Analyze_Global_In_Decl_Part): Install the discriminants of a task type.
1622 (Analyze_Global_Item): Add processing for current instances of
1623 concurrent types and include discriminants as valid global items.
1624 (Analyze_Input_Output): Discriminants and current instances of
1625 concurrent types are now valid items. Update various error messages.
1626 (Check_Usage): Current instances of protected and task types behaves
1627 as formal parameters.
1628 (Collect_Subprogram_Inputs_Outputs): There is
1629 no longer need to manually analyze [Refined_]Global thanks to
1630 freezing of initial declaration contracts. Add processing for
1631 the current instance of a concurrent type.
1632 (Find_Role): Add categorizations for discriminants, protected and task
1634 (Is_CCT_Instance): New routine.
1635 (Match_Items): Update the comment on usage. Update internal comments.
1636 * sem_prag.ads (Collect_Subprogram_Inputs_Outputs): Update the
1638 * sem_util.adb (Entity_Of): Ensure that the entity is an object
1639 when traversing a potential renaming chain.
1640 (Fix_Msg): Use "type" rather than "unit" as it makes the error messages
1642 * sem_util.ads (Fix_Msg): Update the comment on usage.
1644 2015-10-26 Arnaud Charlet <charlet@adacore.com>
1646 * par.adb (Par): Do not generate an error when generating
1647 SCIL for predefined units or new children of system and co.
1649 2015-10-26 Ed Schonberg <schonberg@adacore.com>
1651 * einfo.adb: Access_Disp_Table applies to a private
1654 2015-10-26 Ed Schonberg <schonberg@adacore.com>
1656 * sem_res.adb (Resolve_Generalized_Indexing): In ASIS mode, when
1657 restoring original node, remove Generalized_Indexing operation
1658 so that it is recreated during re- analysis.
1660 2015-10-26 Javier Miranda <miranda@adacore.com>
1662 * exp_unst.adb: (Unnest_Subprogram):
1663 Replace absolute references to 1 and 0 by their counterpart
1664 relative references through Subps_First.
1666 2015-10-26 Ed Schonberg <schonberg@adacore.com>
1668 * par-ch3.adb (P_Declarative_Items): In case of misplaced
1669 aspect specifications, ensure that flag Done is properly set to
1671 * sem_prag.adb, sem_prag.ads: Remove Build_Generic_Class_Condition,
1674 2015-10-26 Emmanuel Briot <briot@adacore.com>
1676 * s-os_lib.adb (Argument_String_To_List): Remove backslashes in
1679 2015-10-26 Javier Miranda <miranda@adacore.com>
1681 * exp_unst.ads, exp_unst.adb (Is_Uplevel_Referenced): Removed.
1683 2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
1685 * exp_util.adb, sem_aux.adb, exp_attr.adb, sem_eval.adb: Minor
1687 * sem_util.adb, sem_ch5.adb: Minor reformatting.
1689 2015-10-26 Ed Schonberg <schonberg@adacore.com>
1691 * exp_unst.adb (Unnest_Subprogram): Add guard to prevent compiler
1692 abort when handling a reference to a formal in an aspect of a
1693 nested subprogram declaration as an uplevel reference.
1695 2015-10-26 Bob Duff <duff@adacore.com>
1697 * snames.ads-tmpl, aspects.adb, aspects.ads: Add the aspect and
1698 pragma names and enter into relevant tables.
1699 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze aspect
1701 * sem_prag.adb (Predicate_Failure): Analyze pragma Predicate_Failure.
1702 * exp_util.adb (Make_Predicate_Check): When building the Check
1703 pragma, if Predicate_Failure has been specified, add the relevant
1704 String argument to the pragma.
1705 * par-prag.adb (Prag): Add Predicate_Failure to list of pragmas
1706 handled during semantic analysis.
1708 2015-10-26 Ed Schonberg <schonberg@adacore.com>
1710 * sem_ch5.adb (Analyze_Assignment): If the left-hand side
1711 is an indexed component with generalized indexing, discard
1712 interpretation that yields a reference type, which is not
1713 assignable. This prevent spurious ambiguities when the right-hand
1714 side is an aggregate which does not provide a target type.
1716 2015-10-26 Bob Duff <duff@adacore.com>
1718 * exp_ch7.adb, exp_ch6.adb: Minor comment fix.
1720 2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
1722 * aspects.adb (Move_Or_Merge_Aspects): Move all aspects related
1723 to a single concurrent type declaration to the declaration
1724 of the anonymous object if they qualify.
1725 (Relocate_Aspect): Update comment on usage.
1726 * aspects.ads Add new sectioon on aspect specifications on single
1727 concurrent types. Add new table Aspect_On_Anonymous_Object_OK.
1728 (Move_Or_Merge_Aspects): Udate the comment on usage.
1729 * atree.adb (Elist36): New routine.
1730 (Set_Elist36): New routine.
1731 * atree.ads (Elist36): New routine along with pragma Inline.
1732 (Set_Elist36): New routine along with pragma Inline.
1733 * atree.h: Elist36 is now an alias for Field36.
1734 * contracts.adb (Add_Contract_Item): Add processing
1735 for protected units and extra processing for variables.
1736 (Analyze_Object_Contract): Code cleanup. The processing of
1737 Part_Of now depends on wherer the object is a constant or
1738 a variable. Add processing for pragmas Depends and Global
1739 when they apply to a single concurrent object. Verify that a
1740 variable which is part of a single concurrent type has full
1741 default initialization. Set/restore the SPARK_Mode of a single
1743 (Analyze_Protected_Contract): New routine.
1744 * contracts.ads (Add_Contract_Item): Update the comment on usage.
1745 (Analyze_Object_Contract): Update the comment on usage.
1746 (Analyze_Protected_Contract): New routine.
1747 (Analyze_Task_Contract): Update the comment on usage.
1748 * einfo.adb Part_Of_Constituents now uses Elist10.
1749 (Anonymous_Object): New routine.
1750 (Contract): Code cleanup.
1751 (Has_Option): Remove the assumption that the only simple
1753 (Is_Synchronized_State): New routine.
1754 (Part_Of_Constituents): This attribute applies to
1755 variables and uses Elist10.
1756 (Set_Anonymous_Object): New routine.
1757 (Set_Contract): Code cleanup.
1758 (Set_Part_Of_Constituents): This attribute applies to variables and
1760 (Set_SPARK_Aux_Pragma): Code cleanup.
1761 (Set_SPARK_Aux_Pragma_Inherited): Code cleanup.
1762 (Set_SPARK_Pragma): Code cleanup. This attribute applies to
1764 (Set_SPARK_Pragma_Inherited): Code cleanup. This
1765 attribute applies to variables.
1766 (SPARK_Aux_Pragma): Code cleanup.
1767 (SPARK_Aux_Pragma_Inherited): Code cleanup.
1768 (SPARK_Pragma): Code cleanup. This attribute applies to variables.
1769 (SPARK_Pragma_Inherited): Code cleanup. This attribute applies
1771 (Write_Field9_Name): Remove the output for Part_Of_Constituents.
1772 (Write_Field10_Name): Add output for Part_Of_Constituents.
1773 (Write_Field30_Name): Add output for Anonymous_Object.
1774 (Write_Field34_Name): Output SPARK_Pragma
1775 for protected types and variables.
1776 * einfo.ads: New attributes Anonymous_Object and
1777 Is_Synchronized_State along with usage in entities. Update
1778 the documentation of attributes Contract Encapsulating_State
1779 Part_Of_Constituents SPARK_Aux_Pragma SPARK_Aux_Pragma_Inherited
1780 SPARK_Pragma SPARK_Pragma_Inherited (Anonymous_Object): New
1781 routine along with pragma Inline.
1782 (Is_Synchronized_State): New routine.
1783 (Set_Anonymous_Object): New routine along with pragma Inline.
1784 * freeze.adb (Freeze_Record_Type): Ensure that a non-synchronized
1785 record does not have synchronized components.
1786 * sem_ch3.adb (Analyze_Declarations): Code cleanup. Analyze the
1787 contract of protected units.
1788 * sem_ch9.adb Add with and use clauses for Sem_Prag. Code cleanup.
1789 (Analyze_Single_Protected_Declaration): Reimplemented.
1790 (Analyze_Single_Task_Declaration): Reimplemented.
1791 * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect Part_Of
1792 can now apply to a single concurrent type declaration. Rely on
1793 Insert_Pragma to place the pragma. Update the error message on
1794 usage to reflect the new context.
1795 (Insert_Pragma): When inserting
1796 pragmas for a protected or task type, create a definition if
1798 * sem_elab.adb (Check_A_Call): Code cleanup. Issue error message
1799 related to elaboration issues for SPARK when SPARK_Mode is "on"
1800 and the offending entity comes from source.
1801 * sem_prag.adb (Analyze_Abstract_State): Add new flag
1802 Synchronous_Seen. Update the analysis of simple options Externa,
1803 Ghost and Synchronous. Update various error messages to reflect
1804 the use of single concurrent types.
1805 (Analyze_Depends_Global): Pragmas Depends and Global can now apply to
1806 a single task type or a single concurrent object created for a task
1808 (Analyze_Depends_In_Decl_Part): Do not push a scope when the
1809 context is a single concurrent object. (Analyze_Part_Of):
1810 Moved out of Analyze_Pragma. The routine has a new profile
1811 and comment on usage.
1812 (Analyze_Part_Of_In_Decl_Part): New routine.
1813 (Analyze_Part_Of_Option): Update the call to Analyze_Part_Of.
1814 (Analyze_Pragma): Pragma Abstract_State can
1815 now carry simple option Synchronous. Pragma Part_Of can now
1816 apply to a single concurrent type declaration. The analysis
1817 of pragma Part_Of is delayed when the context is a single
1819 (Analyze_Refined_Depends_In_Decl_Part): Use the anonymous object when
1820 the context is a single concurren type.
1821 (Analyze_Refined_Global_In_Decl_Part): Use the
1822 anonymous object when the context is a single concurren type.
1823 (Check_Ghost_Constituent): Removed.
1824 (Check_Matching_Constituent): Renamed to Match_Constituent.
1825 (Check_Matching_State): Renamed to Match_State.
1826 (Collect_Constituent): Update the comment
1827 on usage. Verify various legality rules related to ghost and
1828 synchronized entities.
1829 (Find_Related_Declaration_Or_Body): A single task declaration is no
1830 longer a valid context for a pragma.
1831 (Fix_Msg): Moved to Sem_Util.
1832 (Process_Overloadable): Add processing for single task objects.
1833 (Process_Visible_Part): Add processing for single concurrent
1835 (Relocate_Pragmas_To_Anonymous_Object): New routine.
1836 * sem_prag.ads Add new table Pragma_On_Anonymous_Object_OK.
1837 (Analyze_Part_Of_In_Decl_Part): New routine.
1838 (Relocate_Pragmas_To_Anonymous_Object): New routine.
1839 * sem_util.adb (Defining_Entity): Code cleanup.
1840 (Fix_Msg): Moved from Sem_Prag and augmented to handle
1842 (Has_Full_Default_Initialization): New routine.
1843 (Is_Descendant_Of_Suspension_Object): Moved out of
1844 Is_Effectively_Volatile.
1845 (Is_Single_Concurrent_Object): New routine.
1846 (Is_Single_Concurrent_Type): New routine.
1847 (Is_Single_Concurrent_Type_Declaration): New routine.
1848 (Is_Synchronized_Object): New routine.
1849 (Yields_Synchronized_Object): New routine.
1850 * sem_util.ads (Fix_Msg): Moved form Sem_Prag. Update the
1852 (Has_Full_Default_Initialization): New routine.
1853 (Is_Single_Concurrent_Object): New routine.
1854 (Is_Single_Concurrent_Type): New routine.
1855 (Is_Single_Concurrent_Type_Declaration): New routine.
1856 (Is_Synchronized_Object): New routine.
1857 (Yields_Synchronized_Object): New routine.
1858 * snames.ads-tmpl: Add name Synchronous.
1860 2015-10-26 Jerome Lambourg <lambourg@adacore.com>
1862 * sysdep.c (__gnat_get_task_options): Refine the workaround for
1863 the VX_USR_TASK_OPTION bug in VxWorks 7, as we cannot check the
1864 value of VX_DEALLOC_TCB in RTP mode, the macro value not being
1865 defined in the headers.
1866 * g-arrspl.ads: Fix typo.
1868 2015-10-26 Jerome Lambourg <lambourg@adacore.com>
1870 * sysdep.c (__gnat_get_task_options): Workaround a VxWorks
1871 bug where VX_DEALLOC_TCB task option is forbidden when calling
1872 taskCreate but allowed in VX_USR_TASK_OPTIONS.
1874 2015-10-26 Javier Miranda <miranda@adacore.com>
1876 * exp_unst.ads, exp_unst.adb (Is_Uplevel_Referenced): New subprogram.
1878 2015-10-26 Ed Schonberg <schonberg@adacore.com>
1880 * sem_ch4.adb (Constant_Indexing_OK): New predicate, subsidiary
1881 of Try_Container_Indexing, that implements the name resolution
1882 rules given in RM 4.1.6 (13-15).
1884 2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
1886 * sem_ch3.adb, sem_util.adb: Minor reformatting.
1888 2015-10-26 Javier Miranda <miranda@adacore.com>
1890 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Return False when
1892 * sem_ch3.adb: Fix typos.
1894 2015-10-26 Bob Duff <duff@adacore.com>
1896 * sem_ch13.adb (Build_Predicate_Functions): Change the
1897 structure of the predicate functions to reflect the requirements
1899 (Add_Condition): New procedure to do the "and-then-ing" in Add_Call
1901 * einfo.ads (Static_Real_Or_String_Predicate): Change the
1902 documentation to reflect the new structure.
1903 * sem_eval.adb (Real_Or_String_Static_Predicate_Matches):
1904 Change the walking of the predicate expression to reflect the
1906 * exp_util.adb: Minor comment fix.
1908 2015-10-26 Bob Duff <duff@adacore.com>
1910 * s-rident.ads (No_Dynamic_Sized_Objects): New restriction name.
1911 * sem_util.ads, sem_util.adb (All_Composite_Constraints_Static):
1912 New function to check that all relevant constraints are static.
1913 * sem_aggr.adb (Resolve_Array_Aggregate): Call
1914 All_Composite_Constraints_Static on the bounds of named array
1916 * sem_ch3.adb (Analyze_Subtype_Declaration): Call
1917 All_Composite_Constraints_Static if the type is composite and
1918 the subtype is constrained.
1920 2015-10-26 Javier Miranda <miranda@adacore.com>
1922 * exp_ch6.adb (Expand_N_Subprogram_Declaration): Skip the frontend
1923 transformation of functions that return a constrained array into
1924 a procedure when they are unchecked_conversion instances.
1926 2015-10-26 Gary Dismukes <dismukes@adacore.com>
1928 * s-os_lib.ads: Minor reformatting/rewording.
1930 2015-10-26 Arnaud Charlet <charlet@adacore.com>
1932 * debug.adb: Introduce debug flag -gnatd.5.
1934 2015-10-26 Pascal Obry <obry@adacore.com>
1936 * s-os_lib.ads, s-os_lib.adb (Kill): New routine. This routine
1937 makes visible support for killing processes in expect.c.
1938 * expect.c (__gnat_kill): Removed from here.
1939 * adaint.c (__gnat_kill): Added here to be usable in the compiler
1941 * make.adb (Sigint_Intercepted): Use the Kill routine from
1944 2015-10-26 Arnaud Charlet <charlet@adacore.com>
1946 * einfo.ads, einfo.adb, exp_unst.adb (Needs_Typedef,
1947 Set_Needs_Typedef): Removed, no longer used.
1949 2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
1951 * einfo.adb (First_Component): Update the assertion to allow
1952 for concurrent types.
1953 (First_Component_Or_Discriminant): Update the assertion to allow for
1955 * einfo.ads: Update the documentation of attributes First_Component
1956 and First_Component_Or_Discriminant along with uses in entities.
1958 2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
1960 * sem_res.adb (Resolve_Actuals): An effectively
1961 volatile object may act as an actual when the corresponding
1962 formal is of a non-scalar effectively volatile type, not just
1963 a non-scalar volatile type.
1965 2015-10-26 Bob Duff <duff@adacore.com>
1967 * sinfo.ads, sem_util.ads: Update comments.
1969 2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
1971 * sem_prag.adb (Analyze_Refined_Depends_Global_Post): When dealing with
1972 protected entries or protected subprograms, use the enclosing protected
1973 type to ensure that the protected type declaration is declared
1974 in a package spec. Remove an obsolete attempt to ensure the
1975 aggregate for of pragma Refined_State as this routine is never
1976 called in that case.
1978 2015-10-26 Ed Schonberg <schonberg@adacore.com>
1980 * exp_ch5.adb (Expand_Iterator_Loop_Over_Container): For
1981 an element iterator loop, the element is a constant if the
1982 container object is a constant, even if the container type has
1983 a Variable_Indexing aspect.
1985 2015-10-26 Bob Duff <duff@adacore.com>
1987 * s-fileio.adb (Fopen_Mode): Use "r+" for Out_File/Stream_IO,
1988 so the file won't be truncated on 'fopen', as required by
1991 2015-10-26 Bob Duff <duff@adacore.com>
1993 * gnat1drv.adb, prj.adb, sem_ch6.adb, s-regpat.adb,
1994 sem_prag.adb: Fix typos.
1995 * einfo.ads, restrict.ads: Minor comment fixes.
1996 * err_vars.ads, sem_util.adb, errout.ads: Code clean up.
1998 2015-10-26 Ed Schonberg <schonberg@adacore.com>
2000 * sem_ch5.adb (Analyze_Assignment): Do not check that the
2001 Left-hand side is legal in an inlined body, check is done on
2002 the original template.
2004 2015-10-26 Ed Schonberg <schonberg@adacore.com>
2006 * exp_util.ads, exp_util.adb (Find_Primitive_Operations): New
2007 subprogram to retrieve by name the possibly overloaded set of
2008 primitive operations of a type.
2009 * sem_ch4.adb (Try_Container_Indexing): Use
2010 Find_Primitive_Operations to handle overloaded indexing operations
2013 2015-10-26 Arnaud Charlet <charlet@adacore.com>
2015 * osint-c.ads: Minor comment update.
2017 2015-10-26 Arnaud Charlet <charlet@adacore.com>
2019 * s-osinte-hpux.ads, s-osinte-aix.ads, s-osinte-solaris-posix.ads,
2020 s-osinte-darwin.ads, s-osinte-android.ads, s-osinte-freebsd.ads,
2021 s-taprop-posix.adb (Get_Page_Size): C function returns an int. Adjust
2022 callers accordingly.
2024 2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
2026 * exp_ch4.adb (Is_OK_Object_Reference): New routine.
2027 (Substitute_Valid_Check): Perform the 'Valid subsitution but do
2028 not suggest the use of the attribute if the left hand operand
2029 does not denote an object as it leads to illegal code.
2031 2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
2033 * exp_unst.adb: Minor reformatting.
2035 2015-10-26 Ed Schonberg <schonberg@adacore.com>
2037 * sem_ch6.adb: Improve error msg.
2039 2015-10-26 Ed Schonberg <schonberg@adacore.com>
2041 * sem_disp.adb (Check_Controlling_Type): Handle properly the
2042 case of an incomplete type whose full view is tagged, when a
2043 primitive operation of the type is declared between the two views.
2045 2015-10-26 Bob Duff <duff@adacore.com>
2047 * adaint.c (__gnat_locate_exec_on_path): If the PATH environment
2048 variable is not set, do not return NULL, because we can still find
2049 the executable if it includes a directory name.
2051 2015-10-26 Ed Schonberg <schonberg@adacore.com>
2053 * sem_elab.adb (Elab_Warning): Under dynamic elaboration, when
2054 elaboration warnings are enabled, emit proper warning header
2055 when triggered by an access attribute.
2057 2015-10-26 Steve Baird <baird@adacore.com>
2059 * exp_ch11.adb: If CodePeer_Mode is true, generate simplified
2060 SCIL for exception declarations.
2061 * exp_ch11.adb (Expand_N_Exception_Declaration) If CodePeer_Mode
2062 is True, initialize the Full_Name component of the exception
2063 record to null instead of to the result of an unchecked
2066 2015-10-26 Ed Schonberg <schonberg@adacore.com>
2068 * exp_unst.adb (Note_Uplevel_Ref) : Handle properly a reference
2069 that denotes a function returning a constrained array, that has
2070 been rewritten as a procedure.
2071 * makeutl.ads: Minor edit.
2073 2015-10-26 Yannick Moy <moy@adacore.com>
2075 * lib-xref-spark_specific.adb (Traverse_Protected_Declaration): New
2076 procedure for traversal.
2077 (Add_SPARK_Xrefs): Remove debugging code.
2078 (Traverse_Declaration_Or_Statement): Call the new traversal
2081 2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
2083 * sem_prag.adb (Analyze_Pragma): Pragma
2084 Extensions_Visible can now appear on an abstract subprogram
2087 2015-10-26 Yannick Moy <moy@adacore.com>
2089 * lib-xref-spark_specific.adb (Add_SPARK_Xrefs): Use character 'r' to
2090 denote a reference to a constant which may have variable input, and
2091 thus may be treated as a variable in GNATprove, instead of the
2092 character 'c' used for constants.
2094 2015-10-26 Ed Schonberg <schonberg@adacore.com>
2096 * sem_util.adb (Object_Access_Level): Only aliased formals of
2097 functions have the accessibility level of the point of call;
2098 aliased formals of procedures have the same level as unaliased
2100 (New_Copy_Tree): Add guard on copying itypes. From code reading.
2102 2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
2104 * inline.adb: Minor reformatting.
2106 2015-10-26 Yannick Moy <moy@adacore.com>
2108 * get_spark_xrefs.adb (get_SPARK_Xrefs): Remove obsolete
2110 * lib-xref-spark_specific.adb (Traverse_Declaration_Or_Statement):
2111 New procedure to factor duplicated code and add
2112 treatment of protected entries.
2113 (Add_SPARK_Scope, Traverse_Declarations_Or_Statements): Call the new
2114 procedure Traverse_Declaration_Or_Statement. Use same character used in
2115 normal xrefs for SPARK xrefs, for a given entity used as scope.
2116 * spark_xrefs.ads Document character used for entries.
2117 * sem_prag.adb (Check_Loop_Pragma_Placement): Account for possible
2118 introduction of declarations and statements by the expansion, between
2119 two otherwise consecutive loop pragmas.
2120 * sem_util.ads, sem_util.adb (Is_Suspension_Object): Lifted from nested
2122 (Is_Descendant_Of_Suspension_Object): nested function lifted.
2124 2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
2126 * sem_attr.adb (Eval_Attribute): Attribute 'Enum_Rep can be folded
2127 when its prefix denotes a constant, an enumeration literal or
2128 an enumeration type. Use the expression of the attribute in the
2129 enumeration type form, otherwise use the prefix to fold.
2131 2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
2133 * aspects.adb Add an entry for entry bodies in table
2134 Has_Aspect_Specifications_Flag.
2135 (Aspects_On_Body_Or_Stub_OK): Entry bodies now allow for certain
2137 * contracts.adb (Add_Contract_Items): Code cleanup. Add
2138 processing for entry bodies, entry declarations and task units.
2139 (Analyze_Subprogram_Body_Contract): Renamed
2140 to Analyze_Entry_Or_Subprogram_Body_Contract. Do not
2141 analyze the contract of an entry body unless annotating the
2143 (Analyze_Subprogram_Contract): Renamed to
2144 Analyze_Entry_Or_Subprogram_Contract. Do not analyze the contract
2145 of an entry declaration unless annotating the original tree.
2146 (Analyze_Task_Contract): New routine.
2147 * contracts.ads (Add_Contract_Item): Update the comment on usage.
2148 (Analyze_Package_Body_Contract): Update comment on usage.
2149 (Analyze_Package_Contract): Update the comment on usage.
2150 (Analyze_Subprogram_Body_Contract): Renamed to
2151 Analyze_Entry_Or_Subprogram_Body_Contract.
2152 (Analyze_Subprogram_Body_Stub_Contract): Update the comment on usage.
2153 (Analyze_Subprogram_Contract): Renamed to
2154 Analyze_Entry_Or_Subprogram_Contract.
2155 (Analyze_Task_Contract): New routine.
2156 * einfo.adb (Contract): Restructure the assertion to include
2157 entries and task units.
2158 (SPARK_Pragma): This attribute now applies to operators.
2159 (SPARK_Pragma_Inherited): This flag now applies to operators.
2160 (Set_Contract): Restructure the assertion to include entries and task
2162 (Set_SPARK_Pragma): This attribute now applies to operators.
2163 (Set_SPARK_Pragma_Inherited): This flag now applies to operators.
2164 (Write_Field34_Name): Write out all Ekinds that have a contract.
2165 (Write_Field40_Name): SPARK_Pragma now applies to operators.
2166 * einfo.ads: Update the documentation of attribute Contract along
2167 with usage in nodes. Update the documentation of attributes
2168 SPARK_Pragma and SPARK_Pragma_Inherited.
2169 * exp_ch6.adb (Freeze_Subprogram): Update the call to
2170 Analyze_Subprogram_Contract.
2171 * par-ch9.adb (P_Entry_Barrier): Do not parse keyword "is" as it
2172 is not part of the entry barrier production.
2173 (P_Entry_Body): Parse the optional aspect specifications. Diagnose
2175 * sem_attr.adb (Analyze_Attribute_Old_Result): Update the call
2176 to Find_Related_Subprogram_Or_Body.
2177 * sem_aux.adb (Unit_Declaration_Node) Add an entry for entry
2178 declarations and bodies.
2179 * sem_ch3.adb (Analyze_Declarations): Analyze the contracts of
2180 entry declarations, entry bodies and task units.
2181 * sem_ch6.adb (Analyze_Generic_Subprogram_Body):
2182 Update the call to Analyze_Subprogram_Body_Contract.
2183 (Analyze_Subprogram_Body_Helper): Update the call to
2184 Analyze_Subprogram_Body_Contract.
2185 * sem_ch9.adb (Analyze_Entry_Body): Analyze the aspect
2186 specifications and the contract.
2187 * sem_ch10.adb (Analyze_Compilation_Unit): Update the call to
2188 Analyze_Subprogram_Contract.
2189 * sem_ch12.adb (Save_References_In_Pragma): Update the call to
2190 Find_Related_Subprogram_Or_Body.
2191 * sem_ch13.adb (Analyze_Aspects_On_Body_Or_Stub): Use
2192 Unique_Defining_Entity rather than rummaging around in nodes.
2193 (Diagnose_Misplaced_Aspects): Update comment on usage. Update the
2194 error messages to accomondate the increasing number of contexts.
2195 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
2196 Update the call to Find_Related_Subprogram_Or_Body.
2197 (Analyze_Depends_Global): Update the call to
2198 Find_Related_Subprogram_Or_Body. Add processing for entry
2200 (Analyze_Depends_In_Decl_Part): Update the call
2201 to Find_Related_Subprogram_Or_Body. Task units have no formal
2202 parameters to install. (Analyze_Global_In_Decl_Part): Update
2203 the call to Find_Related_Subprogram_Or_Body. Task units have no
2204 formal parameters to install.
2205 (Analyze_Global_Item): Use Fix_Msg to handle the increasing number of
2207 (Analyze_Pragma): Update the call to Find_Related_Subprogram_Or_Body.
2208 Perform full analysis when various pragmas appear in an entry body.
2209 (Analyze_Pre_Post_Condition): Update the call to
2210 Find_Related_Subprogram_Or_Body. Perform full analysis when the pragma
2211 appears in an entry body.
2212 (Analyze_Pre_Post_Condition_In_Decl_Part): Update the call to
2213 Find_Related_Subprogram_Or_Body.
2214 (Analyze_Refined_Depends_Global_Post): Update
2215 the call to Find_Related_Subprogram_Or_Body. Use
2216 Fix_Msg to handle the increasing number of contexts.
2217 (Analyze_Refined_Depends_In_Decl_Part): Update
2218 the call to Find_Related_Subprogram_Or_Body. Use
2219 Unique_Defining_Entity to obtain the entity of the
2220 spec. Use Fix_Msg to handle the increasing number of contexts.
2221 (Analyze_Refined_Global_In_Decl_Part): Update the call to
2222 Find_Related_Subprogram_Or_Body. Use Unique_Defining_Entity to obtain
2223 the entity of the spec. Use Fix_Msg to handle the increasing number of
2225 (Analyze_Test_Case_In_Decl_Part): Update the call to
2226 Find_Related_Subprogram_Or_Body.
2227 (Check_Dependency_Clause): Use Fix_Msg to handle the increasing number
2229 (Check_Mode_Restriction_In_Enclosing_Context): Use
2230 Fix_Msg to handle the increasing number of contexts.
2231 (Collect_Subprogram_Inputs_Outputs): Use the refined
2232 versions of the pragmas when the context is an entry body or
2234 (Find_Related_Subprogram_Or_Body): Renamed to
2235 Find_Related_Declaration_Or_Body. Add processing for entries
2237 (Fix_Msg): New routine.
2238 (Role_Error): Use Fix_Msg to handle the increasing number of contexts.
2239 * sem_prag.ads (Find_Related_Subprogram_Or_Body): Renamed to
2240 Find_Related_Declaration_Or_Body. Update the comment on usage.
2241 * sem_util.adb (Is_Entry_Body): New routine.
2242 (Is_Entry_Declaration): New routine.
2243 * sem_util.ads (Is_Entry_Body): New routine.
2244 (Is_Entry_Declaration): New routine.
2246 2015-10-26 Ed Schonberg <schonberg@adacore.com>
2248 * inline.adb (Has_Excluded_Declaration): A subtype declaration
2249 with a predicate aspect generates a subprogram, and therefore
2250 prevents the inlining of the enclosing subprogram.
2251 * osint.ads: Fix typo.
2254 2015-10-26 Ed Schonberg <schonberg@adacore.com>
2256 * sem_case.adb (Check_Choice_Set): Choose initial choice range
2257 below low bound of type, to prevent spurious errors on case
2258 statements whose expressions have an integer subtype with a
2260 * sem_util.ads: Fix typo.
2262 2015-10-26 Ed Schonberg <schonberg@adacore.com>
2264 * exp_ch4.adb (Expand_N_Case_Expression): In the scope of a
2265 predicate function, delay the expansion of the expression only
2266 if the target type has a specified Static_ Predicate aspect,
2267 because the expression is processed later. A dynamic predicate
2268 must be expanded in standard fashion.
2270 2015-10-26 Claire Dross <dross@adacore.com>
2272 * a-nudira.ads: Remove SPARK_Mode as it currently causes an error.
2274 2015-10-26 Arnaud Charlet <charlet@adacore.com>
2276 * sem_aggr.adb, sem_type.adb, sem_ch12.adb, sem_res.adb, sem_ch4.adb,
2277 sem_ch8.adb, exp_aggr.adb, sem_eval.adb, s-fatgen.adb, a-tienio.adb:
2280 2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
2282 * sem_ch13.adb (Analyze_Aspect_Specifications): The processing
2283 for aspects Abstract_State, Ghost, Initial_Condition, Initializes
2284 and Refined_State no longer have to take SPARK_Mode into account.
2285 (Insert_After_SPARK_Mode): Removed.
2286 (Insert_Pragma): Update profile and comment on usage. The routine can
2287 now insert a pragma after the "header" of an instance.
2288 * sem_prag.adb (Analyze_If_Available): New routine.
2289 (Analyze_Pragma): Do not reset the Analyzed flag of various
2290 SPARK pragmas as they use the Is_Analyzed_Pragma attribute to
2291 avoid reanalysis. Various pragmas now trigger the analysis
2292 of related pragmas that depend on or are dependent on the
2293 current pragma. Remove the declaration order checks related
2294 to pragmas Abstract_State, Initial_Condition and Initializes.
2295 (Analyze_Pre_Post_Condition): Analyze pragmas SPARK_Mode and
2296 Volatile_Function prior to analyzing the pre/postcondition.
2297 (Check_Declaration_Order): Removed.
2298 (Check_Distinct_Name): Ensure that a potentially duplicated pragma
2299 Test_Case is not the pragma being analyzed.
2300 (Is_Followed_By_Pragma): Removed.
2302 2015-10-26 Ed Schonberg <schonberg@adacore.com>
2304 * sem_ch6.adb: Handle subprogram bodies without previous specs.
2306 2015-10-26 Claire Dross <dross@adacore.com>
2308 * a-nudira.ads: Specify appropriate SPARK_Mode so that the unit
2309 can be used in SPARK code.
2311 2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
2313 * contracts.adb (Analyze_Subprogram_Body_Contract): Do not analyze
2314 pragmas Refined_Global and Refined_Depends because these pragmas
2315 are now fully analyzed when encountered.
2316 (Inherit_Pragma): Update the call to attribute Is_Inherited.
2317 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Add a guard
2318 to prevent reanalysis. Mark the pragma as analyzed at the end of
2320 (Analyze_Depends_Global): New parameter profile
2321 and comment on usage. Do not fully analyze the pragma, this is
2322 now done at the outer level.
2323 (Analyze_Depends_In_Decl_Part): Add a guard to prevent reanalysis.
2324 Mark the pragma as analyzed at the end of the processing.
2325 (Analyze_External_Property_In_Decl_Part): Add a guard to prevent
2326 reanalysis. Mark the pragma as analyzed at the end of the processing.
2327 (Analyze_Global_In_Decl_Part): Add a guard to prevent reanalysis. Mark
2328 the pragma as analyzed at the end of the processing.
2329 (Analyze_Initial_Condition_In_Decl_Part): Add a guard to prevent
2330 reanalysis. Mark the pragma as analyzed at the end of the processing.
2331 (Analyze_Initializes_In_Decl_Part): Add a guard to prevent reanalysis.
2332 Mark the pragma as analyzed at the end of the processing.
2333 (Analyze_Pragma): Reset the Analyzed flag on various pragmas that
2334 require delayed full analysis. Contract_Cases is now analyzed
2335 immediately when it applies to a subprogram body stub. Pragmas Depends,
2336 Global, Refined_Depends and Refined_Global are now analyzed
2337 in pairs when they appear in a subprogram body [stub].
2338 (Analyze_Pre_Post_Condition_In_Decl_Part): Add a guard to
2339 prevent reanalysis. Mark the pragma as analyzed at the end of
2341 (Analyze_Refined_Depends_Global_Post): Update the comment on usage.
2342 (Analyze_Refined_Depends_In_Decl_Part): Add a guard to prevent
2343 reanalysis. Mark the pragma as analyzed at the end of the processing.
2344 (Analyze_Refined_Global_In_Decl_Part): Add a guard to prevent
2345 reanalysis. Mark the pragma as analyzed at the end of the processing.
2346 (Analyze_Refined_State_In_Decl_Part): Add a guard to prevent
2347 reanalysis. Mark the pragma as analyzed at the end of the processing.
2348 (Analyze_Test_Case_In_Decl_Part): Add a guard to prevent reanalysis.
2349 Mark the pragma as analyzed at the end of the processing.
2350 (Is_Followed_By_Pragma): New routine.
2351 * sinfo.adb (Is_Analyzed_Pragma): New routine.
2352 (Is_Inherited): Renamed to Is_Inherited_Pragma.
2353 (Set_Is_Analyzed_Pragma): New routine.
2354 (Set_Is_Inherited): Renamed to Set_Is_Inherited_Pragma.
2355 * sinfo.ads Rename attribute Is_Inherited to Is_Inherited_Pragma
2356 and update occurrences in nodes.
2357 (Is_Analyzed_Pragma): New routine along with pragma Inline.
2358 (Is_Inherited): Renamed to Is_Inherited_Pragma along with pragma Inline.
2359 (Set_Is_Analyzed_Pragma): New routine along with pragma Inline.
2360 (Set_Is_Inherited): Renamed to Set_Is_Inherited_Pragma along
2363 2015-10-26 Ed Schonberg <schonberg@adacore.com>
2365 * par-ch3.adb (P_Component_Items): When style checks are enabled,
2366 apply them to component declarations in a record type declaration
2369 2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
2371 * sem_util.adb (Is_Suspension_Object): Ensure that the scope of "Ada"
2372 is Standard_Standard.
2374 2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
2376 * sem_res.adb (Is_OK_Volatile_Context): A subprogram call is an OK
2377 context for a reference to an effectively volatile object.
2378 (Resolve_Actuals): Add references to SPARK RM.
2379 (Within_Procedure_Call): Removed.
2380 (Within_Subprogram_Call): New routine.
2382 2015-10-26 Ed Schonberg <schonberg@adacore.com>
2384 * sem_ch6.adb (Check_Aggregate_Accessibility): A reference to a
2385 formal parameter in an aggregate does not need an accesibility
2386 check only if the formal is aliased.
2388 2015-10-26 Claire Dross <dross@adacore.com>
2390 * sem_aux.ads (Number_Components): Can return 0 when called on
2393 2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
2395 * contracts.adb (Analyze_Subprogram_Body_Contract): Use
2396 Unique_Defining_Entity instead of Corresponding_Spec_Of.
2397 * einfo.adb SPARK_Pragma and SPARK_Aux_Pragma are now Node40 and
2398 Node41 respectively.
2399 (SPARK_Aux_Pragma): Update the assertion and node querry.
2400 (SPARK_Aux_Pragma_Inherited): Update the assertion and node query.
2401 (SPARK_Pragma): Update the assertion and node query.
2402 (SPARK_Pragma_Inherited): Update the assertion and node query.
2403 (Set_SPARK_Aux_Pragma): Update the assertion and node setting.
2404 (Set_SPARK_Aux_Pragma_Inherited): Update the assertion and node setting.
2405 (Set_SPARK_Pragma): Update the assertion and node setting.
2406 (Set_SPARK_Pragma_Inherited): Update the assertion and node setting.
2407 (Write_Field32_Name): Remove the output for SPARK_Pragma.
2408 (Write_Field33_Name): Remove the output for SPARK_Aux_Pragma.
2409 (Write_Field40_Name): Add output for SPARK_Pragma.
2410 (Write_Field41_Name): Add output for SPARK_Aux_Pragma.
2411 * einfo.ads Rewrite the documentation on attributes
2412 SPARK_Pragma, SPARK_Aux_Pragma, SPARK_Pragma_Inherited and
2413 SPARK_Aux_Pragma_Inherited. Update their uses in nodes.
2414 * exp_ch4.adb (Create_Anonymous_Master): Use
2415 Unique_Defining_Entity instead of Corresponding_Spec_Of.
2416 * exp_ch9.adb (Expand_Entry_Declaration): Mark the barrier
2418 (Expand_N_Task_Body): Mark the task body as such.
2419 (Expand_N_Task_Type_Declaration): Mark the task body as such.
2420 * exp_unst.adb (Visit_Node): Use Unique_Defining_Entity instead
2421 of Corresponding_Spec_Of.
2422 * sem_attr.adb (Analyze_Attribute_Old_Result): Use
2423 Unique_Defining_Entity instead of Corresponding_Spec_Of.
2424 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Entry barrier
2425 functions do not inherit the SPARK_Mode from the context.
2426 (Build_Subprogram_Declaration): The matching spec is now marked
2427 as a source construct to mimic the original stand alone body.
2428 * sem_ch7.adb (Analyze_Package_Body_Helper): Code cleanup.
2429 * sem_ch9.adb Add with and use clauses for Contracts.
2430 (Analyze_Entry_Body): An entry body freezes the contract of
2431 the nearest enclosing package body. The entry body now inherits
2432 the SPARK_Mode from the context.
2433 (Analyze_Entry_Declaration): A protected entry declaration now inherits
2434 the SPARK_Mode from the context.
2435 (Analyze_Protected_Body): A protected body freezes
2436 the contract of the nearest enclosing package body. Set the
2437 Etype of a protected body as this is neede for proper aspect
2438 analysis. Protected bodies can now carry meaningful aspects and
2439 those are now analyzed.
2440 (Analyze_Protected_Type_Declaration): A protected type now inherits the
2441 SPARK_Mode from the context.
2442 (Analyze_Task_Body): A task body freezes the contract of the
2443 nearest enclosing package body. Set the Etype of a task body
2444 as this is needed for proper aspect analysis. A task body
2445 now inherits the SPARK_Mode from the context. Task bodies
2446 can now carry meaningful aspects and those are now analyzed.
2447 (Analyze_Task_Type_Declaration): A task type declaration now
2448 inherits the SPARK_Mode of from the context.
2449 * sem_ch10.adb (Analyze_Protected_Body_Stub): Protected body
2450 stubs can now carry meaningful aspects.
2451 (Analyze_Task_Body_Stub): Task body stubs can now carry meaningful
2453 * sem_ch13.adb (Analyze_Aspect_Specifications): Aspects SPARK_Mode
2454 Warnings now use routine Insert_Pragma as means of insertion into
2456 (Insert_After_SPARK_Mode): Clean up documentation.
2457 (Insert_Pragma): Clean up documentation. The routine is now
2458 capable of operating on synchronized units.
2459 * sem_prag.adb (Add_Entity_To_Name_Buffer): New routine.
2460 (Analyze_Contract_Cases_In_Decl_Part): Use
2461 Unique_Defining_Entity instead of Corresponding_Spec_Of.
2462 (Analyze_Depends_Global): Use Unique_Defining_Entity instead
2463 of Corresponding_Spec_Of.
2464 (Analyze_Depends_In_Decl_Part): Use Unique_Defining_Entity instead of
2465 Corresponding_Spec_Of.
2466 (Analyze_Global_In_Decl_Part): Use Unique_Defining_Entity instead of
2467 Corresponding_Spec_Of.
2468 (Analyze_Pragma): Use Unique_Defining_Entity instead of
2469 Corresponding_Spec_Of.
2470 Update the detection of an illegal pragma Ghost when it applies
2471 to a task or protected unit. Reimplement the handling of
2473 (Analyze_Pre_Post_Condition_In_Decl_Part): Use Unique_Defining_Entity
2474 instead of Corresponding_Spec_Of.
2475 (Analyze_Test_Case_In_Decl_Part): Use Unique_Defining_Entity instead of
2476 Corresponding_Spec_Of.
2477 (Check_Library_Level_Entity): Update the comment on usage.
2478 Reimplemented to offer a more specialized errror context.
2479 (Check_Pragma_Conformance): Update profile and comment on usage.
2480 Handle error message output on single protected or task units.
2481 (Collect_Subprogram_Inputs_Outputs): Use Unique_Defining_Entity
2482 instead of Corresponding_Spec_Of.
2483 (Process_Body): New routine.
2484 (Process_Overloadable): New routine.
2485 (Process_Private_Part): New routine.
2486 (Process_Statement_Part): New routine.
2487 (Process_Visible_Part): New routine.
2488 (Set_SPARK_Context): New routine.
2489 (Set_SPARK_Flags): Removed.
2490 * sem_util.adb (Corresponding_Spec_Of): Removed.
2491 (Unique_Entity): Reimplemented to handle many more cases.
2492 * sem_util.ads (Corresponding_Spec_Of): Removed.
2493 (Unique_Defining_Entity): Update the comment on usage.
2494 * sinfo.ads (Is_Entry_Barrier_Function): Update the assertion.
2495 (Is_Task_Body_Procedure): New routine.
2496 (Set_Is_Entry_Barrier_Function): Update the assertion.
2497 (Set_Is_Task_Body_Procedure): New routine.
2498 * sinfo.adb Update the documentation of attribute
2499 Is_Entry_Barrier_Function along with use in nodes. Add new
2500 attribute Is_Task_Body_Procedure along with use in nodes.
2501 (Is_Task_Body_Procedure): New routine along with pragma Inline.
2502 (Set_Is_Task_Body_Procedure): New routine along with pragma Inline.
2504 2015-10-26 Gary Dismukes <dismukes@adacore.com>
2506 * sem_ch13.adb: Minor reformatting.
2508 2015-10-26 Steve Baird <baird@adacore.com>
2510 * exp_disp.adb: Omit most dispatch table initialization code
2511 if Generate_SCIL is true.
2513 2015-10-26 Arnaud Charlet <charlet@adacore.com>
2515 * sinfo.ads, exp_ch3.adb: Revert previous change.
2516 (Build_Record_Init_Proc): Do not build an aggregate if
2519 2015-10-26 Ed Schonberg <schonberg@adacore.com>
2521 * sem_ch6.adb (Find_Corresponding_Spec): Reject a subprogram
2522 body whose signature is type conformant with a previous expression
2525 2015-10-26 Bob Duff <duff@adacore.com>
2527 * treepr.adb: Code clean up.
2529 2015-10-26 Eric Botcazou <ebotcazou@adacore.com>
2531 * freeze.adb (Check_Component_Storage_Order): Skip a record
2532 component if it has Complex_Representation.
2533 (Freeze_Record_Type): If the type has Complex_Representation, skip the
2534 regular treatment of Scalar_Storage_Order attribute and instead issue
2535 a warning if it is present.
2537 2015-10-26 Bob Duff <duff@adacore.com>
2539 * sem_ch13.adb (Check_Iterator_Functions): For a Default_Iterator
2540 aspect, make sure an implicitly declared interpretation is
2541 overridden by an explicit one.
2542 * sem_util.ads: Update comment.
2544 2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
2546 * sem_ch7.adb, sem_ch6.adb (Analyze_Subprogram_Body_Helper): Only source
2547 bodies should "freeze" the contract of the nearest enclosing
2550 2015-10-26 Joel Brobecker <brobecker@adacore.com brobecker>
2552 * adaint.c (__gnat_lwp_self): Replace current implementation re-using
2553 the Linux one, which uses an __NR_gettid syscall rather than
2556 2015-10-26 Arnaud Charlet <charlet@adacore.com>
2558 * sinfo.ads, exp_ch3.adb (Build_Array_Init_Proc,
2559 Build_Record_Init_Proc): Do not inline init procs when
2560 Modify_Tree_For_C is True.
2562 2015-10-26 Bob Duff <duff@adacore.com>
2564 * errout.ads: Minor comment fix.
2565 * einfo.ads: Minor style fix.
2567 2015-10-26 Bob Duff <duff@adacore.com>
2569 * sem_ch3.adb (Derive_Interface_Subprogram): Fix
2570 Is_Abstract_Subprogram, which might have been calculated
2571 incorrectly, because we're passing Ultimate_Alias (Subp) (and
2572 its dispatching type) to Derive_Subprogram, instead of the true
2573 parent subprogram and type.
2575 2015-10-26 Bob Duff <duff@adacore.com>
2577 * sem_ch13.adb (Check_Iterator_Functions): When
2578 printing the "default iterator must be unique" error message,
2579 also print references to the places where the duplicates are
2580 declared. This makes the message clearer.
2582 2015-10-26 Ed Schonberg <schonberg@adacore.com>
2584 * sem_ch12.adb (Analyze_Formal_Package_Declaration): Do not set
2585 Box_Present when the formal part is (others => <>) even though
2586 it is equivalent to a formal part (<>), because ASIS tools depend
2587 on the syntactic setting of this flag.
2589 2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
2591 * sem_ch13.adb: Minor reformatting.
2592 * einfo.ads: Minor typo.
2594 2015-10-26 Joel Brobecker <brobecker@adacore.com brobecker>
2596 * adaint.c (__gnat_open_new_temp): Use mkstemp on Android.
2598 2015-10-26 Ed Schonberg <schonberg@adacore.com>
2600 * sem_ch12.adb (Analyze_Formal_Package_Declaration): Code clean up.
2601 * sem_ch13.adb (Check_Inherited_Indexing): New inner procedure
2602 of Check_Indexing_Functions, to verify that a derived type with an
2603 Indexing aspect is not inheriting such an aspect from an ancestor.
2604 (Check_Indexing_Functions): Call Check_Inherited_Indexing within
2607 2015-10-26 Gary Dismukes <dismukes@adacore.com>
2609 * a-reatim.adb, contracts.adb, contracts.ads: Minor reformatting and
2612 2015-10-26 Ed Schonberg <schonberg@adacore.com>
2614 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Do not
2615 recheck the consistency betwen the freeze point and the end of
2616 declarations for the expression in an aspect specification,
2617 because it was done already in the analysis of the generic.
2618 Furthermore, the delayed analysis of an aspect of the instance
2619 may produce spurious errors when the generic is a child unit
2620 that references entities in the parent (which might not be in
2621 scope at the freeze point of the instance).
2623 2015-10-26 Yannick Moy <moy@adacore.com>
2625 * sem_res.adb (Resolve_Call): Issue info message
2626 instead of warning when call cannot be inlined in GNATprove mode.
2628 2015-10-26 Arnaud Charlet <charlet@adacore.com>
2630 * exp_ch6.adb (Build_Procedure_Form): Use _result as the
2631 name of the extra parameter, cleaner than a random temp name.
2632 * gnat1drv.adb (Gnat1drv): Code clean up.
2634 2015-10-24 Eric Botcazou <ebotcazou@adacore.com>
2636 * gcc-interface/utils2.c (build_binary_op): Tweak formatting.
2637 (build_unary_op): Likewise.
2639 2015-10-23 Arnaud Charlet <charlet@adacore.com>
2641 * gnat_rm.texi, gnat_ugn.texi: Regenerate.
2642 * doc/share/ada_pygments.py, doc/gnat_ugn/gnat_project_manager.rst,
2643 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
2644 doc/gnat_ugn/gnat_and_program_execution.rst,
2645 doc/gnat_rm/implementation_defined_attributes.rst,
2646 doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
2647 doc/gnat_rm/representation_clauses_and_pragmas.rst,
2648 doc/gnat_rm/implementation_defined_pragmas.rst,
2649 doc/gnat_rm/about_this_guide.rst,
2650 doc/gnat_rm/implementation_of_ada_2012_features.rst,
2651 doc/gnat_rm/implementation_of_specific_ada_features.rst,
2652 doc/gnat_rm/implementation_defined_aspects.rst,
2653 doc/gnat_rm/implementation_advice.rst: Update documentation.
2655 2015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
2657 * contracts.ads, contracts.adb: New unit.
2658 * exp_ch6.adb Add with and use clauses for Contracts.
2659 (Expand_Subprogram_Contract): Moved to Contracts.
2660 * exp_ch6.ads (Expand_Subprogram_Contract): Moved to Contracts.
2661 * sem_ch3.adb Add with and use clauses for Contracts.
2662 (Analyze_Object_Contract): Moved to Contracts.
2663 (Analyze_Declarations): Remove local variable Pack_Decl. Do not
2664 capture global references in contracts. Check the hidden states
2666 * sem_ch6.adb Add with and use clauses in Contracts.
2667 (Analyze_Generic_Subprogram_Body): Do not capture global
2668 references in contracts.
2669 (Analyze_Subprogram_Body_Contract):
2671 (Analyze_Subprogram_Body_Helper): Freeze the
2672 contract of the nearest enclosing package body. Always analyze
2673 the subprogram body contract. Do not expand the subprogram
2675 (Analyze_Subprogram_Contract): Moved to Contracts.
2676 * sem_ch6.ads (Analyze_Subprogram_Body_Contract): Moved to Contracts.
2677 (Analyze_Subprogram_Contract): Moved to Contracts.
2678 * sem_ch7.adb Add with and use clauses for Contracts.
2679 (Analyze_Package_Body_Contract): Moved to Contracts.
2680 (Analyze_Package_Body_Helper): Freeze the contract of the
2681 nearest enclosing package body.
2682 (Analyze_Package_Contract): Moved to Contracts.
2683 * sem_ch7.ads (Analyze_Package_Body_Contract): Moved to Contracts.
2684 (Analyze_Package_Contract): Moved to Contracts.
2685 * sem_ch10.adb Add with and use clauses for Contracts.
2686 (Analyze_Compilation_Unit): Do not capture global references
2688 (Analyze_Subprogram_Body_Stub_Contract): Moved to Contracts.
2689 * sem_ch10.ads (Analyze_Subprogram_Body_Stub_Contract): Moved
2691 * sem_ch12.adb Add with and use clauses for Contracts.
2692 (Analyze_Subprogram_Instantiation): Update the call to
2693 Instantiate_Subprogram_Contract.
2694 (Instantiate_Package_Body):
2695 Do not copy the entity of the spec when creating an entity
2696 for the body. Construct a brand new defining identifier for
2697 the body and inherit the Comes_From_Source flag from the spec.
2698 (Instantiate_Subprogram_Body): Remove Anon_Id to Act_Decl_Id
2699 and update all occurrences. Construct a brand new defining
2700 identifier for the body and inherit the Comes_From_Source
2702 (Instantiate_Subprogram_Contract): Moved
2704 (Save_Global_References_In_Aspects): Moved to
2705 the spec of Sem_Ch12.
2706 (Save_Global_References_In_Contract):
2708 * sem_ch12.ads (Save_Global_References_In_Aspects): Moved from
2709 the body of Sem_Ch12.
2710 (Save_Global_References_In_Contract):
2712 * sem_prag.adb Add with and use clauses for Contracts.
2713 (Add_Item): Removed. All references to this routine have been
2714 replaced with calls to Append_New_Elmt.
2715 (Analyze_Constituent):
2716 Add special diagnostics for errors caused by freezing of
2718 (Analyze_Refined_State_In_Decl_Part): Add formal
2719 parameter Freeze_Id. Add new global variable Freeze_Posted.
2720 (Collect_Body_States): Removed.
2721 (Report_Unused_States): Removed.
2722 * sem_prag.ads (Analyze_Defined_State_In_Decl_Part): Add formal
2723 parameter Freeze_Id and update comment on usage.
2724 * sem_util.adb Remove with and use clauses for
2726 (Add_Contract_Item): Moved to Contracts.
2727 (Check_Unused_Body_States): New routine.
2728 (Collect_Body_States):
2730 (Create_Generic_Contract): Moved to Contracts.
2731 (Inherit_Subprogram_Contract): Moved to Contracts.
2732 (Report_Unused_Body_States): New routine.
2733 * sem_util.ads (Add_Contract_Item): Moved to Contracts.
2734 (Check_Unused_Body_States): New routine.
2735 (Collect_Body_States): New routine.
2736 (Create_Generic_Contract): Moved to Contracts.
2737 (Inherit_Subprogram_Contract): Moved to Contracts.
2738 (Report_Unused_Body_States): New routine.
2739 * sinfo.adb (Is_Expanded_Contract): New routine.
2740 (Set_Is_Expanded_Contract): New routine.
2741 * sinfo.ads New attribute Is_Expanded_Contract along with
2743 (Is_Expanded_Contract): New routine along
2745 (Set_Is_Expanded_Contract): New routine
2746 along with pragma Inline.
2747 * gcc-interface/Make-lang.in: Add entry for contracts.o
2749 2015-10-23 Bob Duff <duff@adacore.com>
2751 * bindgen.adb, init.c, opt.ads, switch-b.adb: Implement new -Ea and
2753 * switch-b.ads: Minor comment fix.
2754 * bindusg.adb: Document new -Ea and -Es switches.
2755 * s-exctra.ads: Use -Es instead of -E.
2757 2015-10-23 Tristan Gingold <gingold@adacore.com>
2759 * gcc-interface/utils2.c (build_call_alloc_dealloc): Check no implicit
2760 task and protected object restrictions.
2762 2015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
2764 * sem_ch12.adb, exp_ch6.adb: Minor reformatting.
2766 2015-10-23 Gary Dismukes <dismukes@adacore.com>
2768 * exp_ch6.adb: Minor reformatting.
2770 2015-10-23 Ed Schonberg <schonberg@adacore.com>
2772 * sem_ch12.adb (Check_Formal_Packages): A formal package whose
2773 actual part is (others => <>) os identical to a formal package
2774 with an actual part written as (<>).
2776 2015-10-23 Arnaud Charlet <charlet@adacore.com>
2778 * a-reatim.adb ("/"): For Time_Span division convert the operands
2779 to integers and then use integer division, which conforms to
2780 the rounding required by Ada RM.
2782 2015-10-23 Ed Schonberg <schonberg@adacore.com>
2784 * sem_ch6.adb (Check_Missing_Return): Do not report a missing
2785 return statement on a function body constructed to complete a
2786 package body for a premature instantiation.
2788 2015-10-23 Ed Schonberg <schonberg@adacore.com>
2790 * exp_ch6.adb (Build_Procedure_Body_Form): Replace body of
2791 original function with that of generated procedure, to simplify
2792 processing and avoid scoping problems with local declarations.
2793 (Rewrite_Function_Call_For_C): Handle properly the case of a
2794 parameterless function.
2796 2015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
2798 * a-exextr.adb, sem_ch6.adb, sem_ch13.adb: Minor reformatting.
2800 2015-10-23 Arnaud Charlet <charlet@adacore.com>
2802 * s-taskin.ads: Minor code clean up.
2803 (Ada_Task_Control_Block): Move fixed size field before variable sized
2805 * einfo.ads: Minor editing.
2807 2015-10-23 Ed Schonberg <schonberg@adacore.com>
2809 * sem_ch6.adb (Check_Aggregate_Accessibility): Apply rule in RM
2810 6.5 (8.3) to verify that access discriminants in an aggregate
2811 in a return statement have the proper accessibility, i.e. do
2812 not lead to dangling references.
2814 2015-10-23 Eric Botcazou <ebotcazou@adacore.com>
2816 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Add missing
2817 test on Address_Clause_Overlay_Warnings to the "constant overlays
2818 variable" warning. For the reverse case, also issue a warning if
2819 the modification is potentially made through the initialization
2822 2015-10-23 Jose Ruiz <ruiz@adacore.com>
2824 * a-exetim-posix.adb (Clock): Use the pthread_getcpuclockid
2825 function to have access to CPU clocks for tasks other than the
2828 2015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
2830 * debug.adb: Switch -gnatd.5 is no longer in use, remove the
2831 associated documentation.
2832 * exp_dbug.adb (Get_External_Name): Do not add a special prefix
2833 for ignored Ghost entities or when switch -gnatd.5 is enabled.
2834 * exp_dbug.ads Remove the documentation concerning the encoding
2835 of ignored Ghost entities.
2837 2015-10-23 Bob Duff <duff@adacore.com>
2839 * a-exextr.adb (Notify_Exception): For Unhandled_Raise_In_Main,
2840 mimic the output from Ada.Exceptions.Last_Chance_Handler; don't
2841 print "Exception raised".
2842 * s-stalib.ads, s-exctra.ads, s-exctra.adb: Add
2843 Unhandled_Raise_In_Main to types Exception_Trace_Kind/Trace_Kind.
2845 2015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
2847 * exp_attr.adb, freeze.adb, sem_attr.adb, exp_aggr.adb,
2848 gnatname.adb: Minor reformatting.
2850 2015-10-23 Steve Baird <baird@adacore.com>
2852 * a-cbdlli.ads, a-cbhama.ads, a-cbhase.ads, a-cbmutr.ads,
2853 a-cborma.ads, a-cborse.ads, a-cbprqu.ads, a-cbsyqu.ads,
2854 a-cdlili.ads, a-cfdlli.ads, a-cfhama.ads, a-cfhase.ads,
2855 a-cfinve.ads, a-cforma.ads, a-cforse.ads, a-cidlli.ads,
2856 a-cihama.ads, a-cihase.ads, a-cimutr.ads, a-ciorma.ads,
2857 a-ciormu.ads, a-ciorse.ads, a-coboho.ads, a-cobove.ads,
2858 a-cofove.ads, a-cohama.ads, a-cohase.ads, a-coinho.ads,
2859 a-coinho-shared.ads, a-coinve.ads, a-comutr.ads, a-conhel.ads,
2860 a-convec.ads, a-coorma.ads, a-coormu.ads, a-coorse.ads,
2861 a-cuprqu.ads, a-cusyqu.ads, a-rbtgbo.ads: Add spec Annotate
2863 * a-cbdlli.adb, a-cbhama.adb, a-cbhase.adb, a-cbmutr.adb,
2864 a-cborma.adb, a-cborse.adb, a-cbprqu.adb, a-cbsyqu.adb,
2865 a-cdlili.adb, a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb,
2866 a-cfinve.adb, a-cforma.adb, a-cforse.adb, a-cidlli.adb,
2867 a-cihama.adb, a-cihase.adb, a-cimutr.adb, a-ciorma.adb,
2868 a-ciormu.adb, a-ciorse.adb, a-coboho.adb, a-cobove.adb,
2869 a-cofove.adb, a-cohama.adb, a-cohase.adb, a-coinho.adb,
2870 a-coinho-shared.adb, a-coinve.adb, a-comutr.adb, a-conhel.adb,
2871 a-convec.adb, a-coorma.adb, a-coormu.adb, a-coorse.adb,
2872 a-cuprqu.adb, a-cusyqu.adb, a-rbtgbo.adb: Remove body Annotate
2875 2015-10-23 Vincent Celier <celier@adacore.com>
2877 * gnatname.adb: When gnatname is invoked with a project file,
2878 specified with switch -P, if gprname is available, gnatname will
2879 invoke gprname, with the target if it is a cross gnatname.
2881 2015-10-23 Arnaud Charlet <charlet@adacore.com>
2883 * exp_ch4.adb: Fix typo.
2884 * exp_ch6.adb: Update comment.
2885 * exp_attr.adb (Expand_Min_Max_Attribute): Simplify expansion.
2886 * exp_aggr.adb (Convert_To_Positional): Only convert to
2887 positional when generating C in case of an object declaration.
2888 (In_Object_Declaration): New.
2889 (Late_Expansion): Adapt to trees generated by Modify_Tree_For_C.
2890 * sinfo.ads: Update documentation.
2892 2015-10-23 Joel Brobecker <brobecker@adacore.com brobecker>
2894 * sigtramp.h (struct sigcontext, struct ucontext): Remove declarations,
2895 and replace them by include of corresponding header file.
2897 2015-10-23 Bob Duff <duff@adacore.com>
2899 * a-convec.adb (Copy): Make sure C is initialized
2900 on all paths, including when Checks is False.
2902 2015-10-23 Eric Botcazou <ebotcazou@adacore.com>
2904 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Remove
2905 error as unreachable.
2907 2015-10-23 Arnaud Charlet <charlet@adacore.com>
2909 * gnat1drv.adb (Adjust_Global_Switches): Adjust.
2911 2015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
2913 * exp_dbug.ads, exp_dbug.adb (Get_External_Name): The special prefix for
2914 ignored Ghost entities is now ___ghost_.
2916 2015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
2918 * ghost.adb (Is_Subject_To_Ghost): Check the
2919 original node when searching for pragma Ghost to catch cases
2920 where a source construct has been rewritten into something else.
2922 2015-10-23 Ed Schonberg <schonberg@adacore.com>
2924 * einfo.ads, einfo.adb (Rewritten_For_C): New flag on functions
2925 that return a constrained array type. When generating C these
2926 functions are rewritten as procedures with an out parameter,
2927 and calls to such functions are rewritten accordingly.
2928 * exp_ch6.adb (Expand_N_Subprogram_Declaration): When
2929 Modify_Tree_For_C is set and the function returns a constrained
2930 array type, generate a procedure declaration with an additional
2931 out parameter. Mark original function as Rewritten_For_C.
2932 The new declaration is inserted in tree immediately after
2933 current declaration.
2934 (Expand_Subprogram_Body): If entity is marked Rewritten_For_C,
2935 generate body of corresponding procedure using declarations
2936 and statements for function body. Replace return statements
2937 with assignments to the out parameter, followed by a simple
2939 (Rewrite_Function_Call_For_C): New procedure to replace a function
2940 call that returns an array by a procedure call.
2942 2015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
2944 * sem_util.adb (Denotes_Iterator): New routine.
2945 (Is_Iterator): Code cleanup. Factor out the detection of a
2946 predefined iterator. As a result this fixes a missing case
2947 where a tagged type implements interface Reversible_Iterator.
2949 2015-10-23 Ed Schonberg <schonberg@adacore.com>
2951 * sem_attr.adb (Eval_Attribute): Constant-fold 'Enabled if
2952 not within a generic unit, even if expander is not active, so
2953 that instances of container packages remain preelaborable in
2956 2015-10-23 Tristan Gingold <gingold@adacore.com>
2958 * init.c (__gnat_sigtramp): New assembly function for arm64-darwin.
2959 (__gnat_error_handler): Use trampoline for arm64.
2961 2015-10-23 Ed Schonberg <schonberg@adacore.com>
2963 * exp_ch3.adb (Expand_N_Object_Declaration): if the type of the
2964 object is a class-wide limited interface type, the expression
2965 is not restricted to the forms specified for limited types.
2967 2015-10-23 Vincent Celier <celier@adacore.com>
2969 * gnatname.adb: Code clean up.
2970 * s-taasde.ads: Fix comment.
2972 2015-10-23 Ed Schonberg <schonberg@adacore.com>
2974 * sem_util.adb (Is_Iterator, Is_Reversible_iterator): Use
2975 root type to determine whether the type is a descendant of the
2976 corresponding interface type, so take into account multiple
2977 levels of subtypes and derivations.
2979 2015-10-23 Olivier Hainque <hainque@adacore.com>
2981 * tracebak.c: Refine selection of GCC/GENERIC_UNWINDER for
2982 tracebacks on x86 & x86_64.
2983 (x86 & x86_64): If !SJLJ, always pick the
2984 GCC_UNWINDER for x86_64 (not only on linux).
2985 * sem_util.ads: Minor fix in comment.
2987 2015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
2989 * sem_prag.adb (Analyze_Pragma): Pragma Volatile_Function should
2990 not apply to a function instantiation.
2991 * sem_util.adb (Has_Effectively_Volatile_Profile): New routine.
2992 (Is_Volatile_Function): An instance of Ada.Unchecked_Conversion
2993 is a volatile function when its profile contains an effectively
2995 * sem_util.ads (Has_Effectively_Volatile_Profile): New routine.
2997 2015-10-23 Arnaud Charlet <charlet@adacore.com>
2999 * exp_unst.adb (Unnest_Subprogram): Complete previous
3000 change and update comments.
3002 2015-10-23 Ed Schonberg <schonberg@adacore.com>
3004 * sem_util.ads, sem_util.adb (Check_Function_With_Address_Parameter):
3005 A subprogram that has an Address parameter and is declared in a Pure
3006 package is not considered Pure, because the parameter may be used as a
3007 pointer and the referenced data may change even if the address value
3009 * freeze.adb (Freeze_Subprogram): use it.
3010 * exp_ch6.adb (Expand_N_Subprogram_Body): Use it.
3012 2015-10-23 Olivier Hainque <hainque@adacore.com>
3014 * tracebak.c: Fallback to generic unwinder for gcc-sjlj on x86 &
3016 * tracebak.c: Rework x86 & x86_64 sections to resort to the
3017 generic unwinder if __USING_SJLJ_EXCEPTIONS__.
3019 2015-10-23 Javier Miranda <miranda@adacore.com>
3021 * sem_util.adb (Check_Function_Writable_Actuals): For function
3022 calls restrict the check to elementary types, as requested by
3025 2015-10-23 Arnaud Charlet <charlet@adacore.com>
3027 * exp_unst.adb (Unnest_Subprogram): Suppress initialization on
3028 Decl_ARECnT since we are taking care of all initializations in
3031 2015-10-23 Ed Schonberg <schonberg@adacore.com>
3033 * sem_dim.adb (Analyze_Dimension_Extension_Or_Record_Aggregate):
3034 Handle properly a box-initialized aggregate component.
3036 2015-10-23 Yannick Moy <moy@adacore.com>
3038 * sem_prag.adb (Analyze_Pragma): Reject Volatile_Function not placed
3041 2015-10-23 Yannick Moy <moy@adacore.com>
3043 * a-extiin.ads, a-reatim.ads, a-interr.ads, a-exetim-mingw.ads,
3044 a-exetim-default.ads, a-exetim.ads, a-taside.ads: Add "Global => null"
3045 contract on subprograms.
3046 * lib-xref-spark_specific.adb: collect scopes for stubs of
3049 2015-10-23 Arnaud Charlet <charlet@adacore.com>
3051 * gnat1drv.adb (Adjust_Global_Switches): Enable
3052 Back_Annotate_Rep_Info to get size information from gigi.
3053 (Gnat1drv): Code clean ups.
3054 * frontend.adb (Frontend): Ditto.
3056 2015-10-23 Arnaud Charlet <charlet@adacore.com>
3058 * gnat1drv.adb (Adjust_Global_Switches): Adjust settings.
3059 * sem.adb (Semantics): Remove special case.
3061 2015-10-23 Gary Dismukes <dismukes@adacore.com>
3063 * bindgen.adb, restrict.adb: Minor spelling/grammar fixes.
3065 2015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
3067 * sem_res.adb (Resolve_Entity_Name): Code cleanup. Check for possible
3068 elaboration issues in SPARK when the name denotes a source variable.
3070 2015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
3072 * exp_ch7.adb (Process_Transient_Objects): Reimplement to properly
3073 handle restriction No_Exception_Propagation.
3074 * exp_ch11.adb (Expand_At_End_Handler): Update the parameter
3075 profile and all references to Block.
3076 * exp_ch11.ads (Expand_At_End_Handler): Update the parameter
3077 profile and comment on usage.
3078 * exp_intr.adb (Expand_Unc_Deallocation): Reimplement to properly
3079 handle restriction No_Exception_Propagation.
3080 * gnat1drv.adb, restrict.adb: Update comment.
3082 2015-10-23 Bob Duff <duff@adacore.com>
3084 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Do not call
3085 SS_Release for a block statement enclosing the return statement in the
3086 case where a build-in-place function return is returning
3087 the result on the secondary stack. This is accomplished by
3088 setting the Sec_Stack_Needed_For_Return flag on such blocks.
3089 It was already being set for the function itself, and it was
3090 already set correctly for blocks in the non-build-in-place case
3091 (in Expand_Simple_Function_Return).
3092 (Set_Enclosing_Sec_Stack_Return): New procedure to perform
3093 the Set_Sec_Stack_Needed_For_Return calls. Called in the
3094 build-in-place and non-build-in-place cases.
3095 (Expand_Simple_Function_Return): Call
3096 Set_Enclosing_Sec_Stack_Return instead of performing the loop
3099 2015-10-23 Bob Duff <duff@adacore.com>
3101 * scng.adb (Char_Literal_Case): If an apostrophe
3102 follows a reserved word, treat it as a lone apostrophe, rather
3103 than the start of a character literal. This was already done for
3104 "all", but it needs to be done also for (e.g.) "Delta".
3106 2015-10-23 Bob Duff <duff@adacore.com>
3108 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function): Use
3109 Underlying_Type for B_Typ, in case the Typ is a subtype of a type with
3110 unknown discriminants.
3111 * g-awk.ads: Minor style fix in comment
3113 2015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
3115 * debug.adb: Document the use of debug switch -gnatd.5.
3116 * einfo.adb: Code reformatting. (Is_Ghost_Entity): Moved from ghost.adb.
3117 * einfo.ads New synthesized attribute Is_Ghost_Enity along
3118 with usage in nodes and pragma Inline.
3119 (Is_Ghost_Entity: Moved from ghost.ads.
3120 * exp_ch3.adb Code reformatting.
3121 (Expand_Freeze_Array_Type): Capture, set and restore the Ghost mode.
3122 (Expand_Freeze_Class_Wide_Type): Capture, set and restore the
3124 (Expand_Freeze_Enumeration_Type): Capture, set and
3125 restore the Ghost mode.
3126 (Expand_Freeze_Record_Type): Capture, set and restore the Ghost mode.
3127 * exp_ch6.adb (Expand_Subprogram_Contract): Do not expand the
3128 contract of an ignored Ghost subprogram.
3129 * exp_ch13.adb Add with and use clauses for Ghost.
3130 (Expand_N_Freeze_Entity): Capture, set and restore the Ghost mode.
3131 * exp_dbug.adb (Get_External_Name): Code reformatting. Add a
3132 special prefix for ignored Ghost entities or when requested by
3133 -gnatd.5 for any Ghost entity.
3134 * exp_dbug.ads Document the use of prefix "_ghost_" for ignored
3136 * exp_prag.adb (Expand_Pragma_Check): Capture, set and restore the
3138 (Expand_Pragma_Loop_Variant): Use In_Assertion_Expr
3139 to signal the original context.
3140 * ghost.adb (Check_Ghost_Overriding): Code cleanup.
3141 (Is_Ghost_Entity): Moved to einfo.adb. (Is_OK_Declaration):
3142 Move the assertion expression check to the outer level.
3143 (Is_OK_Ghost_Context): An assertion expression is a valid Ghost
3145 * ghost.ads (Is_Ghost_Entity): Moved to einfo.ads.
3146 * sem_ch3.adb (Analyze_Object_Contract): A source Ghost object
3147 cannot be imported or exported. Mark internally generated objects
3148 as Ghost when applicable.
3149 (Make_Class_Wide_Type): Inherit the ghostness of the root tagged type.
3150 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Mark
3151 a stand alone subprogram body as Ghost when applicable.
3152 (Analyze_Subprogram_Declaration): Mark internally generated
3153 subprograms as Ghost when applicable.
3154 * sem_ch7.adb: Code cleanup.
3155 * sem_ch13.adb (Add_Invariants): Add various formal
3156 parameters to break dependency on global variables.
3157 (Build_Invariant_Procedure): Code cleanup. Capture, set and
3158 restore the Ghost mode.
3159 * sem_res.adb (Resolve_Actuals): The actual parameter of a source
3160 Ghost subprogram whose formal is of mode IN OUT or OUT must be
3163 2015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
3165 * sem_ch8.adb Code cleanup.
3166 (Find_Expanded_Name): Replace
3167 the call to In_Pragmas_Depends_Or_Global with a call to
3168 In_Abstract_View_Pragma.
3169 (In_Abstract_View_Pragma): New routine.
3170 (In_Pragmas_Depends_Or_Global): Removed.
3171 * sem_prag.adb (Analyze_Part_Of): Catch a case where indicator
3172 Part_Of denotes the abstract view of a variable.
3174 2015-10-23 Arnaud Charlet <charlet@adacore.com>
3176 * sem_util.ads (Unique_Defining_Entity): Document the result
3177 for tasks and entries.
3178 * sem_util.adb (Unique_Entity): Return declaration entity for task and
3181 2015-10-22 Mikhail Maltsev <maltsevm@gmail.com>
3183 * gcc-interface/decl.c (gnat_to_gnu_entity): Use gcc_checking_assert.
3184 * gcc-interface/trans.c (assoc_to_constructor): Use flag_checking.
3185 * gcc-interface/utils.c (relate_alias_sets): Likewise.
3186 * gcc-interface/utils2.c (build_binary_op, build_unary_op): Use
3189 2015-10-21 Martin Sebor <msebor@redhat.com>
3192 * gcc-interface/lang.opt: End each sentence that describes
3193 an option with a period.
3195 2015-10-20 Yannick Moy <moy@adacore.com>
3197 * fmap.adb, a-cihama.adb, sem_ch5.adb, make.adb, inline.adb,
3198 a-cfhase.adb, scng.adb, sem_ch12.adb, freeze.adb, tempdir.adb,
3199 sem_util.adb, sem_res.adb, s-regexp.adb, a-clrefi.adb: Fix coding
3200 style for marking start of processing of subprograms.
3202 2015-10-20 Yannick Moy <moy@adacore.com>
3204 * lib-xref-spark_specific.adb (Add_SPARK_File): Start traversal
3205 by requesting info from stubs. (Traverse_All_Compilation_Units):
3206 Remove unused procedure.
3207 (Traverse_Declarations_Or_Statements): Handle protected and task units.
3208 * lib-xref.ads (Traverse_All_Compilation_Units): Remove unused
3210 * restrict.adb (Check_Restriction): Do not ignore
3211 restrictions in GNATprove_Mode.
3213 2015-10-20 Arnaud Charlet <charlet@adacore.com>
3215 * s-valllu.adb, sem_ch3.adb, layout.adb, a-crbtgo.adb, exp_ch9.adb,
3216 make.adb, g-diopit.adb, s-valuns.adb, sem_ch9.adb, sem_ch10.adb,
3217 sem_ch12.adb, a-tifiio.adb, g-dynhta.adb, uintp.adb,
3218 sem_util.adb, sem_res.adb, s-htable.adb, exp_tss.adb, s-soflin.ads,
3219 exp_ch6.adb, sem_ch6.adb, a-rbtgbo.adb, par-ch12.adb, sem_ch8.adb,
3220 sem_eval.adb, mdll.adb, par-ch5.adb, s-poosiz.adb, sem_ch4.adb,
3221 a-ngelfu.adb, s-taspri-solaris.ads, a-cforse.adb: Fix typos.
3223 2015-10-20 Arnaud Charlet <charlet@adacore.com>
3225 * sem_aggr.adb, mlib-prj.adb, prep.adb, eval_fat.adb, rtsfind.adb,
3226 freeze.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnatlink.adb,
3227 par-ch6.adb, exp_tss.adb, exp_ch4.adb, s-shasto.adb, exp_fixd.adb,
3228 sem_ch6.adb, clean.adb, sem_ch8.adb, sem_eval.adb, sem_ch9.adb: Fix
3231 2015-10-20 Ed Schonberg <schonberg@adacore.com>
3233 * sem_ch11.adb (Analyze_Handled_Statements): If the scope is a
3234 postcondition subprogram, do not check for useless assignments
3235 because there are no source references in such a body, and the
3236 call will lose deferred references from the enclosing subprogram.
3238 2015-10-20 Ed Schonberg <schonberg@adacore.com>
3240 * sem_ch13.adb: nalyze_Attribute_Definition_Clause, case
3241 'Address): If either object is controlled the overlay is
3242 erroneous, but analysis must be completed so that back-end sees
3243 address clause and completes code generation. Improve text
3246 2015-10-20 Thomas Quinot <quinot@adacore.com>
3248 * exp_ch4.adb: Minor reformatting.
3250 2015-10-20 Bob Duff <duff@adacore.com>
3252 * s-mudido-affinity.adb (Create): Correct subranges of slices of CPU
3255 2015-10-20 Arnaud Charlet <charlet@adacore.com>
3257 * sinfo.ads, g-pehage.adb, par-ch12.adb,
3258 layout.adb, exp_util.adb, sem_aux.adb, make.adb, checks.adb,
3259 sem_ch12.adb, sem_res.adb, sem_attr.adb, a-ngelfu.adb, sem_ch4.adb,
3260 switch-b.adb, sem_ch6.adb, prj-dect.adb, gnatxref.adb, sem_ch13.adb,
3261 lib-xref.adb: Fix typos.
3263 2015-10-20 Tristan Gingold <gingold@adacore.com>
3265 * exp_ch4.adb (Expand_Array_Comparison): Use
3266 generic code if runtime routine is not available.
3268 2015-10-20 Yannick Moy <moy@adacore.com>
3270 * a-sytaco.ads (Ada.Synchronous_Task_Control): Package
3271 now withs System.Task_Identification. The visible part
3272 of the spec has SPARK_Mode. The private part has pragma
3274 (Set_True): Added Global and Depends aspects
3275 (Set_False): Added Global and Depends aspects (Current_State):
3276 Added Volatile_Function aspect and added external state
3277 Ada.Task_Identification.Tasking_State as a Global input.
3278 (Suspend_Until_True): Added Global and Depends aspects
3279 * a-sytaco.adb (Ada.Synchronous_Task_Control):
3280 Package body has SPARK_Mode => Off
3281 * a-extiin.ads (Ada.Execution_Time.Interrupts):
3282 Package now withs Ada.Real_Time and has SPARK_Mode.
3283 (Clock): Added Volatile_Function aspect and added external state
3284 Ada.Real_Time.Clock_Time as a Global input.
3285 * a-reatim.ads (Ada.Real_Time): The visible part of the spec has
3286 SPARK_Mode. The private part has pragma SPARK_Mode (Off). The package
3287 declares external state Clock_Time with properties Async_Readers and
3289 (Clock): Added Volatile_Function aspect and
3290 added external state Clock_Time as a Global input.
3291 * a-reatim.adb (Ada.Real_Time): Package body has SPARK_Mode => Off
3292 * a-exetim-default.ads, a-exetim-mingw.ads (Ada.Execution_Time):
3293 The visible part of the spec has SPARK_Mode. The private part
3294 has pragma SPARK_Mode (Off).
3295 (Clock): Added Volatile_Function
3296 aspect and added external state Clock_Time as a Global input.
3297 (Clock_For_Interrupts): Added Volatile_Function aspect and added
3298 external state Ada.Real_Time.Clock_Time as a Global input.
3299 * a-exetim-mingw.adb (Ada.Execution_Time): Package body has
3301 * a-interr.ads (Ada.Interrupts): Package now
3302 withs Ada.Task_Identification (Is_Reserved): Added
3303 SPARK_Mode, Volatile_Function and external state
3304 Ada.Task_Identification.Tasking_State as a Global input.
3305 (Is_Attached): Added SPARK_Mode, Volatile_Function and external
3306 state Ada.Task_Identification.Tasking_State as a Global input.
3307 (Attach_Handler): Added SPARK_Mode => Off (Exchange_Handler):
3308 Added SPARK_Mode => Off (Detach_Handler): Added SPARK_Mode
3309 and external state Ada.Task_Identification.Tasking_State as a
3310 Global In_Out. (Reference): Added SPARK_Mode => Off
3311 * a-disedf.ads (Get_Deadline): Added SPARK_Mode, Volatile_Function
3312 and external state Ada.Task_Identification.Tasking_State as a
3314 * a-taside.ads (Ada.Task_Identification): The visible part of
3315 the spec has SPARK_Mode. The private part has pragma SPARK_Mode
3316 (Off). The package declares external state Tasking_State with
3317 properties Async_Readers and Async_Writers.
3318 (Current_Task): Added
3319 Volatile_Function aspect and added external state Tasking_State
3321 (Environment_Task): Added SPARK_Mode => Off
3322 (Is_Terminated): Added Volatile_Function aspect and added external
3323 state Tasking_State as a Global input. (Is_Callable): Added
3324 Volatile_Function aspect and added external state Tasking_State as
3326 (Activation_Is_Complete): Added Volatile_Function
3327 aspect and added external state Tasking_State as a Global input.
3328 * a-taside.adb (Ada.Task_Identification): Package body has
3331 2015-10-20 Ed Schonberg <schonberg@adacore.com>
3333 * atree.ads, atree.adb: Enable List38 and List39 on entities.
3334 * einfo.ads, einfo.adb (Class_Wide_Preconds) new attribute defined
3335 on subprograms. Holds the list of class-wide precondition
3336 functions inherited from ancestors. Each such function is an
3337 instantiation of the generic function generated from an explicit
3338 aspect specification for a class-wide precondition. A type is
3339 an ancestor of itself, and therefore a root type has such an
3340 instance on its own list.
3341 (Class_Wide_Postconds): ditto for postconditions.
3343 2015-10-20 Vincent Celier <celier@adacore.com>
3345 * prj-attr.adb: Add packages Prove and GnatTest.
3347 2015-10-20 Steve Baird <baird@adacore.com>
3349 * a-conhel.adb: Add an Annotate pragma to help suppress CodePeer's
3350 analysis of internals of container generic instances. This pragma
3351 has no other effect.
3352 * a-conhel.adb (Generic_Implementation) Add "pragma Annotate
3353 (CodePeer, Skip_Analysis);".
3355 2015-10-20 Steve Baird <baird@adacore.com>
3357 * pprint.adb: Code clean up.
3359 2015-10-20 Bob Duff <duff@adacore.com>
3361 * a-cfinve.ads, a-coboho.ads: Improve comments.
3362 * a-coboho.adb (Size_In_Storage_Elements): Improve error message
3363 in case of "Size is too big" exception.
3365 2015-10-20 Bob Duff <duff@adacore.com>
3367 * a-contai.ads: Remove check names (moved to snames.ads-tmpl).
3368 * snames.ads-tmpl: Add check names that were previously in
3369 a-contai.ads, so they are now visible in configuration files.
3370 * types.ads: Add checks corresponding to snames.ads-tmpl.
3372 2015-10-20 Ed Schonberg <schonberg@adacore.com>
3374 * sem_ch5.adb (Analyze_Loop_Statement): Attach generated loop
3375 identifier to the tree, because it may be the root of a tree
3376 traversal in Pop_Scope when freeze actions are pending.
3378 2015-10-20 Steve Baird <baird@adacore.com>
3380 * pprint.ads (Expression_Image) Add new generic formal flag
3381 Hide_Parameter_Blocks.
3382 * pprint.adb (Expression_Image) If new flag is set, then display
3383 dereferences of parameter block components accordingly.
3385 2015-10-20 Ed Schonberg <schonberg@adacore.com>
3387 * sem_prag.adb: Code clean up.
3389 2015-10-20 Hristian Kirtchev <kirtchev@adacore.com>
3391 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Code cleanup.
3392 (Make_Build_In_Place_Call_In_Object_Declaration): Update the
3393 parameter profile. Code cleanup. Request debug info for the
3394 object renaming declaration.
3395 (Move_Activation_Chain): Add new formal parameter and update the
3397 * exp_ch6.ads (Make_Build_In_Place_Call_In_Object_Declaration):
3398 Update the parameter profile and comment on usage.
3399 * sem_util.ads, sem_util.adb (Remove_Overloaded_Entity): New routine,
3402 2015-10-20 Ed Schonberg <schonberg@adacore.com>
3404 * sem_ch13.adb (Analyze_One_Aspect, case
3405 Aspect_Disable_Controlled): If expander is not active, pre-analyze
3406 expression anyway for ASIS and other tools use.
3407 * sem_prag.adb (Build_Generic_Class_Condition): Handle properly
3408 anonymous access types in parameter specifications. Make the
3409 formal type a formal derived type of the controlling type of
3412 2015-10-20 Tristan Gingold <gingold@adacore.com>
3414 * s-rident.ads: No_Task_At_Interrupt_Priority: New restriction.
3415 * sem_prag.adb (Analyze_Pragma): Check the restriction.
3416 * sem_ch13.adb (Analyze_Attribute_Definition_Clause):
3417 Check the restriction (for aspects).
3419 2015-10-20 Gary Dismukes <dismukes@adacore.com>
3421 * sem_prag.adb: Minor reformatting.
3423 2015-10-20 Tristan Gingold <gingold@adacore.com>
3425 * sem_util.adb (Is_Protected_Self_Reference): Remove reference to
3426 UET_Address in comment.
3427 * sem_attr.adb (Check_Unit_Name): Adjust comment.
3428 (Analyze_Attribute): Remove handling of UET_Address.
3429 * sem_attr.ads (Attribute_Impl_Def): Remove Attribute_UET_Address.
3430 * snames.ads-tmpl Remove Name_UET_Address, Attribute_UET_Address.
3431 * exp_attr.adb (Expand_N_Attribute_Reference): Remove
3432 Attribute_UET_Address.
3434 2015-10-20 Bob Duff <duff@adacore.com>
3436 * a-cbdlli.adb, a-cdlili.adb, a-chtgop.adb, a-cidlli.adb,
3437 * a-cobove.adb, a-coinve.adb, a-convec.adb, a-crbtgo.adb ("="): Avoid
3438 modifying the tampering counts unnecessarily.
3439 (Adjust): Zero tampering counts unconditionally.
3441 2015-10-20 Jerome Lambourg <lambourg@adacore.com>
3443 * init.c: Fix build issue on arm-vx6 when building the RTP
3446 2015-10-20 Ed Schonberg <schonberg@adacore.com>
3448 * sem_ch3.adb (Analyze_Object_Declaration): If the expression
3449 is an aggregate and compilation is in -gnatI mode (ignore rep
3450 clauses) do not delay resolution of aggregate, to prevent freeze
3451 actions out of order in the backend.
3453 2015-10-20 Ed Schonberg <schonberg@adacore.com>
3455 * sem_prag.ads, sem_prag.adb (Build_Generic_Class_Condition):
3456 New procedure to construct a generic function for a class-wide
3457 precondition, to implement AI12-0113 concerning the new semantics
3458 of class-wide preconditions for overriding uperations.
3460 2015-10-20 Hristian Kirtchev <kirtchev@adacore.com>
3462 * sem_util.adb (Find_Actual): The routine is
3463 now capable of operating on entry calls.
3465 2015-10-20 Ed Schonberg <schonberg@adacore.com>
3467 * sem_res.adb: Remove redundant check.
3469 2015-10-20 Jerome Lambourg <lambourg@adacore.com>
3471 * init.c (__gnat_vxsim_error_handler): Completely disable on
3472 VxWorks-7 as the VSBs used to build gcc do not support vxsim
3475 2015-10-20 Claire Dross <dross@adacore.com>
3477 * a-cfdlli.ads, a-cfinve.ads, a-cofove.ads (Generic_Sorting): Explicit
3479 * a-cfhase.ads, a-cforse.ads (Generic_Keys): Explicit SPARK_Mode.
3481 2015-10-20 Tristan Gingold <gingold@adacore.com>
3483 * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
3484 Check for No_Implicit_Protected_Object_Allocations.
3485 * fe.h (Check_No_Implicit_Task_Alloc,
3486 Check_No_Implicit_Protected_Alloc): Define and declare.
3487 * restrict.ads, restrict.adb (Check_No_Implicit_Task_Alloc,
3488 Check_No_Implicit_Protected_Alloc): New procedures to check the
3490 * s-rident.ads (No_Implicit_Task_Allocations)
3491 (No_Implicit_Protected_Object_Allocations): Declare new
3494 2015-10-20 Yannick Moy <moy@adacore.com>
3496 * sem_res.adb (Resolve_Selected_Component): Only set flag
3497 when component is defined in a variant part.
3499 * sem_util.ads (Is_Declared_Within_Variant): Promote local query
3500 as publicy visible one for use in Resolve_Selected_Component.
3502 2015-10-20 Philippe Gil <gil@adacore.com>
3504 * g-debpoo.adb: allow instrumented System.Memory to use Debug_Pool
3505 from foreign threads.
3506 * g-debpoo.adb (Print_Traceback): NEW print traceback if available
3507 added to support Stack_Trace_Depth = 0.
3508 (Print_Address): NEW print System.Address without no secondary
3509 stack use (Address_Image uses secondary stack)
3511 2015-10-20 Yannick Moy <moy@adacore.com>
3513 * exp_ch9.adb (Expand_Entry_Barrier): Default initialize local variable
3516 2015-10-20 Jerome Lambourg <lambourg@adacore.com>
3518 * init.c (__gnat_error_handler for vxworks): Force
3519 SPE bit in the MSR when handling signals
3521 2015-10-20 Arnaud Charlet <charlet@adacore.com>
3523 * einfo.ads, sem_ch12.adb, sem_ch6.adb, table.ads, s-stposu.ads,
3524 g-table.ads, g-dyntab.ads, makeutl.ads, a-crdlli.ads: Fix typos.
3526 2015-10-20 Ed Schonberg <schonberg@adacore.com>
3528 * sem_ch5.adb (Analyze_Loop_Statement): Element iterators
3529 over multidimensional arrays create additional loops during
3530 expansion. For such loops we create a label as a scope
3531 name. Attach this label properly to tree, for use in GNATProve
3532 over such element iterators.
3533 * sem_attr.adb (Analyze_Attribute, case Loop_Entry): The loop to
3534 which the attribute applies comes from source, not from expansion
3535 of an element iterator or a quantified expression.
3536 * exp_attr.adb (Expand_N_Attribute_Reference): Ditto.
3538 2015-10-20 Ed Schonberg <schonberg@adacore.com>
3540 * exp_ch6.adb (Expand_Call): Check for a call to a function
3541 declared in a Dimension I/O package, to handle the new Image
3544 2015-10-20 Eric Botcazou <ebotcazou@adacore.com>
3546 * inline.ads: Minor comment fixes.
3548 2015-10-20 Bob Duff <duff@adacore.com>
3550 * a-comutr.ads (Tree_Node_Access): Add No_Strict_Aliasing, because
3551 we're doing unchecked conversions with this pointer.
3553 2015-10-20 Ed Schonberg <schonberg@adacore.com>
3555 * exp_ch9.adb (Next_Protected_Operation): An expression function
3556 used as a completion can be the next protected operation in a
3559 2015-10-20 Hristian Kirtchev <kirtchev@adacore.com>
3561 * sem_res.adb (Is_OK_Volatile_Context): Add a guard when checking a
3562 possible call to an instance of Ada.Unchecked_Conversion to avoid
3563 testing protected function calls. Allow references to protected objects
3564 in prefixed protected calls.
3565 (Is_Protected_Operation_Call): New routine.
3567 2015-10-20 Yannick Moy <moy@adacore.com>
3569 * exp_ch5.adb, exp_ch5.ads (Expand_Iterator_Loop_Over_Array): Make
3570 query public. Remove code handling with iterator loop over array
3571 of the 'in' form, which is not allowed in Ada. * exp_spark.adb
3572 (Expand_SPARK): Expand loop statements that take the form of an
3573 iterator over an array.
3574 * sem_ch5.adb (Analyze_Loop_Statement): Do not analyze loop statements
3575 that take the form of an iterator over an array, so that the rewritten
3576 form gets analyzed instead.
3577 * sem_util.adb, sem_util.ads (Is_Iterator_Over_Array): New query
3578 to recognize iterators over arrays.
3580 2015-10-20 Arnaud Charlet <charlet@adacore.com>
3582 * s-excdeb.ads, s-excdeb.adb (Debug_Raise_Exception): Add
3584 * a-except.adb (Raise_Current_Excep): Update call to
3585 Debug_Raise_Exception.
3586 * a-except-2005.adb (Complete_Occurrence): Ditto.
3587 * sem_ch12.adb: Whitespace fix.
3589 2015-10-20 Yannick Moy <moy@adacore.com>
3591 * sem_warn.adb (Is_OK_Fully_Initialized): Consider types with DIC as
3592 fully default initialized.
3593 * sem_ch6.adb: minor style fix in comment
3595 2015-10-20 Ed Schonberg <schonberg@adacore.com>
3597 * s-diflio.ads, s-diflio.adb (Image): New function for dimensioned
3598 quantities, to produce a string that includes the dimension
3599 synbol for the quantity, or the vector of dimensions in standard
3601 * sem_dim.adb (Expand_Put_Call_With_Symbol): Process new function
3602 Image, to include dimension information in the generated string,
3603 identical to the string produced by the Put procedure on a string
3604 for a dimensioned quantity.
3606 2015-10-20 Hristian Kirtchev <kirtchev@adacore.com>
3608 * exp_ch7.adb (Process_Declarations): A loop
3609 parameter does not require finalization actions.
3611 2015-10-20 Eric Botcazou <ebotcazou@adacore.com>
3613 * exp_ch6.adb (Expand_Simple_Function_Return): Do not create an
3614 actual subtype for a mutable record return type if the expression
3615 is itself a function call.
3617 2015-10-20 Dmitriy Anisimkov <anisimko@adacore.com>
3619 * s-atocou.adb, s-atocou-builtin.adb: Fix implementation description
3620 related to new type support.
3622 2015-10-20 Ed Schonberg <schonberg@adacore.com>
3624 * sem_res.adb (Resolve_Explicit_Dererence): Call Analyze_Dimension
3625 to propagate dimension information from prefix.
3626 * sem_dim.adb (Analyze_Dimension): Handle Explicit_Dereference.
3627 * inline.ads: minor whitespace fix in comment
3628 * sem_ch6.adb: minor gramar fix in comment
3630 2015-10-20 Hristian Kirtchev <kirtchev@adacore.com>
3632 * sem_ch3.adb (Analyze_Object_Contract):
3633 A protected type or a protected object is allowed to have a
3636 2015-10-20 Bob Duff <duff@adacore.com>
3638 * sem_util.adb (Requires_Transient_Scope):
3639 Return true for mutable records if the maximum size is very large.
3641 2015-10-20 Eric Botcazou <ebotcazou@adacore.com>
3643 * a-except-2005.adb (To_Stderr): Import Put_Char_Stderr with
3644 the same signature as in System.IO.Put.
3646 2015-10-20 Bob Duff <duff@adacore.com>
3648 * a-cobove.adb (Set_Length): Restore previous logic, but with "Checks
3649 and then" on the check.
3651 2015-10-20 Ed Schonberg <schonberg@adacore.com>
3653 * par-ch3.adb (P_Known_Discriminant_Part_Opt): Handle properly
3654 a misplaced "constant" keyword in a discriminant specification.
3656 2015-10-20 Steve Baird <baird@adacore.com>
3658 * einfo.ads (Is_Param_Block_Component_Type): New function decl
3659 for querying the flag.
3660 (Set_Is_Param_Block_Component_Type): New procedure decl for setting
3662 * einfo.adb (Is_Param_Block_Component_Type): New function body.
3663 (Set_Is_Param_Block_Component_Type): New procedure body.
3664 (Write_Entity_Flags): Display the new flag.
3665 * exp_ch9.adb (Build_Parameter_Block): Set flag on parameter
3666 block component types.
3667 (Expand_N_Entry_Declaration): Set flag on parameter block component
3670 2015-10-20 Steve Baird <baird@adacore.com>
3672 * sem_elab.adb: Do not pass an N_Attribute_Reference node to
3673 Sinfo.Set_No_Elaboration_Check.
3674 * sem_elab.adb (Check_Elab_Call) Do not pass a non-call
3675 node (specifically, an N_Attribute_Reference node) to
3676 Sinfo.Set_No_Elaboration_Check.
3678 2015-10-20 Tristan Gingold <gingold@adacore.com>
3680 * adaint.c: File names are case sensitive on aarch64-ios.
3682 2015-10-20 Bob Duff <duff@adacore.com>
3684 * a-cbdlli.ads, a-cbhase.ads, a-cbmutr.ads, a-cborse.ads,
3685 * a-cdlili.ads, a-cidlli.ads, a-cihase.ads, a-cimutr.ads,
3686 * a-ciorse.ads, a-cobove.ads, a-cohase.ads, a-coinve.ads,
3687 * a-comutr.ads, a-convec.ads, a-coorse.ads: Use non-private with clause.
3689 2015-10-20 Hristian Kirtchev <kirtchev@adacore.com>
3691 * exp_util.adb (Requires_Cleanup_Actions): A loop parameter does not
3692 require finalization actions.
3694 2015-10-20 Ed Schonberg <schonberg@adacore.com>
3696 * par-ch3.adb (P_Declarative_Items): In case of misplaced
3697 aspect specifications, ensure that flag Done is properly set to
3700 2015-10-20 Hristian Kirtchev <kirtchev@adacore.com>
3702 * rtsfind.ads Remove the entries for Ada.Synchronous_Task_Control
3703 and Suspension_Object from tables RE_Id, RE_Unit_Table and RTU_Id.
3704 * sem_util.adb (Is_Descendant_Of_Suspension_Object): Update
3705 the comment on usage. Use routine Is_Suspension_Object to detect
3706 whether a type matches Suspension_Object.
3707 (Is_Suspension_Object): New routine.
3708 * snames.ads-tmpl: Add predefined names for Suspension_Object
3709 and Synchronous_Task_Control.
3711 2015-10-20 Ed Schonberg <schonberg@adacore.com>
3713 * sem_smem.adb (Check_Shared_Var): Clean up code that handles
3714 type declarations with discriminants, remove obsolete check.
3716 2015-10-20 Arnaud Charlet <charlet@adacore.com>
3718 * par_sco.adb: Minor style fixes.
3720 2015-10-20 Vincent Celier <celier@adacore.com>
3722 * debug.adb: Update documentation of -gnatdu.
3724 2015-10-20 Hristian Kirtchev <kirtchev@adacore.com>
3726 * aspects.adb Add aspect Volatile_Function to table
3728 * aspect.ads Add aspect Volatile_Function to tables
3729 Aspect_Argument, Aspect_Delay, Aspect_Id, Aspect_Names
3730 and Implementation_Defined_Aspect. Aspects Async_Readers,
3731 Async_Writers, Effective_Reads and Effective_Writes are no
3733 * einfo.adb (Get_Pragma): Add an entry for pragma
3735 * par-prag.adb (Prag): Pragma Volatile_Function does not need
3736 special processing by the parser.
3737 * rtsfind.ads Add an entry for Ada.Synchronous_Task_Control in
3738 table RTU_Id. Add an entry for Suspension_Object in table RE_Id.
3739 * sem_ch3.adb Fix SPARK RM references.
3740 (Analyze_Object_Contract): Update the error guard.
3741 * sem_ch5.adb Fix SPARK RM references.
3742 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Ensure
3743 that a non-volatile function does not contain an effectively
3745 (Analyze_Subprogram_Contract): Ensure
3746 that a non-volatile function does not contain an effectively
3748 * sem_ch12.adb (Instantiate_Object): Remove the reference to
3749 the SPARK RM from the error message.
3750 * sem_ch13.adb (Analyze_Aspect_Specifications): Add
3751 processing for aspects Async_Readers, Async_Writers,
3752 Effective_Reads, Effective_Writes and Volatile_Function.
3753 (Check_Aspect_At_Freeze_Point): Aspects Async_Readers,
3754 Async_Writers, Effective_Reads, Effective_Writes and
3755 Volatile_Function do not need special processing at the freeze
3757 * sem_prag.adb Add an entry for pragma Volatile_Function in
3759 (Analyze_External_Property_In_Decl_Part):
3760 Reimplemented as Async_Readers, Async_Writers, Effective_Reads
3761 and Effective_Writes are no longer Boolean pragmas.
3762 (Analyze_Global_Item): An external state or effectively
3763 volatile object cannot appear as an item in pragma
3765 (Analyze_Pragma): Change the implementation
3766 of Async_Readers, Async_Writers, Effective_Reads and
3767 Effective_Writes as these are no longer Boolean pragmas.
3768 Use routine Check_Static_Boolean_Expression to verify the
3769 optional Boolean expression of Async_Readers, Async_Writers,
3770 Constant_After_Elaboration, Effective_Reads, Effective_Writes,
3771 Extensions_Visible and Volatile_Function. Add processing for
3772 pragma Volatile_Function.
3773 (Check_Static_Boolean_Expression): New routine.
3774 (Find_Related_Context): Update the comment on usage.
3775 (Is_Enabled_Pragma): New routine.
3776 * sem_prag.ads (Is_Enabled_Pragma): New routine.
3777 * sem_res.adb Fix SPARK RM references.
3778 (Is_OK_Volatile_Context): Add detection for return statements.
3779 (Resolve_Actuals): Remove the check concerning an effectively volatile
3780 OUT actual parameter as this is now done by the SPARK flow analyzer.
3781 (Resolve_Entity_Name): Remove the check concerning an effectively
3782 volatile OUT formal parameter as this is now done by the SPARK
3783 flow analyzer. (Within_Volatile_Function): New routine.
3784 * sem_util.adb (Add_Contract_Item): Add processing for pragma
3786 (Check_Nonvolatile_Function_Profile): New routine.
3787 (Is_Descendant_Of_Suspension_Object): New routine.
3788 (Is_Effectively_Volatile): Protected types and descendants of
3789 Suspension_Object are now treated as effectively volatile.
3790 (Is_Enabled): The optional Boolean expression of pragmas
3791 Async_Readers, Async_Writers, Effective_Reads and Effective_Writes
3792 now appears as the first argument.
3793 (Is_Volatile_Function): New routine.
3794 * sem_util.ads Add SPARK RM references.
3795 (Add_Contract_Item): Update the comment on usage.
3796 (Check_Nonvolatile_Function_Profile): New routine.
3797 (Is_Effectively_Volatile): Update the comment on usage.
3798 (Is_Volatile_Function): New routine.
3799 * snames.ads-tmpl Add a predefined name and pragma id for
3802 2015-10-20 Arnaud Charlet <charlet@adacore.com>
3804 * gnat_ugn.texi, gnat_rm.texi: Regenerate.
3805 * doc/gnat_ugn/gnat_project_manager.rst,
3806 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
3807 doc/gnat_ugn/the_gnat_compilation_model.rst,
3808 doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
3809 doc/gnat_rm/implementation_defined_pragmas.rst,
3810 doc/gnat_rm/the_gnat_library.rst,
3811 doc/gnat_rm/implementation_defined_characteristics.rst: Update doc.
3813 2015-10-20 Arnaud Charlet <charlet@adacore.com>
3815 * gcc-interface/Makefile.in: Update targets.
3817 2015-10-20 Bob Duff <duff@adacore.com>
3819 * sem_ch13.adb (Analyze_One_Aspect): Avoid
3820 analyzing the expression in a 'Disable_Controlled attribute when
3821 Expander_Active is False, because otherwise, we get errors about
3822 nonstatic expressions in pragma-Preelaborate generic packages.
3823 * restrict.ads: minor whitespace cleanup in comment
3825 2015-10-20 Bob Duff <duff@adacore.com>
3827 * a-conhel.adb: Remove "use SAC;", because otherwise the compiler
3828 complains about use clauses in run-time units. Use "use type"
3830 * a-btgbso.adb, a-btgbso.ads, a-cbdlli.adb, a-cbdlli.ads,
3831 * a-cbhama.adb, a-cbhama.ads, a-cbhase.adb, a-cbhase.ads,
3832 * a-cbmutr.adb, a-cbmutr.ads, a-cborma.adb, a-cborma.ads,
3833 * a-cborse.adb, a-cborse.ads, a-cdlili.adb, a-cdlili.ads,
3834 * a-chtgbk.adb, a-chtgbk.ads, a-chtgbo.adb, a-chtgbo.ads,
3835 * a-chtgke.adb, a-chtgke.ads, a-chtgop.adb, a-chtgop.ads,
3836 * a-cidlli.adb, a-cidlli.ads, a-cihama.adb, a-cihama.ads,
3837 * a-cihase.adb, a-cihase.ads, a-cimutr.adb, a-cimutr.ads,
3838 * a-ciorma.adb, a-ciorma.ads, a-ciormu.adb, a-ciormu.ads,
3839 * a-ciorse.adb, a-ciorse.ads, a-cobove.adb, a-cobove.ads,
3840 * a-cohama.adb, a-cohama.ads, a-cohase.adb, a-cohase.ads,
3841 * a-cohata.ads, a-coinve.adb, a-comutr.adb, a-comutr.ads,
3842 * a-convec.adb, a-coorma.adb, a-coorma.ads, a-coormu.adb,
3843 * a-coormu.ads, a-coorse.adb, a-coorse.ads, a-crbltr.ads,
3844 * a-crbtgk.adb, a-crbtgk.ads, a-crbtgo.adb, a-crbtgo.ads,
3845 * a-rbtgbk.adb, a-rbtgbk.ads, a-rbtgbo.adb, a-rbtgbo.ads,
3846 * a-rbtgso.adb, a-rbtgso.ads: Change all the predefined containers
3847 to share the tampering machinery in Ada.Containers.Helpers. This
3848 reduces the amount of duplicated code, and takes advantage of
3849 efficiency improvements in Helpers.
3850 Protect all run-time checks and supporting machinery with "if
3851 Checks" or "if T_Check", so this code can be suppressed with
3852 pragma Suppress or -gnatp.
3853 Add Pseudo_Reference and Get_Element_Access to remaining
3854 containers, so that the compiler can optimize "for ... of" loops.
3856 2015-10-20 Bob Duff <duff@adacore.com>
3858 * a-contai.adb, a-coinve.ads, a-contai.ads, a-conhel.adb, a-conhel.ads,
3859 Makefile.rtl, a-convec.ads: Move helper code from Ada.Containers to a
3860 new package Ada.Containers.Helpers, because otherwise it's not
3861 visible everywhere it needs to be (e.g. in the package
3862 Ada.Containers.Red_Black_Trees, Generic_Tree_Types wants to have
3863 a component of type Tamper_Counts).
3865 2015-10-20 Ed Schonberg <schonberg@adacore.com>
3867 * sem_type.adb (Intersect_Types): Specialize error message when
3868 one operand is a limited view which is a priori incompatible
3869 with all other named types.
3870 * sem_prag.adb: minor fix in comment
3871 * sem_ch13.adb: Code clean up.
3873 2015-10-20 Eric Botcazou <ebotcazou@adacore.com>
3875 * sem_ch12.adb (Need_Subprogram_Instance_Body): Also return true
3876 for a subprogram nested in an inlined subprogram.
3878 2015-10-20 Bob Duff <duff@adacore.com>
3880 * a-coinve.adb, a-contai.adb: Update comments.
3881 * pprint.ads: Minor reformatting.
3883 2015-10-20 Tristan Gingold <gingold@adacore.com>
3885 * env.c, init.c: Handle arm64-darwin like arm-darwin.
3886 * tracebak.c: Handle arm64-darwin.
3888 2015-10-20 Bob Duff <duff@adacore.com>
3890 * s-trasym.adb (Symbolic_Traceback): When giving the traceback
3891 as hexadecimal code addresses, separate by blanks instead of LF.
3893 2015-10-20 Ed Schonberg <schonberg@adacore.com>
3895 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Generate freeze
3896 node for subprogram in Compile_Only mode.
3898 2015-10-20 Dmitriy Anisimkov <anisimko@adacore.com>
3900 * s-atocou.adb, s-atocou.ads, a-contai.adb, a-contai.ads,
3901 s-atocou-x86.adb, s-atocou-builtin.adb: Task safe over container
3904 2015-10-20 Philippe Gil <gil@adacore.com>
3906 * g-debpoo.ads (Dump): NEW print Debug_Pool statistics & main
3908 (Dump_Stdout): NEW print to stdout Debug_Pool statistics &
3910 (Reset): NEW reset counters to 0.
3911 (Get_Size): NEW return size allocated at parameter.
3912 (High_Water_Mark): NEW.
3913 (Current_Water_Mark): NEW.
3914 (System_Memory_Debug_Pool): NEW tell Debug_Pools that
3915 System.Memory uses it.
3916 * g-debpoo.adb (Traceback_Htable_Elem): add Frees, Total_Frees
3918 (Find_Or_Create_Traceback): don't manage in System.Memory
3919 Debug_Pool Deallocate Traceback's.
3920 (Validity): add optional Handled table when System.Memory asked
3921 for Allow_Unhandled_Memory.
3922 (Allocate): handle Allocate reentrancy occuring when System.Memory
3924 (Deallocate): handle when Allow_Unhandled_Memory
3925 is set deallocation of unhandled memory. Dont't check
3926 Size_In_Storage_Elements if equal to Storage_Count'Last. update
3927 Frees, Total_Frees new components.
3929 2015-10-20 Eric Botcazou <ebotcazou@adacore.com>
3931 * fe.h: Minor tweak.
3933 2015-10-20 Vincent Celier <celier@adacore.com>
3935 * sem_cat.adb (Check_Categorization_Dependencies): Do nothing
3936 when -gnatdu is specified.
3938 2015-10-20 Ed Schonberg <schonberg@adacore.com>
3940 * sem_ch8.adb (analyze_Subprogram_Renaming): The actual for a
3941 formal abstract subprogram must have a controlling type.
3942 * stand.ads: Minor whitespace cleanup.
3944 2015-10-20 Gary Dismukes <dismukes@adacore.com>
3946 * sem_ch13.adb: Minor reference change (RM => AARM).
3948 2015-10-20 Eric Botcazou <ebotcazou@adacore.com>
3950 * make.adb (Check): Skip multilib switches reinstated by the
3951 compiler only when counting the number of switches, since it is
3952 what really matters in the regular operating mode.
3954 2015-10-20 Arnaud Charlet <charlet@adacore.com>
3956 * einfo.adb: Add extra assertion for small clause.
3957 * cstand.adb: Minor style fix in comment.
3958 * debug.adb: Minor reformatting.
3959 * exp_util.adb: Fix minor typo.
3961 2015-10-20 Ed Schonberg <schonberg@adacore.com>
3963 * sem_ch12.adb (Same_Instantiated_Function): New predicate in
3964 Check_Formal_Package_Instance, used to verify that the formal
3965 and the actual of an actual package match when both are functions
3966 given as attribute references.
3968 2015-10-20 Bob Duff <duff@adacore.com>
3970 * a-coinve.ads, a-coinve.adb: Do the same efficiency
3971 improvements that were already done in the definite case
3972 (Ada.Containers.Vectors, i.e. a-convec). This includes the
3973 ability to suppress checks, the fast path for Append, inlining
3974 as appropriate, and special-casing of "for ... of" loops. Reuse
3975 the tampering machinery that is now in Ada.Containers. Simplify
3977 * a-convec.ads, a-convec.adb: Change the code to be more similar
3979 * a-finali.ads, a-finali.adb: Expose the "null"-ness of the
3980 operations. This may enable optimizations in the future, and
3981 seems cleaner anyway.
3983 2015-10-20 Ed Schonberg <schonberg@adacore.com>
3985 * sem_ch13.adb (Is_Operational_Item): Attributes related to
3986 Ada 2012 iterators are operational items, and can be specified
3989 2015-10-20 Hristian Kirtchev <kirtchev@adacore.com>
3991 * sem_prag.adb (Check_Usage): Update the calls to Usage_Error.
3992 (Usage_Error): Remove formal parameter Item. Emit a clearer message
3993 concerning a missing dependency item and place it on the related pragma.
3995 2015-10-20 Bob Duff <duff@adacore.com>
3997 * debug.adb, expander.adb: Implement -gnatd.B switch, which
3998 triggers a bug box when an abort_statement is seen. This is
3999 useful for testing Comperr.Compiler_Abort.
4000 * gnat1drv.adb: Trigger bug box on all exceptions other than
4001 Unrecoverable_Error.
4003 2015-10-20 Thomas Quinot <quinot@adacore.com>
4005 * Makefile.rtl: add the following...
4006 * g-binenv.ads, g-binenv.adb: New unit providing runtime access
4007 to bind time captured values ("bind environment")
4008 * init.c: declare new global variable __gl_bind_env_addr.
4009 * bindgen.ads, bindgen.adb (Set_Bind_Env): record a bind
4010 environment key=value pair.
4011 (Gen_Bind_Env_String): helper to produce the bind environment data
4012 called in the binder generated file.
4013 (Gen_Output_File_Ada): Call the above (Gen_Adainit): Set
4014 __gl_bind_env_addr accordingly.
4015 * switch-b.adb: Support for command line switch -V (user interface
4016 to set a build environment key=value pair)
4017 * bindusg.adb: Document the above
4019 2015-10-20 Vincent Celier <celier@adacore.com>
4021 * sem_prag.adb (Analyse_Pragma: Pragma Pure): Do not set the
4022 entity as Pure if Debug_Flag_U is set.
4024 2015-10-20 Bob Duff <duff@adacore.com>
4026 * output.adb (Write_Int): Work with negative numbers in order to avoid
4027 negating Int'First and thereby causing overflow.
4028 * sem_util.adb: Minor comment fix.
4030 2015-10-20 Eric Botcazou <ebotcazou@adacore.com>
4032 * make.adb (Check): Skip multilib switches reinstated by the
4033 compiler when doing the comparison with switches passed to
4036 2015-10-20 Yannick Moy <moy@adacore.com>
4038 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Return
4039 False for procedures marked No_Return.
4040 * sem_util.ads (Enclosing_Declaration): Improve comment.
4041 * einfo.adb (Is_Completely_Hidden): Remove spurious assertion.
4043 2015-10-20 Thomas Quinot <quinot@adacore.com>
4045 * types.ads: Minor reformatting.
4047 2015-10-20 Hristian Kirtchev <kirtchev@adacore.com>
4049 * einfo.adb (Get_Pragma): Minor reformatting. Rename local constant
4050 Is_CDG to Is_CLS. Add pragma Constant_After_Elaboration to the list of
4051 classification pragmas.
4053 2015-10-20 Ed Schonberg <schonberg@adacore.com>
4055 * sem_ch3.adb (Analyze_Declarations); At the of the visible part,
4056 perform name resolution on the expressions in aspects of visible
4058 * sem_ch13.ads, sem_ch13.adb (Resolve_Aspect_Expressions): Resolve
4059 expressions in aspects independently of whether corresponding
4060 entity is frozen. Used to complete name resolution of aspect
4061 expressions for entities declared in the visible part of a
4062 package or generic package declaration.
4064 2015-10-20 Vincent Celier <celier@adacore.com>
4066 * prj-attr.adb: Add package Codepeer and its attributes.
4068 2015-10-20 Thomas Quinot <quinot@adacore.com>
4070 * sem_ch3.adb, sem_ch13.adb: Minor reformatting.
4072 2015-10-20 Eric Botcazou <ebotcazou@adacore.com>
4074 * gnatlink.adb (Gnatlink): Do not translate --RTS switch
4075 for the linker and instead pass the switches that were
4076 reinstated by the compiler.
4078 2015-10-20 Bob Duff <duff@adacore.com>
4080 * a-contai.ads, a-convec.ads: Move Count_Type_Last from
4081 a-convec.ads to a-contai.ads, so other containers can refer to it.
4083 2015-10-20 Ed Schonberg <schonberg@adacore.com>
4085 * sem_ch3.adb (Check_Nonoverridable_Aspects): New procedure within
4086 Analyze_Full_Type_ Declaration, used to apply legality rules in
4087 13,1,1 (18.3.3) concerning aspects that cannot be overridden in
4089 (Check_Duplicate_Aspects): It is not legal to specify the
4090 Implicit_Dereference aspect on a full view if partial view has
4091 known discriminants.
4092 * sem_ch13.adb (Analyze_Aspect_Implicit_Dereference): Verify that
4093 the specification of the aspect on a derived type confirms the
4094 value of the inherited one.
4095 * sem_util.adb (Reference_Discriminant): Return empty if none
4098 2015-10-20 Thomas Quinot <quinot@adacore.com>
4100 * exp_ch5.adb, sem_ch3.adb: Minor reformatting.
4102 2015-10-20 Vincent Celier <celier@adacore.com>
4104 * a-strsup.adb (Super_Trim): Remove statements that put NUL
4105 characters in unused portion of the Data string.
4107 2015-10-16 Hristian Kirtchev <kirtchev@adacore.com>
4109 * aspects.adb Add an entry for Constant_After_Elaboration in
4110 table Canonical_Aspect.
4111 * aspects.ads Add entries for Constant_After_Elaboration in
4112 tables Aspect_Argument, Aspect_Delay, Aspect_Id, Aspect_Names
4113 and Implementation_Defined_Aspect.
4114 * par-prag.adb Pragma Constant_After_Elaboration does not require
4115 special processing by the parser.
4116 * sem_ch13.adb Add an entry for Constant_After_Elaboration
4118 (Analyze_Aspect_Specifications):
4119 Add processing for aspect Constant_After_Elaboration.
4120 (Check_Aspect_At_Freeze_Point): Aspect Constant_After_Elaboration
4121 does not require special processing at freeze time.
4122 * sem_prag.adb (Analyze_Pragma): Add processing for pragma
4123 Constant_After_Elaboration. Use routine Find_Related_Context to
4124 retrieve the context of pragma Part_Of.
4125 (Duplication_Error): Update comment on usage.
4126 (Find_Related_Context): New routine.
4127 * sem_prag.ads Add an entry for Constant_After_Elaboration
4128 in table Aspect_Specifying_Pragma.
4129 (Analyze_Contract_Cases_In_Decl_Part): Update the comment on usage.
4130 * sem_util.adb (Add_Contract_Item): Add processing for pragma
4131 Constant_After_Elaboration.
4132 * sem_util.ads (Add_Contract_Item): Update the comment on usage.
4133 * snames.ads-tmpl Add new predefined name and aspect id for
4134 Constant_After_Elaboration.
4136 2015-10-16 Vincent Celier <celier@adacore.com>
4138 * prj-pp.adb (Pretty_Print.Print): Correctly display extending
4139 packages, instead of making them renamed packages.
4141 2015-10-16 Hristian Kirtchev <kirtchev@adacore.com>
4143 * sem_ch12.adb (Analyze_Package_Instantiation):
4144 Treat a missing SPARK_Mode annotation as having mode "Off".
4145 (Analyze_Subprogram_Instantiation): Treat a missing SPARK_Mode
4146 annotation as having mode "Off".
4147 (Instantiate_Package_Body): Code
4148 reformatting. Treat a missing SPARK_Mode annotation as having mode
4150 (Instantiate_Subprogram_Body): Code reformatting. Treat
4151 a missing SPARK_Mode annotation as having mode "Off".
4153 2015-10-16 Ed Schonberg <schonberg@adacore.com>
4155 * exp_ch5.adb: Code clean up.
4156 * sem_ch13.adb: Minor fix in comment.
4158 2015-10-16 Bob Duff <duff@adacore.com>
4160 * a-exexda.adb: Change format of Exception_Information to be
4161 more like what we print for unhandled exceptions.
4162 * a-exstat.adb: Parse new format.
4163 * a-except-2005.adb, a-except.adb: Document new format.
4165 2015-10-16 Javier Miranda <miranda@adacore.com>
4167 * sem_ch5.adb (Analyze_Iterator_Specification): Associate a
4168 transient scope with the renaming object declararation.
4169 * exp_util.adb (Insert_Actions): if the enclosing interator
4170 loop is marked as requiring the secondary stack then attach the
4171 actions to the transient scope.
4173 2015-10-16 Bob Duff <duff@adacore.com>
4175 * exp_ch7.adb: Minor spelling fixes.
4177 2015-10-16 Ed Schonberg <schonberg@adacore.com>
4179 * sem_ch3.adb (Replace_Anonymous_Access_To_Protected_Subprogram):
4180 If anonymous type is component type of array type declaration,
4181 analyze its declaration in the current scope, not the enclosing
4184 2015-10-16 Gary Dismukes <dismukes@adacore.com>
4186 * prj.adb, sem_util.adb, exp_ch6.adb: Minor reformatting.
4188 2015-10-16 Ed Schonberg <schonberg@adacore.com>
4190 * exp_ch5.adb (Expand_Formal_Container_Element_Loop): Modify
4191 expansion to allow element iteration over formal containers
4192 whose elements are indefinite types.
4194 2015-10-16 Doug Rupp <rupp@adacore.com>
4196 * s-taprop-linux.adb (Monotonic_Clock): Call clock_gettime
4197 instead of gettimeofday.
4198 * s-osinte-android.ads, s-osinte-android.adb, s-osinte-linux.ads
4199 (clock_gettime): New imported subprogram.
4201 2015-10-16 Hristian Kirtchev <kirtchev@adacore.com>
4203 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
4204 Indefinite or limited library level objects are now returned on
4206 * exp_ch7.adb (Build_Finalization_Master): Add formal
4207 parameter For_Lib_Level. Add context specific insertion for a
4208 finalization master created for an access result type related
4209 to a build-in-place function call used to initialize a library
4211 * exp_ch7.ads (Build_Finalization_Master): Add formal parameter
4212 For_Lib_Level. Update the comment on usage.
4213 * sem_util.adb (Mark_Coextensions): Code cleanup.
4215 2015-10-16 Emmanuel Briot <briot@adacore.com>
4217 * prj.adb (For_Every_Project_Imported_Context): Fix handling
4218 of aggregated projects with duplicate names.
4219 * a-ngelfu.ads: Minor whitespace fix.
4221 2015-10-16 Ed Schonberg <schonberg@adacore.com>
4223 * sem_ch13.adb (Build_Predicate_Functions): The expression for
4224 the predicate is side-effect free if it does not contain any
4225 variable references.
4227 2015-10-16 Bob Duff <duff@adacore.com>
4229 * a-convec.adb ("="): Previous version depended
4230 on "=" composing, but that doesn't quite work -- we want the "="
4231 operator passed in to the generic. So we need a loop after all.
4233 2015-10-16 Yannick Moy <moy@adacore.com>
4235 * sem_util.adb (Is_Object_Reference): Attribute 'Loop_Entry produces
4237 * sem_ch6.adb: Minor fix in comment.
4239 2015-10-16 Bob Duff <duff@adacore.com>
4241 * a-contai.ads: Add two check names: Container_Checks and
4242 Tampering_Check. Move the tampering check machinery from
4243 Ada.Containers.Vectors to Ada.Containers. Later we can share it
4244 with other containers.
4245 Disable the tampering machinery in the presence of
4246 Suppress(Tampering_Check).
4247 Simplify the implementation of tampering checks. E.g. use RAII
4248 to make incrementing/decrementing of the counts more concise.
4249 * a-contai.adb: New package body, implementing the above.
4250 * a-convec.ads, a-convec.adb: Use tampering check machinery
4252 Disable all checking code when checks are suppressed.
4253 Simplify many of the operations. Implement "&" in terms of Append,
4254 rather than "by hand".
4255 Remove: function "=" (L, R : Elements_Array) return Boolean is
4256 abstract; so we can call the predefined "=" on Elements_Array.
4257 For "=" on Vectors: Previously, we returned True immediately if
4258 Left'Address = Right'Address. That seems like a non-optimization
4259 ("if X = X" is unusual), so removed that. Simplify by using
4260 slice comparison ("=" on Element_Array will automatically call
4261 "=" on the components, even if user defined).
4263 2015-10-16 Ed Schonberg <schonberg@adacore.com>
4265 * sem_ch13.adb (Chek_Record_Representation_Clause): When
4266 iterating over components, skip anonymous subtypes created for
4267 constrained array components.
4269 2015-10-16 Eric Botcazou <ebotcazou@adacore.com>
4271 * a-tags.ads (Parent_Size): Remove obsolete pragma Export.
4272 * s-finmas.ads (Header_Offset): Delete.
4273 * s-finmas.adb (Header_Offset): Likewise.
4274 (Finalize): Call Header_Size instead of Header_Offset.
4275 * s-stposu.adb (Allocate_Any_Controlled): Likewise.
4276 (Deallocate_Any_Controlled): Likewise.
4278 2015-10-16 Arnaud Charlet <charlet@adacore.com>
4280 * a-exetim.ads, a-exetim-mingw.ads, a-exetim-default.ads: Whitespace
4282 * s-osprim-mingw.adb, einfo.ads, sem_util.adb, sem_util.ads,
4283 sem_ch4.adb, sem_ch13.adb, s-trasym.adb, s-trasym.ads,
4284 s-taprop-posix.adb: Minor reformatting.
4286 2015-10-16 Bob Duff <duff@adacore.com>
4288 * adadecode.h, adadecode.c (ada_demangle): Remove
4289 ada_demangle, no longer used.
4290 * a-except-2005.adb: Bring System.Traceback.Symbolic into the
4293 2015-10-16 Ed Schonberg <schonberg@adacore.com>
4295 * sem_util.adb, sem_util.ads (Get_Reference_Discriminant): Utility to
4296 locate the access discriminant that supports implicit dereference on a
4298 (Is_OK_Variable_For_Out_Parameter): Reject other illegal uses
4299 of Implicit_Dereference on an access_to_constant when actual
4300 parameter is a rewritten variable or function call.
4302 2015-10-16 Bob Duff <duff@adacore.com>
4304 * a-tags.adb, s-trasym.adb, s-trasym.ads: Make sure we don't get
4305 elaboration circularities when polling is turned on.
4307 2015-10-16 Ed Schonberg <schonberg@adacore.com>
4309 * sem_ch3.adb (Replace_Anonymous_Access_To_Protected_Subprogram):
4310 When creating a full declaration for a formal parameter, the
4311 entity is labelled as an Itype, so set Associated_Node_For_Itype
4313 * einfo.ads: Clarify use of Associated_Node_For_Itype.
4315 2015-10-16 Bob Duff <duff@adacore.com>
4317 * bindgen: Move pragmas Warnings earlier, otherwise
4318 we can get warnings on with_clauses.
4320 2015-10-16 Arnaud Charlet <charlet@adacore.com>
4322 * s-osprim-mingw.adb, s-osprim-x32.adb, s-taprop-mingw.adb,
4323 s-taprop-posix.adb (Monotonic_Clock): Removed, not used.
4324 Remove remaining references to OS_Primitives.Monotonic_Clock.
4325 Keep it only on windows which is a special case.
4327 2015-10-16 Javier Miranda <miranda@adacore.com>
4329 * a-textio.adb (Get_Line): Fix documentation.
4330 * einfo.ads (Interface_Name): Fix documentation.
4331 * exp_aggr.adb (Backend_Processing_Possible): Fix documentation.
4332 * exp_ch4.adb (Expand_N_In): Fix documentation.
4334 2015-10-16 Eric Botcazou <ebotcazou@adacore.com>
4336 * inline.adb (Subp_Info): Remove Listed component.
4337 (Add_Inlined_Subprogram): Take an entity instead of an index.
4338 Do not set Listed component to True.
4339 (New_Entry): Do not initialize Listed component to False.
4340 (Analyze_Inlined_Bodies): Do not test Listed component
4341 (Must_Inline): Add calls not in the main unit only
4342 if they are in a subprogram that can be inlined outside its unit.
4343 (Add_Inlined_Body): Move test around and add comment.
4345 2015-10-16 Arnaud Charlet <charlet@adacore.com>
4347 * sinfo.ads, einfo.ads: monir clean ups.
4349 2015-10-16 Arnaud Charlet <charlet@adacore.com>
4351 * usage.adb, debug.adb, a-except.adb, a-except.ads, a-except-2005.adb,
4352 a-except-2005.ads, s-imgrea.adb: Minor code clean ups related to
4353 jgnat/dotnet removal.
4355 2015-10-16 Arnaud Charlet <charlet@adacore.com>
4357 * s-osprim-vxworks.adb, s-osprim-darwin.adb, s-tadeca.adb,
4358 s-osprim-unix.adb, s-osprim-solaris.adb, s-osprim-posix.adb,
4359 s-osprim.ads (Monotonic_Clock): Removed, unused.
4361 2015-10-16 Ed Schonberg <schonberg@adacore.com>
4363 * sem_ch4.adb (Try_Object_Operation, Try_One_Interpretation):
4364 Do not reset the Obj_Type of the prefix if an interpretation
4365 involves an untagged type, to prevent a crash when analyzing an
4366 illegal program in All_Errors mode.
4368 2015-10-16 Hristian Kirtchev <kirtchev@adacore.com>
4370 * exp_ch4.adb (Expand_N_Expression_With_Actions):
4371 Force the evaluation of the expression when its type is Boolean.
4372 (Force_Boolean_Evaluation): New routine.
4374 2015-10-16 Bob Duff <duff@adacore.com>
4376 * sem_util.adb (Has_Discrim_Dep_Array): Remove
4377 this function, and the call. No longer needed now that the back
4378 end can handle such things. Should result in further speedups
4381 2015-10-16 Ed Schonberg <schonberg@adacore.com>
4383 * sem_ch13.adb (Build_Predicate_Functions): If expression for
4384 predicate is side-effect free, indicate that the predicate
4385 function is pure, to allow for optimization of redundant
4388 2015-10-16 Arnaud Charlet <charlet@adacore.com>
4390 * checks.adb: Fix typo.
4391 * s-osinte-linux.ads: Add header.
4392 * projects.texi: Removed, no longer used.
4393 * gcc-interface/Make-lang.in: Update dependencies
4394 * s-multip.adb: Minor: fix header.
4395 * sem_ch3.adb, exp_ch7.adb, g-dirope.ads, sinfo.ads, types.ads,
4396 a-textio.adb, s-exctra.adb, ali.adb, back_end.ads, exp_intr.adb,
4397 a-tigeli.adb, exp_ch3.adb, s-os_lib.ads: Remove further references to
4399 * gnatlink.adb, opt.ads, exp_aggr.adb, s-solita.adb: Minor comment
4402 2015-10-16 Gary Dismukes <dismukes@adacore.com>
4404 * exp_ch9.adb (Build_Simple_Entry_Call): Set_Is_Internal on
4405 the temporary object used for a by-copy entry parameter, to
4406 ensure that the object doesn't get its No_Initialization flag
4407 reset later in Default_Initialize_Object. Also, generate the
4408 assignment of the actual to the temporary in the additional case
4409 of a scalar out parameter whose type has a Default_Value aspect.
4410 * exp_ch3.adb: Fix minor typo in comment.
4412 2015-10-16 Hristian Kirtchev <kirtchev@adacore.com>
4414 * exp_util.adb, sem_util.ads, sem_ch6.adb, sem_ch7.adb, sem_ch8.adb:
4416 * sem_ch12.adb (Analyze_Formal_Package_Declaration): Set the
4417 SPARK_Mode from the context.
4419 2015-10-16 Bob Duff <duff@adacore.com>
4421 * sem_util.adb (Requires_Transient_Scope):
4422 If Typ is a generic formal incomplete type, look at the actual
4423 type. Otherwise, we don't notice that the actual type is tagged,
4424 has a variant part, etc, causing a mismatch of calling conventions
4425 between caller and callee.
4427 2015-10-16 Hristian Kirtchev <kirtchev@adacore.com>
4429 * einfo.ads: Move the declaration of enumeration
4430 literal E_Abstract_State above E_Entry. Update the upper bound
4431 of subtype Overloadable_Kind.
4433 2015-10-16 Gary Dismukes <dismukes@adacore.com>
4435 * exp_attr.adb: Minor editorial changes.
4437 2015-10-16 Arnaud Charlet <charlet@adacore.com>
4439 * exp_ch5.adb, sem_ch3.adb, frontend.adb, exp_ch7.adb, exp_ch7.ads,
4440 sem_ch5.adb, sem_type.adb, exp_util.adb, exp_util.ads, comperr.adb,
4441 exp_attr.adb, sinfo.ads, exp_ch9.adb, make.adb, usage.adb,
4442 lib-writ.adb, sem_ch9.adb, bindgen.adb, debug.adb, einfo.adb,
4443 einfo.ads, types.ads, checks.adb, sem_prag.adb, s-tasini.adb,
4444 rtsfind.ads, freeze.adb, sem_util.adb, sem_util.ads, exp_dbug.adb,
4445 gnatlink.adb, gnat1drv.adb, targparm.adb, targparm.ads, exp_ch4.adb,
4446 exp_ch11.adb, repinfo.adb, s-soflin.adb, s-soflin.ads, exp_ch6.adb,
4447 exp_ch13.adb, sem_mech.adb, sem_ch6.adb, par-prag.adb, exp_disp.adb,
4448 sem_ch8.adb, exp_disp.ads, snames.adb-tmpl, exp_aggr.adb, sem_eval.adb,
4449 exp_intr.adb, sem_ch13.adb, snames.ads-tmpl, sem_disp.adb, exp_ch3.adb:
4450 Code clean up: remove special handling for .NET and JVM.
4452 2015-10-16 Arnaud Charlet <charlet@adacore.com>
4454 * sem_ch12.adb: Minor punctuation fix in comment
4455 * s-rident.ads: Minor consistency fix in comment
4456 * exp_attr.adb, g-spipat.ads: punctuation fixes in comments.
4457 * restrict.ads: Style fix in comments.
4458 * sem_prag.adb: Minor grammar fix in comment
4460 2015-10-16 Gary Dismukes <dismukes@adacore.com>
4462 * sem_ch12.adb: Minor reformatting/rewording.
4464 2015-10-16 Arnaud Charlet <charlet@adacore.com>
4466 * einfo.ads: Minor fix of duplicate words
4467 * rident.ads: Minor style fix in comment
4469 2015-10-16 Hristian Kirtchev <kirtchev@adacore.com>
4471 * exp_ch3.adb (Expand_N_Full_Type_Declaration): Do not capture,
4472 set and restore the Ghost mode.
4473 (Expand_N_Object_Declaration): Do not capture, set and restore the
4475 (Freeze_Type): Redo the capture and restore of the Ghost mode.
4476 (Restore_Globals): Removed.
4477 * exp_ch5.adb (Expand_N_Assignment_Statement): Redo the capture
4478 and restore of the Ghost mode.
4479 (Restore_Globals): Removed.
4480 * exp_ch6.adb (Expand_N_Procedure_Call_Statement):
4481 Redo the capture and restore of the Ghost mode.
4482 (Expand_N_Subprogram_Body): Redo the capture, set and restore
4484 (Expand_N_Subprogram_Declaration): Do not
4485 capture, set and restore the Ghost mode.
4486 (Restore_Globals): Removed.
4487 * exp_ch7.adb (Expand_N_Package_Body): Redo the capture, set
4488 and restore of the Ghost mode.
4489 (Expand_N_Package_Declaration): Do not capture, set and restore the
4491 * exp_ch8.adb (Expand_N_Exception_Renaming_Declaration):
4492 Redo the capture and restore of the Ghost mode.
4493 (Expand_N_Object_Renaming_Declaration): Redo
4494 the capture and restore of the Ghost mode.
4495 (Expand_N_Package_Renaming_Declaration):
4496 Redo the capture and restore of the Ghost mode.
4497 (Expand_N_Subprogram_Renaming_Declaration): Redo the capture
4498 and restore of the Ghost mode.
4499 * exp_ch11.adb Remove with and use clauses for Ghost.
4500 (Expand_N_Exception_Declaration): Do not capture, set and restore
4502 * exp_disp.adb (Make_DT): Redo the capture and restore of the
4504 (Restore_Globals): Removed.
4505 * exp_prag.adb (Expand_Pragma_Check): Do not capture, set
4506 and restore the Ghost mode.
4507 (Expand_Pragma_Contract_Cases):
4508 Redo the capture and restore of the Ghost mode. Preserve the
4509 original context of contract cases by setting / resetting the
4510 In_Assertion_Expr counter.
4511 (Expand_Pragma_Initial_Condition):
4512 Redo the capture and restore of the Ghost mode.
4513 (Expand_Pragma_Loop_Variant): Redo the capture and restore of
4515 (Restore_Globals): Removed.
4516 * exp_util.adb (Make_Predicate_Call): Redo the capture and
4517 restore of the Ghost mode.
4518 (Restore_Globals): Removed.
4519 * freeze.adb (Freeze_Entity): Redo the capture and restore of
4521 (Restore_Globals): Removed.
4522 * ghost.adb (Check_Ghost_Context): Remove the RM reference from
4524 (Is_OK_Statement): Account for statements
4525 that appear in assertion expressions.
4526 (Is_Subject_To_Ghost):
4528 * ghost.ads (Is_Subject_To_Ghost): Moved to body.
4529 * rtsfind.ads (Load_RTU): Redo the capture and restore of the
4531 * sem.adb Add with and use clauses for Ghost.
4533 the capture and restore of the Ghost mode. Set the Ghost mode
4534 when analyzing a declaration.
4535 (Do_Analyze): Redo the capture
4536 and restore of the Ghost mode.
4537 * sem_ch3.adb (Analyze_Full_Type_Declaration): Do not capture, set
4538 and restore the Ghost mode.
4539 (Analyze_Incomplete_Type_Decl):
4540 Do not capture, set and restore the Ghost mode.
4541 (Analyze_Number_Declaration): Do not capture, set and restore the
4543 (Analyze_Object_Declaration): Do not capture, set and
4544 restore the Ghost mode.
4545 (Analyze_Private_Extension_Declaration):
4546 Do not capture, set and restore the Ghost mode.
4547 (Analyze_Subtype_Declaration): Do not capture, set and restore
4549 (Restore_Globals): Removed.
4550 * sem_ch5.adb (Analyze_Assignment): Redo the capture and restore
4552 (Restore_Globals): Removed.
4553 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration):
4554 Do not capture, set and restore the Ghost mode.
4555 (Analyze_Procedure_Call): Redo the capture and restore of the
4557 (Analyze_Subprogram_Body_Helper): Redo the capture
4558 and restore of the Ghost mode. (Analyze_Subprogram_Declaration):
4559 Do not capture, set and restore the Ghost mode.
4560 (Restore_Globals): Removed.
4561 * sem_ch7.adb (Analyze_Package_Body_Helper): Redo the capture and
4562 restore of the Ghost mode.
4563 (Analyze_Package_Declaration):
4564 Do not capture, set and restore the Ghost mode.
4565 (Analyze_Private_Type_Declaration): Do not capture, set and
4566 restore the Ghost mode.
4567 (Restore_Globals): Removed.
4568 * sem_ch8.adb (Analyze_Exception_Renaming): Do not capture,
4569 set and restore the Ghost mode.
4570 (Analyze_Generic_Renaming): Do not capture, set and restore the Ghost
4572 (Analyze_Object_Renaming): Do not capture, set and restore the
4574 (Analyze_Package_Renaming): Do not capture, set and restore the Ghost
4576 (Analyze_Subprogram_Renaming): Do not capture, set and restore the
4578 (Restore_Globals): Removed.
4579 * sem_ch11.adb (Analyze_Exception_Declaration): Do not capture,
4580 set and restore the Ghost mode.
4581 * sem_ch12.adb (Analyze_Generic_Package_Declaration):
4582 Do not capture, set and restore the Ghost mode.
4583 (Analyze_Generic_Subprogram_Declaration): Do not capture, set
4584 and restore the Ghost mode.
4585 * sem_ch13.adb (Build_Invariant_Procedure_Declaration): Redo
4586 the capture and restore of the Ghost mode.
4587 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
4588 Redo the capture and restore of the Ghost mode.
4589 (Analyze_External_Property_In_Decl_Part):
4590 Redo the capture and restore of the Ghost mode.
4591 (Analyze_Initial_Condition_In_Decl_Part): Redo the
4592 capture and restore of the Ghost mode. (Analyze_Pragma):
4593 Do not capture, set and restore the Ghost mode for Assert.
4594 Redo the capture and restore of the Ghost mode for Check. Do
4595 not capture and restore the Ghost mode for Invariant.
4596 (Analyze_Pre_Post_Condition_In_Decl_Part): Redo the capture and
4597 restore of the Ghost mode.
4598 * sem_res.adb (Resolve): Capture, set and restore the Ghost mode
4599 when resolving a declaration.
4600 * sem_util.adb (Build_Default_Init_Cond_Procedure_Body):
4601 Redo the capture and restore of the Ghost mode.
4602 (Build_Default_Init_Cond_Procedure_Declaration): Redo the capture
4603 and restore of the Ghost mode.
4605 2015-10-16 Bob Duff <duff@adacore.com>
4607 * debug.adb: Document -gnatdQ switch.
4609 2015-10-16 Ed Schonberg <schonberg@adacore.com>
4611 * sem_ch12.adb (Analyze_Formal_Subprogram): Implement rule that
4612 a formal abstract subprogram cannot have a null default: RM 12.6
4615 2015-10-16 Bob Duff <duff@adacore.com>
4617 * sem_util.ads, sinput.ads, bcheck.adb: Minor comment fixes.
4619 2015-10-16 Javier Miranda <miranda@adacore.com>
4621 * inline.adb (Add_Inlined_Body): Ensure that
4622 Analyze_Inlined_Bodies will be invoked after completing the
4623 analysis of the current unit.
4625 2015-10-16 Arnaud Charlet <charlet@adacore.com>
4627 * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order): Fix error
4628 message for bad last bit position.
4629 * sem_ch3.adb, sem_util.adb, sem_util.ads: Minor reformatting.
4631 2015-10-16 Ed Schonberg <schonberg@adacore.com>
4633 * exp_ch5.adb (Expand_N_Case_Statement): If expression is
4634 compile-time known but does not obey a static predicate on
4635 its type, replace the case statement with a raise statement,
4636 as with other statically detected constraint violations.
4638 2015-10-16 Bob Duff <duff@adacore.com>
4640 * s-traceb.adb, s-traceb.ads, s-traceb-hpux.adb, s-traceb-mastop.adb:
4642 * opt.ads: Minor typo.
4644 2015-10-16 Ed Schonberg <schonberg@adacore.com>
4646 * sem_util.adb (Gather_Components): When gathering components
4647 of a nested variant, the record type used in legality checks is
4648 the enclosing record type.
4650 2015-10-13 Jakub Jelinek <jakub@redhat.com>
4652 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10,
4653 DEF_FUNCTION_TYPE_11): Define.
4655 2015-10-09 Eric Botcazou <ebotcazou@adacore.com>
4657 * gcc-interface/Make-lang.in: Make sure that GNAT1_OBJS and not just
4658 GNAT1_ADA_OBJS are compiled only after generated files are created.
4660 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
4662 * gcc-interface/trans.c (convert_with_check): Use real_arithmetic
4663 instead of REAL_ARITHMETIC.
4665 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
4667 * gcc-interface/trans.c (convert_with_check): Use real_less instead
4668 of REAL_VALUES_LESS.
4670 2015-10-02 Doug Rupp <rupp@adacore.com>
4671 Olivier Hainque <hainque@adacore.com>
4673 * gcc-interface/lang.opt (fbuiltin-printf): Accept.
4674 * gcc-interface/misc.c (gnat_handle_option): Ignore it.
4675 * gcc-interface/lang-specs.h (@ada, @adawhy, @adascil): Propagate -f*
4676 flags as -g* and -m* flags past -gnatez.
4678 2015-10-02 Eric Botcazou <ebotcazou@adacore.com>
4680 * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Warnings>: Replace
4681 linear search with call to find_opt and issue warnings if the -W
4682 switch is not appropriate.
4684 2015-10-02 Eric Botcazou <ebotcazou@adacore.com>
4686 * gcc-interface/ada-tree.h (DECL_RESTRICTED_ALIASING_P): New flag.
4687 * gcc-interface/decl.c (gnat_to_gnu_param): For parameters passed by
4688 reference but whose type isn't by-ref and whose mechanism hasn't been
4689 forced to by-ref, set the DECL_RESTRICTED_ALIASING_P flag directly on
4690 them instead of changing their type.
4691 * gcc-interface/trans.c (scan_rhs_r): New helper function.
4692 (independent_iterations_p): New predicate.
4693 (Loop_Statement_to_gnu): For a loop with an iteration scheme, set an
4694 ivdep pragma if the iterations are independent.
4696 2015-10-02 Eric Botcazou <ebotcazou@adacore.com>
4698 * gcc-interface/trans.c (find_loop_for): Use FOR_EACH_VEC_ELT_REVERSE.
4699 (Loop_Statement_to_gnu): Use FOR_EACH_VEC_ELT.
4700 (finalize_nrv): Use FOR_EACH_VEC_SAFE_ELT and initialize field.
4701 (build_stmt_group): Add blank lines.
4703 2015-09-30 Thomas Schwinge <thomas@codesourcery.com>
4705 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_11): Don't define.
4707 2015-09-28 Tom de Vries <tom@codesourcery.com>
4709 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_6): Define.
4711 2015-09-17 Eric Botcazou <ebotcazou@adacore.com>
4713 * gcc-interface/trans.c (emit_check): Do not touch TREE_SIDE_EFFECTS.
4715 2015-09-14 Pierre-Marie de Rodat <derodat@adacore.com>
4717 * gcc-interface/misc.c (gnat_post_options): Issue a warning if
4718 generating STABS debugging information when not the default.
4720 2015-09-14 Eric Botcazou <ebotcazou@adacore.com>
4722 * gcc-interface/gigi.h (ref_filename): Delete.
4723 (Sloc_to_locus): Add clean_column parameter defaulting to false.
4724 (build_call_raise): Adjust comment.
4725 (build_call_raise_range): Move around.
4726 * gcc-interface/trans.c (ref_filename): Delete.
4727 (gigi): Fix formatting.
4728 (block_end_locus_sink): Delete.
4729 (Sloc_to_locus1): Tidy up and reformat. Rename into...
4730 (Sloc_to_locus): ...this. Add default for clean_colmun parameter.
4731 (set_expr_location_from_node1): Rename into...
4732 (set_expr_location_from_node): ...this.
4733 (set_end_locus_from_node): Move around. Adjust for renaming.
4734 (Handled_Sequence_Of_Statements_to_gnu): Likewise.
4735 (add_cleanup): Likewise.
4736 * gcc-interface/utils2.c (expand_sloc): New static function.
4737 (build_call_raise): Call it.
4738 (build_call_raise_column): Likewise.
4739 (build_call_raise_range): Likewise. Move around.
4741 2015-09-14 Eric Botcazou <ebotcazou@adacore.com>
4743 * gcc-interface/utils2.c (gnat_rewrite_reference) <COMPOUND_EXPR>: Add
4744 another acceptable pattern for the RHS.
4746 2015-07-24 Micahel Darling <darlingm@gmail.com>
4749 * prj-nmsc.adb: Reflects renaming of configure.in to configure.ac
4750 * gcc-interface/Makefile.in: Likewise
4752 2015-07-12 Aldy Hernandez <aldyh@redhat.com>
4754 * gcc-interface/utils.c: Fix double word typos.
4755 * gnat_ugn.texi: Same.
4758 * projects.texi: Same.
4759 * sem_ch4.adb: Same.
4760 * sem_ch6.adb: Same.
4761 * sem_dim.adb: Same.
4762 * sem_eval.adb: Same.
4763 * sem_prag.adb: Same.
4764 * sem_warn.adb: Same.
4766 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
4768 * gcc-interface/cuintp.c: Adjust includes.
4769 * gcc-interface/decl.c: Likewise.
4770 * gcc-interface/misc.c: Likewise.
4771 * gcc-interface/targtyps.c: Likewise.
4772 * gcc-interface/trans.c: Likewise.
4773 * gcc-interface/utils.c: Likewise.
4774 * gcc-interface/utils2.c: Likewise.
4776 2015-07-06 John Marino <gnugcc@marino.st>
4778 * s-oscons-tmplt.c: Add support for DragonFly alongside FreeBSD.
4780 2015-06-29 Eric Botcazou <ebotcazou@adacore.com>
4783 * gcc-interface/utils.c (gnat_write_global_declarations): Always
4784 build the dummy global variable if code was generated.
4786 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4789 * gcc-interface/misc.c (gnat_post_options): No need to disable
4790 warn_unused_parameter anymore.
4792 2015-06-26 Eric Botcazou <ebotcazou@adacore.com>
4794 * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): When
4795 not optimizing the CFG, clear the DECL_DECLARED_INLINE_P flag on the
4798 2015-06-26 Eric Botcazou <ebotcazou@adacore.com>
4800 * gcc-interface/gigi.h (note_types_used_by_globals): Delete.
4801 (gnat_write_global_declarations): New prototype.
4802 * gcc-interface/utils.c (type_decls): Rename back to...
4803 (global_decls): ...this.
4804 (gnat_pushdecls): Revert previous change.
4805 (create_var_decl): Do not output global variables.
4806 (note_types_used_by_globals): Rename back to...
4807 (gnat_write_global_declarations): ...this. Output variables on the
4808 global_decls vector.
4809 * gcc-interface/misc.c (gnat_parse_file): Adjust to above renaming.
4811 2015-06-26 Eric Botcazou <ebotcazou@adacore.com>
4813 * gcc-interface/gigi.h (create_var_decl_1): Rename into...
4814 (create_var_decl): ...this. Add default value for last parameter.
4815 (create_type_stub_decl): Adjust.
4816 (create_type_decl): Likewise.
4817 (create_field_decl): Likewise.
4818 (create_param_decl): Likewise.
4819 (create_label_decl): Likewise.
4820 (create_subprog_decl): Likewise.
4821 * gcc-interface/utils.c (create_var_decl_1): Rename into...
4822 (create_var_decl): ...this. Rename var_name into name and var_init
4823 into init, move const_decl_allowed_p last and adjust accordingly.
4824 (create_type_stub_decl): Rename type_name into name and adjust.
4825 (create_type_decl): Likewise.
4826 (create_field_decl): Likewise for field_name and field_type.
4827 (create_param_decl): Likewise for param_name and param_type.
4828 (create_label_decl): Likewise for label_name.
4829 (create_subprog_decl): Likewise for subprog_name and subprog_type.
4830 * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust couple of calls
4831 to create_var_decl_1.
4833 2015-06-26 Eric Botcazou <ebotcazou@adacore.com>
4835 * gcc-interface/trans.c (loop_info_d): Add low_bound, high_bound,
4836 artificial, has_checks and warned_aggressive_loop_optimizations.
4837 (gigi): Set warn_aggressive_loop_optimizations to 0.
4838 (inside_loop_p): New inline predicate.
4839 (push_range_check_info): Rename into...
4840 (find_loop_for): ...this and do not push range_check_info_d object.
4841 (Loop_Statement_to_gnu): Set artificial, low_bound and high_bound
4842 fields of gnu_loop_info. Adjust detection of checks enabled by
4843 -funswitch-loops and adds one for -faggressive-loop-optimizations.
4844 (gnat_to_gnu) <N_Indexed_Component>: If aggressive loop optimizations
4845 are enabled, warn for loops overrunning an array of size 1 not at the
4848 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
4850 * gcc-interface/trans.c: Remove ipa-ref.h and plugin-api.h from include
4852 * gcc-interface/utils.c: Likewise.
4854 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
4856 * gcc-interface/decl.c (value_annotation_hasher): Inherit from
4857 ggc_cache_ptr_hash rather than ggc_cache_hasher.
4858 * gcc-interface/utils.c (pad_type_hasher): Likewise.
4860 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
4862 * gcc-interface/decl.c (value_annotation_hasher::handle_cache_entry):
4864 (value_annotation_hasher::keep_cache_entry): New function.
4865 * gcc-interface/utils.c (pad_type_hasher::handle_cache_entry):
4867 (pad_type_hasher::keep_cache_entry): New function.
4869 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
4871 * gcc-interface/misc.c: Include calls.h not function.h.
4873 2015-06-19 Eric Botcazou <ebotcazou@adacore.com>
4875 * gcc-interface/gigi.h (record_builtin_type): Adjust comment.
4876 (tree create_type_decl): Likewise.
4877 (create_var_decl_1): Add artificial_p and debug_info_p parameters.
4878 (create_var_decl): Likewise.
4879 (create_true_var_decl): Delete.
4880 (create_subprog_decl): Add debug_info_p parameter.
4881 * gcc-interface/decl.c (gnat_to_gnu_entity): Add artificial_p local
4882 variable and use it throughout. Remove DECL_ARTIFICIAL settings.
4883 <E_Variable>: Adjust calls to create_var_decl and create_var_decl_1.
4884 Remove DECL_IGNORED_P settings.
4885 <E_Enumeration_Type>: Likewise.
4886 <E_Record_Type>: Likewise.
4887 <E_Subprogram_Type>: Likewise. Remove artificial_flag local variable.
4888 Adjust call to create_subprog_decl.
4889 (get_minimal_subprog_decl): Likewise.
4890 (elaborate_expression_1): Adjust call to create_var_decl.
4891 * gcc-interface/trans.c (gigi): Adjust calls to create_var_decl and
4892 create_subprog_decl. Remove DECL_ARTIFICIAL & DECL_IGNORED_P settings.
4893 * gcc-interface/utils.c (maybe_pad_type): Likewise.
4894 (record_builtin_type): Adjust comment.
4895 (create_type_stub_decl): Remove obsolete comment.
4896 (create_var_decl_1): Add artificial_p and debug_info_p parameters.
4897 Set DECL_ARTIFICIAL and DECL_IGNORED_P accordingly.
4898 (create_subprog_decl): Add debug_info_p parameter. Set DECL_IGNORED_P
4901 2015-06-19 Eric Botcazou <ebotcazou@adacore.com>
4903 * gcc-interface/misc.c (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): Define.
4905 2015-06-19 Eric Botcazou <ebotcazou@adacore.com>
4907 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Make sure
4908 the size of a padding type built around the return type is positive.
4909 * gcc-interface/trans.c (gnat_to_gnu) <N_Simple_Return_Statement>:
4910 Use INIT_EXPR instead of MODIFY_EXPR to assign to the return object.
4912 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
4914 * gcc-interface/cuintp.c: Do not include input.h, line-map.h or is-a.h.
4915 * gcc-interface/decl.c: Likewise.
4916 * gcc-interface/misc.c: Likewise.
4917 * gcc-interface/targtyps.c: Likewise.
4918 * gcc-interface/trans.c: Likewise.
4919 * gcc-interface/utils.c: Likewise.
4920 * gcc-interface/utils2.c: Likewise.
4922 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
4924 * gcc-interface/utils.c (get_global_context): Register the main
4925 translation unit through the new debug hook.
4927 2015-06-09 Eric Botcazou <ebotcazou@adacore.com>
4929 * gcc-interface/misc.c: Remove duplicate include directives.
4930 * gcc-interface/trans.c: Likewise.
4931 * gcc-interface/utils.c: Likewise.
4933 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
4935 * gcc-interface/cuintp.c : Adjust include files.
4936 * gcc-interface/decl.c : Likewise.
4937 * gcc-interface/misc.c : Likewise.
4938 * gcc-interface/targtyps.c : Likewise.
4939 * gcc-interface/trans.c : Likewise.
4940 * gcc-interface/utils.c : Likewise.
4941 * gcc-interface/utils2.c : Likewise.
4943 2015-06-08 John Marino <gnugcc@marino.st>
4945 * a-intnam-dragonfly.ads: New.
4946 * s-osinte-dragonfly.adb: Likewise.
4947 * s-osinte-dragonfly.ads: Likewise.
4948 * system-dragonfly-x86_64.ads: Likewise.
4949 * adaint.c: Add BSD macros.
4950 * cstreams.c: Likewise.
4951 * gsocket.h: Likewise.
4953 * socket.c: Likewise.
4954 * env.c: Add __DragonFly__, remove __FreeBSD__ macro.
4955 * init.c: Add __DragonFly__, change __gnat_install_handler
4956 prototype from empty to void.
4957 * initialize.c: Add __DragonFly__.
4958 * sysdep.c: Likewise.
4959 * s-osinte-freebsd.adb: Use __get_errno instead of __error.
4960 * tracebak.c: Set unwinder for i386 BSD.
4961 * gcc-interface/Makefile.in: Add x86_64 DragonFly, tweak
4962 x86_64 FreeBSD and x86 FreeBSD.
4964 2015-06-06 Eric Botcazou <ebotcazou@adacore.com>
4966 * gcc-interface/utils.c (note_types_used_by_globals): Tweak comment.
4967 * gcc-interface/decl.c (gnat_to_gnu_entity): Likewise.
4969 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
4971 * gcc-interface/gigi.h (note_types_used_by_globals): Rename from
4972 gnat_write_global_declarations.
4973 * gcc-interface/misc.c (gnat_parse_file): Call
4974 note_types_used_by_globals.
4975 Remove LANG_HOOKS_WRITE_GLOBALS.
4976 * gcc-interface/utils.c: Rename global_decls to type_decls.
4977 (gnat_write_global_declarations): Rename
4978 to note_types_used_by_globals.
4979 Remove call to finalize_compilation_unit.
4980 Remove call to debug_hooks->global_decl for globals.
4981 (gnat_pushdecls): Only insert into type_decls if TYPE_DECL.
4983 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
4985 * gcc-interface/cuintp.c: Adjust includes for restructured coretypes.h.
4986 * gcc-interface/decl.c: Likewise.
4987 * gcc-interface/misc.c: Likewise.
4988 * gcc-interface/targtyps.c: Likewise.
4989 * gcc-interface/trans.c: Likewise.
4990 * gcc-interface/utils.c: Likewise.
4991 * gcc-interface/utils2.c: Likewise.
4993 2015-06-04 Pierre-Marie de Rodat <derodat@adacore.com>
4995 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: If
4996 processing a definition, create definitions for padding types
4997 around return types.
4999 2015-06-03 Eric Botcazou <ebotcazou@adacore.com>
5001 * gcc-interface/utils.c (copy_type): Also set TYPE_CANONICAL.
5003 2015-06-03 Eric Botcazou <ebotcazou@adacore.com>
5005 * gcc-interface/trans.c (gnat_to_gnu) <N_Simple_Return_Statement>: Fix
5006 typo in latest change.
5008 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
5010 * gcc-interface/Makefile.in: Fix ARM/Darwin configuration.
5012 2015-06-01 Pierre-Marie de Rodat <derodat@adacore.com>
5014 * gcc-interface/utils.c (scale_by_factor_of): When handling a function
5015 call expression, process the corresponding function body. Also handle
5018 2015-06-01 Pierre-Marie de Rodat <derodat@adacore.com>
5020 * gcc-interface/decl.c (gnat_to_gnu_entity): Replace pointer types with
5021 references ones for functions that return references.
5023 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
5025 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: For a
5026 definition of a type coming from a limited_with, get to the full view
5027 if it is not in the main code unit.
5029 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
5031 * gcc-interface/utils.c (create_var_decl_1): If an assembler name is
5032 specified, let the target mangle it before settting.
5033 (create_subprog_decl): Likewise and move this treatment last.
5035 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
5037 * gcc-interface/lang-specs.h (TARGET_VXWORKS_RTP): Move substitution to
5038 before first -gnatez switch. Simplify and add trailing space.
5040 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
5042 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: If the
5043 record has a parent field and a representation clause, make sure that
5044 it is properly aligned.
5046 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
5048 * gcc-interface/trans.c (lvalue_required_p) <N_Indexed_Component>: Deal
5049 with character and enumeration literals as index values.
5051 2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
5053 * gcc-interface/gigi.h (build_simple_component_ref): Declare.
5054 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Deal with
5055 address clause on aliased object with unconstrained nominal subtype.
5056 Mark the aligning variable as artificial, do not convert the address
5057 expression immediately but mark it as constant instead.
5058 * gcc-interface/utils.c (convert): If the target type contains a
5059 template, be prepared for an empty array.
5060 (maybe_unconstrained_array): Likewise.
5061 * gcc-interface/utils2.c (known_alignment) <POINTER_PLUS_EXPR>: Deal
5062 with the pattern built for aligning types.
5063 <INTEGER_CST>: Do not cap the value at BIGGEST_ALIGNMENT.
5064 (build_simple_component_ref): Make public.
5065 If the base object is a constructor that contains a template, fold the
5066 result field by field.
5068 2015-05-31 Eric Botcazou <ebotcazou@adacore.com>
5070 * s-oscons-tmplt.c: Add explicit tests for Android alongside Linux.
5072 2015-05-30 Eric Botcazou <ebotcazou@adacore.com>
5074 * adaint.c: Test for __linux__ instead of linux and __sun__ instead
5075 of sun. Add missing leading underscore to AIX. Remove #elif 0.
5076 * adaint.h: Likewise.
5078 * cstreams.c: Likewise.
5080 * gsocket.h: Likewise.
5081 * init.c: Likewise. Test for __i386__ instead of i386.
5083 * s-oscons-tmplt.c: Likewise.
5084 * sysdep.c: Likewise.
5085 * terminals.c: Likewise. Use BSD symbol instead of FREEBSD.
5086 * tracebak.c: Likewise. Test for __sparc__ instead of sparc.
5088 2015-05-28 Eric Botcazou <ebotcazou@adacore.com>
5090 * gcc-interface/utils.c (max_size) <tcc_binary>: Add special code to
5091 deal with the subtraction of a "negative" value in an unsigned type.
5093 2015-05-28 Eric Botcazou <ebotcazou@adacore.com>
5095 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Do
5096 not error out on a return type which has a size that overflows if the
5097 return is done by invisible reference.
5099 2015-05-28 Eric Botcazou <ebotcazou@adacore.com>
5101 * gcc-interface/utils.c (gnat_pushdecl): Reunify the handling of array
5102 and pointer types wrt DECL_ORIGINAL_TYPE and adjust left and right.
5104 2015-05-28 Eric Botcazou <ebotcazou@adacore.com>
5106 * gcc-interface/gigi.h (gnat_stabilize_reference): Adjust.
5107 (rewrite_fn): Remove third parameter.
5108 (type_is_padding_self_referential): New inline predicate.
5109 (return_type_with_variable_size_p): Likewise.
5110 * gcc-interface/decl.c (allocatable_size_p): More around.
5111 (cannot_be_superflat_p): Rename into...
5112 (cannot_be_superflat ): ...this.
5113 (initial_value_needs_conversion): New predicate.
5114 (gnat_to_gnu_entity): Invoke type_is_padding_self_referential,
5115 initial_value_needs_conversion and adjust to above renaming.
5116 For a renaming, force the materialization if the inner expression
5117 is compound. Adjust calls to elaborate_reference and build a
5118 compound expression if needed.
5119 (struct er_dat): Add N field.
5120 (elaborate_reference_1): Remove N parameter and adjust.
5121 (elaborate_reference): Add INIT parameter and pass it in the call to
5122 gnat_rewrite_reference. Adjust initial expression.
5123 * gcc-interface/trans.c (Call_to_gnu): Treat renamings the same way as
5124 regular object declarations when it comes to creating a temporary.
5125 Adjust call to gnat_stabilize_reference and build a compound expression
5126 if needed. Invoke return_type_with_variable_size_p.
5127 (gnat_to_gnu): Invoke type_is_padding_self_referential. In case #4,
5128 return a call to a function unmodified if it returns with variable size
5129 and is also the initial expression in an object declaration.
5130 * gcc-interface/utils2.c (build_binary_op) <INIT_EXPR>: Use the RHS'
5131 type if it is a call to a function that returns with variable size.
5132 (build_unary_op): Invoke type_is_padding_self_referential.
5133 (gnat_stabilize_reference_1): Remove N parameter and adjust.
5134 (gnat_stabilize_reference): Add INIT parameter and pass it in the call
5135 to gnat_rewrite_reference.
5136 (gnat_rewrite_reference): Remove N, add INIT parameter and adjust.
5137 <COMPOUND_EXPR>: New case.
5139 2015-05-28 Ed Schonberg <schonberg@adacore.com>
5141 * sem_ch3.adb (Is_Visible_Component): Component is visible
5142 in a derived type if inherited through an ancestor that has a
5143 partial view of the original type holding the component, if the
5144 full view of that original type is in scope.
5145 * sem_util.ads (Get_Body_From_Stub): Works for all kinds of stubs.
5147 2015-05-28 Bob Duff <duff@adacore.com>
5149 * sem_util.adb (Requires_Transient_Scope): For definite untagged
5150 subtypes, we should never have to use the secondary stack. This moves
5151 toward that goal. But there are still cases that don't work.
5152 Here, we move the check for Is_Definite first, but add a
5153 special-purpose check for Has_Discrim_Dep_Array.
5155 2015-05-28 Bob Duff <duff@adacore.com>
5157 * sem_util.adb (Requires_Transient_Scope): Avoid returning
5158 function results on the secondary stack in so many cases.
5160 2015-05-28 Ed Schonberg <schonberg@adacore.com>
5162 * sem_util.adb (Wrong_Type): In any instance, do not emit error
5163 if type of expression is the partial view of the expected type.
5165 2015-05-28 Ed Schonberg <schonberg@adacore.com>
5167 * sem_res.adb (Resolve_Actuals): a) The replacement of formal
5168 names in named associations only needs to be done within an
5169 instance, on a call to a primitive of a formal derived type,
5170 where the actual subprogram may have different formal names than
5171 those of the primitive operation of the formal type.
5172 b) Defaulted parameters must be taken into account when obtaining
5173 the names of the formals of the actual subprogram being called.
5175 2015-05-28 Robert Dewar <dewar@adacore.com>
5177 * sem_ch13.adb, sem_disp.ads: Minor reformatting.
5179 2015-05-28 Ed Schonberg <schonberg@adacore.com>
5181 * sem_util.adb (Set_Debug_Info_Needed): For a private type
5182 whose full view is itself a derived private type, set flag on
5183 underlying full view as well, for proper gdb display.
5185 2015-05-28 Bob Duff <duff@adacore.com>
5187 * exp_tss.ads: Minor comment fix.
5188 * exp_ch3.adb (Build_Array_Init_Proc, Build_Record_Init_Proc):
5189 Inline init_procs when the type has controlled parts. Remove
5190 obsolete comments about those init_procs -- init_procs for
5191 such types are no longer complex. A typical init_proc just
5192 initializes the 'Tag field, and calls the parent init_proc
5193 (e.g. for Limited_Controlled), which calls the grandparent
5194 (for Root_Controlled), which does nothing. This all boils down
5195 to one instruction when inlined.
5196 * exp_ch7.adb (Create_Finalizer): Inline the finalizer.
5198 2015-05-28 Ed Schonberg <schonberg@adacore.com>
5200 * sem_ch4.adb (Analyze_Selected_Component): If the type to use
5201 is a derived type and is a generic actual, the selected component
5202 appears within an instance body, and the check over the type
5203 has failed, examine ancestor types for the desired component.
5204 (Find_Component_In_Instance): If record type is a derived type,
5205 examine all ancestors in order to locate desired component.
5207 2015-05-27 H.J. Lu <hongjiu.lu@intel.com>
5209 * gcc-interface/Makefile.in (TOOLS_LIBS): Add @NO_PIE_FLAG@.
5211 2015-05-27 Eric Botcazou <ebotcazou@adacore.com>
5213 * gcc-interface/trans.c (elaborate_all_entities): Do not elaborate an
5214 incomplete type coming from a limited_with and whose non-limited view
5215 comes from the main unit.
5217 2015-05-27 Eric Botcazou <ebotcazou@adacore.com>
5219 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Move down
5220 code applying atomic checks to the object.
5222 2015-05-27 Robert Dewar <dewar@adacore.com>
5224 * sem_aux.adb: Minor rewording.
5226 2015-05-27 Bob Duff <duff@adacore.com>
5228 * exp_prag.adb (Expand_Pragma_Abort_Defer): Make
5229 pragma Abort_Defer do nothing if Abort_Allowed is False.
5231 2015-05-27 Arnaud Charlet <charlet@adacore.com>
5233 * exp_ch9.adb, sem_util.adb, sem_util.ads, s-stposu.adb, s-spsufi.ads,
5234 sem_elab.ads, g-comlin.ads, errout.ads, exp_ch6.adb, sem_ch4.adb,
5235 opt.ads, s-bignum.adb, output.ads, sem_ch13.adb, erroutc.ads,
5236 sem_disp.ads, exp_ch3.adb: Minor fixes of duplicate words in comments.
5238 2015-05-27 Doug Rupp <rupp@adacore.com>
5240 * adaint.c (__gnat_tmp_name) [vxworks]: Robustify and use for rtp as
5243 2015-05-27 Pierre-Marie de Rodat <derodat@adacore.com>
5245 * par_sco.adb (Process_Decision): Store sloc to
5246 condition/pragmas SCOs associations into a temporary table before
5247 moving them to the SCO_Raw_Hash_Table so that we can back them
5248 out just like we do for SCO entries that are simple decisions
5249 in an expression context.
5251 2015-05-27 Ed Schonberg <schonberg@adacore.com>
5253 * sem_ch6.adb (Process_Formals): A non-private formal type that
5254 is a limited view does not have a list of private dependents.
5256 2015-05-27 Ed Schonberg <schonberg@adacore.com>
5258 * exp_ch5.adb (Expand_N_Case_Statement): If the expression in
5259 the case statement is a compile-time known value, we look for a
5260 corresponding alternative to optimize the case statement into a
5261 single case. If the type has a static predicate and the expression
5262 does not satisfy the predicate, there is no legal alternative and
5263 this optimization is not applicable. Excecution is erroneous,
5264 or else if assertions are enabled, an exception will be raised
5265 earlier, at the point the expression is elaborated.
5267 2015-05-27 Robert Dewar <dewar@adacore.com>
5269 * sem_elab.adb (Check_Internal_Call_Continue): Suppress
5270 warning on Finalize, Adjust, or Initialize if type involved has
5273 2015-05-27 Ed Schonberg <schonberg@adacore.com>
5275 * sem_aux.adb, sem_aux.ads (First_Discriminant): Return empty when
5276 applied to a type with no known discriminants.
5278 2015-05-26 Robert Dewar <dewar@adacore.com>
5280 * errout.ads, sem_ch4.adb, sem_ch6.adb: Minor reformatting.
5282 2015-05-26 Bob Duff <duff@adacore.com>
5284 * sem_elab.adb (Check_A_Call): In the case where we're
5285 calling something in an instance of a generic package that is
5286 within this same unit (as the call), make sure we treat it
5287 as a call to an entity within the same unit. That is, call
5288 Check_Internal_Call, rather than putting "Elaborate_All(X)"
5289 on X, which would necessarily result in an elaboration cycle in
5290 static-elaboration mode.
5292 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
5294 * freeze.ads (Is_Atomic_VFA_Aggregate): Adjust profile.
5295 * freeze.adb (Is_Atomic_VFA_Aggregate): Change Entity
5296 parameter into Node parameter and remove Type parameter.
5297 Look at Is_Atomic_Or_VFA both on the type and on the object.
5298 (Freeze_Entity): Adjust call to Is_Atomic_VFA_Aggregate.
5299 * exp_aggr.adb (Expand_Record_Aggregate): Likewise.
5300 (Process_Atomic_Independent_Shared_Volatile): Remove code
5301 propagating Atomic or VFA from object to locally-defined type.
5303 2015-05-26 Bob Duff <duff@adacore.com>
5305 * exp_ch7.adb: Minor comment fix.
5307 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
5309 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Min/Attr_Max>: Do not
5310 bother about NaN's if Machine_Overflows is true.
5312 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
5314 * gcc-interface/trans.c (gnat_to_gnu) <N_Object_Declaration>: Really
5315 force evaluation of the expression, if any, when the object has its
5316 elaboration delayed. Do not create a variable at global level.
5318 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
5320 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Machine>: Do not apply
5321 extra-precision trick to literals. Build SAVE_EXPR manually.
5323 * gcc-interface/misc.c (enumerate_modes): Add bypass for x86/x86-64.
5325 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
5327 * gcc-interface/ada-tree.h (DECL_GLOBAL_NONCONSTANT_RENAMING_P): Delete
5328 (DECL_RENAMED_OBJECT): Adjust comment.
5329 * gcc-interface/gigi.h (record_global_nonconstant_renaming): Delete.
5330 (invalidate_global_nonconstant_renamings): Likewise.
5331 (gnat_constant_reference_p): Likewise.
5332 (rewrite_fn): New function type.
5333 (gnat_rewrite_reference): Declare.
5334 (call_is_atomic_load): New inline predicate.
5335 * gcc-interface/decl.c (elaborate_reference_1): New function.
5336 (elaborate_reference): Likewise.
5337 (gnat_to_gnu_entity): Call elaborate_reference to elaborate renamings
5338 and simplify associated code. Set const_flag to true consistently in
5339 conjunction with used_by_ref.
5340 * gcc-interface/trans.c (Identifier_to_gnu): Always replace renaming
5341 pointers by renamed objects.
5342 (outer_atomic_access_required_p): Deal with renamings.
5343 (Compilation_Unit_to_gnu): Do not call
5344 invalidate_global_nonconstant_renamings.
5345 (gnat_to_gnu) <N_Object_Renaming_Declaration>: Adjust comment.
5346 (gnat_gimplify_expr): Deal with atomic loads.
5347 * gcc-interface/utils.c (global_nonconstant_renamings): Delete.
5348 (destroy_gnat_utils): Do not call
5349 invalidate_global_nonconstant_renamings.
5350 (record_global_nonconstant_renaming): Delete.
5351 (invalidate_global_nonconstant_renamings): Likewise.
5352 * gcc-interface/utils2.c (call_is_atomic_load): Move to gigi.h.
5353 (build_load_modify_store): Build a copy of the destination.
5354 (gnat_stabilize_reference_1): Adjust.
5355 (gnat_stabilize_reference): Call gnat_stabilize_reference_1 through
5356 gnat_rewrite_reference and move bulk of code to...
5357 (gnat_rewrite_reference): ...here. New global function.
5358 (gnat_constant_reference_p): Delete.
5360 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
5362 * gcc-interface/gigi.h (gnat_stabilize_reference): Adjust prototype.
5363 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not rely on const_flag
5364 to detect constant renamings. Be prepared for specific pattern of
5365 renamed object based on function calls. Create a constant object
5366 for the renaming of a NULL_EXPR or of a CONSTRUCTOR. Adjust calls
5367 to gnat_stabilize_reference and tidy up. Remove redundant tests.
5368 (elaborate_expression_1): Remove obsolete test and tidy up.
5369 * gcc-interface/trans.c (Call_to_gnu): Do not stabilize In/Out or Out
5370 parameters passed by reference.
5371 (gnat_to_gnu) <N_Selected_Component>: Remove redundant protection again
5373 Use gnat_protect_expr instead of gnat_stabilize_reference for general
5374 protection against side-effects.
5375 * gcc-interface/utils2.c (gnat_stable_expr_p): New predicate.
5376 (gnat_save_expr): Invoke it.
5377 (gnat_protect_expr): Likewise.
5378 (gnat_stabilize_reference_1): Likewise. Remove useless propagation
5379 of TREE_THIS_NOTRAP.
5380 (gnat_stabilize_reference): Remove parameter and adjust throughout.
5381 Delete ADDR_EXDR, COMPOUND_EXPR and CONSTRUCTOR cases.
5382 Restrict CALL_EXPR case to atomic loads and tweak ERROR_MARK case.
5384 2015-05-26 Ed Schonberg <schonberg@adacore.com>
5386 * sinfo.ads: Minor reformatting.
5387 * sem_aux.ads: Clarify use of First_Discriminant.
5388 * sem_ch4.adb (Analyze_Explicit_Dereference): The use of a limited
5389 view is replaced with the non-limited view in an instance body,
5390 where the enclosing unit must have a regular with_clause on the
5392 * sem_ch12.adb (Install_Body): Freeze instantation after its
5393 body. Remove useless freeze nodes for incomplete actuals to
5394 prevent multiple generation of internal operations.
5395 (Instantiate_Package_Body): Set sloc of body appropriately when
5396 there are incomplete actuals and the instance body is placed in
5397 the body of the enclosing unit.
5398 * errout.ads: Consistent punctuation, better alignment and trivial
5400 * err_vars.ads: Fix typo.
5402 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
5404 * sem_ch8.adb (Analyze_Object_Renaming): Lift restriction on
5405 components of Volatile_Full_Access objects.
5407 2015-05-26 Ed Schonberg <schonberg@adacore.com>
5409 * sem_ch6.adb (Is_Non_Overriding_Operation,
5410 Get_Generic_Parent_Type): Handle properly the case of a derived
5411 scalar type by using the first subtype rather than its generated
5412 anonymous base type.
5414 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
5416 * einfo.adb (Write_Field17_Name): Move E_Incomplete_Subtype
5418 (Write_Field19_Name): ...here.
5420 2015-05-26 Ed Schonberg <schonberg@adacore.com>
5422 * sem_ch13.adb: sem_ch13.adb (Add_Predicates): Undo analysis
5423 of original expression in ASIS mode: does not solve the ASIS
5424 problem of a usable type information, and crashes the back-end
5425 when performing type annotations.
5427 2015-05-26 Robert Dewar <dewar@adacore.com>
5429 * sem_disp.adb (Inherited_Subprograms): Add One_Only parameter.
5430 (Is_Overriding_Subprogram): Use One_Only_Parameter.
5431 * sem_disp.ads (Inherited_Subprograms): Add One_Only parameter.
5433 2015-05-26 Robert Dewar <dewar@adacore.com>
5435 * exp_prag.adb, sem_ch3.adb, sem_ch5.adb, exp_ch11.adb, ghost.adb,
5436 exp_ch6.adb, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb, sem_ch13.adb,
5437 exp_ch3.adb: Minor reformatting.
5439 2015-05-26 Bob Duff <duff@adacore.com>
5441 * treepr.adb: Minor improvement to debugging routines (pp, pn)
5442 robustness. Rearrange the code so passing a nonexistent Node_Id
5443 prints "No such node" rather than crashing, and causing gdb to
5444 generate confusing messages.
5446 2015-05-26 Gary Dismukes <dismukes@adacore.com>
5448 * sem_util.adb: Minor typo fix.
5450 2015-05-26 Yannick Moy <moy@adacore.com>
5452 * sem_aux.adb (Subprogram_Body_Entity): Deal with subprogram stubs.
5454 2015-05-26 Hristian Kirtchev <kirtchev@adacore.com>
5456 * exp_ch3.adb (Expand_N_Full_Type_Declaration): Capture, set and
5457 restore the Ghost mode.
5458 (Expand_N_Object_Declaration): Capture, set and restore the Ghost mode.
5459 (Freeze_Type): Update the call to Set_Ghost_Mode.
5460 (Restore_Globals): New routine.
5461 * exp_ch5.adb Add with and use clauses for Ghost.
5462 (Expand_N_Assignment_Statement): Capture, set and restore the
5464 (Restore_Globals): New routine.
5465 * exp_ch6.adb Add with and use clauses for Ghost.
5466 (Expand_N_Procedure_Call_Statement): Capture, set and
5467 restore the Ghost mode.
5468 (Expand_N_Subprogram_Body):
5469 Code cleanup. Capture, set and restore the Ghost mode.
5470 (Expand_N_Subprogram_Declaration): Capture, set and restore the
5472 (Restore_Globals): New routine.
5473 * exp_ch7.adb Add with and use clauses for Ghost.
5474 (Expand_N_Package_Body): Capture, set and restore the Ghost mode.
5475 (Expand_N_Package_Declaration): Capture, set and restore the
5477 (Wrap_HSS_In_Block): Create a proper identifier for the block.
5478 * exp_ch8.adb Add with and use clauses for Ghost.
5479 (Expand_N_Exception_Renaming_Declaration): Code
5480 cleanup. Capture, set and restore the Ghost mode.
5481 (Expand_N_Object_Renaming_Declaration): Capture, set and restore
5483 (Expand_N_Package_Renaming_Declaration): Capture, set and restore the
5485 (Expand_N_Subprogram_Renaming_Declaration): Capture, set and
5486 restore the Ghost mode.
5487 * exp_ch11.adb (Expand_N_Exception_Declaration): Code
5488 cleanup. Capture, set and restore the Ghost mode.
5489 * exp_disp.adb (Make_DT): Update the call to Set_Ghost_Mode. Do
5490 not initialize the dispatch table slot of a Ghost subprogram.
5491 * exp_prag.adb Add with and use clauses for Ghost.
5492 (Expand_Pragma_Check): Capture, set and restore the Ghost mode.
5493 (Expand_Pragma_Contract_Cases): Capture, set and restore the
5495 (Expand_Pragma_Initial_Condition): Capture, set and
5496 restore the Ghost mode.
5497 (Expand_Pragma_Loop_Variant): Capture,
5498 set and restore the Ghost mode.
5499 (Restore_Globals): New routine.
5500 * exp_util.adb Add with and use clauses for Ghost.
5501 (Make_Predicate_Call): Code cleanup. Capture, set and restore
5503 (Restore_Globals): New routine.
5504 * freeze.adb (Freeze_Entity): Code cleanup. Update the call
5506 * ghost.adb Add with and use clause for Sem_Prag.
5507 (Check_Ghost_Completion): Code cleanup.
5508 (Check_Ghost_Overriding): New routine.
5509 (Check_Ghost_Policy): Code cleanup.
5510 (Ghost_Entity): New routine.
5511 (Is_Ghost_Declaration): Removed.
5512 (Is_Ghost_Statement_Or_Pragma): Removed.
5513 (Is_OK_Context): Reimplemented.
5514 (Is_OK_Declaration): New routine.
5515 (Is_OK_Pragma): New routine.
5516 (Is_OK_Statement): New routine.
5517 (Mark_Full_View_As_Ghost): New routine.
5518 (Mark_Pragma_As_Ghost): New routine.
5519 (Mark_Renaming_As_Ghost): New routine.
5520 (Propagate_Ignored_Ghost_Code): Update the comment on usage.
5521 (Set_From_Entity): New routine.
5522 (Set_From_Policy): New routine.
5523 (Set_Ghost_Mode): This routine now handles pragmas and freeze nodes.
5524 (Set_Ghost_Mode_For_Freeze): Removed.
5525 (Set_Ghost_Mode_From_Entity): New routine.
5526 (Set_Ghost_Mode_From_Policy): Removed.
5527 * ghost.ads (Check_Ghost_Overriding): New routine.
5528 (Mark_Full_View_As_Ghost): New routine.
5529 (Mark_Pragma_As_Ghost): New routine.
5530 (Mark_Renaming_As_Ghost): New routine.
5531 (Set_Ghost_Mode): Update the parameter profile. Update the
5533 (Set_Ghost_Mode_For_Freeze): Removed.
5534 (Set_Ghost_Mode_From_Entity): New routine.
5535 * sem_ch3.adb (Analyze_Full_Type_Declaration):
5536 Capture and restore the Ghost mode. Mark a type
5537 as Ghost regardless of whether it comes from source.
5538 (Analyze_Incomplete_Type_Decl): Capture, set and restore the
5540 (Analyze_Number_Declaration): Capture and restore the Ghost mode.
5541 (Analyze_Object_Declaration): Capture and restore the Ghost mode.
5542 (Analyze_Private_Extension_Declaration): Capture and
5543 restore the Ghost mode.
5544 (Analyze_Subtype_Declaration): Capture and restore the Ghost mode.
5545 (Process_Full_View): The full view inherits all Ghost-related
5546 attributes from the private view.
5547 (Restore_Globals): New routine.
5548 * sem_ch5.adb (Analyze_Assignment): Capture and restore the
5550 (Restore_Globals): New routine.
5551 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration):
5552 Code cleanup. Capture and restore the Ghost mode. Mark a
5553 subprogram as Ghost regarless of whether it comes from source.
5554 (Analyze_Procedure_Call): Capture and restore the Ghost mode.
5555 (Analyze_Subprogram_Body_Helper): Capture and restore the Ghost mode.
5556 (Analyze_Subprogram_Declaration): Capture and restore the Ghost mode.
5557 (New_Overloaded_Entity): Ensure that a
5558 parent subprogram and an overriding subprogram have compatible
5560 * sem_ch7.adb (Analyze_Package_Body_Helper): Capture and restore
5562 (Analyze_Package_Declaration): Capture and
5563 restore the Ghost mode. Mark a package as Ghost when it is
5564 declared in a Ghost region.
5565 (Analyze_Private_Type_Declaration): Capture and restore the Ghost mode.
5566 (Restore_Globals): New routine.
5567 * sem_ch8.adb (Analyze_Exception_Renaming): Code
5568 reformatting. Capture and restore the Ghost mode. A renaming
5569 becomes Ghost when its name references a Ghost entity.
5570 (Analyze_Generic_Renaming): Capture and restore the Ghost mode. A
5571 renaming becomes Ghost when its name references a Ghost entity.
5572 (Analyze_Object_Renaming): Capture and restore the Ghost mode. A
5573 renaming becomes Ghost when its name references a Ghost entity.
5574 (Analyze_Package_Renaming): Capture and restore the Ghost mode. A
5575 renaming becomes Ghost when its name references a Ghost entity.
5576 (Analyze_Subprogram_Renaming): Capture and restore the Ghost
5577 mode. A renaming becomes Ghost when its name references a
5579 * sem_ch11.adb (Analyze_Exception_Declaration): Capture, set
5580 and restore the Ghost mode.
5581 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Capture and
5582 restore the Ghost mode.
5583 (Analyze_Generic_Subprogram_Declaration):
5584 Capture and restore the Ghost mode.
5585 * sem_ch13.adb Add with and use clauses for Ghost.
5586 (Add_Invariant): New routine.
5587 (Add_Invariants): Factor out code.
5588 (Add_Predicate): New routine.
5589 (Add_Predicates): Factor out code.
5590 (Build_Invariant_Procedure_Declaration): Code cleanup. Capture,
5591 set and restore the Ghost mode.
5592 (Build_Invariant_Procedure): Code cleanup.
5593 (Build_Predicate_Functions): Capture, set and
5594 restore the Ghost mode. Mark the generated functions as Ghost.
5595 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
5596 Capture, set and restore the Ghost mode.
5597 (Analyze_External_Property_In_Decl_Part): Capture, set and restore
5599 (Analyze_Initial_Condition_In_Decl_Part):
5600 Capture, set and restore the Ghost mode.
5602 Code cleanup. Capture, set and restore the Ghost mode. Flag
5603 pragmas Linker_Section, No_Return, Unmodified, Unreferenced and
5604 Unreferenced_Objects as illegal when it applies to both Ghost
5605 and living arguments. Pragma Ghost cannot apply to synchronized
5607 (Check_Kind): Moved to the spec of Sem_Prag.
5608 (Process_Inline): Flag the pragma as illegal when it applies to
5609 both Ghost and living arguments.
5610 (Restore_Globals): New routine.
5611 * sem_prag.ads Add pragma Default_Initial_Condition
5612 to table Assertion_Expression_Pragma. Add new table
5613 Is_Aspect_Specifying_Pragma.
5614 (Check_Kind): Moved from body of Sem_Prag.
5615 * sem_util.adb Add with and use clauses for Ghost.
5616 (Build_Default_Init_Cond_Procedure_Body): Capture, set and restore
5618 (Build_Default_Init_Cond_Procedure_Declaration):
5619 Capture, set and restore the Ghost mode. Mark the default
5620 initial condition procedure as Ghost when it is declared
5622 (Is_Renaming_Declaration): New routine.
5623 (Policy_In_List): Account for the single argument version of
5625 * sem_util.ads (Is_Renaming_Declaration): New routine.
5626 * sinfo.adb (Is_Ghost_Pragma): New routine.
5627 (Set_Is_Ghost_Pragma): New routine.
5628 * sinfo.ads New attribute Is_Ghost_Pragma.
5629 (Is_Ghost_Pragma): New routine along with pragma Inline.
5630 (Set_Is_Ghost_Pragma): New routine along with pragma Inline.
5632 2015-05-26 Robert Dewar <dewar@adacore.com>
5634 * sem_ch3.adb, sem_aux.adb, sem_aux.ads, exp_ch6.adb, sprint.adb:
5637 2015-05-26 Gary Dismukes <dismukes@adacore.com>
5639 * gnat1drv.adb, targparm.adb, targparm.ads, restrict.adb: Minor
5640 reformatting and typo fixes in comments.
5642 2015-05-26 Ed Schonberg <schonberg@adacore.com>
5644 * sem_ch7.adb (Swap_Private_Dependets): Set visibility of
5645 the two views of a private dependent in two separate steps,
5646 to ensure proper visibility in parent units analyzed for inlining.
5648 2015-05-26 Yannick Moy <moy@adacore.com>
5650 * sem_aux.adb, sem_aux.ads (Get_Low_Bound): Use Type_Low_Bound.
5651 (Package_Body, Package_Spec): New queries moved
5652 here from GNATprove.
5653 (Package_Specification): Simplify query to remove use of loop.
5654 * sem_util.adb, sem_util.ads (Enclosing_Declaration,
5655 Enclosing_Package_Or_Subprogram, Is_Attribute_Update): New
5656 queries moved here from GNATprove.
5658 2015-05-26 Bob Duff <duff@adacore.com>
5660 * einfo.adb, einfo.ads, sprint.adb, lib-xref.ads: Minor cleanup: Remove
5661 obsolete Entity_Kinds E_String_Type and E_String_Subtype. Update
5662 redundant assertions.
5664 2015-05-26 Gary Dismukes <dismukes@adacore.com>
5666 * sem_util.adb, sem_util.ads, sem_ch13.adb: Minor typo fixes.
5668 2015-05-26 Doug Rupp <rupp@adacore.com>
5670 * init.c [vxworks]: Refine previous checkin.
5672 2015-05-26 Robert Dewar <dewar@adacore.com>
5674 * exp_ch4.adb (Wrap_MA): New function.
5675 (Expand_N_Op_Expon): Use Wrap_MA.
5677 2015-05-26 Bob Duff <duff@adacore.com>
5679 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
5680 Do not use secondary stack to return limited records with
5681 defaulted discriminants. This is an efficiency improvement.
5682 * exp_ch6.adb, exp_dist.adb, sem_attr.adb, sem_aux.adb, sem_aux.ads,
5683 sem_ch12.adb, sem_ch3.adb, sem_ch4.adb, sem_ch6.adb, sem_ch7.adb,
5684 sem_util.adb: Change the sense of Is_Indefinite_Subtype to be
5685 Is_Definite_Subtype. This is an improvement to readability (the double
5686 negative in "not Is_Indefinite_Subtype" was slightly confusing). Also
5687 disallow passing non-[sub]type entities, an unnecessary and slightly
5688 bug-prone flexibility.
5690 2015-05-26 Robert Dewar <dewar@adacore.com>
5692 * sem_aggr.adb (Resolve_Array_Aggregate): Defend against
5694 * debug.adb: Document -gnatd.k.
5695 * erroutc.adb (Set_Msg_Insertion_Line_Number): Implement -gnatd.k.
5697 2015-05-26 Robert Dewar <dewar@adacore.com>
5699 * gnat1drv.adb (Gnat1drv): Provide new arguments for
5700 Get_Target_Parameters.
5701 * restrict.adb (Set_Restriction_No_Specification_Of_Aspect):
5703 (Set_Restriction_No_Use_Of_Attribute): new procedure.
5704 * restrict.ads (Set_Restriction_No_Specification_Of_Aspect):
5706 (Set_Restriction_No_Use_Of_Attribute): new procedure.
5707 * s-rident.ads (Integer_Parameter_Restrictions): New subtype.
5708 * targparm.adb (Get_Target_Parameters): Allow new restriction
5709 pragmas No_Specification_Of_Aspect No_Use_Of_Attribute
5711 * targparm.ads: New parameters for Get_Target_Parameters.
5712 * tbuild.adb (Set_NOD): New name for Set_RND.
5713 (Set_NSA): New procedure.
5714 (Set_NUA): New procedure.
5715 (Set_NUP): New procedure.
5716 * tbuild.ads (Make_SC): Minor reformatting.
5717 (Set_NOD): New name for Set_RND.
5718 (Set_NSA, Set_NUA, Set_NUP): New procedure.
5720 2015-05-26 Ed Schonberg <schonberg@adacore.com>
5722 * a-stwise.adb (Find_Token): If source'first is not positive,
5723 an exception must be raised, as specified by RM 2005 A.4.3
5724 (68/1). This must be checked explicitly, given that run-time
5725 files are normally compiled without constraint checks.
5726 * a-stzsea.adb (Find_Token): Ditto.
5728 2015-05-26 Ed Schonberg <schonberg@adacore.com>
5730 * sem_util.ads sem_util.adb (Is_Current_Instance): New predicate
5731 to fully implement RM 8.6 (17/3). which earlier only applied
5732 to synchronized types. Used to preanalyze aspects that include
5733 current instances of types, such as Predicate and Invariant.
5734 * sem_res.adb (Resolve_Entity_Name): Use Is_Current_Instance.
5735 * sem_ch13.adb (Add_Predicates): In ASIS mode, preserve original
5736 expression of aspect and analyze it to provide proper type
5739 2015-05-26 Robert Dewar <dewar@adacore.com>
5741 * rtsfind.ads: Add entries for RE_Exn[_Long]_Float.
5742 * s-exnllf.adb (Exn_Float): New function.
5743 (Exn_Long_Float): New function.
5744 (Exn_Long_Long_Float): Rewritten interface.
5745 (Exp): New name for what used to be Exn_Long_Long_Float.
5746 * s-exnllf.ads (Exn_Float): New function.
5747 (Exn_Long_Float): New function.
5749 2015-05-26 Ed Schonberg <schonberg@adacore.com>
5751 * sem_ch8.adb (Find_Selected_Component): Do not emit an error
5752 on a selected component when the prefix is a type name that is
5754 * einfo.ads: Minor grammar fix.
5756 2015-05-26 Doug Rupp <rupp@adacore.com>
5758 * init.c [vxworks] (sysLib.h): Only for x86.
5760 2015-05-26 Doug Rupp <rupp@adacore.com>
5762 * init-vxsim.c (CPU): define as __VXSIM_CPU__
5763 * sigtramp-vxworks-vxsim.c (CPU): Likewise.
5764 sigtramp-vxworks-target.inc: Add check for SIMLINUX.
5765 * sigtramp.h: Likewise.
5767 2015-05-26 Robert Dewar <dewar@adacore.com>
5769 * sem_aux.adb, sem_disp.adb, sem_util.ads: Add comment.
5770 * sem_util.adb: Minor reformatting
5772 2015-05-26 Yannick Moy <moy@adacore.com>
5774 * inline.adb (Has_Initialized_Type): Adapt to new names.
5775 * sem_aux.adb, sem_aux.ads (Get_Low_Bound, Number_Components,
5776 Subprogram_Body, Subprogram_Body_Entity, Subprogram_Spec,
5777 Subprogram_Specification): New query functions used in GNATprove.
5778 * sem_disp.adb, sem_disp.ads (Is_Overriding_Subprogram): New
5779 query functions used in GNATprove.
5780 * sem_util.adb, sem_util.adso (Enclosing_Lib_Unit_Node,
5781 Get_Cursor_Type, Get_Return_Object, Get_User_Defined_Eq,
5782 Is_Double_Precision_Floating_Point_Type,
5783 Is_Single_Precision_Floating_Point_Type): New query functions
5786 2015-05-26 Bob Duff <duff@adacore.com>
5788 * s-rpc.ads (Partition_ID): Increase maximum Partition_ID to
5790 * a-except-2005.adb, a-except-2005.ads, a-except.adb,
5791 a-except.ads, a-exexda.adb, a-exstat.adb: Minor comment fixes.
5793 2015-05-26 Robert Dewar <dewar@adacore.com>
5795 * sinfo.adb: Minor comment addition.
5796 * einfo.adb: Minor whitespace and punctuation fix.
5797 * sem_util.adb: Minor editing of comments.
5799 2015-05-26 Ed Schonberg <schonberg@adacore.com>
5801 * sem_ch7.adb (Install_Private_Declarations,
5802 Swap_Private_Dependents): Ensure that both views of the dependent
5803 subtype are immediately visible if we are within their scope. This
5804 may be needed when a procedure body is both the parent of an
5805 instantiated child unit, and is itself used to inline a local
5808 2015-05-26 Gary Dismukes <dismukes@adacore.com>
5810 * exp_prag.adb, gnat1drv.adb: Minor reformatting.
5812 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
5814 * exp_ch4.adb (Expand_N_Indexed_Component): In the circuit
5815 detecting exceptions to the rewriting, deal with implicit
5816 dereferences in the selected component case.
5818 2015-05-26 Bob Duff <duff@adacore.com>
5820 * sem_ch13.adb (Analyze_One_Aspect): Do not
5821 require the expression of the Disable_Controlled aspect to be
5822 static in a generic template, because 'Enabled is not known
5825 2015-05-26 Doug Rupp <rupp@adacore.com>
5827 * init-vxsim.c: New file for vxsim ZCX
5828 * sigtramp-vxworks-vxsim.c: Likewise.
5829 * sigtramp-vxworks.c: Factor out target dependent bits into ...
5830 * sigtramp-vxworks-target.inc: ... here.
5831 * sigtramp.h: Add vxsim zcx protos.
5832 * init.c [vxworks...] (sysLib.h): Include.
5833 (__gnat_map_signal): Make global.
5834 [...i386] (__gnat_error_handler): Call __gnat_vxsim_error_handler if
5836 [...i386] (__gnat_install_handler): Test if on vxsim.
5838 2015-05-26 Ed Schonberg <schonberg@adacore.com>
5840 * sem_ch5.adb (Analyze_Iterator_Specification): For an element
5841 iterator over an array, if the component is aliased, the loop
5842 variable is aliased as well.
5844 2015-05-26 Ed Schonberg <schonberg@adacore.com>
5846 * exp_ch6.adb (Expand_Actuals): For a function call with in-out
5847 parameters that is rewritten as an expression_with_actions,
5848 we preserve the original function call node for further use by
5849 the caller (typically Expand_Call). In the presence of validity
5850 checks, that function call, though it is labelled Analyzed to
5851 prevent an infinite recursion, may be rewritten as a temporary
5852 by Remove_Side_Effects. Ensure that the caller has access to
5853 the original function call to continue expansion.
5854 * atree.ads: Minor typo in comment.
5856 2015-05-26 Javier Miranda <miranda@adacore.com>
5858 * sem_util.adb (Check_Function_Writable_Actuals):
5859 Add missing support to check the violation of writable actuals
5860 in array aggregates that have a nonstatic range.
5862 2015-05-26 Hristian Kirtchev <kirtchev@adacore.com>
5864 * exp_ch6.adb (Process_Contract_Cases_For): Update the call to
5865 Expand_Pragma_Contract_Cases.
5866 * exp_prag.ads, exp_prag.adb (Expand_Contract_Cases): Rename to
5867 Expand_Pragma_Contract_Cases.
5868 * sem_ch13.adb (Add_Invariants): Use the original aspect name
5869 when creating the arguments of pragma Check. This ensures that
5870 'Class is properly recognized and handled.
5872 2015-05-26 Arnaud Charlet <charlet@adacore.com>
5874 * gnat1drv.adb: Minor adjustments.
5875 (Adjust_Global_Switches): Disable some related flags in CodePeer mode.
5876 * sem_ch4.adb (Has_Arbitrary_Evaluation_Order,
5877 Stop_Subtree_Climbind): Code cleanup.
5878 * einfo.ads: Minor comment change.
5880 2015-05-26 Javier Miranda <miranda@adacore.com>
5882 * sem_aggr.adb (Resolve_Aggregate, Resolve_Extension_Aggregate):
5884 * sem_ch3.adb (Build_Derived_Record_Type,
5885 Record_Type_Declaration): Code cleanup.
5886 * sem_ch4.adb (Has_Arbitrary_Evaluation_Order,
5887 Stop_Subtree_Climbind): Tables which speed up the identification
5888 of dangerous calls to Ada 2012 functions with writable actuals
5890 (Analyze_Arithmetic_Op, Analyze_Call, Analyze_Comparison_Op,
5891 Analyze_Equality_Op, Analyze_Logical_Op, Analyze_Membership_Op,
5892 Analyze_Range): Code cleanup.
5893 (Is_Arbitrary_Evaluation_Order_Construct): Removed.
5894 (Check_Writable_Actuals): Code cleanup using the added tables.
5895 * sem_util.adb (Check_Function_Writable_Actuals): Return
5896 immediately if the node does not have the flag Check_Actuals
5899 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
5901 * exp_ch6.adb (Add_Call_By_Copy_Code): Remove restrictive
5902 condition in the detection of the effects of Remove_Side_Effects.
5903 * exp_util.ads (Remove_Side_Effects): Add general and historical note.
5904 * exp_util.adb (Is_Name_Reference): New predicate.
5905 (Remove_Side_Effects): Use it in lieu of Is_Object_Reference
5906 in order to decide whether to use the renaming to capture the
5907 side effects of the subexpression.
5908 (Side_Effect_Free): Remove obsolete test.
5910 2015-05-26 Robert Dewar <dewar@adacore.com>
5912 * aspects.ads, aspects.adb: Add aspect Disable_Controlled.
5913 * einfo.ads, einfo.adb (Disable_Controlled): New flag.
5914 (Is_Controlled_Active): New function.
5915 * exp_ch3.adb (Expand_Freeze_Record_Type): Use
5916 Is_Controlled_Active.
5917 * exp_util.adb (Needs_Finalization): Finalization not needed
5918 if Disable_Controlled set.
5919 * freeze.adb (Freeze_Array_Type): Do not set
5920 Has_Controlled_Component if the component has Disable_Controlled.
5921 (Freeze_Record_Type): ditto.
5922 * sem_ch13.adb (Decorate): Minor reformatting.
5923 (Analyze_Aspect_Specifications): Implement Disable_Controlled.
5924 * sem_ch3.adb (Analyze_Object_Declaration): Handle
5926 (Array_Type_Declaration): ditto.
5927 (Build_Derived_Private_Type): ditto.
5928 (Build_Derived_Type): ditto.
5929 (Record_Type_Definition): ditto.
5930 * snames.ads-tmpl: Add Name_Disable_Controlled.
5932 2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
5934 * exp_ch6.adb (Expand_Actuals): Use a constant declaration instead
5935 of a renaming to capture the return value of a function call.
5936 (Expand_Simple_Function_Return): Call Remove_Side_Effects
5937 instead of removing side effects manually before the call to
5940 2015-05-26 Robert Dewar <dewar@adacore.com>
5942 * exp_ch4.adb (Expand_N_Op_Expon): Deal with problem of wrong
5943 order in calling Duplicate_Subexpr.
5944 * einfo.ads: Fix documentation of Object/Value size for scalar types.
5946 2015-05-26 Ed Schonberg <schonberg@adacore.com>
5948 * exp_aggr.adb (Build_Array_Aggr_Code, Gen_Assign):
5949 If a component is default-initialized and its type has an
5950 invariant procedure, insert an invariant test after code for
5951 default-initialization of the component.
5953 2015-05-26 Gary Dismukes <dismukes@adacore.com>
5955 * einfo.ads, sem_util.adb, sem_ch4.adb: Minor reformatting.
5957 2015-05-26 Robert Dewar <dewar@adacore.com>
5959 * exp_unst.adb, exp_unst.ads: Change to using Subps table index for
5960 making AREC entity names unique.
5962 2015-05-26 Ed Schonberg <schonberg@adacore.com>
5964 * sem_cat.adb (Has_Stream_Attribute_Definition): If the type
5965 has aspect specifications, examine the corresponding list of
5966 representation items to determine whether there is a visible
5967 stream operation. The attribute definition clause generated from
5968 the aspect will be inserted at the freeze point of the type,
5969 which may be in the private part and not directly visible,
5970 but the aspect makes the operation available to a client.
5972 2015-05-26 Robert Dewar <dewar@adacore.com>
5974 * sem_util.adb: Minor code reorganization.
5975 * sem_ch6.adb: Minor reformatting.
5977 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
5979 * gcc-interface/utils.c (maybe_pad_type): Do not apply adjustment to
5980 original size for elementary types before issuing the size warning.
5982 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
5984 * get_targ.adb (C_Get_Float_Words_BE): Adjust import name.
5985 (C_Get_Words_BE): Likewise.
5986 (C_Get_Bytes_BE): Likewise.
5987 (C_Get_Bits_BE): Likewise.
5988 (Width_From_Size): Remove superfluous space.
5989 * gcc-interface/targtyps.c (get_float_words_be): Rename into...
5990 (get_target_float_words_be): ...this.
5991 (get_words_be): Rename into...
5992 (get_target_words_be): ...this.
5993 (get_bytes_be): Rename into...
5994 (get_target_bytes_be): ...this.
5995 (get_bits_be): Rename into...
5996 (get_target_bits_be): ...this.
5997 * gcc-interface/gigi.h (standard_datatypes): Remove ADT_ptr_void_type.
5998 (ptr_void_type_node): Delete.
5999 (get_target_float_size): Likewise.
6000 (get_target_double_size): Likewise.
6001 (get_target_long_double_size): Likewise.
6002 (get_float_words_be): Likewise.
6003 (get_words_be): Likewise.
6004 (get_bytes_be): Likewise.
6005 (get_bits_be): Likewise.
6006 (get_target_float_words_be): Declare.
6007 (get_target_words_be): Likewise.
6008 (get_target_bytes_be): Likewise.
6009 (get_target_bits_be): Likewise.
6010 * gcc-interface/decl.c (gnat_to_gnu_entity): Replace ptr_void_type_node
6012 (intrin_return_compatible_p): Likewise.
6013 * gcc-interface/trans.c (gigi): Likewise.
6014 * gcc-interface/utils2.c (maybe_wrap_malloc): Likewise.
6015 (maybe_wrap_free): Likewise.
6016 * gcc-interface/utils.c (maybe_pad_type): Remove superfluous space.
6017 * gcc-interface/misc.c (gnat_init): Do not set ptr_void_type_node.
6019 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
6021 * gcc-interface/decl.c (elaborate_expression): Take a const string
6022 suffix instead of a tree.
6023 (elaborate_expression_1): Likewise.
6024 (elaborate_expression_2): Likewise.
6025 (gnat_to_gnu_entity): Adjust to above changes.
6026 (build_subst_list): Likewise.
6027 (get_entity_char): New static function.
6029 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
6031 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: Move around.
6032 <E_Exception>: Merge with E_Variable case.
6033 <E_Variable>: Remove 'object' label.
6035 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
6037 * gcc-interface/decl.c (gnat_to_gnu_entity): Minor tweak.
6038 * gcc-interface/trans.c (finalize_nrv_unc_r): Use CONSTRUCTOR_ELT.
6039 * gcc-interface/utils.c (convert): Likewise and simplify.
6040 (remove_conversions): Likewise.
6041 * gcc-interface/utils2.c (compare_fat_pointers): Likewise.
6042 (build_unary_op): Likewise and simplify.
6044 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
6046 * gcc-interface/gigi.h (build_atomic_load): Adjust prototype.
6047 (build_atomic_store): Likewise.
6048 (build_load_modify_store): Declare.
6049 (VECTOR_TYPE_P): Delete.
6050 * gcc-interface/decl.c (gnat_to_gnu_entity): Replace Is_Atomic with
6051 Is_Atomic_Or_VFA throughout.
6052 <E_Array_Type>: Build a variant of the XUA type instead of forcing
6053 TYPE_VOLATILE on it.
6054 <E_Array_Subtype>: Use the main variant of the base type.
6055 Do not force TYPE_VOLATILE on the type being built.
6056 <E_Record_Type>: Likewise.
6057 <E_Array_Subtype>: Likewise.
6058 <E_Subprogram_Type>: Rename local variable.
6059 Add Atomic qualifier in conjunction with Volatile on types if needed.
6060 Force BLKmode for by-ref types only at the end of the processing.
6061 Change qualifiers only after changing the mode of the type. Set
6062 TYPE_UNIVERSAL_ALIASING_P on the type directly.
6063 (check_ok_for_atomic_type): Issue specific error message for VFA.
6064 (gnat_to_gnu_component_type): Replace Is_Atomic with
6065 Is_Atomic_Or_VFA throughout.
6066 * gcc-interface/misc.c (gnat_get_alias_set): Test
6067 TYPE_UNIVERSAL_ALIASING_P on the type directly.
6068 * gcc-interface/trans.c (lvalue_required_p): Replace Is_Atomic with
6069 Is_Atomic_Or_VFA throughout. Add missing guard.
6070 (node_is_atomic): New predicate.
6071 (node_has_volatile_full_access): Likewise.
6072 (gnat_strip_type_conversion): New function.
6073 (outer_atomic_access_required_p): New predicate.
6074 (atomic_sync_required_p): Rename into...
6075 (atomic_access_required_p): ...this. Add SYNC parameter, scan the
6076 parent node first and then look for the atomic setting. Add support
6077 for Volatile_Full_Access.
6078 (Call_to_gnu): Add atomic_access and outer_atomic_access parameters
6079 and adjusts calls to above functions. Use load-modify-store sequence
6080 for updates of In/Out and Out parameters if required, as well as for
6081 moving the result to the target if required. Add couple of missing
6083 (gnat_to_gnu): Adjust calls to above functions.
6084 <N_Object_Renaming_Declaration>: If the renamed object has side-effects
6085 evaluate only its address.
6086 <N_Assignment_Statement>: Adjust call to Call_to_gnu. Use load-modify
6087 store sequence if required.
6088 <N_Function_Call>: Adjust call to Call_to_gnu.
6089 (extract_values): Adjust comment.
6090 * gcc-interface/utils2.c (build_atomic_load): Add SYNC parameter and
6091 use relaxed memory model if it is not set.
6092 (build_atomic_store): Likewise.
6093 (call_is_atomic_load): New predicate.
6094 (build_load_modify_store): New function.
6095 (build_binary_op) <MODIFY_EXPR>: Accept SAVE_EXPR on the LHS.
6096 (gnat_stabilize_reference) <CALL_EXPR>: Deal with atomic loads.
6098 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
6100 * gcc-interface/ada-tree.h (DECL_RENAMING_GLOBAL_P): Rename into...
6101 (DECL_GLOBAL_NONCONSTANT_RENAMING_P): ...this.
6102 * gcc-interface/gigi.h (record_global_renaming_pointer): Delete.
6103 (invalidate_global_renaming_pointers): Likewise.
6104 (record_global_nonconstant_renaming): New.
6105 (invalidate_global_nonconstant_renamings): Likewise.
6106 (get_inner_constant_reference): Likewise.
6107 (gnat_constant_reference_p): Likewise.
6108 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Adjust to above
6109 and register the renaming pointer only if the object is non-constant.
6110 (elaborate_expression_1): Call get_inner_constant_reference instead
6111 of get_inner_reference.
6112 * gcc-interface/trans.c (fold_constant_decl_in_expr): Minor tweak.
6113 (Identifier_to_gnu): Adjust to above and do not recheck the renamed
6114 object before substituting it.
6115 (Compilation_Unit_to_gnu): Adjust to above renaming. Minor tweaks.
6116 (gnat_to_gnu) <N_Object_Renaming_Declaration>: Do not return the
6117 result at the global level.
6118 (N_Exception_Renaming_Declaration): Likewise.
6119 * gcc-interface/utils.c (global_renaming_pointers): Rename into...
6120 (global_nonconstant_renamings): ...this.
6121 (destroy_gnat_utils): Adjust to above renaming.
6122 (record_global_renaming_pointer): Rename into...
6123 (record_global_nonconstant_renaming): ...this.
6124 (invalidate_global_renaming_pointers): Rename into...
6125 (invalidate_global_nonconstant_renamings): ...this and do not recheck
6126 the renamed object before invalidating.
6127 * gcc-interface/utils2.c (gnat_stabilize_reference): Minor tweak.
6128 (get_inner_constant_reference): New public function.
6129 (gnat_constant_reference_p): New predicate.
6131 2015-05-25 Javier Miranda <miranda@adacore.com>
6133 * einfo.ads, einfo.adb (Has_Out_Or_In_Out_Parameter): This attribute
6134 is now present in subprograms, generic subprograms, entries and
6136 * sem_ch6.adb (Set_Formal_Mode): Set As_Out_Or_In_Out_Parameter
6137 on entries, entry families, subprograms and generic subprograms.
6138 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration):
6139 Minor code reorganization to ensure that the Ekind attribute
6140 of the subprogram entity is set before its formals are
6141 processed. Required to allow the use of the attribute
6142 Has_Out_Or_In_Out_Parameter on the subprogram entity.
6143 * sem_aggr.adb (Resolve_Aggregate, Resolve_Extension_Aggregate):
6144 Perform the check on writable actuals only if the value of some
6145 component of the aggregate involves calling a function with
6146 out-mode parameters.
6147 (Resolve_Record_Aggregate): Propagate the Check_Actuals flag to the
6148 internally built aggregate.
6149 * sem_ch3.adb (Build_Derived_Record_Type, Record_Type_Declaration):
6150 Perform the check on writable actuals only if the initialization of
6151 some component involves calling a function with out-mode parameters.
6152 * sem_ch4.adb (Analyze_Arithmetic_Op, Analyze_Comparison_Op,
6153 Analyze_Equality_Op, Analyze_Logical_Op, Analyze_Membership_Op,
6154 Analyze_Range): Check writable actuals only if the
6155 subtrees have a call to a function with out-mode parameters
6156 (Analyze_Call.Check_Writable_Actuals): New subprogram. If the call
6157 has out or in-out parameters then mark its outermost enclosing
6158 construct as a node on which the writable actuals check must
6160 (Analyze_Call): Check if the flag must be set and if the outermost
6161 enclosing construct.
6162 * sem_util.adb (Check_Function_Writable_Actuals): Code cleanup
6163 and reorganization. We skip processing aggregate discriminants
6164 since their precise analysis involves two phases traversal.
6165 * sem_res.adb (Resolve_Actuals, Resolve_Arithmetic_Op,
6166 Resolve_Logical_Op, Resolve_Membership_Op): Remove call to
6167 check_writable_actuals.
6169 2015-05-22 Ed Schonberg <schonberg@adacore.com>
6171 * sem_ch3.adb (Constrain_Concurrent): If the context is a
6172 type declaration, generate an Itype_Reference for the anonymous
6173 subtype, to force elaboration at this point in gigi.
6175 2015-05-22 Gary Dismukes <dismukes@adacore.com>
6177 * layout.adb, einfo.ads, sem_ch12.adb, freeze.adb, sem_util.ads,
6178 exp_ch4.adb, sem_ch6.adb: Minor reformatting and typo fixes.
6180 2015-05-22 Ed Schonberg <schonberg@adacore.com>
6182 * sem_res.adb (Resolve_Actuals): If the call is to an overridden
6183 operation, replace the names of the actuals in named associations
6184 with the names of the actuals of the subprogram that is eventually
6185 executed. The names of the formals and the defaults can differ
6186 between the two operations when they are operations of a formal
6189 2015-05-22 Bob Duff <duff@adacore.com>
6191 * a-convec.ads, a-convec.adb (Append): Check for fast path. Split
6192 out slow path into separate procedure. Inline Append. Fast path
6193 now avoids calling Insert.
6194 (Finalize): Do the busy checking last, so the container gets emptied.
6195 (Insert, Insert_Space): Remove redundancy.
6197 2015-05-22 Robert Dewar <dewar@adacore.com>
6199 * switch-c.adb (Scan_Front_End_Switches): Insist on -gnatc
6202 2015-05-22 Arnaud Charlet <charlet@adacore.com>
6204 * gnatvsn.ads: Minor code reorg to remember more easily to update
6207 2015-05-22 Ed Schonberg <schonberg@adacore.com>
6209 * sem_ch10.adb (Analyze_With_Clause): In ASIS_Mode, a
6210 limited_with clause on a predefined unit is not transformed into
6211 a regular with_clause, to preserve the original tree structure.
6212 * sinfo.ads (N_With_Clause): Add comment on handling of
6214 * sem_ch10.adb: Minor reformatting.
6216 2015-05-22 Ed Schonberg <schonberg@adacore.com>
6218 * sem_ch8.adb (Freeze_Profile): A limited view of a type in
6219 the profile of a subprogram renaming does not require freezing,
6220 because it is declared in a different unit.
6222 2015-05-22 Ed Schonberg <schonberg@adacore.com>
6224 * exp_aggr.adb (Get_Constraint_Association): If type (of ancestor
6225 composite type) is private, go to full view. This was previously
6226 done only in an instance context, but is happen whenever a chain
6227 of private extensions includes one inherited discriminant.
6229 2015-05-22 Robert Dewar <dewar@adacore.com>
6231 * einfo.ads: Minor comment updates.
6232 * exp_unst.adb: Move Subps table to spec Don't remove old entries
6233 from table Add Last field to record last entry used.
6234 * exp_unst.ads: Move Subps table here from body So that Cprint
6235 can access saved values.
6237 2015-05-22 Bob Duff <duff@adacore.com>
6239 * a-cdlili.adb, a-cdlili.ads, a-cohama.adb, a-cohama.ads,
6240 * a-cohase.adb, a-cohase.ads, a-convec.adb, a-convec.ads,
6241 * a-coorma.adb, a-coorma.ads, a-coorse.adb, a-coorse.ads:
6242 (Pseudo_Reference, Element_Access, Get_Element_Access): New
6243 declarations added for use by performance improvements in exp_ch5.adb.
6244 * snames.ads-tmpl: New names referenced by exp_ch5.adb.
6245 * exp_ch5.adb: Speed up "for ... of" loops for predefined containers.
6246 Instead of doing literally what the RM calls for, we do something
6247 equivalent that avoids expensive operations inside the loop. If the
6248 container package has appropriate Next, Pseudo_Reference,
6249 Element_Access, Get_Element_Access declarations, we invoke the
6251 * snames.ads-tmpl: Note speed improvement.
6253 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
6255 * einfo.ads (Is_Atomic_Or_VFA): Move to XEINFO INLINES section.
6256 * xeinfo.adb: Replace a-einfo.h with einfo.h throughout.
6257 Add pattern to translate "or else" into "||".
6259 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
6261 * einfo.ads (Has_Volatile_Full_Access): Rename into...
6262 (Is_Volatile_Full_Access): ...this.
6263 (Set_Has_Volatile_Full_Access): Rename into...
6264 (Set_Is_Volatile_Full_Access): ...this.
6265 * einfo.adb (Has_Volatile_Full_Access): Rename into...
6266 (Is_Volatile_Full_Access): ...this.
6267 (Set_Has_Volatile_Full_Access): Rename into...
6268 (Set_Is_Volatile_Full_Access): ...this.
6269 (Is_Atomic_Or_VFA): Adjust to above renaming.
6270 * errout.adb (Special_Msg_Delete): Likewise.
6271 * exp_pakd.adb (Install_PAT): Likewise.
6272 * freeze.adb (Freeze_Array_Type): Likewise.
6273 * sem_ch8.adb (Analyze_Object_Renaming): Likewise.
6274 * sem_ch13.adb (Inherit_Delayed_Rep_Aspects): Likewise.
6275 (Inherit_Aspects_At_Freeze_Point): Likewise.
6276 * sem_prag.adb (Set_Atomic_VFA): Likewise.
6277 (Process_Atomic_Independent_Shared_Volatile): Likewise.
6278 * sem_util.adb (Is_Atomic_Or_VFA_Object): Likewise.
6280 2015-05-22 Robert Dewar <dewar@adacore.com>
6282 * exp_ch5.adb, layout.adb, einfo.adb, einfo.ads, sem_prag.adb,
6283 freeze.adb, freeze.ads, sem_util.adb, sem_util.ads, exp_ch2.adb,
6284 exp_ch4.adb, errout.adb, exp_aggr.adb, sem_ch13.adb: This is a general
6285 change that deals with the fact that most of the special coding for
6286 Atomic should also apply to the case of Volatile_Full_Access.
6287 A new attribute Is_Atomic_Or_VFA is introduced, and many of the
6288 references to Is_Atomic now use this new attribute.
6290 2015-05-22 Robert Dewar <dewar@adacore.com>
6292 * exp_ch4.adb (Expand_N_Op_Eq): Introduce 'Machine for 'Result
6295 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
6297 * sprint.adb (Source_Dump): When generating debug files, deal
6298 with the case of a stand-alone package instantiation by dumping
6299 together the spec and the body in the common debug file.
6301 2015-05-22 Robert Dewar <dewar@adacore.com>
6303 * sem_ch13.adb (Minimum_Size): Size is zero for null range
6306 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
6308 * einfo.adb (Anonymous_Master): This attribute now applies
6309 to package and subprogram bodies.
6310 (Set_Anonymous_Master): This attribute now applies to package and
6312 (Write_Field36_Name): Add output for package and subprogram bodies.
6313 * einfo.ads Update the documentation on attribute Anonymous_Master
6314 along with occurrences in entities.
6315 * exp_ch4.adb (Create_Anonymous_Master): Reimplemented to
6316 handle spec and body anonymous masters of the same unit.
6317 (Current_Anonymous_Master): Reimplemented. Handle a
6318 package instantiation that acts as a compilation unit.
6319 (Insert_And_Analyze): Reimplemented.
6321 2015-05-22 Ed Schonberg <schonberg@adacore.com>
6323 * sem_ch10.adb (Analyze_With_Clause): A limited_with_clause on a
6324 predefined unit is treated as a regular with_clause.
6326 2015-05-22 Robert Dewar <dewar@adacore.com>
6328 * sem_ch12.adb, prj.ads, makeutl.ads, sem_ch6.adb, prj-nmsc.adb,
6329 prj-conf.adb, sem_disp.adb: Minor reformatting.
6331 2015-05-22 Vincent Celier <celier@adacore.com>
6333 * clean.adb (Parse_Cmd_Line): For native gnatclean, check
6334 for switch -P and, if found and gprclean is available, invoke
6336 * make.adb (Initialize): For native gnatmake, check for switch -P
6337 and, if found and gprbuild is available, invoke silently gprbuild.
6339 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
6341 * sem_ch13.adb (Validate_Unchecked_Conversions): Also issue
6342 specific warning for discrete types when the source is larger
6345 2015-05-22 Ed Schonberg <schonberg@adacore.com>
6347 * einfo.ads, einfo.adb (Incomplete_Actuals): New attribute of
6348 package instantiations. Holds the list of actuals in the instance
6349 that are incomplete types, to determine where the corresponding
6350 instance body must be placed.
6351 * sem_ch6.adb (Conforming_Types): An incomplete type used as an
6352 actual in an instance matches an incomplete formal.
6353 * sem_disp.adb (Check_Dispatching_Call): Handle missing case of
6354 explicit dereference.
6355 (Inherited_Subprograms): In the presence of a limited view there
6356 are no subprograms to inherit.
6357 * sem_ch12.adb (Preanalyze_Actuals): Build list of incomplete
6358 actuals of instance, for later placement of instance body and
6359 freeze nodes for actuals.
6360 (Install_Body): In the presence of actuals that incomplete types
6361 from a limited view, the instance body cannot be placed after
6362 the declaration because full views have not been seen yet. Any
6363 use of the non-limited views in the instance body requires
6364 the presence of a regular with_clause in the enclosing unit,
6365 and will fail if this with_clause is missing. We place the
6366 instance body at the beginning of the enclosing body, which is
6367 the unit being compiled, and ensure that freeze nodes for the
6368 full views of the incomplete types appear before the instance.
6370 2015-05-22 Pascal Obry <obry@adacore.com>
6372 * makeutl.ads, prj-conf.adb, prj-nmsc.adb, prj.ads
6373 (In_Place_Option): Removed.
6374 (Relocate_Build_Tree_Option): New constant.
6375 (Root_Dir_Option): New constant.
6376 (Obj_Root_Dir): Removed.
6377 (Build_Tree_Dir): New variable.
6378 (Root_Src_Tree): Removed.
6379 (Root_Dir): New variable.
6380 * prj-conf.adb (Get_Or_Create_Configuration_File): Add check
6381 for improper relocation.
6382 * prj-nmsc.adb (Locate_Directory): Add check for improper
6385 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
6387 * einfo.adb (Default_Init_Cond_Procedure): Code cleanup. The
6388 attribute now applies to the base type.
6389 (Has_Default_Init_Cond): Now applies to the base type.
6390 (Has_Inherited_Default_Init_Cond): Now applies to the base type.
6391 (Set_Default_Init_Cond_Procedure): Code cleanup. The attribute now
6392 applies to the base type.
6393 (Set_Has_Default_Init_Cond): Now applies to the base type.
6394 (Set_Has_Inherited_Default_Init_Cond): Now applies to the base type.
6395 * exp_ch3.adb (Expand_N_Object_Declaration): No need to use the
6396 base type when adding a call to the Default_Initial_Condition.
6398 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
6400 * einfo.adb: Node36 is now used as Anonymous_Master. Flag253
6402 (Anonymous_Master): New routine.
6403 (Has_Anonymous_Master): Removed.
6404 (Set_Anonymous_Master): New routine.
6405 (Set_Has_Anonymous_Master): Removed.
6406 (Write_Entity_Flags): Remove the output for Has_Anonymous_Maser.
6407 (Write_Field36_Name): Add output for Anonymous_Master.
6408 * einfo.ads Add new attribute Anonymous_Master along with
6409 occurrences in nodes. Remove attribute Has_Anonymous_Master along
6410 with occurrences in nodes.
6411 (Anonymous_Master): New routine along with pragma Inline.
6412 (Has_Anonymous_Master): Removed along with pragma Inline.
6413 (Set_Anonymous_Master): New routine along with pragma Inline.
6414 (Set_Has_Anonymous_Master): Removed along with pragma Inline.
6415 * exp_ch4.adb (Create_Anonymous_Master): New routine.
6416 (Current_Anonymous_Master): Reimplemented.
6418 2015-05-22 Bob Duff <duff@adacore.com>
6420 * freeze.adb (Freeze_Profile): Suppress warning if imported
6421 subprogram is not at library level.
6423 2015-05-22 Robert Dewar <dewar@adacore.com>
6425 * sem_ch8.adb (Analyze_Object_Renaming): Check for renaming
6426 component of an object to which Volatile_Full_Access applies.
6428 2015-05-22 Jerome Guitton <guitton@adacore.com>
6430 * exp_dbug.ads: Add note about non bit-packed arrays.
6432 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
6434 * sem_prag.adb: Fix typo.
6435 * einfo.ads: Grammar fixes in comments.
6437 2015-05-22 Bob Duff <duff@adacore.com>
6439 * a-cborma.ads, a-cidlli.ads, a-cimutr.ads, a-ciormu.ads,
6440 * a-cihase.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
6441 * a-cborse.ads, a-comutr.ads, a-ciorma.ads, a-cobove.ads,
6442 * a-coormu.ads, a-convec.ads, a-cohase.ads, a-coinho.ads,
6443 * a-cbdlli.ads, a-cbmutr.ads, a-cbhase.ads, a-cdlili.ads,
6444 * a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
6445 * a-coinho-shared.ads (Constant_Reference_Type, Reference_Type):
6446 Add an initialization expression "raise Program_Error". See,
6447 for example, RM-A.18.2(148.4).
6449 2015-05-22 Robert Dewar <dewar@adacore.com>
6451 * debug.adb: Update documentation.
6452 * einfo.ads, einfo.adb (Needs_Typedef): New flag
6453 * exp_unst.adb (Unnest_Subprogram): Mark AREC types as needing
6455 * frontend.adb: Update comments.
6456 * gnat1drv.adb (Adjust_Global_Switches): Set all needed flags
6458 * opt.ads (Generate_C_Code): New switch.
6459 * osint-c.adb (Write_C_File_Info): Removed, not used
6460 (Write_H_File_Info): Removed, not used
6461 * osint-c.ads (Write_C_File_Info): Removed, not used
6462 (Write_H_File_Info): Removed, not used
6463 * osint.ads (Write_Info): Minor comment updates.
6464 (Output_FD): Moved from private part to public part of spec.
6465 * sem.adb (Semantics): Force expansion on if in Generate_C_Code
6467 * atree.ads: minor typo in comment.
6468 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
6469 Do not allow VFA on composite object with aliased component.
6471 2015-05-22 Arnaud Charlet <charlet@adacore.com>
6473 * osint-c.adb, osint-c.ads (Set_File_Name): Move back to spec.
6475 2015-05-22 Pascal Obry <obry@adacore.com>
6477 * prj-util.adb: Minor comment editing.
6479 2015-05-22 Pascal Obry <obry@adacore.com>
6481 * makeutl.ads (In_Place_Option): New constant.
6482 * prj.ads (Obj_Root_Dir): New variable (absolute path to relocate
6484 (Root_Src_Tree): New variable (absolute path of root source tree).
6485 * prj-conf.adb (Do_Autoconf): Take into account the object root
6486 directory (if defined) to generate configuration project.
6487 * prj-nmsc.adb (Get_Directories): Handle case where Obj_Root_Dir
6489 (Locate_Directory): Likewise.
6491 2015-05-22 Pascal Obry <obry@adacore.com>
6493 * prj-util.ads, prj-util.adb (Relative_Path): New routine.
6495 2015-05-22 Bob Duff <duff@adacore.com>
6497 * exp_utils.ads, exp_utils.adb (Find_Optional_Prim_Op): New
6498 interface to return Empty when not found, so we can avoid handling
6499 Program_Error in that case.
6500 (Find_Prim_Op): Fix latent bug: raise Program_Error when there are no
6502 * exp_ch7.adb, sem_util.adb: Use Find_Optional_Prim_Op when the
6503 code is expecting Empty.
6504 * sem_ch8.adb: Use Find_Optional_Prim_Op to avoid handling
6507 2015-05-22 Robert Dewar <dewar@adacore.com>
6509 * sem_ch3.adb, sem_intr.adb, exp_ch4.adb, s-rannum.adb,
6510 sem_eval.adb, s-fatgen.adb, s-expmod.ads: Remove incorrect hyphen in
6512 * exp_util.adb: Add comment.
6513 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move from spec to
6515 (Set_File_Name): New name for the above.
6516 (Create_C_File, Create_H_File, Write_C_File_Info, Write_H_File_Info,
6517 Close_C_File, Close_H_File): New procedure.
6518 * osint.adb: Minor reformatting.
6519 * osint.ads: Minor comment updates.
6521 2015-05-22 Robert Dewar <dewar@adacore.com>
6523 * exp_ch4.adb: Minor rewording.
6524 * exp_util.ads: Clarify that Find_Prim_Op is only for
6527 2015-05-22 Robert Dewar <dewar@adacore.com>
6529 * atree.adb, atree.ads, treepr.adb: Change name Needs_Actuals_Check to
6531 * exp_ch4.adb (Expand_N_Op_Expon): Optimize 2**x in modular
6534 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
6536 * exp_pakd.adb (Install_PAT): Propagate representation aspects
6537 from the original array type to the PAT.
6539 2015-05-22 Robert Dewar <dewar@adacore.com>
6541 * treepr.adb (Print_Node_Header): Add output of Needs_Actuals_Check.
6543 2015-05-22 Robert Dewar <dewar@adacore.com>
6545 * atree.adb, atree.ads (Needs_Actuals_Check): New flag.
6547 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
6549 * sem_prag.adb (Analyze_Pragma): Remove the detection
6550 of a useless Part_Of indicator when the related item is a constant.
6551 (Check_Matching_Constituent): Do not emit an error on a constant.
6552 (Check_Missing_Part_Of): Do not check for a missing Part_Of indicator
6553 when the related item is a constant.
6554 (Collect_Body_States): Code cleanup.
6555 (Collect_Visible_States): Code cleanup.
6556 (Report_Unused_States): Do not emit an error on a constant.
6557 * sem_util.ads, sem_util.adb (Has_Variable_Input): Removed.
6559 2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
6561 * sem_ch8.adb (Analyze_Object_Renaming): Copy
6562 Has_Volatile_Full_Access from renamed to renaming entities.
6563 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
6564 Tidy up and remove redundant setting of Has_Volatile_Full_Access.
6566 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
6568 * ghost.adb (Check_Ghost_Completion): Update references to SPARK
6570 (Check_Ghost_Policy): Update references to SPARK RM 6.9 rules.
6571 * sem_ch3.adb (Analyze_Object_Declaration): Update references
6572 to SPARK RM 6.9 rules.
6573 (Check_Completion): Ghost entities do not require a special form of
6575 * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Update references
6576 to SPARK RM 6.9 rules.
6577 (Analyze_Subprogram_Body_Helper): Update references to SPARK RM 6.9
6579 * sem_ch7.adb (Analyze_Package_Body_Helper): Update references
6580 to SPARK RM 6.9 rules.
6581 (Requires_Completion_In_Body): Ghost entities do not require a special
6584 2015-05-22 Robert Dewar <dewar@adacore.com>
6586 * a-csquin.ads: Use Ada 2012 notation.
6587 * sem_ch8.adb: Minor reformatting.
6589 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
6591 * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect Import
6592 acts as a completion.
6594 2015-05-22 Ed Schonberg <schonberg@adacore.com>
6596 * sem_ch13.adb: Minor reformatting.
6598 2015-05-22 Jose Ruiz <ruiz@adacore.com>
6600 * a-reatim.adb: Minor change, fix typo.
6602 2015-05-22 Robert Dewar <dewar@adacore.com>
6604 * sem_util.ads: Minor addition of ??? comment.
6605 * sem_prag.adb, sem_util.adb: Minor reformatting.
6606 * sem_ch13.adb: minor reformatting.
6608 2015-05-22 Robert Dewar <dewar@adacore.com>
6610 * a-reatim.ads: Add Compile_Time_Error to ensure Duration
6612 * sem_ch13.adb: Improve error message.
6613 * exp_ch4.adb: Minor reformatting.
6615 2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
6617 * sem_prag.adb (Analyze_Pragma): Constants without variable
6618 input do not require indicator Part_Of.
6619 (Check_Missing_Part_Of): Constants without variable input do not
6620 requrie indicator Part_Of.
6621 (Collect_Visible_States): Constants without variable input are
6622 not part of the hidden state of a package.
6623 * sem_util.ads, sem_util.adb (Has_Variable_Input): New routine.
6625 2015-05-22 Robert Dewar <dewar@adacore.com>
6627 * exp_util.adb (Activate_Atomic_Synchronization): Do not set
6628 Atomic_Sync_Required for an object renaming declaration.
6629 * sem_ch8.adb (Analyze_Object_Renaming): Copy Is_Atomic and
6630 Is_Independent to renaming object.
6632 2015-05-22 Ed Schonberg <schonberg@adacore.com>
6634 * sem_ch5.adb (Analyze_Iterator_Specification): Diagnose
6635 various illegalities in iterators over arrays and containers:
6636 a) New function Get_Cursor_Type, to verify that the cursor is
6637 not a limited type at the point of iteration.
6638 b) If the container is a constant, an element_iterator is illegal
6639 if the container type does not have a Constant_Indexing aspect.
6640 c) If the iterate function has an in-out controlling parameter,
6641 the container cannot be a constant object.
6642 d) Reject additional cases of iterators over a
6643 discriminant-dependent component of a mutable object.
6645 2015-05-21 Hristian Kirtchev <kirtchev@adacore.com>
6647 * einfo.adb (Contract): This attribute now applies to constants.
6648 (Set_Contract): This attribute now applies to constants.
6649 (Write_Field34_Name): Add output for constants.
6650 * einfo.ads Attribute Contract now applies to constants.
6651 * sem_ch3.adb (Analyze_Object_Contract): Constants now have
6652 their Part_Of indicator verified.
6653 * sem_prag.adb (Analyze_Constituent): A constant is now a valid
6655 (Analyze_Global_Item): A constant cannot act as an output.
6656 (Analyze_Initialization_Item): Constants are now a valid
6657 initialization item.
6658 (Analyze_Initializes_In_Decl_Part): Rename
6659 global variable States_And_Vars to States_And_Objs and update
6660 all its occurrences.
6661 (Analyze_Input_Item): Constants are now a
6662 valid initialization item. Remove SPARM RM references from error
6664 (Analyze_Pragma): Indicator Part_Of can now apply to a constant.
6665 (Collect_Body_States): Collect both source constants
6667 (Collect_States_And_Objects): Collect both source constants and
6669 (Collect_States_And_Variables): Rename
6670 to Collect_States_And_Objects and update all its occurrences.
6671 (Collect_Visible_States): Do not collect constants and variables
6672 used to map generic formals to actuals.
6673 (Find_Role): The role of a constant is that of an input. Separate the
6674 role of a variable from that of a constant.
6675 (Report_Unused_Constituents): Add specialized wording for constants.
6676 (Report_Unused_States): Add specialized wording for constants.
6677 * sem_util.adb (Add_Contract_Item): Add processing for constants.
6678 * sem_util.ads (Add_Contract_Item): Update the comment on usage.
6679 (Find_Placement_In_State_Space): Update the comment on usage.
6681 2015-05-21 Ed Schonberg <schonberg@adacore.com>
6683 * sem_ch5.adb: minor reformatting.
6685 2015-05-21 Robert Dewar <dewar@adacore.com>
6687 * freeze.adb (Freeze_Entity): Properly tag -gnatw.z messages.
6689 2015-05-21 Robert Dewar <dewar@adacore.com>
6691 * freeze.adb: Minor reformatting.
6692 * cstand.adb (Print_Standard): Fix bad printing of Duration
6694 * a-reatim.adb (Time_Of): Complete rewrite to properly detect
6697 2015-05-21 Ed Schonberg <schonberg@adacore.com>
6699 * sem_ch5.adb: add (useless) initial value.
6700 * sem_ch3.adb (Replace_Anonymous_Access_To_Protected_Subprogram):
6701 Check whether the procedure has parameters before processing
6702 formals in ASIS mode.
6704 2015-05-21 Ed Schonberg <schonberg@adacore.com>
6706 * sem_ch13.adb (Check_Iterator_Functions): Emit error on Iterator
6707 aspect as well when indexing function is illegal.
6708 (Valid_Default_Iterator): Handle properly somme illegal cases
6709 to prevent compilation abandoned messages.
6710 (Check_Primitive_Function): Verify that type and indexing function
6711 are in the same scope.
6712 * freeze.adb (Freeze_Record): Extend patch on the presence of
6713 indexing aspects to aspect Default_Iterator.
6715 2015-05-19 David Malcolm <dmalcolm@redhat.com>
6717 * gcc-interface/trans.c (Sloc_to_locus1): Strenghthen local "map"
6718 from line_map * to line_map_ordinary *.
6720 2015-05-12 Jason Merrill <jason@redhat.com>
6722 * sigtramp-vxworks.c: Add space between string literal and macro
6725 2015-05-12 Arnaud Charlet <charlet@adacore.com>
6727 * gnat_rm.texi, gnat_ugn.texi, doc: Documentation updates and clean ups
6729 2015-05-12 Ed Schonberg <schonberg@adacore.com>
6731 * sem_ch5.adb (Analyze_Iterator_Specifications): Additional
6732 legality checks for array and container iterators:
6733 a) The domain of iteration cannot be a component that depends
6734 on discriminants of a mutable object. The check was recently
6735 added for element iterators.
6736 b) The cursor type cannot be a limited type at the point of the
6737 iteration, because the cursor will be assigned to in the body
6740 2015-05-12 Robert Dewar <dewar@adacore.com>
6742 * freeze.adb (Freeze_Record_Type): Make sure that if we have
6743 aspect Iterator_Element, then we have either Constant_Indexing
6744 or Variable_Indexing.
6746 2015-05-12 Ed Schonberg <schonberg@adacore.com>
6748 * a-coormu.ads, a-coormu.adb: Add Indexing aspect, Reference_Type,
6749 and Reference_Control_Type to support element iterators over
6751 * a-ciormu.ads, a-ciormu.adb: Ditto for
6752 indefinite_ordered_multisets.
6754 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
6756 * exp_ch4.adb (Expand_N_Expression_With_Actions): Force
6757 the evaluation of the EWA expression. Code cleanup.
6758 (Process_Transient_Object): Code cleanup.
6759 * exp_util.adb (Is_Aliased): Controlled transient objects found
6760 within EWA nodes are not aliased.
6761 (Is_Finalizable_Transient): Iterators are not finalizable transients.
6763 2015-05-12 Robert Dewar <dewar@adacore.com>
6765 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
6766 Don't allow Atomic and Volatile_Full_Access for the same entity.
6768 2015-05-12 Ed Schonberg <schonberg@adacore.com>
6770 * sem_ch5.adb (Analyze_Iterator_Specification): Implement new
6771 semantics and safety checks specified in AI12-0151.
6773 2015-05-12 Pierre-Marie de Rodat <derodat@adacore.com>
6775 * sem_ch10.adb (Sem_Ch10.Analyze_Proper_Body): Generate SCOs
6776 for subunit in generic units.
6778 2015-05-12 Robert Dewar <dewar@adacore.com>
6780 * sem_elab.adb (Check_A_Call): Avoid checking internal call
6783 2015-05-12 Ed Schonberg <schonberg@adacore.com>
6785 * sem_ch6.adb (Process_Formals): An untagged incomplete type
6786 is legal in the profile of a null procedure.
6788 2015-05-12 Ed Schonberg <schonberg@adacore.com>
6790 * sem_ch12.adb (Validate_Derived_Type_Instance): Handle properly
6791 the checks on a derived formal whose parent type is a previous
6792 formal that is not a derived type.
6794 2015-05-12 Robert Dewar <dewar@adacore.com>
6796 * aspects.ads, aspects.adb: Add entries for aspect Volatile_Full_Access
6797 * einfo.adb (Has_Volatile_Full_Access): New flag.
6798 (Has_Volatile_Full_Access): New flag.
6799 * einfo.ads (Has_Volatile_Full_Access): New flag.
6800 * par-prag.adb: Add dummy entry for Volatile_Full_Access.
6801 * sem_prag.adb (Analyze_Pragma, case Volatile_Full_Access):
6802 Implement new pragma.
6803 * snames.ads-tmpl: Add entries for pragma Volatile_Full_Access.
6805 2015-05-12 Robert Dewar <dewar@adacore.com>
6807 * targparm.ads: Minor reformatting.
6809 2015-05-12 Robert Dewar <dewar@adacore.com>
6811 * a-reatim.adb (Time_Of): Properly detect overflow when TS = 0.0.
6812 * a-reatim.ads: Minor reformatting.
6814 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
6816 * einfo.ads: Update the documentation of flags
6817 Has_Inherited_Default_Init_Cond and Has_Default_Init_Cond.
6819 2015-05-12 Robert Dewar <dewar@adacore.com>
6821 * impunit.adb: Add entry for a-dhfina.ads
6822 * a-dhfina.ads: New file.
6824 2015-05-12 Ed Schonberg <schonberg@adacore.com>
6826 * exp_ch5.adb (Expand_Iterator_Loop_Over_Array): if the array
6827 type has convention Fortran, a multidimensional iterator varies
6828 the first dimension fastest.
6830 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
6832 * einfo.adb: Node32 is now used as Encapsulating_State.
6833 Node37 is now used as Associated_Entity.
6834 (Associated_Entity): New routine.
6835 (Encapsulating_State): Update the assertion guard to include constants.
6836 (Set_Associated_Entity): New routine.
6837 (Set_Encapsulating_State): Update the assertion guard to
6839 (Write_Field10_Name): Remove the output for Encapsulating_State.
6840 (Write_Field32_Name): Add output for Encapsulating_State.
6841 (Write_Field37_Name): Add output for Associated_Entity.
6842 * einfo.ads New attribute Associated_Entity along with placement
6843 in entities. Attribute Encapsulating_State now uses Node32.
6844 (Associated_Entity): New routine along with pragma Inline.
6845 (Set_Associated_Entity): New routine along with pragma Inline.
6846 * inline.ads Code reformatting.
6847 * sem_attr.adb (Analyze_Attribute): Correct the prefix of
6848 attribute 'Result when the context is a generic instantiation.
6849 (Analyze_Attribute_Old_Result): Pragmas Depends and
6850 Refined_Depends are a valid context for attribute 'Result.
6851 (Denote_Same_Function): Allow attribute 'Result to denote
6853 * sem_ch3.adb Add with and use clauses for Sem_Ch12.
6854 (Analyze_Declarations): Capture global references within the
6855 contracts of packages, subprograms and their respective bodies.
6856 * sem_ch6.adb (Analyze_Aspects_On_Body_Or_Stub): Removed.
6857 (Analyze_Completion_Contract): Removed.
6858 (Analyze_Generic_Subprogram_Body): Enchange the aspects after
6859 creating the generic copy. Create a generic contract for the
6860 template. Analyze the aspects of the generic body. Analyze the
6861 contract of the generic body when it is a compilation unit and
6862 capture global references.
6863 (Analyze_Subprogram_Body_Contract): Code cleanup.
6864 (Analyze_Subprogram_Contract): Do not save global references here.
6865 (Save_Global_References_In_List): Removed.
6866 * sem_ch7.adb (Analyze_Package_Body_Contract): Code cleanup.
6867 (Analyze_Package_Body_Helper): Create a generic contract for
6869 (Analyze_Package_Contract): Code cleanup.
6870 * sem_ch10.adb Add with and use clauses for Sem_Ch12.
6871 (Analyze_Compilation_Unit): Capture global references in a
6872 generic subprogram declaration that acts as a compilation unit.
6873 * sem_ch12.adb Add with and use clauses for Sem_Prag. Illustrate
6874 the implementation of generic contracts. Alphabetize various
6876 (Analyze_Generic_Package_Declaration):
6877 Create a generic contract for the template.
6878 (Analyze_Generic_Subprogram_Declaration): Create a generic
6879 contract for the template.
6880 (Analyze_Subprogram_Instantiation): Instantiate the contract of the
6882 (Copy_Generic_Node): Link defining entities of the generic template
6883 with the corresponding defining entities of the generic copy. Update
6884 the processing of pragmas.
6885 (Instantiate_Contract): Removed.
6886 (Instantiate_Subprogram_Contract): New routine.
6887 (Requires_Delayed_Save): New routine.
6888 (Save_Global_References): Rename formal parameter N to Templ. Various
6890 (Save_Global_References_In_Aspects): Moved from the spec.
6891 (Save_Global_References_In_Contract): New routine.
6892 (Save_References_In_Aggregate): New routine.
6893 (Save_References_In_Char_Lit_Or_Op_Symbol): New routine.
6894 (Save_References_In_Descendants): New routine.
6895 (Save_References_In_Identifier): New routine.
6896 (Save_References_In_Operator): New routine.
6897 (Save_References_In_Pragma): New routine.
6898 * sem_ch12.ads (Save_Global_References): Rename formal
6899 parameter N to Templ. Update the comment on usage.
6900 (Save_Global_References_In_Aspects): Moved to the body.
6901 (Save_Global_References_In_Contract): New routine.
6902 * sem_ch13.adb (Analyze_Aspect_Specifications_On_Body_Or_Stub):
6904 * sem_ch13.ads (Analyze_Aspect_Specifications_On_Body_Or_Stub):
6906 * sem_prag.adb (Add_Item_To_Name_Buffer): Add support for
6908 (Analyze_Contract_Cases_In_Decl_Part): Code cleanup.
6909 (Analyze_Depends_Global): New routine.
6910 (Analyze_Depends_In_Decl_Part): Code cleanup.
6911 (Analyze_Global_In_Decl_Part): Code cleanup.
6912 (Analyze_Global_Item): Constants are now valid global items. Do
6913 not perform state-related checks in an instance. Change the way
6914 renamings are handled. (Analyze_Initial_Condition_In_Decl_Part):
6916 (Analyze_Initializes_In_Decl_Part): Code cleanup.
6917 (Analyze_Input_Output): The analysis of attribute 'Result in
6918 the context of pragmas Depends or Refined_Depends now reuses
6919 the existing attribute analysis machinery. Constants and
6920 generic parameters are now valid dependency items. Do not
6921 perform state-related checks in an instance. Change the way
6922 renamings are handled. (Analyze_Pragma): Add a "characteristics"
6923 section for pragmas Abstract_State, Contract_Cases, Depends,
6924 Extensions_Visible, Global, Initial_Condition, Initializes,
6925 Post, Post_Class, Postcondition, Pre, Pre_Class, Precondition,
6926 Refined_Depends, Refined_Global, Refined_Post, Refined_State, Test_Case.
6927 (Analyze_Pre_Post_Condition): Do not create a generic
6929 (Analyze_Pre_Post_Condition_In_Decl_Part): Code cleanup.
6930 (Analyze_Refined_Depends_Global_Post): New routine.
6931 (Analyze_Refined_Depends_In_Decl_Part): Code cleanup.
6932 (Analyze_Refined_Global_In_Decl_Part): Code cleanup.
6933 (Analyze_Refined_Pragma): Removed.
6934 (Analyze_Refined_State_In_Decl_Part): Code cleanup.
6935 (Analyze_Test_Case_In_Decl_Part): Code cleanup.
6936 (Check_Dependency_Clause): Do not perform this check in an instance.
6937 (Check_Function_Return): Add support for generic functions.
6938 (Check_In_Out_States): Do not perform this check in an instance.
6939 (Check_Input_States): Do not perform this check in an instance.
6940 (Check_Mode_Restriction_In_Function): Add support for generic functions.
6941 (Check_Output_States): Do not perform this check in an instance.
6942 (Check_Postcondition_Use_In_Inlined_Subprogram): Rename
6943 parameter Subp_Id to Spec_Id and update comment on usage.
6944 (Check_Proof_In_States): Do not perform this check in an instance.
6945 (Check_Refined_Global_Item): Add support for constants.
6946 (Check_Refined_Global_List): Do not perform this check in an instance.
6947 (Collect_Global_Items): Reimplemented.
6948 (Collect_Subprogram_Inputs_Outputs): Add support for generic parameters.
6949 (Create_Generic_Template): Removed.
6950 (Find_Related_Package_Or_Body): Moved to spec.
6951 (Find_Role): Add support for generic parameters and constants.
6952 (Get_Argument): Moved to spec. Rename parameter Spec_Id to Context_Id.
6953 (Match_Item): Add support for constants.
6954 (Preanalyze_Test_Case_Arg): Reimplemented.
6955 (Report_Extra_Clauses): Do not perform this check in an instance.
6956 (Report_Extra_Constituents): Do not perform this check in an instance.
6957 * sem_prag.ads (Collect_Subprogram_Inputs_Outputs): Update
6958 the comment on usage.
6959 (Find_Related_Package_Or_Body): Moved from body.
6960 (Get_Argument): Moved from body.
6961 * sem_util.adb Add with and use clauses for Sem_Ch12.
6962 (Corresponding_Spec_Of): Add support for packages and package bodies.
6963 (Create_Generic_Contract): New routine.
6964 (Is_Contract_Annotation): Reimplemented.
6965 (Is_Generic_Declaration_Or_Body): New routine.
6966 (Is_Package_Contract_Annotation): New routine.
6967 (Is_Subprogram_Contract_Annotation): New routine.
6968 * sem_util.ads (Corresponding_Spec_Of): Update the comment on usage.
6969 (Create_Generic_Contract): New routine.
6970 (Is_Generic_Declaration_Or_Body): New routine.
6971 (Is_Package_Contract_Annotation): New routine.
6972 (Is_Subprogram_Contract_Annotation): New routine.
6973 * sinfo.adb (Is_Generic_Contract_Pragma): New routine.
6974 (Set_Is_Generic_Contract_Pragma): New routine.
6975 * sinfo.ads Add new attribute Is_Generic_Contract_Pragma along
6976 with occurrences in nodes.
6977 (Is_Generic_Contract_Pragma): New routine along with pragma Inline.
6978 (Set_Is_Generic_Contract_Pragma): New routine along with pragma Inline.
6979 * treepr.adb (Print_Entity_Info): Output fields 36 to 41.
6981 2015-05-12 Robert Dewar <dewar@adacore.com>
6983 * a-taster.ads: Minor comment fix: fix bad header, this is a
6986 2015-05-12 Robert Dewar <dewar@adacore.com>
6988 * sem_intr.adb: (Check_Shift): Diagnose bad modulus value.
6990 2015-05-12 Robert Dewar <dewar@adacore.com>
6992 * gnat1drv.adb (Adjust_Global_Switches): Default to suppressing
6993 Alignment_Checks on non-strict alignment machine.
6994 * sem_ch13.adb (Validate_Address_Clauses): Don't give
6995 compile-time alignment warnings if run time Alignment_Check
6998 2015-05-12 Thomas Quinot <quinot@adacore.com>
7000 * g-sercom.ads, g-sercom-linux.adb (GNAT.Serial_Communications.
7001 Data_Rate): New literals B75, B110, B150, B300, B600.
7003 2015-05-12 Doug Rupp <rupp@adacore.com>
7005 * init.c (__gnat_init_float) [vxworks]: For e500v2,
7006 do nothing and leave the responsibility to install the handler
7007 and enable the exceptions to the BSP.
7009 2015-05-12 Robert Dewar <dewar@adacore.com>
7011 * sem_ch9.adb, einfo.ads, exp_intr.adb: Minor reformatting.
7012 * sem_disp.adb: Minor code reorganization (remove junk redundant
7014 * exp_unst.adb (Unnest_Subprogram.Uplev_Refs): Ignore uplevel
7015 references to bounds of types coming from original type reference.
7016 * checks.ads: Minor reformatting.
7017 * checks.adb: Minor reformatting.
7018 * sem_prag.adb (Analyze_Pragma, case Check): If in ignored
7019 assertion, then make sure we do not drag in bignum stuff.
7021 2015-05-12 Ed Schonberg <schonberg@adacore.com>
7023 * sem_ch9.adb (Collect_Interfaces): Initialize
7024 Direct_Primitive_Operations for a tagged synchronized type,
7025 so it can used in ASIS mode.
7026 * sem_disp.adb (Check_Dispatching_Operation): If expansion is
7027 disabled, attach subprogram to list of Direct_Primitive_Operations
7028 of synchronized type itself, for ASIS use, because in this case
7029 Corresponding_Record_Type is not built.
7030 * einfo.ads: Indicate use of Direct_Primitive_Operations on
7033 2015-05-12 Pierre-Marie de Rodat <derodat@adacore.com>
7035 * exp_pakd.adb: Make clearer the comment in exp_pakd.adb about
7038 2015-05-12 Robert Dewar <dewar@adacore.com>
7040 * sem_ch3.adb, sem_util.adb, sem_ch6.adb: Minor reformatting.
7042 2015-05-12 Robert Dewar <dewar@adacore.com>
7044 * exp_unst.adb (Visit_Node): Deal with subprogram and package stubs.
7046 2015-05-12 Ed Schonberg <schonberg@adacore.com>
7048 * exp_intr.adb (Expand_Dispatching_Constructor_Call): The
7049 tag to be retrieved for the generated call is the first entry
7050 in the dispatch table for the return type of the instantiated
7053 2015-05-12 Bob Duff <duff@adacore.com>
7055 * exp_ch7.adb, exp_ch7.ads, exp_intr.adb, exp_util.adb,
7056 exp_util.ads: Update comments.
7058 2015-05-12 Ed Schonberg <schonberg@adacore.com>
7060 * sem_ch3.adb (Add_Internal_Interface_Entities): Do no generate
7061 freeze nodes for these in ASIS mode, because they lead to
7062 elaoration order issues in gigi.
7064 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
7066 * sem_ch6.adb (Analyze_Expression_Function): Code
7067 cleanup. Use Copy_Subprogram_Spec to create a proper spec.
7068 (Analyze_Subprogram_Body_Helper): Code cleanup. Do not
7069 prepare a stand alone body for inlining in GNATprove mode
7070 when inside a generic. (Body_Has_Contract): Reimplemented.
7071 (Build_Subprogram_Declaration): New routine.
7072 * sem_ch10.adb (Analyze_Compilation_Unit): Capture global
7073 references within generic bodies by loading them.
7074 * sem_util.adb (Copy_Parameter_List): Code cleanup.
7075 (Copy_Subprogram_Spec): New routine.
7076 (Is_Contract_Annotation): New routine.
7077 * sem_util.ads (Copy_Subprogram_Spec): New routine.
7078 (Is_Contract_Annotation): New routine.
7080 2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
7082 * sem_attr.adb (Resolve_Attribute): Do not analyze the generated
7083 body of an expression function when the prefix of attribute
7084 'Access is the body.
7086 2015-05-12 Ed Schonberg <schonberg@adacore.com>
7088 * sem_ch3.adb (Build_Derived_Enumeration_Type): The anonymous base
7089 created for a derived enumeration type is not a first subtype,
7090 even though it is defined through a full type declaration.
7091 * sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): Do not process
7092 aspects for the anonymous base type constructed for a derived
7093 scalar type, because they will be set when the first subtype
7095 (Inherit_Aspects_At_Freeze_Point): Fix typos on handling of
7096 Default_Value and Default_Component_Value, that prevented the
7097 proper inheritance of these aspects.
7099 2015-05-12 Gary Dismukes <dismukes@adacore.com>
7101 * exp_ch6.adb, exp_unst.adb: Minor typo fixes.
7103 2015-05-12 Robert Dewar <dewar@adacore.com>
7105 * sem_ch3.adb: Minor reformatting.
7107 2015-05-12 Vincent Celier <celier@adacore.com>
7109 * gnatcmd.adb: If we want to invoke gnatmake (gnatclean) with
7110 -P, then check if gprbuild (gprclean) is available; if it is,
7111 use gprbuild (gprclean) instead of gnatmake (gnatclean).
7113 2015-05-12 Robert Dewar <dewar@adacore.com>
7115 * debug.adb: Add flag -gnatd.3 to output diagnostic info from
7117 * einfo.ad, einfo.adb: Reorganize (and remove most of) flags used by
7119 * exp_ch6.adb (Unest_Bodies): Table for delayed calls to
7120 Unnest_Subprogram (Expand_N_Subprogram_Body): Add entry to table
7121 for later call instead of calling Unnest_Subprogram directly
7122 (Initialize): New procedure (Unnest_Subprograms): New procedure
7123 * exp_ch6.ads (Add_Extra_Actual_To_Call): Move into proper
7125 (Initialize): New procedure.
7126 (Unnest_Subprograms): New procedure.
7127 * exp_unst.adb (Unnest_Subprogram): Major rewrite, moving
7128 all processing to this routine which is now called late
7129 after instantiating bodies. Fully handles the case of generic
7131 * exp_unst.ads: Major rewrite, moving all processing to
7133 * frontend.adb (Frontend): Add call to Exp_Ch6.Initialize.
7134 (Frontend): Add call to Unnest_Subprograms.
7135 * sem_ch8.adb (Find_Direct_Name): Back to old calling sequence
7136 for Check_Nested_Access.
7137 * sem_util.adb (Build_Default_Subtype): Minor reformatting
7138 (Check_Nested_Access): Back to original VM-only form (we
7139 now do all the processing for Unnest_Subprogram at the time
7141 (Denotes_Same_Object): Minor reformatting
7142 (Note_Possible_Modification): Old calling sequence for
7143 Check_Nested_Access.
7144 * sem_util.ads (Check_Nested_Access): Back to original VM-only
7145 form (we now do all the processing for Unnest_Subprogram at the
7148 2015-05-12 Robert Dewar <dewar@adacore.com>
7150 * sem_ch3.adb, freeze.adb, sem_ch6.adb: Minor reformatting.
7152 2015-05-12 Ed Schonberg <schonberg@adacore.com>
7154 * sem_ch3.adb (Analyze_Object_Declaration): New function
7155 Has_Delayed_Aspect, used to defer resolution of an aggregate
7156 expression when the object declaration carries aspects Address
7158 * freeze.adb (Freeze_Object_Declaration): New subsidiary procedure
7159 to Freeze_Entity. In addition to the previous processing steps
7160 at the freeze point of an object, this procedure also handles
7161 aggregates in object declarations, when the declaration carries
7162 delayed aspects that require that the initialization of the
7163 object be attached to its freeze actions.
7165 2015-05-12 Ed Schonberg <schonberg@adacore.com>
7167 * sem_ch6.adb (Analyze_Subprogram_Declaration): Following
7168 AI12-0147, null procedures and expression functions are allowed
7169 in protected bodies.
7171 2015-05-12 Tristan Gingold <gingold@adacore.com>
7173 * i-cpoint.adb (Copy_Terminated_Array): Copy nothing if Length is 0.
7175 2015-05-12 Ed Schonberg <schonberg@adacore.com>
7177 * sem_ch3.adb (Complete_Private_Subtype): Propagate
7178 Has_Delayed_Aspects flag from private to full view, to ensure
7179 that predicate functions are constructed.
7181 2015-05-12 Ed Schonberg <schonberg@adacore.com>
7183 * sem_ch6.adb (Process_Formals): If a tagged formal is an
7184 incomplete class-wide type, the subprogram must have a delayed
7185 freeze even though the opertation is not a primitive of the
7186 type. THis ensures that the backend can recover the full view
7187 when elaborating the subprogram declaration.
7189 2015-05-12 Ed Schonberg <schonberg@adacore.com>
7191 * exp_util.adb (Get_Current_Value_Condition): Nothing to be
7192 done if an elsif part has been rewritten so that it is not part
7193 of an enclosing if_statement.
7195 2015-05-12 Robert Dewar <dewar@adacore.com>
7197 * sem_type.adb, sem_ch10.adb, freeze.adb, sem_ch6.adb, exp_disp.adb:
7200 2015-05-12 Bob Duff <duff@adacore.com>
7202 * exp_attr.adb (Size): Remove unnecessary check for types with
7203 unknown discriminants. That was causing the compiler to build
7204 a function call _size(T), where T is a type, not an object.
7206 2015-05-12 Ed Schonberg <schonberg@adacore.com>
7208 * sem_ch4.adb (Extended_Primitive_Ops): Exclude overriding
7209 primitive operations of a type extension declared in the package
7210 body, to prevent duplicates in extended list.
7212 2015-05-12 Ed Schonberg <schonberg@adacore.com>
7214 * sem_ch3.adb (Analyze_Component_Declaration): If the component is
7215 an unconstrained synchronized type with discriminants, create a
7216 constrained default subtype for it, so that the enclosing record
7217 can be given the proper size.
7218 * sem_util.adb (Build_Default_Subtype): If the subtype is created
7219 for a record discriminant, do not analyze the declarztion at
7220 once because it is added to the freezing actions of the enclosing
7223 2015-05-12 Robert Dewar <dewar@adacore.com>
7225 * exp_prag.adb (Expand_N_Pragma): Rewrite ignored pragma as
7227 * namet.ads (Boolean3): Document this flag used for Ignore_Pragma.
7228 * par-prag.adb (Prag): Implement Ignore_Pragma.
7229 * sem_prag.adb: Implement Ignore_Pragma.
7230 * snames.ads-tmpl: Add entries for pragma Ignore_Pragma.
7232 2015-05-12 Javier Miranda <miranda@adacore.com>
7234 * sem_ch10.adb (Build_Shadow_Entity): Link the class-wide shadow
7235 entity with its corresponding real entity.
7236 (Decorate_Type): Unconditionally build the class-wide shadow entity of
7238 * einfo.ads, einfo.adb (Has_Non_Limited_View): New synthesized
7240 (Non_Limited_View): Moved from field 17 to field 19 be available
7241 in class-wide entities.
7242 * exp_attr.adb (Access_Cases): Code cleanup.
7243 * exp_disp.adb (Expand_Interface_Actuals): Ditto.
7244 * exp_util.adb (Non_Limited_Designated_Type): Ditto.
7245 * freeze.adb (Build_Renamed_Bdody): Ditto.
7246 * sem_aux.adb (Available_View): Ditto.
7247 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
7248 (Try_One_Prefix_Interpretation): Ditto.
7249 * sem_ch5.adb (Analyze_Assignment): Ditto.
7250 * sem_ch6.adb (Detect_And_Exchange): Ditto.
7251 * sem_ch8.adb (Find_Expanded_Name): Ditto.
7252 * sem_disp.adb (Check_Controlling_Type): Ditto.
7253 * sem_res.adb (Resolve_Type_Conversion): Ditto.
7254 (Full_Designated_Type): Ditto.
7255 * sem_type.adb (Covers): Ditto.
7256 * sem_util.adb: Fix typo in comment.
7258 2015-05-12 Robert Dewar <dewar@adacore.com>
7260 * exp_unst.adb (Get_Real_Subp): New subprogram.
7261 (Unnest_Subprogram): Use Get_Real_Subp.
7262 (Uplev_Refs_For_One_Subp): Skip if no ARECnU entity.
7263 (Uplev_Refs_For_One_Subp): Use actual subtype in unconstrained case.
7265 2015-05-12 Robert Dewar <dewar@adacore.com>
7267 * a-reatim.adb ("/"): Add explicit check for Time_Span_First / -1.
7269 2015-05-12 Ed Schonberg <schonberg@adacore.com>
7271 * sem_ch4.adb (Extended_Primitive_Ops): New subprogram,
7272 auxiliary to Try_Primitive_Operation to handle properly prefixed
7273 calls where the operation is not a primitive of the type, but
7274 is declared in the package body that is in the immediate scope
7277 2015-05-12 Robert Dewar <dewar@adacore.com>
7279 * sem_util.adb (Is_Variable): Allow X'Deref(Y) as a variable.
7281 2015-05-12 Ed Schonberg <schonberg@adacore.com>
7283 * sem_ch8.adb (Find_Expanded_Name): Handle properly a fully
7284 qualified name for an instance of a generic grand-child unit in
7285 the body its parent.
7287 2015-05-12 Robert Dewar <dewar@adacore.com>
7289 * exp_unst.adb (Upref_Name): New subprogram.
7290 (Unnest_Subprogram): Use Upref_Name.
7291 (Unnest_Subprogram): Use new Deref attribute.
7292 * exp_unst.ads: Doc updates.
7294 2015-05-12 Thomas Quinot <quinot@adacore.com>
7296 * adaint.c: Enable Large File Support in adaint so that __gnat_readdir
7297 can access files on filesystems mounted from servers that use large
7300 2015-05-09 Eric Botcazou <ebotcazou@adacore.com>
7302 * gcc-interface/utils.c (gnat_write_global_declarations): Use type_decl
7303 method instead of global_decl for TYPE_DECLs.
7305 2015-04-27 Jim Wilson <jim.wilson@linaro.org>
7307 * gcc-interface/Makefile-lan.in (ada.mostlyclean): Remove gnatbind
7310 2015-04-13 Eric Botcazou <ebotcazou@adacore.com>
7312 * gnatvsn.ads (Library_Version): Bump to 6.
7314 2015-04-09 Iain Sandoe <iain@codesourcery.com>
7316 * gcc-interface/Makefile.in (darwin, powerpc): Enable atomics.
7318 2015-04-08 Eric Botcazou <ebotcazou@adacore.com>
7320 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Do not make
7321 a function returning an unconstrained type 'const' for the middle-end.
7323 * gcc-interface/trans.c (Pragma_to_gnu) <case Pragma_Warning>: Use
7324 exact condition to detect Reason => "..." pattern.
7326 2015-03-31 Tom de Vries <tom@codesourcery.com>
7329 * terminals.c (child_setup_tty): Fix warning 'argument to sizeof in
7330 bzero call is the same expression as the destination'.
7332 2015-03-26 Eric Botcazou <ebotcazou@adacore.com>
7334 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Deref>: New case.
7336 2015-03-24 Gary Dismukes <dismukes@adacore.com>
7338 * sem_ch3.adb: Minor typo fix (missing paren).
7340 2015-03-24 Robert Dewar <dewar@adacore.com>
7342 * sinfo.ads: Update comment.
7344 2015-03-24 Robert Dewar <dewar@adacore.com>
7346 * exp_attr.adb: Add entry for typ'Deref.
7347 * sem_attr.adb (Deref): New GNAT attribute.
7348 * sem_attr.ads: Add entry for new GNAT attribute Deref.
7349 * snames.ads-tmpl: Add entries for new attribute Deref.
7351 2015-03-24 Ed Schonberg <schonberg@adacore.com>
7353 * sem_ch13.adb (Rep_Item_Too_Early): allow pragma Convention
7356 2015-03-24 Gary Dismukes <dismukes@adacore.com>
7358 * inline.adb: Minor typo fix.
7360 2015-03-24 Arnaud Charlet <charlet@adacore.com>
7362 * doc/gnat_ugn/building_executable_programs_with_gnat.rst,
7363 doc/gnat_ugn/gnat_utility_programs.rst
7364 doc/gnat_rm/implementation_defined_attributes.rst
7365 doc/gnat_rm/implementation_defined_pragmas.rst
7366 doc/gnat_rm/representation_clauses_and_pragmas.rst
7367 doc/gnat_rm/about_this_guide.rst
7368 doc/gnat_rm/implementation_of_ada_2012_features.rst: Doc improvements.
7369 * gnat_rm.texi, gnat_ugn.texi: Regenerate.
7371 2015-03-23 Jakub Jelinek <jakub@redhat.com>
7374 * adadecode.c (ada_demangle): Guard with IN_RTS instead of IN_GCC.
7376 2015-03-20 Eric Botcazou <ebotcazou@adacore.com>
7379 * gcc-interface/utils.c (gnat_pushdecl): Tidy up and improve comment.
7380 Make sure to chain only main variants through TYPE_NEXT_PTR_TO.
7382 * gcc-interface/trans.c (Attribute_to_gnu): Revert latest change.
7384 2015-03-16 Eric Botcazou <ebotcazou@adacore.com>
7386 * gcc-interface/utils2.c (gnat_invariant_expr): Return null if the type
7387 of the expression ends up being composite.
7389 2015-03-16 Eric Botcazou <ebotcazou@adacore.com>
7391 * gcc-interface/decl.c (is_from_limited_with_of_main): New predicate.
7392 (gnat_to_gnu_entity) <E_Subprogram_Type>: Invoke it on return and
7393 parameter types to detect circularities in ASIS mode.
7394 * gcc-interface/trans.c (Attribute_to_gnu): Mention AI05-0151.
7396 2015-03-16 Eric Botcazou <ebotcazou@adacore.com>
7398 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Abstract_State>: Do not
7399 short-circuit the regular handling.
7401 2015-03-13 Robert Dewar <dewar@adacore.com>
7403 * exp_unst.adb (Note_Uplevel_Reference): Eliminate duplicate
7405 (Actual_Ref): New function.
7406 (AREC_String): Minor reformatting.
7407 (Unnest_Subprogram): Use Actual_Ref.
7408 * frontend.adb (Frontend): Turn off Unnest_Subprogram_Mode
7409 before call to Instantiate_Bodies.
7411 2015-03-13 Ed Schonberg <schonberg@adacore.com>
7413 * freeze.adb (Freeze_Profile): If the return type of a function
7414 being frozen is an untagged limited view and the function is
7415 abstract, mark the type as frozen because there is no later
7416 point at which the profile of the subprogram will be elaborated.
7418 2015-03-13 Robert Dewar <dewar@adacore.com>
7420 * einfo.adb, einfo.ads, atree.adb, atree.ads, atree.h: Add seventh
7421 component to entities. Add new fields Field36-41 and Node36-41.
7423 2015-03-13 Claire Dross <dross@adacore.com>
7425 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Rewrite after review.
7427 2015-03-13 Robert Dewar <dewar@adacore.com>
7429 * exp_util.adb (Is_Volatile_Reference): Compile time known
7430 value is never considered to be a volatile reference.
7432 2015-03-13 Robert Dewar <dewar@adacore.com>
7434 * sem_ch3.adb (Analyze_Object_Contract): Suppress "constant
7435 cannot be volatile" for internally generated object (such as
7436 FIRST and LAST constants).
7438 2015-03-13 Ed Schonberg <schonberg@adacore.com>
7440 * sem_ch12.adb (Validate_Access_Subprogram_Instance): If a
7441 convention is specified for the formal parameter, verify that
7442 the actual has the same convention.
7443 * sem_prag.adb (Set_Convention_From_Pragma): Allow convention
7444 pragma to be set on a generic formal type.
7445 * sem_util.adb (Set_Convention): Ignore within an instance,
7446 as it has already been verified in the generic unit.
7448 2015-03-13 Claire Dross <dross@adacore.com>
7450 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do not inline
7451 subprograms with unconstrained record parameters containing
7453 * sinfo.ads Document GNATprove assumption that type should match
7455 * sem_ch6.adb (Analyze_Subprogram_Body_Contract):
7456 Do not check for Refined_Depends and Refined_Globals contracts
7457 as they are optional.
7459 2015-03-13 Ed Schonberg <schonberg@adacore.com>
7461 * sem_ch12.adb (Instantiate_Type): For a floating-point type,
7462 capture dimension info if any, because the generated subtype
7463 declaration does not come from source and will not process dimensions.
7464 * sem_dim,adb (Analyze_Dimension_Extension_Or_Record_Aggregate):
7465 Do not analyze expressions with an initialization procedure
7466 because aggregates will have been checked at the point of record
7469 2015-03-13 Robert Dewar <dewar@adacore.com>
7471 * aspects.ads, aspects.adb: Add entries for aspect Unimplemented.
7472 * einfo.ads, einfo.adb (Is_Unimplemented): New flag.
7473 * sem_ch13.adb: Add dummy entry for aspect Unimplemented.
7474 * snames.ads-tmpl: Add entry for Name_Unimplemented.
7476 2015-03-13 Gary Dismukes <dismukes@adacore.com>
7478 * style.adb (Missing_Overriding): Apply the
7479 Comes_From_Source test to the Original_Node of the subprogram
7480 node, to handle the case of a null procedure declaration that
7481 has been rewritten as an empty procedure body.
7483 2015-03-13 Robert Dewar <dewar@adacore.com>
7485 * exp_util.ads: Minor fix to comment.
7486 * sem_ch3.adb (Constrain_Index): Correct pasto from previous
7489 2015-03-13 Robert Dewar <dewar@adacore.com>
7491 * exp_util.ads, exp_util.adb (Force_Evaluation): Add Related_Id and
7492 Is_Low/High_Bound params.
7493 * sem_ch3.adb (Constrain_Index): Use new Force_Evaluation calling
7494 sequence to simplify generation of FIRST/LAST temps for bounds.
7496 2015-03-12 Olivier Hainque <hainque@adacore.com>
7498 * gcc-interface/trans.c (Attribute_to_gnu) <Code_Address case>:
7499 On targets where a function symbol designates a function descriptor,
7500 fetch the function code address from the descriptor.
7501 (USE_RUNTIME_DESCRIPTORS): Provide a default definition.
7503 2015-03-04 Robert Dewar <dewar@adacore.com>
7505 * sem_warn.adb: Minor reformatting.
7506 * init.c: Minor tweaks.
7508 2015-03-04 Dmitriy Anisimko <anisimko@adacore.com>
7510 * a-coinho-shared.adb: Fix clear of already empty holder.
7512 2015-03-04 Robert Dewar <dewar@adacore.com>
7514 * exp_unst.adb (Check_Dynamic_Type): Ignore library level types.
7515 (Check_Uplevel_Reference_To_Type): Ignore call inside generic.
7516 (Note_Uplevel_Reference): Ignore call inside generic.
7517 (Note_Uplevel_Reference): Fix check for no entity field.
7518 (Unnest_Subprogram): Ignore call inside generic.
7519 (Find_Current_Subprogram): Use Defining_Entity, not Defining_Unit_Name.
7520 (Visit_Node): Ignore calls to Imported subprograms.
7521 (Visit_Node): Fix problem in finding subprogram body in some cases.
7522 (Add_Form_To_Spec): Use Defining_Entity, not Defining_Unit_Name.
7524 2015-03-04 Robert Dewar <dewar@adacore.com>
7526 * einfo.adb (Is_ARECnF_Entity): Removed.
7527 (Last_Formal): Remove special handling of Is_ARECnF_Entity.
7528 (Next_Formal): Remove special handling of Is_ARECnF_Entity.
7529 (Next_Formal_With_Extras): Remove special handling of Is_ARECnF_Entity.
7530 (Number_Entries): Minor reformatting.
7531 * einfo.ads (Is_ARECnF_Entity): Removed.
7532 * exp_unst.adb (Unnest_Subprogram): Remove setting of
7534 (Add_Extra_Formal): Use normal Extra_Formal circuit.
7535 * sprint.adb (Write_Param_Specs): Properly handle case where
7536 there are no source formals, but we have at least one Extra_Formal
7539 2015-03-04 Ed Schonberg <schonberg@adacore.com>
7541 * sem_aggr.adb (Resolve_Record_Aggregate,
7542 Add_Discriminant_Values): If the value is a reference to the
7543 current instance of an enclosing type, use its base type to check
7544 against prefix of attribute reference, because the target type
7545 may be otherwise constrained.
7547 2015-03-04 Robert Dewar <dewar@adacore.com>
7549 * atree.h: Add entries for Flag287-Flag309.
7550 * einfo.adb: Add (unused) flags Flag287-Flag309.
7552 2015-03-04 Ed Schonberg <schonberg@adacore.com>
7554 * sem_util.adb (Collect_Interfaces, Collect): When gathering
7555 interfaces of ancestors, handle properly a subtype of a private
7558 2015-03-04 Robert Dewar <dewar@adacore.com>
7560 * einfo.adb (Is_ARECnF_Entity): New flag (ARECnF is an extra formal).
7561 (Next_Formal): Don't return ARECnF formal.
7562 (Last_Formal): Don't consider ARECnF formal.
7563 (Next_Formal_With_Extras): Do consider ARECnF formal.
7564 * einfo.ads (Is_ARECnF_Entity): New flag (ARECnF is an extra formal).
7565 * exp_unst.adb (Create_Entities): Set Is_ARECnF_Entity flag.
7567 2015-03-04 Javier Miranda <miranda@adacore.com>
7569 * exp_ch6.adb (Expand_Simple_Function_Return): When the returned
7570 object is a class-wide interface object and we generate the
7571 accessibility described in RM 6.5(8/3) then displace the pointer
7572 to the object to reference the base of the object (to get access
7573 to the TSD of the object).
7575 2015-03-04 Hristian Kirtchev <kirtchev@adacore.com>
7577 * sem_prag.adb (Analyze_Abstract_State): Use routine
7578 Malformed_State_Error to issue general errors.
7579 (Analyze_Pragma): Diagnose a syntax error related to a state
7580 declaration with a simple option.
7581 (Malformed_State_Error): New routine.
7583 2015-03-04 Robert Dewar <dewar@adacore.com>
7585 * a-strsup.adb (Super_Slice): Deal with super flat case.
7586 * einfo.ads: Minor reformatting.
7587 * s-imgdec.adb (Set_Decimal_Digits): Add comment about possibly
7590 2015-03-04 Claire Dross <dross@adacore.com>
7592 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
7593 a-cforse.ads, a-cofove.ads: Use Default_Initial_Condition on formal
7596 2015-03-04 Ed Schonberg <schonberg@adacore.com>
7598 * sem_warn.adb (Check_References): When checking for an unused
7599 in-out parameter of a class- wide type, use its type to determine
7600 whether it is private, in order to avoid a spurious warning when
7601 subprogram spec and body are in different units.
7603 2015-03-04 Yannick Moy <moy@adacore.com>
7605 * sem_attr.adb: Improve warning messages.
7607 2015-03-04 Robert Dewar <dewar@adacore.com>
7609 * exp_ch6.adb (Expand_N_Subprogram_Body): Avoid trying to unnest
7610 generic subprograms.
7611 * exp_unst.adb (Check_Dynamic_Type): Handle record types properly
7612 (Note_Uplevel_Reference): Ignore uplevel references to non-types
7613 (Get_Level): Consider only subprograms, not blocks.
7614 (Visit_Node): Set proper condition for generating ARECnF entity.
7615 Ignore indirect calls. Ignore calls to subprograms
7617 (Unnest_Subprogram): Minor changes in dealing with ARECnF entity.
7618 (Add_Form_To_Spec): Properly set Last_Entity field.
7619 (Unnest_Subprogram): Set current subprogram scope for analyze calls.
7620 Handle case of no uplevel refs in outer subprogram
7621 Don't mark uplevel entities as aliased.
7622 Don't deal with calls with no ARECnF requirement.
7624 2015-03-04 Robert Dewar <dewar@adacore.com>
7626 * s-valrea.adb (Scan_Real): Remove redundant tests from scaling loops.
7627 * s-imgdec.adb (Set_Decimal_Digits): Remove redundant Max
7628 operation in computing LZ.
7629 * sem_attr.adb: Minor typo fix
7631 2015-03-04 Robert Dewar <dewar@adacore.com>
7633 * exp_ch7.adb: Minor reformatting.
7634 * exp_unst.adb (Build_Tables): Fix minor glitch for no separate
7636 * erroutc.adb (Delete_Msg): add missing decrement of info msg counter.
7638 2015-03-04 Hristian Kirtchev <kirtchev@adacore.com>
7640 * exp_ch6.adb (Build_Pragma_Check_Equivalent): Suppress
7641 references to formal parameters subject to pragma Unreferenced.
7642 (Suppress_Reference): New routine.
7643 * sem_attr.adb (Analyze_Attribute): Reimplement the analysis
7644 of attribute 'Old. Attributes 'Old and 'Result now share
7646 (Analyze_Old_Result_Attribute): New routine.
7647 (Check_Placement_In_Check): Removed.
7648 (Check_Placement_In_Contract_Cases): Removed.
7649 (Check_Placement_In_Test_Case): Removed.
7650 (Check_Use_In_Contract_Cases): Removed.
7651 (Check_Use_In_Test_Case): Removed.
7652 (In_Refined_Post): Removed.
7653 (Is_Within): Removed.
7654 * sem_warn.adb (Check_Low_Bound_Tested): Code cleanup.
7655 (Check_Low_Bound_Tested_For): New routine.
7657 2015-03-04 Hristian Kirtchev <kirtchev@adacore.com>
7659 * exp_ch3.adb (Expand_N_Object_Declaration):
7660 Generate a runtime check to test the expression of pragma
7661 Default_Initial_Condition when the object is default initialized.
7663 2015-03-02 Robert Dewar <dewar@adacore.com>
7665 * scng.adb (Scan): Ignore illegal character in relaxed
7668 2015-03-02 Ed Schonberg <schonberg@adacore.com>
7670 * sem_ch4.adb (Analyze_Set_Membership); Retain Overloaded flag
7671 on left operand, so it can be properly resolved with type of
7672 alternatives of right operand.
7673 * sem_res.adb (Resolve_Set_Membership): Handle properly an
7674 overloaded left-hand side when the alternatives on the right
7675 hand side are literals of some universal type. Use first
7676 non-overloaded alternative to find expected type.
7678 2015-03-02 Ed Schonberg <schonberg@adacore.com>
7680 * exp_ch7.adb (Make_Set_Finalize_Address_Call): Use underlying
7681 type to retrieve designated type, because the purported access
7682 type may be a partial (private) view, when it is declared in
7683 the private part of a nested package, and finalization actions
7684 are generated when completing compilation of enclosing unit.
7686 2015-03-02 Robert Dewar <dewar@adacore.com>
7688 * back_end.adb (Call_Back_End): Remove previous patch,
7689 the back end now gets to see the result of -gnatd.1
7690 (Unnest_Subprogram_Mode) processing.
7691 * elists.ads, elists.adb (List_Length): New function.
7692 * exp_unst.ads, exp_unst.adb: Major changes, first complete version.
7693 * sem_util.adb (Check_Nested_Access): Handle formals in
7694 Unnest_Subprogram_Mode.
7695 (Adjust_Named_Associations): Minor reformatting.
7696 * sprint.adb (Sprint_Node_Actual): Fix failure to print aliased
7699 2015-03-02 Robert Dewar <dewar@adacore.com>
7701 * atree.ads, atree.adb (Uint24): New function
7702 (Set_Uint24): New procedure.
7703 * atree.h (Uint24): New macro for field access.
7704 * back_end.adb (Call_Back_End): For now, don't call back end
7705 if unnesting subprogs.
7706 * einfo.adb (Activation_Record_Component): New field
7707 (Subps_Index): New field.
7708 * einfo.ads (Activation_Record_Component): New field
7709 (Subps_Index): New field Minor reordering of comments into alpha order.
7710 * exp_unst.ads, exp_unst.adb: Continued development.
7712 2015-03-02 Gary Dismukes <dismukes@adacore.com>
7714 * exp_disp.ads: Minor reformatting.
7716 2015-03-02 Ed Schonberg <schonberg@adacore.com>
7718 * sem_ch8.adb (Chain_Use_Clause): Do not chain use clause from
7719 ancestor to list of use clauses active in descendant unit if we
7720 are within the private part of an intervening parent, to prevent
7721 circularities in use clause list.
7723 2015-03-02 Javier Miranda <miranda@adacore.com>
7725 * exp_ch9.adb (Build_Corresponding_Record): Propagate type
7726 invariants to the corresponding record type.
7727 * exp_disp.ad[sb] (Set_DT_Position_Value): New subprogram
7728 which sets the value of the DTC_Entity associated with a given
7729 primitive of a tagged type and propagates the value to the
7731 (Set_DTC_Entity_Value): Propagate the DTC
7732 value to the wrapped entity.
7733 * sem_ch13.adb (Build_Invariant_Procedure): Append the code
7734 associated with invariants of progenitors.
7735 * sem_ch3.adb (Build_Derived_Record_Type): Inherit type invariants
7736 of parents and progenitors.
7737 (Process_Full_View): Check hidden inheritance of class-wide type
7739 * sem_ch7.adb (Analyze_Package_Specification): Do not generate
7740 the invariant procedure for interface types; build the invariant
7741 procedure for tagged types inheriting invariants from their
7743 * sem_prag.adb (Pragma_Invariant) Allow invariants in interface
7744 types but do not build their invariant procedure since their
7745 invariants will be propagated to the invariant procedure of
7746 types covering the interface.
7747 * exp_ch6.adb, exp_disp.adb, sem_ch3.adb, sem_ch7.adb,
7748 sem_ch8.adb, sem_disp.adb: Replace all calls to Set_DT_Position
7749 by calls to Set_DT_Position_Value.
7751 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
7753 * sem_attr.adb (Analyze_Attribute): Factor out heavily indented
7754 code in Denote_Same_Function. Do not analyze attribute 'Result
7755 when it is inside procedure _Postconditions. Remove a misplaced
7756 warning diagnostic. Code cleanup.
7757 (Denote_Same_Function): New routine.
7758 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Code
7759 cleanup. Warn on pre/postconditions on an inlined subprogram.
7760 (Analyze_Pragma, Refined_Post case): Warn on pre/postconditions on
7761 an inlined subprogram.
7762 (Analyze_Pre_Post_Condition_In_Decl_Part): Code cleanup. Warn on
7763 pre/post condition on an inlined subprogram.
7764 (Analyze_Test_Case_In_Decl_Part): Code cleanup. Warn on
7765 pre/postconditions on an inlined subprogram.
7766 (Check_Postcondition_Use_In_Inlined_Subprogram): New routine.
7768 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
7770 * sem_prag.adb (Ensure_Aggregate_Form):
7771 Ensure that the name denoted by the Chars of a pragma argument
7772 association has the proper Sloc when converted into an aggregate.
7774 2015-03-02 Bob Duff <duff@adacore.com>
7776 * sem_ch6.adb (Check_Private_Overriding): Capture
7777 Incomplete_Or_Partial_View in a constant. This is cleaner and
7780 2015-03-02 Gary Dismukes <dismukes@adacore.com>
7782 * einfo.ads, exp_unst.ads: Minor reformatting.
7784 2015-03-02 Ed Schonberg <schonberg@adacore.com>
7786 * a-strsea.adb (Find_Token): Ensure that the range of iteration
7787 does not perform any improper character access. This prevents
7788 erroneous access in the unusual case of an empty string target
7789 and a From parameter less than Source'First.
7791 2015-03-02 Robert Dewar <dewar@adacore.com>
7793 * elists.adb (List_Length): Fix incorrect result.
7795 2015-03-02 Bob Duff <duff@adacore.com>
7797 * sem_ch6.adb (Check_Private_Overriding): Refine the legality
7798 checks here. It used to check that the function is merely
7799 overriding SOMEthing. Now it checks that the function is
7800 overriding a corresponding public operation. This is a correction
7801 to the implementation of the rule in RM-3.9.3(10).
7803 2015-03-02 Robert Dewar <dewar@adacore.com>
7805 * debug.adb: Document new debug flag -gnatd.1.
7806 * einfo.ads, einfo.adb (Has_Nested_Subprogram): New flag.
7807 (Has_Uplevel_Reference): New flag (Is_Static_Type): New flag.
7808 (Uplevel_Reference_Noted):New flag (Uplevel_References): New field.
7809 * elists.ads elists.adb (List_Length): New function.
7810 * exp_ch6.adb (Expand_N_Subprogram_Body): Call Unnest_Subprogram
7811 when appropriate (Process_Preconditions): Minor code
7812 reorganization and reformatting
7813 * exp_unst.ads, exp_unst.adb: New files.
7814 * gnat1drv.adb (Adjust_Global_Switches): Set
7815 Unnest_Subprogram_Mode if -gnatd.1
7816 * namet.ads, namet.adb (Name_Find_Str): New version of Name_Find with
7818 * opt.ads (Unnest_Subprogram_Mode): New flag.
7819 * par-ch3.adb (P_Identifier_Declarations): Fixes to -gnatd.2 handling.
7820 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set
7821 Has_Nested_Subprogram flag.
7822 * sem_ch8.adb (Find_Direct_Name): New calling sequence for
7823 Check_Nested_Access.
7824 (Find_Selected_Component): Minor comment addition.
7825 * sem_util.adb (Check_Nested_Access): New version for use with Exp_Unst.
7826 (Note_Possible_Modification): New calling sequence for
7827 Check_Nested_Access.
7828 * sem_util.ads (Check_Nested_Access): New version for use with Exp_Unst.
7829 * gcc-interface/Make-lang.in (GNAT1_OBJS): Add exp_unst.o
7831 2015-03-02 Pierre-Marie de Rodat <derodat@adacore.com>
7833 * gcc-interface/utils.c (gnat_pushdecl): For non-artificial pointer
7834 types, preserve the original type and create copies just like the C
7835 front-end does. For artificial ones, do not define a name for
7837 (create_type_decl): When gnat_pushdecl made the input type the
7838 original type for the new declaration, do not define a stub
7840 * gcc-interface/utils2.c (build_binary_op): Accept two different
7841 pointer types when they point to the same type.
7843 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
7845 * exp_util.adb (Possible_Bit_Aligned_Component): Do not process
7847 * sem_util.adb (Kill_Current_Values): Do not invalidate and
7850 2015-03-02 Robert Dewar <dewar@adacore.com>
7852 * sem_ch3.adb, exp_attr.adb, checks.adb, exp_aggr.adb: Minor
7855 2015-03-02 Ed Schonberg <schonberg@adacore.com>
7857 * sem_ch8.adb: extend use of Available_Subtype.
7859 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
7861 * sem_prag.adb (Duplication_Error): Remove the special handling
7862 of 'Class or _Class in the context of pre/postconditions.
7863 (Process_Class_Wide_Condition): Remove the special handling of
7864 'Class or _Class in the context of pre/postconditions.
7865 * sem_util.adb (Original_Aspect_Pragma_Name): Names Pre_Class
7866 and Post_Class no longer need to be converted to _Pre and _Post.
7867 * sem_util.ads (Original_Aspect_Pragma_Name): Update the comment
7870 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
7872 * exp_ch6.adb (Process_Preconditions): Modify the
7873 mechanism that find the first source declaration to correct exit
7874 the loop once it has been found.
7876 2015-03-02 Gary Dismukes <dismukes@adacore.com>
7878 * a-strsea.adb: Minor typo fix.
7880 2015-03-02 Bob Duff <duff@adacore.com>
7882 * einfo.ads: Minor comment fixes.
7884 2015-03-02 Gary Dismukes <dismukes@adacore.com>
7886 * einfo.adb, checks.adb: Minor reformatting and typo fixes.
7888 2015-03-02 Ed Schonberg <schonberg@adacore.com>
7890 * exp_aggr.adb (Get_Assoc_Expr): If the Default_Component_Value
7891 is defined for the array type, use it instead of a Default_Value
7892 specified for the component type itself.
7894 2015-03-02 Thomas Quinot <quinot@adacore.com>
7896 * exp_attr.adb (Expand_N_Attribute_Reference, case Input): When
7897 expanding a 'Input attribute reference for a class-wide type,
7898 do not generate a separate object declaration for the controlling
7899 tag dummy object; instead, generate the expression inline in the
7900 dispatching call. Otherwise, the declaration (which involves a
7901 call to String'Input, returning a dynamically sized value on the
7902 secondary stack) will be expanded outside of proper secondary
7903 stack mark/release operations, and will thus cause a secondary
7906 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
7908 * checks.adb (Add_Validity_Check): Change the names of all
7909 formal parameters to better illustrate their purpose. Update
7910 the subprogram documentation. Update all occurrences of the
7911 formal parameters. Generate a pre/postcondition pragma by
7912 calling Build_Pre_Post_Condition.
7913 (Build_PPC_Pragma): Removed.
7914 (Build_Pre_Post_Condition): New routine.
7915 * einfo.adb Node8 is no longer used as Postcondition_Proc. Node14
7916 is now used as Postconditions_Proc. Flag240 is now renamed to
7917 Has_Expanded_Contract. (First_Formal): The routine can now
7918 operate on generic subprograms.
7919 (First_Formal_With_Extras): The routine can now operate on generic
7921 (Has_Expanded_Contract): New routine.
7922 (Has_Postconditions): Removed.
7923 (Postcondition_Proc): Removed.
7924 (Postconditions_Proc): New routine.
7925 (Set_Has_Expanded_Contract): New routine.
7926 (Set_Has_Postconditions): Removed.
7927 (Set_Postcondition_Proc): Removed.
7928 (Set_Postconditions_Proc): New routine.
7929 (Write_Entity_Flags): Remove the output of Has_Postconditions. Add
7930 the output of Has_Expanded_Contract.
7931 (Write_Field8_Name): Remove the output of Postcondition_Proc.
7932 (Write_Field14_Name): Add the output of Postconditions_Proc.
7933 * einfo.ads New attributes Has_Expanded_Contract and
7934 Postconditions_Proc along with occurrences in entities.
7935 Remove attributes Has_Postconditions and Postcondition_Proc
7936 along with occurrences in entities.
7937 (Has_Expanded_Contract): New routine along with pragma Inline.
7938 (Has_Postconditions): Removed along with pragma Inline.
7939 (Postcondition_Proc): Removed along with pragma Inline.
7940 (Postconditions_Proc): New routine along with pragma Inline.
7941 (Set_Has_Expanded_Contract): New routine along with pragma Inline.
7942 (Set_Has_Postconditions): Removed along with pragma Inline.
7943 (Set_Postcondition_Proc): Removed along with pragma Inline.
7944 (Set_Postconditions_Proc): New routine along with pragma Inline.
7945 * exp_ch6.adb (Add_Return): Code cleanup. Update the
7946 generation of the call to the _Postconditions routine of
7947 the procedure. (Expand_Non_Function_Return): Reformat the
7948 comment on usage. Code cleanup. Update the generation of
7949 the call to the _Postconditions routine of the procedure or
7951 (Expand_Simple_Function_Return): Update the
7952 generation of the _Postconditions routine of the function.
7953 (Expand_Subprogram_Contract): Reimplemented.
7954 * exp_ch6.ads (Expand_Subprogram_Contract): Update the parameter
7955 profile along the comment on usage.
7956 * exp_ch9.adb (Build_PPC_Wrapper): Code cleanup.
7957 (Expand_N_Task_Type_Declaration): Generate pre/postconditions
7958 wrapper when the entry [family] has a contract with
7960 * exp_prag.adb (Expand_Attributes_In_Consequence): New routine.
7961 (Expand_Contract_Cases): This routine and its subsidiaries now
7962 analyze all generated code.
7963 (Expand_Old_In_Consequence): Removed.
7964 * sem_attr.adb Add with and use clause for Sem_Prag.
7965 (Analyze_Attribute): Reimplment the analysis of attribute 'Result.
7966 (Check_Use_In_Test_Case): Use routine Test_Case_Arg to obtain
7968 * sem_ch3.adb (Analyze_Declarations): Analyze the contract of
7969 a generic subprogram.
7970 (Analyze_Object_Declaration): Do not create a contract node.
7971 (Derive_Subprogram): Do not create a contract node.
7972 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Do
7973 not create a contract node.
7974 (Analyze_Completion_Contract): New routine.
7975 (Analyze_Function_Return): Alphabetize.
7976 (Analyze_Generic_Subprogram_Body): Alphabetize. Do not create a
7977 contract node. Do not copy pre/postconditions to the original
7979 (Analyze_Null_Procedure): Do not create a contract node.
7980 (Analyze_Subprogram_Body_Contract): Reimplemented.
7981 (Analyze_Subprogram_Body_Helper): Do not mark the enclosing scope
7982 as having postconditions. Do not create a contract node. Analyze
7983 the subprogram body contract of a body that acts as a compilation
7984 unit. Expand the subprogram contract after the declarations have
7986 (Analyze_Subprogram_Contract): Reimplemented.
7987 (Analyze_Subprogram_Specification): Do not create a contract node.
7988 (List_Inherited_Pre_Post_Aspects): Code cleanup.
7989 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Update the
7991 (Analyze_Subprogram_Contract): Update the
7992 parameter profile and the comment on usage.
7993 * sem_ch7.adb (Analyze_Package_Body_Helper): Do not create a
7995 (Analyze_Package_Declaration): Do not create a
7997 (Is_Subp_Or_Const_Ref): Ensure that the prefix has an entity.
7998 * sem_ch8.adb (Analyze_Subprogram_Renaming): Do not create a
8000 * sem_ch9.adb (Analyze_Entry_Declaration): Do not create a
8002 * sem_ch10.adb (Analyze_Compilation_Unit): Move local variables to
8003 their proper section and alphabetize them. Analyze the contract of
8004 a [generic] subprogram after all Pragmas_After have been analyzed.
8005 (Analyze_Subprogram_Body_Stub_Contract): Alphabetize.
8006 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Do not
8007 create a contract node.
8008 (Analyze_Generic_Subprogram_Declaration):
8009 Alphabetize local variables. Do not create a contract
8010 node. Do not generate aspects out of pragmas for ASIS.
8011 (Analyze_Subprogram_Instantiation): Instantiate
8012 the contract of the subprogram. Do not create a
8013 contract node. (Instantiate_Contract): New routine.
8014 (Instantiate_Subprogram_Body): Alphabetize local variables.
8015 (Save_Global_References_In_Aspects): New routine.
8016 (Save_References): Do not save the global references found within
8017 the aspects of a generic subprogram.
8018 * sem_ch12.ads (Save_Global_References_In_Aspects): New routine.
8019 * sem_ch13.adb (Analyze_Aspect_Specifications): Do not use
8020 Original_Node for establishing linkages.
8021 (Insert_Pragma): Insertion in a subprogram body takes precedence over
8022 the case where the subprogram body is also a compilation unit.
8023 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Use
8024 Get_Argument to obtain the proper expression. Install the generic
8025 formals when the related context is a generic subprogram.
8026 (Analyze_Depends_In_Decl_Part): Use Get_Argument to obtain
8027 the proper expression. Use Corresponding_Spec_Of to obtain
8028 the spec. Install the generic formal when the related context
8029 is a generic subprogram.
8030 (Analyze_Global_In_Decl_Part): Use Get_Argument to obtain the proper
8031 expression. Use Corresponding_Spec_Of to obtain the spec. Install the
8032 generic formal when the related context is a generic subprogram.
8033 (Analyze_Initial_Condition_In_Decl_Part): Use Get_Argument
8034 to obtain the proper expression. Remove the call to
8035 Check_SPARK_Aspect_For_ASIS as the analysis is now done
8037 (Analyze_Pragma): Update all occurrences
8038 to Original_Aspect_Name. Pragmas Contract_Cases, Depends,
8039 Extensions_Visible, Global, Postcondition, Precondition and
8040 Test_Case now carry generic templates when the related context
8041 is a generic subprogram. The same pragmas are no longer
8042 forcefully fully analyzed when the context is a subprogram
8043 that acts as a compilation unit. Pragmas Abstract_State,
8044 Initial_Condition, Initializes and Refined_State have been clean
8045 up. Pragmas Post, Post_Class, Postcondition, Pre, Pre_Class
8046 and Precondition now use the same routine for analysis. Pragma
8047 Refined_Post does not need to check the use of 'Result or
8048 the lack of a post-state in its expression. Reimplement the
8049 analysis of pragma Test_Case.
8050 (Analyze_Pre_Post_Condition): New routine.
8051 (Analyze_Pre_Post_Condition_In_Decl_Part):
8053 (Analyze_Refined_Depends_In_Decl_Part): Use Get_Argument to obtain the
8055 (Analyze_Refined_Global_In_Decl_Part): Use Get_Argument to obtain
8056 the proper expression.
8057 (Analyze_Test_Case_In_Decl_Part): Reimplemented.
8058 (Check_Pre_Post): Removed.
8059 (Check_Precondition_Postcondition): Removed.
8060 (Check_SPARK_Aspect_For_ASIS): Removed.
8061 (Check_Test_Case): Removed.
8062 (Collect_Subprogram_Inputs_Outputs): Use Get_Argument
8063 to obtain the proper expression. Use Corresponding_Spec_Of to
8064 find the proper spec.
8065 (Create_Generic_Template): New routine.
8066 (Duplication_Error): New routine.
8067 (Expression_Function_Error): New routine.
8068 (Find_Related_Subprogram_Or_Body): Moved to the spec
8069 of Sem_Prag. Emit precise error messages. Account for cases of
8070 rewritten expression functions, generic instantiations, handled
8071 sequence of statements and pragmas from aspects.
8072 (Get_Argument): New routine.
8073 (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Removed.
8074 (Preanalyze_CTC_Args): Removed.
8075 (Process_Class_Wide_Condition): New routine.
8076 * sem_prag.ads (Analyze_Test_Case_In_Decl_Part): Update
8077 the parameter profile along with the comment on usage.
8078 (Find_Related_Subprogram_Or_Body): Moved from the body of Sem_Prag.
8079 (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Removed.
8080 (Test_Case_Arg): New routine.
8081 * sem_util.adb Add with and use clauses for Sem_Ch6.
8082 (Add_Contract_Item): This routine now creates a contract
8083 node the first time an item is added. Remove the duplicate
8084 aspect/pragma checks.
8085 (Check_Result_And_Post_State): Reimplemented.
8086 (Corresponding_Spec_Of): New routine.
8087 (Get_Ensures_From_CTC_Pragma): Removed.
8088 (Get_Requires_From_CTC_Pragma): Removed.
8089 (Has_Significant_Contract): New routine.
8090 (Inherit_Subprogram_Contract): Inherit only if the source
8092 (Install_Generic_Formals): New routine.
8093 (Original_Aspect_Name): Removed.
8094 (Original_Aspect_Pragma_Name): New routine.
8095 * sem_util.ads (Check_Result_And_Post_State): Reimplemented.
8096 (Corresponding_Spec_Of): New routine.
8097 (Get_Ensures_From_CTC_Pragma): Removed.
8098 (Get_Requires_From_CTC_Pragma): Removed.
8099 (Has_Significant_Contract): New routine.
8100 (Install_Generic_Formals): New routine.
8101 (Original_Aspect_Name): Removed.
8102 (Original_Aspect_Pragma_Name): New routine.
8103 * sem_warn.adb Add with and use clauses for Sem_Prag.
8104 (Within_Postcondition): Use Test_Case_Arg to extract "Ensures".
8106 2015-03-02 Ed Schonberg <schonberg@adacore.com>
8108 * sem_ch8.adb (Available_Subtype): Optimization in
8109 Find_Selected_Component: when safe, use existing subtype of
8110 array component, possibly discriminant-dependent, rather than
8111 creating new subtype declaration for it. In this fashion different
8112 occurrences of the component have the same subtype, rather than
8113 just equivalent ones. Simplifies value tracing in GNATProve.
8115 2015-03-01 Arnaud Charlet <charlet@adacore.com>
8118 * doc/gnat_ugn/gnat_project_manager.rst,
8119 doc/gnat_ugn/platform_specific_information.rst: Remove reference to
8120 image, too troublesome with texi format.
8121 * gnat_ugn.texi: Regenerate.
8123 2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
8126 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8): Remove.
8127 (DEF_FUNCTION_TYPE_VAR_12): Likewise.
8128 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
8130 2015-02-23 Thomas Schwinge <thomas@codesourcery.com>
8132 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8): Fix number of
8133 arguments parameter.
8134 (DEF_FUNCTION_TYPE_VAR_12): Likewise.
8136 2015-02-22 Arnaud Charlet <charlet@adacore.com>
8138 * doc/Makefile: postprocess texinfo files to update @dircategory
8139 and update texi files under gcc/ada.
8140 * gnat_ugn.texi, gnat_rm.texi: Regenerated.
8142 2015-02-22 Arnaud Charlet <charlet@adacore.com>
8144 * doc/gnat_ugn/project-manager-figure.png,
8145 doc/gnat_ugn/rtlibrary-structure.png: New.
8147 2015-02-22 Tom de Vries <tom@codesourcery.com>
8150 * gnat-style.texi (@subsection Loop Statements): Replace @noindent by
8151 @item, and fix warning '@itemize has text but no @item'.
8153 2015-02-20 Ed Schonberg <schonberg@adacore.com>
8155 * sem_prag.adb (Analyze_Pragma, case Obsolescent): Pragma
8156 legally applies to an abstract subprogram declaration.
8157 * freeze.adb: Minor comment addition.
8159 2015-02-20 Robert Dewar <dewar@adacore.com>
8161 * errout.ads: Document replacement of Name_uPre/Post/Type_Invariant.
8162 * erroutc.adb (Set_Msg_Str): Replace _xxx.
8163 (Pre/Post/Type_Invariant) by xxx'Class.
8164 * erroutc.ads (Set_Msg_Str): Replace _xxx.
8165 (Pre/Post/Type_Invariant) by xxx'Class.
8166 * sem_prag.adb (Fix_Error): Remove special casing of
8167 Name_uType_Invariant.
8168 (Analyze_Pre_Post_Condition_In_Decl_Part): Remove special casing of
8169 Name_uPre and Name_uPost in aspect case (done in Errout now).
8171 2015-02-20 Robert Dewar <dewar@adacore.com>
8173 * g-alveop.adb: Minor style fixes.
8175 2015-02-20 Robert Dewar <dewar@adacore.com>
8177 * freeze.adb (Warn_Overlay): Guard against blow up with address
8180 2015-02-20 Bob Duff <duff@adacore.com>
8182 * exp_attr.adb (May_Be_External_Call): Remove this. There is no need
8183 for the compiler to guess whether the call is internal or external --
8184 it is always external.
8185 (Expand_Access_To_Protected_Op): For P'Access, where P
8186 is a protected subprogram, always create a pointer to the
8187 External_Subprogram.
8189 2015-02-20 Robert Dewar <dewar@adacore.com>
8191 * a-dispat.adb, a-stcoed.ads: Minor reformatting.
8193 2015-02-20 Robert Dewar <dewar@adacore.com>
8195 * sem_ch13.adb (Build_Discrete_Static_Predicate): Allow static
8196 predicate for non-static subtype.
8197 (Build_Predicate_Functions): Do not assume subtype associated with a
8198 static predicate must be static.
8200 2015-02-20 Robert Dewar <dewar@adacore.com>
8202 * errout.adb (Set_Msg_Node): Better handling of internal names
8203 (Set_Msg_Node): Kill message when we cannot eliminate internal name.
8204 * errout.ads: Document additional case of message deletion.
8205 * namet.adb (Is_Internal_Name): Refined to consider wide
8206 strings in brackets notation and character literals not to be
8208 * sem_ch8.adb (Find_Selected_Component): Give additional error
8209 when selector name is a subprogram whose first parameter has
8210 the same type as the prefix, but that type is untagged.
8212 2015-02-20 Robert Dewar <dewar@adacore.com>
8214 * g-allein.ads, g-alveop.adb, g-alveop.ads, opt.ads: Minor reformatting
8216 2015-02-20 Tristan Gingold <gingold@adacore.com>
8218 * opt.ads (GNAT_Mode_Config): New variable.
8219 * opt.adb (Set_Opt_Config_Switches): Consider GNAT_Mode_Config
8220 to set Assertions_Enabled.
8221 * switch-c.adb (Scan_Front_End_Switches): Set GNAT_Mode_Config
8224 2015-02-20 Robert Dewar <dewar@adacore.com>
8226 * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Add an additional
8227 comment regarding the handling of unterminated fixed-point
8229 * s-valuns.ads (Scan_Raw_Unsigned): Add comments
8230 corresponding to those previously added for
8231 System.Val_LLU.Scan_Raw_Long_Long_Unsigned.
8233 2015-02-20 Olivier Hainque <hainque@adacore.com>
8235 * g-allein.ads, g-alveop.ads, g-alveop.adb: Code clean ups.
8237 2015-02-20 Robert Dewar <dewar@adacore.com>
8239 * sem_prag.adb: Minor comment clarification.
8241 2015-02-20 Olivier Hainque <hainque@adacore.com>
8243 * g-allein.ads (vec_ctf, vec_vcsfx, vec_vcfux): Remove.
8244 * g-alleve.ads, g-alleva.adb (vcfux): Likewise.
8245 * g-alveop.ads (vec_vcfsx, vec_vcfux): Just rename the ll versions.
8246 (vec_ctf): Now renamings as well.
8248 2015-02-20 Robert Dewar <dewar@adacore.com>
8250 * switch-c.adb, bindgen.adb: Minor reformatting.
8252 2015-02-20 Ed Schonberg <schonberg@adacore.com>
8254 * sem_prag.adb (Analyze_Pragma, case Type_Invariant):
8255 Invariant'class is allowed on an abstract type.
8257 2015-02-20 Ed Schonberg <schonberg@adacore.com>
8259 * sem_ch3.adb (Access_Definition): If the access definition is
8260 for a protected component and defines an access to protected
8261 subprogram, do not create an itype reference for it because a
8262 full type declaration will be built in order to generate the
8263 proper equivalent type.
8264 (Analyze_Subtype_Declaration): Add information of incomplete
8265 subtypes, for Ada 2012 extended uses of incomplete types.
8267 2015-02-20 Gary Dismukes <dismukes@adacore.com>
8269 * sem_res.adb: Minor reformatting.
8271 2015-02-20 Vincent Celier <celier@adacore.com>
8273 * switch-c.adb (Scan_Front_End_Switches): When comparing runtime
8274 path name for several switches --RTS, use the normalized path
8277 2015-02-20 Vincent Celier <celier@adacore.com>
8279 * bindgen.adb: Minor reformatting and code reorganization.
8281 2015-02-20 Jose Ruiz <ruiz@adacore.com>
8283 * a-stcoed.ads: Add spec for this package (Unimplemented_Unit).
8284 * impunit.adb (Non_Imp_File_Names_12): Mark unit a-stcoed.ads as
8285 defined by Ada 2012.
8287 2015-02-20 Arnaud Charlet <charlet@adacore.com>
8289 * sysdep.c, expect.c, s-oscons-tmplt.c, gsocket.h, adaint.c: Remove
8290 obsolete references to RTX, nucleus, VMS.
8292 2015-02-20 Ed Schonberg <schonberg@adacore.com>
8294 * sem_prag.adb (Fix_Error): For an illegal Type_Invariant'Class
8295 aspect, use name that mentions Class explicitly, rather than
8296 compiler-internal name.
8298 2015-02-20 Robert Dewar <dewar@adacore.com>
8300 * debug.adb: Add documentation for -gnatd.2 (allow statements
8302 * par-ch3.adb (P_Identifier_Declarations): Handle
8303 statement appearing where declaration expected more cleanly.
8304 (Statement_When_Declaration_Expected): Implement debug flag
8307 2015-02-20 Jose Ruiz <ruiz@adacore.com>
8309 * a-dinopr.ads: Add spec for this package (Unimplemented_Unit).
8310 * a-dispat.ads (Yield): Include procedure added in Ada 2012.
8311 * a-dispat.adb (Yield): Implement procedure added in Ada 2012.
8312 * impunit.adb (Non_Imp_File_Names_05): Mark unit a-dinopr.ads as
8313 defined by Ada 2005.
8314 * snames.ads-tmpl (Name_Non_Preemptive_FIFO_Within_Priorities):
8315 This is the correct name for the dispatching policy (FIFO was
8318 2015-02-20 Javier Miranda <miranda@adacore.com>
8320 * sem_res.adb (Resolve_Type_Conversion): If the type of the
8321 operand is the limited-view of a class-wide type then recover
8322 the class-wide type of the non-limited view.
8324 2015-02-20 Arnaud Charlet <charlet@adacore.com>
8326 * gcc-interface/Makefile.in: Remove references to nucleus.
8327 * gcc-interface/decl.c (gnat_to_gnu_entity, case E_Procedure): Set
8328 extern_flag to true for Inline_Always subprograms with
8329 Intrinsic convention.
8331 2015-02-20 Yannick Moy <moy@adacore.com>
8333 * sem_prag.ads: Minor typo in comment.
8335 2015-02-20 Pascal Obry <obry@adacore.com>
8337 * s-osprim-mingw.adb: Fix Get_Base_Time parameter mode.
8339 2015-02-20 Vincent Celier <celier@adacore.com>
8341 * makeutl.adb (Get_Directories.Add_Dir): Add a directory only
8344 2015-02-20 Robert Dewar <dewar@adacore.com>
8346 * sem_eval.ads: Minor reformatting.
8348 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
8350 * freeze.adb (Size_Known): Do not set the packed size for
8351 independent type or component.
8352 (Freeze_Array_Type): Check for Independent[_Components] with packing
8353 or explicit component size clause.
8354 * gnat1drv.adb (Post_Compilation_Validation_Checks): Do the validation
8355 of independence pragmas only for non-GCC back-ends.
8356 * sem_ch13.adb (Initialize): Likewise for the initialization.
8357 * sem_prag.adb (Record_Independence_Check): New procedure to record an
8358 independence check in the table.
8359 (Analyze_Pragma): Use it throughout instead of doing it manually.
8360 * gcc-interface/decl.c (gnat_to_gnu_field): Add support for
8361 independent type or component.
8363 2015-02-20 Thomas Quinot <quinot@adacore.com>
8365 * adaint.c (__gnat_readdir): For Solaris, use 64 bit variants of
8366 struct direct and readdir. This is required for NFS filesystems
8367 mounted from servers that use 64-bit cookies.
8369 2015-02-20 Ed Schonberg <schonberg@adacore.com>
8371 * sem_ch12.adb (Analyze_Subprogram_Instantiaion): New subprogram
8372 Build_Subprogram_Renaming, to create renaming of subprogram
8373 instance in the the declaration of the wrapper package rather
8374 than in its body, so that it is available for analysis of aspects
8375 propagated from generic to instantiation.
8376 (Check_Mismatch): An actual for a formal package that is an
8377 incomplete type matches a formal type that is incomplete.
8378 (Instantiate_Package_Body): Move code that builds subprogram
8379 renaming to Analyze_Subprogram_Instantiation.
8380 (Instantiate_Type): The generated subtype is a limited view if
8381 the actual is a limited view.
8382 (Load_Parent_Of_Generic): Retrieve instance declaration from
8383 its new position within wrapper package.
8385 2015-02-20 Arnaud Charlet <charlet@adacore.com>
8387 * s-parame-vxworks.adb, s-os_lib.ads: Update comments.
8389 2015-02-20 Robert Dewar <dewar@adacore.com>
8391 * s-osinte-vxworks.ads (To_Timespec): Add comment about the
8392 issue of negative arguments.
8394 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
8396 * gnat1drv.adb: Minor consistency fix.
8398 2015-02-20 Pascal Obry <obry@adacore.com>
8400 * s-osprim-mingw.adb (Get_Base_Time): Properly release lock in all
8403 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
8405 * inline.adb (Expand_Inlined_Call): Skip again calls to subprogram
8407 * exp_ch6.adb (Expand_Call): Use back-end inlining
8408 instead of expansion for simple subprogram renamings.
8410 2015-02-20 Robert Dewar <dewar@adacore.com>
8412 * exp_util.adb: Minor reformatting.
8414 2015-02-20 Vincent Celier <celier@adacore.com>
8416 * switch-c.adb (Scan_Front_End_Switches): Do not fail when --RTS=
8417 is specified several times with different values that indicates
8418 the same runtime directory.
8420 2015-02-20 Ed Schonberg <schonberg@adacore.com>
8422 * sem_attr.adb (Check_Not_Incomplete_Type): Clean up code to
8423 handle properly illegal uses of attributes on prefixes on an
8424 incomplete type, both when the type of the prefix is locally
8425 incomplete, and when it is a limited view of a type whose
8426 non-limited view is not available.
8427 (Analyze_Attribute): Add calls to Check_Not_Incomplete_Type for
8428 'Address and others.
8430 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
8432 * exp_ch6.adb: Fix minor typo in comment.
8434 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
8436 * sinfo.ads: Add comment.
8438 2015-02-20 Olivier Hainque <hainque@adacore.com>
8440 * opt.ads: Replace Opt.Suppress_All_Inlining by two separate
8441 flags controlling the actual FE inlining out of pragma Inline
8442 and pragma Inline_Always.
8443 * adabkend.adb (Scan_Compiler_Arguments): Set both flags to True
8444 on -fno-inline, which disables all inlining in compilers with
8445 an Ada back-end and without back-end inlining support.
8446 * back_end.adb (Scan_Back_End_Switches): Set the Inline related
8447 flag to True on -fno-inline and leave Inline_Always alone for
8449 * back_end.ads (Scan_Compiler_Arguments): Adjust spec wrt the
8450 names of the Opt flags it sets.
8451 * gnat1drv.adb (Adjust_Global_Switches): Remove test on
8452 Opt.Suppress_All_Inlining in the Back_End_Inlining computation.
8453 * sem_prag.adb (Make_Inline): Remove early return conditioned
8454 on Opt.Suppress_All_Inlining.
8455 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Use the flags to
8456 disable the calls to Build_Body_To_Inline otherwise triggered
8457 by pragma Inline or Inline_Always. This will prevent actual
8458 front-end inlining of the subprogram on calls.
8460 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
8462 * exp_ch3.adb (Default_Initialize_Object): Call Add_Inlined_Body on the
8463 Abort_Undefer_Direct function.
8464 * exp_ch5.adb (Expand_N_Assignment_Statement): Likewise.
8465 * exp_intr.adb (Expand_Unc_Deallocation): Likewise.
8466 * exp_prag.adb (Expand_Pragma_Abort_Defer): Likewise.
8467 * exp_ch4.adb (Expand_N_Selected_Component): Adjust call to
8469 * exp_ch6.adb (Expand_Call): Adjust calls to Add_Inlined_Body.
8470 Remove call to Register_Backend_Call and move code resetting
8471 Needs_Debug_Info on inlined subprograms to...
8472 * inline.ads (Add_Inlined_Body): Add N parameter.
8473 (Register_Backend_Call): Delete.
8474 * inline.adb (Add_Inlined_Body): ...here and simplify.
8475 Register the call with Backend_Calls directly.
8476 (Register_Backend_Call): Delete.
8477 * s-stalib.ads (Abort_Undefer_Direct): Restore pragma Inline.
8479 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
8481 * s-stalib.ads: Fix typo.
8483 2015-02-20 Ed Schonberg <schonberg@adacore.com>
8485 * exp_ch3.adb (Default_Initialize_Object): If the object has a
8486 delayed freeze, the actions associated with default initialization
8487 must be part of the freeze actions, rather that being inserted
8488 directly after the object declaration.
8490 2015-02-20 Robert Dewar <dewar@adacore.com>
8492 * lib-load.adb: Minor comment update.
8494 2015-02-20 Vincent Celier <celier@adacore.com>
8496 * prj-proc.adb (Process_Case_Construction): When there are
8497 incomplete withed projects and the case variable is unknown,
8498 skip the case construction.
8500 2015-02-20 Ed Schonberg <schonberg@adacore.com>
8502 * exp_ch6.adb (Expand_Actuals): Add caller-side invariant checks
8503 when an actual is a view conversion, either because the call is
8504 to an inherited operation, or because the actual is an explicit
8505 type conversion to an ancestor type. Fixes ACATS 4.0D: C732001
8507 2015-02-20 Robert Dewar <dewar@adacore.com>
8509 * einfo.ads: Minor comment updates Fix missing pragma Inline
8510 for Set_Partial_View_Has_Unknown_Discr.
8511 * einfo.adb (Write_Entity_Flags): Add missing entry for
8512 Partial_View_Has_Unknown_Discr.
8513 * sem_ch3.adb: Minor reformatting.
8515 2015-02-20 Vincent Celier <celier@adacore.com>
8517 * opt.ads: Minor cleanup: remove mention of gprmake.
8518 * s-stalib.ads (Abort_Undefer_Direct): Do not inline.
8519 * s-tataat.adb: Do not call System.Tasking.Self but directly
8520 System.Task_Primitives.Operations.Self.
8522 2015-02-20 Arnaud Charlet <charlet@adacore.com>
8524 * gnat_rm.texi, gnat_ugn.texi: Now automatically generated from
8525 sphinx in the doc directory.
8526 * doc: New directory containing sphinx versions of gnat_rm and gnat_ugn
8528 2015-02-20 Robert Dewar <dewar@adacore.com>
8530 * sem_res.adb: Minor reformatting.
8531 * exp_ch9.adb (Build_Protected_Spec): Copy Aliased setting when
8533 * sem_ch13.adb (Analyze_Aspect_Specifications): Exclude Boolean
8534 aspects from circuitry setting delay required to false if the
8535 argument is an integer literal.
8537 2015-02-20 Ed Schonberg <schonberg@adacore.com>
8539 * einfo.ads. einfo.adb (Partial_View_Has_Unknown_Discr): New flag
8540 on type entities, to enforce AI12-0133: default initialization
8541 of types whose partial view has unknown discriminants does not
8542 get an invariant check, because clients of the unit can never
8543 declare objects of such types.
8544 * sem_ch3.adb (Find_Type_Name); Set new flag
8545 Partial_View_Has_Unknown_Discr when needed.
8546 * exp_ch3.adb (Expand_N_Object_Declaration): Use flag to suppress
8547 generation of invariant call on default-initialized object.
8549 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
8551 * gcc-interface/decl.c (gnat_to_gnu_param): Do not strip the padding
8552 if the parameter either is passed by reference or if the alignment
8555 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
8557 * gcc-interface/decl.c (is_cplusplus_method): Use Is_Primitive flag to
8558 detect primitive operations of tagged and untagged types.
8560 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
8562 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not bother about alias
8563 sets in presence of derivation for subprogram types.
8565 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
8567 * gcc-interface/utils.c (begin_subprog_body): Assert that the body is
8568 present in the same context as the declaration.
8570 2015-02-07 Jakub Jelinek <jakub@redhat.com>
8573 * gcc-interface/trans.c (gigi): Recreate optimization_default_node
8574 and optimization_current_node after tweaking global_options.
8576 2015-02-05 Robert Dewar <dewar@adacore.com>
8578 * prj-proc.adb, sem_aux.adb, exp_ch9.adb, errout.adb, prj-dect.adb,
8579 prj-nmsc.adb: Minor reformatting.
8581 2015-02-05 Ed Schonberg <schonberg@adacore.com>
8583 * sem_type.adb (Covers): In ASIS_Mode the Corresponding_Record
8584 of a protected type may not be available, so to check conformance
8585 with an interface type, examine the interface list in the type
8586 declaration directly.
8587 (Write_Overloads): Improve information for indirect calls,
8590 2015-02-05 Ed Schonberg <schonberg@adacore.com>
8592 * exp_ch3.adb (Make_Tag_Assignment): Do not perform this
8593 expansion activity in ASIS mode.
8595 2015-02-05 Javier Miranda <miranda@adacore.com>
8597 * errout.adb (Error_Msg_PT): Add missing error.
8598 * sem_ch6.adb (Check_Synchronized_Overriding): Check the missing
8599 RM rule. Code cleanup.
8600 * exp_ch9.adb (Build_Wrapper_Spec): Propagate "constant" in
8601 anonymous access types. Found working on the tests. Code cleanup.
8603 2015-02-05 Vincent Celier <celier@adacore.com>
8605 * prj-dect.adb (Parse_Attribute_Declaration): Continue scanning
8606 when there are incomplete withs.
8607 * prj-nmsc.adb (Process_Naming): Do not try to get the value
8608 of an element when it is nil.
8609 (Check_Naming): Do not check a nil suffix for illegality
8610 * prj-proc.adb (Expression): Do not process an empty term.
8611 * prj-strt.adb (Attribute_Reference): If attribute cannot be
8612 found, parse a possible index to avoid cascading errors.
8614 2015-02-05 Ed Schonberg <schonberg@adacore.com>
8616 * sem_aux.adb (Is_Derived_Type): A subprogram_type generated
8617 for an access_to_subprogram declaration is not a derived type.
8619 2015-02-05 Robert Dewar <dewar@adacore.com>
8621 * errout.adb (Error_Msg_Internal): For non-serious error set
8622 Fatal_Error to Ignored.
8623 * lib-load.adb (Load_Unit): Minor comment updates.
8624 * sem_ch10.adb (Analyze_With_Clause): Propagate Fatal_Error
8625 setting from with'ed unit to with'ing unit.
8626 * sem_prag.adb (Analyze_Pragma, case Warnings): Document handling
8629 2015-02-05 Yannick Moy <moy@adacore.com>
8631 * sem_prag.adb, par-prag.adb: Minor code clean up.
8633 2015-02-05 Yannick Moy <moy@adacore.com>
8635 * par-prag.adb (Pragma_Warnings): Update for extended form
8636 of pragma Warnings. The "one" argument case may now have 2 or
8638 * sem_prag.adb (Analyze_Pragma/Pragma_Warnings): Update for
8639 extended form of pragma Warnings. Pragma with tool name is either
8640 rewritten as null or as an equivalent form without tool name,
8642 * snames.ads-tmpl (Name_Gnatprove): New name.
8644 2015-02-05 Robert Dewar <dewar@adacore.com>
8646 * sem_ch13.adb (Add_Invariants): Don't assume invariant is
8648 * sem_prag.adb (Analyze_Pragma, case Check): Don't assume
8649 condition is standard Boolean, it can be non-standard derived
8652 2015-02-05 Robert Dewar <dewar@adacore.com>
8654 * checks.adb (Enable_Range_Check): Disconnect attempted
8655 optimization for the case of range check for subscript of
8656 unconstrained array.
8658 2015-02-05 Robert Dewar <dewar@adacore.com>
8660 * par-ch13.adb (With_Present): New function
8661 (Aspect_Specifications_Present): Handle WHEN in place of WITH
8662 (Get_Aspect_Specifications): Comment update.
8663 * par.adb: Comment updates.
8665 2015-02-05 Robert Dewar <dewar@adacore.com>
8667 * errout.adb (Handle_Serious_Error): New setting of Fatal_Error.
8668 * frontend.adb (Frontend): New setting of Fatal_Error.
8669 * lib-load.adb (Create_Dummy_Package_Unit): New setting of
8671 (Load_Main_Source): New setting of Fatal_Error
8672 (Load_Unit): New setting of Fatal_Error.
8673 * lib-writ.adb (Add_Preprocessing_Dependency): New setting of
8675 (Ensure_System_Dependency): New setting of Fatal_Error.
8676 * lib.adb (Fatal_Error): New setting of Fatal_Error
8677 (Set_Fatal_Error): New setting of Fatal_Error.
8678 * lib.ads: New definition of Fatal_Error and associated routines.
8679 * par-ch10.adb (P_Compilation_Unit): New setting of Fatal_Error.
8680 * par-load.adb (Load): New setting of Fatal_Error.
8681 * rtsfind.adb (Load_RTU): New setting of Fatal_Error.
8682 * sem_ch10.adb (Analyze_Compilation_Unit): New setting of
8684 (Optional_Subunit): New setting of Fatal_Error.
8685 (Analyze_Proper_Body): New setting of Fatal_Error.
8686 (Load_Needed_Body): New setting of Fatal_Error.
8688 2015-02-05 Ed Schonberg <schonberg@adacore.com>
8690 * sem_res.adb (Resolve_Call): If the function being called has
8691 out parameters do not check for language version if the function
8692 comes from a predefined unit, as those are always compiled in
8695 2015-02-05 Ed Schonberg <schonberg@adacore.com>
8697 * sem_ch3.adb (Process_Full_View): Verify that the full view
8698 of a type extension must carry an explicit limited keyword if
8699 the partial view does (RM 7.3 (10.1)).
8701 2015-02-05 Robert Dewar <dewar@adacore.com>
8703 * g-rannum.adb, g-rannum.ads, s-rannum.adb, s-rannum.ads,
8704 sem_warn.ads: Minor reformatting.
8705 * exp_ch13.adb (Expand_N_Freeze_Entity): Add guard for aspect
8707 * sem_prag.adb (Analyze_Pragma, case Type_Invariant): Give
8708 error for abstract type.
8710 2015-02-05 Yannick Moy <moy@adacore.com>
8712 * opt.ads (Warn_On_Suspicious_Contract): Update comment
8714 * sem_attr.adb (Analyze_Attribute/Attribute_Update): Warn on
8715 suspicious uses of 'Update.
8716 * sem_warn.adb, sem_warn.ads (Warn_On_Suspicious_Update): New
8717 function issues warning on suspicious uses of 'Update.
8718 * g-rannum.adb, g-rannum.ads, s-rannum.adb, s-rannum.ads: Mark
8719 package spec and body as SPARK_Mode Off.
8721 2015-02-05 Robert Dewar <dewar@adacore.com>
8723 * sem_prag.adb (Set_Elab_Unit_Name): New name for Set_Unit_Name
8724 (Analyze_Pragma): Change Set_Unit_Name to Set_Elab_Unit_Name
8725 (Set_Elab_Unit_Name): Generate reference for Elaborate[_All]
8726 * sem_warn.adb (Warn_On_Unreferenced_Entity): Suppress warning
8727 for exported entity.
8729 2015-02-05 Hristian Kirtchev <kirtchev@adacore.com>
8731 * sem_prag.adb (Check_Pragma_Conformance): Add
8732 local variable Arg. Ensure that all errors are associated with
8733 the pragma if it appears without an argument. Add comments on
8736 2015-02-05 Robert Dewar <dewar@adacore.com>
8738 * lib-xref.adb: Minor reformatting.
8740 2015-02-05 Tristan Gingold <gingold@adacore.com>
8743 * env.c: Fix thinko: handle Darwin case before default one.
8745 2015-01-30 Robert Dewar <dewar@adacore.com>
8747 * a-assert.adb: Minor reformatting.
8748 * sem_ch13.adb: Minor comment clarification.
8749 * types.ads: Minor comment update.
8750 * sem_eval.adb (Real_Or_String_Static_Predicate_Matches): Avoid blow up
8751 when we have a predicate that is nothing but an inherited dynamic
8754 2015-01-30 Jerome Guitton <guitton@adacore.com>
8756 * gcc-interface/Makefile.in (x86-vxworks): Update GCC_SPEC_FILES to
8757 include cert link spec.
8759 2015-01-30 Robert Dewar <dewar@adacore.com>
8761 * einfo.ads: Minor comment fix.
8762 * freeze.adb (Freeze_Profile): Add test for suspicious import
8764 * sem_prag.adb (Process_Import_Or_Interface): Test for suspicious
8765 use in Pure unit is now moved to Freeze (to properly catch
8766 Pure_Function exemption).
8768 2015-01-30 Bob Duff <duff@adacore.com>
8770 * sem_res.ads: Minor comment fix.
8771 * sem_type.adb: sem_type.adb (Remove_Conversions): Need to
8772 check both operands of an operator.
8774 2015-01-30 Yannick Moy <moy@adacore.com>
8776 * a-assert.ads, a-assert.adb: Mark package spec in SPARK. Set assertion
8777 policy for Pre to Ignore.
8778 (Assert): Add precondition.
8780 2015-01-30 Robert Dewar <dewar@adacore.com>
8782 * sem_prag.adb (Process_Import_Or_Interface): Warn if used in
8784 * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Clarify
8785 documentation for some special cases of invalid attempts at
8788 2015-01-30 Gary Dismukes <dismukes@adacore.com>
8790 * errout.ads: Minor reformatting.
8792 2015-01-30 Yannick Moy <moy@adacore.com>
8794 * inline.adb (Process_Formals): Use the sloc of
8795 the inlined node instead of the sloc of the actual parameter,
8796 when replacing formal parameters by the actual one.
8798 2015-01-30 Arnaud Charlet <charlet@adacore.com>
8800 * g-expect.adb (Get_Command_Output): Use infinite timeout when
8803 2015-01-30 Ed Schonberg <schonberg@adacore.com>
8805 * sem_ch12.adb (Analyze_Associations): If an in-parameter is
8806 defaulted in an instantiation, add an entry in the list of actuals
8807 to indicate the default value of the formal (as is already done
8808 for defaulted subprograms).
8810 2015-01-30 Javier Miranda <miranda@adacore.com>
8812 * errout.adb (Error_Msg_PT): Minor error phrasing update.
8814 2015-01-30 Robert Dewar <dewar@adacore.com>
8816 * sem_warn.adb (Warn_On_Known_Condition): Improve error message
8819 2015-01-30 Pierre-Marie de Rodat <derodat@adacore.com>
8821 * exp_dbug.adb (Get_Encoded_Name): When
8822 -fgnat-encodings=minimal, do not generate names for biased types.
8824 2015-01-30 Tristan Gingold <gingold@adacore.com>
8827 * env.c: Move vxworks and darwin includes out of #ifdef IN_RTS.
8829 2015-01-30 Gary Dismukes <dismukes@adacore.com>
8831 * freeze.adb: Minor reformatting.
8833 2015-01-30 Javier Miranda <miranda@adacore.com>
8835 * errout.ads (Error_Msg_PT): Replace Node_Id by Entity_Id and
8836 improve its documentation.
8837 * errout.adb (Error_Msg_PT): Improve the error message.
8838 * sem_ch6.adb (Check_Conformance): Update call to Error_Msg_PT.
8839 (Check_Synchronized_Overriding): Update call to Error_Msg_PT.
8840 * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup.
8842 2015-01-30 Robert Dewar <dewar@adacore.com>
8844 * sem_warn.adb (Warn_On_Known_Condition): Do special casing of
8845 message for False case.
8847 2015-01-30 Doug Rupp <rupp@adacore.com>
8849 * s-vxwext-kernel.ads (Task_Cont): Remove imported subprogram body.
8850 * s-vxwext-kernel.adb (Task_Cont): New subpprogram body specialized for
8853 2015-01-30 Gary Dismukes <dismukes@adacore.com>
8855 * sem_attr.adb (Declared_Within_Generic_Unit):
8856 New function to test whether an entity is declared within the
8857 declarative region of a given generic unit.
8858 (Resolve_Attribute): For checking legality of subprogram'Access within
8859 a generic unit, call new Boolean function Declared_Within_Generic_Unit
8860 instead of simply comparing the results of Enclosing_Generic_Unit on
8861 the prefix and access type. Correct minor comment typos.
8863 2015-01-30 Robert Dewar <dewar@adacore.com>
8865 * freeze.adb, exp_util.ads: Update comment.
8866 * exp_util.adb, exp_ch3.adb: Minor code reorganization and reformatting.
8867 * sem_util.adb: Minor: fix typo.
8869 2015-01-30 Hristian Kirtchev <kirtchev@adacore.com>
8871 * sem_attr.adb (Analyze_Attribute): Ensure that
8872 the check concerning Refined_Post takes precedence over the
8875 2015-01-30 Gary Dismukes <dismukes@adacore.com>
8877 * sem_prag.adb: Minor typo fixes and reformatting.
8879 2015-01-30 Yannick Moy <moy@adacore.com>
8881 * sem_attr.adb: Code clean up.
8883 2015-01-30 Robert Dewar <dewar@adacore.com>
8885 * ali.adb (Scan_ALI): Set Serious_Errors flag in Unit record.
8886 * ali.ads (Unit_Record): Add new field Serious_Errors.
8887 * lib-writ.adb (Write_Unit_Information): Set SE (serious errors)
8888 attribute in U line.
8889 * lib-writ.ads: New attribute SE (serious erors) in unit line.
8891 2015-01-30 Hristian Kirtchev <kirtchev@adacore.com>
8893 * einfo.adb Update the usage of attributes Entry_Bodies_Array,
8894 Lit_Indexes, Scale_Value, Storage_Size_Variable,
8895 String_Literal_Low_Bound along associated routines and
8897 (Pending_Access_Types): New routine.
8898 (Set_Pending_Access_Types): New routine.
8899 (Write_Field15_Name): Add an entry for Pending_Access_Types.
8900 * einfo.ads Add new attribute Pending_Access_Types along
8901 with usage in nodes. Update the usage of attributes
8902 Entry_Bodies_Array, Lit_Indexes, Scale_Value,
8903 Storage_Size_Variable, String_Literal_Low_Bound.
8904 (Pending_Access_Types): New routine along with pragma Inline.
8905 (Set_Pending_Access_Types): New routine along with pragma Inline.
8906 * exp_ch3.adb (Expand_Freeze_Array_Type): Add new local variable
8907 Ins_Node. Determine the insertion node for anonynous access type
8908 that acts as a component type of an array. Update the call to
8909 Build_Finalization_Master.
8910 (Expand_Freeze_Record_Type): Update
8911 the calls to Build_Finalization_Master.
8912 (Freeze_Type): Remove
8913 local variable RACW_Seen. Factor out the code that deals with
8914 remote access-to-class-wide types. Create a finalization master
8915 when the designated type contains a private component. Fully
8916 initialize all pending access types.
8917 (Process_RACW_Types): New routine.
8918 (Process_Pending_Access_Types): New routine.
8919 * exp_ch4.adb (Expand_Allocator_Expression): Allocation no longer
8920 needs to set primitive Finalize_Address.
8921 (Expand_N_Allocator): Allocation no longer sets primitive
8923 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
8924 Update the call to Build_Finalization_Master.
8925 (Make_Build_In_Place_Call_In_Allocator): Allocation no longer
8926 needs to set primitive Finalize_Address.
8927 * exp_ch7.adb (Add_Pending_Access_Type): New routine.
8928 (Build_Finalization_Master): New parameter profile. Associate
8929 primitive Finalize_Address with the finalization master if the
8930 designated type has been frozen, otherwise treat the access
8931 type as pending. Simplify the insertion of the master and
8932 related initialization code.
8933 (Make_Finalize_Address_Body): Allow Finalize_Address for class-wide
8935 (Make_Set_Finalize_Address_Call): Remove forlam parameter Typ.
8936 Simplify the implementation.
8937 * exp_ch7.ads (Build_Finalization_Master): New parameter profile
8938 along with comment on usage.
8939 (Make_Set_Finalize_Address_Call): Remove formal parameter Typ. Update
8940 the comment on usage.
8941 * exp_util.adb (Build_Allocate_Deallocate_Proc): Use routine
8942 Finalize_Address to retrieve the primitive.
8943 (Finalize_Address): New routine.
8944 (Find_Finalize_Address): Removed.
8945 * exp_util.ads (Finalize_Address): New routine.
8946 * freeze.adb (Freeze_All): Remove the generation of finalization
8948 * sem_ch3.adb (Analyze_Full_Type_Declaration): Propagate any
8949 pending access types from the partial to the full view.
8951 2015-01-30 Robert Dewar <dewar@adacore.com>
8953 * sem_disp.adb: Minor reformatting.
8954 * sem_disp.ads: Documentation update.
8956 2015-01-30 Ed Schonberg <schonberg@adacore.com>
8958 * sem_disp.adb (Is_Dynamically_Tagged): when applied to an entity
8959 or a function call, return True if type is class-wide.
8960 * sem_res.adb (Resolve_Case_Expression, Resolve_If_Expression);
8961 Apply RM 4.5.7 (17/3): all or none of the dependent expression
8962 of a conditional expression must be dynamically tagged.
8964 2015-01-30 Ed Schonberg <schonberg@adacore.com>
8966 * sem_ch6.adb (Analyze_Function_Return): In an extended return
8967 statement, apply accessibility check to result object when there
8968 is no initializing expression (Ada 2012 RM 6.5 (5.4/3))
8970 2015-01-30 Robert Dewar <dewar@adacore.com>
8972 * sem_ch4.adb (Analyze_If_Expression): Allow for non-standard
8973 Boolean for case where ELSE is omitted.
8974 * sem_res.adb: Minor reformatting.
8976 2015-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
8978 Fix build under cygwin/64.
8979 * adaint.h: Add check for __CYGWIN__.
8980 * mingw32.h: Prevent windows.h from including x86intrin.h in GCC.
8982 2015-01-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
8985 * adaint.c: Handle __CYGWIN__ like __MINGW32__ here.
8986 * mingw32.h: Don't include <tchar.h> under cygwin.
8987 (_O_U8TEXT, _O_U16TEXT, _O_WTEXT): Set to _O_TEXT if not yet defined.
8989 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
8991 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8)
8992 (DEF_FUNCTION_TYPE_VAR_12): New macros.
8994 2015-01-09 Michael Collison <michael.collison@linaro.org>
8996 * gcc-interface/cuintp.c: Include hash-set.h, machmode.h,
8997 vec.h, double-int.h, input.h, alias.h, symtab.h,
8998 fold-const.h, wide-int.h, and inchash.h due to
8999 flattening of tree.h.
9000 * gcc-interface/decl.c: Ditto.
9001 * gcc-interface/misc.c: Ditto.
9002 * gcc-interface/targtyps.c: Include hash-set.h, machmode.h,
9003 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h,
9004 fold-const.h, wide-int.h, and inchash.h due to
9005 flattening of tree.h.
9006 * gcc-interface/trans.c: Include hash-set.h, machmode.h,
9007 vec.h, double-int.h, input.h, alias.h, symtab.h, real.h,
9008 fold-const.h, wide-int.h, inchash.h due to
9009 flattening of tree.h.
9010 * gcc-interface/utils.c: Include hash-set.h, machmode.h,
9011 vec.h, double-int.h, input.h, alias.h, symtab.h,
9012 fold-const.h, wide-int.h, and inchash.h due to
9013 flattening of tree.h.
9014 * gcc-interface/utils2.c: Ditto.
9016 2015-01-07 Robert Dewar <dewar@adacore.com>
9018 * sem_warn.adb (Check_One_Unit): Don't give unused entities
9019 warning for a package which is used as a generic parameter.
9021 2015-01-07 Bob Duff <duff@adacore.com>
9023 * usage.adb (Usage): Correct documentation of
9026 2015-01-07 Robert Dewar <dewar@adacore.com>
9028 * s-fileio.adb: Minor reformatting.
9030 2015-01-07 Ed Schonberg <schonberg@adacore.com>
9032 * sem_ch12.adb (Instantiate_Object): If formal is an anonymous
9033 access to subprogram, replace its formals with new entities when
9034 building the object declaration, both if actual is present and
9035 when it is defaulted.
9037 2015-01-07 Ed Schonberg <schonberg@adacore.com>
9039 * sem_ch5.adb (Analyze_Assignment): If left-hand side is a view
9040 conversion and type of expression has invariant, apply invariant
9041 check on expression.
9043 2015-01-07 Ed Schonberg <schonberg@adacore.com>
9045 * sem_ch3.adb (Create_Constrained_Components): A call to
9046 Gather_Components may detect an error if an inherited discriminant
9047 that controls a variant is non-static.
9048 * sem_aggr.adb (Resolve_Record_Aggregate, Step 5): The call to
9049 Gather_Components may report an error if an inherited discriminant
9050 in a variant in non-static.
9051 * sem_util.adb (Gather_Components): If a non-static discriminant
9052 is inherited do not report error here, but let caller handle it.
9053 (Find_Actual): Small optimization.
9055 2015-01-07 Bob Duff <duff@adacore.com>
9057 * usage.adb (Usage): Document -gnatw.f switch.
9059 2015-01-07 Ed Schonberg <schonberg@adacore.com>
9061 * sem_ch12.adb: Code clean up and minor reformatting.
9063 2015-01-07 Robert Dewar <dewar@adacore.com>
9065 * exp_ch4.adb (Expand_N_Type_Conversion): Add guard for
9066 Raise_Accessibility_Error call.
9067 * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Add documentation
9068 on handling of invalid digits in based constants.
9069 * s-fatgen.ads: Minor reformatting.
9070 * sem_attr.adb (Analyze_Attribute, case Unrestricted_Access):
9071 Avoid noting bogus modification for Valid test.
9072 * snames.ads-tmpl (Name_Attr_Long_Float): New Name.
9073 * einfo.ads: Minor reformatting.
9074 * sem_warn.adb: Minor comment clarification.
9075 * sem_ch12.adb: Minor reformatting.
9077 2015-01-07 Ed Schonberg <schonberg@adacore.com>
9079 * exp_ch5.adb (Expand_Predicated_Loop): Handle properly loops
9080 over static predicates when the loop parameter specification
9081 carries a Reverse indicator.
9083 2015-01-07 Ed Schonberg <schonberg@adacore.com>
9085 * sem_ch12.adb (Instantiate_Object): If formal has a default,
9086 actual is missing and formal has an anonymous access type, copy
9087 access definition in full so that tree for instance is properly
9088 formatted for ASIS use.
9090 2015-01-07 Bob Duff <duff@adacore.com>
9092 * sem_elab.adb (Check_Internal_Call_Continue): Give a warning
9093 for P'Access, where P is a subprogram in the same package as
9094 the P'Access, and the P'Access is evaluated at elaboration
9095 time, and occurs before the body of P. For example, "X : T :=
9096 P'Access;" would allow a subsequent call to X.all to be an
9097 access-before-elaboration error; hence the warning. This warning
9098 is enabled by the -gnatw.f switch.
9099 * opt.ads (Warn_On_Elab_Access): New flag for warning switch.
9100 * warnsw.adb (Set_Dot_Warning_Switch): Set Warn_On_Elab_Access.
9101 * gnat_ugn.texi: Document the new warning.
9103 2015-01-07 Johannes Kanig <kanig@adacore.com>
9105 * lib-xref-spark_specific.adb (Collect_SPARK_Xrefs): Skip unneeded
9108 2015-01-07 Robert Dewar <dewar@adacore.com>
9110 * s-taprop-linux.adb, clean.adb: Minor reformatting.
9112 2015-01-07 Arnaud Charlet <charlet@adacore.com>
9114 * s-tassta.adb: Relax some overzealous assertions.
9116 2015-01-07 Ed Schonberg <schonberg@adacore.com>
9118 * sem_ch6.adb (Analyze_Return_Type): An call that returns a limited
9119 view of a type is legal when context is a thunk generated for
9120 operation inherited from an interface.
9121 * exp_ch6.adb (Expand_Simple_Function_Return): If context is
9122 a thunk and return type is an incomplete type do not continue
9123 expansion; thunk will be fully elaborated when generating code.
9125 2015-01-07 Doug Rupp <rupp@adacore.com>
9127 * s-osinte-mingw.ads (LARGE_INTEGR): New subtype.
9128 (QueryPerformanceFrequency): New imported procedure.
9129 * s-taprop-mingw.adb (RT_Resolution): Call above and return
9130 resolution vice a hardcoded value.
9131 * s-taprop-solaris.adb (RT_Resolution): Call clock_getres and return
9132 resolution vice a hardcoded value.
9133 * s-linux-android.ads (clockid_t): New subtype.
9134 * s-osinte-aix.ads (clock_getres): New imported subprogram.
9135 * s-osinte-android.ads (clock_getres): Likewise.
9136 * s-osinte-freebsd.ads (clock_getres): Likewise.
9137 * s-osinte-solaris-posix.ads (clock_getres): Likewise.
9138 * s-osinte-darwin.ads (clock_getres): New subprogram.
9139 * s-osinte-darwin.adb (clock_getres): New subprogram.
9140 * thread.c (__gnat_clock_get_res) [__APPLE__]: New function.
9141 * s-taprop-posix.adb (RT_Resolution): Call clock_getres to
9142 calculate resolution vice hard coded value.
9144 2015-01-07 Ed Schonberg <schonberg@adacore.com>
9146 * exp_util.adb (Make_CW_Equivalent_Type): If root type is a
9147 limited view, use non-limited view when available to create
9148 equivalent record type.
9150 2015-01-07 Vincent Celier <celier@adacore.com>
9152 * gnatcmd.adb: Remove command Sync and any data and processing
9153 related to this command. Remove project processing for gnatstack.
9154 * prj-attr.adb: Remove package Synchonize and its attributes.
9156 2015-01-07 Vincent Celier <celier@adacore.com>
9158 * clean.adb: Minor error message change.
9160 2015-01-07 Tristan Gingold <gingold@adacore.com>
9163 * env.c (__gnat_environ): Adjust for darwin9/darwin10.
9165 2015-01-07 Javier Miranda <miranda@adacore.com>
9167 * sem_ch10.adb (Analyze_With_Clause): Compiling under -gnatq
9168 protect the frontend against never ending recursion caused by
9169 circularities in the sources.
9171 2015-01-07 Robert Dewar <dewar@adacore.com>
9173 * a-reatim.adb, make.adb, exp_pakd.adb, i-cpoint.adb, sem_ch8.adb,
9174 exp_ch3.adb: Minor reformatting.
9176 2015-01-07 Doug Rupp <rupp@adacore.com>
9178 * s-linux.ads (clockid_t): New subtype.
9179 * s-osinte-linux.ads (pragma Linker Options): Add -lrt.
9180 (clockid_t): New subtype.
9181 (clock_getres): Import system call.
9182 * s-taprop-linux.adb (System.OS_Constants): With and rename.
9183 (RT_Resolution): Remove
9184 hardcoded value and call clock_getres.
9185 * s-linux-sparc.ads, s-linux-mipsel.ads, s-linux-hppa.ads,
9186 s-linux-alpha.ads, s-linux-x32.ads (clockid_t): Add new subtype.
9188 2015-01-07 Robert Dewar <dewar@adacore.com>
9190 * sem_warn.adb (Check_One_Unit): Guard against context item
9191 with no Entity field.
9193 2015-01-07 Vincent Celier <celier@adacore.com>
9195 * clean.adb (Gnatclean): Warn that 'gnatclean -P' is obsolete.
9196 * make.adb (Initialize): Warn that 'gnatmake -P' is obsolete.
9198 2015-01-07 Vincent Celier <celier@adacore.com>
9200 * prj-conf.adb (Parse_Project_And_Apply_Config): Always finalize
9201 errors/warnings in the first parsing of the project files,
9202 to display the warnings when there is no errors.
9204 2015-01-07 Tristan Gingold <gingold@adacore.com>
9206 * i-cpoint.adb (Copy_Terminated_Array): Nicely handle null target.
9208 2015-01-07 Doug Rupp <rupp@adacore.com>
9210 * s-taprop-vxworks.adb (Stop_All_Tasks): Pass return
9211 value from Int_Lock as parameter to Int_Unlock.
9212 * s-osinte-vxworks.ads (Int_Unlock): Add parameter.
9213 * s-vxwext.ads (Int_Unlock): Likewise.
9214 * s-vxwext-kernel.adb (intUnlock, Int_Unlock): Likewise.
9215 * s-vxwext-kernel.ads (Int_Unlock): Likewise.
9216 * s-vxwext-rtp.adb (Int_Unlock): Likewise.
9217 * s-vxwext-rtp.ads (Int_Unlock): Likewise.
9219 2015-01-07 Pierre-Marie de Rodat <derodat@adacore.com>
9221 * exp_pakd.adb: Add a comment in exp_pakd.adb to explain why we
9224 2015-01-07 Tristan Gingold <gingold@adacore.com>
9226 * i-cpoint.adb (Copy_Terminated_Array): Use Copy_Array to
9229 2015-01-07 Eric Botcazou <ebotcazou@adacore.com>
9231 * sem_ch3.adb (Analyze_Full_Type_Declaration): Do not
9232 automatically set No_Strict_Aliasing on access types.
9233 * fe.h (No_Strict_Aliasing_CP): Declare.
9234 * gcc-interface/trans.c (gigi): Force flag_strict_aliasing to 0 if
9235 No_Strict_Aliasing_CP is set.
9237 2015-01-07 Johannes Kanig <kanig@adacore.com>
9239 * sem_ch8.adb (Analyze_Subprogram_Renaming) do
9240 not build function wrapper in gnatprove mode when the package
9241 is externally axiomatized.
9243 2015-01-07 Jose Ruiz <ruiz@adacore.com>
9245 * a-reatim.adb (Time_Of): Reduce the number of spurious overflows in
9246 intermediate computations when the parameters have different signs.
9248 2015-01-07 Javier Miranda <miranda@adacore.com>
9250 * exp_ch3.adb (Build_Init_Procedure): For derived types,
9251 improve the code which takes care of identifying and moving to
9252 the beginning of the init-proc the call to the init-proc of the
9255 2015-01-07 Olivier Hainque <hainque@adacore.com>
9257 * gcc-interface/trans.c (gnat_to_gnu, <N_Expression_With_Action>):
9258 Elaborate the expression as part of the same stmt group as the actions.
9260 2015-01-07 Robert Dewar <dewar@adacore.com>
9262 * sem_ch3.adb: Minor error message change.
9264 2015-01-07 Ed Schonberg <schonberg@adacore.com>
9266 * sem_prag.adb (Analyze_Pragma, case Preelaborable_Initialization):
9267 Following AI05-028, the pragam applies legally to any composite type.
9269 2015-01-07 Arnaud Charlet <charlet@adacore.com>
9271 * s-osinte-vxworks.adb, s-osinte-vxworks.ads
9272 (sigwait, sigwaitinfo): Removed, not needed after all on any
9273 VxWorks configurations.
9275 2015-01-07 Robert Dewar <dewar@adacore.com>
9277 * sem_ch3.adb, freeze.adb, exp_disp.adb: Minor reformatting.
9279 2015-01-07 Javier Miranda <miranda@adacore.com>
9281 * exp_disp.adb (Expand_Interface_Conversion): Adding missing
9282 generation of accessibility check.
9284 2015-01-07 Ed Schonberg <schonberg@adacore.com>
9286 * sem_ch3.adb (Derived_Type_Declaration): In the case of an
9287 illegal completion from a class- wide type, set etype of the
9288 derived type properly to prevent cascaded errors.
9290 2015-01-07 Robert Dewar <dewar@adacore.com>
9292 * prj.ads, i-cpoint.adb, freeze.adb, ghost.adb, prj-err.adb: Minor
9295 2015-01-07 Robert Dewar <dewar@adacore.com>
9297 * restrict.adb (Check_Restriction_No_Use_Of_Attribute):
9299 (OK_No_Use_Of_Entity_Name): New function.
9300 (Set_Restriction_No_Use_Of_Entity): New procedure.
9301 * restrict.ads (Check_Restriction_No_Use_Of_Attribute):
9303 (OK_No_Use_Of_Entity_Name): New function.
9304 (Set_Restriction_No_Use_Of_Entity): New procedure.
9305 * sem_ch8.adb (Find_Direct_Name): Add check for violation of
9307 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
9308 Add processing for new restriction No_Use_Of_Entity.
9310 2015-01-07 Eric Botcazou <ebotcazou@adacore.com>
9312 * freeze.adb (Freeze_Array_Type): Apply same handling to Is_Atomic
9313 component type as to Has_Atomic_Components type. Remove useless
9314 test on Is_Aliased component type.
9316 2015-01-07 Hristian Kirtchev <kirtchev@adacore.com>
9318 * alloc.ads Alphabetize several declarations. Add constants
9319 Ignored_Ghost_Units_Initial and Ignored_Ghost_Units_Increment.
9320 * atree.adb Add with and use clauses for Opt.
9321 (Allocate_Initialize_Node): Mark a node as ignored Ghost
9322 if it is created in an ignored Ghost region.
9323 (Ekind_In): New variant.
9324 (Is_Ignored_Ghost_Node): New routine.
9325 (Set_Is_Ignored_Ghost_Node): New routine.
9326 * atree.adb Aplhabetize several subprograms declarations. Flag
9327 Spare0 is now known as Is_Ignored_Ghost_Node.
9328 (Ekind_In): New variant.
9329 (Is_Ignored_Ghost_Node): New routine.
9330 (Set_Is_Ignored_Ghost_Node): New routine.
9331 * einfo.adb: Flag 279 is now known as Contains_Ignored_Ghost_Code.
9332 (Contains_Ignored_Ghost_Code): New routine.
9333 (Set_Contains_Ignored_Ghost_Code): New routine.
9334 (Set_Is_Checked_Ghost_Entity, Set_Is_Ignored_Ghost_Entity):
9335 It is now possible to set this property on an unanalyzed entity.
9336 (Write_Entity_Flags): Output the status of flag
9337 Contains_Ignored_Ghost_Code.
9338 * einfo.ads New attribute Contains_Ignored_Ghost_Code along with
9340 (Contains_Ignored_Ghost_Code): New routine
9341 along with pragma Inline.
9342 (Set_Contains_Ignored_Ghost_Code): New routine along with pragma Inline.
9343 * exp_ch3.adb Add with and use clauses for Ghost.
9344 (Freeze_Type): Capture/restore the value of Ghost_Mode on entry/exit.
9345 Set the Ghost_Mode in effect.
9346 (Restore_Globals): New routine.
9347 * exp_ch7.adb (Process_Declarations): Do not process a context
9348 that invoves an ignored Ghost entity.
9349 * exp_dbug.adb (Qualify_All_Entity_Names): Skip an ignored Ghost
9350 construct that has been rewritten as a null statement.
9351 * exp_disp.adb Add with and use clauses for Ghost.
9352 (Make_DT): Capture/restore the value of Ghost_Mode on entry/exit. Set
9353 the Ghost_Mode in effect.
9354 (Restore_Globals): New routine.
9355 * exp_util.adb (Requires_Cleanup_Actions): An ignored Ghost entity
9356 does not require any clean up. Add two missing cases that deal
9357 with block statements.
9358 * freeze.adb Add with and use clauses for Ghost.
9359 (Freeze_Entity): Capture/restore the value of Ghost_Mode on entry/exit.
9360 Set the Ghost_Mode in effect.
9361 (Restore_Globals): New routine.
9362 * frontend.adb Add with and use clauses for Ghost. Remove any
9363 ignored Ghost code from all units that qualify.
9364 * ghost.adb New unit.
9365 * ghost.ads New unit.
9366 * gnat1drv.adb Add with clause for Ghost. Initialize and lock
9367 the table in package Ghost.
9368 * lib.ads: Alphabetize several subprogram declarations.
9369 * lib-xref.adb (Output_References): Do not generate reference
9370 information for ignored Ghost entities.
9371 * opt.ads Add new type Ghost_Mode_Type and new global variable
9373 * rtsfind.adb (Load_RTU): Provide a clean environment when
9374 loading a runtime unit.
9375 * sem.adb (Analyze): Capture/restore the value of Ghost_Mode on
9376 entry/exit as the node may set a different mode.
9378 Capture/restore the value of Ghost_Mode on entry/exit as the
9379 unit may be withed from a unit with a different Ghost mode.
9380 * sem_ch3.adb Add with and use clauses for Ghost.
9381 (Analyze_Full_Type_Declaration, Analyze_Incomplete_Type_Decl,
9382 Analyze_Number_Declaration, Analyze_Private_Extension_Declaration,
9383 Analyze_Subtype_Declaration): Set the Ghost_Mode in effect. Mark
9384 the entity as Ghost when there is a Ghost_Mode in effect.
9385 (Array_Type_Declaration): The implicit base type inherits the
9386 "ghostness" from the array type.
9387 (Derive_Subprogram): The
9388 alias inherits the "ghostness" from the parent subprogram.
9389 (Make_Implicit_Base): The implicit base type inherits the
9390 "ghostness" from the parent type.
9391 * sem_ch5.adb Add with and use clauses for Ghost.
9392 (Analyze_Assignment): Set the Ghost_Mode in effect.
9393 * sem_ch6.adb Add with and use clauses for Ghost.
9394 (Analyze_Abstract_Subprogram_Declaration, Analyze_Procedure_Call,
9395 Analyze_Subprogram_Body_Helper, Analyze_Subprogram_Declaration):
9396 Set the Ghost_Mode in effect. Mark the entity as Ghost when
9397 there is a Ghost_Mode in effect.
9398 * sem_ch7.adb Add with and use clauses for Ghost.
9399 (Analyze_Package_Body_Helper, Analyze_Package_Declaration,
9400 Analyze_Private_Type_Declaration): Set the Ghost_Mode in
9401 effect. Mark the entity as Ghost when there is a Ghost_Mode
9403 * sem_ch8.adb Add with and use clauses for Ghost.
9404 (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
9405 Analyze_Object_Renaming, Analyze_Package_Renaming,
9406 Analyze_Subprogram_Renaming): Set the Ghost_Mode in effect. Mark
9407 the entity as Ghost when there is a Ghost_Mode in effect.
9408 (Find_Type): Check the Ghost context of a type.
9409 * sem_ch11.adb Add with and use clauses for Ghost.
9410 (Analyze_Exception_Declaration): Set the Ghost_Mode in
9411 effect. Mark the entity as Ghost when there is a Ghost_Mode
9413 * sem_ch12.adb Add with and use clauses for Ghost.
9414 (Analyze_Generic_Package_Declaration,
9415 Analyze_Generic_Subprogram_Declaration): Set the Ghost_Mode in effect.
9416 Mark the entity as Ghost when there is a Ghost_Mode in effect.
9417 * sem_prag.adb Add with and use clauses for Ghost.
9418 (Analyze_Pragma): Ghost-related checks are triggered when there
9419 is a Ghost mode in effect.
9420 (Create_Abstract_State): Mark the
9421 entity as Ghost when there is a Ghost_Mode in effect.
9422 * sem_res.adb Add with and use clauses for Ghost.
9423 (Check_Ghost_Context): Removed.
9424 * sem_util.adb (Check_Ghost_Completion): Removed.
9425 (Check_Ghost_Derivation): Removed.
9426 (Incomplete_Or_Partial_View):
9427 Add a guard in case the entity has not been analyzed yet
9428 and does carry a scope.
9429 (Is_Declaration): New routine.
9430 (Is_Ghost_Entity): Removed.
9431 (Is_Ghost_Statement_Or_Pragma):
9433 (Is_Subject_To_Ghost): Removed.
9434 (Set_Is_Ghost_Entity):
9436 (Within_Ghost_Scope): Removed.
9437 * sem_util.adb (Check_Ghost_Completion): Removed.
9438 (Check_Ghost_Derivation): Removed.
9439 (Is_Declaration): New routine.
9440 (Is_Ghost_Entity): Removed.
9441 (Is_Ghost_Statement_Or_Pragma): Removed.
9442 (Is_Subject_To_Ghost): Removed.
9443 (Set_Is_Ghost_Entity): Removed.
9444 (Within_Ghost_Scope): Removed.
9445 * sinfo.ads Add a section on Ghost mode.
9446 * treepr.adb (Print_Header_Flag): New routine.
9447 (Print_Node_Header): Factor out code. Output flag
9448 Is_Ignored_Ghost_Node.
9449 * gcc-interface/Make-lang.in: Add dependency for unit Ghost.
9451 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
9453 * freeze.adb (Freeze_Array_Type) <Complain_CS>: Remove always
9454 true test and unreachable 'else' arm.
9456 2015-01-06 Vincent Celier <celier@adacore.com>
9458 * prj-conf.adb (Check_Target): Improve error message when
9459 there are mismatched targets between the on in the configuration
9460 project file and the specified one, either in the main project
9461 file or in the --target= switch.
9463 2015-01-06 Pascal Obry <obry@adacore.com>
9465 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Mode and
9466 Install_Name attribute definitions.
9468 2015-01-06 Ed Schonberg <schonberg@adacore.com>
9470 * freeze.adb (Wrap_Imported_Subprogram): Indicate that the
9471 generated Import pragma for the internal imported procedure does
9472 not come from an aspect, so that Is_Imported can be properly
9475 2015-01-06 Gary Dismukes <dismukes@adacore.com>
9477 * sem_ch12.adb (Might_Inline_Subp): Record whether
9478 any subprograms in the generic package are marked with
9479 pragma Inline_Always (setting flag Has_Inline_Always).
9480 (Analyze_Package_Instantiation): Add test of Has_Inline_Always
9481 alongside existing test of Front_End_Inlining as alternative
9482 conditions for setting Inline_Now. Also add test of
9483 Has_Inline_Always along with Front_End_Inlining test as an
9484 alternative condition for setting Needs_Body to False.
9486 2015-01-06 Tristan Gingold <gingold@adacore.com>
9488 * i-cpoint.adb (Copy_Array): Handle overlap.
9490 2015-01-06 Pascal Obry <obry@adacore.com>
9492 * bindgen.adb: Minor style fix.
9494 2015-01-06 Robert Dewar <dewar@adacore.com>
9496 * sem_util.ads, sem_util.adb: Minor reformatting.
9498 2015-01-06 Vincent Celier <celier@adacore.com>
9500 * prj-conf.adb (Parse_Project_And_Apply_Config): Reset incomplete
9501 with flags before parsing the projects.
9502 * prj-err.adb (Error_Msg): Do nothing if there are incomplete withs.
9503 * prj-part.adb (Post_Parse_Context_Clause): Set Incomplete_Withs
9504 to True in the flags, when Ignore_Missing_With is True and an
9505 imported project cannot be found.
9506 * prj-proc.adb (Expression): When there are incomplete withs and
9507 a variable or attribute is not found, set the variable/attribute
9509 * prj.ads (Processing_Flags): New flag Incomplete_Withs,
9512 2015-01-06 Vasiliy Fofanov <fofanov@adacore.com>
9514 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-conf.adb,
9515 prj-err.adb: Add new switch --no-command-line.
9517 2015-01-06 Ed Schonberg <schonberg@adacore.com>
9519 * sem_ch12.adb: Sloc of wrapper is that of instantiation.
9521 2015-01-06 Robert Dewar <dewar@adacore.com>
9523 * sem_ch11.adb: Minor reformatting.
9525 2015-01-06 Ed Schonberg <schonberg@adacore.com>
9527 * exp_aggr.adb (Get_Assoc_Expr): New routine internal to
9528 Build_Array_Aggr_Code, used to initialized components covered
9529 by a box association. If the component type is scalar and has
9530 a default aspect, use it to initialize such components.
9532 2015-01-06 Pascal Obry <obry@adacore.com>
9534 * rtinit.c (__gnat_runtime_initialize): Add a parameter to
9535 control the setup of the exception handler.
9536 * initialize.c: Remove unused declaration.
9537 * bindgen.adb: Always call __gnat_runtime_initialize and pass
9538 whether the exeception handler must be set or not.
9540 2015-01-06 Thomas Quinot <quinot@adacore.com>
9542 * freeze.adb (Set_SSO_From_Defaults): When setting scalar storage
9543 order to native from default, make sure to also adjust bit order.
9544 * exp_aggr.adb: Minor reformatting.
9546 2015-01-06 Robert Dewar <dewar@adacore.com>
9548 * s-valllu.adb, s-valllu.ads, s-valuti.ads, s-valuns.adb, s-valuns.ads,
9549 s-valrea.adb, s-valrea.ads: Add some additional guards for
9550 Str'Last = Positive'Last.
9552 2015-01-06 Ed Schonberg <schonberg@adacore.com>
9554 * sem_ch12.adb, sem_ch8.adb: Ongoing work for wrappers for actual
9557 2015-01-06 Javier Miranda <miranda@adacore.com>
9559 * exp_disp.adb (Expand_Interface_Conversion): Reapply patch.
9561 2015-01-06 Thomas Quinot <quinot@adacore.com>
9563 * sem_util.ads: Minor reformatting.
9564 * sem_cat.adb (In_RCI_Visible_Declarations): Change back to...
9565 (In_RCI_Declaration) Return to old name, as proper checking of
9566 entity being in the visible part depends on entity kind and must
9567 be done by the caller.
9569 2015-01-06 Ed Schonberg <schonberg@adacore.com>
9571 * sem_ch12.adb, sem_ch12.ads, sem_ch8.adb: Ongoing work for wrappers
9572 for operators in SPARK.
9574 2015-01-06 Ed Schonberg <schonberg@adacore.com>
9576 * sem_aggr.adb (Get_Value): In ASIS mode, preanalyze the
9577 expression in an others association before making copies for
9578 separate resolution and accessibility checks. This ensures that
9579 the type of the expression is available to ASIS in all cases,
9580 in particular if the expression is itself an aggregate.
9582 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
9584 * einfo.ads (Has_Independent_Components): Document extended
9586 * einfo.adb (Has_Independent_Components): Remove obsolete assertion.
9587 (Set_Has_Independent_Components): Adjust assertion.
9588 * sem_prag.adb (Analyze_Pragma): Also set Has_Independent_Components
9589 for pragma Atomic_Components. Set Has_Independent_Components
9590 on the object instead of the type for an object declaration with
9591 pragma Independent_Components.
9593 2015-01-06 Olivier Hainque <hainque@adacore.com>
9595 * set_targ.adb (Read_Target_Dependent_Values): Set
9596 Long_Double_Index when "long double" is read.
9597 (elaboration code): Register_Back_End_Types only when not reading from
9598 config files. Doing otherwise is pointless and error prone.
9600 2015-01-06 Robert Dewar <dewar@adacore.com>
9602 * s-valrea.adb (Value_Real): Check for Str'Last = Positive'Last
9604 2015-01-06 Robert Dewar <dewar@adacore.com>
9606 * a-wtgeau.adb, a-ztgeau.adb, a-tigeau.adb (String_Skip): Raise PE if
9607 Str'Last = Positive'Last.
9609 2015-01-06 Ed Schonberg <schonberg@adacore.com>
9611 * sem_ch6.adb (Matches_Limited_View): Handle properly the case
9612 where the non-limited type is a generic actual and appears as
9613 a subtype of the non-limited view of the other.
9614 * freeze.adb (Build_Renamed_Body): If the return type of the
9615 declaration that is being completed is a limited view and the
9616 non-limited view is available, use it in the specification of
9619 2015-01-06 Ed Schonberg <schonberg@adacore.com>
9621 * sem_ch3.adb (Find_Type_Name): If there is a previous tagged
9622 incomplete view, the type of the classwide type common to both
9623 views is the type being declared.
9625 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
9627 * einfo.ads (Is_Independent): Further document extended usage.
9629 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
9631 * einfo.ads (Is_Independent): Document extended usage.
9632 * einfo.adb (Is_Independent): Remove obsolete assertion.
9633 (Set_Is_Independent): Likewise.
9634 * sem_prag.adb (Process_Atomic_Shared_Volatile): Rename into...
9635 (Process_Atomic_Independent_Shared_Volatile): ...this.
9636 Deal with pragma Independent here.
9637 (Analyze_Pragma): Adjust
9638 to above renaming and also invoke it for pragma Independent.
9639 Adjust comment for Independent_Components.
9641 2015-01-06 Robert Dewar <dewar@adacore.com>
9643 * snames.ads-tmpl: Remove entries for attribute Enum_Image.
9644 * exp_attr.adb: Remove reference to Attribute_Enum_Image.
9646 2015-01-06 Robert Dewar <dewar@adacore.com>
9648 * s-vallli.adb (Value_Long_Long_Integer): Handle case of Str'Last
9650 * s-valllu.adb (Value_Long_Long_Unsigned): Handle case of
9651 Str'Last = Positive'Last.
9653 2015-01-06 Robert Dewar <dewar@adacore.com>
9655 * sem_prag.adb (Process_Inline): Remove redundant construct
9656 warning (-gnatw.r) for an ineffective pragma Inline.
9658 2015-01-06 Robert Dewar <dewar@adacore.com>
9660 * s-valint.adb: Fix typo in last checkin.
9661 * s-valuns.adb (Value_Unsigned): More efficient fix for
9663 * sem_attr.adb (Analyze_Attribute): Minor reformatting
9664 (Eval_Attribute): Static ervaluation of 'Img for enumeration types.
9666 2015-01-06 Robert Dewar <dewar@adacore.com>
9668 * s-valint.adb, s-valuns.adb (Value_Integer): Deal with case where
9669 Str'Last = Positive'Last
9671 2015-01-06 Thomas Quinot <quinot@adacore.com>
9673 * xoscons.adb: Display exception information and return non-zero
9674 exit status in top level exception handler.
9676 2015-01-06 Ed Schonberg <schonberg@adacore.com>
9678 * sem_ch8.adb: Code clean up.
9680 2015-01-06 Tristan Gingold <gingold@adacore.com>
9682 * targparm.ads: Remove obsolete comment.
9684 2015-01-06 Olivier Hainque <hainque@adacore.com>
9686 * gcc-interface/decl.c (gnat_to_gnu_entity, case E_Variable): When
9687 constructing a ref to variable, update inner_const_flag from the
9688 variable TREE_READONLY attribute.
9689 * gcc-interface/targtyps.c (WIDEST_HARDWARE_FP_SIZE): Remove default
9691 (get_target_float_size): Remove.
9692 (get_target_double_size): Remove.
9693 (get_target_long_double_size): Remove.
9695 2015-01-06 Pascal Obry <obry@adacore.com>
9697 * adaint.c (ProcListEvt): Set to NULL.
9698 * rtinit.c: New file.
9699 (__gnat_rt_init_count): New reference counter set to 0.
9700 (__gnat_runtime_initialize): Move code here from __gnat_initialize when
9701 this code is actually needed for the runtime initialization. This
9702 routine returns immediately if the initialization has already been done.
9703 * final.c: Revert previous change.
9704 * rtfinal.c: New file.
9705 (__gnat_runtime_finalize)[Win32]: Add finalization of the critical
9706 section and event. The default version of this routine is empty (except
9707 for the reference counting code). This routine returns immediately if
9708 some others libraries are referencing the runtime.
9709 * bindgen.adb (Gen_Adainit): Generate call to Runtime_Initialize
9710 remove circuitry to initialize the signal handler as this is
9711 now done by the runtime initialization routine.
9712 (Gen_Adafinal): Generate call to Runtime_Finalize.
9713 * gnat_ugn.texi: Update documentation about concurrency and
9714 initialization/finalization of the run-time.
9715 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Add
9716 references to rtfinal.o and rtinit.o
9718 2015-01-06 Robert Dewar <dewar@adacore.com>
9720 * exp_attr.adb (Expand_N_Attribute_Reference): Add dummy entry
9722 * sem_attr.adb: Implement Enum_Image attribute.
9723 * snames.ads-tmpl: Add entries for Enum_Image attribute.
9725 2015-01-06 Robert Dewar <dewar@adacore.com>
9727 * namet.ads: Document use of Boolean2 for No_Use_Of_Entity.
9728 * restrict.ads (No_Use_Of_Entity): New table.
9729 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
9730 Ignore No_Use_Of_Entity (will be processed in parser).
9731 * snames.ads-tmpl: Add entry for Name_No_Use_Of_Entity.
9733 2015-01-06 Vincent Celier <celier@adacore.com>
9735 * prj-tree.adb (Imported_Or_Extended_Project_Of): Do not try
9736 to check for an extended project, if a project does not have
9737 yet a project declaration.
9739 2015-01-06 Pierre-Marie Derodat <derodat@adacore.com>
9741 * scos.ads: Update documentation about the SCO table build
9742 process and about table records format.
9743 * par_sco.ads (SCO_Record): Rename to SCO_Record_Raw.
9744 (SCO_Record_Filtered): New procedure.
9745 (Set_SCO_Logical_Operator): New procedure.
9746 (dsco): Update documentation.
9747 * par_sco.adb: Update library-level comments.
9748 (SCO_Generation_State_Type): New type.
9749 (SCO_Generation_State): New variable.
9750 (SCO_Raw_Table): New package instanciation.
9751 (Condition_Pragma_Hash_Table): Rename to SCO_Raw_Hash_Table.
9753 (Tristate): New type.
9754 (Is_Logical_Operator): Return Tristate and update documentation.
9755 (Has_Decision): Update call to Is_Logical_Operator and complete
9757 (Set_Table_Entry): Rename to Set_Raw_Table_Entry, update
9758 comment, add an assertion for state checking and change
9759 references to SCO_Table into SCO_Raw_Table.
9760 (dsco): Refactor to dump the raw and the filtered tables.
9761 (Process_Decisions.Output_Decision_Operand): Handle putative
9762 short-circuit operators.
9763 (Process_Decisions.Output_Element): Update references
9764 to Set_Table_Entry and to Condition_Pragma_Hash_Table.
9765 (Process_Decisions.Process_Decision_Operand): Update call
9766 to Is_Logical_Operator.
9767 (Process_Decisions.Process_Node): Handle putative short-circuit
9768 operators and change references to
9769 SCO_Table into SCO_Raw_Table.
9770 (SCO_Output): Add an assertion
9771 for state checking and remove code that used to stamp out SCO entries.
9772 (SCO_Pragma_Disabled): Change reference to SCO_Table
9774 (SCO_Record): Rename to SCO_Record_Raw,
9775 add an assertion for state checking and change references
9776 to SCO_Table into SCO_Raw_Table.
9777 (Set_SCO_Condition): Add an assertion for state checking, update
9778 references to Condition_Pragma_Hash_Table and change references to
9779 SCO_Table into SCO_Raw_Table.
9780 (Set_SCO_Pragma_Enabled): Add an assertion for state checking and
9781 change references to SCO_Table into SCO_Raw_Table.
9782 (Set_SCO_Logical_Operator): New procedure.
9783 (Traverse_Declarations_Or_Statements.Set_Statement_Entry): Update
9784 references to Set_Table_Entry and to Condition_Pragma_Hash_Table.
9785 (SCO_Record_Fildered): New procedure.
9786 * gnat1drv.adb (Gnat1drv): Invoke the SCO filtering pass.
9787 * lib-writ.adb (Write_ALI): Invoke the SCO filtering pass and
9789 * par-load.adb (Load): Update reference to SCO_Record.
9790 * par.adb (Par): Update reference to SCO_Record.
9791 * put_scos.adb (Put_SCOs): Add an assertion to check that no
9792 putative SCO condition reaches this end.
9793 * sem_ch10.adb (Analyze_Proper_Body): Update reference to SCO_Record.
9794 * sem_res.adb (Resolve_Logical_Op): Validate putative SCOs
9795 when corresponding to an "and"/"or" operator affected by the
9796 Short_Circuit_And_Or pragma.
9798 2015-01-06 Robert Dewar <dewar@adacore.com>
9800 * sem_ch8.adb (Analyze_Use_Package): Give more specific error
9801 msg for attempted USE of generic subprogram or subprogram.
9803 2015-01-06 Robert Dewar <dewar@adacore.com>
9805 * s-valllu.adb, a-tiinau.adb, a-timoau.adb, a-ztinau.adb, a-ztmoau.adb,
9806 s-valuns.adb, s-valrea.adb, a-wtflau.adb, a-tiflau.adb, a-ztflau.adb,
9807 a-wtinau.adb, a-wtmoau.adb: Document recognition of : in place of #.
9809 2015-01-06 Ed Schonberg <schonberg@adacore.com>
9811 * sem_ch13.adb (Analyze_Aspect_Specifications): For aspects
9812 that specify stream subprograms, if the prefix is a class-wide
9813 type then the generated attribute definition clause must apply
9814 to the same class-wide type.
9815 (Default_Iterator): An iterator defined by an aspect of some
9816 container type T must have a first parameter of type T, T'class,
9817 or an access to such (from code reading RM 5.5.1 (2/3)).
9819 2015-01-06 Arnaud Charlet <charlet@adacore.com>
9821 * gnat1drv.adb: Minor: complete previous change.
9823 2015-01-06 Olivier Hainque <hainque@adacore.com>
9825 * set_targ.ads (C_Type_For): New function. Return the name of
9826 a C type supported by the back-end and suitable as a basis to
9827 construct the standard Ada floating point type identified by
9828 the T parameter. This is used as a common ground to feed both
9829 ttypes values and the GNAT tree nodes for the standard floating
9831 * set_targ.adb (Long_Double_Index): The index at which "long
9832 double" gets registered in the FPT_Mode_Table. This is useful to
9833 know whether we have a "long double" available at all and get at
9834 it's characteristics without having to search the FPT_Mode_Table
9835 when we need to decide which C type should be used as the
9836 basis for Long_Long_Float in Ada.
9837 (Register_Float_Type): Fill Long_Double_Index.
9838 (FPT_Mode_Index_For): New function. Return the index in
9839 FPT_Mode_Table that designates the entry corresponding to the
9840 provided C type name.
9841 (FPT_Mode_Index_For): New function. Return the index in
9842 FPT_Mode_Table that designates the entry for a back-end type
9843 suitable as a basis to construct the standard Ada floating point
9844 type identified by the input T parameter.
9845 (elaboration code): Register_Back_End_Types unconditionally,
9846 so C_Type_For can operate regardless of -gnateT. Do it
9847 early so we can query it for the floating point sizes, via
9848 FPT_Mode_Index_For. Initialize Float_Size, Double_Size and
9849 Long_Double_Size from the FPT_Mode_Table, as cstand will do.
9850 * cstand.adb (Create_Float_Types): Use C_Type_For to determine
9851 which C type should be used as the basis for the construction
9852 of the Standard Ada floating point types.
9853 * get_targ.ads (Get_Float_Size, Get_Double_Size,
9854 Get_Long_Double_Size): Remove.
9855 * get_targ.adb: Likewise.
9857 2015-01-06 Thomas Quinot <quinot@adacore.com>
9859 * sem_cat.adb (In_RCI_Declaration): Remove unnecessary
9860 parameter and rename to...
9861 (In_RCI_Visible_Declarations): Fix handling of private part of nested
9863 (Validate_RCI_Subprogram_Declaration): Reject illegal function
9864 returning anonymous access in RCI unit.
9866 2015-01-06 Ed Schonberg <schonberg@adacore.com>
9868 * sem_ch6.adb (New_Overloaded_Entity): In GNATprove mode, a
9869 function wrapper may be a homonym of another local declaration.
9870 * sem_ch8.adb (Analyze_Subprogram_Renaming): In GNATprove mode,
9871 build function and operator wrappers after the actual subprogram
9872 has been resolved, and replace the standard renaming declaration
9873 with the declaration of wrapper.
9874 * sem_ch12.ads (Build_Function_Wrapper, Build_Operator_Wraooer):
9875 make public for use elsewhere.
9876 * sem_ch12.adb (Build_Function_Wrapper, Build_Operator_Wraooer):
9877 rewrite, now that actual is fully resolved when wrapper is
9880 2015-01-06 Javier Miranda <miranda@adacore.com>
9882 * exp_disp.adb: Revert previous change.
9884 2015-01-06 Robert Dewar <dewar@adacore.com>
9886 * exp_util.adb: Change name Name_Table_Boolean to
9887 Name_Table_Boolean1.
9888 * namet.adb: Change name Name_Table_Boolean to Name_Table_Boolean1
9889 Introduce Name_Table_Boolean2/3.
9890 * namet.ads: Change name Name_Table_Boolean to Name_Table_Boolean1
9891 Introduce Name_Table_Boolean2/3.
9892 * par-ch13.adb: Change name Name_Table_Boolean to
9893 Name_Table_Boolean1.
9895 2015-01-06 Bob Duff <duff@adacore.com>
9897 * gnat_rm.texi: Improve documentation regarding No_Task_Termination.
9899 2015-01-06 Ed Schonberg <schonberg@adacore.com>
9901 * sem_aggr.adb (Resolve_Record_Aggregte, Get_Value): For an
9902 others choice that covers multiple components, analyze each
9903 copy with the type of the component even in compile-only mode,
9904 to detect potential accessibility errors.
9906 2015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
9908 * sem_res.adb (Is_Assignment_Or_Object_Expression): New routine.
9909 (Resolve_Actuals): An effectively volatile out
9910 parameter cannot act as an in or in out actual in a call.
9911 (Resolve_Entity_Name): An effectively volatile out parameter
9914 2015-01-06 Ed Schonberg <schonberg@adacore.com>
9916 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If the body is
9917 the expansion of an expression function it may be pre-analyzed
9918 if a 'access attribute is applied to the function, in which case
9919 last_entity may have been assigned already.
9921 2015-01-06 Ed Schonberg <schonberg@adacore.com>
9923 * sem_ch4.adb (Analyze_One_Call): If formal has an incomplete
9924 type and actual has the corresponding full view, there is no
9925 error, but a case of use of incomplete type in a predicate or
9926 invariant expression.
9928 2015-01-06 Vincent Celier <celier@adacore.com>
9930 * makeutl.adb (Insert_No_Roots): Make sure that the same source
9931 in two different project tree is checked in both trees, if they
9932 are sources of two different projects, extended or not.
9934 2015-01-06 Arnaud Charlet <charlet@adacore.com>
9936 * gnat1drv.adb: Minor code clean up.
9937 (Adjust_Global_Switches): Ignore gnatprove_mode in codepeer_mode.
9939 2015-01-06 Bob Duff <duff@adacore.com>
9941 * osint.adb (Read_Source_File): Don't print out
9942 file name unless T = Source.
9944 2015-01-06 Ed Schonberg <schonberg@adacore.com>
9946 * sem_util.adb (Is_Variable, Is_OK_Variable_For_Out_Formal):
9947 recognize improper uses of constant_reference types as actuals
9948 for in-out parameters.
9949 (Check_Function_Call): Do not collect identifiers if function
9950 name is missing because of previous error.
9952 2015-01-06 Robert Dewar <dewar@adacore.com>
9954 * ali-util.adb, sem_prag.adb, rtsfind.adb, sem_util.adb, sem_res.adb,
9955 ali.adb, binde.adb, namet.adb, namet.ads, gnatls.adb, bcheck.adb:
9956 Minor change of name Name_Table_Info => Name_Table_Int.
9958 2015-01-06 Robert Dewar <dewar@adacore.com>
9960 * exp_strm.adb (Build_Elementary_Input_Call): Clarify comments
9961 in previous checkin.
9962 * freeze.adb (Freeze_Fixed_Point_Type): Add warning for shaving
9964 * sem_prag.adb, sem_ch10.adb, sem_ch6.adb: Minor reformatting.
9966 2015-01-06 Vincent Celier <celier@adacore.com>
9968 * a-strsup.adb (Times (Natural;String;Positive)): Raise
9969 Length_Error, not Index_Error, when the result is too long.
9971 2015-01-06 Thomas Quinot <quinot@adacore.com>
9973 * a-direct.adb (Create_Path): Minor error handling and
9974 performance improvement.
9976 2015-01-06 Robert Dewar <dewar@adacore.com>
9978 * checks.ads, sem_ch12.adb: Minor reformatting.
9979 * exp_ch4.adb (Expand_N_Op_Divide): Generate explicit divide by
9980 zero check for fixed-point case if Backend_Divide_Checks_On_Target
9983 2015-01-06 Robert Dewar <dewar@adacore.com>
9985 * sem_prag.adb (Analyze_Pragma, case No_Elaboration_Code_All):
9986 Do not set restriction No_Elaboration_Code unless the pragma
9987 appears in the main unit).
9989 2015-01-06 Ed Schonberg <schonberg@adacore.com>
9991 * sem_ch10.adb (Is_Regular_With_Clause): Add guard to verify
9992 that with clause has already been analyzed before checking kind
9995 2015-01-06 Robert Dewar <dewar@adacore.com>
9997 * exp_strm.adb (Build_Elementary_Input_Call): Return base type
9998 (as required by RM).
10000 2015-01-06 Arnaud Charlet <charlet@adacore.com>
10002 * a-reatim.adb ("/"): Add explicit pragma Unsuppress (Division_Check).
10004 2015-01-06 Robert Dewar <dewar@adacore.com>
10006 * sem_prag.adb (Process_Suppress_Unsuppress): Add extra warning
10007 for ignoring pragma Suppress (Elaboration_Check) in SPARK mode.
10009 2015-01-06 Javier Miranda <miranda@adacore.com>
10011 * exp_disp.adb (Expand_Interface_Conversion): No displacement
10012 of the pointer to the object needed when the type of the operand
10013 is not an interface type and the interface is one of its parent
10014 types (since they share the primary dispatch table).
10016 2015-01-06 Vincent Celier <celier@adacore.com>
10018 * prj-env.adb: Minor comment update.
10020 2015-01-06 Javier Miranda <miranda@adacore.com>
10022 * sem_res.adb (Valid_Conversion): Restrict the checks on anonymous
10023 access types whose target type is an interface type to operands
10024 that are access types; required to report an error when the
10025 operand is not an access type.
10027 2015-01-06 Bob Duff <duff@adacore.com>
10029 * a-cfinve.adb (Copy): Set the discriminant to the Length when
10031 * a-cofove.ads (Capacity): Add a postcondition.
10032 * a-cfinve.ads (Capacity): Add a postcondition.
10033 (Reserve_Capacity): Correct the postcondition in the case where
10034 Capacity = 0; that means "Capacity => Length (Container)".
10035 * a-cofove.adb (Elems[c]): Add a comment
10036 explaining the dangers and how to avoid them.
10038 2015-01-06 Ed Schonberg <schonberg@adacore.com>
10040 * sem_ch12.adb: Code clean up.
10042 2015-01-06 Arnaud Charlet <charlet@adacore.com>
10044 * gnatvsn.ads: Bump copyright year.
10046 2015-01-06 Robert Dewar <dewar@adacore.com>
10048 * s-taskin.ads, s-traces.ads: Minor reformatting.
10049 * exp_util.adb: Minor typo fix.
10051 2015-01-06 Vincent Celier <celier@adacore.com>
10053 * gnatls.adb (Search_RTS): Invoke Initialize_Default_Project_Path
10054 with the runtime name.
10055 * prj-env.adb (Initialize_Default_Project_Path): When both
10056 Target_Name and Runtime_Name are not empty string, add to the
10057 project path the two directories .../lib/gnat and .../share/gpr
10058 related to the runtime.
10059 * prj-env.ads (Initialize_Default_Project_Path): New String
10060 parameter Runtime_Name, defaulted to the empty string.
10062 2015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
10064 * frontend.adb: Guard against the case where a configuration
10065 pragma may be split into multiple pragmas and the original
10066 rewritten as a null statement.
10067 * sem_prag.adb (Analyze_Pragma): Insert a brand new Check_Policy
10068 pragma using Insert_Before rather than Insert_Action. This
10069 takes care of the configuration pragma case where Insert_Action
10072 2015-01-06 Bob Duff <duff@adacore.com>
10074 * a-coboho.ads (Element_Access): Add "pragma
10075 No_Strict_Aliasing (Element_Access);". This is needed because
10076 we are unchecked-converting from Address to Element_Access.
10077 * a-cofove.ads, a-cofove.adb (Elems,Elemsc): Fix bounds of the
10080 2015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
10082 * sem_res.adb (Resolve_Actuals): Remove the
10083 restriction which prohibits volatile actual parameters with
10084 enabled external propery Async_Writers to act appear in procedure
10085 calls where the corresponding formal is of mode OUT.
10087 2015-01-05 Jakub Jelinek <jakub@redhat.com>
10089 * gnat_ugn.texi: Bump @copying's copyright year.
10091 2015-01-05 Eric Botcazou <ebotcazou@adacore.com>
10094 * gcc-interface/Makefile.in (../stamp-tools): Reinstate dropped code.
10096 2015-01-04 Uros Bizjak <ubizjak@gmail.com>
10098 * gcc-interface/misc.c (internal_error_function): Use xasprintf instead
10099 of unchecked asprintf.
10102 Copyright (C) 2015 Free Software Foundation, Inc.
10104 Copying and distribution of this file, with or without modification,
10105 are permitted in any medium without royalty provided the copyright
10106 notice and this notice are preserved.